@codingame/monaco-vscode-chat-service-override 36.2.7 → 37.0.0

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.
Files changed (725) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +92 -10
  3. package/package.json +5 -5
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +10 -3
  5. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +54 -17
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.d.ts +14 -0
  7. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +46 -0
  8. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +7 -2
  9. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +34 -2
  10. package/vscode/src/vs/platform/agentHost/browser/{remoteAgentHostProtocolClient.d.ts → agentHostProtocolClient.d.ts} +240 -60
  11. package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1911 -0
  12. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +30 -33
  13. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +381 -315
  14. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +3 -1
  15. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +2 -0
  16. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.d.ts +9 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.js +20 -0
  18. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.d.ts +144 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.js +20 -0
  20. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +14 -6
  21. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +14 -10
  22. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +1 -1
  23. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.d.ts +47 -0
  24. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.js +75 -0
  25. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.d.ts +68 -0
  26. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.js +161 -0
  27. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +288 -45
  28. package/vscode/src/vs/platform/agentHost/common/agentMerge.d.ts +261 -0
  29. package/vscode/src/vs/platform/agentHost/common/agentMerge.js +67 -0
  30. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.d.ts +53 -0
  31. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.js +45 -0
  32. package/vscode/src/vs/platform/agentHost/common/changesetUri.d.ts +130 -0
  33. package/vscode/src/vs/platform/agentHost/common/changesetUri.js +27 -0
  34. package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +8 -2
  35. package/vscode/src/vs/platform/agentHost/common/customAgents.js +7 -0
  36. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.d.ts +39 -0
  37. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.js +25 -0
  38. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +110 -0
  39. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +38 -0
  40. package/vscode/src/vs/platform/agentHost/common/meta/agentHostArtifactRemovalMeta.d.ts +4 -0
  41. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.d.ts +7 -0
  42. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.js +14 -0
  43. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +3 -3
  44. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +16 -24
  45. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.d.ts +8 -0
  46. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.js +8 -0
  47. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.d.ts +75 -0
  48. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.js +84 -0
  49. package/vscode/src/vs/platform/agentHost/common/shellInitScript.d.ts +24 -0
  50. package/vscode/src/vs/platform/agentHost/common/shellInitScript.js +63 -0
  51. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +71 -20
  52. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +187 -26
  53. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +30 -0
  54. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +87 -0
  55. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +2 -2
  56. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.d.ts +4 -0
  57. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.js +37 -0
  58. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.d.ts +4 -0
  59. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.js +45 -0
  60. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +5 -4
  61. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +100 -35
  62. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +193 -49
  63. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +161 -40
  64. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +1 -1
  65. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +5 -1
  66. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
  67. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.d.ts +1 -0
  68. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.js +7 -0
  69. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  70. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +114 -3
  71. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +28 -5
  72. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -2
  73. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.d.ts +34 -0
  74. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.js +28 -0
  75. package/vscode/src/vs/platform/agentHost/common/worktreePaths.d.ts +24 -0
  76. package/vscode/src/vs/platform/agentHost/common/worktreePaths.js +15 -0
  77. package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.d.ts +1 -1
  78. package/vscode/src/vs/platform/chat/common/aiAgentEnv.d.ts +18 -0
  79. package/vscode/src/vs/platform/chat/common/aiAgentEnv.js +6 -0
  80. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +5 -1
  81. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +77 -5
  82. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +1 -1
  83. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +9 -5
  84. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +1 -5
  85. package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -4
  86. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +19 -7
  87. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +49 -37
  88. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +2 -1
  89. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +12 -0
  90. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +1 -2
  91. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +1 -0
  92. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.d.ts +5 -0
  93. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.js +7 -0
  94. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.d.ts +5 -0
  95. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.js +8 -0
  96. package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.d.ts +1 -2
  97. package/vscode/src/vs/workbench/browser/chatChangesPill.d.ts +29 -0
  98. package/vscode/src/vs/workbench/browser/chatChangesPill.js +84 -0
  99. package/vscode/src/vs/workbench/common/chatPullRequest.d.ts +19 -0
  100. package/vscode/src/vs/workbench/common/chatPullRequest.js +53 -0
  101. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +342 -155
  102. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +25 -2
  104. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +150 -67
  105. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +5 -3
  106. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +5 -1
  107. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +39 -9
  108. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +1 -1
  109. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
  110. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
  111. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +4 -2
  112. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +54 -17
  113. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
  114. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +1 -1
  115. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
  116. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +1 -1
  117. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
  118. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +6 -0
  119. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +5 -1
  120. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +1 -1
  121. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
  123. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +252 -0
  124. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
  125. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
  126. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +146 -0
  127. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +889 -0
  128. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +2 -7
  130. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +3 -54
  131. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +32 -3
  132. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +214 -161
  133. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -9
  134. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +2 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +256 -72
  136. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +2 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +11 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +19 -15
  140. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +30 -14
  141. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +19 -10
  142. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +9 -9
  143. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  144. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.d.ts +6 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +237 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -6
  147. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  148. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
  149. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.d.ts +6 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +68 -61
  151. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +17 -21
  152. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +17 -21
  153. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  154. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +5 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +68 -14
  156. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  157. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -19
  158. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +7 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +222 -72
  160. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -17
  161. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +530 -305
  162. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.d.ts +25 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +63 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.d.ts +30 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +37 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.d.ts +6 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +95 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +10 -6
  169. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  170. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +18 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +86 -47
  173. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +61 -47
  174. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +43 -24
  175. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +326 -76
  176. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +112 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +33 -7
  178. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.d.ts +20 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.js +26 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +28 -10
  181. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +110 -126
  182. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +131 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +638 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +41 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +202 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +24 -1
  187. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +26 -5
  188. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +10 -7
  189. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.d.ts +20 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.js +55 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +62 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +40 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +59 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +624 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.d.ts +90 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +207 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.d.ts +31 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.js +140 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +4 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +5 -1
  201. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +5 -4
  202. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +74 -5
  203. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +511 -171
  204. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +32 -0
  205. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +48 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +55 -6
  207. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +210 -20
  208. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +43 -24
  209. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +46 -10
  210. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +216 -110
  211. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +9 -4
  212. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +26 -17
  213. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  215. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  216. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  217. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -26
  218. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +5 -2
  219. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +6 -6
  220. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  221. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  222. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.d.ts +3 -0
  223. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +62 -0
  224. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/sessionSummaryHover.css +104 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.d.ts +115 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +168 -0
  227. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.d.ts +24 -0
  228. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.js +32 -0
  229. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +56 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +0 -4
  231. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +16 -17
  232. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +7 -3
  233. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -0
  234. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +2 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +10 -1
  236. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +48 -1
  237. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +913 -220
  238. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +148 -84
  240. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +161 -17
  241. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +2367 -247
  242. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +5 -2
  243. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +21 -13
  244. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.d.ts +26 -0
  245. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.js +34 -0
  246. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +2 -0
  247. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +23 -0
  248. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +15 -0
  249. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +3 -0
  250. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +10 -2
  251. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +143 -68
  252. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  253. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +10 -5
  254. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.d.ts +40 -0
  255. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +302 -0
  256. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +1 -2
  257. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +49 -8
  258. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +3 -3
  259. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +38 -0
  260. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.js +240 -0
  261. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.d.ts +1 -0
  262. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +53 -0
  263. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.d.ts +82 -0
  264. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +762 -0
  265. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.d.ts +80 -0
  266. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +279 -0
  267. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +44 -0
  268. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +437 -0
  269. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +85 -6
  270. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +697 -15
  271. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
  272. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +40 -10
  273. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +164 -42
  274. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +6 -9
  275. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +260 -31
  276. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +2097 -589
  277. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +32 -0
  278. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +860 -0
  279. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2229 -1338
  280. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +79 -26
  281. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/customizationMigrationDashboard.css +354 -0
  282. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +85 -9
  283. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +1550 -357
  284. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +2 -4
  285. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +13 -27
  286. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +38 -26
  287. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +637 -319
  288. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +28 -10
  289. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.d.ts +10 -0
  290. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.js +22 -0
  291. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.d.ts +15 -0
  292. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +38 -0
  293. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.d.ts +8 -0
  294. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.js +38 -0
  295. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +4 -1
  296. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +1675 -633
  297. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +93 -6
  298. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +823 -52
  299. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.d.ts +132 -0
  300. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +446 -0
  301. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.d.ts +183 -0
  302. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.js +218 -0
  303. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +45 -42
  304. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +11 -0
  305. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +163 -136
  306. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  307. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +7 -7
  308. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +22 -2
  309. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +105 -14
  310. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  311. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.d.ts +32 -0
  312. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +49 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  314. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  315. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  316. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  317. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +27 -22
  318. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +6 -0
  319. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +22 -23
  320. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  321. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -25
  322. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +7 -2
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +76 -43
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
  329. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +145 -0
  330. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +839 -0
  331. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +277 -3
  332. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  333. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +6 -6
  334. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  335. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  336. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  337. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +16 -16
  338. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -4
  339. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  340. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +8 -4
  341. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  342. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -3
  343. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +35 -19
  344. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +16 -9
  345. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +4 -3
  346. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +4 -4
  347. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +4 -0
  348. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +7 -2
  349. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  350. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +5 -5
  351. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +3 -3
  352. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.d.ts +86 -0
  353. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +282 -0
  354. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +14 -10
  355. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  356. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +5 -0
  357. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +37 -25
  358. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +7 -5
  359. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +135 -82
  360. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
  361. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.d.ts +17 -0
  362. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.js +28 -0
  363. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +5 -5
  364. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
  365. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.d.ts +7 -0
  366. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.js +114 -0
  367. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.d.ts +45 -0
  368. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +326 -0
  369. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.d.ts +33 -0
  370. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +99 -0
  371. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.d.ts +17 -0
  372. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +46 -0
  373. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.d.ts +27 -0
  374. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +301 -0
  375. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.d.ts +22 -0
  376. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +103 -0
  377. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +9 -36
  378. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +103 -196
  379. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  380. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +36 -30
  381. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +2 -0
  382. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +51 -12
  383. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  384. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +31 -27
  385. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +65 -20
  386. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +291 -138
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +9 -0
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-dark.svg +1 -0
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-light.svg +1 -0
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.d.ts +9 -0
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.js +24 -0
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -1
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +59 -35
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +7 -2
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +221 -145
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +15 -29
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +21 -3
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.d.ts +22 -0
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.js +27 -0
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +9 -0
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +23 -21
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +6 -1
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +62 -6
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +15 -1
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +97 -8
  406. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  407. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +6 -6
  408. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +11 -2
  409. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +24 -16
  410. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  411. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  412. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +44 -0
  413. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +232 -0
  414. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.d.ts +36 -0
  415. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +127 -0
  416. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +1 -1
  417. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.d.ts +18 -0
  418. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.js +55 -0
  419. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +4 -3
  420. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  421. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +236 -0
  422. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +1 -1
  423. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.d.ts +9 -0
  424. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +260 -0
  425. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +39 -5
  426. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +155 -56
  427. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +10 -14
  428. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +29 -14
  429. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +2 -0
  430. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +76 -24
  431. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  432. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +53 -32
  433. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
  434. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +17 -17
  435. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +8 -7
  436. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
  437. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +29 -71
  438. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +3 -0
  439. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +36 -40
  440. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +3 -0
  441. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
  442. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  443. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  444. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  445. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  446. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +9 -16
  447. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  448. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +5 -13
  449. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/media/promptTimeline.css +820 -0
  450. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.d.ts +38 -0
  451. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.js +100 -0
  452. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.d.ts +1 -0
  453. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +51 -0
  454. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.d.ts +30 -0
  455. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +113 -0
  456. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.d.ts +146 -0
  457. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +440 -0
  458. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.d.ts +16 -0
  459. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.js +5 -0
  460. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.d.ts +194 -0
  461. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +525 -0
  462. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRail.d.ts +33 -0
  463. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.d.ts +128 -0
  464. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +460 -0
  465. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.d.ts +38 -0
  466. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +120 -0
  467. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.d.ts +53 -0
  468. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.js +160 -0
  469. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +25 -22
  470. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.d.ts +13 -0
  471. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +52 -0
  472. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.d.ts +22 -0
  473. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +58 -0
  474. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +63 -0
  475. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +361 -0
  476. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.d.ts +35 -0
  477. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.js +90 -0
  478. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +25 -18
  479. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
  480. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +77 -41
  481. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +60 -43
  482. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -1
  483. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +60 -16
  484. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +10 -8
  485. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +13 -4
  486. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -1
  487. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +44 -24
  488. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +4 -4
  489. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  490. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +52 -6
  491. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +446 -79
  492. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.d.ts +11 -0
  493. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.js +13 -0
  494. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +66 -0
  495. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +297 -0
  496. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.d.ts +137 -0
  497. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +714 -0
  498. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css +379 -0
  499. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.d.ts +10 -0
  500. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +78 -0
  501. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +36 -0
  502. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +172 -0
  503. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +5 -1
  504. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +8 -1
  505. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.d.ts +15 -0
  506. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.js +30 -0
  507. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +11 -1
  508. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +41 -13
  509. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +5 -2
  510. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +133 -3
  511. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +3 -2
  512. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +11 -2
  513. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +4 -4
  514. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.d.ts +1 -0
  515. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +96 -0
  516. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  517. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +36 -1
  518. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +67 -17
  519. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +23 -37
  520. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.d.ts +18 -0
  521. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +72 -3
  522. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +11 -0
  523. package/vscode/src/vs/workbench/contrib/{agentsVoice/common/agentsVoiceColors.js → chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js} +17 -15
  524. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.d.ts +3 -0
  525. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +16 -0
  526. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  527. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +6 -4
  528. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +21 -13
  529. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +48 -8
  530. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +457 -142
  531. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -1
  532. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +22 -14
  533. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +6 -22
  534. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.d.ts +22 -0
  535. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.js +163 -0
  536. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +27 -5
  537. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +79 -32
  538. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.d.ts +6 -0
  539. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.js +12 -0
  540. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +44 -11
  541. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +404 -51
  542. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +64 -4
  543. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +33 -2
  544. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.d.ts +68 -0
  545. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +70 -0
  546. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -2
  547. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +18 -5
  548. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +43 -14
  549. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -0
  550. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +4 -9
  551. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +164 -71
  552. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
  553. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
  554. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  555. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
  556. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  557. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  558. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +3 -1
  559. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +19 -10
  560. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +3 -1
  561. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +172 -159
  562. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.d.ts +115 -0
  563. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.js +69 -0
  564. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.d.ts +60 -0
  565. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +139 -0
  566. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  567. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +5 -0
  568. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +21 -1
  569. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +25 -2
  570. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +55 -18
  571. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  572. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  573. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  574. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +1 -0
  575. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  576. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  577. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.d.ts +59 -0
  578. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +323 -0
  579. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.d.ts +30 -0
  580. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.js +79 -0
  581. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +6 -2
  582. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +118 -13
  583. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  584. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  585. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  586. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  587. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  588. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
  589. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -0
  590. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +81 -0
  591. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +85 -0
  592. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
  593. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  594. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +23 -23
  595. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  596. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +17 -3
  597. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +81 -7
  598. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.d.ts +30 -0
  599. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.js +86 -0
  600. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +10 -2
  601. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +97 -18
  602. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +2 -22
  603. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +10 -8
  604. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +2 -1
  605. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
  606. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +42 -36
  607. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +8 -0
  608. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +10 -0
  609. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
  610. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
  611. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  612. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +25 -16
  613. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +4 -3
  614. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.d.ts +70 -0
  615. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.js +4316 -0
  616. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  617. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  618. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  619. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  620. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +4 -4
  621. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  622. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
  623. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -1
  624. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +188 -148
  625. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  626. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  627. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  628. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  629. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  630. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +7 -0
  631. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -3
  632. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +5 -6
  633. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -42
  634. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.d.ts +2 -0
  635. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.js +8 -0
  636. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
  637. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +27 -8
  638. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +205 -0
  639. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +1580 -0
  640. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.d.ts +30 -0
  641. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +175 -0
  642. package/vscode/src/vs/workbench/services/agentEditorComments/browser/media/agentEditorCommentsOverlayWidget.css +65 -0
  643. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.d.ts +47 -0
  644. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.js +129 -0
  645. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +26 -8
  646. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +89 -27
  647. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.d.ts +8 -0
  648. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.js +28 -0
  649. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +5 -1
  650. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +18 -18
  651. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.js +159 -60
  652. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.d.ts +47 -0
  653. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +362 -0
  654. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +0 -1
  655. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +0 -40
  656. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +0 -1110
  657. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +0 -76
  658. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.d.ts +0 -63
  659. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.js +0 -25
  660. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +0 -254
  661. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +0 -451
  662. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +0 -1294
  663. package/vscode/src/vs/platform/agentHost/common/agentService.js +0 -92
  664. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.d.ts +0 -186
  665. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.js +0 -10
  666. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +0 -42
  667. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +0 -7
  668. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +0 -15
  669. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +0 -15
  670. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +0 -2
  671. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +0 -19
  672. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +0 -243
  673. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +0 -24
  674. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +0 -77
  675. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +0 -92
  676. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +0 -224
  677. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +0 -23
  678. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +0 -52
  679. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +0 -16
  680. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +0 -96
  681. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +0 -27
  682. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +0 -152
  683. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +0 -87
  684. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +0 -772
  685. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +0 -30
  686. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +0 -29
  687. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +0 -20
  688. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +0 -40
  689. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +0 -160
  690. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +0 -9
  691. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +0 -123
  692. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +0 -37
  693. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +0 -572
  694. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +0 -125
  695. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +0 -399
  696. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +0 -321
  697. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +0 -2117
  698. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +0 -57
  699. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +0 -367
  700. package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +0 -78
  701. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +0 -13
  702. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +0 -11
  703. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +0 -6
  704. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +0 -16
  705. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +0 -6
  706. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +0 -46
  707. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +0 -36
  708. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +0 -6
  709. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +0 -12
  710. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +0 -6
  711. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +0 -9
  712. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +0 -6
  713. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -15
  714. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -177
  715. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  716. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  717. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -65
  718. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -264
  719. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -190
  720. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -865
  721. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  722. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  723. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
  724. /package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.js +0 -0
  725. /package/vscode/src/vs/{platform/agentHost/common/agentHost.config.contribution.d.ts → workbench/contrib/chat/browser/agentSessionsConfiguration.d.ts} +0 -0
