@codingame/monaco-vscode-chat-service-override 29.1.0 → 30.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 (258) hide show
  1. package/index.js +5 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +37 -39
  4. package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
  5. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +11 -1
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +4 -4
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +132 -42
  8. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +54 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +15 -0
  10. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +5 -1
  11. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +188 -51
  12. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +7 -6
  13. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +1 -1
  14. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +7 -2
  15. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +6 -0
  16. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +14 -0
  17. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
  18. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +37 -16
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +10 -8
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +37 -3
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +6 -6
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +20 -11
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +14 -14
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +18 -13
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +10 -10
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +36 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +482 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +10 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +43 -10
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -76
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +27 -35
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -8
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +86 -80
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +3 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +38 -4
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +38 -18
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +427 -167
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +37 -37
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +15 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +108 -37
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +8 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +28 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +11 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +3 -20
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +4 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +65 -68
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +64 -51
  80. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +288 -195
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +21 -21
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +21 -21
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +1 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +3 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +5 -2
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -2
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +19 -7
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +3 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +54 -12
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +14 -14
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +50 -50
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +3 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +86 -17
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +65 -65
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +24 -16
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +17 -17
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -6
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  137. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  138. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  139. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  140. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +3 -6
  143. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +54 -39
  144. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
  145. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +24 -3
  146. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +72 -14
  147. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  148. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
  149. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  151. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +181 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  154. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  155. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  156. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  157. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +8 -6
  158. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +37 -37
  159. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +28 -23
  160. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
  161. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
  162. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +62 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +1 -10
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +148 -88
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +16 -9
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +8 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +158 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +8 -3
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +155 -76
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +1 -2
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -4
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +5 -1
  183. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -6
  184. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +31 -1
  185. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +228 -1
  186. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +66 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +190 -0
  188. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +25 -3
  189. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +130 -107
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +1 -0
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +19 -18
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +2 -18
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +169 -266
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +12 -10
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +149 -206
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -3
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -22
  201. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +20 -8
  202. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +183 -43
  203. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -3
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
  210. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  216. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -2
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +3 -1
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -2
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +3 -2
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +1 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +1 -3
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +26 -23
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +4 -9
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -6
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +150 -50
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +66 -5
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +239 -48
  248. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +0 -14
  249. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +0 -208
  250. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +0 -22
  251. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +0 -637
  252. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +0 -24
  253. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +0 -384
  254. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +0 -33
  255. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +0 -47
  256. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +0 -30
  257. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +0 -55
  258. /package/vscode/src/vs/workbench/contrib/chat/{common → browser}/promptSyntax/promptFileContributions.d.ts +0 -0
