@codingame/monaco-vscode-chat-service-override 33.0.8 → 34.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 (403) hide show
  1. package/index.js +19 -5
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +32 -0
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +77 -0
  5. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +84 -17
  6. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +235 -190
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +3 -2
  8. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +23 -4
  9. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.d.ts +1 -0
  10. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +22 -0
  11. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +107 -8
  12. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +272 -49
  13. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +2 -2
  14. package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.d.ts → agentHostResourceService.d.ts} +26 -0
  15. package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +11 -1
  16. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +13 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +26 -18
  18. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.d.ts +1 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +119 -0
  20. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +135 -19
  21. package/vscode/src/vs/platform/agentHost/common/agentService.js +8 -2
  22. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +5 -1
  23. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +85 -22
  24. package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +36 -0
  25. package/vscode/src/vs/platform/agentHost/common/customAgents.js +12 -0
  26. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +81 -0
  27. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +103 -0
  28. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +86 -10
  29. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +129 -37
  30. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +12 -0
  31. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +72 -0
  32. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +6 -0
  33. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +30 -0
  34. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +6 -0
  35. package/vscode/src/vs/platform/agentHost/common/state/protocol/{reducers.js → channels-session/reducer.js} +99 -168
  36. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +6 -0
  37. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +110 -0
  38. package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.d.ts → common/errors.d.ts} +13 -2
  39. package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.js → common/errors.js} +1 -2
  40. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +17 -0
  41. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +9 -0
  42. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +33 -8
  43. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +2 -3
  44. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +36 -5
  45. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +6 -3
  46. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
  47. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
  48. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
  49. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
  50. package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
  51. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +4 -1
  52. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +9 -0
  53. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +21 -0
  54. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +28 -0
  55. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +31 -0
  56. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +49 -0
  57. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +182 -0
  58. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +784 -0
  59. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +18 -0
  60. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +305 -0
  61. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
  62. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +120 -0
  63. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +100 -0
  64. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
  67. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  68. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
  69. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  71. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  72. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  73. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +106 -8
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  75. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +22 -36
  76. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  77. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  78. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +21 -13
  80. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  81. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +38 -18
  82. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  83. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
  84. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  85. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  86. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
  87. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +3 -2
  88. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +9 -9
  89. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +5 -5
  90. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +10 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +40 -11
  92. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +15 -9
  93. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  94. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +0 -1
  95. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +23 -17
  96. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  97. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +24 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +55 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +30 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +119 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +13 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +32 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +55 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +104 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +1 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +177 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +3 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +11 -11
  109. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +6 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +14 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +3 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +44 -5
  113. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +60 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +103 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
  116. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -62
  117. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +9 -7
  118. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +6 -5
  123. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +38 -28
  124. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  125. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  126. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +22 -31
  128. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -16
  130. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +3 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +8 -2
  132. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +112 -113
  133. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +62 -68
  134. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +3 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +149 -145
  136. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +3 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
  139. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +2 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -3
  142. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +8 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +13 -12
  144. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +8 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +15 -13
  146. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +1 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +78 -55
  148. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +140 -67
  149. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +11 -21
  150. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +3 -1
  151. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +59 -57
  152. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +440 -357
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  180. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  181. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.d.ts +21 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +115 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +5 -2
  186. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  187. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +6 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +28 -1
  190. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -1
  191. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +187 -106
  192. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +41 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  194. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  195. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +66 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +346 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +3 -2
  198. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -2
  199. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +72 -29
  200. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  201. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  202. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
  203. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
  204. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +5 -1
  205. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +144 -67
  206. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +126 -80
  208. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -0
  209. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +32 -31
  210. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +11 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +40 -33
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +5 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +25 -24
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  216. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  217. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  218. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  219. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  220. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  221. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +1 -19
  222. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +12 -22
  223. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +14 -6
  224. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +6 -3
  225. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +56 -18
  226. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
  227. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
  228. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +3 -3
  229. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +5 -6
  230. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
  231. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +33 -36
  232. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +31 -16
  234. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +4 -4
  235. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +16 -13
  236. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  237. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
  238. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  240. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  243. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  244. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  245. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  246. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  247. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  248. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -23
  249. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
  250. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +18 -0
  251. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +23 -1
  252. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
  253. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +5 -2
  254. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  255. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  256. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +22 -13
  257. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
  258. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  259. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  260. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  261. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +14 -3
  262. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +55 -24
  263. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  264. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +38 -0
  265. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +47 -0
  266. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +54 -12
  267. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +1 -0
  268. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  269. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +39 -0
  270. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +40 -4
  271. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +30 -8
  272. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +205 -46
  273. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +4 -3
  274. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +8 -3
  275. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +57 -0
  276. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +153 -38
  277. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +12 -7
  278. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +70 -37
  279. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +6 -28
  280. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  281. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  282. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  283. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  284. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +150 -150
  285. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  287. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  288. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  289. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  290. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  291. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  296. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -0
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +21 -1
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +55 -0
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +122 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +52 -0
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +232 -0
  313. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +65 -0
  314. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +225 -0
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +143 -0
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +37 -0
  318. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +205 -0
  319. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
  320. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
  321. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
  322. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
  323. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +52 -0
  324. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +260 -0
  325. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +44 -0
  326. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +98 -0
  327. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
  328. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
  329. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -7
  330. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
  331. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +226 -0
  332. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
  333. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
  334. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
  335. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
  336. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +54 -0
  337. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
  338. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
  339. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
  340. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +27 -0
  341. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +177 -0
  342. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
  343. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
  344. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  345. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  346. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  347. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  348. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  349. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  350. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  351. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
  352. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
  353. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +42 -0
  354. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +102 -0
  355. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
  356. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
  357. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
  358. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
  359. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
  360. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
  361. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +28 -0
  362. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +15 -0
  363. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +55 -0
  364. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  365. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +3 -0
  366. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +31 -9
  367. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  368. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
  369. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +177 -0
  370. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +518 -0
  371. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
  372. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
  373. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
  374. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
  375. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
  376. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +297 -0
  377. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2961 -0
  378. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +29 -0
  379. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +63 -0
  380. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +14 -14
  381. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  382. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  383. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  384. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
  385. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
  386. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
  387. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
  388. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
  389. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
  390. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +58 -0
  391. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +223 -0
  392. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +20 -0
  393. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +81 -0
  394. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +63 -0
  395. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +349 -0
  396. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +75 -0
  397. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +192 -0
  398. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +89 -0
  399. package/vscode/src/vs/workbench/services/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +226 -9
  400. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +0 -30
  401. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +0 -119
  402. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +0 -552
  403. package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +0 -83
