@codingame/monaco-vscode-chat-service-override 33.0.9 → 34.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +19 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +32 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +77 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +84 -17
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +235 -190
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +3 -2
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +23 -4
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +107 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +272 -49
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +2 -2
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.d.ts → agentHostResourceService.d.ts} +26 -0
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +11 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +13 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +26 -18
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +119 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +135 -19
- package/vscode/src/vs/platform/agentHost/common/agentService.js +8 -2
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +5 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +85 -22
- package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +36 -0
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +12 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +81 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +103 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +86 -10
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +129 -37
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +72 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{reducers.js → channels-session/reducer.js} +99 -168
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +110 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.d.ts → common/errors.d.ts} +13 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.js → common/errors.js} +1 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +33 -8
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +2 -3
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +36 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +6 -3
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
- package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +4 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +9 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +21 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +28 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +31 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +49 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +182 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +784 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +305 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +120 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +100 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +22 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +21 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +38 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +40 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +23 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +44 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +22 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +112 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +62 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +149 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +13 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +15 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +78 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +140 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +11 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +59 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +440 -357
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +28 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +187 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +346 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +72 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +144 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +126 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +32 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +40 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +25 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +1 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +12 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +14 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +56 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +33 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +22 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +14 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +55 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +54 -12
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +40 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +30 -8
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +205 -46
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +153 -38
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +70 -37
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +6 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +150 -150
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +21 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +122 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +232 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +225 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +143 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +205 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +260 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +98 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +226 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +102 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +31 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +518 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +297 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2961 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +223 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +81 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +349 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +75 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +192 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +89 -0
- package/vscode/src/vs/workbench/services/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +226 -9
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +0 -30
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +0 -119
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +0 -552
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +0 -83
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
5
|
+
import { AgentHostPermissionMode, IPendingResourceRequest, IResourceListResult, IResourceReadResult } from "../../../../platform/agentHost/common/agentHostResourceService.js";
|
|
6
|
+
import { IAgentHostResourceService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostResourceService.service";
|
|
7
|
+
import { ResourceCopyParams, ResourceDeleteParams, ResourceMkdirParams, ResourceMoveParams, ResourceRequestParams, ResourceResolveParams, ResourceResolveResult, ResourceWriteParams } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
|
|
8
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
9
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
10
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
11
|
+
/**
|
|
12
|
+
* Default implementation of {@link IAgentHostResourceService} — the unified
|
|
13
|
+
* owner of agent-host-facing filesystem operations and the permission
|
|
14
|
+
* policy that gates them. Reads transparently fall back to
|
|
15
|
+
* {@link ITextModelService} so virtual resources (untitled documents,
|
|
16
|
+
* notebook cells, ...) work without the host having to know about them.
|
|
17
|
+
*
|
|
18
|
+
* Permission storage shape (in user settings):
|
|
19
|
+
*
|
|
20
|
+
* ```jsonc
|
|
21
|
+
* "chat.agentHost.localFilePermissions": {
|
|
22
|
+
* "localhost:3000": {
|
|
23
|
+
* "file:///Users/me/.gitconfig": "r",
|
|
24
|
+
* "file:///Users/me/.agentConfig": "rw"
|
|
25
|
+
* },
|
|
26
|
+
* "local": { ... }
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* - Keys are addresses normalized via {@link normalizeRemoteAgentHostAddress},
|
|
31
|
+
* with the in-process local agent host keyed under `'local'`.
|
|
32
|
+
* - Values are URI strings → `r` | `rw`. Descendant URIs are covered by a
|
|
33
|
+
* parent grant.
|
|
34
|
+
*/
|
|
35
|
+
export declare class AgentHostResourceService extends Disposable implements IAgentHostResourceService {
|
|
36
|
+
private readonly _configurationService;
|
|
37
|
+
private readonly _fileService;
|
|
38
|
+
private readonly _textModelService;
|
|
39
|
+
private readonly _logService;
|
|
40
|
+
readonly _serviceBrand: undefined;
|
|
41
|
+
private readonly _inMemoryGrants;
|
|
42
|
+
private readonly _pending;
|
|
43
|
+
readonly allPending: IObservable<readonly IPendingResourceRequest[]>;
|
|
44
|
+
constructor(_configurationService: IConfigurationService, _fileService: IFileService, _textModelService: ITextModelService, _logService: ILogService);
|
|
45
|
+
list(address: string, uri: URI): Promise<IResourceListResult>;
|
|
46
|
+
read(address: string, uri: URI): Promise<IResourceReadResult>;
|
|
47
|
+
write(address: string, params: ResourceWriteParams): Promise<void>;
|
|
48
|
+
del(address: string, params: ResourceDeleteParams): Promise<void>;
|
|
49
|
+
move(address: string, params: ResourceMoveParams): Promise<void>;
|
|
50
|
+
copy(address: string, params: ResourceCopyParams): Promise<void>;
|
|
51
|
+
resolve(address: string, params: ResourceResolveParams): Promise<ResourceResolveResult>;
|
|
52
|
+
mkdir(address: string, params: ResourceMkdirParams): Promise<void>;
|
|
53
|
+
check(address: string, uri: URI, mode: AgentHostPermissionMode): Promise<boolean>;
|
|
54
|
+
request(address: string, params: ResourceRequestParams): Promise<void>;
|
|
55
|
+
pendingFor(address: string): IObservable<readonly IPendingResourceRequest[]>;
|
|
56
|
+
findPending(id: string): IPendingResourceRequest | undefined;
|
|
57
|
+
grantImplicitRead(address: string, uri: URI): IDisposable;
|
|
58
|
+
connectionClosed(address: string): void;
|
|
59
|
+
private _gate;
|
|
60
|
+
private _readVirtual;
|
|
61
|
+
/**
|
|
62
|
+
* Write {@link bytes} as text into the resolved text model for {@link uri},
|
|
63
|
+
* if one can be resolved and is writable. Returns `true` when the model was
|
|
64
|
+
* updated, `false` otherwise (no provider, readonly, decode failure).
|
|
65
|
+
*/
|
|
66
|
+
private _writeVirtual;
|
|
67
|
+
/**
|
|
68
|
+
* Resolve {@link uri} via {@link ITextModelService} and synthesize a
|
|
69
|
+
* {@link ResourceResolveResult} so virtual resources stat as `File` with
|
|
70
|
+
* a size matching their text content. Returns `undefined` if no model
|
|
71
|
+
* can be resolved.
|
|
72
|
+
*/
|
|
73
|
+
private _statVirtual;
|
|
74
|
+
/**
|
|
75
|
+
* Resolve {@link uri} against the local filesystem, collapsing `..`
|
|
76
|
+
* segments and following symlinks so the policy check sees the same
|
|
77
|
+
* path the OS will actually open. For URIs that don't exist (e.g. a
|
|
78
|
+
* `resourceWrite` for a new file), realpath the deepest existing
|
|
79
|
+
* ancestor and re-append the leaf.
|
|
80
|
+
*/
|
|
81
|
+
private _canonicalize;
|
|
82
|
+
private _isCovered;
|
|
83
|
+
private _enqueue;
|
|
84
|
+
private _resolve;
|
|
85
|
+
private _dropPending;
|
|
86
|
+
private _readPersistedGrants;
|
|
87
|
+
private _persistGrant;
|
|
88
|
+
private _inspectScopedSetting;
|
|
89
|
+
}
|
|
@@ -1,33 +1,197 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { DeferredPromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { decodeBase64, VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
5
|
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
6
|
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
7
8
|
import { extUri } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
10
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
11
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
12
|
+
import { AgentHostPermissionMode, AgentHostAccessMode, AgentHostResourcePermissionError, LOCAL_AGENT_HOST_ADDRESS, AgentHostLocalFilePermissionsSettingId } from '../../../../platform/agentHost/common/agentHostResourceService.js';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import { normalizeRemoteAgentHostAddress } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
15
|
+
import { ContentEncoding, ResourceType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/commands';
|
|
16
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/commands';
|
|
17
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands';
|
|
18
|
+
import { ROOT_STATE_URI } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
10
19
|
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
11
20
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
21
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
13
|
-
import { normalizeRemoteAgentHostAddress } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
14
|
-
import { AgentHostPermissionMode, AgentHostAccessMode, AgentHostLocalFilePermissionsSettingId } from '../../../../platform/agentHost/common/agentHostPermissionService.js';
|
|
15
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
22
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
17
23
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
18
24
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
19
25
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
20
26
|
|
|
21
|
-
let
|
|
22
|
-
constructor(_configurationService, _fileService, _logService) {
|
|
27
|
+
let AgentHostResourceService = class AgentHostResourceService extends Disposable {
|
|
28
|
+
constructor(_configurationService, _fileService, _textModelService, _logService) {
|
|
23
29
|
super();
|
|
24
30
|
this._configurationService = _configurationService;
|
|
25
31
|
this._fileService = _fileService;
|
|
32
|
+
this._textModelService = _textModelService;
|
|
26
33
|
this._logService = _logService;
|
|
27
34
|
this._inMemoryGrants = ( new Map());
|
|
28
|
-
this._pending = observableValue("
|
|
35
|
+
this._pending = observableValue("agentHostResources.pending", []);
|
|
29
36
|
this.allPending = this._pending;
|
|
30
37
|
}
|
|
38
|
+
async list(address, uri) {
|
|
39
|
+
await this._gate(address, uri, AgentHostPermissionMode.Read, {
|
|
40
|
+
channel: ROOT_STATE_URI,
|
|
41
|
+
uri: ( uri.toString()),
|
|
42
|
+
read: true
|
|
43
|
+
});
|
|
44
|
+
const stat = await this._fileService.resolve(uri);
|
|
45
|
+
if (!stat.isDirectory) {
|
|
46
|
+
throw ( new Error(`Resource is not a directory: ${( uri.toString())}`));
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
entries: ( (stat.children ?? []).map(c => ({
|
|
50
|
+
name: c.name,
|
|
51
|
+
type: c.isDirectory ? "directory" : "file"
|
|
52
|
+
})))
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
async read(address, uri) {
|
|
56
|
+
await this._gate(address, uri, AgentHostPermissionMode.Read, {
|
|
57
|
+
channel: ROOT_STATE_URI,
|
|
58
|
+
uri: ( uri.toString()),
|
|
59
|
+
read: true
|
|
60
|
+
});
|
|
61
|
+
try {
|
|
62
|
+
const content = await this._fileService.readFile(uri);
|
|
63
|
+
return {
|
|
64
|
+
bytes: content.value
|
|
65
|
+
};
|
|
66
|
+
} catch (err) {
|
|
67
|
+
const virtual = await this._readVirtual(uri);
|
|
68
|
+
if (virtual) {
|
|
69
|
+
return {
|
|
70
|
+
bytes: virtual
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
throw err;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async write(address, params) {
|
|
77
|
+
const uri = ( URI.parse(params.uri));
|
|
78
|
+
await this._gate(address, uri, AgentHostPermissionMode.Write, {
|
|
79
|
+
channel: ROOT_STATE_URI,
|
|
80
|
+
uri: ( uri.toString()),
|
|
81
|
+
write: true
|
|
82
|
+
});
|
|
83
|
+
const buf = params.encoding === ContentEncoding.Base64 ? decodeBase64(params.data) : VSBuffer.fromString(params.data);
|
|
84
|
+
try {
|
|
85
|
+
if (params.createOnly) {
|
|
86
|
+
await this._fileService.createFile(uri, buf, {
|
|
87
|
+
overwrite: false
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
await this._fileService.writeFile(uri, buf);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
if (await this._writeVirtual(uri, buf)) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
throw err;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async del(address, params) {
|
|
100
|
+
const uri = ( URI.parse(params.uri));
|
|
101
|
+
await this._gate(address, uri, AgentHostPermissionMode.Write, {
|
|
102
|
+
channel: ROOT_STATE_URI,
|
|
103
|
+
uri: ( uri.toString()),
|
|
104
|
+
write: true
|
|
105
|
+
});
|
|
106
|
+
await this._fileService.del(uri, {
|
|
107
|
+
recursive: !!params.recursive
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async move(address, params) {
|
|
111
|
+
const source = ( URI.parse(params.source));
|
|
112
|
+
const destination = ( URI.parse(params.destination));
|
|
113
|
+
await this._gate(address, source, AgentHostPermissionMode.Write, {
|
|
114
|
+
channel: ROOT_STATE_URI,
|
|
115
|
+
uri: ( source.toString()),
|
|
116
|
+
write: true
|
|
117
|
+
});
|
|
118
|
+
await this._gate(address, destination, AgentHostPermissionMode.Write, {
|
|
119
|
+
channel: ROOT_STATE_URI,
|
|
120
|
+
uri: ( destination.toString()),
|
|
121
|
+
write: true
|
|
122
|
+
});
|
|
123
|
+
await this._fileService.move(source, destination, !params.failIfExists);
|
|
124
|
+
}
|
|
125
|
+
async copy(address, params) {
|
|
126
|
+
const source = ( URI.parse(params.source));
|
|
127
|
+
const destination = ( URI.parse(params.destination));
|
|
128
|
+
await this._gate(address, source, AgentHostPermissionMode.Read, {
|
|
129
|
+
channel: ROOT_STATE_URI,
|
|
130
|
+
uri: ( source.toString()),
|
|
131
|
+
read: true
|
|
132
|
+
});
|
|
133
|
+
await this._gate(address, destination, AgentHostPermissionMode.Write, {
|
|
134
|
+
channel: ROOT_STATE_URI,
|
|
135
|
+
uri: ( destination.toString()),
|
|
136
|
+
write: true
|
|
137
|
+
});
|
|
138
|
+
await this._fileService.copy(source, destination, !params.failIfExists);
|
|
139
|
+
}
|
|
140
|
+
async resolve(address, params) {
|
|
141
|
+
const uri = ( URI.parse(params.uri));
|
|
142
|
+
await this._gate(address, uri, AgentHostPermissionMode.Read, {
|
|
143
|
+
channel: ROOT_STATE_URI,
|
|
144
|
+
uri: ( uri.toString()),
|
|
145
|
+
read: true
|
|
146
|
+
});
|
|
147
|
+
let stat;
|
|
148
|
+
try {
|
|
149
|
+
stat = await this._fileService.stat(uri);
|
|
150
|
+
} catch (err) {
|
|
151
|
+
const virtual = await this._statVirtual(uri);
|
|
152
|
+
if (virtual) {
|
|
153
|
+
return virtual;
|
|
154
|
+
}
|
|
155
|
+
throw err;
|
|
156
|
+
}
|
|
157
|
+
let type;
|
|
158
|
+
if (stat.isSymbolicLink && params.followSymlinks === false) {
|
|
159
|
+
type = ResourceType.Symlink;
|
|
160
|
+
} else if (stat.isDirectory) {
|
|
161
|
+
type = ResourceType.Directory;
|
|
162
|
+
} else {
|
|
163
|
+
type = ResourceType.File;
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
uri: ( uri.toString()),
|
|
167
|
+
type,
|
|
168
|
+
...(stat.size !== undefined ? {
|
|
169
|
+
size: stat.size
|
|
170
|
+
} : {}),
|
|
171
|
+
...(stat.mtime !== undefined ? {
|
|
172
|
+
mtime: ( new Date(stat.mtime)).toISOString()
|
|
173
|
+
} : {}),
|
|
174
|
+
...(stat.ctime !== undefined ? {
|
|
175
|
+
ctime: ( new Date(stat.ctime)).toISOString()
|
|
176
|
+
} : {}),
|
|
177
|
+
...(stat.etag ? {
|
|
178
|
+
etag: stat.etag
|
|
179
|
+
} : {})
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
async mkdir(address, params) {
|
|
183
|
+
const uri = ( URI.parse(params.uri));
|
|
184
|
+
await this._gate(address, uri, AgentHostPermissionMode.Write, {
|
|
185
|
+
channel: ROOT_STATE_URI,
|
|
186
|
+
uri: ( uri.toString()),
|
|
187
|
+
write: true
|
|
188
|
+
});
|
|
189
|
+
const existing = await this._fileService.stat(uri).catch(() => undefined);
|
|
190
|
+
if (existing && !existing.isDirectory) {
|
|
191
|
+
throw ( new Error(`Path exists and is not a directory: ${( uri.toString())}`));
|
|
192
|
+
}
|
|
193
|
+
await this._fileService.createFolder(uri);
|
|
194
|
+
}
|
|
31
195
|
async check(address, uri, mode) {
|
|
32
196
|
const normalized = normalizeRemoteAgentHostAddress(address);
|
|
33
197
|
const canonical = await this._canonicalize(uri);
|
|
@@ -83,6 +247,56 @@ let AgentHostPermissionService = class AgentHostPermissionService extends Dispos
|
|
|
83
247
|
this._pending.set(remaining, undefined);
|
|
84
248
|
}
|
|
85
249
|
}
|
|
250
|
+
async _gate(address, uri, mode, deniedRequest) {
|
|
251
|
+
if (!(await this.check(address, uri, mode))) {
|
|
252
|
+
throw ( new AgentHostResourcePermissionError(deniedRequest));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async _readVirtual(uri) {
|
|
256
|
+
try {
|
|
257
|
+
const ref = await this._textModelService.createModelReference(uri);
|
|
258
|
+
try {
|
|
259
|
+
return VSBuffer.fromString(ref.object.textEditorModel.getValue());
|
|
260
|
+
} finally {
|
|
261
|
+
ref.dispose();
|
|
262
|
+
}
|
|
263
|
+
} catch {
|
|
264
|
+
return undefined;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async _writeVirtual(uri, bytes) {
|
|
268
|
+
try {
|
|
269
|
+
const ref = await this._textModelService.createModelReference(uri);
|
|
270
|
+
try {
|
|
271
|
+
if (ref.object.isReadonly()) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
ref.object.textEditorModel.setValue(( bytes.toString()));
|
|
275
|
+
return true;
|
|
276
|
+
} finally {
|
|
277
|
+
ref.dispose();
|
|
278
|
+
}
|
|
279
|
+
} catch {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
async _statVirtual(uri) {
|
|
284
|
+
try {
|
|
285
|
+
const ref = await this._textModelService.createModelReference(uri);
|
|
286
|
+
try {
|
|
287
|
+
const size = VSBuffer.fromString(ref.object.textEditorModel.getValue()).byteLength;
|
|
288
|
+
return {
|
|
289
|
+
uri: ( uri.toString()),
|
|
290
|
+
type: ResourceType.File,
|
|
291
|
+
size
|
|
292
|
+
};
|
|
293
|
+
} finally {
|
|
294
|
+
ref.dispose();
|
|
295
|
+
}
|
|
296
|
+
} catch {
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
86
300
|
async _canonicalize(uri) {
|
|
87
301
|
const normalized = extUri.normalizePath(uri);
|
|
88
302
|
const real = await this._fileService.realpath(normalized).catch(() => undefined);
|
|
@@ -97,6 +311,9 @@ let AgentHostPermissionService = class AgentHostPermissionService extends Dispos
|
|
|
97
311
|
return realParent ? extUri.joinPath(realParent, extUri.basename(normalized)) : normalized;
|
|
98
312
|
}
|
|
99
313
|
async _isCovered(address, canonicalUri, mode) {
|
|
314
|
+
if (address === LOCAL_AGENT_HOST_ADDRESS) {
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
100
317
|
const requireWrite = mode === AgentHostPermissionMode.Write;
|
|
101
318
|
for (const grant of this._readPersistedGrants(address)) {
|
|
102
319
|
if (requireWrite && grant.mode !== AgentHostAccessMode.ReadWrite) {
|
|
@@ -152,7 +369,7 @@ let AgentHostPermissionService = class AgentHostPermissionService extends Dispos
|
|
|
152
369
|
});
|
|
153
370
|
if (scope === "persist") {
|
|
154
371
|
void this._persistGrant(request.address, request.uri, request.mode).catch(err => {
|
|
155
|
-
this._logService.warn("[
|
|
372
|
+
this._logService.warn("[AgentHostResourceService] Failed to persist grant", err);
|
|
156
373
|
});
|
|
157
374
|
}
|
|
158
375
|
this._dropPending(request);
|
|
@@ -238,6 +455,6 @@ let AgentHostPermissionService = class AgentHostPermissionService extends Dispos
|
|
|
238
455
|
};
|
|
239
456
|
}
|
|
240
457
|
};
|
|
241
|
-
|
|
458
|
+
AgentHostResourceService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, ITextModelService)), ( __param(3, ILogService))], AgentHostResourceService));
|
|
242
459
|
|
|
243
|
-
export {
|
|
460
|
+
export { AgentHostResourceService };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type RootState, type SessionState, type TerminalState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
2
|
-
import { type RootAction, type ClientRootAction, type SessionAction, type ClientSessionAction, type TerminalAction, type ClientTerminalAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/action-origin.generated";
|
|
3
|
-
/**
|
|
4
|
-
* Soft assertion for exhaustiveness checking. Place in the `default` branch of
|
|
5
|
-
* a switch on a discriminated union so the compiler errors when a new variant
|
|
6
|
-
* is added but not handled.
|
|
7
|
-
*
|
|
8
|
-
* At runtime, logs a warning instead of throwing so that forward-compatible
|
|
9
|
-
* clients receiving unknown actions from a newer server degrade gracefully.
|
|
10
|
-
*/
|
|
11
|
-
export declare function softAssertNever(value: never, log?: (msg: string) => void): void;
|
|
12
|
-
/**
|
|
13
|
-
* Pure reducer for root state. Handles all {@link RootAction} variants.
|
|
14
|
-
*/
|
|
15
|
-
export declare function rootReducer(state: RootState, action: RootAction, log?: (msg: string) => void): RootState;
|
|
16
|
-
/**
|
|
17
|
-
* Pure reducer for session state. Handles all {@link SessionAction} variants.
|
|
18
|
-
*/
|
|
19
|
-
export declare function sessionReducer(state: SessionState, action: SessionAction, log?: (msg: string) => void): SessionState;
|
|
20
|
-
/**
|
|
21
|
-
* Pure reducer for terminal state. Handles all {@link TerminalAction} variants.
|
|
22
|
-
*/
|
|
23
|
-
export declare function terminalReducer(state: TerminalState, action: TerminalAction, log?: (msg: string) => void): TerminalState;
|
|
24
|
-
/**
|
|
25
|
-
* Type guard that checks whether an action may be dispatched by a client.
|
|
26
|
-
*
|
|
27
|
-
* Servers SHOULD call this to validate incoming `dispatchAction` requests
|
|
28
|
-
* and reject any action the client is not allowed to originate.
|
|
29
|
-
*/
|
|
30
|
-
export declare function isClientDispatchable(action: RootAction | SessionAction | TerminalAction): action is ClientRootAction | ClientSessionAction | ClientTerminalAction;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
3
|
-
import { IMcpServerConfiguration } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes";
|
|
4
|
-
/** A single hook command to execute. Platform resolution happens at conversion time. */
|
|
5
|
-
export interface IParsedHookCommand {
|
|
6
|
-
/** Cross-platform default command. */
|
|
7
|
-
readonly command?: string;
|
|
8
|
-
/** Windows-specific command. */
|
|
9
|
-
readonly windows?: string;
|
|
10
|
-
/** Linux-specific command. */
|
|
11
|
-
readonly linux?: string;
|
|
12
|
-
/** macOS-specific command. */
|
|
13
|
-
readonly osx?: string;
|
|
14
|
-
/** Working directory. */
|
|
15
|
-
readonly cwd?: URI;
|
|
16
|
-
/** Environment variables. */
|
|
17
|
-
readonly env?: Record<string, string>;
|
|
18
|
-
/** Timeout in seconds. */
|
|
19
|
-
readonly timeout?: number;
|
|
20
|
-
/** URI of the file this hook was defined in. */
|
|
21
|
-
readonly sourceUri?: URI;
|
|
22
|
-
}
|
|
23
|
-
/** A group of hooks for a single lifecycle event. */
|
|
24
|
-
export interface IParsedHookGroup {
|
|
25
|
-
/** Canonical hook type identifier (e.g. `'SessionStart'`, `'PreToolUse'`). */
|
|
26
|
-
readonly type: string;
|
|
27
|
-
/** The commands to execute for this hook type. */
|
|
28
|
-
readonly commands: readonly IParsedHookCommand[];
|
|
29
|
-
/** URI where this hook is defined. */
|
|
30
|
-
readonly uri: URI;
|
|
31
|
-
/** Original key as it appears in the hook file. */
|
|
32
|
-
readonly originalId: string;
|
|
33
|
-
}
|
|
34
|
-
export interface IMcpServerDefinition {
|
|
35
|
-
readonly name: string;
|
|
36
|
-
readonly configuration: IMcpServerConfiguration;
|
|
37
|
-
readonly uri: URI;
|
|
38
|
-
}
|
|
39
|
-
/** A named resource (skill, agent, command, or instruction) within a plugin. */
|
|
40
|
-
export interface INamedPluginResource {
|
|
41
|
-
readonly uri: URI;
|
|
42
|
-
readonly name: string;
|
|
43
|
-
}
|
|
44
|
-
/** The result of parsing a single plugin directory. */
|
|
45
|
-
export interface IParsedPlugin {
|
|
46
|
-
readonly hooks: readonly IParsedHookGroup[];
|
|
47
|
-
readonly mcpServers: readonly IMcpServerDefinition[];
|
|
48
|
-
readonly skills: readonly INamedPluginResource[];
|
|
49
|
-
readonly agents: readonly INamedPluginResource[];
|
|
50
|
-
}
|
|
51
|
-
export declare enum PluginFormat {
|
|
52
|
-
Copilot = 0,
|
|
53
|
-
Claude = 1,
|
|
54
|
-
OpenPlugin = 2
|
|
55
|
-
}
|
|
56
|
-
export interface IPluginFormatConfig {
|
|
57
|
-
readonly format: PluginFormat;
|
|
58
|
-
readonly manifestPath: string;
|
|
59
|
-
readonly hookConfigPath: string;
|
|
60
|
-
readonly pluginRootToken: string | undefined;
|
|
61
|
-
readonly pluginRootEnvVar: string | undefined;
|
|
62
|
-
/** Parses hooks from a JSON object using the format's conventions. */
|
|
63
|
-
parseHooks(hookUri: URI, json: unknown, pluginUri: URI, workspaceRoot: URI | undefined, userHome: string): IParsedHookGroup[];
|
|
64
|
-
}
|
|
65
|
-
export declare function detectPluginFormat(pluginUri: URI, fileService: IFileService): Promise<IPluginFormatConfig>;
|
|
66
|
-
export interface IComponentPathConfig {
|
|
67
|
-
readonly paths: readonly string[];
|
|
68
|
-
readonly exclusive: boolean;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Parses a manifest component path field into a normalized config.
|
|
72
|
-
* Supports `undefined`, `string`, `string[]`, and `{ paths: string[], exclusive?: boolean }`.
|
|
73
|
-
*/
|
|
74
|
-
export declare function parseComponentPathConfig(raw: unknown): IComponentPathConfig;
|
|
75
|
-
/**
|
|
76
|
-
* Resolves the directories to scan for a given component type, combining
|
|
77
|
-
* the default directory with any custom paths from the manifest config.
|
|
78
|
-
* Paths that resolve outside the boundary are silently ignored.
|
|
79
|
-
* @param boundaryUri The outermost directory that resolved paths must stay within. Defaults to {@link pluginUri}.
|
|
80
|
-
*/
|
|
81
|
-
export declare function resolveComponentDirs(pluginUri: URI, defaultDir: string, config: IComponentPathConfig, boundaryUri?: URI): readonly URI[];
|
|
82
|
-
/**
|
|
83
|
-
* Extracts the MCP server map from a raw JSON value. Accepts both the
|
|
84
|
-
* wrapped format `{ mcpServers: { … } }` and the flat format.
|
|
85
|
-
*/
|
|
86
|
-
export declare function resolveMcpServersMap(raw: unknown): Record<string, unknown> | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Normalizes a raw JSON value into a typed MCP server configuration.
|
|
89
|
-
*/
|
|
90
|
-
export declare function normalizeMcpServerConfiguration(rawConfig: unknown): IMcpServerConfiguration | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Replaces a plugin-root token in a shell command string with the
|
|
93
|
-
* given fsPath, shell-quoting if the path contains special characters.
|
|
94
|
-
*/
|
|
95
|
-
export declare function shellQuotePluginRootInCommand(command: string, fsPath: string, token: string): string;
|
|
96
|
-
/**
|
|
97
|
-
* Replaces plugin-root token references in MCP server definition string fields
|
|
98
|
-
* with the plugin root filesystem path.
|
|
99
|
-
*/
|
|
100
|
-
export declare function interpolateMcpPluginRoot(def: IMcpServerDefinition, fsPath: string, token: string, envVar: string): IMcpServerDefinition;
|
|
101
|
-
/**
|
|
102
|
-
* Converts bare `${VAR}` environment-variable references to VS Code `${env:VAR}` syntax.
|
|
103
|
-
*/
|
|
104
|
-
export declare function convertBareEnvVarsToVsCodeSyntax(def: IMcpServerDefinition): IMcpServerDefinition;
|
|
105
|
-
/**
|
|
106
|
-
* Applies plugin-root token interpolation to hook commands for
|
|
107
|
-
* Claude and OpenPlugin formats.
|
|
108
|
-
*/
|
|
109
|
-
export declare function interpolateHookPluginRoot(hookUri: URI, json: unknown, pluginUri: URI, workspaceRoot: URI | undefined, userHome: string, token: string, envVar: string): IParsedHookGroup[];
|
|
110
|
-
export declare function readJsonFile(uri: URI, fileService: IFileService): Promise<unknown | undefined>;
|
|
111
|
-
export declare function pathExists(resource: URI, fileService: IFileService): Promise<boolean>;
|
|
112
|
-
export declare function readSkills(pluginRoot: URI, dirs: readonly URI[], fileService: IFileService): Promise<readonly INamedPluginResource[]>;
|
|
113
|
-
export declare function readMarkdownComponents(dirs: readonly URI[], fileService: IFileService): Promise<readonly INamedPluginResource[]>;
|
|
114
|
-
export declare function parseMcpServerDefinitionMap(definitionURI: URI, raw: unknown, pluginFsPath: string, formatConfig: IPluginFormatConfig): IMcpServerDefinition[];
|
|
115
|
-
/**
|
|
116
|
-
* Parses a plugin directory to extract hooks, MCP servers, skills, and agents.
|
|
117
|
-
* This is the main entry point for the agent host to discover plugin contents.
|
|
118
|
-
*/
|
|
119
|
-
export declare function parsePlugin(pluginUri: URI, fileService: IFileService, workspaceRoot: URI | undefined, userHome: string, boundaryUri?: URI): Promise<IParsedPlugin>;
|