@tencent-ai/agent-harness 0.2.0-beta.6 → 0.2.0-beta.7
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 +13 -0
- package/cli/CHANGELOG.md +49 -0
- package/cli/dist-server/shared.cjs +174 -173
- package/cli/dist-server/types/node/server/types.d.ts +8 -1
- package/cli/dist-server/types/vendor/cbc-core/node/agent/agent-protocol.d.ts +5 -0
- 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/session-protocol.d.ts +2 -2
- package/cli/dist-server/types/vendor/cbc-core/node/session/session-store.d.ts +13 -0
- 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/utils/input-item-utils.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-core/node/utils/message-utils.d.ts +1 -0
- package/cli/dist-server/types/vendor/cbc-shared/node/index.d.ts +1 -0
- 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/cbc-core/lib/node/agent/agent-protocol.d.ts +5 -0
- 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/session-protocol.d.ts +2 -2
- package/cli/dist-server/types/workspace/cbc-core/lib/node/session/session-store.d.ts +13 -0
- 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/utils/input-item-utils.d.ts +1 -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-shared/lib/node/index.d.ts +1 -0
- 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/product/lib/common/types/features.d.ts +34 -22
- package/cli/dist-server/types/workspace/product/lib/common/types/index.d.ts +1 -0
- package/cli/dist-server/types/workspace/product/lib/common/types/language-model.d.ts +5 -1
- package/cli/dist-server/types/workspace/product/lib/common/types/product.d.ts +7 -0
- package/cli/dist-server/types/workspace/product/lib/common/types/workspace-report.d.ts +119 -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 +21 -0
- package/package.json +8 -8
|
@@ -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":"d5cd5f8fbbaa71808a6fa3648103e540ddb77745","date":"2026-09-30T05:49:29.879Z"}
|
package/docs/client.md
CHANGED
|
@@ -135,6 +135,27 @@ steer 返回同一 requestId,不新开一轮。ACK 表示输入已进入待消
|
|
|
135
135
|
返回值的 `_meta['codebuddy.ai/requestId']` 是维护操作 ID;完成状态通过 `session/update` 交付,
|
|
136
136
|
不会创建用户 turn。也可以通过 prompt 提交 `/compact` 命令,按命令解析规则执行。
|
|
137
137
|
|
|
138
|
+
## 提问元数据
|
|
139
|
+
|
|
140
|
+
通过 `session.prompt._meta` 传入 W3C 追踪上下文。`baggage` 按标准传播为内置模型 HTTP 请求的同名 header,也供本轮遥测使用:
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
await client.session.prompt({
|
|
144
|
+
sessionId,
|
|
145
|
+
prompt: [{ type: 'text', text: '解释这段代码' }],
|
|
146
|
+
_meta: {
|
|
147
|
+
baggage: 'x-agent-intent=ask,example.source=editor',
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`x-agent-intent` 是合法的自定义 W3C Baggage 键,无需再加 namespace。键名区分大小写,请使用小写形式;其他业务字段可使用 `your-org.source` 等前缀避免冲突。
|
|
153
|
+
`x-agent-intent` 按同名约定映射到模型请求头 `X-Agent-Intent`,常用值为 `craft`、`ask`、`plan`、`expert`,也支持自定义归因值;省略或不合法的 HTTP header 值使用 `craft`。
|
|
154
|
+
现有遥测的 `mode` 字段仍使用原枚举,自定义值可通过 baggage 属性读取。其他 baggage 条目保持在 `baggage` header 中,不展开成独立 header;`x-` 前缀不授予覆写认证、会话或追踪头的权限。W3C 标准不定义条目到独立 header 的展开映射。
|
|
155
|
+
场景不切换权限模式,也不选择 Agent;这些仍通过会话配置设置。新增的 baggage 传播和意图映射只用于内置模型,遵守 `CODEBUDDY_SKIP_INTERNAL_HEADERS`;自定义或第三方模型维持原有请求头策略,不接收这些宿主扩展。
|
|
156
|
+
元数据按本次 query 捕获,子任务继承所属请求;下一次提问不继承上次的 `_meta`。后台自动续跑保留场景,但创建新的追踪和请求标识。
|
|
157
|
+
旧调用方的 `_meta['codebuddy.ai'].mode` 仅在 baggage 未提供场景时兼容,新调用方无需传入。
|
|
158
|
+
|
|
138
159
|
## 读取 Subagent 历史
|
|
139
160
|
|
|
140
161
|
连接已创建或 resume 根会话后,可以列出子会话,并单独读取它们的历史:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-ai/agent-harness",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.7",
|
|
4
4
|
"description": "Standalone JSON-RPC agent harness backed by CodeBuddy Code",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -225,13 +225,13 @@
|
|
|
225
225
|
"@tencent-ai/sandbox-cli-linux-x64": "5.8.0-beta.7",
|
|
226
226
|
"@tencent-ai/sandbox-cli-win32-x64": "5.8.0-beta.7",
|
|
227
227
|
"esbuild": "^0.25.12",
|
|
228
|
-
"@tencent-ai/agent-harness-darwin-arm64": "0.2.0-beta.
|
|
229
|
-
"@tencent-ai/agent-harness-darwin-x64": "0.2.0-beta.
|
|
230
|
-
"@tencent-ai/agent-harness-linux-arm64": "0.2.0-beta.
|
|
231
|
-
"@tencent-ai/agent-harness-linux-arm64-musl": "0.2.0-beta.
|
|
232
|
-
"@tencent-ai/agent-harness-linux-x64": "0.2.0-beta.
|
|
233
|
-
"@tencent-ai/agent-harness-linux-x64-musl": "0.2.0-beta.
|
|
234
|
-
"@tencent-ai/agent-harness-win32-x64": "0.2.0-beta.
|
|
228
|
+
"@tencent-ai/agent-harness-darwin-arm64": "0.2.0-beta.7",
|
|
229
|
+
"@tencent-ai/agent-harness-darwin-x64": "0.2.0-beta.7",
|
|
230
|
+
"@tencent-ai/agent-harness-linux-arm64": "0.2.0-beta.7",
|
|
231
|
+
"@tencent-ai/agent-harness-linux-arm64-musl": "0.2.0-beta.7",
|
|
232
|
+
"@tencent-ai/agent-harness-linux-x64": "0.2.0-beta.7",
|
|
233
|
+
"@tencent-ai/agent-harness-linux-x64-musl": "0.2.0-beta.7",
|
|
234
|
+
"@tencent-ai/agent-harness-win32-x64": "0.2.0-beta.7"
|
|
235
235
|
},
|
|
236
236
|
"devDependencies": {
|
|
237
237
|
"@anthropic-ai/sandbox-runtime": "0.0.17",
|