@@ -1,1294 +0,0 @@
1
- import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
- import { IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import type { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
4
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
6
- import type { IAgentServerToolHost } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentServerTools";
7
- import type { IActiveSubscriptionInfo, IAgentSubscription } from "./state/agentSubscription.js";
8
- import type { IRemoteWatchHandle } from "./agentHostFileSystemProvider.js";
9
- import type { CompletionsParams, CompletionsResult, CreateTerminalParams, ResolveSessionConfigResult, SessionConfigCompletionsResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
10
- import type { InvokeChangesetOperationParams, InvokeChangesetOperationResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands";
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
- 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, 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
- export declare enum AgentHostIpcChannels {
16
- /** Channel for the agent host service on the main-process side */
17
- AgentHost = "agentHost",
18
- /** Channel for log forwarding from the agent host process */
19
- Logger = "agentHostLogger",
20
- /** Channel for WebSocket client connection count (server process management only) */
21
- ConnectionTracker = "agentHostConnectionTracker",
22
- /**
23
- * Channel registered by the remote server that proxies AHP JSON-RPC
24
- * frames between a renderer and the agent host running on the server.
25
- * Pairs with `AgentHostIpcChannelTransport` on the renderer side.
26
- */
27
- RemoteProxy = "agentHostProxy"
28
- }
29
- /** Configuration key that controls whether the local agent host process is spawned. */
30
- export declare const AgentHostEnabledSettingId = "chat.agentHost.enabled";
31
- /** Whether the local/process-backed agent host is enabled in this runtime. */
32
- export declare function isAgentHostEnabled(configurationService: IConfigurationService): boolean;
33
- /** Configuration key that controls whether AHP JSONL logs are written for agent host transports. */
34
- export declare const AgentHostAhpJsonlLoggingSettingId = "chat.agentHost.ahpJsonlLoggingEnabled";
35
- /** Configuration key that controls whether Agent Host uses its terminal tool override for Copilot SDK sessions. */
36
- export declare const AgentHostCustomTerminalToolEnabledSettingId = "chat.agentHost.customTerminalTool.enabled";
37
- /**
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`.
42
- */
43
- export declare const AgentHostOpus48PromptEnabledSettingId = "chat.agentHost.opus48Prompt.enabled";
44
- /**
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' }`).
146
- */
147
- export declare const ClaudePreferAgentHostAgentsSettingId = "chat.agents.claude.preferAgentHost";
148
- /**
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.
153
- */
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";
195
- /**
196
- * Optional override for `$CODEX_HOME`. When set, the codex app-server child
197
- * process inherits this value, controlling where rollouts and config live.
198
- */
199
- export declare const AgentHostCodexAgentCodexHomeSettingId = "chat.agentHost.codexAgent.codexHome";
200
- /**
201
- * Additional command-line arguments passed to `codex app-server`. Mainly for
202
- * debugging (e.g. `--log-level=debug`).
203
- */
204
- export declare const AgentHostCodexAgentBinaryArgsSettingId = "chat.agentHost.codexAgent.binaryArgs";
205
- /**
206
- * Environment variable form of {@link AgentHostCodexAgentSdkRootSettingId}.
207
- * Forwarded by the starters from the setting.
208
- */
209
- export declare const AgentHostCodexAgentSdkRootEnvVar = "VSCODE_AGENT_HOST_CODEX_SDK_ROOT";
210
- /** Forwarded `$CODEX_HOME`. */
211
- export declare const AgentHostCodexAgentCodexHomeEnvVar = "CODEX_HOME";
212
- /** Forwarded extra args for `codex app-server` (JSON-encoded string[]). */
213
- export declare const AgentHostCodexAgentBinaryArgsEnvVar = "VSCODE_AGENT_HOST_CODEX_APP_SERVER_ARGS";
214
- /** Master toggle for agent-host OTel. Explicit opt-in; other settings imply this when set. */
215
- export declare const AgentHostOTelEnabledSettingId = "chat.agentHost.otel.enabled";
216
- /** Exporter type for the SDK's OTel pipeline. One of: `otlp-http`, `otlp-grpc`, `console`, `file`. */
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";
225
- /** OTLP endpoint URL when `exporterType` is `otlp-http` or `otlp-grpc`. */
226
- export declare const AgentHostOTelOtlpEndpointSettingId = "chat.agentHost.otel.otlpEndpoint";
227
- /** Whether to include prompt/response content in span attributes (privacy-sensitive). */
228
- export declare const AgentHostOTelCaptureContentSettingId = "chat.agentHost.otel.captureContent";
229
- /** Output path when `exporterType` is `file`. */
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";
235
- /** When true, ALL spans are persisted to a local SQLite store regardless of `exporterType`. */
236
- export declare const AgentHostOTelDbSpanExporterEnabledSettingId = "chat.agentHost.otel.dbSpanExporter.enabled";
237
- /**
238
- * Path of the local SQLite span database, relative to `INativeEnvironmentService.userDataPath`.
239
- * Kept here so both the renderer-side export action and the agent-host-side service
240
- * use the same on-disk location.
241
- */
242
- export declare const AgentHostOTelSpansDbSubPath = "agent-host/otel/agent-host-traces.db";
243
- /**
244
- * Environment variables consumed by `AgentHostOTelService` inside the agent host
245
- * process. The workbench-side agent-host starters translate the corresponding
246
- * `chat.agentHost.otel.*` settings into these variables (settings → env), while
247
- * any value already present on the parent process's env wins (developer override).
248
- *
249
- * These names match the conventions documented in
250
- * `extensions/copilot/docs/monitoring/agent_monitoring.md` so the same external
251
- * tooling and `OTEL_EXPORTER_OTLP_*` config recipes work unchanged.
252
- */
253
- export declare const AgentHostOTelEnvVars: Readonly<{
254
- readonly Enabled: "COPILOT_OTEL_ENABLED";
255
- readonly ExporterType: "COPILOT_OTEL_EXPORTER_TYPE";
256
- readonly OtlpEndpoint: "OTEL_EXPORTER_OTLP_ENDPOINT";
257
- readonly OtlpEndpointAlt: "COPILOT_OTEL_ENDPOINT";
258
- readonly OtlpProtocol: "OTEL_EXPORTER_OTLP_PROTOCOL";
259
- readonly OtlpTracesProtocol: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL";
260
- readonly OtlpMetricsProtocol: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL";
261
- readonly OtlpHeaders: "OTEL_EXPORTER_OTLP_HEADERS";
262
- readonly CaptureContent: "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT";
263
- readonly FilePath: "COPILOT_OTEL_FILE_EXPORTER_PATH";
264
- readonly SourceName: "COPILOT_OTEL_SOURCE_NAME";
265
- readonly ServiceName: "OTEL_SERVICE_NAME";
266
- readonly ResourceAttributes: "OTEL_RESOURCE_ATTRIBUTES";
267
- readonly DbSpanExporterEnabled: "COPILOT_OTEL_DB_SPAN_EXPORTER_ENABLED";
268
- }>;
269
- /**
270
- * Snapshot of the `chat.agentHost.otel.*` settings; produced by the workbench-side
271
- * starters and merged with the parent process's env (env wins on key collision).
272
- */
273
- export interface IAgentHostOTelSettings {
274
- readonly enabled?: boolean;
275
- readonly exporterType?: string;
276
- readonly otlpProtocol?: string;
277
- readonly otlpEndpoint?: string;
278
- readonly captureContent?: boolean;
279
- readonly outfile?: string;
280
- readonly serviceName?: string;
281
- readonly resourceAttributes?: Record<string, string>;
282
- readonly dbSpanExporterEnabled?: boolean;
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;
309
- /**
310
- * Build the env-var overlay for the agent host process from user settings and
311
- * inherited env. Settings are translated to env vars, but if the same env var is
312
- * already present on `inheritedEnv` it wins (developer override).
313
- *
314
- * Only sets a key when the underlying setting was explicitly configured — empty
315
- * string / undefined settings are dropped so they don't shadow inherited env.
316
- */
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>;
338
- /** Result of starting the agent host WebSocket server on-demand. */
339
- export interface IAgentHostSocketInfo {
340
- readonly socketPath: string;
341
- }
342
- /** Inspector listener information for the agent host process. */
343
- export interface IAgentHostInspectInfo {
344
- readonly host: string;
345
- readonly port: number;
346
- /** A `devtools://` URL that can be opened with `INativeHostService.openDevToolsWindow`. */
347
- readonly devtoolsUrl: string;
348
- }
349
- /**
350
- * IPC service exposed on the {@link AgentHostIpcChannels.ConnectionTracker}
351
- * channel. Used by the server process for lifetime management and by the
352
- * shared process to request a local WebSocket listener on-demand.
353
- */
354
- export interface IConnectionTrackerService {
355
- readonly onDidChangeConnectionCount: Event<number>;
356
- /**
357
- * Request the agent host to start a WebSocket server on a local
358
- * pipe/socket. Returns the socket path.
359
- * If a server is already running, returns the existing info.
360
- */
361
- startWebSocketServer(): Promise<IAgentHostSocketInfo>;
362
- /**
363
- * Get inspector listener info for the agent host process. If the inspector
364
- * is not currently active and `tryEnable` is true, opens the inspector on
365
- * a random local port. Returns `undefined` if the inspector cannot be
366
- * enabled (e.g. running in an environment without `node:inspector`).
367
- */
368
- getInspectInfo(tryEnable: boolean): Promise<IAgentHostInspectInfo | undefined>;
369
- }
370
- export interface IAgentSessionMetadata {
371
- readonly session: URI;
372
- readonly startTime: number;
373
- readonly modifiedTime: number;
374
- readonly project?: IAgentSessionProjectInfo;
375
- readonly summary?: string;
376
- readonly status?: SessionStatus;
377
- /** Human-readable description of what the session is currently doing. */
378
- readonly activity?: string;
379
- readonly workingDirectory?: URI;
380
- readonly customizationDirectory?: URI;
381
- readonly isRead?: boolean;
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;
390
- /**
391
- * Catalogue of changesets the agent can produce for this session — the
392
- * {@link Changeset | catalogue} that travels on
393
- * `SessionSummary.changesets`. Lightweight summary entries (id / label /
394
- * URI template / aggregate counts) without per-file detail; clients
395
- * subscribe to a specific expanded changeset URI when they need the full
396
- * file list.
397
- */
398
- readonly changesets?: readonly Changeset[];
399
- /**
400
- * Side-channel metadata mirroring {@link SessionState._meta}, propagated
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.
407
- */
408
- readonly _meta?: SessionMeta;
409
- }
410
- export interface IAgentSessionProjectInfo {
411
- readonly uri: URI;
412
- readonly displayName: string;
413
- }
414
- export interface IAgentCreateSessionResult {
415
- readonly session: URI;
416
- readonly project?: IAgentSessionProjectInfo;
417
- /** The resolved working directory, which may differ from the requested one (e.g. worktree). */
418
- readonly workingDirectory?: URI;
419
- /**
420
- * `true` when the agent only allocated an in-memory placeholder for this
421
- * session (no SDK session, no worktree, no on-disk state). Materialization
422
- * happens lazily on the first {@link IAgentChats.sendMessage}, at which point
423
- * the agent fires {@link IAgent.onDidMaterializeSession}. The
424
- * {@link IAgentService} uses this flag to defer the `sessionAdded` protocol
425
- * notification so observers don't see the session in their list until it
426
- * has been persisted.
427
- */
428
- readonly provisional?: boolean;
429
- }
430
- /**
431
- * Payload of {@link IAgent.onDidMaterializeSession}. Fired once per session
432
- * when a previously {@link IAgentCreateSessionResult.provisional} session has
433
- * its SDK session, worktree (if any), and on-disk metadata in place.
434
- */
435
- export interface IAgentMaterializeSessionEvent {
436
- readonly session: URI;
437
- readonly workingDirectory: URI | undefined;
438
- readonly project: IAgentSessionProjectInfo | undefined;
439
- }
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;
455
- /** Metadata describing an agent backend, discovered over IPC. */
456
- export interface IAgentDescriptor {
457
- readonly provider: AgentProvider;
458
- readonly displayName: string;
459
- readonly description: string;
460
- /** Static capability flags the agent advertises (see {@link IAgentCapabilities}). */
461
- readonly capabilities?: IAgentCapabilities;
462
- }
463
- /**
464
- * Parameters for the `authenticate` command.
465
- * Analogous to sending `Authorization: Bearer <token>` (RFC 6750 section 2.1).
466
- */
467
- export interface AuthenticateParams {
468
- /**
469
- * The `resource` identifier from the server's
470
- * {@link IAuthorizationProtectedResourceMetadata} that this token targets.
471
- */
472
- readonly resource: string;
473
- /**
474
- * Scopes that were used to acquire the token. Omitted for legacy clients
475
- * that can only identify tokens by protected resource.
476
- */
477
- readonly scopes?: readonly string[];
478
- /** The bearer token value (RFC 6750). */
479
- readonly token: string;
480
- }
481
- /** Request for a previously accepted bearer token. */
482
- export interface IAgentHostAuthTokenRequest {
483
- /** Protected resource identifier from {@link ProtectedResourceMetadata.resource}. */
484
- readonly resource: string;
485
- /** Required token scopes, when the caller needs a scope-specific token. */
486
- readonly scopes?: readonly string[];
487
- }
488
- /**
489
- * Result of the `authenticate` command.
490
- */
491
- export interface AuthenticateResult {
492
- /** Whether the token was accepted. */
493
- readonly authenticated: boolean;
494
- }
495
- /**
496
- * Canonical {@link ProtectedResourceMetadata} for the GitHub Copilot
497
- * resource. Shared between every agent provider that consumes a GitHub
498
- * Copilot bearer token (e.g. Copilot CLI, Claude) so they advertise an
499
- * identical resource identifier to the auth flow — clients dispatch by
500
- * `resource`, and divergent metadata would silently route the same
501
- * token down separate code paths.
502
- */
503
- export declare const GITHUB_COPILOT_PROTECTED_RESOURCE: ProtectedResourceMetadata;
504
- /**
505
- * Canonical {@link ProtectedResourceMetadata} for GitHub repository write
506
- * operations (e.g. creating a pull request). Distinct from
507
- * {@link GITHUB_COPILOT_PROTECTED_RESOURCE} so that the broader `repo`
508
- * scope is only requested when a session actually needs it (e.g. when a
509
- * changeset operation handler throws `AHP_AUTH_REQUIRED` with this
510
- * resource), rather than at session create for every agent.
511
- *
512
- * `required: false` reflects that the resource is only needed on demand —
513
- * agents do not have to advertise it eagerly. The workbench-side auth
514
- * contributor resolves it lazily in response to operation invocations.
515
- */
516
- export declare const GITHUB_REPO_PROTECTED_RESOURCE: ProtectedResourceMetadata;
517
- export interface IAgentCreateSessionConfig {
518
- readonly provider?: AgentProvider;
519
- readonly model?: ModelSelection;
520
- /**
521
- * Initial custom agent selection for the new session. Omit to start with
522
- * no custom agent selected (provider default behavior).
523
- */
524
- readonly agent?: AgentSelection;
525
- readonly session?: URI;
526
- readonly workingDirectory?: URI;
527
- readonly config?: Record<string, unknown>;
528
- /**
529
- * Eagerly claim the active client role for the new session. When provided,
530
- * the server initializes the session with this client as the active
531
- * client, equivalent to dispatching a `session/activeClientSet`
532
- * action immediately after creation. The `clientId` MUST match the
533
- * connection's own `clientId`.
534
- */
535
- readonly activeClient?: SessionActiveClient;
536
- /** Fork from an existing session at a specific turn. */
537
- readonly fork?: {
538
- readonly session: URI;
539
- readonly turnIndex: number;
540
- readonly turnId: string;
541
- /**
542
- * Maps old protocol turn IDs to new protocol turn IDs.
543
- * Populated by the service layer after generating fresh UUIDs
544
- * for the forked session's turns. Used by the agent to remap
545
- * per-turn data (e.g. SDK event ID mappings) in the session database.
546
- */
547
- readonly turnIdMapping?: ReadonlyMap<string, string>;
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[]>;
725
- }
726
- export interface IAgentResolveSessionConfigParams {
727
- readonly provider?: AgentProvider;
728
- readonly workingDirectory?: URI;
729
- readonly config?: Record<string, unknown>;
730
- }
731
- export interface IAgentSessionConfigCompletionsParams extends IAgentResolveSessionConfigParams {
732
- readonly property: string;
733
- readonly query?: string;
734
- }
735
- /** Serializable model information from the agent host. */
736
- export interface IAgentModelInfo {
737
- readonly provider: AgentProvider;
738
- readonly id: string;
739
- readonly name: string;
740
- readonly maxContextWindow?: number;
741
- readonly maxOutputTokens?: number;
742
- readonly maxPromptTokens?: number;
743
- readonly supportsVision: boolean;
744
- readonly configSchema?: ConfigSchema;
745
- readonly policyState?: PolicyState;
746
- readonly _meta?: Record<string, unknown>;
747
- }
748
- /**
749
- * A signal emitted by an agent during session execution.
750
- *
751
- * Most signals carry a protocol {@link SessionAction} directly via the
752
- * `kind: 'action'` shape, eliminating a parallel event ontology. A small
753
- * number of cases that have no clean protocol action (permission
754
- * auto-approval, subagent session creation, steering message
755
- * acknowledgment) remain as discriminated non-action signals so the host
756
- * can perform side effects before — or instead of — dispatching an action.
757
- */
758
- export type AgentSignal = IAgentActionSignal | IAgentToolPendingConfirmationSignal | IAgentSubagentStartedSignal | IAgentSubagentCompletedSignal | IAgentSteeringConsumedSignal;
759
- /**
760
- * Carries a protocol {@link SessionAction} produced by an agent. The host
761
- * dispatches the action through the state manager after routing via
762
- * {@link IAgentActionSignal.parentToolCallId} (if set).
763
- *
764
- * Agents are responsible for populating the target channel and any `turnId` /
765
- * `partId` fields on the action.
766
- */
767
- export interface IAgentActionSignal {
768
- readonly kind: "action";
769
- /** Target session or chat channel URI. For inner subagent events this is the parent session — see {@link parentToolCallId}. */
770
- readonly resource: URI;
771
- /** Protocol action to dispatch. */
772
- readonly action: SessionAction | ChatAction;
773
- /** If set, route the action to the subagent session belonging to this tool call. */
774
- readonly parentToolCallId?: string;
775
- }
776
- /**
777
- * A tool has finished collecting parameters and needs the host to decide
778
- * whether it should run (or, mid-execution, re-confirm). The host applies
779
- * auto-approval logic over {@link permissionKind} / {@link permissionPath}
780
- * (see `SessionPermissionManager.getAutoApproval`) and then dispatches the
781
- * appropriate `ChatToolCallReady` action — with confirmation options
782
- * baked in when the user must approve, or with `confirmed: NotNeeded` when
783
- * the host auto-approved.
784
- *
785
- * Kept as a non-action signal because the host owns this approval policy;
786
- * the agent only describes the tool call and the kind of permission being
787
- * requested. The {@link state} field carries the protocol-shaped tool-call
788
- * state and is dispatched verbatim into the action.
789
- */
790
- export interface IAgentToolPendingConfirmationSignal {
791
- readonly kind: "pending_confirmation";
792
- /** Target chat channel URI containing the tool call. */
793
- readonly chat: URI;
794
- /** Protocol-shaped pending-confirmation state, dispatched verbatim into `ChatToolCallReady`. */
795
- readonly state: ToolCallPendingConfirmationState;
796
- /** Host-only auto-approval kind (not part of the dispatched action). */
797
- readonly permissionKind?: "shell" | "write" | "mcp" | "read" | "url" | "custom-tool" | "hook" | "memory" | "extension-management" | "extension-permission-access";
798
- /** Host-only auto-approval path target (not part of the dispatched action). */
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;
806
- /**
807
- * If set, the tool call belongs to the subagent rooted at this
808
- * parent tool call. Used by the host to route the resulting
809
- * `ChatToolCallReady` to the subagent session — otherwise the
810
- * action would land on the parent session, where there is no
811
- * matching `ChatToolCallStart`.
812
- */
813
- readonly parentToolCallId?: string;
814
- }
815
- /**
816
- * A subagent was spawned by a tool call. The host creates a child session
817
- * silently and routes subsequent inner-tool events to it.
818
- *
819
- * Kept as a non-action signal because subagent session creation has no
820
- * protocol action — it's a host-side composition primitive.
821
- */
822
- export interface IAgentSubagentStartedSignal {
823
- readonly kind: "subagent_started";
824
- readonly chat: URI;
825
- readonly toolCallId: string;
826
- readonly agentName: string;
827
- readonly agentDisplayName: string;
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;
854
- }
855
- /**
856
- * A subagent has finished — either successfully or with an error. The host
857
- * uses this to tear down the child session after all of its events have been
858
- * routed. The parent tool call completing is not a reliable signal for this
859
- * because background subagents (e.g. Copilot's `mode: background` task) keep
860
- * emitting events after their parent tool call returns immediately.
861
- */
862
- export interface IAgentSubagentCompletedSignal {
863
- readonly kind: "subagent_completed";
864
- readonly chat: URI;
865
- readonly toolCallId: string;
866
- }
867
- /** A steering message was consumed (sent to the model). */
868
- export interface IAgentSteeringConsumedSignal {
869
- readonly kind: "steering_consumed";
870
- readonly chat: URI;
871
- readonly id: string;
872
- }
873
- export declare namespace AgentSession {
874
- /**
875
- * Creates a session URI from a provider name and raw session ID.
876
- * The URI scheme is the provider name (e.g., `copilot:/<rawId>`).
877
- */
878
- function uri(provider: AgentProvider, rawSessionId: string): URI;
879
- /**
880
- * Extracts the raw session ID from a session URI (the path without leading slash).
881
- * Accepts both a URI object and a URI string.
882
- */
883
- function id(session: URI | string): string;
884
- /**
885
- * Extracts the provider name from a session URI scheme.
886
- * Accepts both a URI object and a URI string.
887
- */
888
- function provider(session: URI | string): AgentProvider | undefined;
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
- }
942
- /**
943
- * Implemented by each agent backend (e.g. Copilot SDK).
944
- * The {@link IAgentService} dispatches to the appropriate agent based on
945
- * the agent id.
946
- */
947
- export interface IAgent {
948
- /** Unique identifier for this provider (e.g. `'copilot'`). */
949
- readonly id: AgentProvider;
950
- /** Fires when the provider streams progress for a session. */
951
- readonly onDidSessionProgress: Event<AgentSignal>;
952
- /**
953
- * Fires once when a previously
954
- * {@link IAgentCreateSessionResult.provisional} session has been
955
- * materialized — i.e. its SDK session, worktree (if any), and on-disk
956
- * metadata are all in place. The {@link IAgentService} uses this event
957
- * to fire the deferred `sessionAdded` notification with the now-final
958
- * summary.
959
- */
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;
974
- /** Create a new session. Returns server-owned session metadata. */
975
- createSession(config?: IAgentCreateSessionConfig): Promise<IAgentCreateSessionResult>;
976
- /** Resolve the dynamic configuration schema for creating a session. */
977
- resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult>;
978
- /** Return dynamic completions for a session configuration property. */
979
- sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<SessionConfigCompletionsResult>;
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>;
1018
- /**
1019
- * Called when the session's pending (steering) message changes.
1020
- * The agent harness decides how to react — e.g. inject steering
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.
1024
- *
1025
- * Queued messages are consumed on the server side and are not
1026
- * forwarded to the agent; `queuedMessages` will always be empty.
1027
- */
1028
- setPendingMessages?(session: URI, steeringMessage: PendingMessage | undefined, queuedMessages: readonly PendingMessage[], chat?: URI): void;
1029
- /**
1030
- * Retrieve the reconstructed turns for a session, used when restoring
1031
- * sessions from persistent storage. Each agent owns the conversion from
1032
- * its SDK-specific event log to protocol {@link Turn}s, including
1033
- * subagent sessions (callers pass the subagent URI to retrieve the
1034
- * child session's turns).
1035
- */
1036
- getSessionMessages(session: URI): Promise<readonly Turn[]>;
1037
- /**
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.
1045
- */
1046
- getSubagentSessions?(session: URI): Promise<readonly IRestoredSubagentSession[]>;
1047
- /** Dispose a session, freeing resources. */
1048
- disposeSession(session: URI): Promise<void>;
1049
- /** Respond to a pending permission request from the SDK. */
1050
- respondToPermissionRequest(requestId: string, approved: boolean): void;
1051
- /** Respond to a pending user input request from the SDK's ask_user tool. */
1052
- respondToUserInputRequest(requestId: string, response: ChatInputResponseKind, answers?: Record<string, ChatInputAnswer>): void;
1053
- /** Return the descriptor for this agent. */
1054
- getDescriptor(): IAgentDescriptor;
1055
- /** Available models from this provider. */
1056
- readonly models: IObservable<readonly IAgentModelInfo[]>;
1057
- /** List persisted sessions from this provider. */
1058
- listSessions(): Promise<IAgentSessionMetadata[]>;
1059
- /** Retrieve metadata for a single persisted session, without enumerating the provider catalog. */
1060
- getSessionMetadata?(session: URI): Promise<IAgentSessionMetadata | undefined>;
1061
- /** Declare protected resources this agent requires auth for (RFC 9728). */
1062
- getProtectedResources(): ProtectedResourceMetadata[];
1063
- /**
1064
- * Fires when the agent's host-owned customizations change
1065
- * (loading state, resolution results, etc.), so infrastructure
1066
- * can republish {@link AgentInfo} and session customization state.
1067
- */
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">>;
1077
- /**
1078
- * Returns the host-owned customizations this agent currently exposes.
1079
- *
1080
- * Used to publish baseline customization metadata on {@link AgentInfo}.
1081
- * Always container customizations ({@link PluginCustomization} or
1082
- * {@link DirectoryCustomization}).
1083
- */
1084
- getCustomizations?(): readonly Customization[];
1085
- /**
1086
- * Returns the effective customization list for a session, including
1087
- * source, enablement, and loading/error status.
1088
- */
1089
- getSessionCustomizations?(session: URI): Promise<readonly Customization[]>;
1090
- /**
1091
- * Authenticate for a specific resource. Returns true if accepted.
1092
- * The `resource` matches {@link IAuthorizationProtectedResourceMetadata.resource}.
1093
- */
1094
- authenticate(resource: string, token: string): Promise<boolean>;
1095
- /**
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
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
- *
1108
- * Optional — not all providers support truncation.
1109
- */
1110
- truncateSession?(session: URI, turnId: string | undefined, chat: URI): Promise<void>;
1111
- /**
1112
- * Notifies the provider that a session's archived state has changed.
1113
- * Providers may use this to clean up or restore per-session resources
1114
- * (for example, removing a session-owned worktree on archive and
1115
- * recreating it on unarchive). Optional.
1116
- */
1117
- onArchivedChanged?(session: URI, isArchived: boolean): Promise<void>;
1118
- /**
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.
1124
- *
1125
- * @param session The session URI this client contributes to.
1126
- * @param client The client's `clientId` and optional human-readable name.
1127
- */
1128
- getOrCreateActiveClient(session: URI, client: {
1129
- readonly clientId: string;
1130
- readonly displayName?: string;
1131
- }): IActiveClient;
1132
- /**
1133
- * Remove an active client from a session, clearing its tool and
1134
- * customization contributions. No-op when no active client matches
1135
- * `clientId`.
1136
- *
1137
- * @param session The session the client is leaving.
1138
- * @param clientId The client to remove.
1139
- */
1140
- removeActiveClient(session: URI, clientId: string): void;
1141
- /**
1142
- * Called when a client completes a client-provided tool call.
1143
- * Resolves the tool handler's deferred promise so the SDK can continue.
1144
- *
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`.
1150
- * @param toolCallId The id of the tool call being completed.
1151
- * @param result The result of the tool call.
1152
- */
1153
- onClientToolCallComplete(session: URI, chat: URI, toolCallId: string, result: ToolCallResult): void;
1154
- /**
1155
- * Notifies the agent that a customization has been toggled on or off.
1156
- * The agent MAY restart its client before the next message is sent.
1157
- *
1158
- * @param id The opaque session-unique customization id.
1159
- */
1160
- setCustomizationEnabled(id: string, enabled: boolean): void;
1161
- /** Gracefully shut down all sessions. */
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>;
1189
- /** Dispose this provider and all its resources. */
1190
- dispose(): void;
1191
- }
1192
- /**
1193
- * Consumer-facing connection to an agent host. Session handlers, terminal
1194
- * contributions, and other features program against this interface.
1195
- *
1196
- * Implementations wrap an {@link IAgentService} and layer subscription
1197
- * management and optimistic write-ahead on top.
1198
- */
1199
- export interface IAgentConnection {
1200
- readonly clientId: string;
1201
- readonly rootState: IAgentSubscription<RootState>;
1202
- /**
1203
- * Acquire a refcounted subscription to `resource`. `owner` names the
1204
- * caller holding the reference so inspection surfaces can attribute who
1205
- * is retaining a subscription; use a stable identifier such as the
1206
- * acquiring class name.
1207
- */
1208
- getSubscription<T extends StateComponents>(kind: T, resource: URI, owner: string): IReference<IAgentSubscription<ComponentToState[T]>>;
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;
1216
- /**
1217
- * Read-only descriptors of every active resource subscription on this
1218
- * connection, for inspection/debug surfaces. Excludes the always-live
1219
- * {@link rootState}.
1220
- */
1221
- getActiveSubscriptions(): readonly IActiveSubscriptionInfo[];
1222
- /**
1223
- * Dispatch a client-originated action. `channel` is the protocol URI
1224
- * string identifying the channel the action targets (a session URI for
1225
- * session actions, terminal URI for terminal actions, or
1226
- * `ROOT_STATE_URI` for root-config actions). Strings are used rather
1227
- * than {@link URI} objects so authority-less scheme URIs like
1228
- * `ahp-root://` survive the wire format without normalization.
1229
- */
1230
- dispatch(channel: string, action: SessionAction | ChatAction | TerminalAction | ClientAnnotationsAction | IRootConfigChangedAction): void;
1231
- readonly onDidNotification: Event<INotification>;
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>;
1252
- authenticate(params: AuthenticateParams): Promise<AuthenticateResult>;
1253
- listSessions(): Promise<IAgentSessionMetadata[]>;
1254
- createSession(config?: IAgentCreateSessionConfig): Promise<URI>;
1255
- resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult>;
1256
- sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<SessionConfigCompletionsResult>;
1257
- completions(params: CompletionsParams): Promise<CompletionsResult>;
1258
- /**
1259
- * Trigger characters announced by the connected agent host that should
1260
- * cause the client to issue a `completions` request when typed in a
1261
- * user-message input. Resolves once on first request and is cached.
1262
- */
1263
- getCompletionTriggerCharacters(): Promise<readonly string[]>;
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>;
1273
- createTerminal(params: CreateTerminalParams): Promise<void>;
1274
- disposeTerminal(terminal: URI): Promise<void>;
1275
- invokeChangesetOperation(params: InvokeChangesetOperationParams): Promise<InvokeChangesetOperationResult>;
1276
- resourceList(uri: URI): Promise<ResourceListResult>;
1277
- resourceRead(uri: URI): Promise<ResourceReadResult>;
1278
- resourceWrite(params: ResourceWriteParams): Promise<ResourceWriteResult>;
1279
- resourceCopy(params: ResourceCopyParams): Promise<ResourceCopyResult>;
1280
- resourceDelete(params: ResourceDeleteParams): Promise<ResourceDeleteResult>;
1281
- resourceMove(params: ResourceMoveParams): Promise<ResourceMoveResult>;
1282
- resourceResolve(params: ResourceResolveParams): Promise<ResourceResolveResult>;
1283
- resourceMkdir(params: ResourceMkdirParams): Promise<ResourceMkdirResult>;
1284
- createResourceWatch(params: CreateResourceWatchParams): Promise<CreateResourceWatchResult>;
1285
- /**
1286
- * Convenience method that bundles
1287
- * {@link createResourceWatch} + {@link subscribe} + a typed
1288
- * {@link IFileChange}[] event stream, so consumers (notably
1289
- * `AHPFileSystemProvider.watch`) can drive a watcher without
1290
- * understanding the underlying channel protocol. Disposing the
1291
- * returned handle unsubscribes.
1292
- */
1293
- watchResource(params: CreateResourceWatchParams): Promise<IRemoteWatchHandle>;
1294
- }