@codingame/monaco-vscode-chat-service-override 34.1.3 → 35.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +38 -0
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +40 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +27 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +91 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +20 -4
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +148 -15
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +9 -1
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +57 -3
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +10 -14
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +29 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +109 -2
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +207 -21
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +362 -37
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +698 -91
- package/vscode/src/vs/platform/agentHost/common/agentService.js +46 -3
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.js +26 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +17 -17
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +96 -12
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +226 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.d.ts +18 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +89 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +10 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +400 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +129 -446
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +35 -25
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +7 -1
- package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.d.ts +4 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +1 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +0 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +5 -18
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +52 -3
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +212 -34
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +3 -4
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +11 -10
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +13 -6
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +6 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +399 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +85 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +204 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +338 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +57 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +98 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +149 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +116 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +226 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +138 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +25 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +108 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +63 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +322 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +15 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.js +26 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +132 -0
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +237 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +32 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +71 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +19 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +66 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +128 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +58 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +15 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +64 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +45 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +25 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +143 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +7 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +163 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +26 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +44 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +11 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +9 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +107 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +46 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +19 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +244 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +47 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +772 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +24 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +94 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +421 -201
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +1424 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +107 -127
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +331 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +898 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +581 -336
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +567 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +168 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +183 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +897 -251
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.d.ts +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +720 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +354 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +55 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +192 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +37 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +40 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +230 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +35 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +26 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +56 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +109 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +38 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +175 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +183 -84
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +20 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +40 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +169 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +399 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +321 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +2117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +367 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +16 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +320 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +80 -4
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +226 -88
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +78 -136
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +1 -17
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +16 -5
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +24 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +113 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +227 -152
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +98 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +7 -6
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +11 -12
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +7 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +32 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +23 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +37 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +71 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +29 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +7 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +10 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +26 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +416 -252
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +25 -8
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +8 -3
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +0 -82
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -47
- /package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.js +0 -0
|
@@ -3,15 +3,15 @@ import { IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
3
3
|
import type { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
4
4
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
5
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
6
|
-
import type {
|
|
6
|
+
import type { IAgentServerToolHost } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentServerTools";
|
|
7
7
|
import type { IActiveSubscriptionInfo, IAgentSubscription } from "./state/agentSubscription.js";
|
|
8
8
|
import type { IRemoteWatchHandle } from "./agentHostFileSystemProvider.js";
|
|
9
9
|
import type { CompletionsParams, CompletionsResult, CreateTerminalParams, ResolveSessionConfigResult, SessionConfigCompletionsResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
|
|
10
10
|
import type { InvokeChangesetOperationParams, InvokeChangesetOperationResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands";
|
|
11
|
-
import { ProtectedResourceMetadata, type
|
|
12
|
-
import type { ActionEnvelope, INotification, IRootConfigChangedAction, SessionAction, TerminalAction } from "./state/sessionActions.js";
|
|
11
|
+
import { ProtectedResourceMetadata, type Changeset, type ConfigSchema, type MessageAttachment, type ModelSelection, type AgentSelection, type SessionActiveClient, type ToolCallPendingConfirmationState, type ToolDefinition, ChangesSummary } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
12
|
+
import type { ActionEnvelope, AuthRequiredParams, INotification, IRootConfigChangedAction, SessionAction, ChatAction, TerminalAction, ClientAnnotationsAction } from "./state/sessionActions.js";
|
|
13
13
|
import type { ResourceCopyParams, ResourceCopyResult, ResourceDeleteParams, ResourceDeleteResult, ResourceListResult, ResourceMkdirParams, ResourceMkdirResult, ResourceMoveParams, ResourceMoveResult, ResourceReadResult, ResourceResolveParams, ResourceResolveResult, ResourceWriteParams, ResourceWriteResult, CreateResourceWatchParams, CreateResourceWatchResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol";
|
|
14
|
-
import { ComponentToState,
|
|
14
|
+
import { ComponentToState, ChatInputResponseKind, SessionStatus, StateComponents, type AgentCapabilities, type ClientPluginCustomization, type Customization, type PendingMessage, type RootState, type ChatInputAnswer, type SessionMeta, type ToolCallResult, type Turn, type PolicyState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
15
15
|
export declare enum AgentHostIpcChannels {
|
|
16
16
|
/** Channel for the agent host service on the main-process side */
|
|
17
17
|
AgentHost = "agentHost",
|
|
@@ -35,31 +35,163 @@ export declare const AgentHostAhpJsonlLoggingSettingId = "chat.agentHost.ahpJson
|
|
|
35
35
|
/** Configuration key that controls whether Agent Host uses its terminal tool override for Copilot SDK sessions. */
|
|
36
36
|
export declare const AgentHostCustomTerminalToolEnabledSettingId = "chat.agentHost.customTerminalTool.enabled";
|
|
37
37
|
/**
|
|
38
|
-
* Configuration key that
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* Claude provider is not registered. The SDK is intentionally not bundled
|
|
43
|
-
* with VS Code; users opting into the Claude agent install the SDK
|
|
44
|
-
* themselves and point this setting at it. The agent host process must be
|
|
45
|
-
* restarted for changes to take effect.
|
|
38
|
+
* Configuration key that controls whether Copilot SDK sessions running a Claude
|
|
39
|
+
* Opus 4.8 model apply the Opus 4.8-tuned system-prompt section overrides.
|
|
40
|
+
* Forwarded into the agent host's root config (`opus48Prompt`) by
|
|
41
|
+
* `AgentHostCopilotPromptContribution`.
|
|
46
42
|
*/
|
|
47
|
-
export declare const
|
|
43
|
+
export declare const AgentHostOpus48PromptEnabledSettingId = "chat.agentHost.opus48Prompt.enabled";
|
|
48
44
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* {@link
|
|
54
|
-
*
|
|
45
|
+
* Configuration key controlling whether the Claude provider is registered in
|
|
46
|
+
* the agent host process. When `false`, the agent host skips registering the
|
|
47
|
+
* Claude provider regardless of SDK availability. Defaults to `true`.
|
|
48
|
+
*
|
|
49
|
+
* Independent of {@link ClaudePreferAgentHostAgentsSettingId} /
|
|
50
|
+
* {@link ClaudePreferAgentHostEditorSettingId}, which control whether the
|
|
51
|
+
* workbench surfaces the agent host's Claude provider (vs. the GitHub Copilot
|
|
52
|
+
* Chat extension's). This setting is strictly about whether the agent host
|
|
53
|
+
* advertises Claude at all. The agent host process must be restarted for
|
|
54
|
+
* changes to take effect.
|
|
55
|
+
*/
|
|
56
|
+
export declare const AgentHostClaudeAgentEnabledSettingId = "chat.agentHost.claudeAgent.enabled";
|
|
57
|
+
/**
|
|
58
|
+
* Configuration key controlling whether the Codex provider is registered in
|
|
59
|
+
* the agent host process. When `false` (the default), the agent host skips
|
|
60
|
+
* registering the Codex provider regardless of SDK availability. The agent
|
|
61
|
+
* host process must be restarted for changes to take effect.
|
|
62
|
+
*/
|
|
63
|
+
export declare const AgentHostCodexAgentEnabledSettingId = "chat.agentHost.codexAgent.enabled";
|
|
64
|
+
/**
|
|
65
|
+
* Configuration key controlling whether the agent host *wires up* the BYOK
|
|
66
|
+
* ("bring your own key") language-model bridge: the renderer LM handler, the
|
|
67
|
+
* reverse-RPC channel, and the per-connection link to the node-side OpenAI
|
|
68
|
+
* proxy + bridge registry. When `false` (the default), the proxy and registry
|
|
69
|
+
* are still constructed but stay inert — the renderer's BYOK server channel and
|
|
70
|
+
* the per-connection bridge are not wired, so the registry stays empty and
|
|
71
|
+
* extension-provided BYOK models are never reachable from agent-host sessions.
|
|
72
|
+
* The agent host process must be restarted for changes to take effect.
|
|
73
|
+
*/
|
|
74
|
+
export declare const AgentHostByokModelsEnabledSettingId = "chat.agentHost.byokModels.enabled";
|
|
75
|
+
/**
|
|
76
|
+
* Optional override that points at an **SDK root directory** containing a
|
|
77
|
+
* `node_modules/@anthropic-ai/claude-agent-sdk` subtree. When set, the agent
|
|
78
|
+
* host loads the Claude SDK from that path instead of the bare import (which
|
|
79
|
+
* resolves via this repo's `node_modules` in dev) or the on-demand download
|
|
80
|
+
* from `product.agentSdks.claude` (built products). Mainly exists for the
|
|
81
|
+
* remote server's `--claude-sdk-root` CLI flag and for one-off developer
|
|
82
|
+
* overrides pointing at an out-of-tree SDK build.
|
|
83
|
+
*/
|
|
84
|
+
export declare const AgentHostClaudeSdkRootEnvVar = "VSCODE_AGENT_HOST_CLAUDE_SDK_ROOT";
|
|
85
|
+
/**
|
|
86
|
+
* Environment variable form of {@link AgentHostClaudeAgentEnabledSettingId}.
|
|
87
|
+
* Set by the agent host starters from the setting. Accepts `'true'` /
|
|
88
|
+
* `'false'`; absent means "default" (`true` for Claude, `false` for Codex).
|
|
89
|
+
*/
|
|
90
|
+
export declare const AgentHostClaudeAgentEnabledEnvVar = "VSCODE_AGENT_HOST_CLAUDE_AGENT_ENABLED";
|
|
91
|
+
/**
|
|
92
|
+
* Environment variable form of {@link AgentHostCodexAgentEnabledSettingId}.
|
|
93
|
+
* Set by the agent host starters from the setting. Accepts `'true'` /
|
|
94
|
+
* `'false'`; absent means "default" (`false`).
|
|
95
|
+
*/
|
|
96
|
+
export declare const AgentHostCodexAgentEnabledEnvVar = "VSCODE_AGENT_HOST_CODEX_AGENT_ENABLED";
|
|
97
|
+
/**
|
|
98
|
+
* Environment variable form of {@link AgentHostByokModelsEnabledSettingId}.
|
|
99
|
+
* Set by the agent host starters from the setting. Accepts `'true'` /
|
|
100
|
+
* `'false'`; absent means "default" (`false`).
|
|
101
|
+
*/
|
|
102
|
+
export declare const AgentHostByokModelsEnabledEnvVar = "VSCODE_AGENT_HOST_BYOK_MODELS_ENABLED";
|
|
103
|
+
/**
|
|
104
|
+
* Resolves the effective enable state for a Claude/Codex provider from the
|
|
105
|
+
* env-var value forwarded by the starter. Recognized values (case- and
|
|
106
|
+
* whitespace-insensitive):
|
|
107
|
+
*
|
|
108
|
+
* - `'true'` / `'1'` → enabled
|
|
109
|
+
* - `'false'` / `'0'` → disabled
|
|
110
|
+
* - `undefined`, empty string, or any other value → falls through to
|
|
111
|
+
* {@link defaultEnabled}
|
|
112
|
+
*/
|
|
113
|
+
export declare function isAgentEnabled(envValue: string | undefined, defaultEnabled: boolean): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Configuration key that controls the sandbox mode for the Copilot SDK's built-in
|
|
116
|
+
* shell tool (the path taken when {@link AgentHostCustomTerminalToolEnabledSettingId}
|
|
117
|
+
* is `false`). Values mirror {@link AgentSandboxEnabledValue}:
|
|
118
|
+
*
|
|
119
|
+
* - `'off'` (the default): no sandbox policy is forwarded for the SDK shell
|
|
120
|
+
* path \u2014 commands run unsandboxed.
|
|
121
|
+
* - `'on'`: the Agent Host runs the SDK\u2019s shell tool inside a sandbox
|
|
122
|
+
* using the user's `chat.agent.sandbox.fileSystem.*` filesystem policy.
|
|
123
|
+
* Outbound network is enforced via the user's allow/deny host lists.
|
|
124
|
+
* - `'allowNetwork'`: same as `'on'` but with unrestricted outbound network.
|
|
125
|
+
*
|
|
126
|
+
* Has no effect when {@link AgentHostCustomTerminalToolEnabledSettingId} is
|
|
127
|
+
* `true` \u2014 the host\u2019s own terminal sandbox engine then handles shell
|
|
128
|
+
* commands and reads `chat.agent.sandbox.enabled` directly.
|
|
129
|
+
*/
|
|
130
|
+
export declare const AgentHostSdkSandboxEnabledSettingId = "chat.agentHost.sdkSandbox.enabled";
|
|
131
|
+
/**
|
|
132
|
+
* Selects which Claude integration fulfills Claude sessions opened from the
|
|
133
|
+
* **Agents Window**:
|
|
134
|
+
* - `true` — Claude is provided by the agent host process.
|
|
135
|
+
* - `false` (default) — Claude is provided by the GitHub Copilot Chat extension.
|
|
136
|
+
*
|
|
137
|
+
* The agent host always registers Claude when its SDK is reachable; this
|
|
138
|
+
* setting only controls whether the per-window bridge in
|
|
139
|
+
* `AgentHostContribution` actually surfaces the AH provider in the Agents
|
|
140
|
+
* Window. The extension's `chatSessions` contribution mirrors the rule
|
|
141
|
+
* declaratively (its `when` clause hides the EH provider when this is `true`),
|
|
142
|
+
* so flipping the setting takes effect live without a window reload.
|
|
143
|
+
*
|
|
144
|
+
* Paired with {@link ClaudePreferAgentHostEditorSettingId} which governs the
|
|
145
|
+
* regular workbench (sidebar). EXP-backed (`experiment: { mode: 'startup' }`).
|
|
55
146
|
*/
|
|
56
|
-
export declare const
|
|
147
|
+
export declare const ClaudePreferAgentHostAgentsSettingId = "chat.agents.claude.preferAgentHost";
|
|
57
148
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
149
|
+
* Sibling of {@link ClaudePreferAgentHostAgentsSettingId} that selects the
|
|
150
|
+
* Claude implementation for the **regular workbench** (sidebar chat in a
|
|
151
|
+
* non-Agents-Window window). Same shape, same semantics — just a different
|
|
152
|
+
* surface scope.
|
|
61
153
|
*/
|
|
62
|
-
export declare const
|
|
154
|
+
export declare const ClaudePreferAgentHostEditorSettingId = "chat.editor.claude.preferAgentHost";
|
|
155
|
+
/**
|
|
156
|
+
* The per-window setting that selects which Claude implementation surfaces:
|
|
157
|
+
* the Agents Window reads {@link ClaudePreferAgentHostAgentsSettingId}, every
|
|
158
|
+
* other window reads {@link ClaudePreferAgentHostEditorSettingId}. Callers that
|
|
159
|
+
* observe the gate (to react to live flips) watch the id returned here; callers
|
|
160
|
+
* that evaluate it use {@link shouldSurfaceLocalAgentHostProvider}.
|
|
161
|
+
*/
|
|
162
|
+
export declare function claudePreferAgentHostSettingId(isSessionsWindow: boolean): string;
|
|
163
|
+
/**
|
|
164
|
+
* Whether this window should surface the agent host's implementation of
|
|
165
|
+
* `provider`, given the per-window AH/EH preference settings. Today only the
|
|
166
|
+
* `claude` provider has dual implementations (the GitHub Copilot Chat
|
|
167
|
+
* extension's extension-host provider vs. the agent host's in-process
|
|
168
|
+
* provider) and a corresponding preference; every other provider is AH-only
|
|
169
|
+
* and unconditionally surfaced.
|
|
170
|
+
*
|
|
171
|
+
* Mirrors the EH-side gate declared in the extension's `chatSessions`
|
|
172
|
+
* contribution `when` clause:
|
|
173
|
+
* - Agents Window → {@link ClaudePreferAgentHostAgentsSettingId}
|
|
174
|
+
* - Editor Window → {@link ClaudePreferAgentHostEditorSettingId}
|
|
175
|
+
*
|
|
176
|
+
* When the relevant setting is `false`, the extension-host Claude is the one
|
|
177
|
+
* that surfaces in this window, so every agent-host surface (the chat session
|
|
178
|
+
* contribution and the sessions-window picker) suppresses its own Claude to
|
|
179
|
+
* avoid two identical entries.
|
|
180
|
+
*
|
|
181
|
+
* TODO: Remove this gate (and the `claude` special-case below) once the
|
|
182
|
+
* extension-host Claude implementation is retired. With only the agent host
|
|
183
|
+
* providing Claude there is no dual implementation to disambiguate, so this
|
|
184
|
+
* should unconditionally return `true` and callers can drop the gate entirely.
|
|
185
|
+
*/
|
|
186
|
+
export declare function shouldSurfaceLocalAgentHostProvider(provider: AgentProvider, configurationService: IConfigurationService, isSessionsWindow: boolean): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Absolute path to the **SDK root directory** containing a
|
|
189
|
+
* `node_modules/@openai/codex` subtree. When non-empty, the agent host treats
|
|
190
|
+
* it as a dev override and skips the on-demand download from
|
|
191
|
+
* `product.agentSdks.codex`. Empty (the default) falls through to product
|
|
192
|
+
* config; if neither is present, the provider is not registered.
|
|
193
|
+
*/
|
|
194
|
+
export declare const AgentHostCodexAgentSdkRootSettingId = "chat.agentHost.codexAgent.sdkRoot";
|
|
63
195
|
/**
|
|
64
196
|
* Optional override for `$CODEX_HOME`. When set, the codex app-server child
|
|
65
197
|
* process inherits this value, controlling where rollouts and config live.
|
|
@@ -71,11 +203,10 @@ export declare const AgentHostCodexAgentCodexHomeSettingId = "chat.agentHost.cod
|
|
|
71
203
|
*/
|
|
72
204
|
export declare const AgentHostCodexAgentBinaryArgsSettingId = "chat.agentHost.codexAgent.binaryArgs";
|
|
73
205
|
/**
|
|
74
|
-
* Environment variable
|
|
75
|
-
*
|
|
76
|
-
* {@link AgentHostCodexAgentBinaryPathSettingId}.
|
|
206
|
+
* Environment variable form of {@link AgentHostCodexAgentSdkRootSettingId}.
|
|
207
|
+
* Forwarded by the starters from the setting.
|
|
77
208
|
*/
|
|
78
|
-
export declare const
|
|
209
|
+
export declare const AgentHostCodexAgentSdkRootEnvVar = "VSCODE_AGENT_HOST_CODEX_SDK_ROOT";
|
|
79
210
|
/** Forwarded `$CODEX_HOME`. */
|
|
80
211
|
export declare const AgentHostCodexAgentCodexHomeEnvVar = "CODEX_HOME";
|
|
81
212
|
/** Forwarded extra args for `codex app-server` (JSON-encoded string[]). */
|
|
@@ -84,12 +215,23 @@ export declare const AgentHostCodexAgentBinaryArgsEnvVar = "VSCODE_AGENT_HOST_CO
|
|
|
84
215
|
export declare const AgentHostOTelEnabledSettingId = "chat.agentHost.otel.enabled";
|
|
85
216
|
/** Exporter type for the SDK's OTel pipeline. One of: `otlp-http`, `otlp-grpc`, `console`, `file`. */
|
|
86
217
|
export declare const AgentHostOTelExporterTypeSettingId = "chat.agentHost.otel.exporterType";
|
|
218
|
+
/**
|
|
219
|
+
* OTLP wire protocol (`http/json`, `http/protobuf`, `grpc`). Policy-only delivery slot (no user UI):
|
|
220
|
+
* carries the enterprise-managed `telemetry.protocol` so it can be threaded into the agent host's
|
|
221
|
+
* `OTEL_EXPORTER_OTLP_PROTOCOL` env, which the runtime needs to distinguish protobuf from json
|
|
222
|
+
* (the `exporterType` setting only models transport, not the HTTP wire encoding).
|
|
223
|
+
*/
|
|
224
|
+
export declare const AgentHostOTelOtlpProtocolSettingId = "chat.agentHost.otel.otlpProtocol";
|
|
87
225
|
/** OTLP endpoint URL when `exporterType` is `otlp-http` or `otlp-grpc`. */
|
|
88
226
|
export declare const AgentHostOTelOtlpEndpointSettingId = "chat.agentHost.otel.otlpEndpoint";
|
|
89
227
|
/** Whether to include prompt/response content in span attributes (privacy-sensitive). */
|
|
90
228
|
export declare const AgentHostOTelCaptureContentSettingId = "chat.agentHost.otel.captureContent";
|
|
91
229
|
/** Output path when `exporterType` is `file`. */
|
|
92
230
|
export declare const AgentHostOTelOutfileSettingId = "chat.agentHost.otel.outfile";
|
|
231
|
+
/** Policy-only delivery slot for the enterprise-managed OTel `service.name` (no user UI). */
|
|
232
|
+
export declare const AgentHostOTelServiceNameSettingId = "chat.agentHost.otel.serviceName";
|
|
233
|
+
/** Policy-only delivery slot for enterprise-managed OTel resource attributes (no user UI). */
|
|
234
|
+
export declare const AgentHostOTelResourceAttributesSettingId = "chat.agentHost.otel.resourceAttributes";
|
|
93
235
|
/** When true, ALL spans are persisted to a local SQLite store regardless of `exporterType`. */
|
|
94
236
|
export declare const AgentHostOTelDbSpanExporterEnabledSettingId = "chat.agentHost.otel.dbSpanExporter.enabled";
|
|
95
237
|
/**
|
|
@@ -114,10 +256,14 @@ export declare const AgentHostOTelEnvVars: Readonly<{
|
|
|
114
256
|
readonly OtlpEndpoint: "OTEL_EXPORTER_OTLP_ENDPOINT";
|
|
115
257
|
readonly OtlpEndpointAlt: "COPILOT_OTEL_ENDPOINT";
|
|
116
258
|
readonly OtlpProtocol: "OTEL_EXPORTER_OTLP_PROTOCOL";
|
|
259
|
+
readonly OtlpTracesProtocol: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL";
|
|
260
|
+
readonly OtlpMetricsProtocol: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL";
|
|
117
261
|
readonly OtlpHeaders: "OTEL_EXPORTER_OTLP_HEADERS";
|
|
118
262
|
readonly CaptureContent: "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT";
|
|
119
263
|
readonly FilePath: "COPILOT_OTEL_FILE_EXPORTER_PATH";
|
|
120
264
|
readonly SourceName: "COPILOT_OTEL_SOURCE_NAME";
|
|
265
|
+
readonly ServiceName: "OTEL_SERVICE_NAME";
|
|
266
|
+
readonly ResourceAttributes: "OTEL_RESOURCE_ATTRIBUTES";
|
|
121
267
|
readonly DbSpanExporterEnabled: "COPILOT_OTEL_DB_SPAN_EXPORTER_ENABLED";
|
|
122
268
|
}>;
|
|
123
269
|
/**
|
|
@@ -127,11 +273,39 @@ export declare const AgentHostOTelEnvVars: Readonly<{
|
|
|
127
273
|
export interface IAgentHostOTelSettings {
|
|
128
274
|
readonly enabled?: boolean;
|
|
129
275
|
readonly exporterType?: string;
|
|
276
|
+
readonly otlpProtocol?: string;
|
|
130
277
|
readonly otlpEndpoint?: string;
|
|
131
278
|
readonly captureContent?: boolean;
|
|
132
279
|
readonly outfile?: string;
|
|
280
|
+
readonly serviceName?: string;
|
|
281
|
+
readonly resourceAttributes?: Record<string, string>;
|
|
133
282
|
readonly dbSpanExporterEnabled?: boolean;
|
|
134
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* IPC channel (renderer -> main) the desktop agent-host path uses to hand the
|
|
286
|
+
* enterprise-resolved `chat.agentHost.otel.*` policy to `ElectronAgentHostStarter`.
|
|
287
|
+
*
|
|
288
|
+
* The main-process configuration service does NOT include the renderer-only
|
|
289
|
+
* `AccountPolicyService` (managed settings: server / native-MDM / file channels), so a
|
|
290
|
+
* starter running in the main process sees `policyValue === undefined` for these keys.
|
|
291
|
+
* The renderer — whose policy layer does include managed settings — forwards the resolved
|
|
292
|
+
* values here just before requesting the agent-host connection, so the host is spawned with
|
|
293
|
+
* the managed OTel env. See {@link readAgentHostOTelPolicySettings}.
|
|
294
|
+
*/
|
|
295
|
+
export declare const AgentHostOTelPolicyIpcChannel = "vscode:agentHostOTelPolicy";
|
|
296
|
+
/**
|
|
297
|
+
* Resolve the enterprise-policy values for the `chat.agentHost.otel.*` settings from a
|
|
298
|
+
* configuration service whose policy layer includes managed settings (i.e. the renderer's).
|
|
299
|
+
* Each field is `undefined` when no policy is set. Intended as the `policySettings` argument
|
|
300
|
+
* of {@link buildAgentHostOTelEnv}.
|
|
301
|
+
*/
|
|
302
|
+
export declare function readAgentHostOTelPolicySettings(configurationService: IConfigurationService): IAgentHostOTelSettings;
|
|
303
|
+
/**
|
|
304
|
+
* Validate/normalize an {@link IAgentHostOTelSettings} received over IPC, keeping only
|
|
305
|
+
* well-typed fields. Defends the main process against a malformed payload before the values
|
|
306
|
+
* are turned into agent-host process env vars.
|
|
307
|
+
*/
|
|
308
|
+
export declare function sanitizeAgentHostOTelPolicySettings(raw: unknown): IAgentHostOTelSettings;
|
|
135
309
|
/**
|
|
136
310
|
* Build the env-var overlay for the agent host process from user settings and
|
|
137
311
|
* inherited env. Settings are translated to env vars, but if the same env var is
|
|
@@ -140,7 +314,27 @@ export interface IAgentHostOTelSettings {
|
|
|
140
314
|
* Only sets a key when the underlying setting was explicitly configured — empty
|
|
141
315
|
* string / undefined settings are dropped so they don't shadow inherited env.
|
|
142
316
|
*/
|
|
143
|
-
export declare function buildAgentHostOTelEnv(settings: IAgentHostOTelSettings, inheritedEnv: Readonly<Record<string, string | undefined
|
|
317
|
+
export declare function buildAgentHostOTelEnv(settings: IAgentHostOTelSettings, inheritedEnv: Readonly<Record<string, string | undefined>>, policySettings?: IAgentHostOTelSettings): Record<string, string>;
|
|
318
|
+
/**
|
|
319
|
+
* Settings -> env-var fan-out for the Claude/Codex SDK overrides that the
|
|
320
|
+
* agent host process consumes. Shared by both starters
|
|
321
|
+
* (`nodeAgentHostStarter.ts`, `electronAgentHostStarter.ts`) so they don't
|
|
322
|
+
* drift the next time someone adds a setting.
|
|
323
|
+
*
|
|
324
|
+
* The shape mirrors {@link buildAgentHostOTelEnv}: only set a key when the
|
|
325
|
+
* underlying setting has a non-empty value AND the inherited env doesn't
|
|
326
|
+
* already define it (developer override wins). Returns a partial env map
|
|
327
|
+
* the caller spreads into the spawned child's environment.
|
|
328
|
+
*/
|
|
329
|
+
export interface IAgentSdkStarterSettings {
|
|
330
|
+
readonly codexSdkRoot?: string;
|
|
331
|
+
readonly codexHome?: string;
|
|
332
|
+
readonly codexBinaryArgs?: readonly string[];
|
|
333
|
+
readonly claudeAgentEnabled?: boolean;
|
|
334
|
+
readonly codexAgentEnabled?: boolean;
|
|
335
|
+
readonly byokModelsEnabled?: boolean;
|
|
336
|
+
}
|
|
337
|
+
export declare function buildAgentSdkEnv(settings: IAgentSdkStarterSettings, inheritedEnv: Readonly<Record<string, string | undefined>>): Record<string, string>;
|
|
144
338
|
/** Result of starting the agent host WebSocket server on-demand. */
|
|
145
339
|
export interface IAgentHostSocketInfo {
|
|
146
340
|
readonly socketPath: string;
|
|
@@ -182,32 +376,34 @@ export interface IAgentSessionMetadata {
|
|
|
182
376
|
readonly status?: SessionStatus;
|
|
183
377
|
/** Human-readable description of what the session is currently doing. */
|
|
184
378
|
readonly activity?: string;
|
|
185
|
-
readonly model?: ModelSelection;
|
|
186
|
-
/**
|
|
187
|
-
* Selected custom agent for this session. Absent (`undefined`) means no
|
|
188
|
-
* custom agent is selected — the session uses the provider's default
|
|
189
|
-
* behavior.
|
|
190
|
-
*/
|
|
191
|
-
readonly agent?: AgentSelection;
|
|
192
379
|
readonly workingDirectory?: URI;
|
|
193
380
|
readonly customizationDirectory?: URI;
|
|
194
381
|
readonly isRead?: boolean;
|
|
195
382
|
readonly isArchived?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Aggregate counts (additions / deletions / files) describing the
|
|
385
|
+
* `changeKind: 'session'` changeset for this session — the chip
|
|
386
|
+
* aggregate previously embedded in the catalogue entry. Mirrors
|
|
387
|
+
* `SessionSummary.changes`.
|
|
388
|
+
*/
|
|
389
|
+
readonly changes?: ChangesSummary;
|
|
196
390
|
/**
|
|
197
391
|
* Catalogue of changesets the agent can produce for this session — the
|
|
198
|
-
* {@link
|
|
392
|
+
* {@link Changeset | catalogue} that travels on
|
|
199
393
|
* `SessionSummary.changesets`. Lightweight summary entries (id / label /
|
|
200
394
|
* URI template / aggregate counts) without per-file detail; clients
|
|
201
395
|
* subscribe to a specific expanded changeset URI when they need the full
|
|
202
396
|
* file list.
|
|
203
397
|
*/
|
|
204
|
-
readonly changesets?: readonly
|
|
398
|
+
readonly changesets?: readonly Changeset[];
|
|
205
399
|
/**
|
|
206
400
|
* Side-channel metadata mirroring {@link SessionState._meta}, propagated
|
|
207
|
-
* to clients via per-session state subscriptions
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
401
|
+
* to clients via per-session state subscriptions and the root-channel
|
|
402
|
+
* session summary (the host treats the session-state and session-summary
|
|
403
|
+
* `_meta` as the same bag). Producers SHOULD use namespaced keys; consumers
|
|
404
|
+
* MUST ignore unknown keys. Use the typed accessors in `sessionState.ts`
|
|
405
|
+
* (e.g. `readSessionGitState`, `readSessionGitHubState`) for well-known
|
|
406
|
+
* slots.
|
|
211
407
|
*/
|
|
212
408
|
readonly _meta?: SessionMeta;
|
|
213
409
|
}
|
|
@@ -223,7 +419,7 @@ export interface IAgentCreateSessionResult {
|
|
|
223
419
|
/**
|
|
224
420
|
* `true` when the agent only allocated an in-memory placeholder for this
|
|
225
421
|
* session (no SDK session, no worktree, no on-disk state). Materialization
|
|
226
|
-
* happens lazily on the first {@link
|
|
422
|
+
* happens lazily on the first {@link IAgentChats.sendMessage}, at which point
|
|
227
423
|
* the agent fires {@link IAgent.onDidMaterializeSession}. The
|
|
228
424
|
* {@link IAgentService} uses this flag to defer the `sessionAdded` protocol
|
|
229
425
|
* notification so observers don't see the session in their list until it
|
|
@@ -242,11 +438,27 @@ export interface IAgentMaterializeSessionEvent {
|
|
|
242
438
|
readonly project: IAgentSessionProjectInfo | undefined;
|
|
243
439
|
}
|
|
244
440
|
export type AgentProvider = string;
|
|
441
|
+
/** Well-known agent provider id for the Claude agent-host backend. */
|
|
442
|
+
export declare const CLAUDE_AGENT_PROVIDER_ID: "claude";
|
|
443
|
+
/**
|
|
444
|
+
* Static capability facts an agent backend advertises about itself. Each flag
|
|
445
|
+
* is opt-in (absent means unsupported) so single-chat agents (e.g. Codex) can omit
|
|
446
|
+
* the bag entirely. Discovered over IPC alongside the rest of
|
|
447
|
+
* {@link IAgentDescriptor} and surfaced to the sessions UI so features are
|
|
448
|
+
* capability-gated instead of switched on the provider id.
|
|
449
|
+
*
|
|
450
|
+
* This is the IPC contract alias of the protocol-visible {@link AgentCapabilities}
|
|
451
|
+
* type (defined in the root-state protocol); both share a single canonical shape
|
|
452
|
+
* so a new flag added in one place is automatically reflected in the other.
|
|
453
|
+
*/
|
|
454
|
+
export type IAgentCapabilities = AgentCapabilities;
|
|
245
455
|
/** Metadata describing an agent backend, discovered over IPC. */
|
|
246
456
|
export interface IAgentDescriptor {
|
|
247
457
|
readonly provider: AgentProvider;
|
|
248
458
|
readonly displayName: string;
|
|
249
459
|
readonly description: string;
|
|
460
|
+
/** Static capability flags the agent advertises (see {@link IAgentCapabilities}). */
|
|
461
|
+
readonly capabilities?: IAgentCapabilities;
|
|
250
462
|
}
|
|
251
463
|
/**
|
|
252
464
|
* Parameters for the `authenticate` command.
|
|
@@ -316,7 +528,7 @@ export interface IAgentCreateSessionConfig {
|
|
|
316
528
|
/**
|
|
317
529
|
* Eagerly claim the active client role for the new session. When provided,
|
|
318
530
|
* the server initializes the session with this client as the active
|
|
319
|
-
* client, equivalent to dispatching a `session/
|
|
531
|
+
* client, equivalent to dispatching a `session/activeClientSet`
|
|
320
532
|
* action immediately after creation. The `clientId` MUST match the
|
|
321
533
|
* connection's own `clientId`.
|
|
322
534
|
*/
|
|
@@ -334,6 +546,182 @@ export interface IAgentCreateSessionConfig {
|
|
|
334
546
|
*/
|
|
335
547
|
readonly turnIdMapping?: ReadonlyMap<string, string>;
|
|
336
548
|
};
|
|
549
|
+
/**
|
|
550
|
+
* MCP-style opt-in progress token from the client's `createSession`. When
|
|
551
|
+
* set, the service reports any long-running session bring-up work — chiefly
|
|
552
|
+
* the lazy first-use SDK download — as `progress` notifications carrying
|
|
553
|
+
* this token, so the client can correlate them to this call.
|
|
554
|
+
*/
|
|
555
|
+
readonly progressToken?: string;
|
|
556
|
+
}
|
|
557
|
+
/** Options for creating an additional chat within a session. */
|
|
558
|
+
export interface IAgentCreateChatOptions {
|
|
559
|
+
/** Optional display title for the new chat. */
|
|
560
|
+
readonly title?: string;
|
|
561
|
+
/** Optional model override; defaults to the session's model. */
|
|
562
|
+
readonly model?: ModelSelection;
|
|
563
|
+
/**
|
|
564
|
+
* Fork an existing chat into this new chat. The new chat starts
|
|
565
|
+
* pre-populated with the source chat's turns up to and including
|
|
566
|
+
* {@link IAgentCreateChatForkSource.turnId}, and its backing chat
|
|
567
|
+
* is forked from the source so it can continue independently.
|
|
568
|
+
*/
|
|
569
|
+
readonly fork?: IAgentCreateChatForkSource;
|
|
570
|
+
}
|
|
571
|
+
/** Identifies a source chat and turn to fork a new chat from. */
|
|
572
|
+
export interface IAgentCreateChatForkSource {
|
|
573
|
+
/** URI of the existing chat to fork from. */
|
|
574
|
+
readonly source: URI;
|
|
575
|
+
/** Turn ID in the source chat; content up to and including this turn is copied. */
|
|
576
|
+
readonly turnId: string;
|
|
577
|
+
/**
|
|
578
|
+
* Maps old source turn IDs to fresh turn IDs for the forked chat. Populated
|
|
579
|
+
* by the agent service so the agent can remap per-turn data (e.g. SDK event
|
|
580
|
+
* ID mappings) in the forked chat's database.
|
|
581
|
+
*/
|
|
582
|
+
readonly turnIdMapping?: ReadonlyMap<string, string>;
|
|
583
|
+
}
|
|
584
|
+
/** Result of {@link IAgentChats.createChat}: the opaque blob to persist for restore. */
|
|
585
|
+
export interface IAgentCreateChatResult {
|
|
586
|
+
/**
|
|
587
|
+
* Opaque, agent-owned token the orchestrator persists verbatim in the chat
|
|
588
|
+
* catalog and hands back to {@link IAgent.materializeChat} on
|
|
589
|
+
* restore. The orchestrator never parses it. `undefined` means nothing to
|
|
590
|
+
* persist (e.g. the agent keeps no resumable backing).
|
|
591
|
+
*/
|
|
592
|
+
readonly providerData?: string;
|
|
593
|
+
/**
|
|
594
|
+
* The SDK-level session URI that backs this peer chat, when the agent mints
|
|
595
|
+
* one in the same session store its own {@link IAgent.listSessions} enumerates
|
|
596
|
+
* (e.g. Claude). First-class and non-opaque — unlike {@link providerData} the
|
|
597
|
+
* orchestrator reads it to correlate and suppress the backing session so it
|
|
598
|
+
* never surfaces as a top-level session. `undefined` when the agent keeps no
|
|
599
|
+
* separately-enumerable backing session.
|
|
600
|
+
*/
|
|
601
|
+
readonly backingSession?: URI;
|
|
602
|
+
}
|
|
603
|
+
/** Payload of {@link IAgent.onDidChangeChatData}. */
|
|
604
|
+
export interface IAgentChatDataChange {
|
|
605
|
+
/** The peer chat whose backing chat's blob changed. */
|
|
606
|
+
readonly chat: URI;
|
|
607
|
+
/** The new opaque blob to persist (replaces any previously stored value). */
|
|
608
|
+
readonly providerData: string;
|
|
609
|
+
}
|
|
610
|
+
/** A legacy peer chat enumerated by {@link IAgent.listLegacyChats} for one-time migration. */
|
|
611
|
+
export interface IAgentLegacyChat {
|
|
612
|
+
/** The peer chat's channel URI (see {@link buildChatUri}). */
|
|
613
|
+
readonly uri: URI;
|
|
614
|
+
/** The opaque, agent-owned backing blob, encoded as {@link materializeChat} expects. */
|
|
615
|
+
readonly providerData?: string;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Identifies the parent that spawned a chat. The orchestrator records
|
|
619
|
+
* it as the spawned chat's {@link ChatOriginKind.Tool} origin so clients can
|
|
620
|
+
* render the parent/child relationship (e.g. a sub-agent "team" member spawned
|
|
621
|
+
* by a tool call in the parent chat).
|
|
622
|
+
*/
|
|
623
|
+
export interface IAgentSpawnedChatParent {
|
|
624
|
+
/** The parent chat (chat) URI whose tool call performed the spawn. */
|
|
625
|
+
readonly chat: URI;
|
|
626
|
+
/** The id of the tool call in the parent that spawned this chat. */
|
|
627
|
+
readonly toolCallId: string;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Payload of {@link IAgent.onDidSpawnChat}: a new chat the
|
|
631
|
+
* agent spawned itself (e.g. a sub-agent delegated by a tool call), as opposed
|
|
632
|
+
* to a user-driven chat created via
|
|
633
|
+
* {@link IAgentChats.createChat}.
|
|
634
|
+
*/
|
|
635
|
+
export interface IAgentSpawnChatEvent {
|
|
636
|
+
/** The session URI the spawned chat belongs to. */
|
|
637
|
+
readonly session: URI;
|
|
638
|
+
/** The spawned chat's channel URI (the new chat). */
|
|
639
|
+
readonly chat: URI;
|
|
640
|
+
/**
|
|
641
|
+
* The parent that spawned it, when the spawn was delegated by a tool call.
|
|
642
|
+
* Recorded as the chat's tool origin in the catalog. Absent for a
|
|
643
|
+
* top-level, agent-initiated chat with no spawning tool call.
|
|
644
|
+
*/
|
|
645
|
+
readonly parent?: IAgentSpawnedChatParent;
|
|
646
|
+
/** Optional display title for the spawned chat. */
|
|
647
|
+
readonly title?: string;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Builds the tab title for a subagent peer chat. Prefers the concise
|
|
651
|
+
* per-task description (so two subagents of the same type still get
|
|
652
|
+
* distinct, meaningful names), truncating it so an over-long value never
|
|
653
|
+
* blows out the tab strip or the Subagents dropdown; falls back to the
|
|
654
|
+
* agent type's display name, then a generic label. Shared by the live
|
|
655
|
+
* spawn path and the restore path so both name subagent tabs identically.
|
|
656
|
+
*/
|
|
657
|
+
export declare function subagentChatTitle(taskDescription: string | undefined, agentDisplayName: string | undefined): string;
|
|
658
|
+
/**
|
|
659
|
+
* Maps agent `subagent_*` signals to the unified chat catalog's
|
|
660
|
+
* spawn/end events. Shared by the agents' spawn bridges and the orchestrator so
|
|
661
|
+
* subagent membership has one derivation.
|
|
662
|
+
*/
|
|
663
|
+
export declare namespace SubagentChatSignal {
|
|
664
|
+
/**
|
|
665
|
+
* Derives the {@link IAgentSpawnChatEvent} for a `subagent_started` signal,
|
|
666
|
+
* addressing the subagent by the stable {@link buildSubagentChatUri} and
|
|
667
|
+
* recording the spawning tool call as its parent edge. Returns `undefined`
|
|
668
|
+
* for any other signal (or an unmappable chat URI).
|
|
669
|
+
*/
|
|
670
|
+
function toSpawnEvent(signal: AgentSignal): IAgentSpawnChatEvent | undefined;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* The chat-addressed operation surface an agent exposes for the chats
|
|
674
|
+
* within a session.
|
|
675
|
+
*
|
|
676
|
+
* Every operation method addresses a chat by a concrete chat channel URI:
|
|
677
|
+
* the default chat channel for a session's DEFAULT chat, or an additional
|
|
678
|
+
* chat's own channel URI. The orchestrator ({@link IAgentService}) owns the
|
|
679
|
+
* feature-level `(session, chat)` to chat-channel mapping and only ever calls
|
|
680
|
+
* these operations with a concrete chat URI. This replaces the legacy
|
|
681
|
+
* `(session, chat?)` parameter pairs and the per-agent default-chat handling on
|
|
682
|
+
* {@link IAgent}.
|
|
683
|
+
*
|
|
684
|
+
* Optional on {@link IAgent}: agents implement this incrementally (waves
|
|
685
|
+
* C2/C3/C4). Until an agent exposes it, {@link IAgentService} falls back to the
|
|
686
|
+
* agent's legacy `(session, chat?)` methods via a thin adapter.
|
|
687
|
+
*/
|
|
688
|
+
export interface IAgentChats {
|
|
689
|
+
/**
|
|
690
|
+
* Create a fresh additional chat within the session the `chat` URI belongs
|
|
691
|
+
* to, sharing the session's working directory, model, agent, and
|
|
692
|
+
* customizations. `chat` is the client-chosen channel URI the new chat is
|
|
693
|
+
* addressed by; its parent session is derived from it.
|
|
694
|
+
* Returns the opaque {@link IAgentCreateChatResult} blob to persist for
|
|
695
|
+
* restore (or `void` when the agent keeps no resumable backing).
|
|
696
|
+
*/
|
|
697
|
+
createChat(chat: URI, options?: IAgentCreateChatOptions): Promise<IAgentCreateChatResult | void>;
|
|
698
|
+
/**
|
|
699
|
+
* Fork a new chat from an existing one. The new `chat`
|
|
700
|
+
* inherits `source`'s backing up to and including
|
|
701
|
+
* {@link IAgentCreateChatForkSource.turnId} and then continues
|
|
702
|
+
* independently. The new chat's parent session is derived from its URI.
|
|
703
|
+
*/
|
|
704
|
+
fork(chat: URI, source: IAgentCreateChatForkSource, options?: IAgentCreateChatOptions): Promise<IAgentCreateChatResult | void>;
|
|
705
|
+
/**
|
|
706
|
+
* Dispose an additional chat created via
|
|
707
|
+
* {@link createChat}/{@link fork}, freeing its backing. A session's
|
|
708
|
+
* default chat cannot be disposed in isolation; it lives and dies
|
|
709
|
+
* with the session.
|
|
710
|
+
*/
|
|
711
|
+
disposeChat(chat: URI): Promise<void>;
|
|
712
|
+
/** Send a user message into `chat`. */
|
|
713
|
+
sendMessage(chat: URI, prompt: string, attachments?: readonly MessageAttachment[], turnId?: string, senderClientId?: string): Promise<void>;
|
|
714
|
+
/** Abort the in-flight turn for `chat`. */
|
|
715
|
+
abort(chat: URI): Promise<void>;
|
|
716
|
+
/** Change the model for `chat`. */
|
|
717
|
+
changeModel(chat: URI, model: ModelSelection): Promise<void>;
|
|
718
|
+
/**
|
|
719
|
+
* Change (or clear) the selected custom agent for `chat`. Passing
|
|
720
|
+
* `undefined` clears the selection (provider default behavior).
|
|
721
|
+
*/
|
|
722
|
+
changeAgent(chat: URI, agent: AgentSelection | undefined): Promise<void>;
|
|
723
|
+
/** Reconstruct the turns for `chat` (used on restore). */
|
|
724
|
+
getMessages(chat: URI): Promise<readonly Turn[]>;
|
|
337
725
|
}
|
|
338
726
|
export interface IAgentResolveSessionConfigParams {
|
|
339
727
|
readonly provider?: AgentProvider;
|
|
@@ -350,6 +738,8 @@ export interface IAgentModelInfo {
|
|
|
350
738
|
readonly id: string;
|
|
351
739
|
readonly name: string;
|
|
352
740
|
readonly maxContextWindow?: number;
|
|
741
|
+
readonly maxOutputTokens?: number;
|
|
742
|
+
readonly maxPromptTokens?: number;
|
|
353
743
|
readonly supportsVision: boolean;
|
|
354
744
|
readonly configSchema?: ConfigSchema;
|
|
355
745
|
readonly policyState?: PolicyState;
|
|
@@ -371,15 +761,15 @@ export type AgentSignal = IAgentActionSignal | IAgentToolPendingConfirmationSign
|
|
|
371
761
|
* dispatches the action through the state manager after routing via
|
|
372
762
|
* {@link IAgentActionSignal.parentToolCallId} (if set).
|
|
373
763
|
*
|
|
374
|
-
* Agents are responsible for populating
|
|
764
|
+
* Agents are responsible for populating the target channel and any `turnId` /
|
|
375
765
|
* `partId` fields on the action.
|
|
376
766
|
*/
|
|
377
767
|
export interface IAgentActionSignal {
|
|
378
768
|
readonly kind: "action";
|
|
379
|
-
/**
|
|
380
|
-
readonly
|
|
769
|
+
/** Target session or chat channel URI. For inner subagent events this is the parent session — see {@link parentToolCallId}. */
|
|
770
|
+
readonly resource: URI;
|
|
381
771
|
/** Protocol action to dispatch. */
|
|
382
|
-
readonly action: SessionAction;
|
|
772
|
+
readonly action: SessionAction | ChatAction;
|
|
383
773
|
/** If set, route the action to the subagent session belonging to this tool call. */
|
|
384
774
|
readonly parentToolCallId?: string;
|
|
385
775
|
}
|
|
@@ -388,7 +778,7 @@ export interface IAgentActionSignal {
|
|
|
388
778
|
* whether it should run (or, mid-execution, re-confirm). The host applies
|
|
389
779
|
* auto-approval logic over {@link permissionKind} / {@link permissionPath}
|
|
390
780
|
* (see `SessionPermissionManager.getAutoApproval`) and then dispatches the
|
|
391
|
-
* appropriate `
|
|
781
|
+
* appropriate `ChatToolCallReady` action — with confirmation options
|
|
392
782
|
* baked in when the user must approve, or with `confirmed: NotNeeded` when
|
|
393
783
|
* the host auto-approved.
|
|
394
784
|
*
|
|
@@ -399,19 +789,26 @@ export interface IAgentActionSignal {
|
|
|
399
789
|
*/
|
|
400
790
|
export interface IAgentToolPendingConfirmationSignal {
|
|
401
791
|
readonly kind: "pending_confirmation";
|
|
402
|
-
|
|
403
|
-
|
|
792
|
+
/** Target chat channel URI containing the tool call. */
|
|
793
|
+
readonly chat: URI;
|
|
794
|
+
/** Protocol-shaped pending-confirmation state, dispatched verbatim into `ChatToolCallReady`. */
|
|
404
795
|
readonly state: ToolCallPendingConfirmationState;
|
|
405
796
|
/** Host-only auto-approval kind (not part of the dispatched action). */
|
|
406
797
|
readonly permissionKind?: "shell" | "write" | "mcp" | "read" | "url" | "custom-tool" | "hook" | "memory" | "extension-management" | "extension-permission-access";
|
|
407
798
|
/** Host-only auto-approval path target (not part of the dispatched action). */
|
|
408
799
|
readonly permissionPath?: string;
|
|
800
|
+
/**
|
|
801
|
+
* Host-only flag (not part of the dispatched action): the model requested
|
|
802
|
+
* this shell command run OUTSIDE the sandbox (and the host opted in via
|
|
803
|
+
* `sandbox.allowBypass`).
|
|
804
|
+
*/
|
|
805
|
+
readonly requestSandboxBypass?: boolean;
|
|
409
806
|
/**
|
|
410
807
|
* If set, the tool call belongs to the subagent rooted at this
|
|
411
808
|
* parent tool call. Used by the host to route the resulting
|
|
412
|
-
* `
|
|
809
|
+
* `ChatToolCallReady` to the subagent session — otherwise the
|
|
413
810
|
* action would land on the parent session, where there is no
|
|
414
|
-
* matching `
|
|
811
|
+
* matching `ChatToolCallStart`.
|
|
415
812
|
*/
|
|
416
813
|
readonly parentToolCallId?: string;
|
|
417
814
|
}
|
|
@@ -424,11 +821,36 @@ export interface IAgentToolPendingConfirmationSignal {
|
|
|
424
821
|
*/
|
|
425
822
|
export interface IAgentSubagentStartedSignal {
|
|
426
823
|
readonly kind: "subagent_started";
|
|
427
|
-
readonly
|
|
824
|
+
readonly chat: URI;
|
|
428
825
|
readonly toolCallId: string;
|
|
429
826
|
readonly agentName: string;
|
|
430
827
|
readonly agentDisplayName: string;
|
|
431
828
|
readonly agentDescription?: string;
|
|
829
|
+
/**
|
|
830
|
+
* The spawning Task tool's short (typically 3-5 word) `description`
|
|
831
|
+
* input, e.g. "Review package.json structure". Distinct from
|
|
832
|
+
* {@link agentDescription} (the agent *type*'s long role blurb) and
|
|
833
|
+
* {@link agentDisplayName} (the agent type's name). Preferred as the
|
|
834
|
+
* peer chat's tab title because it is concise and per-task, so two
|
|
835
|
+
* subagents of the same type still get distinct, meaningful names.
|
|
836
|
+
* Absent when the harness does not surface a task description.
|
|
837
|
+
*/
|
|
838
|
+
readonly taskDescription?: string;
|
|
839
|
+
/**
|
|
840
|
+
* If set, the spawning tool call ({@link toolCallId}) itself lives
|
|
841
|
+
* inside another subagent's chat — this is the tool call **one level up**
|
|
842
|
+
* from the spawning tool (its parent), i.e. the tool that spawned the
|
|
843
|
+
* immediate parent chat. The host uses it to route the
|
|
844
|
+
* subagent-discovery side effect (the `ChatToolCallContentChanged`
|
|
845
|
+
* block that lets clients find the child chat) to that immediate parent
|
|
846
|
+
* chat rather than the top-level {@link chat}. Because subagent chats
|
|
847
|
+
* are flat (all keyed off the root session + the spawning tool id),
|
|
848
|
+
* this single one-hop reference resolves the correct parent chat at
|
|
849
|
+
* ANY nesting depth — no per-level chain is needed. Absent for a
|
|
850
|
+
* top-level subagent, whose spawning tool call lives directly in
|
|
851
|
+
* {@link chat}.
|
|
852
|
+
*/
|
|
853
|
+
readonly parentToolCallId?: string;
|
|
432
854
|
}
|
|
433
855
|
/**
|
|
434
856
|
* A subagent has finished — either successfully or with an error. The host
|
|
@@ -439,13 +861,13 @@ export interface IAgentSubagentStartedSignal {
|
|
|
439
861
|
*/
|
|
440
862
|
export interface IAgentSubagentCompletedSignal {
|
|
441
863
|
readonly kind: "subagent_completed";
|
|
442
|
-
readonly
|
|
864
|
+
readonly chat: URI;
|
|
443
865
|
readonly toolCallId: string;
|
|
444
866
|
}
|
|
445
867
|
/** A steering message was consumed (sent to the model). */
|
|
446
868
|
export interface IAgentSteeringConsumedSignal {
|
|
447
869
|
readonly kind: "steering_consumed";
|
|
448
|
-
readonly
|
|
870
|
+
readonly chat: URI;
|
|
449
871
|
readonly id: string;
|
|
450
872
|
}
|
|
451
873
|
export declare namespace AgentSession {
|
|
@@ -465,6 +887,58 @@ export declare namespace AgentSession {
|
|
|
465
887
|
*/
|
|
466
888
|
function provider(session: URI | string): AgentProvider | undefined;
|
|
467
889
|
}
|
|
890
|
+
/**
|
|
891
|
+
* A notification originating from an MCP server, routed back to the AHP
|
|
892
|
+
* client through the `mcp://` side channel. `channel` is the channel
|
|
893
|
+
* URI advertised on the owning
|
|
894
|
+
* {@link McpServerCustomization.channel | McpServerCustomization}; the
|
|
895
|
+
* client uses it to fan the notification out to the appropriate App.
|
|
896
|
+
* `method` and `params` follow the underlying MCP notification spec
|
|
897
|
+
* (e.g. `notifications/tools/list_changed`).
|
|
898
|
+
*/
|
|
899
|
+
export interface IMcpNotification {
|
|
900
|
+
readonly channel: string;
|
|
901
|
+
readonly method: string;
|
|
902
|
+
readonly params?: Record<string, unknown>;
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* A subagent child session discovered in a parent session's event log,
|
|
906
|
+
* returned by {@link IAgent.getSubagentSessions} so a parent restore can
|
|
907
|
+
* register the child's state up-front.
|
|
908
|
+
*/
|
|
909
|
+
export interface IRestoredSubagentSession {
|
|
910
|
+
/** Child subagent session URI (subscribable by clients). */
|
|
911
|
+
readonly resource: URI;
|
|
912
|
+
/** Parent tool call id that spawned the subagent. */
|
|
913
|
+
readonly toolCallId: string;
|
|
914
|
+
/** Display title for the subagent session. */
|
|
915
|
+
readonly title: string;
|
|
916
|
+
/** Reconstructed turns for the subagent's transcript. */
|
|
917
|
+
readonly turns: readonly Turn[];
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* A per-session handle for one active client's contributions (tools and
|
|
921
|
+
* plugin customizations) to an agent session, obtained via
|
|
922
|
+
* {@link IAgent.getOrCreateActiveClient}.
|
|
923
|
+
*
|
|
924
|
+
* `tools` and `customizations` are mutable accessor properties: assigning a
|
|
925
|
+
* new array replaces this client's contribution wholesale and triggers the
|
|
926
|
+
* agent's internal reaction (refreshing the merged tool set exposed to the
|
|
927
|
+
* model, or kicking off an asynchronous customization sync). The arrays are
|
|
928
|
+
* `readonly` so callers cannot mutate them in place and silently bypass the
|
|
929
|
+
* setter. The agent merges the contributions of all active clients on a
|
|
930
|
+
* session, deduplicating as needed.
|
|
931
|
+
*/
|
|
932
|
+
export interface IActiveClient {
|
|
933
|
+
/** Client identifier (matches `clientId` from `initialize`). */
|
|
934
|
+
readonly clientId: string;
|
|
935
|
+
/** Human-readable client name (e.g. `"VS Code"`), if provided. */
|
|
936
|
+
readonly displayName: string | undefined;
|
|
937
|
+
/** This client's tools. Assigning replaces the set (full replacement). */
|
|
938
|
+
tools: readonly ToolDefinition[];
|
|
939
|
+
/** This client's plugin customizations. Assigning replaces the set and starts an internal sync. */
|
|
940
|
+
customizations: readonly ClientPluginCustomization[];
|
|
941
|
+
}
|
|
468
942
|
/**
|
|
469
943
|
* Implemented by each agent backend (e.g. Copilot SDK).
|
|
470
944
|
* The {@link IAgentService} dispatches to the appropriate agent based on
|
|
@@ -484,23 +958,74 @@ export interface IAgent {
|
|
|
484
958
|
* summary.
|
|
485
959
|
*/
|
|
486
960
|
readonly onDidMaterializeSession?: Event<IAgentMaterializeSessionEvent>;
|
|
961
|
+
/**
|
|
962
|
+
* Provides the agent host's server-tool host so the provider can advertise
|
|
963
|
+
* and execute the agent host's server tools (feedback "comments" today, more
|
|
964
|
+
* in the future) against a session's state. Optional: providers that do not
|
|
965
|
+
* support server-side tools simply omit it. Called once during registration
|
|
966
|
+
* with the {@link IAgentService}.
|
|
967
|
+
*/
|
|
968
|
+
setServerToolHost?(host: IAgentServerToolHost): void;
|
|
969
|
+
/**
|
|
970
|
+
* Chat-addressed surface for the chats within a session (send/abort/
|
|
971
|
+
* change model/agent, create/fork/dispose chats, read history).
|
|
972
|
+
*/
|
|
973
|
+
readonly chats: IAgentChats;
|
|
487
974
|
/** Create a new session. Returns server-owned session metadata. */
|
|
488
975
|
createSession(config?: IAgentCreateSessionConfig): Promise<IAgentCreateSessionResult>;
|
|
489
976
|
/** Resolve the dynamic configuration schema for creating a session. */
|
|
490
977
|
resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult>;
|
|
491
978
|
/** Return dynamic completions for a session configuration property. */
|
|
492
979
|
sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<SessionConfigCompletionsResult>;
|
|
493
|
-
/**
|
|
494
|
-
|
|
980
|
+
/**
|
|
981
|
+
* Re-attach an agent's in-memory backing for a peer chat on session
|
|
982
|
+
* restore, decoding the opaque `providerData` produced earlier by
|
|
983
|
+
* {@link IAgentChats.createChat} (or the latest
|
|
984
|
+
* {@link onDidChangeChatData}). After this resolves the agent MUST
|
|
985
|
+
* be able to serve {@link getSessionMessages}/
|
|
986
|
+
* {@link IAgentChats.sendMessage} for `chat`.
|
|
987
|
+
* Best-effort: implementations SHOULD NOT throw on a corrupt/unknown blob —
|
|
988
|
+
* log and no-op so the orchestrator restores the chat with history but no
|
|
989
|
+
* live backing. `providerData` is `undefined` only for legacy entries with
|
|
990
|
+
* no stored blob, in which case the agent MAY consult its own legacy
|
|
991
|
+
* persistence once to recover the backing.
|
|
992
|
+
*/
|
|
993
|
+
materializeChat?(chat: URI, providerData: string | undefined): Promise<void>;
|
|
994
|
+
/**
|
|
995
|
+
* Migration-only enumeration of a session's peer chats persisted in the
|
|
996
|
+
* agent's OWN legacy format (predating the orchestrator-owned catalog). The
|
|
997
|
+
* orchestrator calls this once, when its own catalog is absent, to drain the
|
|
998
|
+
* legacy chats into {@link PEER_CHATS_METADATA_KEY}; subsequent restores read
|
|
999
|
+
* the orchestrator catalog and never consult this again. Each entry's
|
|
1000
|
+
* `providerData` uses the same encoding {@link IAgentChats.createChat}
|
|
1001
|
+
* produces and {@link materializeChat} decodes. Agents with no legacy
|
|
1002
|
+
* format (e.g. Codex) omit this method.
|
|
1003
|
+
*/
|
|
1004
|
+
listLegacyChats?(session: URI): Promise<readonly IAgentLegacyChat[]>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Fires when a peer chat's opaque `providerData` changes after creation
|
|
1007
|
+
* (e.g. per-chat model switch, fork remap). The orchestrator re-persists the
|
|
1008
|
+
* blob. Agents whose blob is immutable never fire this.
|
|
1009
|
+
*/
|
|
1010
|
+
readonly onDidChangeChatData?: Event<IAgentChatDataChange>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Fires when the agent spawns a new chat within a session (e.g. a
|
|
1013
|
+
* sub-agent delegated by a tool call). The orchestrator records it in the
|
|
1014
|
+
* chat catalog, preserving the {@link IAgentSpawnChatEvent.parent}
|
|
1015
|
+
* spawn edge as the chat's {@link ChatOriginKind.Tool} origin.
|
|
1016
|
+
*/
|
|
1017
|
+
readonly onDidSpawnChat?: Event<IAgentSpawnChatEvent>;
|
|
495
1018
|
/**
|
|
496
1019
|
* Called when the session's pending (steering) message changes.
|
|
497
1020
|
* The agent harness decides how to react — e.g. inject steering
|
|
498
|
-
* mid-turn via `mode: 'immediate'`.
|
|
1021
|
+
* mid-turn via `mode: 'immediate'`. When `chat` is provided (an additional
|
|
1022
|
+
* peer chat's URI), the steering targets that chat's chat rather
|
|
1023
|
+
* than the session's default chat.
|
|
499
1024
|
*
|
|
500
1025
|
* Queued messages are consumed on the server side and are not
|
|
501
1026
|
* forwarded to the agent; `queuedMessages` will always be empty.
|
|
502
1027
|
*/
|
|
503
|
-
setPendingMessages?(session: URI, steeringMessage: PendingMessage | undefined, queuedMessages: readonly PendingMessage[]): void;
|
|
1028
|
+
setPendingMessages?(session: URI, steeringMessage: PendingMessage | undefined, queuedMessages: readonly PendingMessage[], chat?: URI): void;
|
|
504
1029
|
/**
|
|
505
1030
|
* Retrieve the reconstructed turns for a session, used when restoring
|
|
506
1031
|
* sessions from persistent storage. Each agent owns the conversion from
|
|
@@ -509,23 +1034,22 @@ export interface IAgent {
|
|
|
509
1034
|
* child session's turns).
|
|
510
1035
|
*/
|
|
511
1036
|
getSessionMessages(session: URI): Promise<readonly Turn[]>;
|
|
512
|
-
/** Dispose a session, freeing resources. */
|
|
513
|
-
disposeSession(session: URI): Promise<void>;
|
|
514
|
-
/** Abort the current turn, stopping any in-flight processing. */
|
|
515
|
-
abortSession(session: URI): Promise<void>;
|
|
516
|
-
/** Change the model for an existing session. */
|
|
517
|
-
changeModel(session: URI, model: ModelSelection): Promise<void>;
|
|
518
1037
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
*
|
|
1038
|
+
* Returns the subagent child sessions discoverable in a session's event
|
|
1039
|
+
* log so a parent restore can eagerly register them in a single pass.
|
|
1040
|
+
* Without this, every child is restored separately by re-fetching and
|
|
1041
|
+
* re-reconstructing the full parent event log (one pass per subagent).
|
|
1042
|
+
* Agents that serve this from the same reconstruction they already
|
|
1043
|
+
* produced for the parent turns avoid that redundant work entirely.
|
|
1044
|
+
* Optional; agents without subagents omit it.
|
|
523
1045
|
*/
|
|
524
|
-
|
|
1046
|
+
getSubagentSessions?(session: URI): Promise<readonly IRestoredSubagentSession[]>;
|
|
1047
|
+
/** Dispose a session, freeing resources. */
|
|
1048
|
+
disposeSession(session: URI): Promise<void>;
|
|
525
1049
|
/** Respond to a pending permission request from the SDK. */
|
|
526
1050
|
respondToPermissionRequest(requestId: string, approved: boolean): void;
|
|
527
1051
|
/** Respond to a pending user input request from the SDK's ask_user tool. */
|
|
528
|
-
respondToUserInputRequest(requestId: string, response:
|
|
1052
|
+
respondToUserInputRequest(requestId: string, response: ChatInputResponseKind, answers?: Record<string, ChatInputAnswer>): void;
|
|
529
1053
|
/** Return the descriptor for this agent. */
|
|
530
1054
|
getDescriptor(): IAgentDescriptor;
|
|
531
1055
|
/** Available models from this provider. */
|
|
@@ -542,6 +1066,14 @@ export interface IAgent {
|
|
|
542
1066
|
* can republish {@link AgentInfo} and session customization state.
|
|
543
1067
|
*/
|
|
544
1068
|
readonly onDidCustomizationsChange?: Event<void>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Fires when this agent needs the client to (re-)authenticate a
|
|
1071
|
+
* protected resource — for example after a runtime transport-mode flip
|
|
1072
|
+
* makes a previously-unneeded credential required. The host stamps the
|
|
1073
|
+
* root channel and forwards it verbatim as an `auth/required`
|
|
1074
|
+
* notification; clients respond via {@link authenticate}.
|
|
1075
|
+
*/
|
|
1076
|
+
readonly onDidRequireAuth?: Event<Omit<AuthRequiredParams, "channel">>;
|
|
545
1077
|
/**
|
|
546
1078
|
* Returns the host-owned customizations this agent currently exposes.
|
|
547
1079
|
*
|
|
@@ -561,11 +1093,21 @@ export interface IAgent {
|
|
|
561
1093
|
*/
|
|
562
1094
|
authenticate(resource: string, token: string): Promise<boolean>;
|
|
563
1095
|
/**
|
|
564
|
-
*
|
|
1096
|
+
* Optional hook for provider-owned session resources that are not advertised
|
|
1097
|
+
* as root agent protected resources, such as MCP server OAuth challenges.
|
|
1098
|
+
*/
|
|
1099
|
+
handleAuthenticationToken?(params: AuthenticateParams): Promise<boolean>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Truncate a chat's history. If `turnId` is provided, keeps turns up to
|
|
565
1102
|
* and including that turn. If omitted, all turns are removed.
|
|
1103
|
+
*
|
|
1104
|
+
* `chat` identifies which chat to truncate: the session's default chat
|
|
1105
|
+
* (addressed by the session's default chat URI) or a peer (non-default)
|
|
1106
|
+
* chat, which has its own backing.
|
|
1107
|
+
*
|
|
566
1108
|
* Optional — not all providers support truncation.
|
|
567
1109
|
*/
|
|
568
|
-
truncateSession?(session: URI, turnId
|
|
1110
|
+
truncateSession?(session: URI, turnId: string | undefined, chat: URI): Promise<void>;
|
|
569
1111
|
/**
|
|
570
1112
|
* Notifies the provider that a session's archived state has changed.
|
|
571
1113
|
* Providers may use this to clean up or restore per-session resources
|
|
@@ -574,35 +1116,41 @@ export interface IAgent {
|
|
|
574
1116
|
*/
|
|
575
1117
|
onArchivedChanged?(session: URI, isArchived: boolean): Promise<void>;
|
|
576
1118
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
1119
|
+
* Get (or lazily create) the per-session handle for an active client,
|
|
1120
|
+
* identified by `clientId`. Mutating the returned {@link IActiveClient}'s
|
|
1121
|
+
* `tools` / `customizations` updates only that client's contribution; the
|
|
1122
|
+
* agent merges the contributions of all active clients when exposing them
|
|
1123
|
+
* to the model. A session MAY have several active clients at once.
|
|
580
1124
|
*
|
|
581
|
-
* The
|
|
1125
|
+
* @param session The session URI this client contributes to.
|
|
1126
|
+
* @param client The client's `clientId` and optional human-readable name.
|
|
582
1127
|
*/
|
|
583
|
-
|
|
1128
|
+
getOrCreateActiveClient(session: URI, client: {
|
|
1129
|
+
readonly clientId: string;
|
|
1130
|
+
readonly displayName?: string;
|
|
1131
|
+
}): IActiveClient;
|
|
584
1132
|
/**
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
1133
|
+
* Remove an active client from a session, clearing its tool and
|
|
1134
|
+
* customization contributions. No-op when no active client matches
|
|
1135
|
+
* `clientId`.
|
|
588
1136
|
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
* @param session The session URI this tool set applies to.
|
|
593
|
-
* @param clientId The client that owns these tools.
|
|
594
|
-
* @param tools The tool definitions (full replacement).
|
|
1137
|
+
* @param session The session the client is leaving.
|
|
1138
|
+
* @param clientId The client to remove.
|
|
595
1139
|
*/
|
|
596
|
-
|
|
1140
|
+
removeActiveClient(session: URI, clientId: string): void;
|
|
597
1141
|
/**
|
|
598
1142
|
* Called when a client completes a client-provided tool call.
|
|
599
1143
|
* Resolves the tool handler's deferred promise so the SDK can continue.
|
|
600
1144
|
*
|
|
601
1145
|
* @param session The session the tool call belongs to.
|
|
1146
|
+
* @param chat The chat channel the tool call was issued on, when known.
|
|
1147
|
+
* Agents that track peer chats separately from the default chat (e.g.
|
|
1148
|
+
* copilot) use this to route the completion to the right chat;
|
|
1149
|
+
* agents without peer chats ignore it and resolve by `session`.
|
|
602
1150
|
* @param toolCallId The id of the tool call being completed.
|
|
603
1151
|
* @param result The result of the tool call.
|
|
604
1152
|
*/
|
|
605
|
-
onClientToolCallComplete(session: URI, toolCallId: string, result: ToolCallResult): void;
|
|
1153
|
+
onClientToolCallComplete(session: URI, chat: URI, toolCallId: string, result: ToolCallResult): void;
|
|
606
1154
|
/**
|
|
607
1155
|
* Notifies the agent that a customization has been toggled on or off.
|
|
608
1156
|
* The agent MAY restart its client before the next message is sent.
|
|
@@ -612,6 +1160,32 @@ export interface IAgent {
|
|
|
612
1160
|
setCustomizationEnabled(id: string, enabled: boolean): void;
|
|
613
1161
|
/** Gracefully shut down all sessions. */
|
|
614
1162
|
shutdown(): Promise<void>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Routes a request received on an `mcp://` side channel to the agent's
|
|
1165
|
+
* MCP server implementation. The channel carries raw MCP JSON-RPC
|
|
1166
|
+
* methods (e.g. `tools/list`, `tools/call`, `resources/read`) tagged
|
|
1167
|
+
* with the routing envelope; the protocol server decodes the envelope
|
|
1168
|
+
* and forwards `(session, serverName, method, params)` here.
|
|
1169
|
+
*
|
|
1170
|
+
* The agent MUST reject unknown methods with an error whose message
|
|
1171
|
+
* begins with `Method not found` so the protocol server can map it to
|
|
1172
|
+
* a JSON-RPC `-32601`.
|
|
1173
|
+
*
|
|
1174
|
+
* Optional — agents that don't surface any MCP servers (or don't
|
|
1175
|
+
* advertise `mcpApp` capabilities) can omit this.
|
|
1176
|
+
*/
|
|
1177
|
+
handleMcpRequest?(session: URI, serverName: string, method: string, params: Record<string, unknown> | undefined): Promise<unknown>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Fires when an MCP server owned by this agent emits a notification
|
|
1180
|
+
* that should be forwarded to AHP clients over the `mcp://` side
|
|
1181
|
+
* channel. Today this is exclusively
|
|
1182
|
+
* `notifications/tools/list_changed` and
|
|
1183
|
+
* `notifications/resources/list_changed`. The protocol server
|
|
1184
|
+
* fans the notification out to every connected client.
|
|
1185
|
+
*
|
|
1186
|
+
* Optional — agents that don't expose MCP servers can omit this.
|
|
1187
|
+
*/
|
|
1188
|
+
readonly onMcpNotification?: Event<IMcpNotification>;
|
|
615
1189
|
/** Dispose this provider and all its resources. */
|
|
616
1190
|
dispose(): void;
|
|
617
1191
|
}
|
|
@@ -633,6 +1207,12 @@ export interface IAgentConnection {
|
|
|
633
1207
|
*/
|
|
634
1208
|
getSubscription<T extends StateComponents>(kind: T, resource: URI, owner: string): IReference<IAgentSubscription<ComponentToState[T]>>;
|
|
635
1209
|
getSubscriptionUnmanaged<T extends StateComponents>(kind: T, resource: URI): IAgentSubscription<ComponentToState[T]> | undefined;
|
|
1210
|
+
/**
|
|
1211
|
+
* Returns the in-flight `createSession` Promise for `resource`, or `undefined` if no create is pending. Callers
|
|
1212
|
+
* that need to gate work on a racing eager `createSession` (e.g. before deciding whether to fall through to a
|
|
1213
|
+
* duplicate create) should await this first.
|
|
1214
|
+
*/
|
|
1215
|
+
getInflightSessionCreate(resource: URI): Promise<unknown> | undefined;
|
|
636
1216
|
/**
|
|
637
1217
|
* Read-only descriptors of every active resource subscription on this
|
|
638
1218
|
* connection, for inspection/debug surfaces. Excludes the always-live
|
|
@@ -647,9 +1227,28 @@ export interface IAgentConnection {
|
|
|
647
1227
|
* than {@link URI} objects so authority-less scheme URIs like
|
|
648
1228
|
* `ahp-root://` survive the wire format without normalization.
|
|
649
1229
|
*/
|
|
650
|
-
dispatch(channel: string, action: SessionAction | TerminalAction | IRootConfigChangedAction): void;
|
|
1230
|
+
dispatch(channel: string, action: SessionAction | ChatAction | TerminalAction | ClientAnnotationsAction | IRootConfigChangedAction): void;
|
|
651
1231
|
readonly onDidNotification: Event<INotification>;
|
|
652
1232
|
readonly onDidAction: Event<ActionEnvelope>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Fires when the host forwards an MCP server notification (e.g.
|
|
1235
|
+
* `notifications/tools/list_changed`) over the `mcp://` side channel.
|
|
1236
|
+
* The `channel` field on the notification routes the payload to the
|
|
1237
|
+
* matching {@link McpServerCustomization}.
|
|
1238
|
+
*/
|
|
1239
|
+
readonly onMcpNotification: Event<IMcpNotification>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Send a request on an `mcp://` AHP side channel. `channel` is the
|
|
1242
|
+
* `mcp://` URI advertised by the matching {@link McpServerCustomization}
|
|
1243
|
+
* (only available while the server is `ready`). `method` is the raw MCP
|
|
1244
|
+
* JSON-RPC method (e.g. `tools/call`, `resources/read`,
|
|
1245
|
+
* `sampling/createMessage`); `params` are the JSON-RPC params (the
|
|
1246
|
+
* connection adds the routing envelope's `channel` field automatically).
|
|
1247
|
+
*
|
|
1248
|
+
* Rejects with an `Error` whose message begins with `Method not found`
|
|
1249
|
+
* when the channel is unknown or the host doesn't recognise the method.
|
|
1250
|
+
*/
|
|
1251
|
+
handleMcpRequest(channel: string, method: string, params: Record<string, unknown> | undefined): Promise<unknown>;
|
|
653
1252
|
authenticate(params: AuthenticateParams): Promise<AuthenticateResult>;
|
|
654
1253
|
listSessions(): Promise<IAgentSessionMetadata[]>;
|
|
655
1254
|
createSession(config?: IAgentCreateSessionConfig): Promise<URI>;
|
|
@@ -663,6 +1262,14 @@ export interface IAgentConnection {
|
|
|
663
1262
|
*/
|
|
664
1263
|
getCompletionTriggerCharacters(): Promise<readonly string[]>;
|
|
665
1264
|
disposeSession(session: URI): Promise<void>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Create an additional peer chat inside an existing session. `chat` is a
|
|
1267
|
+
* client-chosen chat URI (see {@link buildChatUri}). The host adds the
|
|
1268
|
+
* chat to the session's catalog and publishes `session/chatAdded`.
|
|
1269
|
+
*/
|
|
1270
|
+
createChat(session: URI, chat: URI, options?: IAgentCreateChatOptions): Promise<void>;
|
|
1271
|
+
/** Dispose an additional chat created via {@link createChat}. */
|
|
1272
|
+
disposeChat(chat: URI): Promise<void>;
|
|
666
1273
|
createTerminal(params: CreateTerminalParams): Promise<void>;
|
|
667
1274
|
disposeTerminal(terminal: URI): Promise<void>;
|
|
668
1275
|
invokeChangesetOperation(params: InvokeChangesetOperationParams): Promise<InvokeChangesetOperationResult>;
|