@@ -0,0 +1,119 @@
1
+
2
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
+ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
4
+ import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
5
+ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
6
+ import { AgentHostOTelDbSpanExporterEnabledSettingId, AgentHostOTelOutfileSettingId, AgentHostOTelCaptureContentSettingId, AgentHostOTelOtlpEndpointSettingId, AgentHostOTelExporterTypeSettingId, AgentHostOTelEnabledSettingId, AgentHostCodexAgentBinaryArgsSettingId, AgentHostCodexAgentCodexHomeSettingId, AgentHostCodexAgentBinaryPathSettingId, AgentHostClaudeAgentSdkPathSettingId } from './agentService.js';
7
+
8
+ const configurationRegistry = ( Registry.as(Extensions.Configuration));
9
+ configurationRegistry.registerConfiguration({
10
+ id: "chatAgentHostStarter",
11
+ title: ( localize(1847, "Chat Agent Host Starter")),
12
+ type: "object",
13
+ properties: {
14
+ [AgentHostClaudeAgentSdkPathSettingId]: {
15
+ type: "string",
16
+ description: ( localize(
17
+ 1848,
18
+ "Experimental, for local testing only. Absolute path to a locally-installed `@anthropic-ai/claude-agent-sdk` package. When set, the Claude agent provider is registered inside the agent host and the SDK is loaded from this path. Requires `#chat.agentHost.enabled#`. The agent host process must be restarted for changes to take effect. This setting will be removed once the SDK is delivered through the Extension Marketplace."
19
+ )),
20
+ default: "",
21
+ tags: ["experimental", "advanced"],
22
+ included: product.quality !== "stable"
23
+ },
24
+ [AgentHostCodexAgentBinaryPathSettingId]: {
25
+ type: "string",
26
+ description: ( localize(
27
+ 1849,
28
+ "Experimental, for local testing only. Absolute path to a locally-installed `codex` binary. When set, the Codex agent provider is registered inside the agent host and `codex app-server` is spawned from this path. Requires `#chat.agentHost.enabled#`. The agent host process must be restarted for changes to take effect."
29
+ )),
30
+ default: "",
31
+ tags: ["experimental", "advanced"],
32
+ included: product.quality !== "stable"
33
+ },
34
+ [AgentHostCodexAgentCodexHomeSettingId]: {
35
+ type: "string",
36
+ description: ( localize(
37
+ 1850,
38
+ "Optional override for `$CODEX_HOME`. Controls where the codex binary reads config and writes rollouts. When empty, codex uses its default (`~/.codex`)."
39
+ )),
40
+ default: "",
41
+ tags: ["experimental", "advanced"],
42
+ included: product.quality !== "stable"
43
+ },
44
+ [AgentHostCodexAgentBinaryArgsSettingId]: {
45
+ type: "array",
46
+ items: {
47
+ type: "string"
48
+ },
49
+ description: ( localize(
50
+ 1851,
51
+ "Additional command-line arguments passed to `codex app-server`. Primarily useful for debugging (for example, `--log-level=debug`)."
52
+ )),
53
+ default: [],
54
+ tags: ["experimental", "advanced"],
55
+ included: product.quality !== "stable"
56
+ },
57
+ [AgentHostOTelEnabledSettingId]: {
58
+ type: "boolean",
59
+ markdownDescription: ( localize(
60
+ 1852,
61
+ "When enabled, the agent host emits OpenTelemetry traces from the Copilot SDK. Requires `#chat.agentHost.enabled#`. Either configure `#chat.agentHost.otel.otlpEndpoint#` to ship traces to an external collector or enable `#chat.agentHost.otel.dbSpanExporter.enabled#` to capture them locally."
62
+ )),
63
+ default: false,
64
+ restricted: true,
65
+ tags: ["experimental", "advanced"]
66
+ },
67
+ [AgentHostOTelExporterTypeSettingId]: {
68
+ type: "string",
69
+ enum: ["otlp-http", "otlp-grpc", "console", "file"],
70
+ markdownDescription: ( localize(
71
+ 1853,
72
+ "Exporter backend used by the Copilot SDK when `#chat.agentHost.otel.enabled#` is on. `otlp-grpc` is downgraded to `otlp-http` transparently in the CLI runtime."
73
+ )),
74
+ default: "otlp-http",
75
+ restricted: true,
76
+ tags: ["experimental", "advanced"]
77
+ },
78
+ [AgentHostOTelOtlpEndpointSettingId]: {
79
+ type: "string",
80
+ markdownDescription: ( localize(
81
+ 1854,
82
+ "OTLP endpoint URL when exporter type is `otlp-http` or `otlp-grpc`. Sets `OTEL_EXPORTER_OTLP_ENDPOINT` inside the agent host process."
83
+ )),
84
+ default: "",
85
+ restricted: true,
86
+ tags: ["experimental", "advanced"]
87
+ },
88
+ [AgentHostOTelCaptureContentSettingId]: {
89
+ type: "boolean",
90
+ markdownDescription: ( localize(
91
+ 1855,
92
+ "When enabled, includes prompt and response content in OTel span attributes. Sets `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT`. Privacy-sensitive: do not enable in environments that ship spans to shared sinks."
93
+ )),
94
+ default: false,
95
+ restricted: true,
96
+ tags: ["experimental", "advanced"]
97
+ },
98
+ [AgentHostOTelOutfileSettingId]: {
99
+ type: "string",
100
+ markdownDescription: ( localize(
101
+ 1856,
102
+ "Output path for span JSON lines when exporter type is `file`. Sets `COPILOT_OTEL_FILE_EXPORTER_PATH`."
103
+ )),
104
+ default: "",
105
+ restricted: true,
106
+ tags: ["experimental", "advanced"]
107
+ },
108
+ [AgentHostOTelDbSpanExporterEnabledSettingId]: {
109
+ type: "boolean",
110
+ markdownDescription: ( localize(
111
+ 1857,
112
+ "When enabled, the agent host persists every emitted OTel span to a local SQLite database. Spans can be inspected via the `Export Agent Host Traces Database` command. Compatible with external exporters: spans are written to SQLite *and* forwarded to the user-configured sink."
113
+ )),
114
+ default: false,
115
+ restricted: true,
116
+ tags: ["experimental", "advanced"]
117
+ }
118
+ }
119
+ });
@@ -2,13 +2,16 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
2
2
  import { IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import type { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
4
4
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
5
6
  import type { ISyncedCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentPluginManager";
6
- import type { IAgentSubscription } from "./state/agentSubscription.js";
7
+ import type { IActiveSubscriptionInfo, IAgentSubscription } from "./state/agentSubscription.js";
8
+ import type { IRemoteWatchHandle } from "./agentHostFileSystemProvider.js";
7
9
  import type { CompletionsParams, CompletionsResult, CreateTerminalParams, ResolveSessionConfigResult, SessionConfigCompletionsResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
8
- import { ProtectedResourceMetadata, type ConfigSchema, type FileEdit, type MessageAttachment, type ModelSelection, type SessionActiveClient, type ToolCallPendingConfirmationState, type ToolDefinition } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
10
+ import type { InvokeChangesetOperationParams, InvokeChangesetOperationResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands";
11
+ import { ProtectedResourceMetadata, type ChangesetSummary, type ConfigSchema, type MessageAttachment, type ModelSelection, type AgentSelection, type SessionActiveClient, type ToolCallPendingConfirmationState, type ToolDefinition } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
9
12
  import type { ActionEnvelope, INotification, IRootConfigChangedAction, SessionAction, TerminalAction } from "./state/sessionActions.js";
10
- import type { ResourceCopyParams, ResourceCopyResult, ResourceDeleteParams, ResourceDeleteResult, ResourceListResult, ResourceMoveParams, ResourceMoveResult, ResourceReadResult, ResourceWriteParams, ResourceWriteResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol";
11
- import { ComponentToState, SessionInputResponseKind, SessionStatus, StateComponents, type CustomizationRef, type PendingMessage, type RootState, type SessionCustomization, type SessionInputAnswer, type SessionMeta, type ToolCallResult, type Turn, type PolicyState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
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, SessionInputResponseKind, SessionStatus, StateComponents, type ClientPluginCustomization, type Customization, type PendingMessage, type RootState, type SessionInputAnswer, type SessionMeta, type ToolCallResult, type Turn, type PolicyState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
12
15
  export declare enum AgentHostIpcChannels {
13
16
  /** Channel for the agent host service on the main-process side */
14
17
  AgentHost = "agentHost",
@@ -25,8 +28,8 @@ export declare enum AgentHostIpcChannels {
25
28
  }
26
29
  /** Configuration key that controls whether the local agent host process is spawned. */
27
30
  export declare const AgentHostEnabledSettingId = "chat.agentHost.enabled";
28
- /** Configuration key that controls whether per-host IPC traffic output channels are created. */
29
- export declare const AgentHostIpcLoggingSettingId = "chat.agentHost.ipcLoggingEnabled";
31
+ /** Whether the local/process-backed agent host is enabled in this runtime. */
32
+ export declare function isAgentHostEnabled(configurationService: IConfigurationService): boolean;
30
33
  /** Configuration key that controls whether AHP JSONL logs are written for agent host transports. */
31
34
  export declare const AgentHostAhpJsonlLoggingSettingId = "chat.agentHost.ahpJsonlLoggingEnabled";
32
35
  /** Configuration key that controls whether Agent Host uses its terminal tool override for Copilot SDK sessions. */
@@ -51,6 +54,32 @@ export declare const AgentHostClaudeAgentSdkPathSettingId = "chat.agentHost.clau
51
54
  * by developers as an override.
52
55
  */
53
56
  export declare const AgentHostClaudeSdkPathEnvVar = "VSCODE_AGENT_HOST_CLAUDE_SDK_PATH";
57
+ /**
58
+ * Absolute path to a locally-installed `codex` binary. When non-empty, the
59
+ * Codex agent provider is registered inside the agent host. Empty (the
60
+ * default) disables the provider entirely.
61
+ */
62
+ export declare const AgentHostCodexAgentBinaryPathSettingId = "chat.agentHost.codexAgent.path";
63
+ /**
64
+ * Optional override for `$CODEX_HOME`. When set, the codex app-server child
65
+ * process inherits this value, controlling where rollouts and config live.
66
+ */
67
+ export declare const AgentHostCodexAgentCodexHomeSettingId = "chat.agentHost.codexAgent.codexHome";
68
+ /**
69
+ * Additional command-line arguments passed to `codex app-server`. Mainly for
70
+ * debugging (e.g. `--log-level=debug`).
71
+ */
72
+ export declare const AgentHostCodexAgentBinaryArgsSettingId = "chat.agentHost.codexAgent.binaryArgs";
73
+ /**
74
+ * Environment variable the agent host process reads to locate the codex
75
+ * binary. Forwarded by the starters from
76
+ * {@link AgentHostCodexAgentBinaryPathSettingId}.
77
+ */
78
+ export declare const AgentHostCodexAgentBinaryPathEnvVar = "VSCODE_AGENT_HOST_CODEX_APP_SERVER_PATH";
79
+ /** Forwarded `$CODEX_HOME`. */
80
+ export declare const AgentHostCodexAgentCodexHomeEnvVar = "CODEX_HOME";
81
+ /** Forwarded extra args for `codex app-server` (JSON-encoded string[]). */
82
+ export declare const AgentHostCodexAgentBinaryArgsEnvVar = "VSCODE_AGENT_HOST_CODEX_APP_SERVER_ARGS";
54
83
  /** Master toggle for agent-host OTel. Explicit opt-in; other settings imply this when set. */
55
84
  export declare const AgentHostOTelEnabledSettingId = "chat.agentHost.otel.enabled";
56
85
  /** Exporter type for the SDK's OTel pipeline. One of: `otlp-http`, `otlp-grpc`, `console`, `file`. */
@@ -154,11 +183,25 @@ export interface IAgentSessionMetadata {
154
183
  /** Human-readable description of what the session is currently doing. */
155
184
  readonly activity?: string;
156
185
  readonly model?: ModelSelection;
186
+ /**
187
+ * Selected custom agent for this session. Absent (`undefined`) means no
188
+ * custom agent is selected — the session uses the provider's default
189
+ * behavior.
190
+ */
191
+ readonly agent?: AgentSelection;
157
192
  readonly workingDirectory?: URI;
158
193
  readonly customizationDirectory?: URI;
159
194
  readonly isRead?: boolean;
160
195
  readonly isArchived?: boolean;
161
- readonly diffs?: readonly FileEdit[];
196
+ /**
197
+ * Catalogue of changesets the agent can produce for this session — the
198
+ * {@link ChangesetSummary | catalogue} that travels on
199
+ * `SessionSummary.changesets`. Lightweight summary entries (id / label /
200
+ * URI template / aggregate counts) without per-file detail; clients
201
+ * subscribe to a specific expanded changeset URI when they need the full
202
+ * file list.
203
+ */
204
+ readonly changesets?: readonly ChangesetSummary[];
162
205
  /**
163
206
  * Side-channel metadata mirroring {@link SessionState._meta}, propagated
164
207
  * to clients via per-session state subscriptions.
@@ -215,9 +258,21 @@ export interface AuthenticateParams {
215
258
  * {@link IAuthorizationProtectedResourceMetadata} that this token targets.
216
259
  */
217
260
  readonly resource: string;
261
+ /**
262
+ * Scopes that were used to acquire the token. Omitted for legacy clients
263
+ * that can only identify tokens by protected resource.
264
+ */
265
+ readonly scopes?: readonly string[];
218
266
  /** The bearer token value (RFC 6750). */
219
267
  readonly token: string;
220
268
  }
269
+ /** Request for a previously accepted bearer token. */
270
+ export interface IAgentHostAuthTokenRequest {
271
+ /** Protected resource identifier from {@link ProtectedResourceMetadata.resource}. */
272
+ readonly resource: string;
273
+ /** Required token scopes, when the caller needs a scope-specific token. */
274
+ readonly scopes?: readonly string[];
275
+ }
221
276
  /**
222
277
  * Result of the `authenticate` command.
223
278
  */
@@ -234,9 +289,27 @@ export interface AuthenticateResult {
234
289
  * token down separate code paths.
235
290
  */
236
291
  export declare const GITHUB_COPILOT_PROTECTED_RESOURCE: ProtectedResourceMetadata;
292
+ /**
293
+ * Canonical {@link ProtectedResourceMetadata} for GitHub repository write
294
+ * operations (e.g. creating a pull request). Distinct from
295
+ * {@link GITHUB_COPILOT_PROTECTED_RESOURCE} so that the broader `repo`
296
+ * scope is only requested when a session actually needs it (e.g. when a
297
+ * changeset operation handler throws `AHP_AUTH_REQUIRED` with this
298
+ * resource), rather than at session create for every agent.
299
+ *
300
+ * `required: false` reflects that the resource is only needed on demand —
301
+ * agents do not have to advertise it eagerly. The workbench-side auth
302
+ * contributor resolves it lazily in response to operation invocations.
303
+ */
304
+ export declare const GITHUB_REPO_PROTECTED_RESOURCE: ProtectedResourceMetadata;
237
305
  export interface IAgentCreateSessionConfig {
238
306
  readonly provider?: AgentProvider;
239
307
  readonly model?: ModelSelection;
308
+ /**
309
+ * Initial custom agent selection for the new session. Omit to start with
310
+ * no custom agent selected (provider default behavior).
311
+ */
312
+ readonly agent?: AgentSelection;
240
313
  readonly session?: URI;
241
314
  readonly workingDirectory?: URI;
242
315
  readonly config?: Record<string, unknown>;
@@ -330,7 +403,7 @@ export interface IAgentToolPendingConfirmationSignal {
330
403
  /** Protocol-shaped pending-confirmation state, dispatched verbatim into `SessionToolCallReady`. */
331
404
  readonly state: ToolCallPendingConfirmationState;
332
405
  /** Host-only auto-approval kind (not part of the dispatched action). */
333
- readonly permissionKind?: "shell" | "write" | "mcp" | "read" | "url" | "custom-tool" | "hook" | "memory";
406
+ readonly permissionKind?: "shell" | "write" | "mcp" | "read" | "url" | "custom-tool" | "hook" | "memory" | "extension-management" | "extension-permission-access";
334
407
  /** Host-only auto-approval path target (not part of the dispatched action). */
335
408
  readonly permissionPath?: string;
336
409
  /**
@@ -442,6 +515,13 @@ export interface IAgent {
442
515
  abortSession(session: URI): Promise<void>;
443
516
  /** Change the model for an existing session. */
444
517
  changeModel(session: URI, model: ModelSelection): Promise<void>;
518
+ /**
519
+ * Change (or clear) the selected custom agent for an existing session.
520
+ * Passing `undefined` clears the selection and resets the session to no
521
+ * selected custom agent (provider default behavior). Optional so non-
522
+ * Copilot agents can opt out.
523
+ */
524
+ changeAgent?(session: URI, agent: AgentSelection | undefined): Promise<void>;
445
525
  /** Respond to a pending permission request from the SDK. */
446
526
  respondToPermissionRequest(requestId: string, approved: boolean): void;
447
527
  /** Respond to a pending user input request from the SDK's ask_user tool. */
@@ -463,16 +543,18 @@ export interface IAgent {
463
543
  */
464
544
  readonly onDidCustomizationsChange?: Event<void>;
465
545
  /**
466
- * Returns the host-owned customization refs this agent currently exposes.
546
+ * Returns the host-owned customizations this agent currently exposes.
467
547
  *
468
548
  * Used to publish baseline customization metadata on {@link AgentInfo}.
549
+ * Always container customizations ({@link PluginCustomization} or
550
+ * {@link DirectoryCustomization}).
469
551
  */
470
- getCustomizations?(): readonly CustomizationRef[];
552
+ getCustomizations?(): readonly Customization[];
471
553
  /**
472
554
  * Returns the effective customization list for a session, including
473
555
  * source, enablement, and loading/error status.
474
556
  */
475
- getSessionCustomizations?(session: URI): Promise<readonly SessionCustomization[]>;
557
+ getSessionCustomizations?(session: URI): Promise<readonly Customization[]>;
476
558
  /**
477
559
  * Authenticate for a specific resource. Returns true if accepted.
478
560
  * The `resource` matches {@link IAuthorizationProtectedResourceMetadata.resource}.
@@ -492,13 +574,13 @@ export interface IAgent {
492
574
  */
493
575
  onArchivedChanged?(session: URI, isArchived: boolean): Promise<void>;
494
576
  /**
495
- * Receives client-provided customization refs and syncs them (e.g. copies
496
- * plugin files to local storage). Returns per-customization status with
497
- * local plugin directories.
577
+ * Receives client-provided customization refs for a session and syncs them
578
+ * (e.g. copies plugin files to local storage). The agent publishes
579
+ * customization state actions as the sync progresses.
498
580
  *
499
581
  * The agent MAY defer a client restart until all active sessions are idle.
500
582
  */
501
- setClientCustomizations(clientId: string, customizations: CustomizationRef[], progress?: (results: ISyncedCustomization[]) => void): Promise<ISyncedCustomization[]>;
583
+ setClientCustomizations(session: URI, clientId: string, customizations: ClientPluginCustomization[]): Promise<ISyncedCustomization[]>;
502
584
  /**
503
585
  * Receives client-provided tool definitions to make available in a
504
586
  * specific session. The agent registers these as custom tools so the
@@ -524,8 +606,10 @@ export interface IAgent {
524
606
  /**
525
607
  * Notifies the agent that a customization has been toggled on or off.
526
608
  * The agent MAY restart its client before the next message is sent.
609
+ *
610
+ * @param id The opaque session-unique customization id.
527
611
  */
528
- setCustomizationEnabled(uri: string, enabled: boolean): void;
612
+ setCustomizationEnabled(id: string, enabled: boolean): void;
529
613
  /** Gracefully shut down all sessions. */
530
614
  shutdown(): Promise<void>;
531
615
  /** Dispose this provider and all its resources. */
@@ -539,12 +623,31 @@ export interface IAgent {
539
623
  * management and optimistic write-ahead on top.
540
624
  */
541
625
  export interface IAgentConnection {
542
- readonly _serviceBrand: undefined;
543
626
  readonly clientId: string;
544
627
  readonly rootState: IAgentSubscription<RootState>;
545
- getSubscription<T extends StateComponents>(kind: T, resource: URI): IReference<IAgentSubscription<ComponentToState[T]>>;
628
+ /**
629
+ * Acquire a refcounted subscription to `resource`. `owner` names the
630
+ * caller holding the reference so inspection surfaces can attribute who
631
+ * is retaining a subscription; use a stable identifier such as the
632
+ * acquiring class name.
633
+ */
634
+ getSubscription<T extends StateComponents>(kind: T, resource: URI, owner: string): IReference<IAgentSubscription<ComponentToState[T]>>;
546
635
  getSubscriptionUnmanaged<T extends StateComponents>(kind: T, resource: URI): IAgentSubscription<ComponentToState[T]> | undefined;
547
- dispatch(action: SessionAction | TerminalAction | IRootConfigChangedAction): void;
636
+ /**
637
+ * Read-only descriptors of every active resource subscription on this
638
+ * connection, for inspection/debug surfaces. Excludes the always-live
639
+ * {@link rootState}.
640
+ */
641
+ getActiveSubscriptions(): readonly IActiveSubscriptionInfo[];
642
+ /**
643
+ * Dispatch a client-originated action. `channel` is the protocol URI
644
+ * string identifying the channel the action targets (a session URI for
645
+ * session actions, terminal URI for terminal actions, or
646
+ * `ROOT_STATE_URI` for root-config actions). Strings are used rather
647
+ * than {@link URI} objects so authority-less scheme URIs like
648
+ * `ahp-root://` survive the wire format without normalization.
649
+ */
650
+ dispatch(channel: string, action: SessionAction | TerminalAction | IRootConfigChangedAction): void;
548
651
  readonly onDidNotification: Event<INotification>;
549
652
  readonly onDidAction: Event<ActionEnvelope>;
550
653
  authenticate(params: AuthenticateParams): Promise<AuthenticateResult>;
@@ -562,10 +665,23 @@ export interface IAgentConnection {
562
665
  disposeSession(session: URI): Promise<void>;
563
666
  createTerminal(params: CreateTerminalParams): Promise<void>;
564
667
  disposeTerminal(terminal: URI): Promise<void>;
668
+ invokeChangesetOperation(params: InvokeChangesetOperationParams): Promise<InvokeChangesetOperationResult>;
565
669
  resourceList(uri: URI): Promise<ResourceListResult>;
566
670
  resourceRead(uri: URI): Promise<ResourceReadResult>;
567
671
  resourceWrite(params: ResourceWriteParams): Promise<ResourceWriteResult>;
568
672
  resourceCopy(params: ResourceCopyParams): Promise<ResourceCopyResult>;
569
673
  resourceDelete(params: ResourceDeleteParams): Promise<ResourceDeleteResult>;
570
674
  resourceMove(params: ResourceMoveParams): Promise<ResourceMoveResult>;
675
+ resourceResolve(params: ResourceResolveParams): Promise<ResourceResolveResult>;
676
+ resourceMkdir(params: ResourceMkdirParams): Promise<ResourceMkdirResult>;
677
+ createResourceWatch(params: CreateResourceWatchParams): Promise<CreateResourceWatchResult>;
678
+ /**
679
+ * Convenience method that bundles
680
+ * {@link createResourceWatch} + {@link subscribe} + a typed
681
+ * {@link IFileChange}[] event stream, so consumers (notably
682
+ * `AHPFileSystemProvider.watch`) can drive a watcher without
683
+ * understanding the underlying channel protocol. Disposing the
684
+ * returned handle unsubscribes.
685
+ */
686
+ watchResource(params: CreateResourceWatchParams): Promise<IRemoteWatchHandle>;
571
687
  }
@@ -1,4 +1,5 @@
1
1
 
2
+ import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
2
3
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
3
4
 
4
5
  var AgentHostIpcChannels;
@@ -9,10 +10,15 @@ var AgentHostIpcChannels;
9
10
  AgentHostIpcChannels["RemoteProxy"] = "agentHostProxy";
10
11
  })(AgentHostIpcChannels || (AgentHostIpcChannels = {}));
11
12
  const AgentHostEnabledSettingId = "chat.agentHost.enabled";
12
- const AgentHostIpcLoggingSettingId = "chat.agentHost.ipcLoggingEnabled";
13
+ function isAgentHostEnabled(configurationService) {
14
+ return !isWeb && !!configurationService.getValue(AgentHostEnabledSettingId);
15
+ }
13
16
  const AgentHostAhpJsonlLoggingSettingId = "chat.agentHost.ahpJsonlLoggingEnabled";
14
17
  const AgentHostCustomTerminalToolEnabledSettingId = "chat.agentHost.customTerminalTool.enabled";
15
18
  const AgentHostClaudeAgentSdkPathSettingId = "chat.agentHost.claudeAgent.path";
19
+ const AgentHostCodexAgentBinaryPathSettingId = "chat.agentHost.codexAgent.path";
20
+ const AgentHostCodexAgentCodexHomeSettingId = "chat.agentHost.codexAgent.codexHome";
21
+ const AgentHostCodexAgentBinaryArgsSettingId = "chat.agentHost.codexAgent.binaryArgs";
16
22
  const AgentHostOTelEnabledSettingId = "chat.agentHost.otel.enabled";
17
23
  const AgentHostOTelExporterTypeSettingId = "chat.agentHost.otel.exporterType";
18
24
  const AgentHostOTelOtlpEndpointSettingId = "chat.agentHost.otel.otlpEndpoint";
@@ -40,4 +46,4 @@ var AgentSession;
40
46
  AgentSession.provider = provider;
41
47
  })(AgentSession || (AgentSession = {}));
42
48
 
43
- export { AgentHostAhpJsonlLoggingSettingId, AgentHostClaudeAgentSdkPathSettingId, AgentHostCustomTerminalToolEnabledSettingId, AgentHostEnabledSettingId, AgentHostIpcChannels, AgentHostIpcLoggingSettingId, AgentHostOTelCaptureContentSettingId, AgentHostOTelDbSpanExporterEnabledSettingId, AgentHostOTelEnabledSettingId, AgentHostOTelExporterTypeSettingId, AgentHostOTelOtlpEndpointSettingId, AgentHostOTelOutfileSettingId, AgentSession };
49
+ export { AgentHostAhpJsonlLoggingSettingId, AgentHostClaudeAgentSdkPathSettingId, AgentHostCodexAgentBinaryArgsSettingId, AgentHostCodexAgentBinaryPathSettingId, AgentHostCodexAgentCodexHomeSettingId, AgentHostCustomTerminalToolEnabledSettingId, AgentHostEnabledSettingId, AgentHostIpcChannels, AgentHostOTelCaptureContentSettingId, AgentHostOTelDbSpanExporterEnabledSettingId, AgentHostOTelEnabledSettingId, AgentHostOTelExporterTypeSettingId, AgentHostOTelOtlpEndpointSettingId, AgentHostOTelOutfileSettingId, AgentSession, isAgentHostEnabled };
@@ -22,14 +22,18 @@ export declare class AhpJsonlLogger extends Disposable {
22
22
  private _currentSize;
23
23
  private _segment;
24
24
  private _queue;
25
+ private _pending;
26
+ private _drainScheduled;
25
27
  private _folderCreated;
26
28
  constructor(_options: IAhpJsonlLoggerOptions, _fileService: IFileService, _logService: ILogService);
27
29
  get resource(): URI;
28
30
  log(message: object, dir: AhpLogDirection, byteLength?: number): void;
29
31
  flush(): Promise<void>;
30
- private _appendLine;
32
+ private _scheduleDrain;
33
+ private _drainPending;
31
34
  private _rotate;
32
35
  private _resourceForSegment;
33
36
  private _getFileSize;
34
37
  }
35
38
  export declare function getAhpLogByteLength(text: string): number;
39
+ export declare function stringifyAhpLogEntry(value: unknown): string;
@@ -2,13 +2,18 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
4
4
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
5
6
  import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
7
+ import { isUriComponents, URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
6
8
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
7
9
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
8
10
 
9
11
  const AHP_LOG_DIR = "ahp";
10
12
  const DEFAULT_MAX_FILE_SIZE_BYTES = 75 * 1024 * 1024;
11
13
  const DEFAULT_MAX_FILES = 5;
14
+ const MAX_BATCH_BYTES = 1024 * 1024;
15
+ const MAX_LOG_LINE_LENGTH = 1024 * 1024;
16
+ const MAX_LOGGED_STRING_LENGTH = 16 * 1024;
12
17
  let AhpJsonlLogger = class AhpJsonlLogger extends Disposable {
13
18
  constructor(_options, _fileService, _logService) {
14
19
  super();
@@ -18,6 +23,8 @@ let AhpJsonlLogger = class AhpJsonlLogger extends Disposable {
18
23
  this._currentSize = 0;
19
24
  this._segment = 0;
20
25
  this._queue = Promise.resolve();
26
+ this._pending = [];
27
+ this._drainScheduled = false;
21
28
  this._directory = joinPath(this._options.logsHome, AHP_LOG_DIR);
22
29
  const safeConnectionId = sanitizeFilePart(this._options.connectionId).slice(0, 64);
23
30
  this._baseName = `ahp-${toFileTimestamp(( new Date()))}-${safeConnectionId}.jsonl`;
@@ -29,28 +36,47 @@ let AhpJsonlLogger = class AhpJsonlLogger extends Disposable {
29
36
  return this._currentFile;
30
37
  }
31
38
  log(message, dir, byteLength) {
39
+ const meta = {
40
+ ts: ( new Date()).toISOString(),
41
+ dir,
42
+ connectionId: this._options.connectionId,
43
+ transport: this._options.transport,
44
+ ...(typeof byteLength === "number" ? {
45
+ byteLength
46
+ } : {})
47
+ };
32
48
  const entry = {
33
49
  ...message,
34
- _ahpLog: {
35
- ts: ( new Date()).toISOString(),
36
- dir,
37
- connectionId: this._options.connectionId,
38
- transport: this._options.transport,
39
- ...(typeof byteLength === "number" ? {
40
- byteLength
41
- } : {})
42
- }
50
+ _ahpLog: meta
43
51
  };
44
- const line = `${JSON.stringify(entry)}\n`;
45
- const buffer = VSBuffer.fromString(line);
46
- this._queue = this._queue.then(() => this._appendLine(buffer)).catch(error => {
47
- this._logService.error("[AHPLog] Failed to write transport log", error);
48
- });
52
+ let body = stringifyAhpLogEntry(entry);
53
+ if (body.length > MAX_LOG_LINE_LENGTH) {
54
+ meta.truncated = true;
55
+ body = stringifyAhpLogEntryTruncated(entry, MAX_LOGGED_STRING_LENGTH);
56
+ }
57
+ const line = `${body}\n`;
58
+ this._pending.push(VSBuffer.fromString(line));
59
+ this._scheduleDrain();
49
60
  }
50
61
  async flush() {
51
62
  await this._queue;
52
63
  }
53
- async _appendLine(buffer) {
64
+ _scheduleDrain() {
65
+ if (this._drainScheduled) {
66
+ return;
67
+ }
68
+ this._drainScheduled = true;
69
+ this._queue = this._queue.then(() => this._drainPending()).catch(error => {
70
+ this._logService.error("[AHPLog] Failed to write transport log", error);
71
+ });
72
+ }
73
+ async _drainPending() {
74
+ this._drainScheduled = false;
75
+ if (this._pending.length === 0) {
76
+ return;
77
+ }
78
+ const buffers = this._pending;
79
+ this._pending = [];
54
80
  if (!this._folderCreated) {
55
81
  this._folderCreated = this._fileService.createFolder(this._directory);
56
82
  }
@@ -58,13 +84,32 @@ let AhpJsonlLogger = class AhpJsonlLogger extends Disposable {
58
84
  if (this._currentSize === 0) {
59
85
  this._currentSize = await this._getFileSize(this._currentFile);
60
86
  }
61
- if (this._currentSize > 0 && this._currentSize + buffer.byteLength > this._maxFileSizeBytes) {
62
- await this._rotate();
87
+ let chunk = [];
88
+ let chunkSize = 0;
89
+ const flushChunk = async () => {
90
+ if (chunk.length === 0) {
91
+ return;
92
+ }
93
+ const combined = chunk.length === 1 ? chunk[0] : VSBuffer.concat(chunk, chunkSize);
94
+ await this._fileService.writeFile(this._currentFile, combined, {
95
+ append: true
96
+ });
97
+ this._currentSize += combined.byteLength;
98
+ chunk = [];
99
+ chunkSize = 0;
100
+ };
101
+ for (const buffer of buffers) {
102
+ const totalInFile = this._currentSize + chunkSize;
103
+ if (totalInFile > 0 && totalInFile + buffer.byteLength > this._maxFileSizeBytes) {
104
+ await flushChunk();
105
+ await this._rotate();
106
+ } else if (chunkSize > 0 && chunkSize + buffer.byteLength > MAX_BATCH_BYTES) {
107
+ await flushChunk();
108
+ }
109
+ chunk.push(buffer);
110
+ chunkSize += buffer.byteLength;
63
111
  }
64
- await this._fileService.writeFile(this._currentFile, buffer, {
65
- append: true
66
- });
67
- this._currentSize += buffer.byteLength;
112
+ await flushChunk();
68
113
  }
69
114
  async _rotate() {
70
115
  this._segment++;
@@ -96,6 +141,24 @@ AhpJsonlLogger = ( __decorate([( __param(1, IFileService)), ( __param(2, ILogSer
96
141
  function getAhpLogByteLength(text) {
97
142
  return VSBuffer.fromString(text).byteLength;
98
143
  }
144
+ function stringifyAhpLogEntry(value) {
145
+ return JSON.stringify(value, _ahpReplacer);
146
+ }
147
+ function stringifyAhpLogEntryTruncated(value, maxStringLength) {
148
+ return JSON.stringify(value, function(key, val) {
149
+ const revived = _ahpReplacer.call(this, key, val);
150
+ if (typeof revived === "string" && revived.length > maxStringLength) {
151
+ return `${revived.slice(0, maxStringLength)}…[${revived.length - maxStringLength} more chars elided]`;
152
+ }
153
+ return revived;
154
+ });
155
+ }
156
+ function _ahpReplacer(_key, value) {
157
+ if (value && typeof value === "object" && value.$mid === MarshalledId.Uri && isUriComponents(value)) {
158
+ return ( URI.revive(value).toString());
159
+ }
160
+ return value;
161
+ }
99
162
  function toFileTimestamp(date) {
100
163
  return date.toISOString().replace(/[:.]/g, "-");
101
164
  }
@@ -103,4 +166,4 @@ function sanitizeFilePart(value) {
103
166
  return value.replace(/[\\/:\*\?"<>\|\s]+/g, "-").replace(/^-+|-+$/g, "") || "connection";
104
167
  }
105
168
 
106
- export { AhpJsonlLogger, getAhpLogByteLength };
169
+ export { AhpJsonlLogger, getAhpLogByteLength, stringifyAhpLogEntry };
@@ -0,0 +1,36 @@
1
+ import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
+ import { type AgentCustomization, type Customization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
3
+ /**
4
+ * Computes the effective set of selectable custom agents for a session.
5
+ *
6
+ * Custom agents live as {@link CustomizationType.Agent | `Agent`} entries
7
+ * in each container customization's {@link Customization.children | `children`}
8
+ * array. Only the agent host populates `children` (after parsing the
9
+ * container). Disabled containers are skipped; containers with an absent
10
+ * `children` field are treated as "unknown" (e.g. the host has not finished
11
+ * parsing yet) and skipped, while an empty array means "no children
12
+ * contributed" and is respected.
13
+ *
14
+ * The picker is keyed on the agent's stable {@link AgentCustomization.uri};
15
+ * duplicates within the session's customization list are coalesced.
16
+ */
17
+ export declare function getEffectiveAgents(sessionCustomizations: readonly Customization[] | undefined): readonly AgentCustomization[];
18
+ /**
19
+ * Storage key used by the custom-agent pickers to remember the user's last
20
+ * selection per session-resource scheme. Shared between the Agents Window
21
+ * picker and the workbench chat-editor picker so the two surfaces agree on
22
+ * the default for new (untitled) sessions.
23
+ */
24
+ export declare function agentHostAgentPickerStorageKey(resourceScheme: string): string;
25
+ /**
26
+ * Resolves the agent that should be shown for a session:
27
+ * - If the session has a current selection and it exists in the effective list, use it.
28
+ * - Else if a stored agent URI matches an entry in the list, use that entry.
29
+ * - Else `undefined` (the default "Agent" placeholder row).
30
+ *
31
+ * `sessionAgentUri` accepts either a platform {@link URI} instance or a raw
32
+ * URI string. The agent-host protocol
33
+ * {@link import('./state/protocol/state.js').AgentSelection} URI field and the
34
+ * sessions-layer `ISessionAgentRef` both provide URI strings.
35
+ */
36
+ export declare function resolveAgentHostAgent(agents: readonly AgentCustomization[], sessionAgentUri: URI | string | undefined, storedAgentUri: string | undefined): AgentCustomization | undefined;