import { IStringDictionary } from "./collections.js"; import { PlatformName } from "./platform.js"; import { IExtensionConfigurationPolicyReference, IPolicy } from "./policy.js"; export interface IBuiltInExtension { readonly name: string; readonly version: string; readonly repo: string; readonly metadata: unknown; } export interface IProductWalkthrough { id: string; steps: IProductWalkthroughStep[]; } export interface IProductWalkthroughStep { id: string; title: string; when: string; description: string; media: { type: "image"; path: string | { hc: string; hcLight?: string; light: string; dark: string; }; altText: string; } | { type: "svg"; path: string; altText: string; } | { type: "markdown"; path: string; }; } export interface IFeaturedExtension { readonly id: string; readonly title: string; readonly description: string; readonly imagePath: string; } export interface IChatSessionRecommendation { readonly extensionId: string; readonly extensionName: string; readonly displayName: string; readonly name: string; readonly description: string; readonly postInstallCommand?: string; } export type ConfigurationSyncStore = { url: string; insidersUrl: string; stableUrl: string; canSwitch?: boolean; authenticationProviders: IStringDictionary<{ scopes: string[]; }>; }; export type ExtensionUntrustedWorkspaceSupport = { readonly default?: boolean | "limited"; readonly override?: boolean | "limited"; }; export type ExtensionVirtualWorkspaceSupport = { readonly default?: boolean; readonly override?: boolean; }; /** * Per-SDK configuration for downloading an agent SDK on demand. The * runtime substitutes `{sdkTarget}` in `urlTemplate` against the host's * `(platform, arch, libc)` triple via `resolveSdkTarget()` in the agent * SDK downloader. * * `urlTemplate` uses `format2()`-style named placeholders. Today only * `{sdkTarget}` is recognised; the build emits e.g. * `https://main.vscode-cdn.net/agent-sdk/claude/0.3.168/{sdkTarget}.tgz` * and the runtime substitutes `darwin-arm64`, `linux-x64-musl`, etc. * * See `src/vs/platform/agentHost/node/claude/roadmap.md` Phase 15 for * the rationale (macOS Universal compatibility, trust model). */ export interface IAgentSdkProductConfig { readonly version: string; readonly urlTemplate: string; } /** * Configuration for downloading the on-device dictation native runtime (the * Foundry Local addon + core libraries) on demand. Produced per platform build * and stamped by `build/dictation-runtime/produce.ts`; consumed by * `foundryLocalRuntime.ts`, which substitutes `{target}` in `urlTemplate` * against the host's `-` key. Absent in local dev builds, in * which case the runtime falls back to the SDK's own `node_modules` payload. */ export interface IDictationRuntimeProductConfig { readonly version: string; readonly urlTemplate: string; } export interface IProductConfiguration { readonly version: string; readonly date?: string; readonly quality?: string; readonly commit?: string; readonly nameShort: string; readonly nameLong: string; readonly win32AppUserModelId?: string; readonly win32MutexName?: string; readonly win32SetupMutexName?: string; readonly win32RegValueName?: string; readonly win32NameVersion?: string; readonly win32VersionedUpdate?: boolean; readonly win32ContextMenu?: { readonly [arch: string]: { readonly clsid: string; }; }; readonly applicationName: string; readonly linuxDesktopName?: string; readonly embedderIdentifier?: string; readonly agentsTelemetryAppName?: string; readonly urlProtocol: string; readonly dataFolderName: string; readonly sharedDataFolderName: string; readonly builtInExtensions?: IBuiltInExtension[]; readonly walkthroughMetadata?: IProductWalkthrough[]; readonly featuredExtensions?: IFeaturedExtension[]; readonly downloadUrl?: string; readonly updateUrl?: string; readonly webUrl?: string; readonly webEndpointUrlTemplate?: string; readonly webviewContentExternalBaseUrlTemplate?: string; readonly target?: string; readonly nlsCoreBaseUrl?: string; /** Build-time hash of the commit and core NLS tables used to identify translated-message caches. */ readonly nlsMetadataHash?: string; readonly settingsSearchBuildId?: number; readonly settingsSearchUrl?: string; readonly tasConfig?: { endpoint: string; telemetryEventName: string; assignmentContextTelemetryPropertyName: string; }; readonly extensionsGallery?: { readonly serviceUrl: string; readonly controlUrl: string; readonly extensionUrlTemplate: string; readonly resourceUrlTemplate: string; readonly nlsBaseUrl: string; readonly accessSKUs?: string[]; readonly accessScopes?: string[]; }; readonly agentSdks?: { readonly [packageId: string]: IAgentSdkProductConfig; }; readonly copilotVersions?: { readonly runtime: string; readonly sdk: string; }; readonly dictationRuntime?: IDictationRuntimeProductConfig; readonly mcpGallery?: { readonly serviceUrl: string; readonly itemWebUrl: string; readonly publisherUrl: string; readonly supportUrl: string; readonly privacyPolicyUrl: string; readonly termsOfServiceUrl: string; readonly reportUrl: string; }; readonly extensionPublisherOrgs?: readonly string[]; readonly trustedExtensionPublishers?: readonly string[]; readonly extensionRecommendations?: IStringDictionary; readonly connectorRecommendations?: IStringDictionary<{ readonly name: string; readonly description: string; readonly iconUrl: string; readonly urls?: readonly string[]; }>; readonly configBasedExtensionTips?: IStringDictionary; readonly exeBasedExtensionTips?: IStringDictionary; readonly remoteExtensionTips?: IStringDictionary; readonly virtualWorkspaceExtensionTips?: IStringDictionary; readonly extensionKeywords?: IStringDictionary; readonly keymapExtensionTips?: readonly string[]; readonly webExtensionTips?: readonly string[]; readonly languageExtensionTips?: readonly string[]; readonly trustedExtensionUrlPublicKeys?: IStringDictionary; readonly trustedExtensionAuthAccess?: string[] | IStringDictionary; readonly trustedMcpAuthAccess?: string[] | IStringDictionary; readonly inheritAuthAccountPreference?: IStringDictionary; readonly trustedExtensionProtocolHandlers?: readonly string[]; readonly commandPaletteSuggestedCommandIds?: string[]; readonly crashReporter?: { readonly companyName: string; readonly productName: string; }; readonly removeTelemetryMachineId?: boolean; readonly enabledTelemetryLevels?: { error: boolean; usage: boolean; }; readonly enableTelemetry?: boolean; readonly openToWelcomeMainPage?: boolean; readonly aiConfig?: { readonly ariaKey: string; }; readonly documentationUrl?: string; readonly serverDocumentationUrl?: string; readonly releaseNotesUrl?: string; readonly keyboardShortcutsUrlMac?: string; readonly keyboardShortcutsUrlLinux?: string; readonly keyboardShortcutsUrlWin?: string; readonly introductoryVideosUrl?: string; readonly tipsAndTricksUrl?: string; readonly newsletterSignupUrl?: string; readonly youTubeUrl?: string; readonly requestFeatureUrl?: string; readonly reportIssueUrl?: string; readonly reportMarketplaceIssueUrl?: string; readonly licenseUrl?: string; readonly serverLicenseUrl?: string; readonly privacyStatementUrl?: string; readonly showTelemetryOptOut?: boolean; readonly serverGreeting?: string[]; readonly serverLicense?: string[]; readonly serverLicensePrompt?: string; readonly serverApplicationName: string; readonly serverDataFolderName?: string; readonly tunnelApplicationName?: string; readonly tunnelApplicationConfig?: ITunnelApplicationConfig; readonly npsSurveyUrl?: string; readonly surveys?: readonly ISurveyData[]; readonly checksums?: { [path: string]: string; }; readonly checksumFailMoreInfoUrl?: string; readonly appCenter?: IAppCenterConfiguration; readonly portable?: string; readonly extensionKind?: { readonly [extensionId: string]: ("ui" | "workspace" | "web")[]; }; readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ("ui" | "workspace" | "web")[]; }; readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[]; }; readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[]; }; readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport; }; readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport; }; readonly extensionProperties: IStringDictionary<{ readonly hasPrereleaseVersion?: boolean; readonly excludeVersionRange?: string; }>; readonly extensionsForceVersionByQuality?: readonly string[]; readonly builtInExtensionsEnabledWithAutoUpdates: readonly string[]; readonly sessionsWindowAllowedExtensions?: readonly string[]; readonly msftInternalDomains?: string[]; readonly linkProtectionTrustedDomains?: readonly string[]; readonly authClientIdMetadataUrl?: string; readonly "configurationSync.store"?: ConfigurationSyncStore; readonly "editSessions.store"?: Omit; readonly darwinUniversalAssetId?: string; readonly darwinBundleIdentifier?: string; readonly profileTemplatesUrl?: string; readonly commonlyUsedSettings?: string[]; readonly aiGeneratedWorkspaceTrust?: IAiGeneratedWorkspaceTrust; readonly defaultChatAgent?: IDefaultChatAgent; readonly chatParticipantRegistry?: string; readonly chatSessionRecommendations?: IChatSessionRecommendation[]; readonly emergencyAlertUrl?: string; readonly voiceWsUrl?: string; readonly remoteDefaultExtensionsIfInstalledLocally?: string[]; /** * Maps an extension-contributed setting key to either a full enterprise {@link IPolicy} * (the setting owns/"parents" the policy — the original syntax) or an * {@link IExtensionConfigurationPolicyReference} (`{ policyReference: { name } }`), attaching the * setting to a policy owned by an in-code setting. References let a `product.json`-provided * setting be governed by a policy whose `value` callback — which JSON cannot carry — lives in code. */ readonly extensionConfigurationPolicy?: IStringDictionary; readonly onboardingKeymaps?: readonly IProductOnboardingKeymap[]; readonly onboardingThemes?: readonly IProductOnboardingTheme[]; /** * When running as an embedded app, the parent VS Code's policy * identity (win32RegValueName / darwinBundleIdentifier) so that * enterprise policies deployed to the parent also apply here. */ parentPolicyConfig?: { win32RegValueName?: string; darwinBundleIdentifier?: string; urlProtocol?: string; }; } export interface IProductOnboardingKeymap { readonly id: string; readonly label: string; readonly extensionId?: string; readonly description: string; } export interface IProductOnboardingTheme { readonly id: string; readonly label: string; readonly themeId: string; readonly type: "dark" | "light" | "hcDark" | "hcLight"; } export interface ITunnelApplicationConfig { authenticationProviders: IStringDictionary<{ scopes: string[]; }>; editorWebUrl: string; extension: IRemoteExtensionTip; } export interface IExtensionRecommendations { readonly onFileOpen: IFileOpenCondition[]; readonly onSettingsEditorOpen?: ISettingsEditorOpenCondition; } export interface ISettingsEditorOpenCondition { readonly prerelease?: boolean | string; readonly descriptionOverride?: string; } export interface IExtensionRecommendationCondition { readonly important?: boolean; readonly whenInstalled?: string[]; readonly whenNotInstalled?: string[]; } export type IFileOpenCondition = IFileLanguageCondition | IFilePathCondition | IFileContentCondition; export interface IFileLanguageCondition extends IExtensionRecommendationCondition { readonly languages: string[]; } export interface IFilePathCondition extends IExtensionRecommendationCondition { readonly pathGlob: string; } export type IFileContentCondition = (IFileLanguageCondition | IFilePathCondition) & { readonly contentPattern: string; }; export interface IAppCenterConfiguration { readonly "win32-x64": string; readonly "win32-arm64": string; readonly "linux-x64": string; readonly "darwin": string; readonly "darwin-universal": string; readonly "darwin-arm64": string; } export interface IConfigBasedExtensionTip { configPath: string; configName: string; configScheme?: string; recommendations: IStringDictionary<{ name: string; contentPattern?: string; important?: boolean; isExtensionPack?: boolean; whenNotInstalled?: string[]; }>; } export interface IExeBasedExtensionTip { friendlyName: string; windowsPath?: string; important?: boolean; recommendations: IStringDictionary<{ name: string; important?: boolean; isExtensionPack?: boolean; whenNotInstalled?: string[]; }>; } export interface IRemoteExtensionTip { friendlyName: string; extensionId: string; supportedPlatforms?: PlatformName[]; startEntry?: { helpLink: string; startConnectLabel: string; startCommand: string; priority: number; }; } export interface IVirtualWorkspaceExtensionTip { friendlyName: string; extensionId: string; supportedPlatforms?: PlatformName[]; startEntry: { helpLink: string; startConnectLabel: string; startCommand: string; priority: number; }; } export interface ISurveyData { surveyId: string; surveyUrl: string; languageId: string; editCount: number; userProbability: number; } export interface IAiGeneratedWorkspaceTrust { readonly title: string; readonly checkboxText: string; readonly trustOption: string; readonly dontTrustOption: string; readonly startupTrustRequestLearnMore: string; } export interface IDefaultChatAgent { readonly extensionId: string; readonly chatExtensionId: string; readonly chatExtensionOutputId: string; readonly chatExtensionOutputExtensionStateCommand: string; readonly documentationUrl: string; readonly skusDocumentationUrl: string; readonly optimizeUsageDocumentationUrl: string; readonly publicCodeMatchesUrl: string; readonly managePlanUrl: string; readonly upgradePlanUrl: string; readonly signUpUrl: string; readonly termsStatementUrl: string; readonly privacyStatementUrl: string; readonly provider: { default: { id: string; name: string; }; enterprise: { id: string; name: string; }; google: { id: string; name: string; }; apple: { id: string; name: string; }; microsoft: { id: string; name: string; }; }; readonly providerExtensionId: string; readonly providerUriSetting: string; readonly providerScopes: string[][]; readonly entitlementUrl: string; readonly entitlementSignupLimitedUrl: string; readonly tokenEntitlementUrl: string; readonly mcpRegistryDataUrl: string; readonly mcpConnectorsUrl?: string; readonly managedSettingsUrl: string; readonly chatQuotaExceededContext: string; readonly completionsQuotaExceededContext: string; readonly walkthroughCommand: string; readonly completionsMenuCommand: string; readonly chatRefreshTokenCommand: string; readonly generateCommitMessageCommand: string; readonly resolveMergeConflictsCommand: string; readonly completionsAdvancedSetting: string; readonly completionsEnablementSetting: string; readonly nextEditSuggestionsSetting: string; }