personal-bot 0.3.6 → 0.3.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/docs/README.md +1 -1
- package/docs/architecture/model-context.md +1 -2
- package/docs/guides/capabilities.md +4 -8
- package/lib/antigravity-plugin/lib/extension/acp-worker.js +2 -2
- package/lib/antigravity-plugin/lib/extension/cli.js +11 -11
- package/lib/antigravity-plugin/lib/extension/mcp.js +66 -49
- package/lib/antigravity-plugin/lib/integrations/agent-resources.js +2 -2
- package/lib/antigravity-plugin/package.json +1 -1
- package/lib/antigravity-plugin/plugin.json +1 -1
- package/lib/antigravity-plugin/resources/agents/coordinator.md +3 -7
- package/lib/antigravity-plugin/resources/agents/general-purpose.md +3 -3
- package/lib/antigravity-plugin/resources/prompts/plugin-coordinator.md +1 -2
- package/lib/antigravity-plugin/resources/prompts/workspace.md +12 -16
- package/lib/antigravity-plugin/resources/skills/provider-connections/SKILL.md +7 -6
- package/lib/antigravity-plugin/resources/templates/workspace-agents.md +0 -4
- package/lib/antigravity-plugin/skills/pbot/SKILL.md +14 -6
- package/lib/antigravity-plugin/skills/provider-connections/SKILL.md +7 -6
- package/lib/codex-marketplace/plugins/personal-bot/.codex-plugin/plugin.json +1 -1
- package/lib/codex-marketplace/plugins/personal-bot/.mcp.json +2 -2
- package/lib/codex-marketplace/plugins/personal-bot/hooks/hooks.json +3 -3
- package/lib/codex-marketplace/plugins/personal-bot/skills/pbot/SKILL.md +2 -2
- package/lib/extension/acp-worker.js +2 -2
- package/lib/extension/cli.js +11 -11
- package/lib/extension/mcp/tool-contract.js +49 -55
- package/lib/extension/mcp/workers.d.ts +6 -0
- package/lib/extension/mcp/workers.js +25 -8
- package/lib/extension/mcp.js +66 -49
- package/lib/integrations/agent-resources.js +2 -2
- package/lib/qoder-plugin/.mcp.json +2 -2
- package/lib/qoder-plugin/.qoder-plugin/plugin.json +1 -1
- package/lib/qoder-plugin/hooks/hooks.json +3 -3
- package/lib/qoder-plugin/skills/pbot/SKILL.md +2 -2
- package/lib/tools/history/contract.js +12 -12
- package/package.json +1 -1
- package/resources/agents/coordinator.md +3 -7
- package/resources/agents/general-purpose.md +3 -3
- package/resources/antigravity/skills/pbot/SKILL.md +14 -6
- package/resources/claude/skills/pbot/SKILL.md +14 -6
- package/resources/plugin/skills/pbot/SKILL.md +2 -2
- package/resources/prompts/history-coordinator.md +1 -2
- package/resources/prompts/plugin-coordinator.md +1 -2
- package/resources/prompts/workspace.md +12 -16
- package/resources/skills/provider-connections/SKILL.md +7 -6
- package/resources/templates/workspace-agents.md +0 -4
- package/src/extension/mcp/tool-contract.ts +49 -55
- package/src/extension/mcp/workers.ts +32 -10
- package/src/integrations/agent-resources.ts +2 -2
- package/src/pbot.ts +1 -1
- package/src/tools/history/contract.ts +12 -12
- package/lib/antigravity-plugin/resources/references/compute-finance.md +0 -22
- package/lib/antigravity-plugin/resources/references/compute.md +0 -16
- package/lib/antigravity-plugin/resources/references/task-conductor.md +0 -25
- package/resources/references/compute-finance.md +0 -22
- package/resources/references/compute.md +0 -16
- package/resources/references/task-conductor.md +0 -25
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"plugins": [
|
|
7
7
|
{
|
|
8
8
|
"name": "personal-bot",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.7",
|
|
10
10
|
"description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
|
|
11
11
|
"source": {
|
|
12
12
|
"source": "npm",
|
|
13
13
|
"package": "personal-bot",
|
|
14
|
-
"version": "0.3.
|
|
14
|
+
"version": "0.3.7"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
]
|
package/docs/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Personal Bot 文档按使用场景与职责分为四类,根目录 [README.zh-C
|
|
|
19
19
|
| [工作区配置](guides/workspace-configuration.md) | 共用 `.pbot/config.json` 启用规则、自定义 ACP Harness(含可选 `env`)与配置生效方式 |
|
|
20
20
|
| [跨 Harness 专家调度](guides/cross-harness-workers.md) | 统一 MCP `worker_*` 工具集、与宿主原生 subagent 互补边界、ACP 生命周期与交互转发 |
|
|
21
21
|
| [历史对话](guides/history.md) | 全宿主统一事件采集、MCP `history_search`/`history_read`、Pi/dsh `pbot_history` 与跨宿主分层摘要 |
|
|
22
|
-
| [工具与执行能力](guides/capabilities.md) | 原生 CLI/MCP
|
|
22
|
+
| [工具与执行能力](guides/capabilities.md) | 原生 CLI/MCP、工作区共享 MCP 与运行环境责任划分 |
|
|
23
23
|
|
|
24
24
|
## 架构与扩展设计(`docs/architecture/`)
|
|
25
25
|
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
| 协调者操作导航 | Pi/dsh 加载 `resources/prompts/history-coordinator.md`;轻插件宿主加载 `resources/prompts/plugin-coordinator.md` |
|
|
12
12
|
| 工作区自有技能 | `<workspace>/.agents/skills/*/SKILL.md`,Pi/dsh/Antigravity/Codex/Qoder CLI 原生发现;Claude Code 与未声明原生发现的 ACP worker 按需注入元数据索引(受 `features.skills` 控制) |
|
|
13
13
|
| 专业方法技能 | `resources/skills/`(`project-maintenance`、`provider-connections`),只暴露元数据,按任务读取正文(受 `features.skills` 控制) |
|
|
14
|
-
|
|
|
15
|
-
| 历史摘要专用提示 | `resources/prompts/history-summary.md`,仅用于 Pi/dsh 独立历史摘要调用 |
|
|
14
|
+
| 历史摘要专用提示 | `resources/prompts/history-summary.md`、`history-monthly-summary.md`,仅用于独立历史摘要调用,不注入普通对话会话 |
|
|
16
15
|
|
|
17
16
|
## 各宿主加载方式
|
|
18
17
|
|
|
@@ -23,14 +23,10 @@ Personal Bot 复用各宿主的原生 CLI、MCP、认证与权限体系,不额
|
|
|
23
23
|
- **dsh**:使用原生 `@deepseek-ai/dsh-mcp-client` 与 profile 配置管理外部 MCP。
|
|
24
24
|
- **Claude Code**:使用 `claude mcp add --scope project <server> ...`(写入 `.mcp.json`),会话内 `/mcp` 核对状态。
|
|
25
25
|
- **Antigravity**:全局使用 `agy mcp add|remove|list`(管理 `~/.gemini/config/mcp_config.json`)。
|
|
26
|
+
- **其他宿主(如 Codex、Qoder CLI)**:使用对应宿主自带的原生 MCP 命令或配置入口管理。
|
|
26
27
|
- 外部系统接入与排障使用工作区按需技能 [provider-connections](../../resources/skills/provider-connections/SKILL.md)。
|
|
27
28
|
|
|
28
|
-
##
|
|
29
|
+
## 运行环境与可选扩展
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
- 技术指标与回测:[resources/references/compute-finance.md](../../resources/references/compute-finance.md)
|
|
33
|
-
|
|
34
|
-
## 可选 Task Conductor
|
|
35
|
-
|
|
36
|
-
周期任务、重复流程、DAG 或宿主关闭后仍需持续执行的任务使用可选的 `task-conductor-plugin`(通过宿主原生 MCP 接入),安装与配置遵循[上游接入指南](https://github.com/realqiyan/task-conductor/blob/master/docs/host-integrations.md)。Personal Bot 通过 [resources/references/task-conductor.md](../../resources/references/task-conductor.md) 提供按需操作参考。
|
|
31
|
+
- **项目计算与脚本执行**:各宿主与 ACP worker 直接通过原生 Bash 遵循项目声明的解释器、依赖与工作目录。领域特定的计算规范或方法保存在工作区 `knowledge/` 或 `.agents/skills/` 中按需加载。
|
|
32
|
+
- **可选第三方插件与调度工具**:Personal Bot 不内置第三方插件的引导与操作手册;如需周期调度、DAG 或其他外部能力,直接按上游文档在对应宿主中安装配置并使用其自身技能或工具说明。
|
|
@@ -11026,7 +11026,7 @@ async function agentText(agent, root, coordinatorPrompt = "plugin-coordinator.md
|
|
|
11026
11026
|
function formatWorkspaceSkills(skills) {
|
|
11027
11027
|
if (!skills.length) return "";
|
|
11028
11028
|
const lines = skills.map((skill) => `- **${skill.name}**\uFF08\`${skill.path}\`\uFF09\uFF1A${skill.description}`);
|
|
11029
|
-
return "## \
|
|
11029
|
+
return "## \u53EF\u7528\u6280\u80FD\n\n\u4EFB\u52A1\u5339\u914D\u65F6\u6309\u9700\u8BFB\u53D6\u5BF9\u5E94 `SKILL.md` \u6B63\u6587\uFF1A\n" + lines.join("\n");
|
|
11030
11030
|
}
|
|
11031
11031
|
async function loadWorkspaceContext(options) {
|
|
11032
11032
|
const {
|
|
@@ -11046,7 +11046,7 @@ async function loadWorkspaceContext(options) {
|
|
|
11046
11046
|
includeRootAgents ? readOptionalFile(join7(root, "AGENTS.md")) : Promise.resolve("")
|
|
11047
11047
|
]) : ["", "", ""];
|
|
11048
11048
|
const skillsSection = formatWorkspaceSkills(workspaceSkills);
|
|
11049
|
-
const noticesSection = notices.length ? "## \u542F\u52A8\u63D0\u793A\n\n" + notices.map((item) => `- ${item}`).join("\n") : "";
|
|
11049
|
+
const noticesSection = notices.length ? "## \u542F\u52A8\u63D0\u793A\n\n\u4EE5\u4E0B\u4E3A\u5DE5\u4F5C\u533A\u7EF4\u62A4\u63D0\u9192\uFF0C\u9002\u65F6\u987A\u5E26\u544A\u77E5\u7528\u6237\u5373\u53EF\uFF0C\u52FF\u672A\u7ECF\u7528\u6237\u8981\u6C42\u81EA\u884C\u6267\u884C\uFF1A\n" + notices.map((item) => `- ${item}`).join("\n") : "";
|
|
11050
11050
|
const environment = { host, workspaceRoot: root, resourceRoot };
|
|
11051
11051
|
const text3 = [
|
|
11052
11052
|
workspace,
|
|
@@ -19421,18 +19421,18 @@ var init_contract = __esm({
|
|
|
19421
19421
|
});
|
|
19422
19422
|
historyParameters = typebox_exports.Object({
|
|
19423
19423
|
action: typebox_exports.Union([typebox_exports.Literal("search"), typebox_exports.Literal("read")], {
|
|
19424
|
-
description: "search \u641C\u7D22\u6216\u5217\
|
|
19424
|
+
description: "search \u641C\u7D22\u6216\u5217\u8868\uFF1Bread \u6309 id \u8BFB\u53D6\u6B63\u6587\u4E0E\u4E0A\u4E0B\u7EA7\u3002\u4EC5\u8BFB\u53D6\u5BF9\u5E94\u52A8\u4F5C\u53C2\u6570\uFF0C\u5176\u4F59\u5FFD\u7565\u3002"
|
|
19425
19425
|
}),
|
|
19426
|
-
host: nullable(typebox_exports.String({ pattern: historyIdentifierPattern.source, description: "\
|
|
19427
|
-
dimension: nullable(typebox_exports.String({ pattern: historyIdentifierPattern.source, description: "\u4EC5 search\
|
|
19428
|
-
query: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1A\u4E0D\u533A\u5206\u5927\u5C0F\u5199\
|
|
19429
|
-
sessionId: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1A\u9650\u5B9A\u5728\u6307\u5B9A\u4F1A\u8BDD ID \u5185\u641C\u7D22\u3002" })),
|
|
19426
|
+
host: nullable(typebox_exports.String({ pattern: historyIdentifierPattern.source, description: "\u6765\u6E90\u5BBF\u4E3B\u7B5B\u9009\uFF08\u5982 pi\u3001dsh\u3001claude\u3001antigravity\u3001codex\u3001qoder\uFF09\uFF1B\u7701\u7565\u67E5\u5168\u90E8\u3002" })),
|
|
19427
|
+
dimension: nullable(typebox_exports.String({ pattern: historyIdentifierPattern.source, description: "\u4EC5 search\uFF1Araw \u4EC5\u539F\u6587\uFF0C\u6216\u6307\u5B9A\u6458\u8981\u7EF4\u5EA6\uFF08\u5982 monthly\u3001session\uFF09\uFF1B\u7701\u7565\u67E5\u5168\u90E8\u3002" })),
|
|
19428
|
+
query: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1A\u8FDE\u7EED\u5173\u952E\u8BCD\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09\uFF1B\u7701\u7565\u5217\u4F1A\u8BDD\u6216\u6307\u5B9A\u7EF4\u5EA6\u6458\u8981\u3002" })),
|
|
19429
|
+
sessionId: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1A\u9650\u5B9A\u5728\u6307\u5B9A\u539F\u59CB\u4F1A\u8BDD ID \u5185\u641C\u7D22\u3002" })),
|
|
19430
19430
|
from: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1AISO \u65E5\u671F\u6216\u65F6\u95F4\u4E0B\u754C\u3002" })),
|
|
19431
19431
|
to: nullable(typebox_exports.String({ description: "\u4EC5 search\uFF1AISO \u65E5\u671F\u6216\u65F6\u95F4\u4E0A\u754C\u3002" })),
|
|
19432
|
-
id: nullable(typebox_exports.String({ description: "\u4EC5 read\uFF0C\u5FC5\u586B\
|
|
19433
|
-
offset: nullable(typebox_exports.Integer({ minimum: 0, description: "search\
|
|
19434
|
-
limit: nullable(typebox_exports.Integer({ minimum: 1, maximum: historyPageLimits.read.max, description: `search\uFF1A\
|
|
19435
|
-
childrenOffset: nullable(typebox_exports.Integer({ minimum: 0, description: "\u4EC5 read\uFF1A\u5B50\u8282\u70B9\
|
|
19432
|
+
id: nullable(typebox_exports.String({ description: "\u4EC5 read\uFF0C\u5FC5\u586B\uFF1A\u8282\u70B9 id\uFF08\u6765\u81EA search \u6216\u4E0A\u4E0B\u7EA7\uFF09\u3002" })),
|
|
19433
|
+
offset: nullable(typebox_exports.Integer({ minimum: 0, description: "search \u4E3A\u7ED3\u679C\u504F\u79FB\uFF0Cread \u4E3A\u6B63\u6587\u5B57\u7B26\u504F\u79FB\uFF1B\u9ED8\u8BA4 0\u3002" })),
|
|
19434
|
+
limit: nullable(typebox_exports.Integer({ minimum: 1, maximum: historyPageLimits.read.max, description: `search\uFF1A\u8FD4\u56DE\u6761\u6570\uFF081\u2013${historyPageLimits.search.max}\uFF0C\u9ED8\u8BA4 ${historyPageLimits.search.default}\uFF09\uFF1Bread\uFF1A\u6B63\u6587\u5B57\u7B26\u6570\uFF08\u9ED8\u8BA4 ${historyPageLimits.read.default}\uFF09\u3002` })),
|
|
19435
|
+
childrenOffset: nullable(typebox_exports.Integer({ minimum: 0, description: "\u4EC5 read\uFF1A\u5B50\u8282\u70B9\u504F\u79FB\uFF0C\u9ED8\u8BA4 0\uFF1B\u7EED\u8BFB\u4F20\u4E0A\u6B21 nextChildrenOffset\u3002" }))
|
|
19436
19436
|
}, { additionalProperties: false });
|
|
19437
19437
|
valid2 = schema(historyParameters);
|
|
19438
19438
|
}
|
|
@@ -21157,7 +21157,7 @@ async function agentText(agent, root, coordinatorPrompt = "plugin-coordinator.md
|
|
|
21157
21157
|
function formatWorkspaceSkills(skills) {
|
|
21158
21158
|
if (!skills.length) return "";
|
|
21159
21159
|
const lines = skills.map((skill) => `- **${skill.name}**\uFF08\`${skill.path}\`\uFF09\uFF1A${skill.description}`);
|
|
21160
|
-
return "## \
|
|
21160
|
+
return "## \u53EF\u7528\u6280\u80FD\n\n\u4EFB\u52A1\u5339\u914D\u65F6\u6309\u9700\u8BFB\u53D6\u5BF9\u5E94 `SKILL.md` \u6B63\u6587\uFF1A\n" + lines.join("\n");
|
|
21161
21161
|
}
|
|
21162
21162
|
async function loadWorkspaceContext(options) {
|
|
21163
21163
|
const {
|
|
@@ -21177,7 +21177,7 @@ async function loadWorkspaceContext(options) {
|
|
|
21177
21177
|
includeRootAgents ? readOptionalFile(join21(root, "AGENTS.md")) : Promise.resolve("")
|
|
21178
21178
|
]) : ["", "", ""];
|
|
21179
21179
|
const skillsSection = formatWorkspaceSkills(workspaceSkills);
|
|
21180
|
-
const noticesSection = notices.length ? "## \u542F\u52A8\u63D0\u793A\n\n" + notices.map((item) => `- ${item}`).join("\n") : "";
|
|
21180
|
+
const noticesSection = notices.length ? "## \u542F\u52A8\u63D0\u793A\n\n\u4EE5\u4E0B\u4E3A\u5DE5\u4F5C\u533A\u7EF4\u62A4\u63D0\u9192\uFF0C\u9002\u65F6\u987A\u5E26\u544A\u77E5\u7528\u6237\u5373\u53EF\uFF0C\u52FF\u672A\u7ECF\u7528\u6237\u8981\u6C42\u81EA\u884C\u6267\u884C\uFF1A\n" + notices.map((item) => `- ${item}`).join("\n") : "";
|
|
21181
21181
|
const environment = { host, workspaceRoot: root, resourceRoot };
|
|
21182
21182
|
const text = [
|
|
21183
21183
|
workspace,
|
|
@@ -1262,7 +1262,7 @@ var discoverTargets = ["overview", "workers", "backends", "models"];
|
|
|
1262
1262
|
function formatBackendItem(entry, defaultBackend) {
|
|
1263
1263
|
const tags = [];
|
|
1264
1264
|
if (entry.label) tags.push(entry.label);
|
|
1265
|
-
if (entry.backend === defaultBackend) tags.push("\u5F53\u524D");
|
|
1265
|
+
if (entry.backend === defaultBackend) tags.push("\u5F53\u524D\u5BBF\u4E3B");
|
|
1266
1266
|
return tags.length ? `${entry.backend}\uFF08${tags.join("\uFF0C")}\uFF09` : entry.backend;
|
|
1267
1267
|
}
|
|
1268
1268
|
function summarizeBackends(commands = {}, defaultBackend) {
|
|
@@ -1278,7 +1278,7 @@ function summarizeBackends(commands = {}, defaultBackend) {
|
|
|
1278
1278
|
function workspaceProperty(workspaceBound) {
|
|
1279
1279
|
return {
|
|
1280
1280
|
type: "string",
|
|
1281
|
-
description: workspaceBound ? "\
|
|
1281
|
+
description: workspaceBound ? "\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF1B\u9ED8\u8BA4\u5F53\u524D\u5DE5\u4F5C\u533A\uFF0C\u901A\u5E38\u7701\u7565\u3002" : "\u76EE\u6807\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF1B\u8BF7\u4F20\u5165\u73AF\u5883\u4E2D\u7684 workspaceRoot\u3002"
|
|
1282
1282
|
};
|
|
1283
1283
|
}
|
|
1284
1284
|
function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = false) {
|
|
@@ -1288,7 +1288,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1288
1288
|
return [
|
|
1289
1289
|
{
|
|
1290
1290
|
name: "worker_create",
|
|
1291
|
-
description: "\u542F\u52A8\
|
|
1291
|
+
description: "\u542F\u52A8\u72EC\u7ACB\u7684\u5916\u90E8\u52A9\u624B\u4F1A\u8BDD\u5E76\u8FD4\u56DE workerId\uFF08\u4E0D\u53D1\u9001\u4EFB\u52A1\uFF0C\u968F\u540E\u7528 worker_request \u6D3E\u53D1\uFF09\u3002\u672A\u6307\u5B9A\u5176\u4ED6\u52A9\u624B\u6216\u7279\u5B9A\u6A21\u578B\u65F6\uFF0C\u4F18\u5148\u81EA\u884C\u5B8C\u6210\u6216\u4F7F\u7528\u5F53\u524D\u5185\u7F6E\u5B50\u4EE3\u7406\u3002\n" + overview,
|
|
1292
1292
|
annotations: {
|
|
1293
1293
|
title: "Create Worker",
|
|
1294
1294
|
readOnlyHint: false,
|
|
@@ -1303,19 +1303,19 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1303
1303
|
properties: {
|
|
1304
1304
|
backend: {
|
|
1305
1305
|
type: "string",
|
|
1306
|
-
description: "\
|
|
1306
|
+
description: "\u76EE\u6807\u5916\u90E8\u52A9\u624B\u6807\u8BC6\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u652F\u6301\u5E38\u89C1\u522B\u540D\u5982 claude-code\u3001agy\uFF09\u3002"
|
|
1307
1307
|
},
|
|
1308
1308
|
model: {
|
|
1309
1309
|
type: "string",
|
|
1310
|
-
description: '\
|
|
1310
|
+
description: '\u76EE\u6807\u6A21\u578B\uFF08\u6A21\u578B ID\u3001\u663E\u793A\u540D\u6216 provider/model\uFF0C\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09\uFF1B\u672A\u660E\u786E\u6307\u5B9A\u65F6\u7701\u7565\u4EE5\u7528\u9ED8\u8BA4\u6A21\u578B\uFF0C\u4E0D\u786E\u5B9A\u53EF\u9009\u503C\u65F6\u5148\u67E5 worker_discover(target="models")\u3002'
|
|
1311
1311
|
},
|
|
1312
1312
|
thinking: {
|
|
1313
1313
|
type: "string",
|
|
1314
|
-
description: "\
|
|
1314
|
+
description: "\u601D\u8003\u6DF1\u5EA6\uFF08\u5982 low / medium / high / xhigh / max\uFF0C\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09\uFF1B\u672A\u660E\u786E\u6307\u5B9A\u65F6\u7701\u7565\u4EE5\u7528\u9ED8\u8BA4\u8BBE\u7F6E\u3002"
|
|
1315
1315
|
},
|
|
1316
1316
|
cwd: {
|
|
1317
1317
|
type: "string",
|
|
1318
|
-
description: "\
|
|
1318
|
+
description: "\u6267\u884C\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\u6216\u76F8\u5BF9\u5DE5\u4F5C\u533A\u8DEF\u5F84\uFF09\uFF0C\u9ED8\u8BA4\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u3002"
|
|
1319
1319
|
},
|
|
1320
1320
|
workspace
|
|
1321
1321
|
}
|
|
@@ -1323,7 +1323,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1323
1323
|
},
|
|
1324
1324
|
{
|
|
1325
1325
|
name: "worker_close",
|
|
1326
|
-
description: "\u7ED3\u675F\
|
|
1326
|
+
description: "\u7ED3\u675F\u5916\u90E8\u52A9\u624B\u4F1A\u8BDD\u5E76\u91CA\u653E\u8FDB\u7A0B\u3002\u82E5\u8BE5\u4F1A\u8BDD\u652F\u6301\u6062\u590D\uFF08capabilities.resume\uFF09\uFF0C\u540E\u7EED\u4ECD\u53EF\u76F4\u63A5\u7528 worker_request \u7EED\u63A5\u3002",
|
|
1327
1327
|
annotations: {
|
|
1328
1328
|
title: "Close Worker",
|
|
1329
1329
|
readOnlyHint: false,
|
|
@@ -1338,7 +1338,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1338
1338
|
properties: {
|
|
1339
1339
|
workerId: {
|
|
1340
1340
|
type: "string",
|
|
1341
|
-
description: "\
|
|
1341
|
+
description: "\u52A9\u624B\u4F1A\u8BDD ID\uFF08\u6765\u81EA worker_create \u6216 worker_discover\uFF09\u3002"
|
|
1342
1342
|
},
|
|
1343
1343
|
workspace
|
|
1344
1344
|
}
|
|
@@ -1346,7 +1346,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1346
1346
|
},
|
|
1347
1347
|
{
|
|
1348
1348
|
name: "worker_request",
|
|
1349
|
-
description: `\u5411\
|
|
1349
|
+
description: `\u5411\u5916\u90E8\u52A9\u624B\u6D3E\u53D1\u4EFB\u52A1\u6216\u5728\u540C\u4E00\u4E0A\u4E0B\u6587\u4E2D\u8FFD\u95EE\uFF08\u5DF2\u5173\u95ED\u4E14\u652F\u6301\u6062\u590D\u7684\u4F1A\u8BDD\u4F1A\u81EA\u52A8\u7EED\u63A5\uFF09\u3002\u9ED8\u8BA4\u6700\u591A\u7B49\u5F85 ${defaultWaitMs / 1e3} \u79D2\uFF08waitMs \u8BBE\u4E3A 0 \u53EF\u7ACB\u5373\u8F6C\u540E\u53F0\u5E76\u884C\uFF09\uFF1B\u8FD4\u56DE timedOut \u6216 nextOffset \u7528 worker_output\uFF0C\u8FD4\u56DE needsResponse \u5148\u5411\u7528\u6237\u786E\u8BA4\u518D\u7528 worker_response\u3002`,
|
|
1350
1350
|
annotations: {
|
|
1351
1351
|
title: "Send Request to Worker",
|
|
1352
1352
|
readOnlyHint: false,
|
|
@@ -1361,17 +1361,17 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1361
1361
|
properties: {
|
|
1362
1362
|
workerId: {
|
|
1363
1363
|
type: "string",
|
|
1364
|
-
description: "\
|
|
1364
|
+
description: "\u52A9\u624B\u4F1A\u8BDD ID\uFF08\u6765\u81EA worker_create \u6216 worker_discover\uFF09\u3002"
|
|
1365
1365
|
},
|
|
1366
1366
|
message: {
|
|
1367
1367
|
type: "string",
|
|
1368
|
-
description: "\
|
|
1368
|
+
description: "\u4EFB\u52A1\u8BF4\u660E\u6216\u8FFD\u95EE\u5185\u5BB9\u3002\u5916\u90E8\u52A9\u624B\u770B\u4E0D\u5230\u5F53\u524D\u4F1A\u8BDD\u5386\u53F2\uFF0C\u9996\u6B21\u6D3E\u53D1\u9700\u5199\u6E05\u80CC\u666F\u3001\u76EE\u6807\u3001\u76F8\u5173\u6587\u4EF6\u8DEF\u5F84\u3001\u7EA6\u675F\u548C\u671F\u671B\u4EA7\u51FA\u3002"
|
|
1369
1369
|
},
|
|
1370
1370
|
waitMs: {
|
|
1371
1371
|
type: "integer",
|
|
1372
1372
|
minimum: 0,
|
|
1373
1373
|
maximum: maxWaitMs,
|
|
1374
|
-
description: `\u6700\u591A\u7B49\u5F85\
|
|
1374
|
+
description: `\u6700\u591A\u7B49\u5F85\u6BEB\u79D2\u6570\uFF08\u9ED8\u8BA4 ${defaultWaitMs}\uFF09\uFF1B0 \u8868\u793A\u7ACB\u5373\u8FD4\u56DE\u8F6C\u540E\u53F0\u6267\u884C\u3002`
|
|
1375
1375
|
},
|
|
1376
1376
|
workspace
|
|
1377
1377
|
}
|
|
@@ -1379,7 +1379,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1379
1379
|
},
|
|
1380
1380
|
{
|
|
1381
1381
|
name: "worker_response",
|
|
1382
|
-
description: `\
|
|
1382
|
+
description: `\u56DE\u590D\u5916\u90E8\u52A9\u624B\u6682\u505C\u65F6\u53D1\u51FA\u7684\u5F85\u5904\u7406\u8BF7\u6C42\uFF08needsResponse: true\uFF09\uFF0C\u652F\u6301\u64CD\u4F5C\u6388\u6743\u3001\u8868\u5355\u95EE\u7B54\u4E0E\u94FE\u63A5\u786E\u8BA4\u3002\u63D0\u4EA4\u524D\u5148\u5411\u7528\u6237\u786E\u8BA4\uFF1B\u63D0\u4EA4\u540E\u9ED8\u8BA4\u7B49\u5F85\u6700\u591A ${defaultWaitMs / 1e3} \u79D2\u8FD4\u56DE\u540E\u7EED\u7ED3\u679C\u3002`,
|
|
1383
1383
|
annotations: {
|
|
1384
1384
|
title: "Respond to Worker Request",
|
|
1385
1385
|
readOnlyHint: false,
|
|
@@ -1399,26 +1399,26 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1399
1399
|
action: {
|
|
1400
1400
|
type: "string",
|
|
1401
1401
|
enum: [...acpElicitationActions],
|
|
1402
|
-
description: "
|
|
1402
|
+
description: "accept \u540C\u610F/\u63D0\u4EA4\u8868\u5355/\u786E\u8BA4\u94FE\u63A5\uFF1Bdecline \u62D2\u7EDD\uFF1Bcancel \u53D6\u6D88\u8BF7\u6C42\u3002"
|
|
1403
1403
|
},
|
|
1404
1404
|
requestId: {
|
|
1405
1405
|
type: "string",
|
|
1406
|
-
description: "\
|
|
1406
|
+
description: "\u8BF7\u6C42 ID\uFF08pendingRequests[].requestId\uFF09\uFF1B\u4EC5\u4E00\u6761\u5F85\u5904\u7406\u8BF7\u6C42\u65F6\u53EF\u7701\u7565\uFF0C\u591A\u6761\u65F6\u5FC5\u586B\u3002"
|
|
1407
1407
|
},
|
|
1408
1408
|
optionId: {
|
|
1409
1409
|
type: "string",
|
|
1410
|
-
description:
|
|
1410
|
+
description: "\u4EC5 permission \u8BF7\u6C42\u4E14 action\u2260cancel \u65F6\u53EF\u7528\uFF1A\u6307\u5B9A pendingRequests[].options[].optionId\uFF0C\u7701\u7565\u5219\u6309 action \u5355\u6B21\u5141\u8BB8\u6216\u62D2\u7EDD\u3002"
|
|
1411
1411
|
},
|
|
1412
1412
|
content: {
|
|
1413
1413
|
type: "object",
|
|
1414
1414
|
additionalProperties: true,
|
|
1415
|
-
description: '\u4EC5\
|
|
1415
|
+
description: '\u4EC5 form \u8BF7\u6C42\u4E14 action="accept" \u65F6\u53EF\u7528\uFF1A\u6309 pendingRequests[].schema.properties \u586B\u5199\u56DE\u7B54\u5BF9\u8C61\uFF08\u503C\u4E3A\u5B57\u7B26\u4E32\u3001\u6570\u5B57\u3001\u5E03\u5C14\u503C\u6216\u5B57\u7B26\u4E32\u6570\u7EC4\uFF09\u3002'
|
|
1416
1416
|
},
|
|
1417
1417
|
waitMs: {
|
|
1418
1418
|
type: "integer",
|
|
1419
1419
|
minimum: 0,
|
|
1420
1420
|
maximum: maxWaitMs,
|
|
1421
|
-
description: `\u63D0\u4EA4\
|
|
1421
|
+
description: `\u63D0\u4EA4\u540E\u6700\u591A\u7B49\u5F85\u6BEB\u79D2\u6570\uFF08\u9ED8\u8BA4 ${defaultWaitMs}\uFF09\uFF1B0 \u8868\u793A\u7ACB\u5373\u8FD4\u56DE\u3002`
|
|
1422
1422
|
},
|
|
1423
1423
|
workspace
|
|
1424
1424
|
}
|
|
@@ -1426,7 +1426,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1426
1426
|
},
|
|
1427
1427
|
{
|
|
1428
1428
|
name: "worker_output",
|
|
1429
|
-
description: "\u83B7\u53D6\u6216\u7B49\u5F85\u5916\u90E8\u52A9\u624B\u7684\u6700\u65B0\
|
|
1429
|
+
description: "\u83B7\u53D6\u6216\u7B49\u5F85\u5916\u90E8\u52A9\u624B\u7684\u6700\u65B0\u7ED3\u679C\uFF0C\u7528\u4E8E\u6536\u53D6\u540E\u53F0\u4EA7\u51FA\u3001timedOut \u540E\u7EE7\u7EED\u7B49\u5F85\uFF0C\u6216\u6309 nextOffset \u5206\u9875\u7EED\u8BFB\u3002\u4EFB\u52A1\u5DF2\u7ED3\u675F\u65F6\u7ACB\u5373\u8FD4\u56DE\uFF0C\u8FD0\u884C\u4E2D\u6700\u591A\u7B49\u5F85 waitMs\u3002",
|
|
1430
1430
|
annotations: {
|
|
1431
1431
|
title: "Get Worker Output",
|
|
1432
1432
|
readOnlyHint: true,
|
|
@@ -1441,18 +1441,18 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1441
1441
|
properties: {
|
|
1442
1442
|
workerId: {
|
|
1443
1443
|
type: "string",
|
|
1444
|
-
description: "\
|
|
1444
|
+
description: "\u52A9\u624B\u4F1A\u8BDD ID\u3002"
|
|
1445
1445
|
},
|
|
1446
1446
|
offset: {
|
|
1447
1447
|
type: "integer",
|
|
1448
1448
|
minimum: 0,
|
|
1449
|
-
description: "\
|
|
1449
|
+
description: "\u8BFB\u53D6\u8D77\u59CB\u4F4D\u7F6E\uFF08\u9ED8\u8BA4 0\uFF09\uFF1B\u7FFB\u9875\u7EED\u8BFB\u65F6\u4F20\u4E0A\u6B21\u8FD4\u56DE\u7684 nextOffset\u3002"
|
|
1450
1450
|
},
|
|
1451
1451
|
waitMs: {
|
|
1452
1452
|
type: "integer",
|
|
1453
1453
|
minimum: 0,
|
|
1454
1454
|
maximum: maxWaitMs,
|
|
1455
|
-
description: `\
|
|
1455
|
+
description: `\u8FD0\u884C\u4E2D\u6700\u591A\u7B49\u5F85\u6BEB\u79D2\u6570\uFF08\u9ED8\u8BA4 ${defaultWaitMs}\uFF09\uFF1B\u5DF2\u7ED3\u675F\u6216\u7FFB\u9875\u65F6\u7ACB\u5373\u8FD4\u56DE\u3002`
|
|
1456
1456
|
},
|
|
1457
1457
|
workspace
|
|
1458
1458
|
}
|
|
@@ -1460,7 +1460,7 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1460
1460
|
},
|
|
1461
1461
|
{
|
|
1462
1462
|
name: "worker_discover",
|
|
1463
|
-
description:
|
|
1463
|
+
description: "\u67E5\u8BE2\u53EF\u7528\u5916\u90E8\u52A9\u624B\u3001\u5DF2\u6709\u4F1A\u8BDD\u72B6\u6001\uFF0C\u6216\u67D0\u4E2A\u52A9\u624B\u652F\u6301\u7684\u6A21\u578B\u4E0E\u601D\u8003\u6DF1\u5EA6\u3002\u9ED8\u8BA4\uFF08overview\uFF09\u8FD4\u56DE\u53EF\u7528\u52A9\u624B\u4E0E\u5DF2\u6709\u4F1A\u8BDD\uFF1B\u4EC5\u9700\u6838\u5BF9\u6A21\u578B\u6216\u601D\u8003\u6DF1\u5EA6\u53EF\u9009\u503C\u65F6\u518D\u67E5 models\uFF08\u9700\u542F\u52A8\u63A2\u6D4B\uFF0C\u8017\u65F6\u8F83\u957F\uFF09\u3002",
|
|
1464
1464
|
annotations: {
|
|
1465
1465
|
title: "Discover Workers, Backends & Models",
|
|
1466
1466
|
readOnlyHint: true,
|
|
@@ -1476,19 +1476,19 @@ function buildPbotWorkerTools(commands = {}, defaultBackend, workspaceBound = fa
|
|
|
1476
1476
|
target: {
|
|
1477
1477
|
type: "string",
|
|
1478
1478
|
enum: [...discoverTargets],
|
|
1479
|
-
description:
|
|
1479
|
+
description: "overview\uFF08\u9ED8\u8BA4\uFF0C\u53EF\u7528\u52A9\u624B\u4E0E\u5DF2\u6709\u4F1A\u8BDD\uFF09\u3001workers\uFF08\u5168\u90E8\u6216\u5355\u4E2A\u4F1A\u8BDD\u72B6\u6001\uFF09\u3001backends\uFF08\u53EF\u7528\u52A9\u624B\uFF09\u3001models\uFF08\u6307\u5B9A\u52A9\u624B\u7684\u6A21\u578B\u4E0E\u601D\u8003\u6DF1\u5EA6\uFF09\u3002"
|
|
1480
1480
|
},
|
|
1481
1481
|
workerId: {
|
|
1482
1482
|
type: "string",
|
|
1483
|
-
description: '\u4EC5 target="workers" \u53EF\u7528\uFF1A\u6307\u5B9A\u5355\u4E2A\
|
|
1483
|
+
description: '\u4EC5 target="workers" \u53EF\u7528\uFF1A\u6307\u5B9A\u5355\u4E2A\u4F1A\u8BDD ID\uFF0C\u7701\u7565\u5217\u5168\u90E8\u3002'
|
|
1484
1484
|
},
|
|
1485
1485
|
backend: {
|
|
1486
1486
|
type: "string",
|
|
1487
|
-
description: availableIds ? `\u4EC5 target="models" \u53EF\u7528\uFF08${modelsBackendHint}\uFF09\uFF1A\u76EE\u6807\
|
|
1487
|
+
description: availableIds ? `\u4EC5 target="models" \u53EF\u7528\uFF08${modelsBackendHint}\uFF09\uFF1A\u76EE\u6807\u52A9\u624B\u6807\u8BC6\uFF0C\u652F\u6301\u522B\u540D\uFF1B\u5F53\u524D\u53EF\u7528\uFF1A${availableIds}\u3002` : `\u4EC5 target="models" \u53EF\u7528\uFF08${modelsBackendHint}\uFF09\uFF1A\u76EE\u6807\u52A9\u624B\u6807\u8BC6\uFF0C\u652F\u6301\u522B\u540D\u3002`
|
|
1488
1488
|
},
|
|
1489
1489
|
model: {
|
|
1490
1490
|
type: "string",
|
|
1491
|
-
description: '\u4EC5 target="models" \u53EF\u7528\uFF1A\u6307\u5B9A\u6A21\u578B\u4EE5\u67E5\u770B\
|
|
1491
|
+
description: '\u4EC5 target="models" \u53EF\u7528\uFF1A\u6307\u5B9A\u6A21\u578B\u4EE5\u67E5\u770B\u5176\u652F\u6301\u7684\u601D\u8003\u6DF1\u5EA6\u9009\u9879\u3002'
|
|
1492
1492
|
},
|
|
1493
1493
|
workspace
|
|
1494
1494
|
}
|
|
@@ -1501,7 +1501,7 @@ function buildWorkspaceMcpTools(workspaceBound = false) {
|
|
|
1501
1501
|
return [
|
|
1502
1502
|
{
|
|
1503
1503
|
name: "workspace_mcp_discover",
|
|
1504
|
-
description: "\
|
|
1504
|
+
description: "\u67E5\u8BE2\u5F53\u524D\u5DE5\u4F5C\u533A\u5171\u4EAB MCP \u670D\u52A1\uFF08.pbot/mcp.json\uFF09\u3002\u7701\u7565 server \u5217\u51FA\u670D\u52A1\uFF1B\u4F20\u5165 server \u8FD4\u56DE\u5176\u5DE5\u5177\u5217\u8868\u4E0E\u53C2\u6570\u8BF4\u660E\u3002",
|
|
1505
1505
|
annotations: {
|
|
1506
1506
|
title: "Discover Workspace MCP Servers & Tools",
|
|
1507
1507
|
readOnlyHint: true,
|
|
@@ -1516,7 +1516,7 @@ function buildWorkspaceMcpTools(workspaceBound = false) {
|
|
|
1516
1516
|
properties: {
|
|
1517
1517
|
server: {
|
|
1518
1518
|
type: "string",
|
|
1519
|
-
description: "\
|
|
1519
|
+
description: "\u670D\u52A1\u540D\u79F0\uFF1B\u7701\u7565\u5217\u51FA\u5DE5\u4F5C\u533A\u5168\u90E8\u5DF2\u914D\u7F6E\u670D\u52A1\u3002"
|
|
1520
1520
|
},
|
|
1521
1521
|
workspace
|
|
1522
1522
|
}
|
|
@@ -1524,7 +1524,7 @@ function buildWorkspaceMcpTools(workspaceBound = false) {
|
|
|
1524
1524
|
},
|
|
1525
1525
|
{
|
|
1526
1526
|
name: "workspace_mcp_call",
|
|
1527
|
-
description: "\u8C03\u7528\
|
|
1527
|
+
description: "\u8C03\u7528\u5DE5\u4F5C\u533A\u5171\u4EAB MCP \u670D\u52A1\u4E2D\u7684\u6307\u5B9A\u5DE5\u5177\u3002\u4E0D\u786E\u5B9A\u5DE5\u5177\u540D\u6216\u53C2\u6570\u65F6\u5148\u7528 workspace_mcp_discover(server) \u67E5\u8BE2\u3002",
|
|
1528
1528
|
annotations: {
|
|
1529
1529
|
title: "Call Workspace MCP Tool",
|
|
1530
1530
|
readOnlyHint: false,
|
|
@@ -1539,16 +1539,16 @@ function buildWorkspaceMcpTools(workspaceBound = false) {
|
|
|
1539
1539
|
properties: {
|
|
1540
1540
|
server: {
|
|
1541
1541
|
type: "string",
|
|
1542
|
-
description: "\
|
|
1542
|
+
description: "\u670D\u52A1\u540D\u79F0\uFF08\u6765\u81EA workspace_mcp_discover\uFF09\u3002"
|
|
1543
1543
|
},
|
|
1544
1544
|
tool: {
|
|
1545
1545
|
type: "string",
|
|
1546
|
-
description: "\
|
|
1546
|
+
description: "\u5DE5\u5177\u540D\u79F0\u3002"
|
|
1547
1547
|
},
|
|
1548
1548
|
arguments: {
|
|
1549
1549
|
type: "object",
|
|
1550
1550
|
additionalProperties: true,
|
|
1551
|
-
description: "\u4F20\u7ED9\u76EE\u6807\u5DE5\u5177\u7684\u53C2\u6570\u5BF9\u8C61\uFF0C\
|
|
1551
|
+
description: "\u4F20\u7ED9\u76EE\u6807\u5DE5\u5177\u7684\u53C2\u6570\u5BF9\u8C61\uFF0C\u9ED8\u8BA4\u7A7A\u5BF9\u8C61\u3002"
|
|
1552
1552
|
},
|
|
1553
1553
|
workspace
|
|
1554
1554
|
}
|
|
@@ -1561,7 +1561,7 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1561
1561
|
return [
|
|
1562
1562
|
{
|
|
1563
1563
|
name: "history_search",
|
|
1564
|
-
description: "\u641C\u7D22\u5F53\u524D\u5DE5\u4F5C\u533A\u8DE8\u5BBF\u4E3B\
|
|
1564
|
+
description: "\u641C\u7D22\u5F53\u524D\u5DE5\u4F5C\u533A\u8DE8\u5BBF\u4E3B\u5386\u53F2\u95EE\u7B54\u4E0E\u6458\u8981\u5F52\u6863\uFF08\u4E0D\u542B\u5DE5\u5177\u8C03\u7528\u65E5\u5FD7\uFF09\u3002\u7701\u7565 query \u5217\u51FA\u5404\u4F1A\u8BDD\u6216\u6307\u5B9A\u7EF4\u5EA6\u6458\u8981\uFF1B\u4F20\u5165 query \u6309\u4E0D\u533A\u5206\u5927\u5C0F\u5199\u7684\u8FDE\u7EED\u5173\u952E\u8BCD\u5339\u914D\u3002",
|
|
1565
1565
|
annotations: {
|
|
1566
1566
|
title: "Search Workspace History",
|
|
1567
1567
|
readOnlyHint: true,
|
|
@@ -1576,15 +1576,15 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1576
1576
|
properties: {
|
|
1577
1577
|
host: {
|
|
1578
1578
|
type: "string",
|
|
1579
|
-
description: "\
|
|
1579
|
+
description: "\u6765\u6E90\u5BBF\u4E3B\u7B5B\u9009\uFF08\u5982 pi\u3001dsh\u3001claude\u3001antigravity\u3001codex\u3001qoder\uFF09\uFF1B\u7701\u7565\u67E5\u5168\u90E8\u3002"
|
|
1580
1580
|
},
|
|
1581
1581
|
dimension: {
|
|
1582
1582
|
type: "string",
|
|
1583
|
-
description: "\
|
|
1583
|
+
description: "\u8303\u56F4\u7B5B\u9009\uFF1Araw \u4EC5\u539F\u6587\uFF0C\u6216\u6307\u5B9A\u6458\u8981\u7EF4\u5EA6\uFF08\u5982 monthly\u3001session\uFF09\uFF1B\u7701\u7565\u67E5\u5168\u90E8\u3002"
|
|
1584
1584
|
},
|
|
1585
1585
|
query: {
|
|
1586
1586
|
type: "string",
|
|
1587
|
-
description: "\u4E0D\u533A\u5206\u5927\u5C0F\u5199\
|
|
1587
|
+
description: "\u8FDE\u7EED\u5173\u952E\u8BCD\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09\uFF1B\u7701\u7565\u5217\u4F1A\u8BDD\u6216\u6307\u5B9A\u7EF4\u5EA6\u6458\u8981\u3002"
|
|
1588
1588
|
},
|
|
1589
1589
|
sessionId: {
|
|
1590
1590
|
type: "string",
|
|
@@ -1601,13 +1601,13 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1601
1601
|
offset: {
|
|
1602
1602
|
type: "integer",
|
|
1603
1603
|
minimum: 0,
|
|
1604
|
-
description: "\
|
|
1604
|
+
description: "\u7ED3\u679C\u504F\u79FB\uFF0C\u9ED8\u8BA4 0\u3002"
|
|
1605
1605
|
},
|
|
1606
1606
|
limit: {
|
|
1607
1607
|
type: "integer",
|
|
1608
1608
|
minimum: 1,
|
|
1609
1609
|
maximum: historyPageLimits.search.max,
|
|
1610
|
-
description: `\
|
|
1610
|
+
description: `\u8FD4\u56DE\u6761\u6570\uFF081\u2013${historyPageLimits.search.max}\uFF09\uFF0C\u9ED8\u8BA4 ${historyPageLimits.search.default}\u3002`
|
|
1611
1611
|
},
|
|
1612
1612
|
workspace
|
|
1613
1613
|
}
|
|
@@ -1615,7 +1615,7 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1615
1615
|
},
|
|
1616
1616
|
{
|
|
1617
1617
|
name: "history_read",
|
|
1618
|
-
description: "\u6309\u8282\u70B9 id \u8BFB\u53D6\
|
|
1618
|
+
description: "\u6309\u8282\u70B9 id \u8BFB\u53D6\u5386\u53F2\u6B63\u6587\u4E0E\u4E0A\u4E0B\u7EA7\uFF08\u53EF\u4ECE monthly \u6C47\u603B\u4E0B\u94BB\u81F3 session \u6458\u8981\u548C exchange \u539F\u6587\uFF09\u3002\u6B63\u6587\u5206\u9875\u4F20 nextOffset\uFF0C\u5B50\u8282\u70B9\u5206\u9875\u4F20 nextChildrenOffset\u3002",
|
|
1619
1619
|
annotations: {
|
|
1620
1620
|
title: "Read Workspace History Node",
|
|
1621
1621
|
readOnlyHint: true,
|
|
@@ -1630,16 +1630,16 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1630
1630
|
properties: {
|
|
1631
1631
|
id: {
|
|
1632
1632
|
type: "string",
|
|
1633
|
-
description: "history_search \u6216\u4E0A\u4E0B\u7EA7\
|
|
1633
|
+
description: "\u8282\u70B9 id\uFF08\u6765\u81EA history_search \u6216\u4E0A\u4E0B\u7EA7\uFF09\u3002"
|
|
1634
1634
|
},
|
|
1635
1635
|
host: {
|
|
1636
1636
|
type: "string",
|
|
1637
|
-
description: "\u8DE8\
|
|
1637
|
+
description: "\u8DE8\u5BBF\u4E3B id \u51B2\u7A81\u65F6\u6307\u5B9A\u6765\u6E90\u5BBF\u4E3B\u3002"
|
|
1638
1638
|
},
|
|
1639
1639
|
offset: {
|
|
1640
1640
|
type: "integer",
|
|
1641
1641
|
minimum: 0,
|
|
1642
|
-
description: "\u6B63\u6587\u5B57\u7B26\u504F\u79FB\uFF0C\u9ED8\u8BA4 0\u3002"
|
|
1642
|
+
description: "\u6B63\u6587\u5B57\u7B26\u504F\u79FB\uFF0C\u9ED8\u8BA4 0\uFF1B\u7EED\u8BFB\u4F20\u4E0A\u6B21 nextOffset\u3002"
|
|
1643
1643
|
},
|
|
1644
1644
|
limit: {
|
|
1645
1645
|
type: "integer",
|
|
@@ -1650,7 +1650,7 @@ function buildHistoryMcpTools(workspaceBound = false) {
|
|
|
1650
1650
|
childrenOffset: {
|
|
1651
1651
|
type: "integer",
|
|
1652
1652
|
minimum: 0,
|
|
1653
|
-
description: "\u5B50\u8282\u70B9\
|
|
1653
|
+
description: "\u5B50\u8282\u70B9\u504F\u79FB\uFF0C\u9ED8\u8BA4 0\uFF1B\u7EED\u8BFB\u4F20\u4E0A\u6B21 nextChildrenOffset\u3002"
|
|
1654
1654
|
},
|
|
1655
1655
|
workspace
|
|
1656
1656
|
}
|
|
@@ -3560,8 +3560,17 @@ var protocolVersion2 = "2025-03-26";
|
|
|
3560
3560
|
var readyTimeoutMs = 45e3;
|
|
3561
3561
|
var reportPageSize = 16e3;
|
|
3562
3562
|
var progressIntervalMs = 5e3;
|
|
3563
|
-
var
|
|
3564
|
-
var
|
|
3563
|
+
var workerCapabilityInstruction = "\u8DE8\u52A9\u624B\u59D4\u6D3E\uFF08worker_*\uFF09\uFF1A\u542F\u52A8\u5E76\u8C03\u5EA6\u5176\u4ED6\u5916\u90E8\u52A9\u624B\u5728\u5F53\u524D\u5DE5\u4F5C\u533A\u72EC\u7ACB\u6267\u884C\u4EFB\u52A1\uFF1B\u65E0\u9700\u5916\u90E8\u52A9\u624B\u65F6\u4F18\u5148\u81EA\u884C\u5B8C\u6210\u6216\u4F7F\u7528\u5185\u7F6E\u5B50\u4EE3\u7406\u3002\u6D41\u7A0B\uFF1Aworker_create \u542F\u52A8\uFF08\u6216 worker_discover \u590D\u7528\uFF09\u2192 worker_request \u6D3E\u53D1/\u8FFD\u95EE \u2192 \u5B8C\u6210\u540E worker_close\uFF1B\u540E\u53F0\u53D6\u7ED3\u679C\u3001\u8D85\u65F6\u7EED\u7B49\uFF08timedOut\uFF09\u6216\u7FFB\u9875\uFF08nextOffset\uFF09\u7528 worker_output\uFF1B\u8FD4\u56DE needsResponse \u65F6\u5148\u5411\u7528\u6237\u786E\u8BA4\uFF0C\u518D\u7528 worker_response \u56DE\u590D\u3002";
|
|
3564
|
+
var workspaceMcpCapabilityInstruction = "\u5DE5\u4F5C\u533A\u5171\u4EAB MCP\uFF08workspace_mcp_*\uFF09\uFF1A\u5148\u7528 workspace_mcp_discover \u67E5 .pbot/mcp.json \u4E2D\u7684\u670D\u52A1\u4E0E\u5DE5\u5177\uFF0C\u518D\u7528 workspace_mcp_call \u8C03\u7528\u3002";
|
|
3565
|
+
var historyCapabilityInstruction = "\u8DE8\u5BBF\u4E3B\u5386\u53F2\uFF08history_search / history_read\uFF09\uFF1A\u53EA\u8BFB\u68C0\u7D22\u5F53\u524D\u5DE5\u4F5C\u533A\u8DE8\u5BBF\u4E3B\u8BB0\u5F55\u7684\u5386\u53F2\u95EE\u7B54\u4E0E\u6458\u8981\u5F52\u6863\u3002";
|
|
3566
|
+
function buildMcpInstructions(options) {
|
|
3567
|
+
const parts = [workerCapabilityInstruction];
|
|
3568
|
+
if (options.workspaceMcp) parts.push(workspaceMcpCapabilityInstruction);
|
|
3569
|
+
if (options.history) parts.push(historyCapabilityInstruction);
|
|
3570
|
+
return parts.length === 1 ? parts[0] : parts.map((text3, index) => `${index + 1}. ${text3}`).join("\n");
|
|
3571
|
+
}
|
|
3572
|
+
var mcpWorkerOnlyInstructions = buildMcpInstructions({ workspaceMcp: false, history: false });
|
|
3573
|
+
var mcpInstructions = buildMcpInstructions({ workspaceMcp: true, history: true });
|
|
3565
3574
|
function defaultWorkerDirectory() {
|
|
3566
3575
|
if (process.env.PBOT_MCP_AGENT_DIR) return process.env.PBOT_MCP_AGENT_DIR;
|
|
3567
3576
|
if (process.env.PLUGIN_DATA) return join13(process.env.PLUGIN_DATA, "subagents");
|
|
@@ -3691,7 +3700,7 @@ var McpWorkerRuntime = class {
|
|
|
3691
3700
|
}
|
|
3692
3701
|
return entry;
|
|
3693
3702
|
}
|
|
3694
|
-
async
|
|
3703
|
+
async resolveToolContext() {
|
|
3695
3704
|
let commands;
|
|
3696
3705
|
let includeWorkspaceMcp = !this.#nativeWorkspaceMcp;
|
|
3697
3706
|
let includeHistory = !this.#nativeHistory;
|
|
@@ -3706,6 +3715,14 @@ var McpWorkerRuntime = class {
|
|
|
3706
3715
|
}
|
|
3707
3716
|
} catch {
|
|
3708
3717
|
}
|
|
3718
|
+
return { commands, includeWorkspaceMcp, includeHistory };
|
|
3719
|
+
}
|
|
3720
|
+
async serverInstructions() {
|
|
3721
|
+
const { includeWorkspaceMcp, includeHistory } = await this.resolveToolContext();
|
|
3722
|
+
return buildMcpInstructions({ workspaceMcp: includeWorkspaceMcp, history: includeHistory });
|
|
3723
|
+
}
|
|
3724
|
+
async toolDefinitions() {
|
|
3725
|
+
const { commands, includeWorkspaceMcp, includeHistory } = await this.resolveToolContext();
|
|
3709
3726
|
const defaultBackend = this.#defaultBackend ? canonicalAcpBackend(this.#defaultBackend, commands) : void 0;
|
|
3710
3727
|
const workspaceBound = Boolean(pluginMcpWorkspaceRoot());
|
|
3711
3728
|
return [
|
|
@@ -3971,7 +3988,7 @@ async function handleMcpRequest(runtime, message2, notify) {
|
|
|
3971
3988
|
protocolVersion: requested || protocolVersion2,
|
|
3972
3989
|
capabilities: { tools: {} },
|
|
3973
3990
|
serverInfo: { name: "personal-bot", version: packageVersion },
|
|
3974
|
-
instructions: runtime.
|
|
3991
|
+
instructions: await runtime.serverInstructions()
|
|
3975
3992
|
}
|
|
3976
3993
|
};
|
|
3977
3994
|
}
|
|
@@ -32,7 +32,7 @@ export function formatWorkspaceSkills(skills) {
|
|
|
32
32
|
if (!skills.length)
|
|
33
33
|
return "";
|
|
34
34
|
const lines = skills.map(skill => `- **${skill.name}**(\`${skill.path}\`):${skill.description}`);
|
|
35
|
-
return "##
|
|
35
|
+
return "## 可用技能\n\n任务匹配时按需读取对应 `SKILL.md` 正文:\n" + lines.join("\n");
|
|
36
36
|
}
|
|
37
37
|
export async function loadWorkspaceContext(options) {
|
|
38
38
|
const { host, root, role, coordinatorPrompt, includePrompts = true, includeRootAgents = false, localRoleOnly = false, workspaceSkills = [], notices = [], } = options;
|
|
@@ -45,7 +45,7 @@ export async function loadWorkspaceContext(options) {
|
|
|
45
45
|
: ["", "", ""];
|
|
46
46
|
const skillsSection = formatWorkspaceSkills(workspaceSkills);
|
|
47
47
|
const noticesSection = notices.length
|
|
48
|
-
? "## 启动提示\n\n" + notices.map(item => `- ${item}`).join("\n")
|
|
48
|
+
? "## 启动提示\n\n以下为工作区维护提醒,适时顺带告知用户即可,勿未经用户要求自行执行:\n" + notices.map(item => `- ${item}`).join("\n")
|
|
49
49
|
: "";
|
|
50
50
|
const environment = { host, workspaceRoot: root, resourceRoot };
|
|
51
51
|
const text = [
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
# 协调者
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
委派专家时写明目标、相关资料、约束和交付要求;涉及文件修改时明确修改范围,多人并行写入时划分文件责任。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
由你汇总专家结果、整合正式资料并处理口径差异。需要独立复核时,另开专家会话并提供待查内容与具体问题。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
需要独立复核时,另开专家会话,提供待检查内容、相关资料和具体问题。
|
|
10
|
-
|
|
11
|
-
失败或中断后说明已完成部分、剩余工作和阻碍。需要用户决定的事项由你汇总说明。
|
|
7
|
+
失败或中断后说明已完成部分、剩余工作与阻碍;需要用户决定的事项由你汇总提出。
|