@codingame/monaco-vscode-chat-service-override 28.4.0 → 29.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 (339) hide show
  1. package/index.js +18 -12
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
  4. package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
  5. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
  8. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
  10. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
  11. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
  12. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
  13. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
  14. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
  15. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
  16. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
  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.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
  89. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
  95. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
  96. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
  98. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
  99. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
  100. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -18
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  178. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  181. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
  186. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
  187. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
  188. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
  189. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
  190. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  193. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
  194. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  195. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  196. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  197. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
  198. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  199. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  200. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  201. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
  202. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
  203. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
  205. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
  207. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
  208. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
  209. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
  210. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
  211. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
  212. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  219. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  220. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
  221. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
  222. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  223. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
  224. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
  225. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
  226. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
  227. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
  228. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
  229. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
  230. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
  231. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
  232. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
  233. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
  234. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
  235. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
  236. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
  237. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
  238. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
  239. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
  240. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
  241. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
  242. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
  243. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  244. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  245. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  246. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
  247. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
  248. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
  249. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
  250. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
  251. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
  252. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
  253. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
  254. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
  261. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
  262. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
  263. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  268. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  270. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  271. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
  272. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
  273. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
  274. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
  275. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
  276. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
  313. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
  314. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
  318. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
  319. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
  320. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
  321. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
  322. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
  323. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
  324. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
  325. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
  326. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
  327. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
  328. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
  329. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
  330. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
  331. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
  332. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
  333. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
  334. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
  335. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
  336. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
  337. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
  338. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
  339. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
