@codingame/monaco-vscode-chat-service-override 33.0.9 → 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,11 +1,28 @@
|
|
|
1
1
|
import { type StateAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions";
|
|
2
|
-
import {
|
|
2
|
+
import type { ServerNotificationMap } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/messages";
|
|
3
3
|
/**
|
|
4
4
|
* The current protocol version that new code speaks.
|
|
5
5
|
*
|
|
6
6
|
* Formatted as a [SemVer](https://semver.org) `MAJOR.MINOR.PATCH` string.
|
|
7
7
|
*/
|
|
8
|
-
export declare const PROTOCOL_VERSION = "0.
|
|
8
|
+
export declare const PROTOCOL_VERSION = "0.3.0";
|
|
9
|
+
/**
|
|
10
|
+
* Every protocol version a client built from this source tree is willing
|
|
11
|
+
* to negotiate via the `initialize` handshake. Ordered **most preferred
|
|
12
|
+
* first** so a server picking the first acceptable entry honors the
|
|
13
|
+
* client's preference (see [versioning](../../docs/specification/versioning.md)).
|
|
14
|
+
*
|
|
15
|
+
* The first entry MUST equal {@link PROTOCOL_VERSION} — the version
|
|
16
|
+
* "new code speaks" is by definition the most preferred one. Older
|
|
17
|
+
* versions may be appended if a client retains the ability to fall back
|
|
18
|
+
* to them; today only one version is advertised.
|
|
19
|
+
*
|
|
20
|
+
* Every generated client (Rust, Kotlin, Swift) re-exports this constant
|
|
21
|
+
* verbatim. The TypeScript client consumes it directly. The per-client
|
|
22
|
+
* `release-metadata.json` files are validated against this list by
|
|
23
|
+
* `scripts/verify-release-metadata.ts`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
9
26
|
/**
|
|
10
27
|
* Compares two `MAJOR.MINOR.PATCH` SemVer strings.
|
|
11
28
|
*
|
|
@@ -27,16 +44,24 @@ export declare const ACTION_INTRODUCED_IN: {
|
|
|
27
44
|
*/
|
|
28
45
|
export declare function isActionKnownToVersion(action: StateAction, clientVersion: string): boolean;
|
|
29
46
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
47
|
+
* Server → client notification method names that are part of the AHP
|
|
48
|
+
* protocol surface. The set is a subset of {@link ServerNotificationMap}
|
|
49
|
+
* keys that excludes `action` (the action envelope) since action versions
|
|
50
|
+
* are tracked via {@link ACTION_INTRODUCED_IN}.
|
|
51
|
+
*/
|
|
52
|
+
export type ProtocolNotificationMethod = Exclude<keyof ServerNotificationMap, "action">;
|
|
53
|
+
/**
|
|
54
|
+
* Maps every server → client protocol notification method to the protocol
|
|
55
|
+
* version that introduced it. Adding a new notification method to
|
|
56
|
+
* {@link ServerNotificationMap} without adding it here is a compile error.
|
|
33
57
|
*
|
|
34
58
|
* Versions are SemVer `MAJOR.MINOR.PATCH` strings (see `PROTOCOL_VERSION`).
|
|
35
59
|
*/
|
|
36
60
|
export declare const NOTIFICATION_INTRODUCED_IN: {
|
|
37
|
-
readonly [K in
|
|
61
|
+
readonly [K in ProtocolNotificationMethod]: string;
|
|
38
62
|
};
|
|
39
63
|
/**
|
|
40
|
-
* Returns whether the given notification
|
|
64
|
+
* Returns whether the given notification method is known to the specified
|
|
65
|
+
* protocol version.
|
|
41
66
|
*/
|
|
42
|
-
export declare function isNotificationKnownToVersion(
|
|
67
|
+
export declare function isNotificationKnownToVersion(method: ProtocolNotificationMethod, clientVersion: string): boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
3
|
-
import '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/notifications';
|
|
2
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
4
3
|
|
|
5
|
-
const PROTOCOL_VERSION = "0.
|
|
4
|
+
const PROTOCOL_VERSION = "0.3.0";
|
|
6
5
|
|
|
7
6
|
export { PROTOCOL_VERSION };
|
|
@@ -1,14 +1,43 @@
|
|
|
1
|
-
export { ActionType, type ActionEnvelope, type ActionOrigin, type RootAgentsChangedAction, type RootActiveSessionsChangedAction, type SessionCreationFailedAction, type SessionDeltaAction, type
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { ActionType, type ActionEnvelope, type ActionOrigin, type RootAgentsChangedAction, type RootActiveSessionsChangedAction, type SessionCreationFailedAction, type SessionDeltaAction, type SessionErrorAction, type SessionModelChangedAction, type SessionReadyAction, type SessionReasoningAction, type SessionResponsePartAction, type SessionToolCallCompleteAction, type SessionToolCallConfirmedAction, type SessionToolCallApprovedAction, type SessionToolCallDeniedAction, type SessionToolCallDeltaAction, type SessionToolCallReadyAction, type SessionToolCallResultConfirmedAction, type SessionToolCallStartAction, type SessionTitleChangedAction, type SessionTurnCancelledAction, type SessionTurnCompleteAction, type SessionTurnStartedAction, type SessionUsageAction, type SessionAgentChangedAction, type SessionServerToolsChangedAction, type SessionActiveClientChangedAction, type SessionActiveClientToolsChangedAction, type SessionCustomizationsChangedAction, type SessionCustomizationToggledAction, type SessionPendingMessageSetAction, type SessionPendingMessageRemovedAction, type SessionQueuedMessagesReorderedAction, type SessionInputRequestedAction, type SessionInputCompletedAction, type SessionIsReadChangedAction, type SessionIsArchivedChangedAction, type SessionToolCallContentChangedAction, type ChangesetStatusChangedAction, type ChangesetFileSetAction, type ChangesetFileRemovedAction, type ChangesetOperationsChangedAction, type ChangesetClearedAction, type ResourceWatchChangedAction, type StateAction, } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions";
|
|
2
|
+
export { AuthRequiredReason, type SessionAddedParams, type SessionRemovedParams, type SessionSummaryChangedParams, type AuthRequiredParams, } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/notifications";
|
|
3
|
+
/**
|
|
4
|
+
* String discriminants for the protocol notification methods that previously
|
|
5
|
+
* lived inside a `notification` wrapper. These values are the JSON-RPC method
|
|
6
|
+
* names sent over the wire by a channels-era server; they are also the `type`
|
|
7
|
+
* discriminant on {@link ProtocolNotification} variants.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NotificationType: {
|
|
10
|
+
readonly SessionAdded: "root/sessionAdded";
|
|
11
|
+
readonly SessionRemoved: "root/sessionRemoved";
|
|
12
|
+
readonly SessionSummaryChanged: "root/sessionSummaryChanged";
|
|
13
|
+
readonly AuthRequired: "auth/required";
|
|
14
|
+
};
|
|
15
|
+
export type NotificationType = typeof NotificationType[keyof typeof NotificationType];
|
|
16
|
+
import type { RootAgentsChangedAction, RootActiveSessionsChangedAction, SessionDeltaAction, SessionModelChangedAction, SessionAgentChangedAction, SessionReasoningAction, SessionResponsePartAction, SessionToolCallApprovedAction, SessionToolCallCompleteAction, SessionToolCallConfirmedAction, SessionToolCallDeniedAction, SessionToolCallDeltaAction, SessionToolCallReadyAction, SessionToolCallResultConfirmedAction, SessionToolCallStartAction, SessionTitleChangedAction, SessionTurnCancelledAction, SessionTurnCompleteAction, SessionTurnStartedAction, SessionUsageAction, StateAction, SessionPendingMessageSetAction, SessionPendingMessageRemovedAction, SessionQueuedMessagesReorderedAction, SessionIsReadChangedAction, SessionIsArchivedChangedAction, RootConfigChangedAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions";
|
|
17
|
+
import type { SessionAddedParams, SessionRemovedParams, SessionSummaryChangedParams, AuthRequiredParams } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/notifications";
|
|
18
|
+
import type { RootAction as IRootAction_, SessionAction as ISessionAction_, ClientSessionAction as IClientSessionAction_, ServerSessionAction as IServerSessionAction_, TerminalAction as ITerminalAction_, ClientTerminalAction as IClientTerminalAction_, ChangesetAction as IChangesetAction_ } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/action-origin.generated";
|
|
19
|
+
/**
|
|
20
|
+
* Discriminated union of all server→client protocol notifications other than
|
|
21
|
+
* the action envelope. Each variant carries its protocol `method` so callers
|
|
22
|
+
* can switch on `type` the same way they did against the old `NotificationType`
|
|
23
|
+
* enum.
|
|
24
|
+
*/
|
|
25
|
+
export type ProtocolNotification = ({
|
|
26
|
+
type: "root/sessionAdded";
|
|
27
|
+
} & SessionAddedParams) | ({
|
|
28
|
+
type: "root/sessionRemoved";
|
|
29
|
+
} & SessionRemovedParams) | ({
|
|
30
|
+
type: "root/sessionSummaryChanged";
|
|
31
|
+
} & SessionSummaryChangedParams) | ({
|
|
32
|
+
type: "auth/required";
|
|
33
|
+
} & AuthRequiredParams);
|
|
6
34
|
export type RootAction = IRootAction_;
|
|
7
35
|
export type SessionAction = ISessionAction_;
|
|
8
36
|
export type ClientSessionAction = IClientSessionAction_;
|
|
9
37
|
export type ServerSessionAction = IServerSessionAction_;
|
|
10
38
|
export type TerminalAction = ITerminalAction_;
|
|
11
39
|
export type ClientTerminalAction = IClientTerminalAction_;
|
|
40
|
+
export type ChangesetAction = IChangesetAction_;
|
|
12
41
|
export type IAgentsChangedAction = RootAgentsChangedAction;
|
|
13
42
|
export type IActiveSessionsChangedAction = RootActiveSessionsChangedAction;
|
|
14
43
|
export type IRootConfigChangedAction = RootConfigChangedAction;
|
|
@@ -29,6 +58,7 @@ export type ITitleChangedAction = SessionTitleChangedAction;
|
|
|
29
58
|
export type IUsageAction = SessionUsageAction;
|
|
30
59
|
export type IReasoningAction = SessionReasoningAction;
|
|
31
60
|
export type IModelChangedAction = SessionModelChangedAction;
|
|
61
|
+
export type IAgentChangedAction = SessionAgentChangedAction;
|
|
32
62
|
export type ICustomizationsChangedAction = import("@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions").SessionCustomizationsChangedAction;
|
|
33
63
|
export type ICustomizationToggledAction = import("@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions").SessionCustomizationToggledAction;
|
|
34
64
|
export type IPendingMessageSetAction = SessionPendingMessageSetAction;
|
|
@@ -40,3 +70,4 @@ export type INotification = ProtocolNotification;
|
|
|
40
70
|
export declare function isRootAction(action: StateAction): action is RootAction;
|
|
41
71
|
export declare function isSessionAction(action: StateAction): action is SessionAction;
|
|
42
72
|
export declare function isTerminalAction(action: StateAction): action is TerminalAction;
|
|
73
|
+
export declare function isChangesetAction(action: StateAction): action is ChangesetAction;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
export { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
3
|
-
export { AuthRequiredReason
|
|
2
|
+
export { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
3
|
+
export { AuthRequiredReason } from '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/common/notifications';
|
|
4
4
|
|
|
5
5
|
function isSessionAction(action) {
|
|
6
6
|
return action.type.startsWith('session/');
|
|
7
7
|
}
|
|
8
|
+
function isChangesetAction(action) {
|
|
9
|
+
return action.type.startsWith('changeset/');
|
|
10
|
+
}
|
|
8
11
|
|
|
9
|
-
export { isSessionAction };
|
|
12
|
+
export { isChangesetAction, isSessionAction };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
/**
|
|
3
|
+
* Normalizes and validates a domain string.
|
|
4
|
+
*
|
|
5
|
+
* Strips user info, port, trailing dots, and trailing punctuation.
|
|
6
|
+
* Accepts bare wildcards (`*`) and wildcard prefixes (`*.example.com`).
|
|
7
|
+
*
|
|
8
|
+
* @param value The raw domain string to normalize.
|
|
9
|
+
* @param fromUrl Whether the value was extracted from a URL context (skips file-extension filtering).
|
|
10
|
+
* @returns The normalized domain string, or `undefined` if the input is invalid.
|
|
11
|
+
*/
|
|
12
|
+
export declare function normalizeDomain(value: string | undefined, fromUrl?: boolean): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Extracts the domain portion from a pattern string.
|
|
15
|
+
* If the pattern contains `://`, it is parsed as a URI and the authority is returned.
|
|
16
|
+
* Otherwise, the trimmed pattern is returned as-is.
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractDomainPattern(pattern: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether a normalized domain matches a given allow/deny pattern.
|
|
21
|
+
* Supports exact matches, bare wildcards (`*`), and wildcard prefixes (`*.example.com`).
|
|
22
|
+
*
|
|
23
|
+
* @param domain A normalized domain (output of {@link normalizeDomain}).
|
|
24
|
+
* @param pattern An allow/deny pattern (may be a bare domain, URL, or wildcard).
|
|
25
|
+
* @returns `true` if the domain matches the pattern.
|
|
26
|
+
*/
|
|
27
|
+
export declare function matchesDomainPattern(domain: string, pattern: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Extracts and normalizes a domain from a URI.
|
|
30
|
+
* Strips port numbers and trailing dots.
|
|
31
|
+
*
|
|
32
|
+
* @param uri The URI to extract the domain from.
|
|
33
|
+
* @returns The normalized domain, or `undefined` if no valid domain could be extracted.
|
|
34
|
+
*/
|
|
35
|
+
export declare function extractDomainFromUri(uri: URI): string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether a domain is allowed based on allow and deny lists.
|
|
38
|
+
*
|
|
39
|
+
* Rules:
|
|
40
|
+
* - If both lists are empty, the domain is denied (restrictive default).
|
|
41
|
+
* - Denied patterns take precedence: if the domain matches any denied pattern, it is blocked.
|
|
42
|
+
* - If only denied patterns are configured (allowed is empty), any non-denied domain is allowed.
|
|
43
|
+
* - If allowed patterns are configured, the domain must match at least one to be allowed.
|
|
44
|
+
*
|
|
45
|
+
* @param domain A normalized domain string.
|
|
46
|
+
* @param allowedPatterns Array of allowed domain patterns.
|
|
47
|
+
* @param deniedPatterns Array of denied domain patterns.
|
|
48
|
+
* @returns `true` if the domain is allowed, `false` if it is blocked.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isDomainAllowed(domain: string, allowedPatterns: string[], deniedPatterns: string[]): boolean;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
|
|
2
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
3
|
+
|
|
4
|
+
const fileExtensionSuffixes = ( new Set([
|
|
5
|
+
"7z",
|
|
6
|
+
"bz2",
|
|
7
|
+
"cjs",
|
|
8
|
+
"class",
|
|
9
|
+
"cpp",
|
|
10
|
+
"cs",
|
|
11
|
+
"css",
|
|
12
|
+
"csv",
|
|
13
|
+
"dll",
|
|
14
|
+
"exe",
|
|
15
|
+
"gif",
|
|
16
|
+
"gz",
|
|
17
|
+
"ico",
|
|
18
|
+
"jar",
|
|
19
|
+
"env",
|
|
20
|
+
"java",
|
|
21
|
+
"jpeg",
|
|
22
|
+
"jpg",
|
|
23
|
+
"js",
|
|
24
|
+
"json",
|
|
25
|
+
"jsx",
|
|
26
|
+
"lock",
|
|
27
|
+
"log",
|
|
28
|
+
"md",
|
|
29
|
+
"mjs",
|
|
30
|
+
"pdf",
|
|
31
|
+
"php",
|
|
32
|
+
"png",
|
|
33
|
+
"py",
|
|
34
|
+
"rar",
|
|
35
|
+
"rs",
|
|
36
|
+
"so",
|
|
37
|
+
"sql",
|
|
38
|
+
"svg",
|
|
39
|
+
"tar",
|
|
40
|
+
"tgz",
|
|
41
|
+
"toml",
|
|
42
|
+
"ts",
|
|
43
|
+
"tsx",
|
|
44
|
+
"txt",
|
|
45
|
+
"wasm",
|
|
46
|
+
"webp",
|
|
47
|
+
"xml",
|
|
48
|
+
"yaml",
|
|
49
|
+
"yml",
|
|
50
|
+
"zip"
|
|
51
|
+
]));
|
|
52
|
+
const wellKnownDomainSuffixes = ( new Set(["ai", "cloud", "com", "dev", "io", "me", "net", "org", "tech"]));
|
|
53
|
+
function normalizeDomain(value, fromUrl = false) {
|
|
54
|
+
if (!value) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
const normalized = value.trim().toLowerCase().replace(/^[^@]+@/, "").replace(/:\d+$/, "").replace(/\.+$/, "");
|
|
58
|
+
if (!normalized || normalized.includes("/") || normalized === "." || normalized === "..") {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
if (normalized === "*") {
|
|
62
|
+
return "*";
|
|
63
|
+
}
|
|
64
|
+
if (!/^\*?\.?[a-z0-9.;,)!?:-]+$/.test(normalized)) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const stripped = normalized.replace(/[),;:!?]+$/, "");
|
|
68
|
+
if (!stripped) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
const domainToValidate = stripped.startsWith("*.") ? stripped.slice(2) : stripped;
|
|
72
|
+
if (!/^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)(?:\.(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?))*$/.test(domainToValidate)) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
const hasWildcardPrefix = stripped.startsWith("*.");
|
|
76
|
+
const host = hasWildcardPrefix ? stripped.slice(2) : stripped;
|
|
77
|
+
if (!host) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
if (!/^[a-z0-9.-]+$/.test(host)) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (!fromUrl) {
|
|
84
|
+
const lastLabel = host.slice(host.lastIndexOf(".") + 1);
|
|
85
|
+
if (( fileExtensionSuffixes.has(lastLabel))) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
if (!( wellKnownDomainSuffixes.has(lastLabel))) {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return hasWildcardPrefix ? `*.${host}` : host;
|
|
93
|
+
}
|
|
94
|
+
function extractDomainPattern(pattern) {
|
|
95
|
+
const trimmed = pattern.trim();
|
|
96
|
+
if (trimmed === "*") {
|
|
97
|
+
return trimmed;
|
|
98
|
+
}
|
|
99
|
+
if (!trimmed.includes("://")) {
|
|
100
|
+
return trimmed;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
return ( URI.parse(trimmed)).authority;
|
|
104
|
+
} catch {
|
|
105
|
+
return trimmed;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function matchesDomainPattern(domain, pattern) {
|
|
109
|
+
const normalizedPattern = normalizeDomain(extractDomainPattern(pattern), pattern.includes("://"));
|
|
110
|
+
if (!normalizedPattern) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (normalizedPattern === "*") {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
if (normalizedPattern.startsWith("*.")) {
|
|
117
|
+
const suffix = normalizedPattern.slice(2);
|
|
118
|
+
return domain === suffix || domain.endsWith(`.${suffix}`);
|
|
119
|
+
}
|
|
120
|
+
return domain === normalizedPattern;
|
|
121
|
+
}
|
|
122
|
+
function extractDomainFromUri(uri) {
|
|
123
|
+
return normalizeDomain(uri.authority, true);
|
|
124
|
+
}
|
|
125
|
+
function isDomainAllowed(domain, allowedPatterns, deniedPatterns) {
|
|
126
|
+
if (allowedPatterns.length === 0 && deniedPatterns.length === 0) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
if (( deniedPatterns.some(pattern => matchesDomainPattern(domain, pattern)))) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (allowedPatterns.length === 0) {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
return ( allowedPatterns.some(pattern => matchesDomainPattern(domain, pattern)));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export { extractDomainFromUri, extractDomainPattern, isDomainAllowed, matchesDomainPattern, normalizeDomain };
|
|
@@ -5,8 +5,8 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
5
5
|
import { LRUCache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
6
6
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
7
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
-
import { extractDomainFromUri, isDomainAllowed } from '
|
|
9
|
-
import { AgentNetworkDomainSettingId } from '
|
|
8
|
+
import { extractDomainFromUri, isDomainAllowed } from './domainMatcher.js';
|
|
9
|
+
import { AgentNetworkDomainSettingId } from './settings.js';
|
|
10
10
|
|
|
11
11
|
let AgentNetworkFilterService = class AgentNetworkFilterService extends Disposable {
|
|
12
12
|
constructor(configurationService) {
|
|
@@ -57,7 +57,7 @@ let AgentNetworkFilterService = class AgentNetworkFilterService extends Disposab
|
|
|
57
57
|
formatError(uri) {
|
|
58
58
|
const domain = extractDomainFromUri(uri);
|
|
59
59
|
return localize(
|
|
60
|
-
|
|
60
|
+
2115,
|
|
61
61
|
"Access to {0} is blocked by network domain policy (see `{1}` and `{2}` settings).",
|
|
62
62
|
domain ?? uri.authority,
|
|
63
63
|
AgentNetworkDomainSettingId.AllowedNetworkDomains,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Setting IDs for agent network domain filtering.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AgentNetworkDomainSettingId {
|
|
5
|
+
NetworkFilter = "chat.agent.networkFilter",
|
|
6
|
+
AllowedNetworkDomains = "chat.agent.allowedNetworkDomains",
|
|
7
|
+
DeniedNetworkDomains = "chat.agent.deniedNetworkDomains",
|
|
8
|
+
DeprecatedSandboxAllowedNetworkDomains = "chat.agent.sandbox.allowedNetworkDomains",
|
|
9
|
+
DeprecatedSandboxDeniedNetworkDomains = "chat.agent.sandbox.deniedNetworkDomains",
|
|
10
|
+
DeprecatedOldAllowedNetworkDomains = "chat.agent.sandboxNetwork.allowedDomains",
|
|
11
|
+
DeprecatedOldDeniedNetworkDomains = "chat.agent.sandboxNetwork.deniedDomains"
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var AgentNetworkDomainSettingId;
|
|
4
|
+
(function (AgentNetworkDomainSettingId) {
|
|
5
|
+
AgentNetworkDomainSettingId["NetworkFilter"] = "chat.agent.networkFilter";
|
|
6
|
+
AgentNetworkDomainSettingId["AllowedNetworkDomains"] = "chat.agent.allowedNetworkDomains";
|
|
7
|
+
AgentNetworkDomainSettingId["DeniedNetworkDomains"] = "chat.agent.deniedNetworkDomains";
|
|
8
|
+
AgentNetworkDomainSettingId["DeprecatedSandboxAllowedNetworkDomains"] = "chat.agent.sandbox.allowedNetworkDomains";
|
|
9
|
+
AgentNetworkDomainSettingId["DeprecatedSandboxDeniedNetworkDomains"] = "chat.agent.sandbox.deniedNetworkDomains";
|
|
10
|
+
AgentNetworkDomainSettingId["DeprecatedOldAllowedNetworkDomains"] = "chat.agent.sandboxNetwork.allowedDomains";
|
|
11
|
+
AgentNetworkDomainSettingId["DeprecatedOldDeniedNetworkDomains"] = "chat.agent.sandboxNetwork.deniedDomains";
|
|
12
|
+
})(AgentNetworkDomainSettingId || (AgentNetworkDomainSettingId = {}));
|
|
13
|
+
|
|
14
|
+
export { AgentNetworkDomainSettingId };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ISandboxDependencyStatus } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService";
|
|
1
|
+
import { ISandboxDependencyStatus, type IWindowsMxcConfig, IWindowsMxcFilesystemPolicy, type IWindowsMxcPolicyContainment, type IWindowsMxcSandboxPolicy } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService";
|
|
2
2
|
import { ISandboxHelperService } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService.service";
|
|
3
3
|
export declare class NullSandboxHelperService implements ISandboxHelperService {
|
|
4
4
|
readonly _serviceBrand: undefined;
|
|
5
5
|
checkSandboxDependencies(): Promise<ISandboxDependencyStatus>;
|
|
6
|
+
getWindowsMxcFilesystemPolicy(): Promise<IWindowsMxcFilesystemPolicy | undefined>;
|
|
7
|
+
getWindowsMxcEnvironment(): Promise<string[] | undefined>;
|
|
8
|
+
buildWindowsMxcSandboxPayload(_commandLine: string, _policy: IWindowsMxcSandboxPolicy, _workingDirectory?: string, _containerName?: string, _containment?: IWindowsMxcPolicyContainment): Promise<IWindowsMxcConfig | undefined>;
|
|
6
9
|
}
|
|
@@ -9,6 +9,15 @@ class NullSandboxHelperService {
|
|
|
9
9
|
socatInstalled: true
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
async getWindowsMxcFilesystemPolicy() {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
async getWindowsMxcEnvironment() {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
async buildWindowsMxcSandboxPayload(_commandLine, _policy, _workingDirectory, _containerName, _containment) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
export { NullSandboxHelperService };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
3
|
+
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
4
|
+
import { ISandboxDependencyStatus, type IWindowsMxcConfig, IWindowsMxcFilesystemPolicy, type IWindowsMxcPolicyContainment, type IWindowsMxcSandboxPolicy } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService";
|
|
5
|
+
import { ISandboxHelperService } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService.service";
|
|
6
|
+
export declare const SANDBOX_HELPER_CHANNEL_NAME = "sandboxHelper";
|
|
7
|
+
export declare class SandboxHelperChannel implements IServerChannel {
|
|
8
|
+
private readonly service;
|
|
9
|
+
constructor(service: ISandboxHelperService);
|
|
10
|
+
listen<T>(_context: unknown, _event: string): Event<T>;
|
|
11
|
+
call<T>(_context: unknown, command: string, _arg?: unknown, _cancellationToken?: CancellationToken): Promise<T>;
|
|
12
|
+
}
|
|
13
|
+
export declare class SandboxHelperChannelClient implements ISandboxHelperService {
|
|
14
|
+
private readonly channel;
|
|
15
|
+
readonly _serviceBrand: undefined;
|
|
16
|
+
constructor(channel: IChannel);
|
|
17
|
+
checkSandboxDependencies(): Promise<ISandboxDependencyStatus | undefined>;
|
|
18
|
+
getWindowsMxcFilesystemPolicy(): Promise<IWindowsMxcFilesystemPolicy | undefined>;
|
|
19
|
+
getWindowsMxcEnvironment(): Promise<string[] | undefined>;
|
|
20
|
+
buildWindowsMxcSandboxPayload(commandLine: string, policy: IWindowsMxcSandboxPolicy, workingDirectory?: string, containerName?: string, containment?: IWindowsMxcPolicyContainment): Promise<IWindowsMxcConfig | undefined>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const SANDBOX_HELPER_CHANNEL_NAME = "sandboxHelper";
|
|
4
|
+
class SandboxHelperChannelClient {
|
|
5
|
+
constructor(channel) {
|
|
6
|
+
this.channel = channel;
|
|
7
|
+
}
|
|
8
|
+
checkSandboxDependencies() {
|
|
9
|
+
return this.channel.call("checkSandboxDependencies");
|
|
10
|
+
}
|
|
11
|
+
getWindowsMxcFilesystemPolicy() {
|
|
12
|
+
return this.channel.call("getWindowsMxcFilesystemPolicy");
|
|
13
|
+
}
|
|
14
|
+
getWindowsMxcEnvironment() {
|
|
15
|
+
return this.channel.call("getWindowsMxcEnvironment");
|
|
16
|
+
}
|
|
17
|
+
buildWindowsMxcSandboxPayload(commandLine, policy, workingDirectory, containerName, containment) {
|
|
18
|
+
return this.channel.call("buildWindowsMxcSandboxPayload", {
|
|
19
|
+
commandLine,
|
|
20
|
+
policy,
|
|
21
|
+
workingDirectory,
|
|
22
|
+
containerName,
|
|
23
|
+
containment
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { SANDBOX_HELPER_CHANNEL_NAME, SandboxHelperChannelClient };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
2
|
+
import type { ITerminalSandboxCommand } from "./terminalSandboxService.js";
|
|
3
|
+
export interface ITerminalSandboxCommandRuleContext {
|
|
4
|
+
readonly os: OperatingSystem;
|
|
5
|
+
}
|
|
6
|
+
export interface ITerminalSandboxCommandRule<T> {
|
|
7
|
+
readonly keywords: readonly string[];
|
|
8
|
+
readonly value: T;
|
|
9
|
+
readonly subcommands?: readonly string[];
|
|
10
|
+
readonly optionsWithValue?: ReadonlySet<string>;
|
|
11
|
+
/** Context-wide guard for rules, such as OS-specific sandbox capabilities. */
|
|
12
|
+
readonly condition?: (context: ITerminalSandboxCommandRuleContext) => boolean;
|
|
13
|
+
/** Command-specific guard for argument-sensitive rules. */
|
|
14
|
+
readonly when?: (command: ITerminalSandboxCommand) => boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Git global options that consume the following argument. These need to be
|
|
18
|
+
* skipped when finding the subcommand so `git -C repo commit` matches `commit`
|
|
19
|
+
* instead of treating `repo` as the subcommand.
|
|
20
|
+
*/
|
|
21
|
+
export declare const gitGlobalOptionsWithValue: Set<string>;
|
|
22
|
+
export declare function matchesTerminalSandboxCommandRule<T>(command: ITerminalSandboxCommand, rule: ITerminalSandboxCommandRule<T>, context?: ITerminalSandboxCommandRuleContext): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the first non-option argument, treating it as the command's subcommand.
|
|
25
|
+
* Options are skipped, and options listed in `optionsWithValue` also skip the
|
|
26
|
+
* following argument so global option values are not mistaken for subcommands.
|
|
27
|
+
*
|
|
28
|
+
* For example, with `-C` in `optionsWithValue`, `git -C repo commit` returns
|
|
29
|
+
* `commit` instead of `repo`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getCommandSubcommand(args: readonly string[], optionsWithValue?: ReadonlySet<string>): string | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const gitGlobalOptionsWithValue = ( new Set([
|
|
4
|
+
"-C",
|
|
5
|
+
"-c",
|
|
6
|
+
"--config-env",
|
|
7
|
+
"--exec-path",
|
|
8
|
+
"--git-dir",
|
|
9
|
+
"--html-path",
|
|
10
|
+
"--info-path",
|
|
11
|
+
"--man-path",
|
|
12
|
+
"--namespace",
|
|
13
|
+
"--super-prefix",
|
|
14
|
+
"--work-tree"
|
|
15
|
+
]));
|
|
16
|
+
function matchesTerminalSandboxCommandRule(command, rule, context) {
|
|
17
|
+
if (!rule.keywords.includes(command.keyword.toLowerCase())) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
if (rule.condition && (!context || !rule.condition(context))) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (rule.subcommands) {
|
|
24
|
+
const subcommand = getCommandSubcommand(command.args, rule.optionsWithValue);
|
|
25
|
+
if (subcommand === undefined || !rule.subcommands.includes(subcommand)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return rule.when?.(command) ?? true;
|
|
30
|
+
}
|
|
31
|
+
function getCommandSubcommand(args, optionsWithValue) {
|
|
32
|
+
for (let i = 0; i < args.length; i++) {
|
|
33
|
+
const arg = args[i];
|
|
34
|
+
if (arg === "--") {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (arg.startsWith("-")) {
|
|
38
|
+
const option = arg.includes("=") ? arg.substring(0, arg.indexOf("=")) : arg;
|
|
39
|
+
if (!arg.includes("=") && optionsWithValue?.has(option)) {
|
|
40
|
+
i++;
|
|
41
|
+
}
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
return arg.toLowerCase();
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { getCommandSubcommand, gitGlobalOptionsWithValue, matchesTerminalSandboxCommandRule };
|