@codingame/monaco-vscode-chat-service-override 33.0.8 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
3
|
-
import { cloneAndChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
4
|
-
import { isAbsolute } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
5
|
-
import { untildify } from '@codingame/monaco-vscode-api/vscode/vs/base/common/labels';
|
|
6
|
-
import { joinPath, isEqualOrParent, normalizePath, basename, extname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
8
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
9
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
|
-
import { McpServerType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes';
|
|
11
|
-
|
|
12
|
-
var PluginFormat;
|
|
13
|
-
(function(PluginFormat) {
|
|
14
|
-
PluginFormat[PluginFormat["Copilot"] = 0] = "Copilot";
|
|
15
|
-
PluginFormat[PluginFormat["Claude"] = 1] = "Claude";
|
|
16
|
-
PluginFormat[PluginFormat["OpenPlugin"] = 2] = "OpenPlugin";
|
|
17
|
-
})(PluginFormat || (PluginFormat = {}));
|
|
18
|
-
const COPILOT_FORMAT = {
|
|
19
|
-
format: PluginFormat.Copilot,
|
|
20
|
-
manifestPath: "plugin.json",
|
|
21
|
-
hookConfigPath: "hooks.json",
|
|
22
|
-
pluginRootToken: undefined,
|
|
23
|
-
pluginRootEnvVar: undefined,
|
|
24
|
-
parseHooks(hookUri, json, _pluginUri, workspaceRoot, userHome) {
|
|
25
|
-
return parseHooksJson(hookUri, json, workspaceRoot, userHome);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const CLAUDE_FORMAT = {
|
|
29
|
-
format: PluginFormat.Claude,
|
|
30
|
-
manifestPath: ".claude-plugin/plugin.json",
|
|
31
|
-
hookConfigPath: "hooks/hooks.json",
|
|
32
|
-
pluginRootToken: "${CLAUDE_PLUGIN_ROOT}",
|
|
33
|
-
pluginRootEnvVar: "CLAUDE_PLUGIN_ROOT",
|
|
34
|
-
parseHooks(hookUri, json, pluginUri, workspaceRoot, userHome) {
|
|
35
|
-
return interpolateHookPluginRoot(
|
|
36
|
-
hookUri,
|
|
37
|
-
json,
|
|
38
|
-
pluginUri,
|
|
39
|
-
workspaceRoot,
|
|
40
|
-
userHome,
|
|
41
|
-
"${CLAUDE_PLUGIN_ROOT}",
|
|
42
|
-
"CLAUDE_PLUGIN_ROOT"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const OPEN_PLUGIN_FORMAT = {
|
|
47
|
-
format: PluginFormat.OpenPlugin,
|
|
48
|
-
manifestPath: ".plugin/plugin.json",
|
|
49
|
-
hookConfigPath: "hooks/hooks.json",
|
|
50
|
-
pluginRootToken: "${PLUGIN_ROOT}",
|
|
51
|
-
pluginRootEnvVar: "PLUGIN_ROOT",
|
|
52
|
-
parseHooks(hookUri, json, pluginUri, workspaceRoot, userHome) {
|
|
53
|
-
return interpolateHookPluginRoot(
|
|
54
|
-
hookUri,
|
|
55
|
-
json,
|
|
56
|
-
pluginUri,
|
|
57
|
-
workspaceRoot,
|
|
58
|
-
userHome,
|
|
59
|
-
"${PLUGIN_ROOT}",
|
|
60
|
-
"PLUGIN_ROOT"
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
async function detectPluginFormat(pluginUri, fileService) {
|
|
65
|
-
if (await pathExists(joinPath(pluginUri, ".plugin", "plugin.json"), fileService)) {
|
|
66
|
-
return OPEN_PLUGIN_FORMAT;
|
|
67
|
-
}
|
|
68
|
-
const isInClaudeDirectory = pluginUri.path.split("/").includes(".claude");
|
|
69
|
-
if (isInClaudeDirectory || (await pathExists(joinPath(pluginUri, ".claude-plugin", "plugin.json"), fileService))) {
|
|
70
|
-
return CLAUDE_FORMAT;
|
|
71
|
-
}
|
|
72
|
-
return COPILOT_FORMAT;
|
|
73
|
-
}
|
|
74
|
-
const emptyComponentPathConfig = {
|
|
75
|
-
paths: [],
|
|
76
|
-
exclusive: false
|
|
77
|
-
};
|
|
78
|
-
function parseComponentPathConfig(raw) {
|
|
79
|
-
if (raw === undefined || raw === null) {
|
|
80
|
-
return emptyComponentPathConfig;
|
|
81
|
-
}
|
|
82
|
-
if (typeof raw === "string") {
|
|
83
|
-
const trimmed = raw.trim();
|
|
84
|
-
return trimmed ? {
|
|
85
|
-
paths: [trimmed],
|
|
86
|
-
exclusive: false
|
|
87
|
-
} : emptyComponentPathConfig;
|
|
88
|
-
}
|
|
89
|
-
if (Array.isArray(raw)) {
|
|
90
|
-
const paths = ( raw.filter(v => typeof v === "string").map(v => v.trim())).filter(v => v.length > 0);
|
|
91
|
-
return {
|
|
92
|
-
paths,
|
|
93
|
-
exclusive: false
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
if (typeof raw === "object") {
|
|
97
|
-
const obj = raw;
|
|
98
|
-
if (Array.isArray(obj["paths"])) {
|
|
99
|
-
const paths = ( obj["paths"].filter(v => typeof v === "string").map(v => v.trim())).filter(v => v.length > 0);
|
|
100
|
-
const exclusive = obj["exclusive"] === true;
|
|
101
|
-
return {
|
|
102
|
-
paths,
|
|
103
|
-
exclusive
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return emptyComponentPathConfig;
|
|
108
|
-
}
|
|
109
|
-
function resolveComponentDirs(pluginUri, defaultDir, config, boundaryUri) {
|
|
110
|
-
const boundary = (boundaryUri && isEqualOrParent(pluginUri, boundaryUri)) ? boundaryUri : pluginUri;
|
|
111
|
-
const dirs = [];
|
|
112
|
-
if (!config.exclusive) {
|
|
113
|
-
dirs.push(joinPath(pluginUri, defaultDir));
|
|
114
|
-
}
|
|
115
|
-
for (const p of config.paths) {
|
|
116
|
-
const resolved = normalizePath(joinPath(pluginUri, p));
|
|
117
|
-
if (isEqualOrParent(resolved, boundary)) {
|
|
118
|
-
dirs.push(resolved);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return dirs;
|
|
122
|
-
}
|
|
123
|
-
function resolveMcpServersMap(raw) {
|
|
124
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
const obj = raw;
|
|
128
|
-
return Object.hasOwn(obj, "mcpServers") ? obj.mcpServers : obj;
|
|
129
|
-
}
|
|
130
|
-
function normalizeMcpServerConfiguration(rawConfig) {
|
|
131
|
-
if (!rawConfig || typeof rawConfig !== "object") {
|
|
132
|
-
return undefined;
|
|
133
|
-
}
|
|
134
|
-
const candidate = rawConfig;
|
|
135
|
-
const type = typeof candidate["type"] === "string" ? candidate["type"] : undefined;
|
|
136
|
-
const command = typeof candidate["command"] === "string" ? candidate["command"] : undefined;
|
|
137
|
-
const url = typeof candidate["url"] === "string" ? candidate["url"] : undefined;
|
|
138
|
-
const args = Array.isArray(candidate["args"]) ? candidate["args"].filter(value => typeof value === "string") : undefined;
|
|
139
|
-
const env = candidate["env"] && typeof candidate["env"] === "object" ? Object.fromEntries(( Object.entries(candidate["env"]).filter(
|
|
140
|
-
([, value]) => typeof value === "string" || typeof value === "number" || value === null
|
|
141
|
-
).map(([key, value]) => [key, value]))) : undefined;
|
|
142
|
-
const envFile = typeof candidate["envFile"] === "string" ? candidate["envFile"] : undefined;
|
|
143
|
-
const cwd = typeof candidate["cwd"] === "string" ? candidate["cwd"] : undefined;
|
|
144
|
-
const headers = candidate["headers"] && typeof candidate["headers"] === "object" ? Object.fromEntries(( Object.entries(candidate["headers"]).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, value]))) : undefined;
|
|
145
|
-
const dev = candidate["dev"] && typeof candidate["dev"] === "object" ? candidate["dev"] : undefined;
|
|
146
|
-
if (type === "ws") {
|
|
147
|
-
return undefined;
|
|
148
|
-
}
|
|
149
|
-
if (type === McpServerType.LOCAL || (!type && command)) {
|
|
150
|
-
if (!command) {
|
|
151
|
-
return undefined;
|
|
152
|
-
}
|
|
153
|
-
return {
|
|
154
|
-
type: McpServerType.LOCAL,
|
|
155
|
-
command,
|
|
156
|
-
args,
|
|
157
|
-
env,
|
|
158
|
-
envFile,
|
|
159
|
-
cwd,
|
|
160
|
-
dev
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
if (type === McpServerType.REMOTE || type === "sse" || (!type && url)) {
|
|
164
|
-
if (!url) {
|
|
165
|
-
return undefined;
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
type: McpServerType.REMOTE,
|
|
169
|
-
url,
|
|
170
|
-
headers,
|
|
171
|
-
dev
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
return undefined;
|
|
175
|
-
}
|
|
176
|
-
const shellUnsafeChars = /[\s&|<>()^;!`"']/;
|
|
177
|
-
function shellQuotePluginRootInCommand(command, fsPath, token) {
|
|
178
|
-
if (!command.includes(token)) {
|
|
179
|
-
return command;
|
|
180
|
-
}
|
|
181
|
-
if (!shellUnsafeChars.test(fsPath)) {
|
|
182
|
-
return command.replaceAll(token, fsPath);
|
|
183
|
-
}
|
|
184
|
-
const escapedToken = escapeRegExpCharacters(token);
|
|
185
|
-
const pattern = ( new RegExp(`(["']?)` + escapedToken + `([\\w./\\\\~:-]*)`, "g"));
|
|
186
|
-
return command.replace(pattern, (_match, leadingQuote, suffix) => {
|
|
187
|
-
const fullPath = fsPath + suffix;
|
|
188
|
-
if (leadingQuote) {
|
|
189
|
-
return leadingQuote + fullPath;
|
|
190
|
-
}
|
|
191
|
-
return "\"" + fullPath.replace(/"/g, "\\\"") + "\"";
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function interpolateMcpPluginRoot(def, fsPath, token, envVar) {
|
|
195
|
-
const replace = s => s.replaceAll(token, fsPath);
|
|
196
|
-
const config = def.configuration;
|
|
197
|
-
let interpolated;
|
|
198
|
-
if (config.type === McpServerType.LOCAL) {
|
|
199
|
-
const local = {
|
|
200
|
-
...config
|
|
201
|
-
};
|
|
202
|
-
local.command = replace(local.command);
|
|
203
|
-
if (local.args) {
|
|
204
|
-
local.args = ( local.args.map(replace));
|
|
205
|
-
}
|
|
206
|
-
if (local.cwd) {
|
|
207
|
-
local.cwd = replace(local.cwd);
|
|
208
|
-
}
|
|
209
|
-
local.env = {
|
|
210
|
-
...local.env
|
|
211
|
-
};
|
|
212
|
-
for (const [k, v] of Object.entries(local.env)) {
|
|
213
|
-
if (typeof v === "string") {
|
|
214
|
-
local.env[k] = replace(v);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
local.env[envVar] = fsPath;
|
|
218
|
-
if (local.envFile) {
|
|
219
|
-
local.envFile = replace(local.envFile);
|
|
220
|
-
}
|
|
221
|
-
interpolated = local;
|
|
222
|
-
} else {
|
|
223
|
-
const remote = {
|
|
224
|
-
...config
|
|
225
|
-
};
|
|
226
|
-
remote.url = replace(remote.url);
|
|
227
|
-
if (remote.headers) {
|
|
228
|
-
remote.headers = Object.fromEntries(( Object.entries(remote.headers).map(([k, v]) => [k, replace(v)])));
|
|
229
|
-
}
|
|
230
|
-
interpolated = remote;
|
|
231
|
-
}
|
|
232
|
-
return {
|
|
233
|
-
name: def.name,
|
|
234
|
-
configuration: interpolated,
|
|
235
|
-
uri: def.uri
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
const BARE_ENV_VAR_RE = /\$\{(?![A-Za-z]+:)([A-Z_][A-Z0-9_]*)\}/g;
|
|
239
|
-
function convertBareEnvVarsToVsCodeSyntax(def) {
|
|
240
|
-
return cloneAndChange(def, value => {
|
|
241
|
-
if (URI.isUri(value)) {
|
|
242
|
-
return value;
|
|
243
|
-
}
|
|
244
|
-
if (typeof value === "string") {
|
|
245
|
-
const replaced = value.replace(BARE_ENV_VAR_RE, "${env:$1}");
|
|
246
|
-
return replaced !== value ? replaced : undefined;
|
|
247
|
-
}
|
|
248
|
-
return undefined;
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
const HOOK_TYPE_MAP = {
|
|
252
|
-
"SessionStart": "SessionStart",
|
|
253
|
-
"SessionEnd": "SessionEnd",
|
|
254
|
-
"UserPromptSubmit": "UserPromptSubmit",
|
|
255
|
-
"PreToolUse": "PreToolUse",
|
|
256
|
-
"PostToolUse": "PostToolUse",
|
|
257
|
-
"PreCompact": "PreCompact",
|
|
258
|
-
"SubagentStart": "SubagentStart",
|
|
259
|
-
"SubagentStop": "SubagentStop",
|
|
260
|
-
"Stop": "Stop",
|
|
261
|
-
"ErrorOccurred": "ErrorOccurred",
|
|
262
|
-
"sessionStart": "SessionStart",
|
|
263
|
-
"sessionEnd": "SessionEnd",
|
|
264
|
-
"userPromptSubmitted": "UserPromptSubmit",
|
|
265
|
-
"preToolUse": "PreToolUse",
|
|
266
|
-
"postToolUse": "PostToolUse",
|
|
267
|
-
"agentStop": "Stop",
|
|
268
|
-
"subagentStop": "SubagentStop",
|
|
269
|
-
"errorOccurred": "ErrorOccurred"
|
|
270
|
-
};
|
|
271
|
-
function normalizeHookCommand(raw) {
|
|
272
|
-
if (raw.type !== undefined && raw.type !== "command") {
|
|
273
|
-
return undefined;
|
|
274
|
-
}
|
|
275
|
-
const hasCommand = typeof raw.command === "string" && raw.command.length > 0;
|
|
276
|
-
const hasBash = typeof raw.bash === "string" && raw.bash.length > 0;
|
|
277
|
-
const hasPowerShell = typeof raw.powershell === "string" && raw.powershell.length > 0;
|
|
278
|
-
const hasWindows = typeof raw.windows === "string" && raw.windows.length > 0;
|
|
279
|
-
const hasLinux = typeof raw.linux === "string" && raw.linux.length > 0;
|
|
280
|
-
const hasOsx = typeof raw.osx === "string" && raw.osx.length > 0;
|
|
281
|
-
if (!hasCommand && !hasBash && !hasPowerShell && !hasWindows && !hasLinux && !hasOsx) {
|
|
282
|
-
return undefined;
|
|
283
|
-
}
|
|
284
|
-
const windows = hasWindows ? raw.windows : (hasPowerShell ? raw.powershell : undefined);
|
|
285
|
-
const linux = hasLinux ? raw.linux : (hasBash ? raw.bash : undefined);
|
|
286
|
-
const osx = hasOsx ? raw.osx : (hasBash ? raw.bash : undefined);
|
|
287
|
-
const timeout = typeof raw.timeout === "number" ? raw.timeout : (typeof raw.timeoutSec === "number" ? raw.timeoutSec : undefined);
|
|
288
|
-
return {
|
|
289
|
-
...(hasCommand && {
|
|
290
|
-
command: raw.command
|
|
291
|
-
}),
|
|
292
|
-
...(windows && {
|
|
293
|
-
windows
|
|
294
|
-
}),
|
|
295
|
-
...(linux && {
|
|
296
|
-
linux
|
|
297
|
-
}),
|
|
298
|
-
...(osx && {
|
|
299
|
-
osx
|
|
300
|
-
}),
|
|
301
|
-
...(typeof raw.env === "object" && raw.env !== null && {
|
|
302
|
-
env: raw.env
|
|
303
|
-
}),
|
|
304
|
-
...(timeout !== undefined && {
|
|
305
|
-
timeout
|
|
306
|
-
})
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
function resolveHookCommand(raw, workspaceRoot, userHome) {
|
|
310
|
-
const normalized = normalizeHookCommand(raw);
|
|
311
|
-
if (!normalized) {
|
|
312
|
-
return undefined;
|
|
313
|
-
}
|
|
314
|
-
let cwdUri;
|
|
315
|
-
const rawCwd = typeof raw.cwd === "string" ? raw.cwd : undefined;
|
|
316
|
-
if (rawCwd) {
|
|
317
|
-
const expanded = untildify(rawCwd, userHome);
|
|
318
|
-
if (isAbsolute(expanded)) {
|
|
319
|
-
cwdUri = URI.file(expanded);
|
|
320
|
-
} else if (workspaceRoot) {
|
|
321
|
-
cwdUri = joinPath(workspaceRoot, expanded);
|
|
322
|
-
}
|
|
323
|
-
} else {
|
|
324
|
-
cwdUri = workspaceRoot;
|
|
325
|
-
}
|
|
326
|
-
return {
|
|
327
|
-
...normalized,
|
|
328
|
-
cwd: cwdUri
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
function extractHookCommands(item, workspaceRoot, userHome) {
|
|
332
|
-
if (!item || typeof item !== "object") {
|
|
333
|
-
return [];
|
|
334
|
-
}
|
|
335
|
-
const itemObj = item;
|
|
336
|
-
const commands = [];
|
|
337
|
-
const nestedHooks = itemObj.hooks;
|
|
338
|
-
if (nestedHooks !== undefined && Array.isArray(nestedHooks)) {
|
|
339
|
-
for (const nested of nestedHooks) {
|
|
340
|
-
if (!nested || typeof nested !== "object") {
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
const resolved = resolveHookCommand(nested, workspaceRoot, userHome);
|
|
344
|
-
if (resolved) {
|
|
345
|
-
commands.push(resolved);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
} else {
|
|
349
|
-
const resolved = resolveHookCommand(itemObj, workspaceRoot, userHome);
|
|
350
|
-
if (resolved) {
|
|
351
|
-
commands.push(resolved);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
return commands;
|
|
355
|
-
}
|
|
356
|
-
function parseHooksJson(hookUri, json, workspaceRoot, userHome) {
|
|
357
|
-
if (!json || typeof json !== "object") {
|
|
358
|
-
return [];
|
|
359
|
-
}
|
|
360
|
-
const root = json;
|
|
361
|
-
if (root.disableAllHooks === true) {
|
|
362
|
-
return [];
|
|
363
|
-
}
|
|
364
|
-
const hooks = root.hooks;
|
|
365
|
-
if (!hooks || typeof hooks !== "object") {
|
|
366
|
-
return [];
|
|
367
|
-
}
|
|
368
|
-
const hooksObj = hooks;
|
|
369
|
-
const result = [];
|
|
370
|
-
for (const originalId of ( Object.keys(hooksObj))) {
|
|
371
|
-
const canonicalType = HOOK_TYPE_MAP[originalId];
|
|
372
|
-
if (!canonicalType) {
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
const hookArray = hooksObj[originalId];
|
|
376
|
-
if (!Array.isArray(hookArray)) {
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
const commands = [];
|
|
380
|
-
for (const item of hookArray) {
|
|
381
|
-
commands.push(...extractHookCommands(item, workspaceRoot, userHome));
|
|
382
|
-
}
|
|
383
|
-
if (commands.length > 0) {
|
|
384
|
-
result.push({
|
|
385
|
-
type: canonicalType,
|
|
386
|
-
commands,
|
|
387
|
-
uri: hookUri,
|
|
388
|
-
originalId
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return result;
|
|
393
|
-
}
|
|
394
|
-
function interpolateHookPluginRoot(hookUri, json, pluginUri, workspaceRoot, userHome, token, envVar) {
|
|
395
|
-
const fsPath = pluginUri.fsPath;
|
|
396
|
-
const typedJson = json;
|
|
397
|
-
const mutateHookCommand = hook => {
|
|
398
|
-
for (const field of ["command", "windows", "linux", "osx"]) {
|
|
399
|
-
if (typeof hook[field] === "string") {
|
|
400
|
-
hook[field] = shellQuotePluginRootInCommand(hook[field], fsPath, token);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
if (!hook.env || typeof hook.env !== "object") {
|
|
404
|
-
hook.env = {};
|
|
405
|
-
}
|
|
406
|
-
hook.env[envVar] = fsPath;
|
|
407
|
-
};
|
|
408
|
-
for (const lifecycle of ( Object.values(typedJson.hooks ?? {}))) {
|
|
409
|
-
if (!Array.isArray(lifecycle)) {
|
|
410
|
-
continue;
|
|
411
|
-
}
|
|
412
|
-
for (const lifecycleEntry of lifecycle) {
|
|
413
|
-
if (!lifecycleEntry || typeof lifecycleEntry !== "object") {
|
|
414
|
-
continue;
|
|
415
|
-
}
|
|
416
|
-
const entry = lifecycleEntry;
|
|
417
|
-
if (Array.isArray(entry.hooks)) {
|
|
418
|
-
for (const hook of entry.hooks) {
|
|
419
|
-
mutateHookCommand(hook);
|
|
420
|
-
}
|
|
421
|
-
} else {
|
|
422
|
-
mutateHookCommand(entry);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
const replacer = v => {
|
|
427
|
-
return typeof v === "string" ? v.replaceAll(token, pluginUri.fsPath) : undefined;
|
|
428
|
-
};
|
|
429
|
-
return parseHooksJson(hookUri, cloneAndChange(json, replacer), workspaceRoot, userHome);
|
|
430
|
-
}
|
|
431
|
-
async function pathExists(resource, fileService) {
|
|
432
|
-
try {
|
|
433
|
-
await fileService.resolve(resource);
|
|
434
|
-
return true;
|
|
435
|
-
} catch {
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
const COMMAND_FILE_SUFFIX = ".md";
|
|
440
|
-
async function readSkills(pluginRoot, dirs, fileService) {
|
|
441
|
-
const seen = ( new Set());
|
|
442
|
-
const skills = [];
|
|
443
|
-
const addSkill = (name, skillMd) => {
|
|
444
|
-
if (!( seen.has(name))) {
|
|
445
|
-
seen.add(name);
|
|
446
|
-
skills.push({
|
|
447
|
-
uri: skillMd,
|
|
448
|
-
name
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
for (const dir of dirs) {
|
|
453
|
-
const skillMd = URI.joinPath(dir, "SKILL.md");
|
|
454
|
-
if (await pathExists(skillMd, fileService)) {
|
|
455
|
-
addSkill(basename(dir), skillMd);
|
|
456
|
-
continue;
|
|
457
|
-
}
|
|
458
|
-
let stat;
|
|
459
|
-
try {
|
|
460
|
-
stat = await fileService.resolve(dir);
|
|
461
|
-
} catch {
|
|
462
|
-
continue;
|
|
463
|
-
}
|
|
464
|
-
if (!stat.isDirectory || !stat.children) {
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
for (const child of stat.children) {
|
|
468
|
-
const childSkillMd = URI.joinPath(child.resource, "SKILL.md");
|
|
469
|
-
if (await pathExists(childSkillMd, fileService)) {
|
|
470
|
-
addSkill(basename(child.resource), childSkillMd);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
if (skills.length === 0) {
|
|
475
|
-
const rootSkillMd = URI.joinPath(pluginRoot, "SKILL.md");
|
|
476
|
-
if (await pathExists(rootSkillMd, fileService)) {
|
|
477
|
-
addSkill(basename(pluginRoot), rootSkillMd);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
skills.sort((a, b) => a.name.localeCompare(b.name));
|
|
481
|
-
return skills;
|
|
482
|
-
}
|
|
483
|
-
async function readMarkdownComponents(dirs, fileService) {
|
|
484
|
-
const seen = ( new Set());
|
|
485
|
-
const items = [];
|
|
486
|
-
const addItem = (name, uri) => {
|
|
487
|
-
if (!( seen.has(name))) {
|
|
488
|
-
seen.add(name);
|
|
489
|
-
items.push({
|
|
490
|
-
uri,
|
|
491
|
-
name
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
for (const dir of dirs) {
|
|
496
|
-
let stat;
|
|
497
|
-
try {
|
|
498
|
-
stat = await fileService.resolve(dir);
|
|
499
|
-
} catch {
|
|
500
|
-
continue;
|
|
501
|
-
}
|
|
502
|
-
if (stat.isFile && extname(dir).toLowerCase() === COMMAND_FILE_SUFFIX) {
|
|
503
|
-
addItem(basename(dir).slice(0, -COMMAND_FILE_SUFFIX.length), dir);
|
|
504
|
-
continue;
|
|
505
|
-
}
|
|
506
|
-
if (!stat.isDirectory || !stat.children) {
|
|
507
|
-
continue;
|
|
508
|
-
}
|
|
509
|
-
for (const child of stat.children) {
|
|
510
|
-
if (!child.isFile || extname(child.resource).toLowerCase() !== COMMAND_FILE_SUFFIX) {
|
|
511
|
-
continue;
|
|
512
|
-
}
|
|
513
|
-
addItem(
|
|
514
|
-
basename(child.resource).slice(0, -COMMAND_FILE_SUFFIX.length),
|
|
515
|
-
child.resource
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
items.sort((a, b) => a.name.localeCompare(b.name));
|
|
520
|
-
return items;
|
|
521
|
-
}
|
|
522
|
-
function parseMcpServerDefinitionMap(definitionURI, raw, pluginFsPath, formatConfig) {
|
|
523
|
-
const mcpServers = resolveMcpServersMap(raw);
|
|
524
|
-
if (!mcpServers) {
|
|
525
|
-
return [];
|
|
526
|
-
}
|
|
527
|
-
const definitions = [];
|
|
528
|
-
for (const [name, configValue] of Object.entries(mcpServers)) {
|
|
529
|
-
const configuration = normalizeMcpServerConfiguration(configValue);
|
|
530
|
-
if (!configuration) {
|
|
531
|
-
continue;
|
|
532
|
-
}
|
|
533
|
-
let def = {
|
|
534
|
-
name,
|
|
535
|
-
configuration,
|
|
536
|
-
uri: definitionURI
|
|
537
|
-
};
|
|
538
|
-
if (formatConfig.pluginRootToken && formatConfig.pluginRootEnvVar) {
|
|
539
|
-
def = interpolateMcpPluginRoot(
|
|
540
|
-
def,
|
|
541
|
-
pluginFsPath,
|
|
542
|
-
formatConfig.pluginRootToken,
|
|
543
|
-
formatConfig.pluginRootEnvVar
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
def = convertBareEnvVarsToVsCodeSyntax(def);
|
|
547
|
-
definitions.push(def);
|
|
548
|
-
}
|
|
549
|
-
return definitions;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export { PluginFormat, convertBareEnvVarsToVsCodeSyntax, detectPluginFormat, interpolateHookPluginRoot, interpolateMcpPluginRoot, normalizeMcpServerConfiguration, parseComponentPathConfig, parseMcpServerDefinitionMap, pathExists, readMarkdownComponents, readSkills, resolveComponentDirs, resolveMcpServersMap, shellQuotePluginRootInCommand };
|
|
@@ -1,83 +0,0 @@
|
|
|
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 { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
6
|
-
import { AgentHostPermissionMode, IPendingResourceRequest } from "../../../../platform/agentHost/common/agentHostPermissionService.js";
|
|
7
|
-
import { IAgentHostPermissionService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostPermissionService.service";
|
|
8
|
-
import { ResourceRequestParams } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
|
|
9
|
-
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
-
/**
|
|
11
|
-
* Default implementation of {@link IAgentHostPermissionService}.
|
|
12
|
-
*
|
|
13
|
-
* Permission storage shape (in user settings):
|
|
14
|
-
*
|
|
15
|
-
* ```jsonc
|
|
16
|
-
* "chat.agentHost.localFilePermissions": {
|
|
17
|
-
* "localhost:3000": {
|
|
18
|
-
* "file:///Users/me/.gitconfig": "r",
|
|
19
|
-
* "file:///Users/me/.agentConfig": "rw"
|
|
20
|
-
* }
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* - Keys are addresses normalized via {@link normalizeRemoteAgentHostAddress}.
|
|
25
|
-
* - Values are URI strings → `r` | `rw`. Descendant URIs are covered by a
|
|
26
|
-
* parent grant (e.g. a grant for `.config/` covers `.config/foo.json`).
|
|
27
|
-
*/
|
|
28
|
-
export declare class AgentHostPermissionService extends Disposable implements IAgentHostPermissionService {
|
|
29
|
-
private readonly _configurationService;
|
|
30
|
-
private readonly _fileService;
|
|
31
|
-
private readonly _logService;
|
|
32
|
-
readonly _serviceBrand: undefined;
|
|
33
|
-
/**
|
|
34
|
-
* In-memory grants. Two kinds, both stored here so they share the
|
|
35
|
-
* `connectionClosed` cleanup pass:
|
|
36
|
-
*
|
|
37
|
-
* - **Implicit reads** added by `grantImplicitRead` (read-only, kept alive
|
|
38
|
-
* by an explicit disposable revocation handle from the caller).
|
|
39
|
-
* - **Session grants** from the user clicking "Allow" in the prompt
|
|
40
|
-
* (read or write, cleared when the connection closes or the window
|
|
41
|
-
* reloads). These have no caller-held disposable.
|
|
42
|
-
*
|
|
43
|
-
* Keyed by an opaque handle so callers can revoke independently.
|
|
44
|
-
*/
|
|
45
|
-
private readonly _inMemoryGrants;
|
|
46
|
-
/** All pending requests across every connection. */
|
|
47
|
-
private readonly _pending;
|
|
48
|
-
readonly allPending: IObservable<readonly IPendingResourceRequest[]>;
|
|
49
|
-
constructor(_configurationService: IConfigurationService, _fileService: IFileService, _logService: ILogService);
|
|
50
|
-
check(address: string, uri: URI, mode: AgentHostPermissionMode): Promise<boolean>;
|
|
51
|
-
request(address: string, params: ResourceRequestParams): Promise<void>;
|
|
52
|
-
pendingFor(address: string): IObservable<readonly IPendingResourceRequest[]>;
|
|
53
|
-
findPending(id: string): IPendingResourceRequest | undefined;
|
|
54
|
-
grantImplicitRead(address: string, uri: URI): IDisposable;
|
|
55
|
-
connectionClosed(address: string): void;
|
|
56
|
-
/**
|
|
57
|
-
* Resolve {@link uri} against the local filesystem, collapsing `..`
|
|
58
|
-
* segments and following symlinks so the policy check sees the same
|
|
59
|
-
* path the OS will actually open. For URIs that don't exist (e.g. a
|
|
60
|
-
* `resourceWrite` for a new file), realpath the deepest existing
|
|
61
|
-
* ancestor and re-append the leaf.
|
|
62
|
-
*/
|
|
63
|
-
private _canonicalize;
|
|
64
|
-
/**
|
|
65
|
-
* Policy check against in-memory + persisted grants. Asynchronous
|
|
66
|
-
* because in-memory grants from {@link grantImplicitRead} carry an
|
|
67
|
-
* unresolved realpath promise — see {@link IInMemoryGrant.realpath}.
|
|
68
|
-
*/
|
|
69
|
-
private _isCovered;
|
|
70
|
-
private _enqueue;
|
|
71
|
-
private _resolve;
|
|
72
|
-
private _dropPending;
|
|
73
|
-
private _readPersistedGrants;
|
|
74
|
-
private _persistGrant;
|
|
75
|
-
/**
|
|
76
|
-
* Inspect the setting and pick the scope to write back to. The setting
|
|
77
|
-
* is registered with `ConfigurationScope.APPLICATION`, so APPLICATION is
|
|
78
|
-
* the canonical home; we still honour pre-existing values in the
|
|
79
|
-
* user-* scopes so a hand-edited entry isn't silently relocated, but
|
|
80
|
-
* fresh writes default to APPLICATION.
|
|
81
|
-
*/
|
|
82
|
-
private _inspectScopedSetting;
|
|
83
|
-
}
|