@tencent-ai/agent-harness 0.2.0-beta.6 → 0.2.0-beta.8
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/CHANGELOG.md +42 -0
- package/cli/CHANGELOG.md +123 -0
- package/cli/dist-server/lite/in-memory-session-store.js +1 -1
- package/cli/dist-server/shared.cjs +338 -291
- package/cli/dist-server/types/node/a2a/a2a-protocol.d.ts +516 -0
- package/cli/dist-server/types/node/agent/agent-completion-waiter.d.ts +28 -0
- package/cli/dist-server/types/node/agent/agent-controller.d.ts +147 -0
- package/cli/dist-server/types/node/agent/agent-display.d.ts +77 -0
- package/cli/dist-server/types/node/agent/agent-manager.d.ts +964 -0
- package/cli/dist-server/types/node/agent/agent-memory.d.ts +72 -0
- package/cli/dist-server/types/node/agent/agent-runtime-adapter.d.ts +71 -0
- package/cli/dist-server/types/node/agent/builtin-agent-modes.d.ts +47 -0
- package/cli/dist-server/types/node/agent/custom-agent-identity.d.ts +54 -0
- package/cli/dist-server/types/node/agent/custom-agent-manager.d.ts +43 -0
- package/cli/dist-server/types/node/agent/custom-agent-path-registry.d.ts +19 -0
- package/cli/dist-server/types/node/agent/exit-planmode-visibility.d.ts +64 -0
- package/cli/dist-server/types/node/agent/index.d.ts +22 -0
- package/cli/dist-server/types/node/agent/insights-data-agent-run-interceptor.d.ts +67 -0
- package/cli/dist-server/types/node/agent/interceptors/command-interceptors.d.ts +89 -0
- package/cli/dist-server/types/node/agent/interceptors/deep-research-pending-interceptor.d.ts +30 -0
- package/cli/dist-server/types/node/agent/interceptors/env-interceptor.d.ts +7 -0
- package/cli/dist-server/types/node/agent/interceptors/file-interceptors.d.ts +45 -0
- package/cli/dist-server/types/node/agent/interceptors/image-interceptors.d.ts +47 -0
- package/cli/dist-server/types/node/agent/interceptors/index.d.ts +16 -0
- package/cli/dist-server/types/node/agent/interceptors/initial-prompt-interceptor.d.ts +29 -0
- package/cli/dist-server/types/node/agent/interceptors/manual-compact-request-handler.d.ts +29 -0
- package/cli/dist-server/types/node/agent/interceptors/model-interceptors.d.ts +43 -0
- package/cli/dist-server/types/node/agent/interceptors/sandbox-interceptor.d.ts +84 -0
- package/cli/dist-server/types/node/agent/interceptors/sensitive-user-input-interceptor.d.ts +7 -0
- package/cli/dist-server/types/node/agent/interceptors/system-reminder-interceptor.d.ts +101 -0
- package/cli/dist-server/types/node/agent/interceptors/team-resume-intent-interceptor.d.ts +31 -0
- package/cli/dist-server/types/node/agent/interceptors/telemetry-interceptors.d.ts +43 -0
- package/cli/dist-server/types/node/agent/interceptors/ultracode-effort-reminder-interceptor.d.ts +21 -0
- package/cli/dist-server/types/node/agent/interceptors/ultracode-keyword-interceptor.d.ts +34 -0
- package/cli/dist-server/types/node/agent/main-agent-policy.d.ts +33 -0
- package/cli/dist-server/types/node/agent/main-agent-preset.d.ts +32 -0
- package/cli/dist-server/types/node/agent/main-agent-resolver.d.ts +156 -0
- package/cli/dist-server/types/node/agent/main-agent-session.d.ts +212 -0
- package/cli/dist-server/types/node/agent/memory-context-interceptor.d.ts +84 -0
- package/cli/dist-server/types/node/agent/standing-main-agent.d.ts +12 -0
- package/cli/dist-server/types/node/agent/stream-json-init-interceptor.d.ts +9 -0
- package/cli/dist-server/types/node/agent/subagent-limits.d.ts +90 -0
- package/cli/dist-server/types/node/agent/team-context-interceptor.d.ts +42 -0
- package/cli/dist-server/types/node/agent/teammate-failure-interceptor.d.ts +67 -0
- package/cli/dist-server/types/node/agent-home/agent-home-attachments.d.ts +83 -0
- package/cli/dist-server/types/node/agent-home/agent-home-channel-system-event.d.ts +15 -0
- package/cli/dist-server/types/node/agent-home/agent-home-channel-task-event.d.ts +24 -0
- package/cli/dist-server/types/node/agent-home/agent-home-channel-wake.d.ts +115 -0
- package/cli/dist-server/types/node/agent-home/agent-home-channel-widget.d.ts +45 -0
- package/cli/dist-server/types/node/agent-home/agent-home-directory.d.ts +304 -0
- package/cli/dist-server/types/node/agent-home/agent-home-limits.d.ts +73 -0
- package/cli/dist-server/types/node/agent-home/agent-home-membership.d.ts +34 -0
- package/cli/dist-server/types/node/agent-home/agent-home-mentions.d.ts +39 -0
- package/cli/dist-server/types/node/agent-home/agent-home-room-contacts.d.ts +51 -0
- package/cli/dist-server/types/node/agent-home/channel-wake-service.d.ts +69 -0
- package/cli/dist-server/types/node/agent-task/agent-task-manager.d.ts +242 -0
- package/cli/dist-server/types/node/agent-task/agent-task-output-manager.d.ts +55 -0
- package/cli/dist-server/types/node/agent-task/agent-task-protocol.d.ts +687 -0
- package/cli/dist-server/types/node/agent-task/agent-task.d.ts +405 -0
- package/cli/dist-server/types/node/agent-task/background-task-notifier.d.ts +212 -0
- package/cli/dist-server/types/node/agent-task/background-task-tool-approval-service.d.ts +36 -0
- package/cli/dist-server/types/node/agent-task/index.d.ts +9 -0
- package/cli/dist-server/types/node/agent-task/retained-agent-task.d.ts +11 -0
- package/cli/dist-server/types/node/agent-task/stream-json-drain-trigger.d.ts +23 -0
- package/cli/dist-server/types/node/agent-task/subagent-output-scanner.d.ts +53 -0
- package/cli/dist-server/types/node/agent-team/backends/teammate-backend-protocol.d.ts +119 -0
- package/cli/dist-server/types/node/agent-team/team-member.d.ts +391 -0
- package/cli/dist-server/types/node/agent-team/team-protocol.d.ts +375 -0
- package/cli/dist-server/types/node/agent-view/agent-view-actions.d.ts +209 -0
- package/cli/dist-server/types/node/agent-view/agent-view-protocol.d.ts +714 -0
- package/cli/dist-server/types/node/agent-view/handoff-policy.d.ts +80 -0
- package/cli/dist-server/types/node/agent-view/launch-workspace.d.ts +9 -0
- package/cli/dist-server/types/node/agent-view/session-handoff.d.ts +161 -0
- package/cli/dist-server/types/node/ask/ask-protoctol.d.ts +102 -0
- package/cli/dist-server/types/node/ask/ask-service.d.ts +62 -0
- package/cli/dist-server/types/node/ask/index.d.ts +3 -0
- package/cli/dist-server/types/node/ask/session-ask-user-question-handler.d.ts +25 -0
- package/cli/dist-server/types/node/authentication/api-key-authentication-storage.d.ts +17 -0
- package/cli/dist-server/types/node/authentication/custom-token-authentication-storage.d.ts +10 -0
- package/cli/dist-server/types/node/authentication/file-authentication-storage.d.ts +71 -0
- package/cli/dist-server/types/node/bash-sandbox/bash-sandbox-manager.d.ts +125 -0
- package/cli/dist-server/types/node/bash-sandbox/index.d.ts +4 -0
- package/cli/dist-server/types/node/bash-sandbox/legacy-sandbox-shell-protocol.d.ts +33 -0
- package/cli/dist-server/types/node/bash-sandbox/legacy-sandbox-shell-service.d.ts +33 -0
- package/cli/dist-server/types/node/blob-store/blob-store-protocol.d.ts +104 -0
- package/cli/dist-server/types/node/blob-store/blob-store-service.d.ts +22 -0
- package/cli/dist-server/types/node/blob-store/image-blob-service.d.ts +121 -0
- package/cli/dist-server/types/node/blob-store/index.d.ts +4 -0
- package/cli/dist-server/types/node/blob-store/tool-result-blob-service.d.ts +109 -0
- package/cli/dist-server/types/node/channel/channel-event-service.d.ts +18 -0
- package/cli/dist-server/types/node/channel/channel-manager.d.ts +41 -0
- package/cli/dist-server/types/node/channel/channel-permission-adapter.d.ts +27 -0
- package/cli/dist-server/types/node/channel/channel-protocol.d.ts +192 -0
- package/cli/dist-server/types/node/channel/channel-security-manager.d.ts +12 -0
- package/cli/dist-server/types/node/channel/index.d.ts +5 -0
- package/cli/dist-server/types/node/cli/tui-mode-service.d.ts +20 -0
- package/cli/dist-server/types/node/code-ratio/cli-git-commit-watcher.d.ts +142 -0
- package/cli/dist-server/types/node/code-ratio/cli-svn-commit-watcher.d.ts +111 -0
- package/cli/dist-server/types/node/code-ratio/code-ratio-reporting-service.d.ts +90 -0
- package/cli/dist-server/types/node/code-ratio/fs-file-reader.d.ts +26 -0
- package/cli/dist-server/types/node/code-ratio/index.d.ts +5 -0
- package/cli/dist-server/types/node/code-ratio/vcs-repo-resolver.d.ts +51 -0
- package/cli/dist-server/types/node/command/add-dir-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/agent-mode-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/agents-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/auto-compact-command-executor.d.ts +20 -0
- package/cli/dist-server/types/node/command/background-command-executor.d.ts +29 -0
- package/cli/dist-server/types/node/command/bash-command-executor.d.ts +62 -0
- package/cli/dist-server/types/node/command/btw-command-executor.d.ts +13 -0
- package/cli/dist-server/types/node/command/clear-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/command-manager.d.ts +54 -0
- package/cli/dist-server/types/node/command/command-protocol.d.ts +106 -0
- package/cli/dist-server/types/node/command/config-command-executor.d.ts +15 -0
- package/cli/dist-server/types/node/command/context-command-executor.d.ts +42 -0
- package/cli/dist-server/types/node/command/copy-command-executor.d.ts +10 -0
- package/cli/dist-server/types/node/command/cost-command-executor.d.ts +13 -0
- package/cli/dist-server/types/node/command/custom-command-renderer.d.ts +29 -0
- package/cli/dist-server/types/node/command/debug-command-executor.d.ts +15 -0
- package/cli/dist-server/types/node/command/deep-research-command-executor.d.ts +27 -0
- package/cli/dist-server/types/node/command/doctor-command-executor.d.ts +7 -0
- package/cli/dist-server/types/node/command/effort-command-executor.d.ts +68 -0
- package/cli/dist-server/types/node/command/exit-command-executor.d.ts +14 -0
- package/cli/dist-server/types/node/command/export-command-executor.d.ts +7 -0
- package/cli/dist-server/types/node/command/feedback-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/fork-bg-command-executor.d.ts +29 -0
- package/cli/dist-server/types/node/command/fork-command-executor.d.ts +28 -0
- package/cli/dist-server/types/node/command/goal-command-executor.d.ts +50 -0
- package/cli/dist-server/types/node/command/handoff-message-adapter.d.ts +9 -0
- package/cli/dist-server/types/node/command/help-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/hooks-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/ide-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/index.d.ts +66 -0
- package/cli/dist-server/types/node/command/local-shell.d.ts +31 -0
- package/cli/dist-server/types/node/command/mcp-command-executor.d.ts +15 -0
- package/cli/dist-server/types/node/command/mcp-prompt-renderer.d.ts +44 -0
- package/cli/dist-server/types/node/command/memory-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/model-image-to-image-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-image-to-video-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-lite-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-reasoning-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-text-to-image-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/model-text-to-video-command-executor.d.ts +17 -0
- package/cli/dist-server/types/node/command/multitask-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/permissions-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/plan-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/plugin-command-executor.d.ts +25 -0
- package/cli/dist-server/types/node/command/plugin-validate-command-executor.d.ts +21 -0
- package/cli/dist-server/types/node/command/release-notes-command-executor.d.ts +18 -0
- package/cli/dist-server/types/node/command/reload-plugins-command-executor.d.ts +22 -0
- package/cli/dist-server/types/node/command/remote-control-command-executor.d.ts +44 -0
- package/cli/dist-server/types/node/command/rename-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/reset-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/resume-command-executor.d.ts +21 -0
- package/cli/dist-server/types/node/command/rewind-command-executor.d.ts +10 -0
- package/cli/dist-server/types/node/command/sandbox-command-executor.d.ts +20 -0
- package/cli/dist-server/types/node/command/save-workflow-command-executor.d.ts +43 -0
- package/cli/dist-server/types/node/command/skills-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/stats-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/status-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/tasks-command-executor.d.ts +9 -0
- package/cli/dist-server/types/node/command/terminal-setup-command-executor.d.ts +7 -0
- package/cli/dist-server/types/node/command/theme-command-executor.d.ts +7 -0
- package/cli/dist-server/types/node/command/todos-command-executor.d.ts +16 -0
- package/cli/dist-server/types/node/command/upgrade-command-executor.d.ts +13 -0
- package/cli/dist-server/types/node/command/vim-command-executor.d.ts +11 -0
- package/cli/dist-server/types/node/command/web-command-executor.d.ts +18 -0
- package/cli/dist-server/types/node/command/workflows-command-executor.d.ts +26 -0
- package/cli/dist-server/types/node/command-parser/command-parser-protocol.d.ts +81 -0
- package/cli/dist-server/types/node/console/console-manager.d.ts +37 -0
- package/cli/dist-server/types/node/console/console-protocol.d.ts +112 -0
- package/cli/dist-server/types/node/console/index.d.ts +2 -0
- package/cli/dist-server/types/node/context/deferred-tools-description-builder.d.ts +145 -0
- package/cli/dist-server/types/node/context/token-calculator/token-calculator-protocol.d.ts +27 -0
- package/cli/dist-server/types/node/debug/debug-middleware.d.ts +8 -0
- package/cli/dist-server/types/node/debug/debug-protocol.d.ts +63 -0
- package/cli/dist-server/types/node/debug/debug-service.d.ts +26 -0
- package/cli/dist-server/types/node/debug/index.d.ts +3 -0
- package/cli/dist-server/types/node/elicitation/elicitation-service.d.ts +100 -0
- package/cli/dist-server/types/node/feedback/feedback-protocol.d.ts +32 -0
- package/cli/dist-server/types/node/feedback/feedback-service.d.ts +19 -0
- package/cli/dist-server/types/node/feedback/index.d.ts +2 -0
- package/cli/dist-server/types/node/galileo/agent-metrics-aggregator.d.ts +115 -0
- package/cli/dist-server/types/node/galileo/error-category.d.ts +65 -0
- package/cli/dist-server/types/node/galileo/galileo-chat-reporter.d.ts +302 -0
- package/cli/dist-server/types/node/galileo/galileo-protocol.d.ts +78 -0
- package/cli/dist-server/types/node/galileo/galileo-service.d.ts +171 -0
- package/cli/dist-server/types/node/galileo/galileo-session-bridge-protocol.d.ts +134 -0
- package/cli/dist-server/types/node/galileo/galileo-session-bridge.d.ts +105 -0
- package/cli/dist-server/types/node/galileo/galileo-timing-hook.d.ts +115 -0
- package/cli/dist-server/types/node/galileo/galileo-tool-error-report-hook.d.ts +32 -0
- package/cli/dist-server/types/node/galileo/galileo-tool-post-hook.d.ts +18 -0
- package/cli/dist-server/types/node/galileo/galileo-tool-pre-hook.d.ts +16 -0
- package/cli/dist-server/types/node/galileo/galileo-tool-start-report-hook.d.ts +14 -0
- package/cli/dist-server/types/node/galileo/galileo-tool-success-report-hook.d.ts +14 -0
- package/cli/dist-server/types/node/galileo/index.d.ts +15 -0
- package/cli/dist-server/types/node/galileo/session-error-tracker.d.ts +44 -0
- package/cli/dist-server/types/node/galileo/task-outcome-resolver.d.ts +28 -0
- package/cli/dist-server/types/node/galileo/task-outcome.d.ts +35 -0
- package/cli/dist-server/types/node/hooks/functional-hooks-protocol.d.ts +78 -0
- package/cli/dist-server/types/node/hooks/functional-hooks.d.ts +23 -0
- package/cli/dist-server/types/node/http/certificate-manager.d.ts +50 -0
- package/cli/dist-server/types/node/http/classify-network-error.d.ts +21 -0
- package/cli/dist-server/types/node/http/custom-header-http-interceptor.d.ts +14 -0
- package/cli/dist-server/types/node/http/custom-headers-provider.d.ts +26 -0
- package/cli/dist-server/types/node/http/fetch-proxy.d.ts +22 -0
- package/cli/dist-server/types/node/http/http-proxy-interceptor.d.ts +116 -0
- package/cli/dist-server/types/node/http/index.d.ts +6 -0
- package/cli/dist-server/types/node/ide-integration/ide-edit-manager.d.ts +53 -0
- package/cli/dist-server/types/node/ide-integration/ide-protocol.d.ts +450 -0
- package/cli/dist-server/types/node/install/index.d.ts +6 -0
- package/cli/dist-server/types/node/install/install-controller.d.ts +15 -0
- package/cli/dist-server/types/node/install/install-env.d.ts +12 -0
- package/cli/dist-server/types/node/install/install-protocol.d.ts +83 -0
- package/cli/dist-server/types/node/install/install-service.d.ts +36 -0
- package/cli/dist-server/types/node/install/releases-service.d.ts +29 -0
- package/cli/dist-server/types/node/install/shell-setup.d.ts +36 -0
- package/cli/dist-server/types/node/library-runtime.d.ts +9 -0
- package/cli/dist-server/types/node/loopback/endpoint-provider.d.ts +9 -0
- package/cli/dist-server/types/node/loopback/error-provider.d.ts +9 -0
- package/cli/dist-server/types/node/loopback/index.d.ts +4 -0
- package/cli/dist-server/types/node/loopback/loopback-body-limit.d.ts +52 -0
- package/cli/dist-server/types/node/lsp/index.d.ts +6 -0
- package/cli/dist-server/types/node/lsp/lsp-client.d.ts +104 -0
- package/cli/dist-server/types/node/lsp/lsp-manager.d.ts +90 -0
- package/cli/dist-server/types/node/lsp/lsp-protocol.d.ts +245 -0
- package/cli/dist-server/types/node/mcp/agent-scoped-mcp-manager.d.ts +38 -0
- package/cli/dist-server/types/node/mcp/index.d.ts +32 -0
- package/cli/dist-server/types/node/mcp/mcp-cli-config-initializer.d.ts +18 -0
- package/cli/dist-server/types/node/mcp/mcp-config-diagnostics-manager.d.ts +29 -0
- package/cli/dist-server/types/node/mcp/mcp-config-env-expand-service.d.ts +45 -0
- package/cli/dist-server/types/node/mcp/mcp-config-fingerprint.d.ts +28 -0
- package/cli/dist-server/types/node/mcp/mcp-config-manager.d.ts +110 -0
- package/cli/dist-server/types/node/mcp/mcp-config-store.d.ts +18 -0
- package/cli/dist-server/types/node/mcp/mcp-connection-manager.d.ts +35 -0
- package/cli/dist-server/types/node/mcp/mcp-controller.d.ts +56 -0
- package/cli/dist-server/types/node/mcp/mcp-descriptor-environment.d.ts +5 -0
- package/cli/dist-server/types/node/mcp/mcp-first-run-status-service.d.ts +37 -0
- package/cli/dist-server/types/node/mcp/mcp-log-service.d.ts +5 -0
- package/cli/dist-server/types/node/mcp/mcp-manager.d.ts +339 -0
- package/cli/dist-server/types/node/mcp/mcp-oauth-controller.d.ts +26 -0
- package/cli/dist-server/types/node/mcp/mcp-oauth-manager.d.ts +33 -0
- package/cli/dist-server/types/node/mcp/mcp-oauth-store.d.ts +30 -0
- package/cli/dist-server/types/node/mcp/mcp-permissions-manager.d.ts +52 -0
- package/cli/dist-server/types/node/mcp/mcp-plugin-registry.d.ts +39 -0
- package/cli/dist-server/types/node/mcp/mcp-ready-service.d.ts +94 -0
- package/cli/dist-server/types/node/mcp/mcp-resource-catalog-protocol.d.ts +62 -0
- package/cli/dist-server/types/node/mcp/mcp-resource-catalog.d.ts +32 -0
- package/cli/dist-server/types/node/mcp/mcp-server-manager.d.ts +283 -0
- package/cli/dist-server/types/node/mcp/mcp-server-model-manager.d.ts +14 -0
- package/cli/dist-server/types/node/mcp/mcp-subagent-tool-manager.d.ts +36 -0
- package/cli/dist-server/types/node/mcp/mcp-toggle-manager.d.ts +45 -0
- package/cli/dist-server/types/node/mcp/mcp-transport-manager.d.ts +34 -0
- package/cli/dist-server/types/node/mcp/mcp-validate-middleware.d.ts +25 -0
- package/cli/dist-server/types/node/mcp/node-websocket-transport.d.ts +38 -0
- package/cli/dist-server/types/node/mcp/official-mcp-egress-policy.d.ts +17 -0
- package/cli/dist-server/types/node/mcp/sdk-mcp-server.d.ts +149 -0
- package/cli/dist-server/types/node/mcp/sdk-mcp-transport.d.ts +97 -0
- package/cli/dist-server/types/node/memory/conditional-rules-service.d.ts +21 -0
- package/cli/dist-server/types/node/memory/glob-matcher.d.ts +16 -0
- package/cli/dist-server/types/node/memory/index.d.ts +20 -0
- package/cli/dist-server/types/node/memory/memory-age.d.ts +44 -0
- package/cli/dist-server/types/node/memory/memory-cache.d.ts +8 -0
- package/cli/dist-server/types/node/memory/memory-controller.d.ts +62 -0
- package/cli/dist-server/types/node/memory/memory-extraction-prompts.d.ts +11 -0
- package/cli/dist-server/types/node/memory/memory-extraction-service.d.ts +56 -0
- package/cli/dist-server/types/node/memory/memory-extraction-stop-hook.d.ts +18 -0
- package/cli/dist-server/types/node/memory/memory-freshness-post-tool-hook.d.ts +22 -0
- package/cli/dist-server/types/node/memory/memory-loader.d.ts +62 -0
- package/cli/dist-server/types/node/memory/memory-manager.d.ts +24 -0
- package/cli/dist-server/types/node/memory/memory-parser.d.ts +15 -0
- package/cli/dist-server/types/node/memory/memory-prompt-builder.d.ts +38 -0
- package/cli/dist-server/types/node/memory/memory-protocol.d.ts +235 -0
- package/cli/dist-server/types/node/memory/memory-relevance-protocol.d.ts +33 -0
- package/cli/dist-server/types/node/memory/memory-relevance-service.d.ts +30 -0
- package/cli/dist-server/types/node/memory/memory-scan.d.ts +35 -0
- package/cli/dist-server/types/node/memory/memory-types.d.ts +49 -0
- package/cli/dist-server/types/node/memory/memory-validator.d.ts +6 -0
- package/cli/dist-server/types/node/memory/subdirectory-memory-loader.d.ts +55 -0
- package/cli/dist-server/types/node/model/model-protocol.d.ts +22 -0
- package/cli/dist-server/types/node/multitask/session-flags.d.ts +110 -0
- package/cli/dist-server/types/node/multitask/types.d.ts +123 -0
- package/cli/dist-server/types/node/navigation/index.d.ts +2 -0
- package/cli/dist-server/types/node/navigation/navigation-manager.d.ts +12 -0
- package/cli/dist-server/types/node/navigation/navigation-protocol.d.ts +23 -0
- package/cli/dist-server/types/node/notification/notification-protocol.d.ts +19 -0
- package/cli/dist-server/types/node/output-style/output-style-protocol.d.ts +60 -0
- package/cli/dist-server/types/node/permission/brokered-sandbox/approval-coordinator.d.ts +32 -0
- package/cli/dist-server/types/node/permission/brokered-sandbox/host-protocol.d.ts +103 -0
- package/cli/dist-server/types/node/permission/canonicalize-command.d.ts +30 -0
- package/cli/dist-server/types/node/permission/codebuddy-sandbox-env.d.ts +35 -0
- package/cli/dist-server/types/node/permission/directory-trust-service.d.ts +45 -0
- package/cli/dist-server/types/node/permission/file-policy-assessment.d.ts +35 -0
- package/cli/dist-server/types/node/permission/index.d.ts +16 -0
- package/cli/dist-server/types/node/permission/permission-protocol.d.ts +9 -0
- package/cli/dist-server/types/node/permission/sandbox-attribution-analyzer.d.ts +108 -0
- package/cli/dist-server/types/node/permission/sandbox-audit-service.d.ts +40 -0
- package/cli/dist-server/types/node/permission/sandbox-exec-policy-builtin.d.ts +30 -0
- package/cli/dist-server/types/node/permission/sandbox-exec-policy-protocol.d.ts +67 -0
- package/cli/dist-server/types/node/permission/sandbox-exec-policy.d.ts +13 -0
- package/cli/dist-server/types/node/permission/sandbox-orchestrator-protocol.d.ts +239 -0
- package/cli/dist-server/types/node/permission/sandbox-orchestrator.d.ts +308 -0
- package/cli/dist-server/types/node/permission/sandbox-permission-gateway.d.ts +36 -0
- package/cli/dist-server/types/node/permission/sandbox-telemetry-context.d.ts +27 -0
- package/cli/dist-server/types/node/permission/sensitive-command-detector.d.ts +71 -0
- package/cli/dist-server/types/node/prewarm/prewarm-protocol.d.ts +296 -0
- package/cli/dist-server/types/node/product/api-key-helper-product-provider.d.ts +105 -0
- package/cli/dist-server/types/node/product/cli-options-product-provider.d.ts +30 -0
- package/cli/dist-server/types/node/product/cloud-pre-product-provider.d.ts +76 -0
- package/cli/dist-server/types/node/product/config-watch-service.d.ts +201 -0
- package/cli/dist-server/types/node/product/craft-to-cli-agent-models-sync-provider.d.ts +16 -0
- package/cli/dist-server/types/node/product/custom-agents-product-provider.d.ts +67 -0
- package/cli/dist-server/types/node/product/custom-commands-product-provider.d.ts +49 -0
- package/cli/dist-server/types/node/product/custom-product-config-provider.d.ts +6 -0
- package/cli/dist-server/types/node/product/index.d.ts +21 -0
- package/cli/dist-server/types/node/product/internet-enviroment-product-provider.d.ts +61 -0
- package/cli/dist-server/types/node/product/mcp-prompt-product-provider.d.ts +17 -0
- package/cli/dist-server/types/node/product/mcp-watch-service.d.ts +31 -0
- package/cli/dist-server/types/node/product/models-product-provider.d.ts +41 -0
- package/cli/dist-server/types/node/product/plugin-product-provider.d.ts +13 -0
- package/cli/dist-server/types/node/product/product-capabilities.d.ts +55 -0
- package/cli/dist-server/types/node/product/product-config-controller.d.ts +27 -0
- package/cli/dist-server/types/node/product/product-env-service.d.ts +20 -0
- package/cli/dist-server/types/node/product/product-identity.d.ts +57 -0
- package/cli/dist-server/types/node/product/product-protocol.d.ts +7 -0
- package/cli/dist-server/types/node/product/sdk-initialize-product-provider.d.ts +17 -0
- package/cli/dist-server/types/node/product/settings-endpoint-product-provider.d.ts +20 -0
- package/cli/dist-server/types/node/product/skill-product-provider.d.ts +62 -0
- package/cli/dist-server/types/node/references/index.d.ts +2 -0
- package/cli/dist-server/types/node/references/reference-protocol.d.ts +20 -0
- package/cli/dist-server/types/node/references/reference-service.d.ts +42 -0
- package/cli/dist-server/types/node/remote-control/remote-control-protocol.d.ts +288 -0
- package/cli/dist-server/types/node/runtime/add-dir-middleware.d.ts +13 -0
- package/cli/dist-server/types/node/runtime/cli-capabilities.d.ts +28 -0
- package/cli/dist-server/types/node/runtime/external-uri-opener.d.ts +8 -0
- package/cli/dist-server/types/node/runtime/file-local-storage.d.ts +17 -0
- package/cli/dist-server/types/node/runtime/host-capability-provider.d.ts +57 -0
- package/cli/dist-server/types/node/runtime/host-detection.d.ts +34 -0
- package/cli/dist-server/types/node/runtime/index.d.ts +8 -0
- package/cli/dist-server/types/node/runtime/workspace-folder-manager.d.ts +45 -0
- package/cli/dist-server/types/node/runtime/workspace.d.ts +5 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-backend-support.d.ts +7 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-cli-lifecycle-protocol.d.ts +109 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-cli-protocol.d.ts +376 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-rule-sync-service.d.ts +310 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-session-preparation.d.ts +49 -0
- package/cli/dist-server/types/node/sandbox-cli/sandbox-turn-config.d.ts +32 -0
- package/cli/dist-server/types/node/sandbox-cli/threat-domain-checker.d.ts +137 -0
- package/cli/dist-server/types/node/security-review/gate.d.ts +13 -0
- package/cli/dist-server/types/node/security-review/index.d.ts +2 -0
- package/cli/dist-server/types/node/security-review/protocol.d.ts +14 -0
- package/cli/dist-server/types/node/sensitive-content/index.d.ts +15 -0
- package/cli/dist-server/types/node/sensitive-content/managed-cipher-stream-restorer.d.ts +22 -0
- package/cli/dist-server/types/node/sensitive-content/sandbox-center-ipc-client-protocol.d.ts +3 -0
- package/cli/dist-server/types/node/sensitive-content/sandbox-center-ipc-client.d.ts +7 -0
- package/cli/dist-server/types/node/sensitive-content/sandbox-center-port.d.ts +17 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-approval-port.d.ts +22 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-content-mediation.d.ts +6 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-decision-mediation.d.ts +69 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-history-admission.d.ts +42 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-history-replay.d.ts +6 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-local-sideband.d.ts +21 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-model-boundary.d.ts +22 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-protection-metadata.d.ts +7 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-session-grants.d.ts +41 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-tool-egress-guard.d.ts +7 -0
- package/cli/dist-server/types/node/sensitive-content/sensitive-user-input-review.d.ts +7 -0
- package/cli/dist-server/types/node/sensitive-content/settings-sensitive-protection-policy.d.ts +14 -0
- package/cli/dist-server/types/node/server/types.d.ts +11 -2
- package/cli/dist-server/types/node/session/index.d.ts +15 -0
- package/cli/dist-server/types/node/session/input-history-service.d.ts +47 -0
- package/cli/dist-server/types/node/session/input-item-processors.d.ts +70 -0
- package/cli/dist-server/types/node/session/session-abort-middleware.d.ts +22 -0
- package/cli/dist-server/types/node/session/session-controller.d.ts +126 -0
- package/cli/dist-server/types/node/session/session-history-clean-flag.d.ts +2 -0
- package/cli/dist-server/types/node/session/session-history-clean-service.d.ts +49 -0
- package/cli/dist-server/types/node/session/session-hook-host-adapter.d.ts +21 -0
- package/cli/dist-server/types/node/session/session-host-adapter.d.ts +34 -0
- package/cli/dist-server/types/node/session/session-http-protocol.d.ts +1 -0
- package/cli/dist-server/types/node/session/session-interruption-host-adapter.d.ts +115 -0
- package/cli/dist-server/types/node/session/session-manager-host-adapter.d.ts +100 -0
- package/cli/dist-server/types/node/session/session-middleware.d.ts +68 -0
- package/cli/dist-server/types/node/session/session-response-host-adapter.d.ts +9 -0
- package/cli/dist-server/types/node/session/session-store-host-adapter.d.ts +23 -0
- package/cli/dist-server/types/node/session/tasks-controller.d.ts +80 -0
- package/cli/dist-server/types/node/settings/current-session-model-transition-protocol.d.ts +23 -0
- package/cli/dist-server/types/node/settings/current-session-model-transition.d.ts +15 -0
- package/cli/dist-server/types/node/settings/index.d.ts +8 -0
- package/cli/dist-server/types/node/settings/settings-controller.d.ts +23 -0
- package/cli/dist-server/types/node/settings/settings-manager.d.ts +1 -0
- package/cli/dist-server/types/node/settings/settings-protocol.d.ts +4 -0
- package/cli/dist-server/types/node/settings/settings-validate-middleware.d.ts +9 -0
- package/cli/dist-server/types/node/shell/delegating-shell-service.d.ts +44 -0
- package/cli/dist-server/types/node/shell/driver-shell-service.d.ts +8 -0
- package/cli/dist-server/types/node/shell/index.d.ts +10 -0
- package/cli/dist-server/types/node/shell/language-shim-env.d.ts +11 -0
- package/cli/dist-server/types/node/shell/output-spiller.d.ts +39 -0
- package/cli/dist-server/types/node/shell/powershell-safe-delete.d.ts +16 -0
- package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/contract.d.ts +61 -0
- package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/index.d.ts +3 -0
- package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/marker.d.ts +5 -0
- package/cli/dist-server/types/node/shell/safe-delete/bulk-guard/service.d.ts +12 -0
- package/cli/dist-server/types/node/shell/safe-delete/index.d.ts +17 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-attribution.d.ts +16 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-bootstrap.d.ts +1 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-env.d.ts +42 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-report.d.ts +18 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-sandbox-helpers.d.ts +39 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-settings.d.ts +42 -0
- package/cli/dist-server/types/node/shell/safe-delete/safe-delete-trash-service.d.ts +12 -0
- package/cli/dist-server/types/node/shell/shell-protocol.d.ts +287 -0
- package/cli/dist-server/types/node/shell/shell-runtime-paths.d.ts +23 -0
- package/cli/dist-server/types/node/shell/shell-service.d.ts +257 -0
- package/cli/dist-server/types/node/shell/shell-snapshot-protocol.d.ts +75 -0
- package/cli/dist-server/types/node/shell/shell-snapshot-service.d.ts +86 -0
- package/cli/dist-server/types/node/shell/terminal-serializer.d.ts +26 -0
- package/cli/dist-server/types/node/shell/truncate-buffer.d.ts +24 -0
- package/cli/dist-server/types/node/shell/windows-process-utils.d.ts +42 -0
- package/cli/dist-server/types/node/shortcut/shortcut-protocol.d.ts +41 -0
- package/cli/dist-server/types/node/skills/skill-approval.d.ts +31 -0
- package/cli/dist-server/types/node/stats/index.d.ts +5 -0
- package/cli/dist-server/types/node/stats/insights-protocol.d.ts +59 -0
- package/cli/dist-server/types/node/stats/insights-report-service.d.ts +17 -0
- package/cli/dist-server/types/node/stats/session-facet-service.d.ts +46 -0
- package/cli/dist-server/types/node/stats/stats-protocol.d.ts +145 -0
- package/cli/dist-server/types/node/stats/stats-service.d.ts +48 -0
- package/cli/dist-server/types/node/telemetry/cost-protocol.d.ts +67 -0
- package/cli/dist-server/types/node/telemetry/cost-service.d.ts +21 -0
- package/cli/dist-server/types/node/telemetry/extension-info-processor.d.ts +13 -0
- package/cli/dist-server/types/node/telemetry/friction-analysis.d.ts +54 -0
- package/cli/dist-server/types/node/telemetry/friction-recall-client.d.ts +15 -0
- package/cli/dist-server/types/node/telemetry/host-ide-info-processor.d.ts +11 -0
- package/cli/dist-server/types/node/telemetry/index.d.ts +21 -0
- package/cli/dist-server/types/node/telemetry/logger/index.d.ts +1 -0
- package/cli/dist-server/types/node/telemetry/logger/storage-path-provider.d.ts +4 -0
- package/cli/dist-server/types/node/telemetry/plugin-telemetry-protocol.d.ts +68 -0
- package/cli/dist-server/types/node/telemetry/plugin-telemetry-service.d.ts +31 -0
- package/cli/dist-server/types/node/telemetry/qimei-env-detector.d.ts +16 -0
- package/cli/dist-server/types/node/telemetry/sandbox-telemetry-protocol.d.ts +164 -0
- package/cli/dist-server/types/node/telemetry/sandbox-telemetry-service.d.ts +181 -0
- package/cli/dist-server/types/node/telemetry/startup-profiler.d.ts +32 -0
- package/cli/dist-server/types/node/telemetry/status-reporter.d.ts +39 -0
- package/cli/dist-server/types/node/telemetry/telemetry-client-carrier.d.ts +14 -0
- package/cli/dist-server/types/node/telemetry/telemetry-client-info-event-processor.d.ts +8 -0
- package/cli/dist-server/types/node/telemetry/telemetry-protocol.d.ts +137 -0
- package/cli/dist-server/types/node/telemetry/telemetry-service.d.ts +115 -0
- package/cli/dist-server/types/node/telemetry/turn-baggage-processor.d.ts +23 -0
- package/cli/dist-server/types/node/telemetry/vcs-event-processor.d.ts +19 -0
- package/cli/dist-server/types/node/tips/builtin-tips.d.ts +2 -0
- package/cli/dist-server/types/node/tips/index.d.ts +4 -0
- package/cli/dist-server/types/node/tips/tips-manager.d.ts +14 -0
- package/cli/dist-server/types/node/tips/tips-protocol.d.ts +42 -0
- package/cli/dist-server/types/node/tips/user-state-manager.d.ts +25 -0
- package/cli/dist-server/types/node/tool-control/index.d.ts +1 -0
- package/cli/dist-server/types/node/tool-control/tool-control-policy.d.ts +34 -0
- package/cli/dist-server/types/node/tools/a2a-cancel-task-tool.d.ts +55 -0
- package/cli/dist-server/types/node/tools/a2a-get-agent-card-tool.d.ts +59 -0
- package/cli/dist-server/types/node/tools/a2a-get-task-tool.d.ts +334 -0
- package/cli/dist-server/types/node/tools/a2a-send-message-tool.d.ts +168 -0
- package/cli/dist-server/types/node/tools/a2a-tool-guards.d.ts +48 -0
- package/cli/dist-server/types/node/tools/agent-tool.d.ts +202 -0
- package/cli/dist-server/types/node/tools/artifact-control-tool.d.ts +103 -0
- package/cli/dist-server/types/node/tools/artifact-tool.d.ts +96 -0
- package/cli/dist-server/types/node/tools/ask-user-for-structured-input-tool.d.ts +127 -0
- package/cli/dist-server/types/node/tools/ask-user-question-tool.d.ts +237 -0
- package/cli/dist-server/types/node/tools/audio-transcribe-service.d.ts +61 -0
- package/cli/dist-server/types/node/tools/audio-transcribe-tool.d.ts +66 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-allow-filter.d.ts +33 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-classifier-client.d.ts +230 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-critique-client.d.ts +51 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-defaults.d.ts +16 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-denial-tracker.d.ts +114 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-permission-service.d.ts +51 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-project-instructions.d.ts +26 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-protocol.d.ts +140 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-settings.d.ts +36 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-strategy.d.ts +21 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-system-prompt-builder.d.ts +28 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-timeout.d.ts +16 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-transcript-limit.d.ts +29 -0
- package/cli/dist-server/types/node/tools/auto-mode/auto-mode-transcript.d.ts +50 -0
- package/cli/dist-server/types/node/tools/auto-mode/index.d.ts +15 -0
- package/cli/dist-server/types/node/tools/auto-mode/permission-mode-policy.d.ts +63 -0
- package/cli/dist-server/types/node/tools/bash-output-tool.d.ts +34 -0
- package/cli/dist-server/types/node/tools/bash-sandbox-approval-requester.d.ts +55 -0
- package/cli/dist-server/types/node/tools/bash-tool.d.ts +211 -0
- package/cli/dist-server/types/node/tools/brief-mode-service.d.ts +26 -0
- package/cli/dist-server/types/node/tools/channel-tasks-tool.d.ts +174 -0
- package/cli/dist-server/types/node/tools/computer-use-tool.d.ts +86 -0
- package/cli/dist-server/types/node/tools/create-channel-tool.d.ts +82 -0
- package/cli/dist-server/types/node/tools/create-colleague-tool.d.ts +64 -0
- package/cli/dist-server/types/node/tools/cron-create-tool.d.ts +46 -0
- package/cli/dist-server/types/node/tools/cron-delete-tool.d.ts +28 -0
- package/cli/dist-server/types/node/tools/cron-list-tool.d.ts +27 -0
- package/cli/dist-server/types/node/tools/defer-execute-tool.d.ts +265 -0
- package/cli/dist-server/types/node/tools/defer-tool-config-protocol.d.ts +88 -0
- package/cli/dist-server/types/node/tools/defer-tool-config-service.d.ts +23 -0
- package/cli/dist-server/types/node/tools/deferred-tool-bridge.d.ts +50 -0
- package/cli/dist-server/types/node/tools/delegate-tool.d.ts +71 -0
- package/cli/dist-server/types/node/tools/edit-tool.d.ts +83 -0
- package/cli/dist-server/types/node/tools/enter-planmode-tool.d.ts +29 -0
- package/cli/dist-server/types/node/tools/enter-worktree-tool.d.ts +59 -0
- package/cli/dist-server/types/node/tools/exit-planmode-tool.d.ts +86 -0
- package/cli/dist-server/types/node/tools/file-change-artifact-publisher.d.ts +82 -0
- package/cli/dist-server/types/node/tools/glob-tool.d.ts +102 -0
- package/cli/dist-server/types/node/tools/grep-tool.d.ts +141 -0
- package/cli/dist-server/types/node/tools/image-edit-tool.d.ts +94 -0
- package/cli/dist-server/types/node/tools/image-gen-tool.d.ts +107 -0
- package/cli/dist-server/types/node/tools/image-service.d.ts +113 -0
- package/cli/dist-server/types/node/tools/index.d.ts +109 -0
- package/cli/dist-server/types/node/tools/kill-shell-tool.d.ts +27 -0
- package/cli/dist-server/types/node/tools/leave-worktree-tool.d.ts +54 -0
- package/cli/dist-server/types/node/tools/library-upload-tool.d.ts +70 -0
- package/cli/dist-server/types/node/tools/list-colleagues-tool.d.ts +35 -0
- package/cli/dist-server/types/node/tools/list-mcp-resources-tool.d.ts +58 -0
- package/cli/dist-server/types/node/tools/lsp-tool.d.ts +68 -0
- package/cli/dist-server/types/node/tools/main-agent-meta-tools.d.ts +107 -0
- package/cli/dist-server/types/node/tools/memory-tool.d.ts +33 -0
- package/cli/dist-server/types/node/tools/message-colleague-tool.d.ts +83 -0
- package/cli/dist-server/types/node/tools/monitor-tool.d.ts +216 -0
- package/cli/dist-server/types/node/tools/multi-edit-tool.d.ts +109 -0
- package/cli/dist-server/types/node/tools/notebook-edit-tool.d.ts +75 -0
- package/cli/dist-server/types/node/tools/notebook-read-tool.d.ts +55 -0
- package/cli/dist-server/types/node/tools/notebook-write-tool.d.ts +7 -0
- package/cli/dist-server/types/node/tools/plan-storage-service.d.ts +68 -0
- package/cli/dist-server/types/node/tools/powershell-clm-types.d.ts +30 -0
- package/cli/dist-server/types/node/tools/powershell-command-semantics.d.ts +23 -0
- package/cli/dist-server/types/node/tools/powershell-dangerous-cmdlets.d.ts +72 -0
- package/cli/dist-server/types/node/tools/powershell-destructive-warning.d.ts +12 -0
- package/cli/dist-server/types/node/tools/powershell-detection.d.ts +51 -0
- package/cli/dist-server/types/node/tools/powershell-git-safety.d.ts +60 -0
- package/cli/dist-server/types/node/tools/powershell-security.d.ts +93 -0
- package/cli/dist-server/types/node/tools/powershell-tool.d.ts +174 -0
- package/cli/dist-server/types/node/tools/produced-artifact-report.d.ts +35 -0
- package/cli/dist-server/types/node/tools/push-notification-tool.d.ts +55 -0
- package/cli/dist-server/types/node/tools/read-file-state-service.d.ts +27 -0
- package/cli/dist-server/types/node/tools/read-mcp-resource-tool.d.ts +71 -0
- package/cli/dist-server/types/node/tools/read-tool.d.ts +71 -0
- package/cli/dist-server/types/node/tools/repl/index.d.ts +10 -0
- package/cli/dist-server/types/node/tools/repl/repl-bridge-broker.d.ts +150 -0
- package/cli/dist-server/types/node/tools/repl/repl-bridge-host.d.ts +29 -0
- package/cli/dist-server/types/node/tools/repl/repl-catalog-protocol.d.ts +149 -0
- package/cli/dist-server/types/node/tools/repl/repl-catalog-render.d.ts +56 -0
- package/cli/dist-server/types/node/tools/repl/repl-catalog-source.d.ts +108 -0
- package/cli/dist-server/types/node/tools/repl/repl-import-rewrite.d.ts +17 -0
- package/cli/dist-server/types/node/tools/repl/repl-protocol.d.ts +210 -0
- package/cli/dist-server/types/node/tools/repl/repl-tool.d.ts +142 -0
- package/cli/dist-server/types/node/tools/repl/repl-worker-manager.d.ts +103 -0
- package/cli/dist-server/types/node/tools/repl/repl-worker-source.d.ts +16 -0
- package/cli/dist-server/types/node/tools/repl/repl-worker-source.generated.d.ts +2 -0
- package/cli/dist-server/types/node/tools/report-findings-tool.d.ts +97 -0
- package/cli/dist-server/types/node/tools/sandbox-approval-review.d.ts +40 -0
- package/cli/dist-server/types/node/tools/sandbox-permission-file-tool.d.ts +14 -0
- package/cli/dist-server/types/node/tools/sandbox-write-rule-guard.d.ts +126 -0
- package/cli/dist-server/types/node/tools/send-message-tool.d.ts +116 -0
- package/cli/dist-server/types/node/tools/send-user-message-attachments.d.ts +22 -0
- package/cli/dist-server/types/node/tools/send-user-message-tool.d.ts +60 -0
- package/cli/dist-server/types/node/tools/shell-stream-pusher.d.ts +25 -0
- package/cli/dist-server/types/node/tools/skill-manage-tool.d.ts +77 -0
- package/cli/dist-server/types/node/tools/skill-tool.d.ts +129 -0
- package/cli/dist-server/types/node/tools/slash-command-tool.d.ts +51 -0
- package/cli/dist-server/types/node/tools/space-upload/errors.d.ts +14 -0
- package/cli/dist-server/types/node/tools/space-upload/index.d.ts +4 -0
- package/cli/dist-server/types/node/tools/space-upload/local-file-source.d.ts +33 -0
- package/cli/dist-server/types/node/tools/space-upload/types.d.ts +65 -0
- package/cli/dist-server/types/node/tools/space-upload/upload-file.d.ts +27 -0
- package/cli/dist-server/types/node/tools/speak-in-channel-tool.d.ts +182 -0
- package/cli/dist-server/types/node/tools/structured-output-tool.d.ts +43 -0
- package/cli/dist-server/types/node/tools/task-create-tool.d.ts +71 -0
- package/cli/dist-server/types/node/tools/task-get-tool.d.ts +31 -0
- package/cli/dist-server/types/node/tools/task-list-tool.d.ts +20 -0
- package/cli/dist-server/types/node/tools/task-output-tool.d.ts +142 -0
- package/cli/dist-server/types/node/tools/task-stop-tool.d.ts +61 -0
- package/cli/dist-server/types/node/tools/task-storage-service.d.ts +161 -0
- package/cli/dist-server/types/node/tools/task-update-tool.d.ts +79 -0
- package/cli/dist-server/types/node/tools/team-create-tool.d.ts +84 -0
- package/cli/dist-server/types/node/tools/team-delete-tool.d.ts +38 -0
- package/cli/dist-server/types/node/tools/todo-storage-service.d.ts +48 -0
- package/cli/dist-server/types/node/tools/todo-write-tool.d.ts +117 -0
- package/cli/dist-server/types/node/tools/tool-always-approval-service.d.ts +73 -0
- package/cli/dist-server/types/node/tools/tool-argument-rewrite-service.d.ts +4 -0
- package/cli/dist-server/types/node/tools/tool-error-codes.d.ts +140 -0
- package/cli/dist-server/types/node/tools/tool-hook-manager.d.ts +61 -0
- package/cli/dist-server/types/node/tools/tool-manager.d.ts +585 -0
- package/cli/dist-server/types/node/tools/tool-permission-service.d.ts +145 -0
- package/cli/dist-server/types/node/tools/tool-permission-strategy.d.ts +83 -0
- package/cli/dist-server/types/node/tools/tool-protocol.d.ts +2 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/content-history-admission.d.ts +10 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/content-review.d.ts +56 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/execution-approval-adapter.d.ts +11 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/index.d.ts +7 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/mcp-permission-review.d.ts +15 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/mcp-projector.d.ts +5 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/permission-metadata.d.ts +8 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/projector-registry.d.ts +22 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/projectors/index.d.ts +5 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/prompt.d.ts +6 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/protocol.d.ts +231 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/review-context-build.d.ts +2 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/review-context.d.ts +42 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/review-runtime.d.ts +6 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/reviewer-client-impl.d.ts +3 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/reviewer-client.d.ts +37 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/scope.d.ts +6 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/service.d.ts +75 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/session-state.d.ts +49 -0
- package/cli/dist-server/types/node/tools/tool-risk-review/trusted-builtin-code.d.ts +25 -0
- package/cli/dist-server/types/node/tools/tool-search-protocol.d.ts +286 -0
- package/cli/dist-server/types/node/tools/tool-search-service.d.ts +137 -0
- package/cli/dist-server/types/node/tools/tool-search-tool.d.ts +103 -0
- package/cli/dist-server/types/node/tools/tool-spec/agent-tool-defer-overlay-cache.d.ts +45 -0
- package/cli/dist-server/types/node/tools/tool-spec/index.d.ts +6 -0
- package/cli/dist-server/types/node/tools/tool-spec/legacy-ide-tool-names.d.ts +2 -0
- package/cli/dist-server/types/node/tools/tool-spec/tool-defer-overlay.d.ts +70 -0
- package/cli/dist-server/types/node/tools/tool-spec/tool-spec-augment.d.ts +17 -0
- package/cli/dist-server/types/node/tools/tool-spec/tool-spec-parser.d.ts +38 -0
- package/cli/dist-server/types/node/tools/tool-spec/tool-spec-protocol.d.ts +83 -0
- package/cli/dist-server/types/node/tools/video-gen-tool.d.ts +88 -0
- package/cli/dist-server/types/node/tools/video-service.d.ts +57 -0
- package/cli/dist-server/types/node/tools/wait-for-mcp-servers-tool.d.ts +79 -0
- package/cli/dist-server/types/node/tools/web-fetch-tool.d.ts +164 -0
- package/cli/dist-server/types/node/tools/web-search-tool.d.ts +79 -0
- package/cli/dist-server/types/node/tools/wechat-reply-tool.d.ts +43 -0
- package/cli/dist-server/types/node/tools/wecom-reply-tool.d.ts +65 -0
- package/cli/dist-server/types/node/tools/workflow-background-task.d.ts +54 -0
- package/cli/dist-server/types/node/tools/workflow-tool.d.ts +83 -0
- package/cli/dist-server/types/node/tools/write-tool.d.ts +80 -0
- package/cli/dist-server/types/node/trace/trace-collector-protocol.d.ts +203 -0
- package/cli/dist-server/types/node/utils/installation-utils.d.ts +35 -0
- package/cli/dist-server/types/node/utils/osc-protocol-utils.d.ts +209 -0
- package/cli/dist-server/types/node/utils/process-identity.d.ts +40 -0
- package/cli/dist-server/types/node/utils/security-audit-log.d.ts +134 -0
- package/cli/dist-server/types/node/utils/terminal-detector-utils.d.ts +78 -0
- package/cli/dist-server/types/node/vim/index.d.ts +2 -0
- package/cli/dist-server/types/node/vim/vim-manager.d.ts +12 -0
- package/cli/dist-server/types/node/vim/vim-protocol.d.ts +24 -0
- package/cli/dist-server/types/vendor/cbc-core/node/agent/agent-protocol.d.ts +12 -2
- package/cli/dist-server/types/vendor/cbc-core/node/agent/reviewer-recovery.d.ts +7 -0
- package/cli/dist-server/types/vendor/cbc-core/node/context/mods-bridge.d.ts +38 -2
- package/cli/dist-server/types/vendor/cbc-core/node/session/background-task-protocol.d.ts +14 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/interruption-service.d.ts +4 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-hook-host-protocol.d.ts +2 -1
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-interruption-host-protocol.d.ts +3 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-protocol.d.ts +8 -2
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-store.d.ts +59 -7
- package/cli/dist-server/types/vendor/cbc-core/node/session/truncation-recovery.d.ts +8 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session-title/session-title-utils.d.ts +36 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/history-utils.d.ts +37 -9
- package/cli/dist-server/types/vendor/cbc-core/node/utils/input-item-utils.d.ts +28 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/message-utils.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/model-utils.d.ts +9 -5
- package/cli/dist-server/types/vendor/cbc-shared/node/agent/custom-input-item-types.d.ts +20 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/agent/openai-agents-types.d.ts +2 -2
- package/cli/dist-server/types/vendor/cbc-shared/node/index.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/model/model-errors.d.ts +23 -6
- package/cli/dist-server/types/vendor/cbc-shared/node/tools/tool-names.d.ts +2 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/utils/concurrency-utils.d.ts +5 -0
- package/cli/dist-server/types/workspace/agent-client-protocol/lib/common/prompt-codec.d.ts +2 -0
- package/cli/dist-server/types/workspace/agent-client-protocol/lib/common/security-review-reason-code.d.ts +0 -10
- package/cli/dist-server/types/workspace/cbc-checkpoint/lib/node/checkpoint/checkpoint-path-utils.d.ts +10 -0
- package/cli/dist-server/types/workspace/cbc-checkpoint/lib/node/checkpoint/checkpoint-service.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/agent-protocol.d.ts +12 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/reviewer-recovery.d.ts +7 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/context/mods-bridge.d.ts +38 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/background-task-protocol.d.ts +14 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/interruption-service.d.ts +4 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-hook-host-protocol.d.ts +2 -1
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-interruption-host-protocol.d.ts +3 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-protocol.d.ts +8 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-store.d.ts +59 -7
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/truncation-recovery.d.ts +8 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session-title/session-title-utils.d.ts +36 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/history-utils.d.ts +37 -9
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/input-item-utils.d.ts +28 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/message-utils.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/model-utils.d.ts +9 -5
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-parser.d.ts +34 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-protocol.d.ts +191 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-scheduler-service.d.ts +131 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-scheduler.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-state-manager.d.ts +50 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-storage.d.ts +61 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/cron-task-session.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/index.d.ts +8 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/cron/loop-skill-provider.d.ts +36 -0
- package/cli/dist-server/types/workspace/cbc-cron/lib/node/index.d.ts +10 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/bg-session-handler.d.ts +88 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-auto-restart.d.ts +61 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-channel-autoconnect.d.ts +28 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-enhancements-lifecycle.d.ts +45 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-process.d.ts +77 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-protocol.d.ts +324 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-service.d.ts +45 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/index.d.ts +10 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/session-registry.d.ts +39 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/system-service.d.ts +60 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/wake-detector.d.ts +47 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/index.d.ts +11 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-format.d.ts +25 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-policy.d.ts +55 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-protocol.d.ts +204 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-service.d.ts +353 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-session-start-hook.d.ts +25 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/goal-utils.d.ts +23 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/goal/index.d.ts +6 -0
- package/cli/dist-server/types/workspace/cbc-goal/lib/node/index.d.ts +12 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/index.d.ts +35 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/index.d.ts +14 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/sec-default.d.ts +32 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/builtin/telemetry.d.ts +43 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/enable-flag.d.ts +41 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/engine-builder.d.ts +61 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/hooks-registry.d.ts +188 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/index.d.ts +6 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/mods-runtime.d.ts +101 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/op-table.d.ts +37 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/pattern.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/core-handler.d.ts +78 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/host-bindings.d.ts +215 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/index.d.ts +6 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/plugin-store.d.ts +22 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/render-component.d.ts +115 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/render-registry.d.ts +99 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/host/terminal-play.d.ts +56 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/index.d.ts +9 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/fan-out.d.ts +23 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/hook-result-mapper.d.ts +27 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/legacy-adapter/index.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/bootstrap.d.ts +104 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/bundle-cache.d.ts +59 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/index.d.ts +8 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/isolated-import.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/load-mod.d.ts +151 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/manifest-dir.d.ts +33 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/mounted-import.d.ts +12 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/ts-runtime.d.ts +64 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/types-emitter.d.ts +105 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/testing/harness.d.ts +84 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/testing/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/agent.d.ts +188 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/command.d.ts +114 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/prompt.d.ts +310 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/tool.d.ts +308 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events/upstream.d.ts +8777 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/events.d.ts +651 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/types/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/concurrency.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/dependency-resolver.d.ts +43 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/directory-plugin-cache-projection.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/guards/index.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/guards/weixinpay-integrity-guard.d.ts +48 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/index.d.ts +42 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/git-plugin-installer.d.ts +42 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/git-subdir-plugin-installer.d.ts +19 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/index.d.ts +4 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/local-plugin-installer.d.ts +40 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/installers/npm-plugin-installer.d.ts +23 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/agent-loader.d.ts +43 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/command-loader.d.ts +39 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/hook-loader.d.ts +55 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/index.d.ts +8 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/lsp-loader.d.ts +47 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/mcp-loader.d.ts +75 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/output-style-loader.d.ts +49 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/plugin-loader-manager.d.ts +73 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/loaders/skill-loader.d.ts +45 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplace-name-validator.d.ts +50 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplace-path-safety.d.ts +86 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/base-marketplace.d.ts +48 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/builtin-marketplace-provider.d.ts +47 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/directory-marketplace.d.ts +19 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-availability-detector.d.ts +62 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-fallback-coordinator.d.ts +42 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/git-to-zip-url-converter.d.ts +50 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/github-marketplace.d.ts +41 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/http-marketplace.d.ts +47 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/index.d.ts +13 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-config-manager.d.ts +43 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-factory.d.ts +12 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-storage.d.ts +142 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/marketplace-update-checker.d.ts +41 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/marketplaces/zip-marketplace.d.ts +150 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/mcpb-handler.d.ts +29 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-controller.d.ts +77 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-environment.d.ts +36 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-error-collector.d.ts +17 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-install-stats-service.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-manager.d.ts +765 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-mcp-snapshot.d.ts +63 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-options-storage.d.ts +87 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-policy-service.d.ts +55 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-protocol.d.ts +1567 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-read-summary.d.ts +61 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-runtime-refresh-service.d.ts +262 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/plugin-validator.d.ts +48 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/session-plugin-snapshot.d.ts +5 -0
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/plugins/zip-utils.d.ts +94 -0
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/agent/custom-input-item-types.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/agent/openai-agents-types.d.ts +2 -2
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/model/model-errors.d.ts +23 -6
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/tools/tool-names.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/utils/concurrency-utils.d.ts +5 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/code-ratio-protocol.d.ts +124 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/code-ratio-reporter.d.ts +57 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/diff/unified-diff.d.ts +37 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/feature-gate.d.ts +59 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/filters/file-filter.d.ts +41 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/index.d.ts +6 -0
- package/cli/dist-server/types/workspace/code-ratio/lib/common/vcs-repo-resolver-protocol.d.ts +50 -0
- package/cli/dist-server/types/workspace/product/lib/common/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/product/lib/common/repo-params.d.ts +14 -0
- package/cli/dist-server/types/workspace/product/lib/common/types/features.d.ts +69 -44
- package/cli/dist-server/types/workspace/product/lib/common/types/language-model.d.ts +6 -1
- package/cli/dist-server/types/workspace/sandbox-cli/lib/common/protocol.generated.d.ts +392 -0
- package/cli/dist-server/types/workspace/sandbox-cli/lib/node/file-policy.d.ts +48 -0
- package/cli/dist-server/types/workspace/sandbox-cli/lib/node/resolver.d.ts +95 -0
- package/cli/dist-server/types/workspace/sandbox-cli/lib/node/sandbox-cli-client.d.ts +78 -0
- package/cli/dist-server/types/workspace/telemetry/lib/common/event/types/security-review.d.ts +35 -6
- package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/index.d.ts +1 -1
- package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/otel-env.d.ts +1 -0
- package/cli/package.json +1 -1
- package/cli/product.cloudhosted.json +1 -1
- package/cli/product.internal.json +1 -1
- package/cli/product.ioa.json +1 -1
- package/cli/product.json +1 -1
- package/cli/product.selfhosted.json +1 -1
- package/docs/client.md +62 -0
- package/docs/in-process.md +151 -14
- package/docs/server.md +40 -1
- package/executor/lib/capsule/THIRD_PARTY_LICENSES.md +2 -2
- package/executor/lib/capsule/entry.mjs +8 -8
- package/executor/lib/capsule/manifest.json +2 -2
- package/executor/lib/private-protocol.cjs +33 -2
- package/executor/lib/private-protocol.d.cts +21 -1
- package/executor/lib/types.d.cts +15 -0
- package/lib/agent/v2.d.ts +1 -1
- package/lib/agent/v2.js +1 -1
- package/lib/application/services.d.ts +13 -1
- package/lib/application/services.js +1 -1
- package/lib/cli/main.js +3 -3
- package/lib/client/rpc.d.ts +16 -0
- package/lib/components/functional-hooks.d.mts +4 -0
- package/lib/components/functional-hooks.mjs +1 -0
- package/lib/harness/create-harness.js +1 -1
- package/lib/harness/hooks.d.ts +8 -0
- package/lib/harness/hooks.js +1 -0
- package/lib/harness/runtime.js +1 -1
- package/lib/harness/types.d.ts +7 -2
- package/lib/integration/agent-integration.d.ts +5 -1
- package/lib/integration/agent-integration.js +1 -1
- package/lib/integration/client-mcp-attachment.d.ts +5 -1
- package/lib/integration/client-mcp-attachment.js +1 -1
- package/lib/integration/executor-supervisor.d.ts +10 -1
- package/lib/integration/executor-supervisor.js +1 -1
- package/lib/integration/session-mcp-scope.d.ts +5 -1
- package/lib/integration/session-mcp-scope.js +1 -1
- package/lib/integration/session-mcp-view.d.ts +6 -1
- package/lib/integration/session-mcp-view.js +1 -1
- package/lib/mcp-server/module.d.ts +22 -2
- package/lib/mcp-server/module.js +1 -1
- package/lib/mcp-server/rpcs.d.ts +174 -123
- package/lib/mcp-server/rpcs.js +1 -1
- package/lib/mcp-server/schemas.d.ts +33 -0
- package/lib/mcp-server/schemas.js +1 -1
- package/lib/protocol/rpc.d.ts +73 -3
- package/lib/public.d.ts +1 -1
- package/package.json +24 -20
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/goal` 功能的对外契约。
|
|
3
|
+
*
|
|
4
|
+
* 与实现 (`goal-service.ts`) 解耦:业务侧只需要依赖本文件的 Symbol + interface
|
|
5
|
+
* 即可注入并测试,不必拉到具体实现类(DI / mock 都更轻)。
|
|
6
|
+
*
|
|
7
|
+
* 模块组织(doctor / memory / checkpoint 同模式):
|
|
8
|
+
* - goal-protocol.ts Symbol + interface + 数据契约 + 常量
|
|
9
|
+
* - goal-policy.ts 纯文案 / prompt 模板 / 默认 policy
|
|
10
|
+
* - goal-utils.ts 纯函数:parseActiveGoal / buildGoalPromptHook
|
|
11
|
+
* - goal-service.ts `@Component(GoalService)` 唯一实现
|
|
12
|
+
* - goal-session-start-hook.ts SessionStart 路径自动 restore
|
|
13
|
+
*/
|
|
14
|
+
import { PromptHookDefinition } from '../../../../../node/hooks/hook-protocol.js';
|
|
15
|
+
import { Session } from '../../../../cbc-core/lib/node/index.js';
|
|
16
|
+
import { GoalResultItem, PromptHookResult } from '../../../../cbc-shared/lib/node/index.js';
|
|
17
|
+
export declare const GoalService: unique symbol;
|
|
18
|
+
export interface ActiveGoal {
|
|
19
|
+
condition: string;
|
|
20
|
+
/** scope id;唯一定位一次 set() 注册的 hook 实例。详见 GoalServicePolicy.scopeIdFor。 */
|
|
21
|
+
scopeId: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
/**
|
|
24
|
+
* goal set 时的 session.usage.totalTokens 快照。
|
|
25
|
+
* 终态时用 (当前 totalTokens - tokensAtStart) 计算 goal 期间的增量 token,
|
|
26
|
+
* 与 cc 的 "Goal achieved (… · N tokens)" 语义对齐。
|
|
27
|
+
* 缺省(旧 session resume 时)按 0 处理 → tokenDelta 退化为 totalTokens。
|
|
28
|
+
*/
|
|
29
|
+
tokensAtStart?: number;
|
|
30
|
+
/**
|
|
31
|
+
* goal 期间已发生的 turn 数(kick-off + 每次 stop-hook 评估算一轮)。
|
|
32
|
+
* 终态时随 GoalResultItem 一起持久化。
|
|
33
|
+
* 该字段会被 GoalServiceImpl.setMeta 持久化到 session.meta,
|
|
34
|
+
* 因此即便跨 hook 回调也能稳定累加。
|
|
35
|
+
*/
|
|
36
|
+
turnCount?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 暂停:卸掉 Stop hook、打断当前回合,保留 condition / createdAt。
|
|
39
|
+
* 暂停后不再自动续轮。
|
|
40
|
+
*/
|
|
41
|
+
paused?: boolean;
|
|
42
|
+
/** 点暂停时的墙钟,用来冻住 elapsed。 */
|
|
43
|
+
pausedAt?: number;
|
|
44
|
+
}
|
|
45
|
+
export type HostGoalSnapshot = Pick<ActiveGoal, 'condition' | 'createdAt' | 'paused' | 'pausedAt' | 'tokensAtStart' | 'turnCount'>;
|
|
46
|
+
export interface GoalService {
|
|
47
|
+
/** 从宿主持久状态恢复执行镜像与 hook;不启动回合、不写历史或 session meta 文件。 */
|
|
48
|
+
/**
|
|
49
|
+
* 宿主持久态 → CLI 执行镜像。
|
|
50
|
+
*
|
|
51
|
+
* `continueRun` 只有宿主的镜像回灌(attach / 换进程自愈)才可为 true:
|
|
52
|
+
* 动作类请求自己会 abort 或 kickoff,恢复阶段先起一轮会造成反向副作用。
|
|
53
|
+
*/
|
|
54
|
+
restoreFromHost(session: Session, goal: HostGoalSnapshot | null, options?: {
|
|
55
|
+
continueRun?: boolean;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* 交出**某条连接**名下所有会话的宿主权威(连接关闭时调用)。
|
|
59
|
+
*
|
|
60
|
+
* 一条连接可以服务多个会话,而关闭事件只带 connectionId——按连接失效才能覆盖全。
|
|
61
|
+
*/
|
|
62
|
+
releaseHostOwnershipForConnection(connectionId: string): void;
|
|
63
|
+
/** 登记一条活跃宿主连接(transport 建立时调用,与上面那条对称)。 */
|
|
64
|
+
registerHostConnection(connectionId: string): void;
|
|
65
|
+
/** 设定/替换当前 session 的目标。若已有目标则先注销并提示替换。 */
|
|
66
|
+
set(session: Session, condition: string): Promise<void>;
|
|
67
|
+
/** 清除当前目标,并注销已注册的 hook。 */
|
|
68
|
+
clear(session: Session): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* 暂停目标:卸 Stop hook、冻计时,并打断当前回合。
|
|
71
|
+
* 保留目标状态,继续时重新挂 hook。
|
|
72
|
+
*/
|
|
73
|
+
pause(session: Session): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* 继续已暂停的目标:重新注册 hook。
|
|
76
|
+
* 当前回合还在跑就只恢复续跑;空闲才 kick-off。
|
|
77
|
+
*/
|
|
78
|
+
resume(session: Session): Promise<void>;
|
|
79
|
+
/** 显示当前目标。无目标时输出引导文案。 */
|
|
80
|
+
show(session: Session): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* 从 session.meta 中已存的 activeGoal 重新注册 hook(resume 路径)。
|
|
83
|
+
* 幂等:若 scopeId 已经在 registry 内则跳过。
|
|
84
|
+
*/
|
|
85
|
+
restoreFromMeta(session: Session): Promise<void>;
|
|
86
|
+
/** 当前 session 是否有 active goal。 */
|
|
87
|
+
has(session: Session): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 用 history 里的 goal-status 项兜底恢复 `session.meta.activeGoal`。
|
|
90
|
+
*
|
|
91
|
+
* served 会话不落 session-meta,宿主 runtime 换进程后新进程查不到 goal;
|
|
92
|
+
* 恢复后再走 pause / resume / clear 才是对的语义(否则退化成 no-goal)。
|
|
93
|
+
*/
|
|
94
|
+
reconcileFromHistory(session: Session): ActiveGoal | undefined;
|
|
95
|
+
/** 当前 session 的 active goal(仅读 meta,不查 registry)。 */
|
|
96
|
+
get(session: Session): ActiveGoal | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* 取 session.history 中最近一次(按 append 顺序)的 goal-result 终态项。
|
|
99
|
+
*
|
|
100
|
+
* 用于无参 `/goal` 的 recap 面板:在没有 active goal 时把最后一次达成 /
|
|
101
|
+
* 不可达的目标 surface 出来,对齐 cc `/goal` 的 banner 行为
|
|
102
|
+
* (`✔ Goal achieved` + Goal: + stats,Esc to dismiss)。
|
|
103
|
+
*
|
|
104
|
+
* 实现层只读 history、不写副作用——便于 panel 直接订阅。
|
|
105
|
+
*/
|
|
106
|
+
getLatestResult(session: Session): GoalResultItem | undefined;
|
|
107
|
+
}
|
|
108
|
+
/** condition 字符长度软上限(与 cc 文档对齐:4000 字符)。 */
|
|
109
|
+
export declare const GOAL_CONDITION_MAX_CHARS = 4000;
|
|
110
|
+
/** scopeId 前缀;所有 goal hook 的 scope 都以此打头。 */
|
|
111
|
+
export declare const GOAL_SCOPE_PREFIX = "goal:";
|
|
112
|
+
/** 已知的 goal metric 名(保持与 cc 字面对齐,便于跨工具检索)。 */
|
|
113
|
+
export declare const GOAL_METRICS: {
|
|
114
|
+
readonly SET: 'tengu_goal_set';
|
|
115
|
+
readonly CLEARED: 'tengu_goal_cleared';
|
|
116
|
+
readonly ACHIEVED: 'tengu_goal_achieved';
|
|
117
|
+
readonly MET: 'goal_met';
|
|
118
|
+
readonly FAILED: 'tengu_goal_failed';
|
|
119
|
+
readonly RESTORED: 'tengu_goal_restored_on_resume';
|
|
120
|
+
};
|
|
121
|
+
export type GoalMetricName = typeof GOAL_METRICS[keyof typeof GOAL_METRICS];
|
|
122
|
+
/** Goal metric 发送通道。生产由 service 注入实现,单测可换 spy。 */
|
|
123
|
+
export interface GoalMetricSink {
|
|
124
|
+
record(name: GoalMetricName, payload?: Record<string, unknown>): void;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Goal 文案表。集中所有面向用户的英文 string 以便未来 i18n / 个性化。
|
|
128
|
+
* 都是 `(args) => string` 形式,便于参数化。
|
|
129
|
+
*/
|
|
130
|
+
export interface GoalMessages {
|
|
131
|
+
usage(): string;
|
|
132
|
+
tooLong(actual: number, max: number): string;
|
|
133
|
+
hooksDisabled(): string;
|
|
134
|
+
cleared(prev: string): string;
|
|
135
|
+
set(condition: string): string;
|
|
136
|
+
clearedOnly(prev: string): string;
|
|
137
|
+
noGoal(): string;
|
|
138
|
+
active(condition: string): string;
|
|
139
|
+
paused(condition: string): string;
|
|
140
|
+
resumed(condition: string): string;
|
|
141
|
+
achieved(reason?: string): string;
|
|
142
|
+
impossible(reason?: string): string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 可替换的策略层。集中所有可变常量与小算法,便于:
|
|
146
|
+
* - 测试时注入 stub policy 控制行为;
|
|
147
|
+
* - 未来切换文案 / scope 命名规则 / prompt 模板时不动 service。
|
|
148
|
+
*/
|
|
149
|
+
export interface GoalServicePolicy {
|
|
150
|
+
maxConditionChars: number;
|
|
151
|
+
scopeIdFor(sessionId: string): string;
|
|
152
|
+
/**
|
|
153
|
+
* 构造发给 stop-condition evaluator 的 user prompt。
|
|
154
|
+
*
|
|
155
|
+
* @param goal 当前 active goal(含 condition、createdAt 等上下文)
|
|
156
|
+
*
|
|
157
|
+
* 接收整个 goal 而不仅是 condition,是为了让 prompt 能告知 evaluator
|
|
158
|
+
* "评估窗口"——只看 goal 设置之后的对话,避免被同 session 中上一个 goal
|
|
159
|
+
* 的成功响应误判(实测在国内 deepseek 等网关上很容易出现"刚 set 完
|
|
160
|
+
* 立刻 achieved"的现象)。
|
|
161
|
+
*/
|
|
162
|
+
buildStopConditionPrompt(goal: ActiveGoal): string;
|
|
163
|
+
/**
|
|
164
|
+
* 构造 `/goal <condition>` 设置完成后立即下发给 agent 的"启动消息"。
|
|
165
|
+
*
|
|
166
|
+
* 设计原因(与 Claude Code 行为对齐):
|
|
167
|
+
* - cc 的 `/goal` 设置后会立即 kick off agent run,而我们之前的实现只
|
|
168
|
+
* 注册了 Stop hook 等待用户下次输入触发 agent,导致表现"什么都没发生";
|
|
169
|
+
* - 把启动文案抽到 policy,方便 i18n 与单测断言。
|
|
170
|
+
*
|
|
171
|
+
* 返回 falsy(''/null/undefined)表示"不要 kick off"——给业务侧(或测试)
|
|
172
|
+
* 一个关闭自动启动的旁门。
|
|
173
|
+
*/
|
|
174
|
+
buildKickoffMessage(condition: string): string;
|
|
175
|
+
messages: GoalMessages;
|
|
176
|
+
}
|
|
177
|
+
/** Hook callback 类型别名,方便 utils 引用。 */
|
|
178
|
+
export type GoalPromptHookCallback = NonNullable<PromptHookDefinition['onResult']>;
|
|
179
|
+
/** 内部使用:onResult 收到的回调入参。 */
|
|
180
|
+
export type GoalPromptHookResult = PromptHookResult;
|
|
181
|
+
/**
|
|
182
|
+
* `/goal` 命令各种状态文案的"事件类型"枚举。
|
|
183
|
+
*
|
|
184
|
+
* 后端 GoalServiceImpl 把每条状态文案 emit 到 history 时同时挂上结构化的
|
|
185
|
+
* `providerData.goalStatus`,让 Web UI / 其它 ACP 客户端拿到**与 locale
|
|
186
|
+
* 无关**的事件 + 字段,自己用 i18n 字典渲染本地化文案。
|
|
187
|
+
*
|
|
188
|
+
* 列表与 `GoalServicePolicy.messages` 一一对应,方便后续新增字段时机械同步。
|
|
189
|
+
*/
|
|
190
|
+
export type GoalStatusKind = 'usage' | 'too-long' | 'hooks-disabled' | 'set' | 'set-replaced' | 'cleared' | 'no-goal' | 'active' | 'paused' | 'resumed';
|
|
191
|
+
export interface GoalStatusPayload {
|
|
192
|
+
kind: GoalStatusKind;
|
|
193
|
+
/** set / set-replaced / active / paused / resumed 携带新条件 */
|
|
194
|
+
condition?: string;
|
|
195
|
+
/** set-replaced / cleared 携带被替换/被清除的旧条件 */
|
|
196
|
+
prev?: string;
|
|
197
|
+
/** too-long 错误诊断字段 */
|
|
198
|
+
actual?: number;
|
|
199
|
+
max?: number;
|
|
200
|
+
/** set / active / paused 携带 goal.createdAt,给 Web UI 输入框 elapsed 用 */
|
|
201
|
+
createdAt?: number;
|
|
202
|
+
/** paused 携带冻结时刻,给 Web UI 冻 elapsed */
|
|
203
|
+
pausedAt?: number;
|
|
204
|
+
}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/goal` 命令背后的 service 实现。
|
|
3
|
+
*
|
|
4
|
+
* Claude Code 官方文档定义:
|
|
5
|
+
* > The /goal command is a built-in shortcut for a session-scoped
|
|
6
|
+
* > prompt-based Stop hook.
|
|
7
|
+
*
|
|
8
|
+
* 实现思路:
|
|
9
|
+
* - `/goal <condition>` 通过 ScopedHookRegistry 注册一个 prompt-type Stop hook,
|
|
10
|
+
* scopeId 由 `policy.scopeIdFor(sessionId)` 生成(含 nonce 防漂移),
|
|
11
|
+
* 并把 `condition` 与 scopeId 写入 `session.meta.activeGoal`。
|
|
12
|
+
* - hook 评估返回 `{ok:true}` 则模型自然停止,输出 "Goal achieved",自动注销。
|
|
13
|
+
* - 评估返回 `{ok:false}` 则 hook 返回 block + continueRequest,模型继续工作。
|
|
14
|
+
* - 评估返回 `{ok:false, impossible:true}` 则视作"目标不可达",停止循环,
|
|
15
|
+
* 输出 "Goal could not be achieved: <reason>",自动注销。
|
|
16
|
+
* - 通过 PromptHookDefinition.onResult 回调订阅评估结果。
|
|
17
|
+
*
|
|
18
|
+
* 设计点(可维护性 / 可测试性):
|
|
19
|
+
* - 所有契约都从 `goal-protocol` 引入,方便业务侧只依赖 Symbol + interface。
|
|
20
|
+
* - 所有 mutable 副作用都封装在 protected 方法,便于子类化定制 / spy。
|
|
21
|
+
* - `configure({ policy, metrics })` 注入测试替身,无需绕开 DI。
|
|
22
|
+
* - onResult 回调先校验 `current.scopeId === goal.scopeId`,避免对早已被
|
|
23
|
+
* 替换或清除的 goal 做副作用。
|
|
24
|
+
*/
|
|
25
|
+
import { AcpBroadcastService } from '../../../../../node/acp/acp-protocol.js';
|
|
26
|
+
import { AcpDrainTrigger } from '../../../../../node/agent-task/agent-task-protocol.js';
|
|
27
|
+
import { HookInput, PromptHookDefinition, ScopedHookRegistry } from '../../../../../node/hooks/hook-protocol.js';
|
|
28
|
+
import { AgentService, MessageQueueManager, NotificationInjectionBuffer, Session, SessionManager } from '../../../../cbc-core/lib/node/index.js';
|
|
29
|
+
import { GoalResultItem, PromptHookResult } from '../../../../cbc-shared/lib/node/index.js';
|
|
30
|
+
import { Logger } from '../../../../telemetry/lib/common/index.js';
|
|
31
|
+
import { ActiveGoal, GoalMetricSink, GoalService, GoalServicePolicy, GoalStatusPayload, type HostGoalSnapshot } from './goal-protocol.js';
|
|
32
|
+
export declare class GoalServiceImpl implements GoalService {
|
|
33
|
+
protected readonly logger: Logger;
|
|
34
|
+
protected readonly scopedHookRegistry: ScopedHookRegistry;
|
|
35
|
+
protected readonly sessionManager: SessionManager;
|
|
36
|
+
/**
|
|
37
|
+
* AgentService 用 @Optional() 注入:
|
|
38
|
+
* - 单测里我们不挂 AgentService(kick-off 可被 stub 关闭);
|
|
39
|
+
* - headless / 异常 IoC 场景下没有 AgentService 时 set() 仍然能完成
|
|
40
|
+
* hook 注册,只是不会自动 kick off。
|
|
41
|
+
*/
|
|
42
|
+
protected readonly agentService?: AgentService;
|
|
43
|
+
protected readonly acpBroadcastService?: AcpBroadcastService;
|
|
44
|
+
/**
|
|
45
|
+
* ACP / Web UI 的 kick-off 不能直接 runDefault:那条 run 没有
|
|
46
|
+
* createEventForwardingPromise 覆盖事件转发,思考/工具到不了前端,输入框也会一直
|
|
47
|
+
* 停在 running。**由谁起这一轮**按模式分:
|
|
48
|
+
* - Mode A:进 session.queue,等 AcpView 的 drain 带转发消费;
|
|
49
|
+
* - Mode B:session.queue 只归 rich queue 镜像,drain 读的是注入缓冲,所以
|
|
50
|
+
* kick-off 也走缓冲(与后台通知同一投递通道,见 BackgroundTaskNotifier)。
|
|
51
|
+
*/
|
|
52
|
+
protected readonly messageQueueManager?: MessageQueueManager;
|
|
53
|
+
/**
|
|
54
|
+
* Mode B(deferred dispatch)下 `session.queue` 是 rich queue 的展示镜像,ACP 的
|
|
55
|
+
* drain 只读注入缓冲(#89130)。目标 kick-off 是「无宿主 prompt 也要自己起一轮」的
|
|
56
|
+
* 系统注入项,与后台通知同构,因此 Mode B 走同一个缓冲,靠 AcpDrainTrigger 投递。
|
|
57
|
+
*/
|
|
58
|
+
protected readonly notificationBuffer?: NotificationInjectionBuffer;
|
|
59
|
+
/**
|
|
60
|
+
* HTTP PUT / 暂停后继续 走 GoalService 时,当前并不在 AcpView.executePrompt 里,
|
|
61
|
+
* 只入队没有人 drain。注入 AcpDrainTrigger,把 kick-off 送进带转发的 drain。
|
|
62
|
+
*/
|
|
63
|
+
protected readonly acpDrainTrigger?: AcpDrainTrigger;
|
|
64
|
+
/**
|
|
65
|
+
* 可注入的策略层。生产用 `DEFAULT_GOAL_POLICY`;测试可通过 configure() 替换。
|
|
66
|
+
* 故意 protected 而非 private,方便子类化做小幅定制。
|
|
67
|
+
*/
|
|
68
|
+
protected policy: GoalServicePolicy;
|
|
69
|
+
/** 进行中的 Stop hook 对象,pause 时要就地关掉续跑。 */
|
|
70
|
+
protected readonly goalHooks: Map<string, PromptHookDefinition>;
|
|
71
|
+
/**
|
|
72
|
+
* 宿主权威登记:session → 登记时的宿主连接 id(会话当时没有连接 id 记空串)。
|
|
73
|
+
*
|
|
74
|
+
* 用 WeakMap 而不是 WeakSet:连接关闭时 AcpServer 只拿得到 connectionId,
|
|
75
|
+
* 靠它一次性失效该连接名下的所有 session,不必枚举会话表。
|
|
76
|
+
*/
|
|
77
|
+
private readonly hostOwnedSessions;
|
|
78
|
+
/**
|
|
79
|
+
* 处于「活跃」状态的宿主连接 id(AcpServer 在 transport 建立时登记、关闭时删除)。
|
|
80
|
+
*
|
|
81
|
+
* 用活跃集合而不是「已关闭集合」:后者只进不出(--serve 长驻下无界增长),
|
|
82
|
+
* 而且 connectionId 复用(stdio-main 这种固定名)时旧记录会把新连接误判成已关闭。
|
|
83
|
+
*/
|
|
84
|
+
private readonly liveHostConnections;
|
|
85
|
+
/**
|
|
86
|
+
* history 里从未出现过「决定性 goal 状态项」的会话:跳过每轮 prompt 的 O(n) 倒扫。
|
|
87
|
+
* 任何一次 goal 状态写入(setMeta / emit)都会失效该缓存。
|
|
88
|
+
*/
|
|
89
|
+
private readonly noGoalHistorySessions;
|
|
90
|
+
/** 可注入的 metric 发送器;默认走 logger。 */
|
|
91
|
+
protected metrics: GoalMetricSink;
|
|
92
|
+
protected init(): void;
|
|
93
|
+
/** 测试钩子:替换 policy / metrics(例:service.configure({ policy: stub })). */
|
|
94
|
+
configure(opts: Partial<{
|
|
95
|
+
policy: GoalServicePolicy;
|
|
96
|
+
metrics: GoalMetricSink;
|
|
97
|
+
}>): void;
|
|
98
|
+
/**
|
|
99
|
+
* 宿主持久态 → CLI 执行镜像。
|
|
100
|
+
*
|
|
101
|
+
* @param options.continueRun 目标处于运行态且本进程无回合时,是否立刻续跑一轮。
|
|
102
|
+
* **只有宿主的镜像回灌(attach / 换进程自愈)才允许为 true**:动作类请求(pause /
|
|
103
|
+
* clear / set / resume)自己会 abort 或 kickoff,若在恢复阶段先投一轮,就会出现
|
|
104
|
+
* 「点暂停前先起一轮」「换条件用旧条件起一轮」这类反向副作用。
|
|
105
|
+
*/
|
|
106
|
+
restoreFromHost(session: Session, snapshot: HostGoalSnapshot | null, options?: {
|
|
107
|
+
continueRun?: boolean;
|
|
108
|
+
}): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* 宿主权威判定:登记过宿主回灌,且登记时那条宿主连接**仍活跃**。
|
|
111
|
+
*
|
|
112
|
+
* 「宿主权威」= 宿主持久态是唯一真源,CLI 只维护执行镜像,因此 persistMeta
|
|
113
|
+
* 不对该 session 落盘——写了会与宿主抢权威,下次回灌又被打回去。
|
|
114
|
+
*
|
|
115
|
+
* 生命周期两端(各只有一条路径):
|
|
116
|
+
* - 进:restoreFromHost(记住当时的 meta.acpConnectionId 作为 owner;拿不到连接
|
|
117
|
+
* 身份**不登记**——没有连接可判定存活就等于没有出口);
|
|
118
|
+
* - 出:releaseHostOwnershipForConnection(该连接名下的所有 session,AcpServer
|
|
119
|
+
* 在连接关闭时调用,正常与异常关闭都走)。
|
|
120
|
+
*
|
|
121
|
+
* 为什么不能只看 meta.acpConnectionId 是否存在:那个字段在连接关闭后不会被清
|
|
122
|
+
* (acp-view 只在绑定时写),无法表达「已交出权威」。为什么不能只靠一个 session
|
|
123
|
+
* 集合:一条连接可以服务多个会话,连接关闭时只放一个会让其余的永久失效。
|
|
124
|
+
*/
|
|
125
|
+
protected isHostOwned(session: Session): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* 该会话是否走**结构化控制**语义(宿主 / Web UI 通过控制通道驱动,而不是用户手打 prompt)。
|
|
128
|
+
*
|
|
129
|
+
* 与「宿主权威」(isHostOwned:只在宿主回灌过快照之后为真)刻意分开:同条件 set=resume、
|
|
130
|
+
* 编辑 / 清除打断在途回合这些都属控制通道语义,**不带快照的旧 core 或第三方 ACP 同样适用**;
|
|
131
|
+
* 拿 isHostOwned 当判据会让它们落回「cleared + set」(计时清零、换 hook),与
|
|
132
|
+
* acp-goal-control 里「控制通道自己判同条件 set=resume」的承诺分叉。
|
|
133
|
+
*/
|
|
134
|
+
protected isStructuredControlSession(session: Session): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* 该 session 是否仍挂着一条「没被报告关闭」的宿主连接。
|
|
137
|
+
*
|
|
138
|
+
* 未登记过连接 id 的会话按「活」处理:宁可乐观,也不要在信息不足时把宿主能力关掉。
|
|
139
|
+
*/
|
|
140
|
+
protected hasLiveHostConnection(session: Session): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* 登记一条活跃的宿主连接(AcpServer 在 transport 建立时调用)。
|
|
143
|
+
*
|
|
144
|
+
* 与 releaseHostOwnershipForConnection 对称:id 复用时新连接重新登记,
|
|
145
|
+
* 不会因为旧记录被误判成「已关闭」。
|
|
146
|
+
*/
|
|
147
|
+
registerHostConnection(connectionId: string): void;
|
|
148
|
+
/**
|
|
149
|
+
* 交出**某条连接**名下所有会话的宿主权威。
|
|
150
|
+
*
|
|
151
|
+
* 连接关闭时 AcpServer 只拿得到 connectionId(它并不知道这条连接服务过哪些会话),
|
|
152
|
+
* 因此失效按连接做:登记时记 owner,这里把 owner 标成已关闭 —— `isHostOwned`
|
|
153
|
+
* 随后对该连接的每个 session 都返回 false。
|
|
154
|
+
*/
|
|
155
|
+
releaseHostOwnershipForConnection(connectionId: string): void;
|
|
156
|
+
/**
|
|
157
|
+
* 宿主持快照恢复后:目标处于运行态且本进程没有在跑的回合时,立刻续跑一轮。
|
|
158
|
+
*
|
|
159
|
+
* 为什么必须在恢复路径上续跑:WorkBuddy 运行时刷新会因 env 指纹变化重启 worker
|
|
160
|
+
* (实测 runtime refresh requires worker restart → killWorker),把刚起的那一轮连同
|
|
161
|
+
* kick-off 一起杀掉;只在动作时 kick-off 的话,用户看到的就是「条在跑、对话不动」。
|
|
162
|
+
* 宿主持久态说目标在跑,新进程就该把它接着跑起来。
|
|
163
|
+
*/
|
|
164
|
+
protected continueRunIfIdle(session: Session): Promise<void>;
|
|
165
|
+
set(session: Session, condition: string): Promise<void>;
|
|
166
|
+
clear(session: Session): Promise<void>;
|
|
167
|
+
pause(session: Session): Promise<void>;
|
|
168
|
+
resume(session: Session): Promise<void>;
|
|
169
|
+
show(session: Session): Promise<void>;
|
|
170
|
+
restoreFromMeta(session: Session): Promise<void>;
|
|
171
|
+
has(session: Session): boolean;
|
|
172
|
+
get(session: Session): ActiveGoal | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* 用 history 里的 goal-status 项把 activeGoal 恢复到 `session.meta`。
|
|
175
|
+
*
|
|
176
|
+
* 为什么需要:**served 会话不落 session-meta**(见 cbc-core session-store 的
|
|
177
|
+
* "served sessions never write"),而 WorkBuddy 的 runtime 会随插件刷新 / 回收换进程。
|
|
178
|
+
* 新进程的 `session.meta` 里没有 activeGoal,于是「进行中 / 已暂停」的目标在新进程里
|
|
179
|
+
* 查无此物:点继续 / 清除退化成 no-goal,刷新重开也恢复不出状态条。
|
|
180
|
+
* history 里的 goalStatus 项是持久真源,语义与 Web UI 的 activeGoalAfterStatus 一致。
|
|
181
|
+
*
|
|
182
|
+
* 幂等:派生结果与 meta 一致则原样返回;只有条件 / 暂停态变化才覆盖并补注册 hook。
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
* @remarks 有副作用:会写 session.meta(setMeta / clearMeta)、按需落盘、按需挂 Stop hook。
|
|
186
|
+
*
|
|
187
|
+
* 从 history 的 goal-status 项重建 activeGoal。**有副作用,不是纯查询**:
|
|
188
|
+
* 会 setMeta / clearMeta、按需 persistMeta,并在目标续跑中时补挂 Stop hook。
|
|
189
|
+
*
|
|
190
|
+
* 返回三态(与 deriveGoalFromHistory 的入参语义对齐):
|
|
191
|
+
* - 目标对象:镜像与 history 一致(或已按 history 重建);
|
|
192
|
+
* - undefined:history 里没有 goal 状态项 + 当前也没有目标(保持现状);
|
|
193
|
+
* - undefined(同上):history 明确 cleared 且当前无目标 —— 两种 undefined 对调用方
|
|
194
|
+
* 的表现一致(都表现为「无目标」),因此不再额外区分类型。
|
|
195
|
+
*/
|
|
196
|
+
reconcileFromHistory(session: Session): ActiveGoal | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* 从 history 末尾往回找最近一条**决定性**的 goal-status 项:
|
|
199
|
+
* - `set` / `active` / `resumed` → 目标存在且未暂停
|
|
200
|
+
* - `paused` → 目标存在且暂停
|
|
201
|
+
* - `cleared` / `no-goal` → 没有目标
|
|
202
|
+
* - 其它(set-replaced / too-long / usage …)不改变状态,继续往前找
|
|
203
|
+
* 返回 undefined = history 里根本没有 goal 状态项。
|
|
204
|
+
*/
|
|
205
|
+
protected deriveGoalFromHistory(session: Session): GoalFromHistory | null | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* 倒序扫 session.history 找最近一条 goal-result 终态项。复杂度 O(n),
|
|
208
|
+
* goal 终态项稀疏(一次 /goal 周期才一条),实测开销可忽略。
|
|
209
|
+
*
|
|
210
|
+
* 注意:history 直接持有 AgentInputItem 引用,调用方不应就地修改。
|
|
211
|
+
* 这里 cast 为 GoalResultItem——`type === 'goal-result'` 已是判别量。
|
|
212
|
+
*/
|
|
213
|
+
getLatestResult(session: Session): GoalResultItem | undefined;
|
|
214
|
+
protected registerGoalHook(session: Session, goal: ActiveGoal): void;
|
|
215
|
+
protected unregisterHook(scopeId: string): void;
|
|
216
|
+
protected persistMeta(session: Session): Promise<void>;
|
|
217
|
+
protected setMeta(session: Session, goal: ActiveGoal): void;
|
|
218
|
+
protected clearMeta(session: Session): void;
|
|
219
|
+
protected areHooksDisabled(): boolean;
|
|
220
|
+
/**
|
|
221
|
+
* `set()` / 续跑完成后的"启动目标第一轮"副作用。
|
|
222
|
+
*
|
|
223
|
+
* 抽成独立 protected 方法的好处:
|
|
224
|
+
* - 单测可以 spy / stub 它,断言 set() 是否在正确时机触发;
|
|
225
|
+
* - 后续更换投递通道时不动 set()。
|
|
226
|
+
*
|
|
227
|
+
* 实现细节:
|
|
228
|
+
* - 走 policy 拿启动文案(i18n / 业务定制点);
|
|
229
|
+
* - 把 kick-off 消息标记为 `providerData.isMeta=true`,与 cc 行为对齐:
|
|
230
|
+
* 模型在 transcript 里能看到目标条件,但 UI 不渲染这条 user message
|
|
231
|
+
* (`conversation-box.tsx` / `queue-display.tsx` / `structured-output-view-filter`
|
|
232
|
+
* 均按 isMeta 过滤),也不会进输入框上方的「运行中命令」条
|
|
233
|
+
* (`InputItemUtils.isEditableQueuedMessage` 把 isMeta 判为不可编辑)。
|
|
234
|
+
* - **这一轮完全归 CLI 自己起**:宿主(WorkBuddy / Web UI)只发结构化控制方法,
|
|
235
|
+
* 不会再补发任何合成本文 prompt 来"承载"目标轮(合成 prompt 会冒充用户消息,
|
|
236
|
+
* 画假气泡)。因此这里必须把 kick-off 送到**带事件转发的 drain 通道**上,
|
|
237
|
+
* 由 AcpView 起轮,思考/工具/产出才到得了宿主的 ACP 连接。
|
|
238
|
+
* - 走 @Optional 注入的 AgentService,若不可用(headless 极简栈 / 单测)
|
|
239
|
+
* 则跳过 + warn,set() 仍然完成,hook 仍然注册;
|
|
240
|
+
* - fire-and-forget;任何异常落 logger,不冒泡到调用方。
|
|
241
|
+
*/
|
|
242
|
+
protected kickoffAgentRun(session: Session, condition: string): Promise<void>;
|
|
243
|
+
/**
|
|
244
|
+
* `/goal` slash 自己的 skipRun 窗口。AgentService.run() 先 RUN_PREPARING
|
|
245
|
+
* 再进命令拦截器,这时 abort 会掐掉正在执行的这次 slash,随后 triggerDrain
|
|
246
|
+
* 被 aborted 守卫丢掉——Web UI 手打 `/goal` 换条件会自伤。
|
|
247
|
+
*/
|
|
248
|
+
private static readonly SLASH_OWNED_STATUSES;
|
|
249
|
+
protected isRunInFlight(session: Session): boolean;
|
|
250
|
+
protected abortInFlightRun(session: Session): void;
|
|
251
|
+
protected ensureAbortControllerReady(session: Session): void;
|
|
252
|
+
protected replaceAbortController(session: Session): void;
|
|
253
|
+
/**
|
|
254
|
+
* 读取 session.usage.totalTokens 作为统计起点 / 终点。
|
|
255
|
+
* - usage 字段在 fresh session 上是 Usage 实例(含 totalTokens 数值)。
|
|
256
|
+
* - 单测 / 老 session 上 usage 可能不存在,按 0 处理避免 NaN。
|
|
257
|
+
*/
|
|
258
|
+
protected readSessionTokens(session: Session): number;
|
|
259
|
+
/**
|
|
260
|
+
* 给当前 active goal 累加 turn 计数并持久化到 session.meta。
|
|
261
|
+
* 防漂移:找不到 goal(已被替换 / 清除)时静默忽略。
|
|
262
|
+
*/
|
|
263
|
+
protected bumpTurnCount(session: Session, delta: number): void;
|
|
264
|
+
/**
|
|
265
|
+
* 把 stdout 文本以 local-command-stdout 形式写入 session.history。
|
|
266
|
+
*
|
|
267
|
+
* `status` 参数可选:当 emit 的是 /goal 状态文案(set / cleared / active 等)
|
|
268
|
+
* 时,调用方传入结构化 GoalStatusPayload。该 payload 会写到
|
|
269
|
+
* `providerData.goalStatus`,让 ACP 转换层把它转成 `session_info_update +
|
|
270
|
+
* _meta` 推 Web UI 用 i18n 渲染(Web UI 不依赖英文文本格式);TUI 仍按
|
|
271
|
+
* stdout 原样渲染英文文案,与 cc parity 保持一致。
|
|
272
|
+
*/
|
|
273
|
+
protected emit(session: Session, text: string, status?: GoalStatusPayload): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* Prompt hook 的 onResult 回调。
|
|
276
|
+
* 注意:hook-manager 已经处理了 block / continueRequest 逻辑;这里只负责
|
|
277
|
+
* - 在 ok:true(达成)和 impossible(不可达)两种「终态」时清理 hook + UI 提示
|
|
278
|
+
* - ok:false(条件还没满足)维持现状,模型仍被 block 着工作
|
|
279
|
+
*
|
|
280
|
+
* 防御性:回调可能在用户已经手动 `/goal clear` 或替换为新 goal 之后才异步
|
|
281
|
+
* 触发,这种情况下不应对当前 session.meta 做副作用。
|
|
282
|
+
*/
|
|
283
|
+
protected handleHookResult(session: Session, goal: ActiveGoal, result: PromptHookResult, _input: HookInput): Promise<void>;
|
|
284
|
+
/**
|
|
285
|
+
* 把 stop-hook evaluator 的 reason 反馈给模型(cc parity)。
|
|
286
|
+
*
|
|
287
|
+
* 设计要点:
|
|
288
|
+
* - 只在 reason 非空时 emit——空 reason 喂给模型只是噪声;
|
|
289
|
+
* - 文本格式与 cc jsonl 严格对齐:"Stop hook feedback: [<condition>]: <reason>"
|
|
290
|
+
* 这样模型在 transcript 里看到的格式是它训练时见过的稳定模式;
|
|
291
|
+
* - providerData.isMeta=true 让 UI 过滤(避免用户看到内部反馈条),
|
|
292
|
+
* 同时也能被 SystemReminderAgentRunInterceptor 等识别为非真实用户输入。
|
|
293
|
+
* - 不参与对话链(无 parentId):这是个旁路注入,不影响树结构。
|
|
294
|
+
*/
|
|
295
|
+
protected emitFeedbackToModel(session: Session, _goal: ActiveGoal, reason?: string): Promise<void>;
|
|
296
|
+
/**
|
|
297
|
+
* 把 goal 变更推给 Web UI。slash 路径还有 combineSubject,HTTP API / idle 连接只靠这里。
|
|
298
|
+
*/
|
|
299
|
+
protected notifyAcpClients(session: Session, item?: {
|
|
300
|
+
type?: string;
|
|
301
|
+
providerData?: unknown;
|
|
302
|
+
}, busy?: boolean): Promise<void>;
|
|
303
|
+
/**
|
|
304
|
+
* 把 goal 终态结果以 `goal-result` history item 形式写入 session.history。
|
|
305
|
+
* 由 chat-view 的 GoalResultMessageBox 渲染为可折叠状态条(对齐 cc UI)。
|
|
306
|
+
*
|
|
307
|
+
* 字段语义:
|
|
308
|
+
* - durationMs:goal.createdAt 起到现在的耗时
|
|
309
|
+
* - turnCount:至少 1(防御 0 turn 异常 case,UI 不显示 "0 turns")
|
|
310
|
+
* - tokenDelta:(当前 totalTokens - tokensAtStart),下界 0
|
|
311
|
+
*/
|
|
312
|
+
protected emitGoalResult(session: Session, goal: ActiveGoal, outcome: {
|
|
313
|
+
ok: boolean;
|
|
314
|
+
reason?: string;
|
|
315
|
+
}): Promise<void>;
|
|
316
|
+
/**
|
|
317
|
+
* 把 goal 进行中状态以 `goal-progress` history item 形式写入 session.history。
|
|
318
|
+
* 由 chat-view 的 GoalProgressMessageBox 渲染为 cc 同款可折叠状态条
|
|
319
|
+
* `◯ Goal not yet met… continuing`。
|
|
320
|
+
*
|
|
321
|
+
* 触发时机:每次 stop-condition hook 评估返回 ok:false(非 impossible),
|
|
322
|
+
* 表示模型还要继续工作。reason 来自 evaluator 的判定理由,仅在用户
|
|
323
|
+
* Ctrl+O 展开时才显示,避免污染对话流。
|
|
324
|
+
*
|
|
325
|
+
* 不参与对话链,也不喂给 LLM —— 由 CUSTOM_INPUT_ITEM_TYPES 兜底过滤。
|
|
326
|
+
*/
|
|
327
|
+
protected emitGoalProgress(session: Session, goal: ActiveGoal, reason?: string): Promise<void>;
|
|
328
|
+
}
|
|
329
|
+
/** history 派生出的目标状态(不含 scopeId / token 统计等运行时字段)。 */
|
|
330
|
+
export interface GoalFromHistory {
|
|
331
|
+
condition: string;
|
|
332
|
+
createdAt: number;
|
|
333
|
+
paused?: boolean;
|
|
334
|
+
pausedAt?: number;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* 从 history 末尾往回找最近一条**决定性**的 goal-status 项,派生出目标状态。
|
|
338
|
+
*
|
|
339
|
+
* - `set` / `active` / `resumed` → 目标存在且未暂停
|
|
340
|
+
* - `paused` → 目标存在且暂停
|
|
341
|
+
* - `cleared` / `no-goal` → 明确没有目标(返回 null)
|
|
342
|
+
* - 其它(set-replaced / too-long / usage …)不改变状态,继续往前找
|
|
343
|
+
*
|
|
344
|
+
* 返回 `undefined` = history 里根本没有 goal 状态项。
|
|
345
|
+
*
|
|
346
|
+
* **为什么需要它**:served 会话不落 session-meta(cbc-core session-store 明确规定),
|
|
347
|
+
* 而宿主 runtime 会随插件刷新 / 空闲回收换进程。换进程后 `session.meta.activeGoal`
|
|
348
|
+
* 为空,只能靠 history 里的 goalStatus 项把状态条 / 继续 / 清除恢复出来。
|
|
349
|
+
* 口径与 Web UI 的 activeGoalAfterStatus 一致。
|
|
350
|
+
*/
|
|
351
|
+
export declare function deriveGoalFromHistory(session: {
|
|
352
|
+
history?: unknown;
|
|
353
|
+
}): GoalFromHistory | null | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionStart hook:在 session 恢复(`source === 'resume'` / `'compact'`)
|
|
3
|
+
* 时,根据 `session.meta.activeGoal` 重新注册 prompt-type Stop hook。
|
|
4
|
+
*
|
|
5
|
+
* 走 internal Hook 路径而非命令拦截器,是因为:
|
|
6
|
+
* 1. SESSION_START 事件已经是 hooks 系统的标准入口;不必为 /goal 专门接
|
|
7
|
+
* session-manager 生命周期。
|
|
8
|
+
* 2. Hook 自带 priority + source 匹配,与 `StructuredOutputSessionStartHook`
|
|
9
|
+
* 模式一致,新增/移除都是局部改动,可维护。
|
|
10
|
+
* 3. 单测时只需 mock GoalService,断言 restoreFromMeta 是否被调用。
|
|
11
|
+
*
|
|
12
|
+
* 不抛错 / 不阻塞:恢复失败不应阻断 session 启动,只记录 warn。
|
|
13
|
+
*/
|
|
14
|
+
import { Hook, HookInput, HookPriority } from '../../../../../node/hooks/hook-protocol.js';
|
|
15
|
+
import { HookEvent, HookExecutionResult } from '../../../../cbc-shared/lib/node/index.js';
|
|
16
|
+
import { Logger } from '../../../../telemetry/lib/common/index.js';
|
|
17
|
+
import { GoalService } from './goal-protocol.js';
|
|
18
|
+
export declare class GoalSessionStartHook implements Hook {
|
|
19
|
+
readonly event = HookEvent.SESSION_START;
|
|
20
|
+
readonly priority = HookPriority.Normal;
|
|
21
|
+
protected readonly logger: Logger;
|
|
22
|
+
protected readonly goalService: GoalService;
|
|
23
|
+
protected init(): void;
|
|
24
|
+
execute(input: HookInput): Promise<HookExecutionResult | undefined>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Goal 模块的纯工具函数。可被 service / spec / 其他消费方直接 import,
|
|
3
|
+
* 不依赖 DI、不依赖 Session 之外的 runtime。
|
|
4
|
+
*/
|
|
5
|
+
import { PromptHookDefinition } from '../../../../../node/hooks/hook-protocol.js';
|
|
6
|
+
import { ActiveGoal, GoalPromptHookCallback, GoalServicePolicy } from './goal-protocol.js';
|
|
7
|
+
/**
|
|
8
|
+
* 安全解析 `session.meta.activeGoal`。schema 不合法返回 undefined。
|
|
9
|
+
*
|
|
10
|
+
* 把它做成纯函数后,Service 的两个公开方法(`get` / `restoreFromMeta`)都
|
|
11
|
+
* 不再重复手写 type guard,避免漂移。
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseActiveGoal(raw: unknown): ActiveGoal | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* 按当前 policy 与 goal 实例构造一个 prompt-type Stop hook。
|
|
16
|
+
*
|
|
17
|
+
* 抽离成纯函数后,单测可断言:
|
|
18
|
+
* - hook 类型为 `prompt`
|
|
19
|
+
* - prompt 文本包含用户 condition
|
|
20
|
+
* - `treatImpossibleAsAllow` 为 true(CC parity 三态语义)
|
|
21
|
+
* - `onResult` 回调被原样串联
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildGoalPromptHook(policy: GoalServicePolicy, goal: ActiveGoal, onResult: GoalPromptHookCallback): PromptHookDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @genie/cbc-goal — CodeBuddy Code `/goal` 命令子系统。
|
|
3
|
+
*
|
|
4
|
+
* 目录布局镜像 agent-cli:`src/node/goal/**` 与拆分前保持一致,git 历史通过 `git mv` 继承。
|
|
5
|
+
* agent-cli 侧原来所有 `../goal/xxx` 相对 import 改为 `@genie/cbc-goal` 主入口;
|
|
6
|
+
* 主 barrel 通过 `export * from '@genie/cbc-goal'` 反向消费本入口。
|
|
7
|
+
*
|
|
8
|
+
* 与 `@genie/agent-cli` 之间允许循环依赖:goal service / hook 需要
|
|
9
|
+
* `import { X } from '@genie/agent-cli/node/<子路径>/...'` 拿到 agent-cli 源码 live binding;
|
|
10
|
+
* 运行时安全前提是本包顶层无立即消费 agent-cli 运行时值的语句。
|
|
11
|
+
*/
|
|
12
|
+
export * from './goal/index.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @genie/cbc-plugins — CodeBuddy Code 插件系统运行时。
|
|
3
|
+
*
|
|
4
|
+
* 目录布局镜像 agent-cli:`src/node/plugins/**` 与拆分前保持一致,git 历史通过 `git mv` 继承。
|
|
5
|
+
* agent-cli 侧 `src/node/plugins/index.ts` 已删除,原先所有 `../plugins/xxx` 相对 import
|
|
6
|
+
* 改指向 `@genie/cbc-plugins` 主入口;主 barrel 通过 `export * from '@genie/cbc-plugins'`
|
|
7
|
+
* 反向消费本入口(`packages/agent-cli/src/node/index-shared.ts`)。
|
|
8
|
+
*
|
|
9
|
+
* 与 `@genie/agent-cli` 之间允许循环依赖:plugins 内 loader / installer / marketplace 等实现
|
|
10
|
+
* 通过 `import { X } from '@genie/agent-cli/node/<子路径>/<leaf>'` 拿到 agent-cli 源码 live binding;
|
|
11
|
+
* 运行时安全前提是本包顶层无立即消费 agent-cli 运行时值的语句(Symbol 值走 `-protocol.ts` 叶子文件;
|
|
12
|
+
* 见 `.codebuddy/commands/cli/split-package.md` 铁律 4)。
|
|
13
|
+
*/
|
|
14
|
+
export * from './plugins/index.js';
|
|
15
|
+
/**
|
|
16
|
+
* Function Hooks / Claude Mods 运行时(`src/node/mods/**`)。
|
|
17
|
+
*
|
|
18
|
+
* 与 `plugins/**` 的分工:`plugins` 管「插件从哪来、怎么装、怎么发现」
|
|
19
|
+
* (marketplace / installer / loader / MCPB);`mods` 管「装上之后怎么参与
|
|
20
|
+
* 引擎执行」—— tier 化的 middleware 引擎、`$` capability surface、
|
|
21
|
+
* `engine.create` fold、以及从 `.codebuddy-plugin` / `.claude-plugin` +
|
|
22
|
+
* `hooks/hooks.json` 真实加载一个 mod 目录(等价 `--plugin-dir`)。
|
|
23
|
+
*
|
|
24
|
+
* **走命名空间导出**:mods 沿用上游 claude-code 的类型命名(`Hook` / `Settings` /
|
|
25
|
+
* `On` / `DispatchOptions` 等),这些通用名与 agent-cli 既有导出会撞;用
|
|
26
|
+
* `Mods.*` 收口既保住「与官方等价」的命名,又不污染顶层 barrel。
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { Mods } from '@genie/cbc-plugins';
|
|
30
|
+
* const result = await Mods.bootstrapModsFromPluginDirs({ core });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* 对齐依据见 `src/node/mods/API-ALIGNMENT.md`。
|
|
34
|
+
*/
|
|
35
|
+
export * as Mods from './mods/index.js';
|