@@ -0,0 +1,424 @@
1
+ import type { URI, ISnapshot, ISessionSummary, ITurn } from "./state.js";
2
+ import type { IActionEnvelope, IStateAction } from "./actions.js";
3
+ /**
4
+ * Establishes a new connection and negotiates the protocol version.
5
+ * This MUST be the first message sent by the client.
6
+ *
7
+ * @category Commands
8
+ * @method initialize
9
+ * @direction Client → Server
10
+ * @messageType Request
11
+ * @version 1
12
+ * @see {@link /specification/lifecycle | Lifecycle} for the full handshake flow.
13
+ */
14
+ export interface IInitializeParams {
15
+ /** Protocol version the client speaks */
16
+ protocolVersion: number;
17
+ /** Unique client identifier */
18
+ clientId: string;
19
+ /** URIs to subscribe to during handshake */
20
+ initialSubscriptions?: URI[];
21
+ }
22
+ /**
23
+ * Result of the `initialize` command.
24
+ *
25
+ * If the server does not support the client's protocol version, it MUST return
26
+ * error code `-32005` (`UnsupportedProtocolVersion`).
27
+ */
28
+ export interface IInitializeResult {
29
+ /** Protocol version the server speaks */
30
+ protocolVersion: number;
31
+ /** Current server sequence number */
32
+ serverSeq: number;
33
+ /** Snapshots for each `initialSubscriptions` URI */
34
+ snapshots: ISnapshot[];
35
+ /** Suggested default directory for remote filesystem browsing */
36
+ defaultDirectory?: URI;
37
+ }
38
+ /**
39
+ * Discriminant for reconnect result types.
40
+ *
41
+ * @category Commands
42
+ */
43
+ export declare enum ReconnectResultType {
44
+ Replay = "replay",
45
+ Snapshot = "snapshot"
46
+ }
47
+ /**
48
+ * Re-establishes a dropped connection. The server replays missed actions or
49
+ * provides fresh snapshots.
50
+ *
51
+ * @category Commands
52
+ * @method reconnect
53
+ * @direction Client → Server
54
+ * @messageType Request
55
+ * @version 1
56
+ * @see {@link /specification/lifecycle | Lifecycle} for details.
57
+ */
58
+ export interface IReconnectParams {
59
+ /** Client identifier from the original connection */
60
+ clientId: string;
61
+ /** Last `serverSeq` the client received */
62
+ lastSeenServerSeq: number;
63
+ /** URIs the client was subscribed to */
64
+ subscriptions: URI[];
65
+ }
66
+ /**
67
+ * Reconnect result when the server can replay from the requested sequence.
68
+ *
69
+ * The server MUST include all replayed data in the response.
70
+ */
71
+ export interface IReconnectReplayResult {
72
+ /** Discriminant */
73
+ type: ReconnectResultType.Replay;
74
+ /** Missed action envelopes since `lastSeenServerSeq` */
75
+ actions: IActionEnvelope[];
76
+ }
77
+ /**
78
+ * Reconnect result when the gap exceeds the replay buffer.
79
+ */
80
+ export interface IReconnectSnapshotResult {
81
+ /** Discriminant */
82
+ type: ReconnectResultType.Snapshot;
83
+ /** Fresh snapshots for each subscription */
84
+ snapshots: ISnapshot[];
85
+ }
86
+ /** Result of the `reconnect` command. */
87
+ export type IReconnectResult = IReconnectReplayResult | IReconnectSnapshotResult;
88
+ /**
89
+ * Subscribe to a URI-identified state resource.
90
+ *
91
+ * @category Commands
92
+ * @method subscribe
93
+ * @direction Client → Server
94
+ * @messageType Request
95
+ * @version 1
96
+ * @see {@link /specification/subscriptions | Subscriptions}
97
+ */
98
+ export interface ISubscribeParams {
99
+ /** URI to subscribe to */
100
+ resource: URI;
101
+ }
102
+ /**
103
+ * Result of the `subscribe` command.
104
+ */
105
+ export interface ISubscribeResult {
106
+ /** Snapshot of the subscribed resource */
107
+ snapshot: ISnapshot;
108
+ }
109
+ /**
110
+ * Creates a new session with the specified agent provider.
111
+ *
112
+ * If the session URI already exists, the server MUST return an error with code
113
+ * `-32003` (`SessionAlreadyExists`).
114
+ *
115
+ * After creation, the client should subscribe to the session URI to receive state
116
+ * updates. The server also broadcasts a `notify/sessionAdded` notification to all
117
+ * clients.
118
+ *
119
+ * @category Commands
120
+ * @method createSession
121
+ * @direction Client → Server
122
+ * @messageType Request
123
+ * @version 1
124
+ * @example
125
+ * ```jsonc
126
+ * // Client → Server
127
+ * { "jsonrpc": "2.0", "id": 2, "method": "createSession",
128
+ * "params": { "session": "copilot:/<uuid>", "provider": "copilot", "model": "gpt-4o" } }
129
+ *
130
+ * // Server → Client (success)
131
+ * { "jsonrpc": "2.0", "id": 2, "result": null }
132
+ *
133
+ * // Server → Client (failure — provider not found)
134
+ * { "jsonrpc": "2.0", "id": 2, "error": { "code": -32002, "message": "No agent for provider" } }
135
+ *
136
+ * // Server → Client (failure — session already exists)
137
+ * { "jsonrpc": "2.0", "id": 2, "error": { "code": -32003, "message": "Session already exists" } }
138
+ * ```
139
+ */
140
+ export interface ICreateSessionParams {
141
+ /** Session URI (client-chosen, e.g. `copilot:/<uuid>`) */
142
+ session: URI;
143
+ /** Agent provider ID */
144
+ provider?: string;
145
+ /** Model ID to use */
146
+ model?: string;
147
+ /** Working directory for the session */
148
+ workingDirectory?: URI;
149
+ }
150
+ /**
151
+ * Disposes a session and cleans up server-side resources.
152
+ *
153
+ * The server broadcasts a `notify/sessionRemoved` notification to all clients.
154
+ *
155
+ * @category Commands
156
+ * @method disposeSession
157
+ * @direction Client → Server
158
+ * @messageType Request
159
+ * @version 1
160
+ */
161
+ export interface IDisposeSessionParams {
162
+ /** Session URI to dispose */
163
+ session: URI;
164
+ }
165
+ /**
166
+ * Returns a list of session summaries. Used to populate session lists and sidebars.
167
+ *
168
+ * The session list is **not** part of the state tree because it can be arbitrarily
169
+ * large. Clients fetch it imperatively and maintain a local cache updated by
170
+ * `notify/sessionAdded` and `notify/sessionRemoved` notifications.
171
+ *
172
+ * @category Commands
173
+ * @method listSessions
174
+ * @direction Client → Server
175
+ * @messageType Request
176
+ * @version 1
177
+ */
178
+ export interface IListSessionsParams {
179
+ /** Optional filter criteria */
180
+ filter?: object;
181
+ }
182
+ /** Result of the `listSessions` command. */
183
+ export interface IListSessionsResult {
184
+ /** The list of session summaries. */
185
+ items: ISessionSummary[];
186
+ }
187
+ /**
188
+ * Encoding of fetched content data.
189
+ *
190
+ * @category Commands
191
+ */
192
+ export declare enum ContentEncoding {
193
+ Base64 = "base64",
194
+ Utf8 = "utf-8"
195
+ }
196
+ /**
197
+ * Fetches large content referenced by a `ContentRef` in the state tree.
198
+ *
199
+ * Content references keep the state tree small by storing large data (images,
200
+ * long tool outputs) by reference rather than inline.
201
+ *
202
+ * Binary content (images, etc.) MUST use `base64` encoding. Text content MAY
203
+ * use `utf-8` encoding.
204
+ *
205
+ * @category Commands
206
+ * @method fetchContent
207
+ * @direction Client → Server
208
+ * @messageType Request
209
+ * @version 1
210
+ * @example
211
+ * ```jsonc
212
+ * // Client → Server
213
+ * { "jsonrpc": "2.0", "id": 10, "method": "fetchContent",
214
+ * "params": { "uri": "copilot:/<uuid>/content/img-1" } }
215
+ *
216
+ * // Server → Client
217
+ * { "jsonrpc": "2.0", "id": 10, "result": {
218
+ * "data": "iVBORw0KGgo...",
219
+ * "encoding": "base64",
220
+ * "contentType": "image/png"
221
+ * }}
222
+ * ```
223
+ */
224
+ export interface IFetchContentParams {
225
+ /** Content URI from a `ContentRef` */
226
+ uri: string;
227
+ /** Preferred encoding for the returned data (default: server-chosen) */
228
+ encoding?: ContentEncoding;
229
+ }
230
+ /**
231
+ * Result of the `fetchContent` command.
232
+ *
233
+ * The server SHOULD honor the `encoding` requested in the params. If the
234
+ * server cannot provide the requested encoding, it MUST fall back to either
235
+ * `base64` or `utf-8`.
236
+ */
237
+ export interface IFetchContentResult {
238
+ /** Content encoded as a string */
239
+ data: string;
240
+ /** How `data` is encoded */
241
+ encoding: ContentEncoding;
242
+ /** Content type (e.g. `"image/png"`, `"text/plain"`) */
243
+ contentType?: string;
244
+ }
245
+ /**
246
+ * Lists directory entries at a file URI on the server's filesystem.
247
+ *
248
+ * This is intended for remote folder pickers and similar UI that needs to let
249
+ * users navigate the server's local filesystem.
250
+ *
251
+ * The server MUST return success only if the target exists and is a directory.
252
+ * If the target does not exist, is not a directory, or cannot be accessed, the
253
+ * server MUST return a JSON-RPC error.
254
+ *
255
+ * @category Commands
256
+ * @method browseDirectory
257
+ * @direction Client → Server
258
+ * @messageType Request
259
+ * @version 1
260
+ */
261
+ export interface IBrowseDirectoryParams {
262
+ /** Directory URI on the server filesystem */
263
+ uri: URI;
264
+ }
265
+ /**
266
+ * Directory entry returned by `browseDirectory`.
267
+ */
268
+ export interface IDirectoryEntry {
269
+ /** Base name of the entry */
270
+ name: string;
271
+ /** Whether the entry is a file or directory */
272
+ type: "file" | "directory";
273
+ }
274
+ /**
275
+ * Result of the `browseDirectory` command.
276
+ */
277
+ export interface IBrowseDirectoryResult {
278
+ /** Entries directly contained in the requested directory */
279
+ entries: IDirectoryEntry[];
280
+ }
281
+ /**
282
+ * Fetches historical turns for a session. Used for lazy loading of conversation
283
+ * history.
284
+ *
285
+ * @category Commands
286
+ * @method fetchTurns
287
+ * @direction Client → Server
288
+ * @messageType Request
289
+ * @version 1
290
+ * @example
291
+ * ```jsonc
292
+ * // Client → Server (fetch the 20 most recent turns)
293
+ * { "jsonrpc": "2.0", "id": 8, "method": "fetchTurns",
294
+ * "params": { "session": "copilot:/<uuid>", "limit": 20 } }
295
+ *
296
+ * // Server → Client
297
+ * { "jsonrpc": "2.0", "id": 8, "result": {
298
+ * "turns": [ { "id": "t1", ... }, { "id": "t2", ... } ],
299
+ * "hasMore": true
300
+ * }}
301
+ *
302
+ * // Client → Server (fetch 20 turns before t1)
303
+ * { "jsonrpc": "2.0", "id": 9, "method": "fetchTurns",
304
+ * "params": { "session": "copilot:/<uuid>", "before": "t1", "limit": 20 } }
305
+ * ```
306
+ */
307
+ export interface IFetchTurnsParams {
308
+ /** Session URI */
309
+ session: URI;
310
+ /** Turn ID to fetch before (exclusive). Omit to fetch from the most recent turn. */
311
+ before?: string;
312
+ /** Maximum number of turns to return. Server MAY impose its own upper bound. */
313
+ limit?: number;
314
+ }
315
+ /**
316
+ * Result of the `fetchTurns` command.
317
+ */
318
+ export interface IFetchTurnsResult {
319
+ /** The requested turns, ordered oldest-first */
320
+ turns: ITurn[];
321
+ /** Whether more turns exist before the returned range */
322
+ hasMore: boolean;
323
+ }
324
+ /**
325
+ * Stop receiving updates for a URI.
326
+ *
327
+ * @category Commands
328
+ * @method unsubscribe
329
+ * @direction Client → Server
330
+ * @messageType Notification
331
+ * @version 1
332
+ * @see {@link /specification/subscriptions | Subscriptions}
333
+ */
334
+ export interface IUnsubscribeParams {
335
+ /** URI to unsubscribe from */
336
+ resource: URI;
337
+ }
338
+ /**
339
+ * Fire-and-forget action dispatch (write-ahead). The client applies actions
340
+ * optimistically to local state.
341
+ *
342
+ * @category Commands
343
+ * @method dispatchAction
344
+ * @direction Client → Server
345
+ * @messageType Notification
346
+ * @version 1
347
+ * @see {@link /guide/actions | Actions} for the full list of client-dispatchable actions.
348
+ */
349
+ export interface IDispatchActionParams {
350
+ /** Client sequence number */
351
+ clientSeq: number;
352
+ /** The action to dispatch */
353
+ action: IStateAction;
354
+ }
355
+ /**
356
+ * Lists the contents of a directory on the server. Used by clients to
357
+ * present directory pickers or file browsers.
358
+ *
359
+ * @category Commands
360
+ * @method browseDirectory
361
+ * @direction Client → Server
362
+ * @messageType Request
363
+ * @version 1
364
+ */
365
+ export interface IBrowseDirectoryParams {
366
+ /** Directory path to browse. Omit to list the default/root directory. */
367
+ directory?: string;
368
+ }
369
+ /**
370
+ * A single entry in a directory listing.
371
+ */
372
+ export interface IBrowseDirectoryEntry {
373
+ /** Entry name (not a full path) */
374
+ name: string;
375
+ /** Whether this entry is a directory */
376
+ isDirectory: boolean;
377
+ }
378
+ /**
379
+ * Pushes a Bearer token for a protected resource. The `resource` field MUST
380
+ * match an `IProtectedResourceMetadata.resource` value declared by an agent
381
+ * in `IAgentInfo.protectedResources`.
382
+ *
383
+ * Tokens are delivered using [RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750)
384
+ * (Bearer Token Usage) semantics. The client obtains the token from the
385
+ * authorization server(s) listed in the resource's metadata and pushes it
386
+ * to the server via this command.
387
+ *
388
+ * @category Commands
389
+ * @method authenticate
390
+ * @direction Client → Server
391
+ * @messageType Request
392
+ * @version 1
393
+ * @see {@link /specification/authentication | Authentication}
394
+ * @example
395
+ * ```jsonc
396
+ * // Client → Server
397
+ * { "jsonrpc": "2.0", "id": 3, "method": "authenticate",
398
+ * "params": { "resource": "https://api.github.com", "token": "gho_xxxx" } }
399
+ *
400
+ * // Server → Client (success)
401
+ * { "jsonrpc": "2.0", "id": 3, "result": {} }
402
+ *
403
+ * // Server → Client (failure — invalid token)
404
+ * { "jsonrpc": "2.0", "id": 3, "error": { "code": -32007, "message": "Invalid token" } }
405
+ * ```
406
+ */
407
+ export interface IAuthenticateParams {
408
+ /**
409
+ * The protected resource identifier. MUST match a `resource` value from
410
+ * `IProtectedResourceMetadata` declared in `IAgentInfo.protectedResources`.
411
+ */
412
+ resource: string;
413
+ /** Bearer token obtained from the resource's authorization server */
414
+ token: string;
415
+ }
416
+ /**
417
+ * Result of the `authenticate` command.
418
+ *
419
+ * An empty object on success. If the token is invalid or the resource is
420
+ * unrecognized, the server MUST return a JSON-RPC error (e.g. `AuthRequired`
421
+ * `-32007` or `InvalidParams` `-32602`).
422
+ */
423
+ export interface IAuthenticateResult {
424
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Standard JSON-RPC 2.0 error codes.
3
+ *
4
+ * @category Standard JSON-RPC Codes
5
+ */
6
+ export declare const JsonRpcErrorCodes: {
7
+ /** Invalid JSON */
8
+ readonly ParseError: -32700;
9
+ /** Not a valid JSON-RPC request */
10
+ readonly InvalidRequest: -32600;
11
+ /** Unknown method name */
12
+ readonly MethodNotFound: -32601;
13
+ /** Invalid method parameters */
14
+ readonly InvalidParams: -32602;
15
+ /** Unspecified server error */
16
+ readonly InternalError: -32603;
17
+ };
18
+ /**
19
+ * AHP application-specific error codes.
20
+ *
21
+ * @category AHP Application Codes
22
+ * @version 1
23
+ */
24
+ export declare const AhpErrorCodes: {
25
+ /** The referenced session URI does not exist */
26
+ readonly SessionNotFound: -32001;
27
+ /** The requested agent provider is not registered */
28
+ readonly ProviderNotFound: -32002;
29
+ /** A session with the given URI already exists */
30
+ readonly SessionAlreadyExists: -32003;
31
+ /** The operation requires no active turn, but one is in progress */
32
+ readonly TurnInProgress: -32004;
33
+ /** The client's protocol version is not supported by the server */
34
+ readonly UnsupportedProtocolVersion: -32005;
35
+ /** The requested content URI does not exist */
36
+ readonly ContentNotFound: -32006;
37
+ /**
38
+ * A command failed because the client has not authenticated for a required
39
+ * protected resource. The `data` field of the JSON-RPC error SHOULD contain
40
+ * an `IProtectedResourceMetadata[]` array describing the resources that
41
+ * require authentication.
42
+ *
43
+ * @see {@link /specification/authentication | Authentication}
44
+ */
45
+ readonly AuthRequired: -32007;
46
+ };
47
+ /** Union type of all AHP application error codes. */
48
+ export type AhpErrorCode = (typeof AhpErrorCodes)[keyof typeof AhpErrorCodes];
49
+ /** Union type of all JSON-RPC error codes. */
50
+ export type JsonRpcErrorCode = (typeof JsonRpcErrorCodes)[keyof typeof JsonRpcErrorCodes];
@@ -0,0 +1,202 @@
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";
2
+ import type { IActionEnvelope } from "./actions.js";
3
+ import type { IProtocolNotification } from "./notifications.js";
4
+ /** A JSON-RPC request: has both `method` and `id`. */
5
+ export interface IJsonRpcRequest {
6
+ readonly jsonrpc: "2.0";
7
+ readonly id: number;
8
+ readonly method: string;
9
+ readonly params?: unknown;
10
+ }
11
+ /** A JSON-RPC success response. */
12
+ export interface IJsonRpcSuccessResponse {
13
+ readonly jsonrpc: "2.0";
14
+ readonly id: number;
15
+ readonly result: unknown;
16
+ }
17
+ /** A JSON-RPC error response. */
18
+ export interface IJsonRpcErrorResponse {
19
+ readonly jsonrpc: "2.0";
20
+ readonly id: number;
21
+ readonly error: {
22
+ readonly code: number;
23
+ readonly message: string;
24
+ readonly data?: unknown;
25
+ };
26
+ }
27
+ /** A JSON-RPC response (success or error). */
28
+ export type IJsonRpcResponse = IJsonRpcSuccessResponse | IJsonRpcErrorResponse;
29
+ /** A JSON-RPC notification: has `method` but no `id`. */
30
+ export interface IJsonRpcNotification {
31
+ readonly jsonrpc: "2.0";
32
+ readonly method: string;
33
+ readonly params?: unknown;
34
+ }
35
+ /**
36
+ * Registry mapping each command method name to its params and result types.
37
+ *
38
+ * @category Commands
39
+ */
40
+ export interface ICommandMap {
41
+ "initialize": {
42
+ params: IInitializeParams;
43
+ result: IInitializeResult;
44
+ };
45
+ "reconnect": {
46
+ params: IReconnectParams;
47
+ result: IReconnectResult;
48
+ };
49
+ "subscribe": {
50
+ params: ISubscribeParams;
51
+ result: ISubscribeResult;
52
+ };
53
+ "createSession": {
54
+ params: ICreateSessionParams;
55
+ result: null;
56
+ };
57
+ "disposeSession": {
58
+ params: IDisposeSessionParams;
59
+ result: null;
60
+ };
61
+ "listSessions": {
62
+ params: IListSessionsParams;
63
+ result: IListSessionsResult;
64
+ };
65
+ "fetchContent": {
66
+ params: IFetchContentParams;
67
+ result: IFetchContentResult;
68
+ };
69
+ "browseDirectory": {
70
+ params: IBrowseDirectoryParams;
71
+ result: IBrowseDirectoryResult;
72
+ };
73
+ "fetchTurns": {
74
+ params: IFetchTurnsParams;
75
+ result: IFetchTurnsResult;
76
+ };
77
+ "authenticate": {
78
+ params: IAuthenticateParams;
79
+ result: IAuthenticateResult;
80
+ };
81
+ }
82
+ /** Params for the server → client `notification` method. */
83
+ export interface INotificationMethodParams {
84
+ notification: IProtocolNotification;
85
+ }
86
+ /**
87
+ * Registry mapping each client → server notification method to its params type.
88
+ *
89
+ * @category Notifications
90
+ */
91
+ export interface IClientNotificationMap {
92
+ "unsubscribe": {
93
+ params: IUnsubscribeParams;
94
+ };
95
+ "dispatchAction": {
96
+ params: IDispatchActionParams;
97
+ };
98
+ }
99
+ /**
100
+ * Registry mapping each server → client notification method to its params type.
101
+ *
102
+ * @category Notifications
103
+ */
104
+ export interface IServerNotificationMap {
105
+ "action": {
106
+ params: IActionEnvelope;
107
+ };
108
+ "notification": {
109
+ params: INotificationMethodParams;
110
+ };
111
+ }
112
+ /** Combined notification map for all directions. */
113
+ export type INotificationMap = IClientNotificationMap & IServerNotificationMap;
114
+ /**
115
+ * A fully typed JSON-RPC request for a specific AHP command.
116
+ *
117
+ * When used as a union (default generic), narrowing on `method` gives typed `params`:
118
+ *
119
+ * ```ts
120
+ * function handle(req: IAhpRequest) {
121
+ * if (req.method === 'fetchTurns') {
122
+ * req.params.session; // typed as URI
123
+ * }
124
+ * }
125
+ * ```
126
+ */
127
+ export type IAhpRequest<M extends keyof ICommandMap = keyof ICommandMap> = M extends unknown ? {
128
+ readonly jsonrpc: "2.0";
129
+ readonly id: number;
130
+ readonly method: M;
131
+ readonly params: ICommandMap[M]["params"];
132
+ } : never;
133
+ /**
134
+ * A fully typed JSON-RPC success response for a specific AHP command.
135
+ *
136
+ * Since JSON-RPC responses do not carry `method`, use this with an explicit
137
+ * generic parameter when you know the method from the associated request:
138
+ *
139
+ * ```ts
140
+ * const result: IAhpSuccessResponse<'fetchTurns'> = ...;
141
+ * result.result.turns; // typed as ITurn[]
142
+ * ```
143
+ */
144
+ export type IAhpSuccessResponse<M extends keyof ICommandMap = keyof ICommandMap> = M extends unknown ? {
145
+ readonly jsonrpc: "2.0";
146
+ readonly id: number;
147
+ readonly result: ICommandMap[M]["result"];
148
+ } : never;
149
+ /** Typed JSON-RPC response (success with known result type, or error). */
150
+ export type IAhpResponse<M extends keyof ICommandMap = keyof ICommandMap> = IAhpSuccessResponse<M> | IJsonRpcErrorResponse;
151
+ /**
152
+ * A fully typed JSON-RPC notification for a specific AHP notification method.
153
+ *
154
+ * When used as a union (default generic), narrowing on `method` gives typed `params`:
155
+ *
156
+ * ```ts
157
+ * function handle(notif: IAhpNotification) {
158
+ * if (notif.method === 'action') {
159
+ * notif.params.serverSeq; // typed as number
160
+ * }
161
+ * }
162
+ * ```
163
+ */
164
+ export type IAhpNotification<M extends keyof INotificationMap = keyof INotificationMap> = M extends unknown ? {
165
+ readonly jsonrpc: "2.0";
166
+ readonly method: M;
167
+ readonly params: INotificationMap[M]["params"];
168
+ } : never;
169
+ /** A client → server notification. */
170
+ export type IAhpClientNotification<M extends keyof IClientNotificationMap = keyof IClientNotificationMap> = M extends unknown ? {
171
+ readonly jsonrpc: "2.0";
172
+ readonly method: M;
173
+ readonly params: IClientNotificationMap[M]["params"];
174
+ } : never;
175
+ /** A server → client notification. */
176
+ export type IAhpServerNotification<M extends keyof IServerNotificationMap = keyof IServerNotificationMap> = M extends unknown ? {
177
+ readonly jsonrpc: "2.0";
178
+ readonly method: M;
179
+ readonly params: IServerNotificationMap[M]["params"];
180
+ } : never;
181
+ /**
182
+ * Discriminated union of all AHP protocol messages.
183
+ *
184
+ * Narrow using standard JSON-RPC structure:
185
+ * - Has `method` + `id` → request ({@link IAhpRequest})
186
+ * - Has `method`, no `id` → notification ({@link IAhpNotification})
187
+ * - Has `result` or `error` + `id` → response ({@link IAhpResponse})
188
+ *
189
+ * Then narrow on `method` for fully typed params:
190
+ *
191
+ * ```ts
192
+ * function dispatch(msg: IProtocolMessage) {
193
+ * if ('method' in msg && 'id' in msg) {
194
+ * // msg is IAhpRequest
195
+ * if (msg.method === 'fetchTurns') {
196
+ * msg.params.session; // URI
197
+ * }
198
+ * }
199
+ * }
200
+ * ```
201
+ */
202
+ export type IProtocolMessage = IAhpRequest | IAhpSuccessResponse | IJsonRpcErrorResponse | IAhpNotification;