package/index.js CHANGED
@@ -44,7 +44,7 @@ import { ChatAttachmentResolveService } from './vscode/src/vs/workbench/contrib/
44
44
  import { IRemoteCodingAgentsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.service';
45
45
  import { RemoteCodingAgentsService } from './vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js';
46
46
  import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
47
- import { ChatSessionsService } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution';
47
+ import { ChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution';
48
48
  import { ChatOutputRendererService } from './vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js';
49
49
  import { IChatOutputRendererService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service';
50
50
  import { IChatTodoListService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatTodoListService.service';
@@ -110,6 +110,8 @@ import { IChatImageCarouselService } from '@codingame/monaco-vscode-api/vscode/v
110
110
  import { ChatImageCarouselService } from './vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js';
111
111
  import { IInlineChatHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.service';
112
112
  import { InlineChatHistoryService } from './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js';
113
+ import { NullSandboxHelperService } from './vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js';
114
+ import { ISandboxHelperService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService.service';
113
115
  import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
114
116
  import './vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js';
115
117
  import './vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js';
@@ -177,6 +179,7 @@ function getServiceOverride({ defaultAccount } = {}) {
177
179
  [IChatEditingExplanationModelManager.toString()]: new SyncDescriptor(ChatEditingExplanationModelManager, [], true),
178
180
  [IChatToolOutputStateCache.toString()]: new SyncDescriptor(ChatToolOutputStateCache, [], true),
179
181
  [ITerminalSandboxService.toString()]: new SyncDescriptor(TerminalSandboxService, [], true),
182
+ [ISandboxHelperService.toString()]: new SyncDescriptor(NullSandboxHelperService, [], true),
180
183
  [IAICustomizationWorkspaceService.toString()]: new SyncDescriptor(AICustomizationWorkspaceService, [], true),
181
184
  [IAgentPluginService.toString()]: new SyncDescriptor(AgentPluginService, [], true),
182
185
  [IPluginMarketplaceService.toString()]: new SyncDescriptor(PluginMarketplaceService, [], true),
@@ -186,7 +189,7 @@ function getServiceOverride({ defaultAccount } = {}) {
186
189
  [IChatDebugService.toString()]: new SyncDescriptor(ChatDebugServiceImpl, [], true),
187
190
  [IChatResponseResourceFileSystemProvider.toString()]: new SyncDescriptor(ChatResponseResourceFileSystemProvider, [], true),
188
191
  [IDefaultAccountService.toString()]: new SyncDescriptor(DefaultAccountService, [defaultAccount], true),
189
- [ICustomizationHarnessService.toString()]: new SyncDescriptor(CustomizationHarnessService, [defaultAccount], true),
192
+ [ICustomizationHarnessService.toString()]: new SyncDescriptor(CustomizationHarnessService, [], true),
190
193
  [IChatArtifactsService.toString()]: new SyncDescriptor(ChatArtifactsService, [], true),
191
194
  [IWorkspacePluginSettingsService.toString()]: new SyncDescriptor(WorkspacePluginSettingsService, [], true),
192
195
  [IChatImageCarouselService.toString()]: new SyncDescriptor(ChatImageCarouselService, [], true),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "29.1.0",
3
+ "version": "30.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - chat service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "29.1.0",
19
- "@codingame/monaco-vscode-katex-common": "29.1.0",
20
- "@codingame/monaco-vscode-xterm-addons-common": "29.1.0",
21
- "@codingame/monaco-vscode-xterm-common": "29.1.0"
18
+ "@codingame/monaco-vscode-api": "30.0.0",
19
+ "@codingame/monaco-vscode-katex-common": "30.0.0",
20
+ "@codingame/monaco-vscode-xterm-addons-common": "30.0.0",
21
+ "@codingame/monaco-vscode-xterm-common": "30.0.0"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -2,21 +2,25 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
2
2
  import { IAuthorizationProtectedResourceMetadata } from "@codingame/monaco-vscode-api/vscode/vs/base/common/oauth";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
4
  import { IAgentService } from "./agentService.service.js";
5
- import { AttachmentType, PermissionKind, type PolicyState } from "./state/sessionState.js";
5
+ import { AttachmentType, type IPendingMessage, type IToolCallResult, type PolicyState, type StringOrMarkdown } from "./state/sessionState.js";
6
6
  export declare enum AgentHostIpcChannels {
7
7
  /** Channel for the agent host service on the main-process side */
8
8
  AgentHost = "agentHost",
9
9
  /** Channel for log forwarding from the agent host process */
10
- Logger = "agentHostLogger"
10
+ Logger = "agentHostLogger",
11
+ /** Channel for WebSocket client connection count (server process management only) */
12
+ ConnectionTracker = "agentHostConnectionTracker"
11
13
  }
12
14
  /** Configuration key that controls whether the agent host process is spawned. */
13
15
  export declare const AgentHostEnabledSettingId = "chat.agentHost.enabled";
16
+ /** Configuration key that controls whether per-host IPC traffic output channels are created. */
17
+ export declare const AgentHostIpcLoggingSettingId = "chat.agentHost.ipcLoggingEnabled";
14
18
  export interface IAgentSessionMetadata {
15
19
  readonly session: URI;
16
20
  readonly startTime: number;
17
21
  readonly modifiedTime: number;
18
22
  readonly summary?: string;
19
- readonly workingDirectory?: string;
23
+ readonly workingDirectory?: URI;
20
24
  }
21
25
  export type AgentProvider = string;
22
26
  /** Metadata describing an agent backend, discovered over IPC. */
@@ -70,7 +74,7 @@ export interface IAgentCreateSessionConfig {
70
74
  readonly provider?: AgentProvider;
71
75
  readonly model?: string;
72
76
  readonly session?: URI;
73
- readonly workingDirectory?: string;
77
+ readonly workingDirectory?: URI;
74
78
  }
75
79
  /** Serializable attachment passed alongside a message to the agent host. */
76
80
  export interface IAgentAttachment {
@@ -161,20 +165,9 @@ export interface IAgentToolStartEvent extends IAgentProgressEventBase {
161
165
  export interface IAgentToolCompleteEvent extends IAgentProgressEventBase {
162
166
  readonly type: "tool_complete";
163
167
  readonly toolCallId: string;
164
- readonly success: boolean;
165
- /** Message describing the completed tool invocation (e.g., "Ran `echo hello`"). */
166
- readonly pastTenseMessage: string;
167
- /** Tool output content for display in the UI. */
168
- readonly toolOutput?: string;
168
+ /** Tool execution result, matching the protocol {@link IToolCallResult} shape. */
169
+ readonly result: IToolCallResult;
169
170
  readonly isUserRequested?: boolean;
170
- readonly result?: {
171
- readonly content: string;
172
- readonly detailedContent?: string;
173
- };
174
- readonly error?: {
175
- readonly message: string;
176
- readonly code?: string;
177
- };
178
171
  /** Serialized JSON of tool-specific telemetry data. */
179
172
  readonly toolTelemetry?: string;
180
173
  readonly parentToolCallId?: string;
@@ -199,34 +192,30 @@ export interface IAgentUsageEvent extends IAgentProgressEventBase {
199
192
  readonly model?: string;
200
193
  readonly cacheReadTokens?: number;
201
194
  }
202
- /** A tool permission request from the SDK requiring a renderer-side decision. */
203
- export interface IAgentPermissionRequestEvent extends IAgentProgressEventBase {
204
- readonly type: "permission_request";
205
- /** Unique ID for correlating the response. */
206
- readonly requestId: string;
207
- /** The kind of permission being requested. */
208
- readonly permissionKind: PermissionKind;
209
- /** The tool call ID that triggered this permission request. */
210
- readonly toolCallId?: string;
211
- /** File path involved (for read/write). */
212
- readonly path?: string;
213
- /** For shell: the full command text. */
214
- readonly fullCommandText?: string;
215
- /** For shell: the intention description. */
216
- readonly intention?: string;
217
- /** For MCP: the server name. */
218
- readonly serverName?: string;
219
- /** For MCP: the tool name. */
220
- readonly toolName?: string;
221
- /** Serialized JSON of the full permission request for fallback display. */
222
- readonly rawRequest: string;
195
+ /**
196
+ * A running tool requires re-confirmation (e.g. a mid-execution permission check).
197
+ * Maps to `SessionToolCallReady` without `confirmed` to transition Running → PendingConfirmation.
198
+ */
199
+ export interface IAgentToolReadyEvent extends IAgentProgressEventBase {
200
+ readonly type: "tool_ready";
201
+ readonly toolCallId: string;
202
+ /** Message describing what confirmation is needed. */
203
+ readonly invocationMessage: StringOrMarkdown;
204
+ /** Raw tool input to display. */
205
+ readonly toolInput?: string;
206
+ /** Short title for the confirmation prompt. */
207
+ readonly confirmationTitle?: StringOrMarkdown;
208
+ /** Kind of permission being requested (e.g. `'write'`, `'read'`). */
209
+ readonly permissionKind?: string;
210
+ /** File path associated with the permission request. */
211
+ readonly permissionPath?: string;
223
212
  }
224
213
  /** Streaming reasoning/thinking content from the assistant. */
225
214
  export interface IAgentReasoningEvent extends IAgentProgressEventBase {
226
215
  readonly type: "reasoning";
227
216
  readonly content: string;
228
217
  }
229
- export type IAgentProgressEvent = IAgentDeltaEvent | IAgentMessageEvent | IAgentIdleEvent | IAgentToolStartEvent | IAgentToolCompleteEvent | IAgentTitleChangedEvent | IAgentErrorEvent | IAgentUsageEvent | IAgentPermissionRequestEvent | IAgentReasoningEvent;
218
+ export type IAgentProgressEvent = IAgentDeltaEvent | IAgentMessageEvent | IAgentIdleEvent | IAgentToolStartEvent | IAgentToolReadyEvent | IAgentToolCompleteEvent | IAgentTitleChangedEvent | IAgentErrorEvent | IAgentUsageEvent | IAgentReasoningEvent;
230
219
  export declare namespace AgentSession {
231
220
  /**
232
221
  * Creates a session URI from a provider name and raw session ID.
@@ -258,6 +247,15 @@ export interface IAgent {
258
247
  createSession(config?: IAgentCreateSessionConfig): Promise<URI>;
259
248
  /** Send a user message into an existing session. */
260
249
  sendMessage(session: URI, prompt: string, attachments?: IAgentAttachment[]): Promise<void>;
250
+ /**
251
+ * Called when the session's pending (steering) message changes.
252
+ * The agent harness decides how to react — e.g. inject steering
253
+ * mid-turn via `mode: 'immediate'`.
254
+ *
255
+ * Queued messages are consumed on the server side and are not
256
+ * forwarded to the agent; `queuedMessages` will always be empty.
257
+ */
258
+ setPendingMessages?(session: URI, steeringMessage: IPendingMessage | undefined, queuedMessages: readonly IPendingMessage[]): void;
261
259
  /** Retrieve all session events/messages for reconstruction. */
262
260
  getSessionMessages(session: URI): Promise<(IAgentMessageEvent | IAgentToolStartEvent | IAgentToolCompleteEvent)[]>;
263
261
  /** Dispose a session, freeing resources. */
@@ -5,8 +5,10 @@ var AgentHostIpcChannels;
5
5
  (function(AgentHostIpcChannels) {
6
6
  AgentHostIpcChannels["AgentHost"] = "agentHost";
7
7
  AgentHostIpcChannels["Logger"] = "agentHostLogger";
8
+ AgentHostIpcChannels["ConnectionTracker"] = "agentHostConnectionTracker";
8
9
  })(AgentHostIpcChannels || (AgentHostIpcChannels = {}));
9
10
  const AgentHostEnabledSettingId = "chat.agentHost.enabled";
11
+ const AgentHostIpcLoggingSettingId = "chat.agentHost.ipcLoggingEnabled";
10
12
  var AgentSession;
11
13
  (function(AgentSession) {
12
14
  function uri(provider, rawSessionId) {
@@ -28,4 +30,4 @@ var AgentSession;
28
30
  AgentSession.provider = provider;
29
31
  })(AgentSession || (AgentSession = {}));
30
32
 
31
- export { AgentHostEnabledSettingId, AgentHostIpcChannels, AgentSession };
33
+ export { AgentHostEnabledSettingId, AgentHostIpcChannels, AgentHostIpcLoggingSettingId, AgentSession };
@@ -2,7 +2,7 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
2
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
3
  import { IAgentDescriptor, IResourceMetadata, IAuthenticateParams, IAuthenticateResult, IAgentSessionMetadata, IAgentCreateSessionConfig, type IAgentConnection } from "./agentService.js";
4
4
  import { IActionEnvelope, INotification, ISessionAction } from "./state/sessionActions.js";
5
- import { IBrowseDirectoryResult } from "./state/sessionProtocol.js";
5
+ import { IBrowseDirectoryResult, IFetchContentResult, IWriteFileParams, IWriteFileResult } from "./state/sessionProtocol.js";
6
6
  import { ISnapshot as IStateSnapshot } from "./state/sessionState.js";
7
7
  export declare const IAgentService: import("@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation").ServiceIdentifier<IAgentService>;
8
8
  /**
@@ -71,6 +71,16 @@ export interface IAgentService {
71
71
  * Used by the client to drive a remote folder picker before session creation.
72
72
  */
73
73
  browseDirectory(uri: URI): Promise<IBrowseDirectoryResult>;
74
+ /**
75
+ * Fetch stored content by URI from the agent host (e.g. file edit snapshots,
76
+ * or reading files from the remote filesystem).
77
+ */
78
+ fetchContent(uri: URI): Promise<IFetchContentResult>;
79
+ /**
80
+ * Write content to a file on the agent host's filesystem.
81
+ * Used for undo/redo operations on file edits.
82
+ */
83
+ writeFile(params: IWriteFileParams): Promise<IWriteFileResult>;
74
84
  }
75
85
  export declare const IAgentHostService: import("@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation").ServiceIdentifier<IAgentHostService>;
76
86
  /**
@@ -1,12 +1,12 @@
1
- import { type IStateAction, type IRootAgentsChangedAction, type IRootActiveSessionsChangedAction, type ISessionReadyAction, type ISessionCreationFailedAction, type ISessionTurnStartedAction, type ISessionDeltaAction, type ISessionResponsePartAction, type ISessionToolCallStartAction, type ISessionToolCallDeltaAction, type ISessionToolCallReadyAction, type ISessionToolCallConfirmedAction, type ISessionToolCallCompleteAction, type ISessionToolCallResultConfirmedAction, type ISessionPermissionRequestAction, type ISessionPermissionResolvedAction, type ISessionTurnCompleteAction, type ISessionTurnCancelledAction, type ISessionErrorAction, type ISessionTitleChangedAction, type ISessionUsageAction, type ISessionReasoningAction, type ISessionModelChangedAction, type ISessionServerToolsChangedAction, type ISessionActiveClientChangedAction, type ISessionActiveClientToolsChangedAction } from "./actions.js";
1
+ import { type IStateAction, type IRootAgentsChangedAction, type IRootActiveSessionsChangedAction, type ISessionReadyAction, type ISessionCreationFailedAction, type ISessionTurnStartedAction, type ISessionDeltaAction, type ISessionResponsePartAction, type ISessionToolCallStartAction, type ISessionToolCallDeltaAction, type ISessionToolCallReadyAction, type ISessionToolCallConfirmedAction, type ISessionToolCallCompleteAction, type ISessionToolCallResultConfirmedAction, type ISessionTurnCompleteAction, type ISessionTurnCancelledAction, type ISessionErrorAction, type ISessionTitleChangedAction, type ISessionUsageAction, type ISessionReasoningAction, type ISessionModelChangedAction, type ISessionServerToolsChangedAction, type ISessionActiveClientChangedAction, type ISessionActiveClientToolsChangedAction, type ISessionPendingMessageSetAction, type ISessionPendingMessageRemovedAction, type ISessionQueuedMessagesReorderedAction, type ISessionCustomizationsChangedAction, type ISessionCustomizationToggledAction } from "./actions.js";
2
2
  /** Union of all root-scoped actions. */
3
3
  export type IRootAction = IRootAgentsChangedAction | IRootActiveSessionsChangedAction;
4
4
  /** Union of all session-scoped actions. */
5
- export type ISessionAction = ISessionReadyAction | ISessionCreationFailedAction | ISessionTurnStartedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionPermissionRequestAction | ISessionPermissionResolvedAction | ISessionTurnCompleteAction | ISessionTurnCancelledAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionModelChangedAction | ISessionServerToolsChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction;
5
+ export type ISessionAction = ISessionReadyAction | ISessionCreationFailedAction | ISessionTurnStartedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionTurnCompleteAction | ISessionTurnCancelledAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionModelChangedAction | ISessionServerToolsChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction | ISessionPendingMessageSetAction | ISessionPendingMessageRemovedAction | ISessionQueuedMessagesReorderedAction | ISessionCustomizationsChangedAction | ISessionCustomizationToggledAction;
6
6
  /** Union of session actions that clients may dispatch. */
7
- export type IClientSessionAction = ISessionTurnStartedAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionPermissionResolvedAction | ISessionTurnCancelledAction | ISessionModelChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction;
7
+ export type IClientSessionAction = ISessionTurnStartedAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionTurnCancelledAction | ISessionModelChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction | ISessionPendingMessageSetAction | ISessionPendingMessageRemovedAction | ISessionQueuedMessagesReorderedAction | ISessionCustomizationToggledAction;
8
8
  /** Union of session actions that only the server may produce. */
9
- export type IServerSessionAction = ISessionReadyAction | ISessionCreationFailedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionPermissionRequestAction | ISessionTurnCompleteAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionServerToolsChangedAction;
9
+ export type IServerSessionAction = ISessionReadyAction | ISessionCreationFailedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionTurnCompleteAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionServerToolsChangedAction | ISessionCustomizationsChangedAction;
10
10
  /**
11
11
  * Exhaustive map indicating which action types may be dispatched by clients.
12
12
  * Adding a new action to IStateAction without adding it here is a compile error.
@@ -1,4 +1,4 @@
1
- import { ToolCallConfirmationReason, ToolCallCancellationReason, type URI, type StringOrMarkdown, type IAgentInfo, type IErrorInfo, type IUserMessage, type IResponsePart, type IToolCallResult, type IToolDefinition, type ISessionActiveClient, type IUsageInfo, type IPermissionRequest } from "./state.js";
1
+ import { ToolCallConfirmationReason, ToolCallCancellationReason, PendingMessageKind, type URI, type StringOrMarkdown, type IAgentInfo, type IErrorInfo, type IUserMessage, type IResponsePart, type IToolCallResult, type IToolDefinition, type ISessionActiveClient, type IUsageInfo, type ISessionCustomization } from "./state.js";
2
2
  /**
3
3
  * Discriminant values for all state actions.
4
4
  *
@@ -18,8 +18,6 @@ export declare enum ActionType {
18
18
  SessionToolCallConfirmed = "session/toolCallConfirmed",
19
19
  SessionToolCallComplete = "session/toolCallComplete",
20
20
  SessionToolCallResultConfirmed = "session/toolCallResultConfirmed",
21
- SessionPermissionRequest = "session/permissionRequest",
22
- SessionPermissionResolved = "session/permissionResolved",
23
21
  SessionTurnComplete = "session/turnComplete",
24
22
  SessionTurnCancelled = "session/turnCancelled",
25
23
  SessionError = "session/error",
@@ -29,7 +27,12 @@ export declare enum ActionType {
29
27
  SessionModelChanged = "session/modelChanged",
30
28
  SessionServerToolsChanged = "session/serverToolsChanged",
31
29
  SessionActiveClientChanged = "session/activeClientChanged",
32
- SessionActiveClientToolsChanged = "session/activeClientToolsChanged"
30
+ SessionActiveClientToolsChanged = "session/activeClientToolsChanged",
31
+ SessionPendingMessageSet = "session/pendingMessageSet",
32
+ SessionPendingMessageRemoved = "session/pendingMessageRemoved",
33
+ SessionQueuedMessagesReordered = "session/queuedMessagesReordered",
34
+ SessionCustomizationsChanged = "session/customizationsChanged",
35
+ SessionCustomizationToggled = "session/customizationToggled"
33
36
  }
34
37
  /**
35
38
  * Identifies the client that originally dispatched an action.
@@ -131,9 +134,14 @@ export interface ISessionTurnStartedAction {
131
134
  turnId: string;
132
135
  /** User's message */
133
136
  userMessage: IUserMessage;
137
+ /** If this turn was auto-started from a queued message, the ID of that message */
138
+ queuedMessageId?: string;
134
139
  }
135
140
  /**
136
- * Streaming text chunk from the assistant.
141
+ * Streaming text chunk from the assistant, appended to a specific response part.
142
+ *
143
+ * The server MUST first emit a `session/responsePart` to create the target
144
+ * part (markdown or reasoning), then use this action to append text to it.
137
145
  *
138
146
  * @category Session Actions
139
147
  * @version 1
@@ -144,6 +152,8 @@ export interface ISessionDeltaAction {
144
152
  session: URI;
145
153
  /** Turn identifier */
146
154
  turnId: string;
155
+ /** Identifier of the response part to append to */
156
+ partId: string;
147
157
  /** Text chunk */
148
158
  content: string;
149
159
  }
@@ -198,9 +208,16 @@ export interface ISessionToolCallDeltaAction extends IToolCallActionBase {
198
208
  invocationMessage?: StringOrMarkdown;
199
209
  }
200
210
  /**
201
- * Tool call parameters are complete. Transitions to `pending-confirmation`
211
+ * Tool call parameters are complete, or a running tool requires re-confirmation.
212
+ *
213
+ * When dispatched for a `streaming` tool call, transitions to `pending-confirmation`
202
214
  * or directly to `running` if `confirmed` is set.
203
215
  *
216
+ * When dispatched for a `running` tool call (e.g. mid-execution permission needed),
217
+ * transitions back to `pending-confirmation`. The `invocationMessage` and `_meta`
218
+ * SHOULD be updated to describe the specific confirmation needed. Clients use the
219
+ * standard `session/toolCallConfirmed` flow to approve or deny.
220
+ *
204
221
  * For client-provided tools, the server typically sets `confirmed` to
205
222
  * `'not-needed'` so the tool transitions directly to `running`, where the
206
223
  * owning client can begin execution immediately.
@@ -210,10 +227,12 @@ export interface ISessionToolCallDeltaAction extends IToolCallActionBase {
210
227
  */
211
228
  export interface ISessionToolCallReadyAction extends IToolCallActionBase {
212
229
  type: ActionType.SessionToolCallReady;
213
- /** Message describing what the tool will do */
230
+ /** Message describing what the tool will do or what confirmation is needed */
214
231
  invocationMessage: StringOrMarkdown;
215
232
  /** Raw tool input */
216
233
  toolInput?: string;
234
+ /** Short title for the confirmation prompt (e.g. `"Run in terminal"`, `"Write file"`) */
235
+ confirmationTitle?: StringOrMarkdown;
217
236
  /** If set, the tool was auto-confirmed and transitions directly to `running` */
218
237
  confirmed?: ToolCallConfirmationReason;
219
238
  }
@@ -297,39 +316,6 @@ export interface ISessionToolCallResultConfirmedAction extends IToolCallActionBa
297
316
  /** Whether the result was approved */
298
317
  approved: boolean;
299
318
  }
300
- /**
301
- * Permission needed from the user to proceed.
302
- *
303
- * @category Session Actions
304
- * @version 1
305
- */
306
- export interface ISessionPermissionRequestAction {
307
- type: ActionType.SessionPermissionRequest;
308
- /** Session URI */
309
- session: URI;
310
- /** Turn identifier */
311
- turnId: string;
312
- /** Permission request details */
313
- request: IPermissionRequest;
314
- }
315
- /**
316
- * Permission granted or denied.
317
- *
318
- * @category Session Actions
319
- * @version 1
320
- * @clientDispatchable
321
- */
322
- export interface ISessionPermissionResolvedAction {
323
- type: ActionType.SessionPermissionResolved;
324
- /** Session URI */
325
- session: URI;
326
- /** Turn identifier */
327
- turnId: string;
328
- /** Permission request ID */
329
- requestId: string;
330
- /** Whether permission was granted */
331
- approved: boolean;
332
- }
333
319
  /**
334
320
  * Turn finished — the assistant is idle.
335
321
  *
@@ -401,7 +387,10 @@ export interface ISessionUsageAction {
401
387
  usage: IUsageInfo;
402
388
  }
403
389
  /**
404
- * Reasoning/thinking text from the model.
390
+ * Reasoning/thinking text from the model, appended to a specific reasoning response part.
391
+ *
392
+ * The server MUST first emit a `session/responsePart` to create the target
393
+ * reasoning part, then use this action to append text to it.
405
394
  *
406
395
  * @category Session Actions
407
396
  * @version 1
@@ -412,6 +401,8 @@ export interface ISessionReasoningAction {
412
401
  session: URI;
413
402
  /** Turn identifier */
414
403
  turnId: string;
404
+ /** Identifier of the reasoning response part to append to */
405
+ partId: string;
415
406
  /** Reasoning text chunk */
416
407
  content: string;
417
408
  }
@@ -481,8 +472,107 @@ export interface ISessionActiveClientToolsChangedAction {
481
472
  /** Updated client tools list (full replacement) */
482
473
  tools: IToolDefinition[];
483
474
  }
475
+ /**
476
+ * The session's customizations have changed.
477
+ *
478
+ * Full-replacement semantics: the `customizations` array replaces the
479
+ * previous `customizations` entirely.
480
+ *
481
+ * @category Session Actions
482
+ * @version 1
483
+ */
484
+ export interface ISessionCustomizationsChangedAction {
485
+ type: ActionType.SessionCustomizationsChanged;
486
+ /** Session URI */
487
+ session: URI;
488
+ /** Updated customization list (full replacement) */
489
+ customizations: ISessionCustomization[];
490
+ }
491
+ /**
492
+ * A client toggled a customization on or off.
493
+ *
494
+ * The server locates the customization by `uri` in the session's
495
+ * customization list and sets its `enabled` flag.
496
+ *
497
+ * @category Session Actions
498
+ * @version 1
499
+ * @clientDispatchable
500
+ */
501
+ export interface ISessionCustomizationToggledAction {
502
+ type: ActionType.SessionCustomizationToggled;
503
+ /** Session URI */
504
+ session: URI;
505
+ /** The URI of the customization to toggle */
506
+ uri: URI;
507
+ /** Whether to enable or disable the customization */
508
+ enabled: boolean;
509
+ }
510
+ /**
511
+ * A pending message was set (upsert semantics: creates or replaces).
512
+ *
513
+ * For steering messages, this always replaces the single steering message.
514
+ * For queued messages, if a message with the given `id` already exists it is
515
+ * updated in place; otherwise it is appended to the queue. If the session is
516
+ * idle when a queued message is set, the server SHOULD immediately consume it
517
+ * and start a new turn.
518
+ *
519
+ * @category Session Actions
520
+ * @version 1
521
+ * @clientDispatchable
522
+ */
523
+ export interface ISessionPendingMessageSetAction {
524
+ type: ActionType.SessionPendingMessageSet;
525
+ /** Session URI */
526
+ session: URI;
527
+ /** Whether this is a steering or queued message */
528
+ kind: PendingMessageKind;
529
+ /** Unique identifier for this pending message */
530
+ id: string;
531
+ /** The message content */
532
+ userMessage: IUserMessage;
533
+ }
534
+ /**
535
+ * A pending message was removed (steering or queued).
536
+ *
537
+ * Dispatched by clients to cancel a pending message, or by the server when
538
+ * it consumes a message (e.g. starting a turn from a queued message or
539
+ * injecting a steering message into the current turn).
540
+ *
541
+ * @category Session Actions
542
+ * @version 1
543
+ * @clientDispatchable
544
+ */
545
+ export interface ISessionPendingMessageRemovedAction {
546
+ type: ActionType.SessionPendingMessageRemoved;
547
+ /** Session URI */
548
+ session: URI;
549
+ /** Whether this is a steering or queued message */
550
+ kind: PendingMessageKind;
551
+ /** Identifier of the pending message to remove */
552
+ id: string;
553
+ }
554
+ /**
555
+ * Reorder the queued messages.
556
+ *
557
+ * The `order` array contains the IDs of queued messages in their new
558
+ * desired order. IDs not present in the current queue are ignored.
559
+ * Queued messages whose IDs are absent from `order` are appended at
560
+ * the end in their original relative order (so a client with a stale
561
+ * view of the queue never silently drops messages).
562
+ *
563
+ * @category Session Actions
564
+ * @version 1
565
+ * @clientDispatchable
566
+ */
567
+ export interface ISessionQueuedMessagesReorderedAction {
568
+ type: ActionType.SessionQueuedMessagesReordered;
569
+ /** Session URI */
570
+ session: URI;
571
+ /** Queued message IDs in the desired order */
572
+ order: string[];
573
+ }
484
574
  /**
485
575
  * Discriminated union of all state actions.
486
576
  */
487
- export type IStateAction = IRootAgentsChangedAction | IRootActiveSessionsChangedAction | ISessionReadyAction | ISessionCreationFailedAction | ISessionTurnStartedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionPermissionRequestAction | ISessionPermissionResolvedAction | ISessionTurnCompleteAction | ISessionTurnCancelledAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionModelChangedAction | ISessionServerToolsChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction;
577
+ export type IStateAction = IRootAgentsChangedAction | IRootActiveSessionsChangedAction | ISessionReadyAction | ISessionCreationFailedAction | ISessionTurnStartedAction | ISessionDeltaAction | ISessionResponsePartAction | ISessionToolCallStartAction | ISessionToolCallDeltaAction | ISessionToolCallReadyAction | ISessionToolCallConfirmedAction | ISessionToolCallCompleteAction | ISessionToolCallResultConfirmedAction | ISessionTurnCompleteAction | ISessionTurnCancelledAction | ISessionErrorAction | ISessionTitleChangedAction | ISessionUsageAction | ISessionReasoningAction | ISessionModelChangedAction | ISessionServerToolsChangedAction | ISessionActiveClientChangedAction | ISessionActiveClientToolsChangedAction | ISessionPendingMessageSetAction | ISessionPendingMessageRemovedAction | ISessionQueuedMessagesReorderedAction | ISessionCustomizationsChangedAction | ISessionCustomizationToggledAction;
488
578
  export {};
@@ -207,6 +207,8 @@ export declare enum ContentEncoding {
207
207
  * @direction Client → Server
208
208
  * @messageType Request
209
209
  * @version 1
210
+ * @throws `NotFound` (`-32008`) if the URI does not exist.
211
+ * @throws `PermissionDenied` (`-32009`) if the client is not permitted to read the URI.
210
212
  * @example
211
213
  * ```jsonc
212
214
  * // Client → Server
@@ -242,6 +244,56 @@ export interface IFetchContentResult {
242
244
  /** Content type (e.g. `"image/png"`, `"text/plain"`) */
243
245
  contentType?: string;
244
246
  }
247
+ /**
248
+ * Writes content to a file on the server's filesystem.
249
+ *
250
+ * Binary content (images, etc.) MUST use `base64` encoding. Text content MAY
251
+ * use `utf-8` encoding.
252
+ *
253
+ * If the file does not exist, it is created. If the file already exists, it is
254
+ * overwritten unless `createOnly` is set.
255
+ *
256
+ * @category Commands
257
+ * @method writeFile
258
+ * @direction Client → Server
259
+ * @messageType Request
260
+ * @version 1
261
+ * @throws `NotFound` (`-32008`) if the parent directory does not exist.
262
+ * @throws `PermissionDenied` (`-32009`) if the client is not permitted to write to the path.
263
+ * @throws `AlreadyExists` (`-32010`) if `createOnly` is set and the file already exists.
264
+ * @example
265
+ * ```jsonc
266
+ * // Client → Server
267
+ * { "jsonrpc": "2.0", "id": 11, "method": "writeFile",
268
+ * "params": { "uri": "file:///workspace/hello.txt", "data": "SGVsbG8=",
269
+ * "encoding": "base64", "contentType": "text/plain" } }
270
+ *
271
+ * // Server → Client
272
+ * { "jsonrpc": "2.0", "id": 11, "result": {} }
273
+ * ```
274
+ */
275
+ export interface IWriteFileParams {
276
+ /** Target file URI on the server filesystem */
277
+ uri: URI;
278
+ /** Content encoded as a string */
279
+ data: string;
280
+ /** How `data` is encoded */
281
+ encoding: ContentEncoding;
282
+ /** Content type (e.g. `"text/plain"`, `"image/png"`) */
283
+ contentType?: string;
284
+ /**
285
+ * If `true`, the server MUST fail if the file already exists instead of
286
+ * overwriting it. Useful for safe creation of new files.
287
+ */
288
+ createOnly?: boolean;
289
+ }
290
+ /**
291
+ * Result of the `writeFile` command.
292
+ *
293
+ * An empty object on success.
294
+ */
295
+ export interface IWriteFileResult {
296
+ }
245
297
  /**
246
298
  * Lists directory entries at a file URI on the server's filesystem.
247
299
  *
@@ -257,6 +309,8 @@ export interface IFetchContentResult {
257
309
  * @direction Client → Server
258
310
  * @messageType Request
259
311
  * @version 1
312
+ * @throws `NotFound` (`-32008`) if the directory does not exist.
313
+ * @throws `PermissionDenied` (`-32009`) if the client is not permitted to browse the directory.
260
314
  */
261
315
  export interface IBrowseDirectoryParams {
262
316
  /** Directory URI on the server filesystem */
@@ -43,6 +43,21 @@ export declare const AhpErrorCodes: {
43
43
  * @see {@link /specification/authentication | Authentication}
44
44
  */
45
45
  readonly AuthRequired: -32007;
46
+ /** The requested file, folder, or URI does not exist */
47
+ readonly NotFound: -32008;
48
+ /**
49
+ * The client is not permitted to access the requested resource.
50
+ *
51
+ * Servers SHOULD return this when a client attempts to read or browse
52
+ * a path outside the allowed set (e.g. outside the session's working
53
+ * directory or workspace roots).
54
+ */
55
+ readonly PermissionDenied: -32009;
56
+ /**
57
+ * The target resource already exists and the operation does not allow
58
+ * overwriting (e.g. `writeFile` with `createOnly: true`).
59
+ */
60
+ readonly AlreadyExists: -32010;
46
61
  };
47
62
  /** Union type of all AHP application error codes. */
48
63
  export type AhpErrorCode = (typeof AhpErrorCodes)[keyof typeof AhpErrorCodes];
@@ -1,4 +1,4 @@
1
- import type { IInitializeParams, IInitializeResult, IReconnectParams, IReconnectResult, ISubscribeParams, ISubscribeResult, ICreateSessionParams, IDisposeSessionParams, IListSessionsParams, IListSessionsResult, IFetchContentParams, IFetchContentResult, IBrowseDirectoryParams, IBrowseDirectoryResult, IFetchTurnsParams, IFetchTurnsResult, IUnsubscribeParams, IDispatchActionParams, IAuthenticateParams, IAuthenticateResult } from "./commands.js";
1
+ import type { IInitializeParams, IInitializeResult, IReconnectParams, IReconnectResult, ISubscribeParams, ISubscribeResult, ICreateSessionParams, IDisposeSessionParams, IListSessionsParams, IListSessionsResult, IFetchContentParams, IFetchContentResult, IWriteFileParams, IWriteFileResult, IBrowseDirectoryParams, IBrowseDirectoryResult, IFetchTurnsParams, IFetchTurnsResult, IUnsubscribeParams, IDispatchActionParams, IAuthenticateParams, IAuthenticateResult } from "./commands.js";
2
2
  import type { IActionEnvelope } from "./actions.js";
3
3
  import type { IProtocolNotification } from "./notifications.js";
4
4
  /** A JSON-RPC request: has both `method` and `id`. */
@@ -66,6 +66,10 @@ export interface ICommandMap {
66
66
  params: IFetchContentParams;
67
67
  result: IFetchContentResult;
68
68
  };
69
+ "writeFile": {
70
+ params: IWriteFileParams;
71
+ result: IWriteFileResult;
72
+ };
69
73
  "browseDirectory": {
70
74
  params: IBrowseDirectoryParams;
71
75
  result: IBrowseDirectoryResult;