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
|
@@ -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
|
+
返回命令的实际结果和需要处理的错误。
|
|
@@ -15,7 +15,7 @@ description: 接入或修复工作区共享 MCP 与原生 CLI/MCP,核对认证
|
|
|
15
15
|
|
|
16
16
|
接入新 MCP 前先判断归属;边界不明确或用户未说明作用域时,写入前先向用户确认放工作区共享还是当前宿主原生:
|
|
17
17
|
|
|
18
|
-
- **工作区共享 MCP(`.pbot/mcp.json`)**:归属当前工作区业务、需要跨宿主(Pi、dsh、Claude Code、Antigravity、Codex 及 ACP worker)共用,使用 stdio 或 Streamable HTTP + 环境变量/本地凭据,纯 `tools/list` + `tools/call` 请求-响应且可并发连接的服务。
|
|
18
|
+
- **工作区共享 MCP(`.pbot/mcp.json`)**:归属当前工作区业务、需要跨宿主(Pi、dsh、Claude Code、Antigravity、Codex、Qoder CLI 及 ACP worker)共用,使用 stdio 或 Streamable HTTP + 环境变量/本地凭据,纯 `tools/list` + `tools/call` 请求-响应且可并发连接的服务。
|
|
19
19
|
- **宿主原生 MCP(全局或项目级)**:满足以下任一条件时走当前宿主原生入口,不写入 `.pbot/mcp.json`:
|
|
20
20
|
1. 跨项目通用的本机全局基础设施或开发工具(如浏览器调试、全局调度);
|
|
21
21
|
2. 依赖宿主浏览器交互式 OAuth 登录;
|
|
@@ -27,14 +27,14 @@ description: 接入或修复工作区共享 MCP 与原生 CLI/MCP,核对认证
|
|
|
27
27
|
|
|
28
28
|
不保存明文凭据,使用 `${ENV_VAR}` 引用,保留无关项,不能使用保留名 `pbot`:
|
|
29
29
|
|
|
30
|
-
- **查看**:`pbot mcp list --workspace <workspaceRoot
|
|
31
|
-
- **新增 / 更新 stdio**:`pbot mcp add <name> --workspace <workspaceRoot> [--env K
|
|
32
|
-
- **新增 / 更新 HTTP**:`pbot mcp add <name> --workspace <workspaceRoot> --url https://... [--header Authorization=
|
|
33
|
-
- **删除**:`pbot mcp remove <name> --workspace <workspaceRoot
|
|
30
|
+
- **查看**:`pbot mcp list --workspace "<workspaceRoot>"`(若当前环境提供 `workspace_mcp_discover` 也可直接查询)
|
|
31
|
+
- **新增 / 更新 stdio**:`pbot mcp add <name> --workspace "<workspaceRoot>" [--env 'K=${VAR}'] [--cwd .] [--description "..."] -- <command> [args...]`
|
|
32
|
+
- **新增 / 更新 HTTP**:`pbot mcp add <name> --workspace "<workspaceRoot>" --url https://... [--header 'Authorization=Bearer ${TOKEN}'] [--description "..."]`
|
|
33
|
+
- **删除**:`pbot mcp remove <name> --workspace "<workspaceRoot>"`
|
|
34
34
|
|
|
35
35
|
生效方式(原生挂载与桥接二选一,不重复暴露):
|
|
36
36
|
- Pi 执行 `/reload`、dsh 重启会话后由宿主直接原生挂载(不暴露 `workspace_mcp_*`);
|
|
37
|
-
-
|
|
37
|
+
- 通过 `workspace_mcp_discover` / `workspace_mcp_call` 桥接的宿主即改即生效,无需重启;
|
|
38
38
|
- ACP worker 在下次新建或恢复会话时自动加载最新 `.pbot/mcp.json`。
|
|
39
39
|
|
|
40
40
|
## 宿主原生 MCP
|
|
@@ -43,6 +43,7 @@ description: 接入或修复工作区共享 MCP 与原生 CLI/MCP,核对认证
|
|
|
43
43
|
- **`host = dsh`**:通过原生界面或 profile 配置管理(注意同一 profile 可能被多工作区共用)。
|
|
44
44
|
- **`host = claude`**:`claude mcp add --scope project --transport http <server> <url>`(写入 `.mcp.json`),改完后请用户在会话中用 `/mcp` 核对认证与工具。
|
|
45
45
|
- **`host = antigravity`**:全局使用 `agy mcp add <name> <commandOrUrl> [args...]` / `agy mcp remove <name>`(管理 `~/.gemini/config/mcp_config.json`),通过 `agy mcp list` 或 UI 面板核对。
|
|
46
|
+
- **其他宿主(如 `codex`、`qoder`)**:使用该宿主自身的原生 MCP 命令或配置入口管理。
|
|
46
47
|
|
|
47
48
|
## 验证与手册
|
|
48
49
|
|
|
@@ -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": "codex",
|
|
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=\"${PLUGIN_ROOT:+$PLUGIN_ROOT/.codex-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 codex 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=\"${PLUGIN_ROOT:+$PLUGIN_ROOT/.codex-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 codex 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=\"${PLUGIN_ROOT:+$PLUGIN_ROOT/.codex-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 codex 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>"`。返回实际结果。
|
|
@@ -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,
|