personal-bot 0.3.5 → 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/README.md +191 -65
- package/README.zh-CN.md +189 -63
- package/docs/README.md +2 -2
- package/docs/architecture/design.md +3 -4
- package/docs/architecture/model-context.md +1 -2
- package/docs/guides/capabilities.md +4 -8
- package/docs/hosts/antigravity.md +4 -2
- package/docs/hosts/pi.md +4 -15
- package/docs/maintainers/release.md +2 -2
- package/lib/antigravity-plugin/lib/extension/acp-worker.js +2 -2
- package/lib/antigravity-plugin/lib/extension/cli.js +1403 -1504
- 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 +1403 -1504
- 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/cli/commands/install.ts +77 -0
- package/src/extension/cli/index.ts +3 -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/integrations/installation/installers/antigravity.ts +49 -0
- package/src/integrations/installation/installers/claude.ts +30 -0
- package/src/integrations/installation/installers/codex.ts +56 -0
- package/src/integrations/installation/installers/dsh.ts +25 -0
- package/src/integrations/installation/installers/pi.ts +26 -0
- package/src/integrations/installation/installers/qoder.ts +49 -0
- package/src/integrations/installation/installers/registry.ts +48 -0
- package/src/integrations/installation/processes.ts +2 -41
- package/src/model/installation.ts +28 -36
- package/src/pbot.ts +1 -1
- package/src/services/installation/install-service.ts +107 -0
- 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/lib/common/package-source.js +0 -16
- package/lib/extension/setup/guard.js +0 -11
- package/lib/integrations/installation/pi-bridge.js +0 -131
- package/lib/model/installation.js +0 -1
- package/resources/installer/plugins.json +0 -16
- package/resources/references/compute-finance.md +0 -22
- package/resources/references/compute.md +0 -16
- package/resources/references/task-conductor.md +0 -25
- package/src/extension/cli/commands/setup.ts +0 -159
- package/src/extension/setup/guard.ts +0 -12
- package/src/integrations/installation/pi-bridge.ts +0 -109
- package/src/integrations/installation/pi-setup.ts +0 -165
- package/src/services/installation/setup-service.ts +0 -91
- package/src/ui/setup.ts +0 -40
package/lib/extension/mcp.js
CHANGED
|
@@ -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 = [
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"command": "sh",
|
|
5
5
|
"args": [
|
|
6
6
|
"-c",
|
|
7
|
-
"if pbot --at-least 0.3.3 </dev/null >/dev/null 2>&1; then exec pbot \"$@\"; fi\nexec npx --yes --ignore-scripts --prefer-offline personal-bot@0.3.
|
|
7
|
+
"if pbot --at-least 0.3.3 </dev/null >/dev/null 2>&1; then exec pbot \"$@\"; fi\nexec npx --yes --ignore-scripts --prefer-offline personal-bot@0.3.7 \"$@\"",
|
|
8
8
|
"pbot",
|
|
9
9
|
"mcp"
|
|
10
10
|
],
|
|
11
11
|
"env": {
|
|
12
12
|
"PBOT_HOST": "qoder",
|
|
13
|
-
"PBOT_PLUGIN_VERSION": "0.3.
|
|
13
|
+
"PBOT_PLUGIN_VERSION": "0.3.7"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"hooks": [
|
|
6
6
|
{
|
|
7
7
|
"type": "command",
|
|
8
|
-
"command": "PBOT_PLUGIN_VERSION=0.3.
|
|
8
|
+
"command": "PBOT_PLUGIN_VERSION=0.3.7 PBOT_PLUGIN_MANIFEST=\"${QODER_PLUGIN_ROOT:+$QODER_PLUGIN_ROOT/.qoder-plugin/plugin.json}\" sh -c 'if pbot --at-least 0.3.3 </dev/null >/dev/null 2>&1; then exec pbot \"$@\"; fi\nexec npx --yes --ignore-scripts --prefer-offline personal-bot@0.3.7 \"$@\"' pbot plugin qoder hook",
|
|
9
9
|
"timeout": 120
|
|
10
10
|
}
|
|
11
11
|
]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"hooks": [
|
|
17
17
|
{
|
|
18
18
|
"type": "command",
|
|
19
|
-
"command": "PBOT_PLUGIN_VERSION=0.3.
|
|
19
|
+
"command": "PBOT_PLUGIN_VERSION=0.3.7 PBOT_PLUGIN_MANIFEST=\"${QODER_PLUGIN_ROOT:+$QODER_PLUGIN_ROOT/.qoder-plugin/plugin.json}\" sh -c 'if pbot --at-least 0.3.3 </dev/null >/dev/null 2>&1; then exec pbot \"$@\"; fi\nexec npx --yes --ignore-scripts --prefer-offline personal-bot@0.3.7 \"$@\"' pbot plugin qoder hook",
|
|
20
20
|
"timeout": 120
|
|
21
21
|
}
|
|
22
22
|
]
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"hooks": [
|
|
28
28
|
{
|
|
29
29
|
"type": "command",
|
|
30
|
-
"command": "PBOT_PLUGIN_VERSION=0.3.
|
|
30
|
+
"command": "PBOT_PLUGIN_VERSION=0.3.7 PBOT_PLUGIN_MANIFEST=\"${QODER_PLUGIN_ROOT:+$QODER_PLUGIN_ROOT/.qoder-plugin/plugin.json}\" sh -c 'if pbot --at-least 0.3.3 </dev/null >/dev/null 2>&1; then exec pbot \"$@\"; fi\nexec npx --yes --ignore-scripts --prefer-offline personal-bot@0.3.7 \"$@\"' pbot plugin qoder hook",
|
|
31
31
|
"timeout": 120
|
|
32
32
|
}
|
|
33
33
|
]
|
|
@@ -4,6 +4,6 @@ description: 初始化 Personal Bot 工作区、查看状态、搜索归档或
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`--workspace` 传入当前会话的 `workspaceRoot`(工作区未启用时使用当前工作区根目录)。省略子命令时使用 `status`。可执行 `init`、`status`、`history status|list|summary|migrate|search|read`,保留用户指定的维度、模型和筛选参数。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
若 `pbot --at-least 0.3.7` 返回 0,运行 `pbot <子命令> --workspace "<workspaceRoot>"`;否则运行 `npx --yes personal-bot@0.3.7 <子命令> --workspace "<workspaceRoot>"`。返回实际结果。
|
|
@@ -46,23 +46,23 @@ export const historyResultSchema = Type.Object({
|
|
|
46
46
|
})),
|
|
47
47
|
warnings: Type.Array(Type.String()),
|
|
48
48
|
});
|
|
49
|
-
export const historyDescription = "
|
|
50
|
-
"search
|
|
51
|
-
"read
|
|
49
|
+
export const historyDescription = "查询当前工作区跨宿主历史问答与摘要归档。" +
|
|
50
|
+
"search 按不区分大小写的连续关键词匹配原文与摘要,省略 query 列出各会话或指定维度摘要;" +
|
|
51
|
+
"read 按 id 读取正文与上下级(可从 monthly 汇总下钻至 session 摘要和 exchange 原文),用 nextOffset 与 nextChildrenOffset 分页续读。";
|
|
52
52
|
export const historyParameters = Type.Object({
|
|
53
53
|
action: Type.Union([Type.Literal("search"), Type.Literal("read")], {
|
|
54
|
-
description: "search
|
|
54
|
+
description: "search 搜索或列表;read 按 id 读取正文与上下级。仅读取对应动作参数,其余忽略。",
|
|
55
55
|
}),
|
|
56
|
-
host: nullable(Type.String({ pattern: historyIdentifierPattern.source, description: "
|
|
57
|
-
dimension: nullable(Type.String({ pattern: historyIdentifierPattern.source, description: "仅 search
|
|
58
|
-
query: nullable(Type.String({ description: "仅 search
|
|
59
|
-
sessionId: nullable(Type.String({ description: "仅 search
|
|
56
|
+
host: nullable(Type.String({ pattern: historyIdentifierPattern.source, description: "来源宿主筛选(如 pi、dsh、claude、antigravity、codex、qoder);省略查全部。" })),
|
|
57
|
+
dimension: nullable(Type.String({ pattern: historyIdentifierPattern.source, description: "仅 search:raw 仅原文,或指定摘要维度(如 monthly、session);省略查全部。" })),
|
|
58
|
+
query: nullable(Type.String({ description: "仅 search:连续关键词(不区分大小写);省略列会话或指定维度摘要。" })),
|
|
59
|
+
sessionId: nullable(Type.String({ description: "仅 search:限定在指定原始会话 ID 内搜索。" })),
|
|
60
60
|
from: nullable(Type.String({ description: "仅 search:ISO 日期或时间下界。" })),
|
|
61
61
|
to: nullable(Type.String({ description: "仅 search:ISO 日期或时间上界。" })),
|
|
62
|
-
id: nullable(Type.String({ description: "仅 read
|
|
63
|
-
offset: nullable(Type.Integer({ minimum: 0, description: "search
|
|
64
|
-
limit: nullable(Type.Integer({ minimum: 1, maximum: historyPageLimits.read.max, description: `search
|
|
65
|
-
childrenOffset: nullable(Type.Integer({ minimum: 0, description: "仅 read
|
|
62
|
+
id: nullable(Type.String({ description: "仅 read,必填:节点 id(来自 search 或上下级)。" })),
|
|
63
|
+
offset: nullable(Type.Integer({ minimum: 0, description: "search 为结果偏移,read 为正文字符偏移;默认 0。" })),
|
|
64
|
+
limit: nullable(Type.Integer({ minimum: 1, maximum: historyPageLimits.read.max, description: `search:返回条数(1–${historyPageLimits.search.max},默认 ${historyPageLimits.search.default});read:正文字符数(默认 ${historyPageLimits.read.default})。` })),
|
|
65
|
+
childrenOffset: nullable(Type.Integer({ minimum: 0, description: "仅 read:子节点偏移,默认 0;续读传上次 nextChildrenOffset。" })),
|
|
66
66
|
}, { additionalProperties: false });
|
|
67
67
|
const valid = schema(historyParameters);
|
|
68
68
|
export function historyInput(value) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
# 协调者
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
委派专家时写明目标、相关资料、约束和交付要求;涉及文件修改时明确修改范围,多人并行写入时划分文件责任。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
由你汇总专家结果、整合正式资料并处理口径差异。需要独立复核时,另开专家会话并提供待查内容与具体问题。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
需要独立复核时,另开专家会话,提供待检查内容、相关资料和具体问题。
|
|
10
|
-
|
|
11
|
-
失败或中断后说明已完成部分、剩余工作和阻碍。需要用户决定的事项由你汇总说明。
|
|
7
|
+
失败或中断后说明已完成部分、剩余工作与阻碍;需要用户决定的事项由你汇总提出。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 通用专家
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
完成本次委派,使用相关资料和技能,交回结果、问题说明及产物路径;独立复核时自行核查并指出问题与不确定之处。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
默认交回报告,由主会话整合正式资料;委派包含文件修改时直接修改并说明变更。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
可自主排查工具和环境问题;受阻且需要主会话或用户协助时,交回已有结果与具体阻碍。不递归委派其他助手;需要额外协作者时向主会话建议。
|
|
@@ -6,21 +6,29 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# Personal Bot 工作区
|
|
8
8
|
|
|
9
|
-
从当前 Antigravity 工作区根目录,通过 `run_command` 执行对应命令。`<plugin-root>` 为本 `SKILL.md`
|
|
9
|
+
从当前 Antigravity 工作区根目录,通过 `run_command` 执行对应命令。`<plugin-root>` 为本 `SKILL.md` 路径向上两级目录(去掉尾部 `/skills/pbot/SKILL.md`)。
|
|
10
|
+
|
|
11
|
+
## 初始化与状态
|
|
10
12
|
|
|
11
13
|
```sh
|
|
12
14
|
node "<plugin-root>/lib/plugin.js" antigravity init
|
|
13
15
|
node "<plugin-root>/lib/plugin.js" antigravity status
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
`init` 补建资料目录与根 `AGENTS.md` 并启用工作区,`status` 查看工作区及配置状态;省略参数时执行 `status`。
|
|
19
|
+
|
|
20
|
+
## 历史管理与检索
|
|
21
|
+
|
|
22
|
+
`--workspace` 传入当前会话的 `workspaceRoot`(工作区未启用时使用当前工作区根目录)。支持 `history status|list|summary|migrate|search|read`,保留用户指定参数(迁移预览加 `--dry-run`):
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
```sh
|
|
25
|
+
pbot history summary --workspace "<workspaceRoot>"
|
|
26
|
+
```
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
未安装全局 `pbot` 或版本不匹配时,直接运行随插件打包的 CLI:
|
|
21
29
|
|
|
22
30
|
```sh
|
|
23
|
-
node "<plugin-root>/lib/extension/
|
|
31
|
+
node "<plugin-root>/lib/extension/cli.js" history summary --workspace "<workspaceRoot>"
|
|
24
32
|
```
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
返回命令的实际结果和需要处理的错误。
|