@tencent-ai/agent-harness 0.2.0-beta.10 → 0.2.0-beta.11
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 +9 -0
- package/cli/CHANGELOG.md +42 -0
- package/cli/dist-server/shared.cjs +316 -315
- package/cli/dist-server/types/node/agent/agent-controller.d.ts +1 -0
- package/cli/dist-server/types/node/agent/index.d.ts +1 -0
- package/cli/dist-server/types/node/agent/interceptors/image-interceptors.d.ts +1 -2
- package/cli/dist-server/types/node/agent/interceptors/sandbox-interceptor.d.ts +1 -0
- package/cli/dist-server/types/node/agent/steer-model-input-preparer.d.ts +11 -0
- package/cli/dist-server/types/node/agent-task/agent-task.d.ts +12 -0
- package/cli/dist-server/types/node/agent-team/backends/teammate-backend-protocol.d.ts +2 -0
- package/cli/dist-server/types/node/agent-view/session-handoff.d.ts +7 -0
- package/cli/dist-server/types/node/channel/channel-protocol.d.ts +8 -8
- package/cli/dist-server/types/node/cli/cli-runtime-options.d.ts +24 -1
- package/cli/dist-server/types/node/command/clear-command-executor.d.ts +2 -0
- package/cli/dist-server/types/node/hooks/hook-protocol.d.ts +3 -67
- package/cli/dist-server/types/node/loopback/endpoint-provider.d.ts +3 -0
- package/cli/dist-server/types/node/loopback/server-protocol.d.ts +7 -0
- package/cli/dist-server/types/node/memory/memory-relevance-protocol.d.ts +6 -1
- package/cli/dist-server/types/node/memory/memory-relevance-service.d.ts +3 -2
- package/cli/dist-server/types/node/model/model-protocol.d.ts +4 -0
- package/cli/dist-server/types/node/security-review/gate.d.ts +1 -0
- package/cli/dist-server/types/node/security-review/protocol.d.ts +2 -0
- package/cli/dist-server/types/node/session/session-hook-host-adapter.d.ts +2 -2
- package/cli/dist-server/types/node/settings/current-session-model-transition.d.ts +5 -4
- package/cli/dist-server/types/node/settings/settings-protocol.d.ts +2 -0
- package/cli/dist-server/types/node/tools/a2a-cancel-task-tool.d.ts +4 -4
- package/cli/dist-server/types/node/tools/a2a-get-task-tool.d.ts +4 -4
- package/cli/dist-server/types/node/tools/audio-transcribe-tool.d.ts +1 -2
- package/cli/dist-server/types/node/tools/grep-tool.d.ts +2 -0
- package/cli/dist-server/types/node/tools/image-service.d.ts +3 -1
- package/cli/dist-server/types/node/tools/index.d.ts +1 -0
- package/cli/dist-server/types/node/tools/media-file-writer.d.ts +12 -0
- package/cli/dist-server/types/node/tools/multi-edit-tool.d.ts +4 -4
- package/cli/dist-server/types/node/tools/powershell-tool.d.ts +2 -0
- package/cli/dist-server/types/node/tools/send-message-tool.d.ts +2 -2
- package/cli/dist-server/types/node/tools/tool-hook-manager.d.ts +2 -2
- package/cli/dist-server/types/node/tools/tool-manager.d.ts +1 -0
- package/cli/dist-server/types/node/tools/tool-protocol.d.ts +2 -2
- package/cli/dist-server/types/node/tools/video-service.d.ts +2 -0
- package/cli/dist-server/types/node/tools/wecom-reply-tool.d.ts +2 -2
- package/cli/dist-server/types/vendor/cbc-core/node/agent/agent-protocol.d.ts +12 -0
- package/cli/dist-server/types/vendor/cbc-core/node/agent/agent-service.d.ts +11 -0
- package/cli/dist-server/types/vendor/cbc-core/node/agent/index.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-core/node/agent/runner-factory.d.ts +6 -0
- package/cli/dist-server/types/vendor/cbc-core/node/context/compact-strategy-base.d.ts +17 -5
- package/cli/dist-server/types/vendor/cbc-core/node/context/pre-switch-model.d.ts +34 -0
- package/cli/dist-server/types/vendor/cbc-core/node/hooks/hook-protocol.d.ts +118 -3
- package/cli/dist-server/types/vendor/cbc-core/node/message-queue/index.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-core/node/message-queue/injectable-content.d.ts +15 -18
- package/cli/dist-server/types/vendor/cbc-core/node/message-queue/steer-input-buffer-protocol.d.ts +12 -13
- package/cli/dist-server/types/vendor/cbc-core/node/message-queue/steer-input-buffer.d.ts +1 -2
- package/cli/dist-server/types/vendor/cbc-core/node/message-queue/steer-model-input-preparer-protocol.d.ts +13 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/interruption-service.d.ts +11 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-fork-guard.d.ts +2 -1
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-hook-manager.d.ts +2 -2
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-manager.d.ts +9 -0
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-protocol.d.ts +9 -2
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-store.d.ts +3 -3
- package/cli/dist-server/types/vendor/cbc-core/node/trace/trace-turn-gate.d.ts +13 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/error-utils.d.ts +7 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/index.d.ts +2 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/markdown-code-utils.d.ts +15 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/message-content-utils.d.ts +3 -1
- package/cli/dist-server/types/vendor/cbc-core/node/utils/responses-api-utils.d.ts +21 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/session-utils.d.ts +20 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/usage-utils.d.ts +18 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/agent/openai-agents-types.d.ts +3 -1
- package/cli/dist-server/types/vendor/cbc-shared/node/index.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/logging/structured-event-log.d.ts +64 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/model/model-errors.d.ts +10 -0
- package/cli/dist-server/types/workspace/authentication/lib/common/authentication-http-interceptor.d.ts +1 -15
- package/cli/dist-server/types/workspace/authentication/lib/common/authentication-manager.d.ts +13 -0
- package/cli/dist-server/types/workspace/authentication/lib/common/authentication-protocol.d.ts +7 -0
- package/cli/dist-server/types/workspace/authentication/lib/common/authentication-refresh-bypass.d.ts +9 -0
- package/cli/dist-server/types/workspace/authentication/lib/common/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/agent-protocol.d.ts +12 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/agent-service.d.ts +11 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/agent/runner-factory.d.ts +6 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/context/compact-strategy-base.d.ts +17 -5
- package/cli/dist-server/types/workspace/cbc-core/lib/node/context/pre-switch-model.d.ts +34 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/hooks/hook-protocol.d.ts +118 -3
- package/cli/dist-server/types/workspace/cbc-core/lib/node/message-queue/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/message-queue/injectable-content.d.ts +15 -18
- package/cli/dist-server/types/workspace/cbc-core/lib/node/message-queue/steer-input-buffer-protocol.d.ts +12 -13
- package/cli/dist-server/types/workspace/cbc-core/lib/node/message-queue/steer-input-buffer.d.ts +1 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/message-queue/steer-model-input-preparer-protocol.d.ts +13 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/interruption-service.d.ts +11 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-fork-guard.d.ts +2 -1
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-hook-manager.d.ts +2 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-manager.d.ts +9 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-protocol.d.ts +9 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-store.d.ts +3 -3
- package/cli/dist-server/types/workspace/cbc-core/lib/node/trace/trace-turn-gate.d.ts +13 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/error-utils.d.ts +7 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/index.d.ts +2 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/markdown-code-utils.d.ts +15 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/message-content-utils.d.ts +3 -1
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/responses-api-utils.d.ts +21 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/session-utils.d.ts +20 -0
- package/cli/dist-server/types/workspace/cbc-core/lib/node/utils/usage-utils.d.ts +18 -0
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-auto-restart.d.ts +2 -2
- package/cli/dist-server/types/workspace/cbc-daemon/lib/node/daemon/daemon-protocol.d.ts +17 -1
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/engine/enable-flag.d.ts +28 -24
- package/cli/dist-server/types/workspace/cbc-plugins/lib/node/mods/loader/bootstrap.d.ts +2 -2
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/agent/openai-agents-types.d.ts +3 -1
- 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/logging/structured-event-log.d.ts +64 -0
- package/cli/dist-server/types/workspace/cbc-shared/lib/node/model/model-errors.d.ts +10 -0
- package/cli/dist-server/types/workspace/core/lib/common/utils/env-utils.d.ts +12 -1
- package/cli/dist-server/types/workspace/product/lib/common/model-catalog/index.d.ts +2 -0
- package/cli/dist-server/types/workspace/product/lib/common/types/features.d.ts +36 -0
- package/cli/dist-server/types/workspace/product/lib/common/types/language-model.d.ts +7 -0
- package/cli/dist-server/types/workspace/sandbox-cli/lib/node/sandbox-center-client.d.ts +1 -1
- package/cli/dist-server/types/workspace/telemetry/lib/common/event/types/craft.d.ts +2 -1
- package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/index.d.ts +2 -2
- package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/otel-env.d.ts +16 -5
- package/cli/dist-server/types/workspace/telemetry/lib/common/tracing/trace-protocol.d.ts +9 -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/cli/vendor/shim/node-safe-delete-shim.cjs +20 -3
- package/cli/vendor/shim/sitecustomize.py +17 -4
- package/docs/acp-v2.md +21 -2
- package/docs/client.md +44 -0
- package/docs/errors.md +1 -0
- package/docs/in-process.md +1 -0
- package/lib/agent/v2.js +1 -1
- package/lib/application/services.d.ts +1 -0
- package/lib/application/services.js +1 -1
- package/lib/cli/main.js +3 -3
- package/lib/cli/options.d.ts +2 -1
- package/lib/cli/options.js +4 -2
- package/lib/harness/runtime.js +1 -1
- package/lib/harness/types.d.ts +2 -0
- package/lib/runtime/component-protocol.js +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"agents":[{"name":"cli","instructions":"cli-agent-prompt","description":"cli agent","models":["codewise-chat"],"modelTags":["craft"],"commands":["init","compact","statusline","insights"],"tools":["Agent","Read","Write","Edit","Bash","PowerShell","Glob","Grep","EnterPlanMode","ExitPlanMode","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","TaskStop","TaskOutput","Skill","AskUserQuestion","AskUserForStructuredInput","StructuredOutput","ToolSearch","DeferExecuteTool","SendMessage","SendUserMessage","TeamCreate","TeamDelete","NotebookEdit","LSP","EnterWorktree","LeaveWorktree","CronCreate","CronDelete","CronList","DelegateTool","WeChatReply","WeComReply","PushNotification","ReportFindings","ComputerUse","ListMcpResources","ReadMcpResource","WaitForMcpServers","Workflow","Monitor","REPL","A2AGetAgentCard","A2ASendMessage","A2AGetTask","A2ACancelTask"],"tags":["cli","default","model:craft"]},{"name":"general-purpose","instructions":"cli-agent-prompt","description":"general-purpose agent","tools":["Read","Write","Edit","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","TaskStop","TaskOutput","Skill","AskUserQuestion","AskUserForStructuredInput","ToolSearch","DeferExecuteTool","StructuredOutput","SendMessage","SendUserMessage","NotebookEdit","LSP","ComputerUse","ImageGen","ImageEdit","Artifact","ArtifactControl","ListMcpResources","ReadMcpResource","WaitForMcpServers","REPL"],"tags":["cli","general-purpose"]},{"name":"compact","instructions":"compact-agent-prompt","description":"compact agent","tools":["Read"],"commands":["_compact"],"tags":["cli","compact"]},{"name":"contextSummary","instructions":"context-summary-agent-prompt","description":"Context summary agent for conversation compaction and max-token recovery","tools":[],"tags":["cli","contextSummary"]},{"name":"contentAnalyzer","instructions":"content-analyzer-agent-instructions","description":"content analyzer agent","tags":["cli","content-analyzer"],"tools":[]},{"name":"terminalTitleGenerator","instructions":"terminal-title-generator-instructions","description":"Generate terminal window titles from conversation topics.","tags":["cli","terminal-title-generator"],"tools":[]},{"name":"promptSuggestion","instructions":"prompt-suggestion-instructions","description":"Suggest the user's next prompt after a conversation turn.","tags":["cli","prompt-suggestion"],"tools":[]},{"name":"memorySelector","instructions":"memory-selector-instructions","description":"Select relevant memories for the current query.","models":["lite"],"tags":["cli","memory-selector"],"tools":[]},{"name":"summaryGenerator","instructions":"summary-generator-instructions","description":"Generate session summaries from conversation content.","tags":["cli","summary-generator"],"tools":[]},{"name":"securityReviewer","instructions":"security-reviewer-instructions","description":"Review bounded security decisions without tools.","models":["lite"],"tags":["cli","security-reviewer"],"tools":[]},{"name":"autoModeClassifier","instructions":"auto-mode-classifier-instructions","description":"Classify auto mode tool permission risk.","models":["lite"],"tags":["cli","auto-mode-classifier"],"tools":[]},{"name":"promptHookEvaluator","instructions":"prompt-hook-evaluator-instructions","description":"Evaluates prompt hooks using LLM to determine if conditions are met","models":["lite"],"tags":["cli","prompt-hook-evaluator"],"tools":[]},{"name":"insightsAnalyzer","instructions":"base-agent-instructions","description":"Analyzes user usage data facets for the /insights command","tags":["cli","insights-analyzer"],"tools":[]},{"name":"agentInstructions","instructions":"agent-instructions","description":"generating agent instructions","tags":["cli","agent-instructions"],"tools":[]},{"name":"statusline-setup","instructions":"agent-statusline-instructions","description":"Use this agent to configure the user's Codebuddy Code status line setting.","tools":["Read","Write","Edit","ToolSearch","DeferExecuteTool"],"asTool":true,"tags":["cli","sub-agent"]},{"name":"Explore","instructions":"agent-explore-instructions","description":"Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.","models":["lite"],"tools":["Read","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","Skill","SendMessage","SendUserMessage","ToolSearch","DeferExecuteTool"],"asTool":true,"tags":["cli","sub-agent"]},{"name":"Plan","instructions":"agent-plan-instructions","description":"Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a multi-step task before writing code. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs. Read-only: it designs but does not modify files or exit plan mode; the caller reviews the plan and implements it.","tools":["Read","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","Skill","ToolSearch","DeferExecuteTool","TeamCreate","TeamDelete","SendMessage","SendUserMessage"],"asTool":true,"tags":["cli","sub-agent"]}],"models":[{"credits":"x0.01 credits","id":"codewise-chat","name":"Codewise-Chat","vendor":"tencent","maxOutputTokens":8192,"maxInputTokens":128000,"supportsToolCall":true,"supportsImages":false,"disabledMultimodal":true,"maxAllowedSize":56000}],"links":{"officialWebsite":"https://copilot.tencent.com/cli","helpDocument":"https://copilot.tencent.com/docs/cli","issueFeedback":"https://cnb.cool/codebuddy/codebuddy-code/-/issues","issueCreation":"https://cnb.cool/codebuddy/codebuddy-code/-/issues/new","mcpHelpDocument":"https://copilot.tencent.com/docs/cli/mcp","hooksHelpDocument":"https://copilot.tencent.com/docs/cli/hooks","sandboxHelpDocument":"https://copilot.tencent.com/docs/cli/bash-sandboxing","upgradeUrl":""},"productFeatures":{"BillingNotice":false,"ShareLink":true,"Artifact":true,"CodeAdoptionRate":false,"CloudAgentsSmartMerge":true,"CustomModelsJSON":true,"CustomModelIdPrefix":true,"DeferToolLoading":true,"ScheduledTasks":true,"SkipToolCallSupportCheck":true},"commit":"
|
|
1
|
+
{"agents":[{"name":"cli","instructions":"cli-agent-prompt","description":"cli agent","models":["codewise-chat"],"modelTags":["craft"],"commands":["init","compact","statusline","insights"],"tools":["Agent","Read","Write","Edit","Bash","PowerShell","Glob","Grep","EnterPlanMode","ExitPlanMode","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","TaskStop","TaskOutput","Skill","AskUserQuestion","AskUserForStructuredInput","StructuredOutput","ToolSearch","DeferExecuteTool","SendMessage","SendUserMessage","TeamCreate","TeamDelete","NotebookEdit","LSP","EnterWorktree","LeaveWorktree","CronCreate","CronDelete","CronList","DelegateTool","WeChatReply","WeComReply","PushNotification","ReportFindings","ComputerUse","ListMcpResources","ReadMcpResource","WaitForMcpServers","Workflow","Monitor","REPL","A2AGetAgentCard","A2ASendMessage","A2AGetTask","A2ACancelTask"],"tags":["cli","default","model:craft"]},{"name":"general-purpose","instructions":"cli-agent-prompt","description":"general-purpose agent","tools":["Read","Write","Edit","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","TaskStop","TaskOutput","Skill","AskUserQuestion","AskUserForStructuredInput","ToolSearch","DeferExecuteTool","StructuredOutput","SendMessage","SendUserMessage","NotebookEdit","LSP","ComputerUse","ImageGen","ImageEdit","Artifact","ArtifactControl","ListMcpResources","ReadMcpResource","WaitForMcpServers","REPL"],"tags":["cli","general-purpose"]},{"name":"compact","instructions":"compact-agent-prompt","description":"compact agent","tools":["Read"],"commands":["_compact"],"tags":["cli","compact"]},{"name":"contextSummary","instructions":"context-summary-agent-prompt","description":"Context summary agent for conversation compaction and max-token recovery","tools":[],"tags":["cli","contextSummary"]},{"name":"contentAnalyzer","instructions":"content-analyzer-agent-instructions","description":"content analyzer agent","tags":["cli","content-analyzer"],"tools":[]},{"name":"terminalTitleGenerator","instructions":"terminal-title-generator-instructions","description":"Generate terminal window titles from conversation topics.","tags":["cli","terminal-title-generator"],"tools":[]},{"name":"promptSuggestion","instructions":"prompt-suggestion-instructions","description":"Suggest the user's next prompt after a conversation turn.","tags":["cli","prompt-suggestion"],"tools":[]},{"name":"memorySelector","instructions":"memory-selector-instructions","description":"Select relevant memories for the current query.","models":["lite"],"tags":["cli","memory-selector"],"tools":[]},{"name":"summaryGenerator","instructions":"summary-generator-instructions","description":"Generate session summaries from conversation content.","tags":["cli","summary-generator"],"tools":[]},{"name":"securityReviewer","instructions":"security-reviewer-instructions","description":"Review bounded security decisions without tools.","models":["lite"],"tags":["cli","security-reviewer"],"tools":[]},{"name":"autoModeClassifier","instructions":"auto-mode-classifier-instructions","description":"Classify auto mode tool permission risk.","models":["lite"],"tags":["cli","auto-mode-classifier"],"tools":[]},{"name":"promptHookEvaluator","instructions":"prompt-hook-evaluator-instructions","description":"Evaluates prompt hooks using LLM to determine if conditions are met","models":["lite"],"tags":["cli","prompt-hook-evaluator"],"tools":[]},{"name":"insightsAnalyzer","instructions":"base-agent-instructions","description":"Analyzes user usage data facets for the /insights command","tags":["cli","insights-analyzer"],"tools":[]},{"name":"agentInstructions","instructions":"agent-instructions","description":"generating agent instructions","tags":["cli","agent-instructions"],"tools":[]},{"name":"statusline-setup","instructions":"agent-statusline-instructions","description":"Use this agent to configure the user's Codebuddy Code status line setting.","tools":["Read","Write","Edit","ToolSearch","DeferExecuteTool"],"asTool":true,"tags":["cli","sub-agent"]},{"name":"Explore","instructions":"agent-explore-instructions","description":"Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.","models":["lite"],"tools":["Read","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","Skill","SendMessage","SendUserMessage","ToolSearch","DeferExecuteTool"],"asTool":true,"tags":["cli","sub-agent"]},{"name":"Plan","instructions":"agent-plan-instructions","description":"Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a multi-step task before writing code. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs. Read-only: it designs but does not modify files or exit plan mode; the caller reviews the plan and implements it.","tools":["Read","Bash","PowerShell","Glob","Grep","TaskCreate","TaskGet","TaskUpdate","TaskList","WebFetch","WebSearch","Skill","ToolSearch","DeferExecuteTool","TeamCreate","TeamDelete","SendMessage","SendUserMessage"],"asTool":true,"tags":["cli","sub-agent"]}],"models":[{"credits":"x0.01 credits","id":"codewise-chat","name":"Codewise-Chat","vendor":"tencent","maxOutputTokens":8192,"maxInputTokens":128000,"supportsToolCall":true,"supportsImages":false,"disabledMultimodal":true,"maxAllowedSize":56000}],"links":{"officialWebsite":"https://copilot.tencent.com/cli","helpDocument":"https://copilot.tencent.com/docs/cli","issueFeedback":"https://cnb.cool/codebuddy/codebuddy-code/-/issues","issueCreation":"https://cnb.cool/codebuddy/codebuddy-code/-/issues/new","mcpHelpDocument":"https://copilot.tencent.com/docs/cli/mcp","hooksHelpDocument":"https://copilot.tencent.com/docs/cli/hooks","sandboxHelpDocument":"https://copilot.tencent.com/docs/cli/bash-sandboxing","upgradeUrl":""},"productFeatures":{"BillingNotice":false,"ShareLink":true,"Artifact":true,"CodeAdoptionRate":false,"CloudAgentsSmartMerge":true,"CustomModelsJSON":true,"CustomModelIdPrefix":true,"DeferToolLoading":true,"ScheduledTasks":true,"SkipToolCallSupportCheck":true},"commit":"583bb99e203fbbef3a2e42f36218688425e73bec","date":"2026-10-09T05:12:12.150Z"}
|
|
@@ -196,13 +196,13 @@ function shouldBypassSafeDelete(absPath) {
|
|
|
196
196
|
|| isPnpmVirtualStorePath(absPath);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
function
|
|
199
|
+
function recordReport(operation, absPath) {
|
|
200
200
|
if (!REPORT_PATH) return;
|
|
201
201
|
try {
|
|
202
202
|
fs.appendFileSync(
|
|
203
203
|
REPORT_PATH,
|
|
204
204
|
JSON.stringify({
|
|
205
|
-
operation
|
|
205
|
+
operation,
|
|
206
206
|
runtime: 'node',
|
|
207
207
|
path: absPath,
|
|
208
208
|
timestamp: Date.now(),
|
|
@@ -602,8 +602,25 @@ function tryTrash(absPath, opts) {
|
|
|
602
602
|
throw new Error(`[safe-delete] broker denied delete: path=${absPath}`);
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
+
// Windows 沙箱且开启文件备份:普通文件交给 tsbx+Center 决定是否进回收站(本轮新建的
|
|
606
|
+
// 直接删)。原生删除失败(如 Center 拒绝)时继续走 genie-trash,保留审批与 fail-closed。
|
|
607
|
+
if (PLATFORM === 'win32'
|
|
608
|
+
&& process.env.CODEBUDDY_SAFE_DELETE_SANDBOX === '1'
|
|
609
|
+
&& process.env.CODEBUDDY_FILE_BACKUP_ENABLED === '1') {
|
|
610
|
+
const st = safeLstat(absPath);
|
|
611
|
+
if (st && st.isFile()) {
|
|
612
|
+
try {
|
|
613
|
+
origUnlinkSync(absPath);
|
|
614
|
+
recordReport('native-delete', absPath);
|
|
615
|
+
return true;
|
|
616
|
+
} catch (_) {
|
|
617
|
+
// 继续走 genie-trash
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
605
622
|
trashItem(absPath);
|
|
606
|
-
|
|
623
|
+
recordReport('trash', absPath);
|
|
607
624
|
return true;
|
|
608
625
|
}
|
|
609
626
|
|
|
@@ -824,13 +824,13 @@ if _SESSION_ID:
|
|
|
824
824
|
|
|
825
825
|
_os_tmp_dirs = _build_os_tmp_dirs()
|
|
826
826
|
|
|
827
|
-
def
|
|
827
|
+
def _record_report(operation, abs_path):
|
|
828
828
|
if not _report_path:
|
|
829
829
|
return
|
|
830
830
|
try:
|
|
831
831
|
with _orig_builtin_open(_report_path, "a", encoding="utf-8") as f:
|
|
832
832
|
f.write(json.dumps({
|
|
833
|
-
"operation":
|
|
833
|
+
"operation": operation,
|
|
834
834
|
"runtime": "python",
|
|
835
835
|
"path": abs_path,
|
|
836
836
|
"timestamp": int(time.time() * 1000),
|
|
@@ -998,15 +998,28 @@ if _SESSION_ID:
|
|
|
998
998
|
"[safe-delete] broker denied delete: path=%s" % abs_path
|
|
999
999
|
)
|
|
1000
1000
|
|
|
1001
|
+
# Windows 沙箱且开启文件备份:普通文件交给 tsbx+Center 决定是否进回收站(本轮新建的
|
|
1002
|
+
# 直接删)。原生删除失败(如 Center 拒绝)时继续走 genie-trash,保留审批与 fail-closed。
|
|
1003
|
+
if sys.platform == "win32" and _IN_SANDBOX \
|
|
1004
|
+
and os.environ.get("CODEBUDDY_FILE_BACKUP_ENABLED") == "1":
|
|
1005
|
+
st = _safe_lstat(abs_path)
|
|
1006
|
+
if st and stat.S_ISREG(st.st_mode):
|
|
1007
|
+
try:
|
|
1008
|
+
_orig_unlink(abs_path)
|
|
1009
|
+
_record_report("native-delete", abs_path)
|
|
1010
|
+
return True
|
|
1011
|
+
except OSError:
|
|
1012
|
+
pass
|
|
1013
|
+
|
|
1001
1014
|
try:
|
|
1002
1015
|
if _try_trash_via_binary(abs_path):
|
|
1003
|
-
|
|
1016
|
+
_record_report("trash", abs_path)
|
|
1004
1017
|
return True
|
|
1005
1018
|
_platform_trash(abs_path)
|
|
1006
1019
|
except Exception as e:
|
|
1007
1020
|
_emit_safe_delete_fail_closed(abs_path, "trash-failed", str(e))
|
|
1008
1021
|
raise
|
|
1009
|
-
|
|
1022
|
+
_record_report("trash", abs_path)
|
|
1010
1023
|
return True
|
|
1011
1024
|
|
|
1012
1025
|
def _safe_lstat(abs_path):
|
package/docs/acp-v2.md
CHANGED
|
@@ -449,6 +449,21 @@ head:
|
|
|
449
449
|
两种操作都只修改 conversation history,不会恢复文件、Git、terminal、tool side effect、
|
|
450
450
|
credential、config 或 MCP state。
|
|
451
451
|
|
|
452
|
+
Fork 保留选定历史中的工具结果。已完成的普通 attached Subagent 历史会复制并重分配身份;
|
|
453
|
+
background、仍为 running 的历史快照以及 Agent Teams 的运行关系不复制,新会话不会自动
|
|
454
|
+
续跑这些任务,也不会订阅原团队的消息。原会话继续拥有自己的任务。历史文本可以提及原任务 ID,
|
|
455
|
+
但这些条目不再携带新会话的 `subAgent` 关系,不出现在新会话的 `subagent/list` 中。
|
|
456
|
+
这不回滚工具已经产生的外部副作用。
|
|
457
|
+
|
|
458
|
+
Harness 默认不再以 32 个已挂载会话限制 `new` / `resume` / `fork`。需要驻留预算时,可设置
|
|
459
|
+
`createHarness({ maxActiveSessions: 64 })` 或独立进程的 `--max-active-sessions 64`;
|
|
460
|
+
预算包含已挂载的空闲会话,`session/close` 释放名额。它与持久化会话总数、并发执行数、
|
|
461
|
+
transport 的连接限制及单次 fork 的历史复制预算相互独立。
|
|
462
|
+
|
|
463
|
+
历史不完整或引用损坏返回 `SESSION_HISTORY_INVALID`,复制预算超限返回
|
|
464
|
+
`SESSION_FORK_TOO_LARGE`,无效 turn cursor 仍返回 `SESSION_TURN_CURSOR_NOT_FOUND`。
|
|
465
|
+
详细内部路径仅写入诊断日志,错误响应不回显。
|
|
466
|
+
|
|
452
467
|
### 文件 checkpoint
|
|
453
468
|
|
|
454
469
|
Harness v1 用同一个 root `user_message.messageId` 提供独立的文件恢复面;它不引入
|
|
@@ -475,6 +490,9 @@ Harness v1 用同一个 root `user_message.messageId` 提供独立的文件恢
|
|
|
475
490
|
`checkpoint/list` 只列出已记录 Agent 文件 checkpoint 的 canonical root user
|
|
476
491
|
message 锚点,并按 conversation 从旧到新排列。List 不读取文件快照;
|
|
477
492
|
快照是否仍可用由后续 `checkpoint/read` 或 `checkpoint/restore` 校验。
|
|
493
|
+
列表不附加 `hasFileChanges` / `changedFileCount`。按本轮变更筛选的客户端可复用
|
|
494
|
+
live / replay 的工具结果,见[客户端筛选说明](client.md#筛选文件恢复锚点);没有完整证据的
|
|
495
|
+
轮次应保留,不能把未加载或缺失记录当成无变更。
|
|
478
496
|
|
|
479
497
|
`checkpoint/read` 返回当前 workspace 回到该消息之前状态时会发生的
|
|
480
498
|
累计 ACP v2 `Diff`;它不是该 turn 自身的增量:
|
|
@@ -531,8 +549,9 @@ message 锚点,并按 conversation 从旧到新排列。List 不读取文件
|
|
|
531
549
|
`session/resume`(`replayFrom: { "type": "start" }`),不会因此再次恢复文件。
|
|
532
550
|
|
|
533
551
|
冷恢复从 durable session 恢复 canonical cwd。未持久化的
|
|
534
|
-
`additionalDirectories` / `addDir`
|
|
535
|
-
|
|
552
|
+
`additionalDirectories` / `addDir` 不会在重启后授予文件恢复权限。历史中能够确认位于
|
|
553
|
+
当前恢复范围之外的文件条目会被排除,既不出现在预览中,也不会阻断工作区内文件恢复;
|
|
554
|
+
这些文件本身保持不变。无法安全解析的路径或无效快照仍拒绝恢复,不会放宽安全校验。
|
|
536
555
|
|
|
537
556
|
## 7. 反向交互与配置
|
|
538
557
|
|
package/docs/client.md
CHANGED
|
@@ -317,3 +317,47 @@ await client.session.prompt({ sessionId, prompt: [{ type: 'text', text: '从这
|
|
|
317
317
|
`after` 保留该用户轮次,`before` 排除该轮次。游标使用根用户消息的 messageId,
|
|
318
318
|
该轮的 steer 输入仍属于同一轮。回退会结束该会话的执行资源;下一次 prompt 从回退后的历史恢复。
|
|
319
319
|
它只回退对话历史,文件恢复使用 checkpoint 接口。RPC 返回后不会自动重放历史。
|
|
320
|
+
|
|
321
|
+
## 筛选文件恢复锚点
|
|
322
|
+
|
|
323
|
+
`checkpoint/list` 返回文件恢复锚点,不提供每轮文件变更摘要。客户端可复用现有消息模型,
|
|
324
|
+
从实时和历史回放中的 ACP 工具结果筛选“发生过文件变更的轮次”,无需逐个调用
|
|
325
|
+
`checkpoint/read`。后者预览的是**当前工作区回到锚点之前**的累计变化,不能拿它判断该轮
|
|
326
|
+
是否修改过文件;纯问答轮次也可能回退后面多轮产生的修改。
|
|
327
|
+
|
|
328
|
+
在现有消息归并流程中处理这些证据:
|
|
329
|
+
|
|
330
|
+
- 先按会话和 `toolCallId` 归并 `tool_call` / `tool_call_update`,再检查最终状态。
|
|
331
|
+
`status: 'completed'` 且 `diff.changes` 非空是已记录变更的证据;`patch: null`
|
|
332
|
+
不影响文件列表。预览以及失败、取消的工具结果不能当作已提交变更。
|
|
333
|
+
- 按工具所属的根用户轮次归类,使用根 `user_message.messageId` 对应 checkpoint。
|
|
334
|
+
`codebuddy.ai/requestId` / `codebuddy.ai/rootRequestId` 可辅助关联执行事件,但不能替代
|
|
335
|
+
持久化的消息游标。steer 输入仍属于原轮次;不能简单归到最后到达的一条用户消息。
|
|
336
|
+
- live 与回放使用同一套归并逻辑,重复事件不重复计数。同一路径在一轮中修改多次可以
|
|
337
|
+
去重,但这不代表最终净差异:改动后再改回的轮次仍然“发生过变更”。
|
|
338
|
+
- 只有整轮已结束、历史完整且相关操作的变更记录完整时,才能确认“无变更”。未加载的
|
|
339
|
+
历史、仍在执行的轮次、缺少文件变更记录的旧历史,以及结果不完整的工具调用均保留为
|
|
340
|
+
“未知”。当前这套文件记录不覆盖任意 Bash / MCP 副作用,不能由无 `diff` 推导无变更。
|
|
341
|
+
|
|
342
|
+
例如,下列状态由 Host 从**已有消息模型**计算,不是 Harness 的字段,也不需要另存一份历史:
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
// changeStateByRootMessageId 是 Host 派生的 Map:
|
|
346
|
+
// 根 user messageId -> 'changed' | 'unchanged' | 'unknown'
|
|
347
|
+
const { checkpoints } = await client.checkpoint.list({ sessionId });
|
|
348
|
+
const visibleCheckpoints = checkpoints.filter(
|
|
349
|
+
({ messageId }) => changeStateByRootMessageId.get(messageId) !== 'unchanged',
|
|
350
|
+
);
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
未知条目暂时保留,可能显示少量没有变更的锚点,但不会因历史尚未加载而误隐藏。已加载
|
|
354
|
+
的最后一轮可直接读取它自己的工具结果,不必等待下一轮生成 checkpoint。
|
|
355
|
+
|
|
356
|
+
需要历史时,复用正常的 `session/resume` 回放:`replayFrom: { type: 'start' }` 为完整历史,
|
|
357
|
+
`{ type: '_codebuddy.ai/turn', last: 20 }` 按轮分页。分页未加载到的轮次仍是未知;不要为每次
|
|
358
|
+
打开恢复菜单重复 resume,它还涉及会话挂载和 MCP 配置。具体契约见
|
|
359
|
+
[历史回放](acp-v2.md#5-resume-与-replay)及[文件 checkpoint](acp-v2.md#文件-checkpoint)。
|
|
360
|
+
|
|
361
|
+
筛选仅决定列表展示,不授予文件恢复权限。用户选中锚点后仍调用 `checkpoint/read`,由
|
|
362
|
+
Server 按 canonical workspace 和有效的附加目录生成预览;确认后再调用
|
|
363
|
+
`checkpoint/restore`。客户端用路径前缀过滤不能替代 Server 对符号链接和恢复范围的校验。
|
package/docs/errors.md
CHANGED
|
@@ -70,6 +70,7 @@ request;它们不属于下面的 prompt terminal `CodeBuddyError`:
|
|
|
70
70
|
| `SESSION_CHECKPOINT_TOO_LARGE` | `checkpoint/list/read/restore` | Session history 超过安全检查预算,Server 未读取或修改文件 |
|
|
71
71
|
| `SESSION_CWD_UNAVAILABLE` | `session/rewind`、`checkpoint/list/read/restore` | Durable session 没有可信的 canonical workspace;Server fail closed,不使用进程 cwd |
|
|
72
72
|
| `SESSION_CHECKPOINT_RESTORE_FAILED` | `checkpoint/restore` | 一个或多个 tracked file 未能恢复;请求返回失败,但文件系统可能已经部分改变,Host 应重新调用 `checkpoint/read` 收敛 UI |
|
|
73
|
+
| `SESSION_HISTORY_INVALID` | `session/fork`、`session/delete` | 持久化历史不完整或关系不一致;保留原历史,详细原因见服务端日志 |
|
|
73
74
|
| `SESSION_FORK_TOO_LARGE` | `session/fork` | Session history 超过可安全复制的预算,未创建 fork |
|
|
74
75
|
| `SESSION_REPLAY_TOO_LARGE` | `session/resume` | Session history 超过可安全 replay 的预算,未 attach |
|
|
75
76
|
| `SESSION_REWIND_TOO_LARGE` | `session/rewind` | Session history 超过可安全修改的预算,未移动 conversation head |
|
package/docs/in-process.md
CHANGED
|
@@ -64,6 +64,7 @@ await harness.close();
|
|
|
64
64
|
| `tools` | Host 的 `tool()` 定义数组,追加到默认内置工具。省略或 `[]` 均表示不注册 Host 工具;会话工具选择由插件 Agent 声明决定。 |
|
|
65
65
|
| `hooks` | Functional hooks 的 `register(on, options)` 函数,每个 Harness 注册一次,见下文。 |
|
|
66
66
|
| `mcp.toolsSyncTtlMs` | 工具目录的兜底刷新间隔,默认 15 分钟;`null` 关闭过期刷新,变更通知仍生效。 |
|
|
67
|
+
| `maxActiveSessions` | 可选的已挂载会话数量预算,包含空闲会话,必须为正整数。默认不设固定数量上限;`session.close()` 释放名额,持久化历史保留。独立进程使用 `--max-active-sessions <count>`。 |
|
|
67
68
|
| `strictMcpConfig` | 为 `true` 时只使用会话显式传入的 MCP;默认还发现用户和插件 MCP。 |
|
|
68
69
|
| `telemetry` | Harness 的结构化日志 sink、队列和刷新设置;传入的 sink 由 Harness flush/close。Agent 内核日志在本地模式默认写入 `configDir/logs`,与此 sink 分开。 |
|
|
69
70
|
| `signal` | Harness 的生命周期取消信号,覆盖创建和运行阶段。 |
|