personal-bot 0.2.19 → 0.3.0
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 +3 -3
- package/.claude-plugin/plugin.json +2 -5
- package/.mcp.json +11 -0
- package/CONTEXT.md +17 -73
- package/README.md +41 -120
- package/README.zh-CN.md +41 -120
- package/docs/README.md +31 -23
- package/docs/architecture/design.md +74 -0
- package/docs/architecture/extensibility.md +78 -0
- package/docs/architecture/model-context.md +31 -0
- package/docs/architecture/model-instruction-guidelines.md +34 -0
- package/docs/architecture/principles.md +33 -0
- package/docs/guides/capabilities.md +36 -0
- package/docs/guides/cross-harness-workers.md +83 -0
- package/docs/guides/history.md +25 -0
- package/docs/guides/workspace-configuration.md +102 -0
- package/docs/hosts/antigravity.md +52 -0
- package/docs/hosts/claude-code.md +47 -0
- package/docs/hosts/dsh.md +67 -0
- package/docs/hosts/pi.md +49 -0
- package/docs/maintainers/release.md +59 -0
- package/hooks/hooks.json +0 -3
- package/lib/antigravity-plugin/hooks.json +23 -0
- package/lib/antigravity-plugin/lib/claude.d.ts +1 -0
- package/lib/antigravity-plugin/lib/claude.js +13 -0
- package/lib/antigravity-plugin/lib/common/json.d.ts +6 -0
- package/lib/antigravity-plugin/lib/common/json.js +16 -0
- package/lib/antigravity-plugin/lib/common/paths.d.ts +1 -0
- package/lib/antigravity-plugin/lib/common/paths.js +2 -0
- package/lib/antigravity-plugin/lib/common/validation.d.ts +3 -0
- package/lib/antigravity-plugin/lib/common/validation.js +8 -0
- package/lib/antigravity-plugin/lib/common/version.d.ts +3 -0
- package/lib/antigravity-plugin/lib/common/version.js +13 -0
- package/lib/antigravity-plugin/lib/extension/acp-worker.js +11597 -0
- package/lib/antigravity-plugin/lib/extension/mcp.js +2715 -0
- package/lib/antigravity-plugin/lib/extension/plugin-runtime.d.ts +10 -0
- package/lib/antigravity-plugin/lib/extension/plugin-runtime.js +67 -0
- package/lib/antigravity-plugin/lib/integrations/agent-resources.d.ts +16 -0
- package/lib/antigravity-plugin/lib/integrations/agent-resources.js +56 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/antigravity.d.ts +4 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/antigravity.js +79 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/claude.d.ts +3 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/claude.js +60 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/registry.d.ts +15 -0
- package/lib/antigravity-plugin/lib/integrations/hosts/registry.js +34 -0
- package/lib/antigravity-plugin/lib/model/acp.d.ts +164 -0
- package/lib/antigravity-plugin/lib/model/acp.js +12 -0
- package/lib/antigravity-plugin/lib/model/plugin-host.d.ts +48 -0
- package/lib/antigravity-plugin/lib/model/workspace-config.d.ts +24 -0
- package/lib/antigravity-plugin/lib/model/workspace-config.js +1 -0
- package/lib/antigravity-plugin/lib/model/workspace-mcp.d.ts +51 -0
- package/lib/antigravity-plugin/lib/model/workspace-mcp.js +4 -0
- package/lib/antigravity-plugin/lib/plugin.d.ts +1 -0
- package/lib/antigravity-plugin/lib/plugin.js +17 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-config.d.ts +8 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-config.js +93 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-preparation.d.ts +3 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-preparation.js +26 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-skills.d.ts +8 -0
- package/lib/antigravity-plugin/lib/services/workspace/workspace-skills.js +91 -0
- package/lib/antigravity-plugin/lib/storage/atomic-json.d.ts +11 -0
- package/lib/antigravity-plugin/lib/storage/atomic-json.js +101 -0
- package/lib/antigravity-plugin/mcp_config.json +13 -0
- package/lib/antigravity-plugin/package.json +6 -0
- package/lib/antigravity-plugin/plugin.json +7 -0
- package/lib/antigravity-plugin/resources/agents/coordinator.md +11 -0
- package/{resources/claude → lib/antigravity-plugin/resources}/agents/general-purpose.md +0 -5
- package/lib/antigravity-plugin/resources/prompts/plugin-coordinator.md +1 -0
- package/lib/antigravity-plugin/resources/prompts/workspace.md +31 -0
- package/lib/antigravity-plugin/resources/references/compute-finance.md +22 -0
- package/lib/antigravity-plugin/resources/references/compute.md +16 -0
- package/lib/antigravity-plugin/resources/references/task-conductor.md +25 -0
- package/lib/antigravity-plugin/resources/templates/workspace-agents.md +21 -0
- package/lib/antigravity-plugin/skills/pbot/SKILL.md +16 -0
- package/lib/antigravity-plugin/skills/project-maintenance/SKILL.md +35 -0
- package/lib/antigravity-plugin/skills/provider-connections/SKILL.md +42 -0
- package/lib/claude.js +4 -11
- package/lib/client.js +14 -531
- package/lib/common/markdown.js +2 -3
- package/lib/common/validation.d.ts +2 -0
- package/lib/common/validation.js +4 -0
- package/lib/extension/acp-member.d.ts +2 -0
- package/lib/extension/acp-member.js +9 -8
- package/lib/extension/acp-worker.js +11578 -121
- package/lib/extension/dsh/acp-member.js +26 -2
- package/lib/extension/dsh/command.js +19 -57
- package/lib/extension/dsh/history.js +2 -4
- package/lib/extension/dsh/management.d.ts +0 -2
- package/lib/extension/dsh/management.js +27 -126
- package/lib/extension/dsh/workspace.d.ts +5 -47
- package/lib/extension/dsh/workspace.js +76 -108
- package/lib/extension/mcp-bridge.d.ts +41 -0
- package/lib/extension/mcp-bridge.js +412 -0
- package/lib/extension/mcp-workers.d.ts +980 -0
- package/lib/extension/mcp-workers.js +882 -0
- package/lib/extension/mcp.js +2715 -0
- package/lib/extension/plugin-runtime.d.ts +10 -0
- package/lib/extension/plugin-runtime.js +67 -0
- package/lib/extension/setup-cli.js +215 -2
- package/lib/integrations/acp/agents.d.ts +10 -11
- package/lib/integrations/acp/agents.js +65 -33
- package/lib/integrations/acp/claude.d.ts +2 -2
- package/lib/integrations/acp/claude.js +5 -3
- package/lib/integrations/acp/connection.d.ts +17 -4
- package/lib/integrations/acp/connection.js +53 -27
- package/lib/integrations/acp/executable.d.ts +3 -0
- package/lib/integrations/acp/executable.js +42 -0
- package/lib/integrations/acp/harnesses/claude.d.ts +2 -0
- package/lib/integrations/acp/harnesses/claude.js +49 -0
- package/lib/integrations/acp/harnesses/dsh.d.ts +2 -0
- package/lib/integrations/acp/harnesses/dsh.js +35 -0
- package/lib/integrations/acp/harnesses/generic.d.ts +13 -0
- package/lib/integrations/acp/harnesses/generic.js +37 -0
- package/lib/integrations/acp/harnesses/pi.d.ts +2 -0
- package/lib/integrations/acp/harnesses/pi.js +34 -0
- package/lib/integrations/acp/harnesses/presets.d.ts +3 -0
- package/lib/integrations/acp/harnesses/presets.js +20 -0
- package/lib/integrations/acp/launch.d.ts +33 -4
- package/lib/integrations/acp/launch.js +60 -48
- package/lib/integrations/acp/mcp.d.ts +6 -0
- package/lib/integrations/acp/mcp.js +40 -0
- package/lib/integrations/acp/model-selection.d.ts +9 -2
- package/lib/integrations/acp/model-selection.js +73 -27
- package/lib/integrations/acp/registry.d.ts +18 -0
- package/lib/integrations/acp/registry.js +50 -0
- package/lib/integrations/agent-resources.d.ts +16 -1
- package/lib/integrations/agent-resources.js +45 -9
- package/lib/integrations/dsh/mcp.d.ts +4 -0
- package/lib/integrations/dsh/mcp.js +28 -0
- package/lib/integrations/dsh/resources.d.ts +3 -3
- package/lib/integrations/dsh/resources.js +21 -12
- package/lib/integrations/dsh/skills.d.ts +5 -1
- package/lib/integrations/dsh/skills.js +10 -6
- package/lib/integrations/hosts/antigravity.d.ts +4 -0
- package/lib/integrations/hosts/antigravity.js +79 -0
- package/lib/integrations/hosts/claude.d.ts +3 -0
- package/lib/integrations/hosts/claude.js +60 -0
- package/lib/integrations/hosts/registry.d.ts +15 -0
- package/lib/integrations/hosts/registry.js +34 -0
- package/lib/model/acp.d.ts +107 -2
- package/lib/model/acp.js +12 -1
- package/lib/model/agent.d.ts +35 -33
- package/lib/model/plugin-host.d.ts +48 -0
- package/lib/model/plugin-host.js +1 -0
- package/lib/model/workspace-config.d.ts +12 -0
- package/lib/model/workspace-mcp.d.ts +51 -0
- package/lib/model/workspace-mcp.js +4 -0
- package/lib/plugin.d.ts +1 -0
- package/lib/plugin.js +17 -0
- package/lib/services/agents/acp-run.d.ts +13 -1
- package/lib/services/agents/acp-run.js +30 -2
- package/lib/services/agents/agent-service.d.ts +35 -120
- package/lib/services/agents/agent-service.js +156 -160
- package/lib/services/installation/setup-service.js +17 -1
- package/lib/services/workspace/workspace-config.d.ts +2 -1
- package/lib/services/workspace/workspace-config.js +39 -7
- package/lib/services/workspace/workspace-mcp.d.ts +14 -0
- package/lib/services/workspace/workspace-mcp.js +200 -0
- package/lib/services/workspace/workspace-skills.d.ts +8 -0
- package/lib/services/workspace/workspace-skills.js +91 -0
- package/lib/storage/acp-files.d.ts +3 -1
- package/lib/storage/acp-files.js +32 -2
- package/lib/storage/acp-history.d.ts +3 -2
- package/lib/storage/acp-history.js +19 -7
- package/lib/storage/agent-files.d.ts +8 -8
- package/lib/storage/agent-files.js +27 -47
- package/lib/tools/history/contract.d.ts +1 -1
- package/lib/tools/history/contract.js +17 -11
- package/lib/ui/dsh/index.js +8 -3
- package/lib/ui/dsh/management.d.ts +1 -1
- package/lib/ui/dsh/management.js +24 -456
- package/lib/ui/dsh/remote.d.ts +0 -2
- package/lib/ui/dsh/remote.js +1 -1
- package/package.json +12 -7
- package/resources/agents/coordinator.md +2 -2
- package/resources/antigravity/skills/pbot/SKILL.md +16 -0
- package/resources/claude/skills/pbot/SKILL.md +1 -1
- package/resources/prompts/history-coordinator.md +1 -0
- package/resources/prompts/plugin-coordinator.md +1 -0
- package/resources/prompts/workspace.md +9 -8
- package/resources/references/compute.md +9 -11
- package/resources/references/task-conductor.md +12 -26
- package/resources/skills/project-maintenance/SKILL.md +17 -22
- package/resources/skills/provider-connections/SKILL.md +24 -40
- package/resources/templates/workspace-agents.md +8 -0
- package/scripts/README.md +17 -34
- package/src/claude.ts +4 -8
- package/src/common/markdown.ts +2 -3
- package/src/common/validation.ts +6 -0
- package/src/extension/acp-member.ts +9 -8
- package/src/extension/acp-worker.ts +239 -97
- package/src/extension/command.ts +38 -36
- package/src/extension/dsh/acp-member.ts +21 -2
- package/src/extension/dsh/command.ts +21 -51
- package/src/extension/dsh/files.ts +1 -0
- package/src/extension/dsh/history.ts +9 -6
- package/src/extension/dsh/management.ts +27 -58
- package/src/extension/dsh/workspace.ts +88 -99
- package/src/extension/events.ts +13 -10
- package/src/extension/history.ts +2 -50
- package/src/extension/lifecycle.ts +37 -22
- package/src/extension/mcp-bridge.ts +412 -0
- package/src/extension/mcp-workers.ts +941 -0
- package/src/extension/pi-acp-member.ts +29 -5
- package/src/extension/plugin-runtime.ts +63 -0
- package/src/extension/setup-cli.ts +186 -2
- package/src/integrations/acp/agents.ts +70 -24
- package/src/integrations/acp/claude.ts +11 -4
- package/src/integrations/acp/connection.ts +63 -25
- package/src/integrations/acp/executable.ts +41 -0
- package/src/integrations/acp/harnesses/claude.ts +50 -0
- package/src/integrations/acp/harnesses/dsh.ts +40 -0
- package/src/integrations/acp/harnesses/generic.ts +52 -0
- package/src/integrations/acp/harnesses/pi.ts +35 -0
- package/src/integrations/acp/harnesses/presets.ts +22 -0
- package/src/integrations/acp/launch.ts +69 -47
- package/src/integrations/acp/mcp.ts +43 -0
- package/src/integrations/acp/model-selection.ts +68 -25
- package/src/integrations/acp/registry.ts +60 -0
- package/src/integrations/agent-resources.ts +70 -6
- package/src/integrations/dsh/mcp.ts +30 -0
- package/src/integrations/dsh/resources.ts +28 -13
- package/src/integrations/dsh/skills.ts +16 -6
- package/src/integrations/hosts/antigravity.ts +83 -0
- package/src/integrations/hosts/claude.ts +62 -0
- package/src/integrations/hosts/registry.ts +42 -0
- package/src/integrations/pi/mcp.ts +26 -0
- package/src/mcp.ts +14 -0
- package/src/model/acp.ts +113 -3
- package/src/model/agent.ts +18 -14
- package/src/model/plugin-host.ts +39 -0
- package/src/model/workspace-config.ts +14 -0
- package/src/model/workspace-mcp.ts +64 -0
- package/src/pbot.ts +69 -20
- package/src/plugin.ts +19 -0
- package/src/services/agents/acp-run.ts +35 -3
- package/src/services/agents/agent-service.ts +180 -160
- package/src/services/installation/setup-service.ts +17 -2
- package/src/services/workspace/workspace-config.ts +42 -6
- package/src/services/workspace/workspace-mcp.ts +242 -0
- package/src/services/workspace/workspace-skills.ts +78 -0
- package/src/storage/acp-files.ts +32 -3
- package/src/storage/acp-history.ts +18 -7
- package/src/storage/agent-files.ts +27 -41
- package/src/tools/history/contract.ts +17 -11
- package/src/tools/register.ts +4 -8
- package/src/ui/dsh/index.ts +8 -3
- package/src/ui/dsh/management.ts +40 -282
- package/src/ui/dsh/remote.ts +2 -2
- package/docs/adr/0001-claude-skill-discovery.md +0 -3
- package/docs/adr/0002-claude-native-collaboration.md +0 -3
- package/docs/agent-collaboration.md +0 -190
- package/docs/architecture-guidelines.md +0 -37
- package/docs/capability-design.md +0 -55
- package/docs/claude-code-design.md +0 -44
- package/docs/claude-code.md +0 -57
- package/docs/dsh.md +0 -337
- package/docs/file-storage.md +0 -97
- package/docs/history.md +0 -54
- package/docs/installation-design.md +0 -86
- package/docs/interaction-design.md +0 -21
- package/docs/model-context.md +0 -76
- package/docs/model-instruction-guidelines.md +0 -51
- package/docs/release.md +0 -108
- package/docs/technical-design.md +0 -163
- package/docs/workspace-configuration.md +0 -79
- package/lib/extension/claude-hooks.d.ts +0 -9
- package/lib/extension/claude-hooks.js +0 -78
- package/lib/extension/dsh/agent-events.d.ts +0 -24
- package/lib/extension/dsh/agent-events.js +0 -242
- package/lib/extension/dsh/agent-runtime.d.ts +0 -49
- package/lib/extension/dsh/agent-runtime.js +0 -351
- package/lib/integrations/dsh/dsh-agents.d.ts +0 -30
- package/lib/integrations/dsh/dsh-agents.js +0 -104
- package/lib/integrations/dsh/input.d.ts +0 -21
- package/lib/integrations/dsh/input.js +0 -62
- package/lib/integrations/dsh/notifications.d.ts +0 -8
- package/lib/integrations/dsh/notifications.js +0 -55
- package/lib/integrations/dsh/session.d.ts +0 -14
- package/lib/integrations/dsh/session.js +0 -60
- package/lib/integrations/team-context.d.ts +0 -18
- package/lib/integrations/team-context.js +0 -61
- package/lib/model/team.d.ts +0 -85
- package/lib/services/agents/agent-notices.d.ts +0 -13
- package/lib/services/agents/agent-notices.js +0 -25
- package/lib/services/agents/start-options.d.ts +0 -4
- package/lib/services/agents/start-options.js +0 -20
- package/lib/services/agents/team-service.d.ts +0 -168
- package/lib/services/agents/team-service.js +0 -345
- package/lib/storage/team-files.d.ts +0 -16
- package/lib/storage/team-files.js +0 -111
- package/lib/tools/agents/actions.d.ts +0 -62
- package/lib/tools/agents/actions.js +0 -62
- package/lib/tools/agents/contract.d.ts +0 -181
- package/lib/tools/agents/contract.js +0 -84
- package/lib/tools/agents/dsh-tool.d.ts +0 -5
- package/lib/tools/agents/dsh-tool.js +0 -34
- package/lib/tools/result.d.ts +0 -18
- package/lib/tools/result.js +0 -10
- package/lib/tools/teams/actions.d.ts +0 -23
- package/lib/tools/teams/actions.js +0 -40
- package/lib/tools/teams/contract.d.ts +0 -201
- package/lib/tools/teams/contract.js +0 -91
- package/lib/tools/teams/dsh-tool.d.ts +0 -8
- package/lib/tools/teams/dsh-tool.js +0 -39
- package/lib/ui/dsh/attachments.d.ts +0 -5
- package/lib/ui/dsh/attachments.js +0 -39
- package/resources/prompts/claude-coordinator.md +0 -1
- package/resources/prompts/native-coordinator.md +0 -1
- package/resources/prompts/team-member.md +0 -7
- package/src/extension/agent-events.ts +0 -210
- package/src/extension/agents-command.ts +0 -89
- package/src/extension/claude-hooks.ts +0 -74
- package/src/extension/dsh/agent-events.ts +0 -148
- package/src/extension/dsh/agent-runtime.ts +0 -252
- package/src/extension/subagent-entry.ts +0 -270
- package/src/extension/teams-command.ts +0 -67
- package/src/integrations/dsh/dsh-agents.ts +0 -97
- package/src/integrations/dsh/input.ts +0 -66
- package/src/integrations/dsh/notifications.ts +0 -46
- package/src/integrations/pi/agent-context.ts +0 -18
- package/src/integrations/pi/agent-input.ts +0 -19
- package/src/integrations/pi/pi-agents.ts +0 -84
- package/src/integrations/pi/team-context.ts +0 -26
- package/src/integrations/team-context.ts +0 -64
- package/src/model/team.ts +0 -29
- package/src/services/agents/agent-notices.ts +0 -28
- package/src/services/agents/start-options.ts +0 -19
- package/src/services/agents/team-service.ts +0 -275
- package/src/storage/team-files.ts +0 -93
- package/src/tools/agents/actions.ts +0 -57
- package/src/tools/agents/contract.ts +0 -101
- package/src/tools/agents/dsh-tool.ts +0 -37
- package/src/tools/agents/tool.ts +0 -20
- package/src/tools/teams/actions.ts +0 -34
- package/src/tools/teams/contract.ts +0 -109
- package/src/tools/teams/dsh-tool.ts +0 -45
- package/src/tools/teams/tool.ts +0 -29
- package/src/ui/agent-display.ts +0 -14
- package/src/ui/dsh/attachments.ts +0 -42
- package/src/ui/pi/menu.ts +0 -37
- package/src/ui/pi/reader.ts +0 -46
- /package/lib/{model/team.js → antigravity-plugin/lib/model/plugin-host.js} +0 -0
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"plugins": [
|
|
7
7
|
{
|
|
8
8
|
"name": "personal-bot",
|
|
9
|
-
"version": "0.
|
|
10
|
-
"description": "Workspace materials, skills, and
|
|
9
|
+
"version": "0.3.0",
|
|
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.
|
|
14
|
+
"version": "0.3.0"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
]
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "personal-bot",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Workspace materials, skills, and
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
|
|
5
5
|
"skills": [
|
|
6
6
|
"./resources/skills",
|
|
7
7
|
"./resources/claude/skills"
|
|
8
8
|
],
|
|
9
|
-
"agents": [
|
|
10
|
-
"./resources/claude/agents/general-purpose.md"
|
|
11
|
-
],
|
|
12
9
|
"engines": {
|
|
13
10
|
"claude-code": ">=2.1.325"
|
|
14
11
|
}
|
package/.mcp.json
ADDED
package/CONTEXT.md
CHANGED
|
@@ -4,96 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
**项目**:围绕明确任务保存的目标、资料、结论与交付物。研究项目还包括假设和实验。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**长期事务**:持续维护的目标、约束、决策依据与复盘,可关联多个项目。
|
|
8
8
|
|
|
9
9
|
**专业方法**:按任务选择的研究、计算、分析或复核方法,包含适用条件与判断依据。
|
|
10
10
|
|
|
11
|
-
**Personal Bot 宿主**:用户直接与 Personal Bot 主会话交互的 AI
|
|
11
|
+
**Personal Bot 宿主**:用户直接与 Personal Bot 主会话交互的 AI 助手环境(如 Pi、dsh、Claude Code、Antigravity 或自定义插件宿主)。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**工作区**:组织资料和开展工作的目录范围。所有宿主共享业务资料与 `.pbot/config.json` 启用配置,各自管理原生会话和运行状态;Pi/dsh 维护工作区历史归档。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**原始问答归档**:Pi/dsh 保存的原始问答与已知原生分支顺序(`.pbot/history/raw/`),不含工具调用、推理与中间过程。
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
_Avoid_: 原始对话、完整会话
|
|
17
|
+
**派生摘要归档**:从原始问答归档生成的分层摘要(`.pbot/history/summary/`),可失效重建,不修改原始问答归档。
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
_Avoid_: history 原文、原始文件
|
|
19
|
+
**历史消息树(history)**:Pi/dsh 通过 `pbot_history` 查询的原始问答归档、派生摘要归档与父子关系,只读兼容既有 Claude 归档。
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
_Avoid_: 摘要原文、混合归档
|
|
21
|
+
**能力提供方(provider)**:通过宿主原生 CLI 或 MCP 提供查询、计算或业务操作的外部系统;代码中的 `src/services/` 则是插件自身的业务服务。
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
_Avoid_: 摘要维度、记忆层
|
|
23
|
+
**Personal Bot 启用**:用户通过 `.pbot/config.json` 为当前工作区显式开启 Personal Bot 业务能力。
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
## 专家与跨 Harness 调度
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
**协调者(coordinator)**:主会话助手,负责分析、任务组织、按工作区偏好选用宿主原生子代理或跨 Harness worker,并汇总交付。
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
**宿主原生子代理 / 团队**:由当前宿主原生管理的同宿主子任务与多成员协作(如 Claude `Agent`/团队、Antigravity `invoke_subagent`/`/swarm`、dsh `subagent`)。Personal Bot 不拦截、不覆盖,与跨 Harness 调度互补。
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
**跨 Harness worker(`worker_*`)**:由统一 stdio MCP 服务(`lib/extension/mcp.js` / `pbot mcp`)经 ACP v1 启动与管理的独立对端 Harness 会话,以 `workerId` 标识,通过 `worker_create` / `worker_close` / `worker_request` / `worker_response` / `worker_output` / `worker_discover` 操作;Pi/dsh 另提供 `/pbot worker` 命令入口。
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
**工作周期(cycle)**:worker 一次受管工作,以 `cycleId` 标识;结果保存为固定周期报告,通过 `worker_output` 获取与翻页。
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
**消息请求(request)**:以 `requestId` 标识的一条输入,按接纳、消费和完成记录状态。
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
**配套插件**:独立安装的附加能力。所需外部服务按该插件的流程准备。
|
|
44
|
-
|
|
45
|
-
**配套插件清单**:安装器展示的候选集合;用户选择本次安装项,未选中的已有插件保留。
|
|
46
|
-
|
|
47
|
-
## 专家与团队
|
|
48
|
-
|
|
49
|
-
**协调者**:主会话助手,负责分析、任务组织、专家协作和结果跟踪。
|
|
50
|
-
|
|
51
|
-
**通用专家(general-purpose)**:具有独立上下文和任务归属的子会话,在委派范围内完成研究、实现、计算或复核。工作区可在 `agents/general-purpose.md` 补充职责,协调者对应 `agents/coordinator.md`。
|
|
52
|
-
|
|
53
|
-
**pbot 子会话(agent)**:Pi/dsh 由 start 创建的受管会话,以 agentId 标识,绑定所属宿主、父会话和分支。存活时可 send,停止后用 resume 携新要求恢复;ACP 目标可为 Pi、dsh 或 Claude。
|
|
54
|
-
|
|
55
|
-
**宿主原生子代理**:由宿主管理的独立任务会话,任务完成后的继续对话与恢复遵循宿主规则。
|
|
56
|
-
|
|
57
|
-
**pbot 团队(team)**:Pi/dsh 同一父会话中的固定成员、共同目标与公共记录,以 teamId 标识。关闭团队保留成员与历史。
|
|
58
|
-
|
|
59
|
-
**宿主原生团队**:由宿主管理的协作成员及其通信关系,团队组织与成员状态遵循宿主的协作模型。
|
|
60
|
-
|
|
61
|
-
**团队批次(team run)**:以 runId 标识的有限轮次。roundRobin 按成员顺序执行;parallel 同轮并行,完成后进入下一轮。继续讨论使用新批次。
|
|
62
|
-
|
|
63
|
-
**工作周期(cycle)**:子会话一次受管工作,以 cycleId 标识,可处理多条消息。结果通过对应周期报告查看。
|
|
64
|
-
|
|
65
|
-
**消息请求(request)**:以 requestId 标识的一条输入,按接纳、消费和完成记录状态。
|
|
66
|
-
|
|
67
|
-
**专家交付**:本次任务的报告、产物与来源引用;要求修改文件时包含约定范围内的修改。
|
|
68
|
-
|
|
69
|
-
**独立复核**:由新专家会话或独立 Task Conductor 节点,根据原始资料核验具体方案。复核者沿用通用专家类型,复核要求由任务决定。
|
|
37
|
+
**通用专家职责(general-purpose)**:ACP worker 加载的共享独立执行职责(叠加工作区 `agents/general-purpose.md` 补充)。
|
|
70
38
|
|
|
71
39
|
## 外部任务与操作
|
|
72
40
|
|
|
73
|
-
**Task Conductor
|
|
74
|
-
|
|
75
|
-
**定时任务**:由服务按约定频率和时区触发,每轮明确数据期间与执行范围。当前执行与未来周期分别停止。
|
|
76
|
-
|
|
77
|
-
**用户授权**:用户请求或明确确认的操作范围与条件。交易、转账和账本修改需在相应授权范围内执行。
|
|
78
|
-
|
|
79
|
-
**受控变更**:按任务完成准备、必要复核与用户授权后执行的业务状态改变。
|
|
80
|
-
|
|
81
|
-
**执行意图、尝试与回执**:分别指操作准备、进入执行阶段和外部工具返回的结果。
|
|
82
|
-
|
|
83
|
-
**未知结果**:操作可能已经生效而结果尚不清楚的状态。先按原业务标识查询,再决定后续动作,避免重复执行。
|
|
84
|
-
|
|
85
|
-
**人工结案**:用户核对外部事实后保存处理结论,结束待核对事项。
|
|
86
|
-
|
|
87
|
-
## 投资研究
|
|
88
|
-
|
|
89
|
-
**投资偏好**:用户对风险、仓位、收益、持有期限等事项的要求。
|
|
90
|
-
|
|
91
|
-
**回测实验**:使用记录的数据、策略规则、市场约束与交易假设检验策略。
|
|
92
|
-
|
|
93
|
-
**交易机会分析**:结合目标、市场与持仓约束比较候选行动,可得出继续研究或等待的结论。
|
|
94
|
-
|
|
95
|
-
**候选合约**:参与当前分析与比较的具体期权合约。
|
|
96
|
-
|
|
97
|
-
**交易方案**:包含对象、方向、数量、价格条件及约束的行动建议。
|
|
41
|
+
**Task Conductor**:通过宿主原生 MCP 使用的独立任务系统,管理周期任务、重复流程、DAG 与持久执行状态。
|
|
98
42
|
|
|
99
|
-
|
|
43
|
+
**用户授权**:用户请求或明确确认的操作范围与条件。硬性权限边界由只读凭据、服务端控制或执行沙箱提供。
|
package/README.md
CHANGED
|
@@ -2,188 +2,109 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
**A personal assistant
|
|
5
|
+
**A harness-agnostic personal assistant workspace and unified MCP cross-harness delegation layer.**
|
|
6
6
|
|
|
7
|
-
Personal Bot
|
|
7
|
+
Personal Bot brings shared workspace materials and skills to [Pi](https://pi.dev), dsh, Claude Code, Antigravity, and extensible plugin hosts, while unifying cross-harness ACP v1 delegation onto a clean 6-tool stdio MCP server (`worker_create`, `worker_close`, `worker_request`, `worker_response`, `worker_output`, `worker_discover`). Host-native subagent and team tools remain untouched and complementary; Pi and dsh also provide `pbot_history`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Quick links (Chinese): [Documentation Index](docs/README.md) · [Pi](docs/hosts/pi.md) · [dsh](docs/hosts/dsh.md) · [Claude Code](docs/hosts/claude-code.md) · [Antigravity](docs/hosts/antigravity.md) · [Cross-Harness Workers](docs/guides/cross-harness-workers.md).
|
|
10
10
|
|
|
11
11
|
## Enable a workspace
|
|
12
12
|
|
|
13
|
-
After installation,
|
|
13
|
+
After installation, run init in the target workspace (Pi / dsh / Antigravity: `/pbot init`; Claude Code: `/personal-bot:pbot init`). This creates missing material directories and root `AGENTS.md`, and enables the shared `.pbot/config.json`:
|
|
14
14
|
|
|
15
15
|
```json
|
|
16
16
|
{ "enabled": true }
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Missing, disabled, or invalid configuration keeps Personal Bot inactive without affecting host-native capabilities. Only the bound workspace root is checked. See [workspace configuration](docs/guides/workspace-configuration.md).
|
|
20
20
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
|
-
### Pi
|
|
23
|
+
### Pi
|
|
24
24
|
|
|
25
|
-
Linux
|
|
25
|
+
Requires Linux/macOS, Node.js 22.19+, and npm:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
+
# Interactive setup wizard
|
|
28
29
|
npx personal-bot@latest setup
|
|
29
|
-
# Or select the workspace directly
|
|
30
|
-
npx personal-bot@latest setup --workspace ~/pbot-workspace
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The wizard selects or creates a directory, installs or updates Pi, and installs Personal Bot for that workspace. Task Conductor and Pi Web Access are selected by default on the first installation; later runs preselect installed plugins. Ordinary npm sources update to the latest stable version. Local, Git, and pinned sources are kept by default, with an option to switch. Deselecting a plugin preserves its installation.
|
|
34
|
-
|
|
35
|
-
Missing tmux is installed through an existing Homebrew or supported Linux package manager. After installation, the wizard can start Pi and run `/pbot init`. Follow Pi's prompts for project trust, login, and model selection.
|
|
36
|
-
|
|
37
|
-
For a persistent short command, install the CLI globally:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm install -g personal-bot@latest
|
|
41
|
-
pbot setup
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Update this command through npm; Pi manages the workspace extension. If installation fails, fix the cause and rerun setup. Completed steps and existing materials are preserved. An optional plugin failure still allows you to start Pi.
|
|
45
|
-
|
|
46
|
-
### Existing Pi installation
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```bash
|
|
31
|
+
# Or install into an existing Pi workspace
|
|
51
32
|
pi install --local npm:personal-bot
|
|
52
33
|
pi
|
|
53
34
|
```
|
|
54
35
|
|
|
55
|
-
|
|
36
|
+
Run `/pbot init`. Once enabled, Pi automatically registers the `pbot` stdio MCP server (`worker_*`), exposes `pbot_history`, and provides `/pbot init | status | worker`. See the [Pi guide](docs/hosts/pi.md).
|
|
56
37
|
|
|
57
38
|
### dsh
|
|
58
39
|
|
|
59
|
-
|
|
40
|
+
Requires Node.js 24.9+, npm, pnpm, and dsh `0.2.2-rc.1+`:
|
|
60
41
|
|
|
61
42
|
```bash
|
|
62
43
|
npm install -g @deepseek-ai/dsh@latest pnpm@latest
|
|
63
|
-
# First creation only; this replaces an existing profile of the same name.
|
|
64
44
|
dsh --profile pbot --from-default-profile web --dump-config
|
|
65
45
|
dsh plugin --profile pbot add personal-bot@latest
|
|
66
46
|
dsh --profile pbot
|
|
67
47
|
```
|
|
68
48
|
|
|
69
|
-
Select
|
|
70
|
-
|
|
71
|
-
For later starts, run `dsh --profile pbot`. Stop active specialists and the server before updating the plugin:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
dsh plugin --profile pbot update personal-bot --latest
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
The desktop application installs `personal-bot@latest` through its native Plugins page and uses a separate desktop profile. See the [dsh guide](docs/dsh.md) (Chinese) for launcher options, updates, and chat commands.
|
|
49
|
+
Select a workspace and run `/pbot init`. Once enabled, dsh mounts `mcp__pbot__worker_*` via `@deepseek-ai/dsh-mcp-client`, exposes `pbot_history`, a streamlined Workspace/History Web view, and `/pbot status | init | worker | history`. See the [dsh guide](docs/hosts/dsh.md).
|
|
78
50
|
|
|
79
51
|
### Claude Code
|
|
80
52
|
|
|
81
|
-
|
|
53
|
+
Requires Linux/macOS, Node.js 22.19+, and Claude Code `2.1.325+`:
|
|
82
54
|
|
|
83
55
|
```text
|
|
84
56
|
/plugin install personal-bot --marketplace realqiyan/personal-bot
|
|
85
57
|
```
|
|
86
58
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
For native teams, the user enables Claude's experimental feature with `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` before starting Claude. pbot does not change this setting or provide pbot team scheduling in Claude. Continue work explicitly after returning to a session; native resume/rewind does not restore in-process teammates.
|
|
90
|
-
|
|
91
|
-
The standard plugin provides materials, skills, and native specialists. Existing Claude history archives and old control records remain preserved. See the [Claude guide](docs/claude-code.md) (Chinese) for operations.
|
|
59
|
+
Run `/personal-bot:pbot init` in the workspace. Command hooks inject main-session context and gate bundled skills when disabled without intercepting native `Agent` subagents; `.mcp.json` mounts `worker_*`. See the [Claude Code guide](docs/hosts/claude-code.md).
|
|
92
60
|
|
|
93
|
-
###
|
|
61
|
+
### Antigravity
|
|
94
62
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| Target | Installation | Authentication and model |
|
|
98
|
-
| --- | --- | --- |
|
|
99
|
-
| Pi | With Pi installed, run `npm install -g pi-acp`. Install Pi itself with `npm install -g @earendil-works/pi-coding-agent` if needed. | Run `pi` to sign in and select a default model. |
|
|
100
|
-
| dsh | An existing command-line dsh installation is sufficient; otherwise run `npm install -g @deepseek-ai/dsh@latest`. | Configure the target profile's model and authentication through dsh. The default entry is `dsh --profile acp`. |
|
|
101
|
-
| Claude Code | `npm install -g @agentclientprotocol/claude-agent-acp` | Follow the [Claude Code guide](https://code.claude.com/docs/en/quickstart) to sign in or configure API access, then set a default model. |
|
|
102
|
-
|
|
103
|
-
Check the target from the same terminal that starts your main host, for example with `command -v claude-agent-acp`. Retry the original start request after installation. If the program is installed but absent from the host's PATH, put its absolute path in the workspace [acp configuration](docs/workspace-configuration.md#acp-启动配置) (Chinese). Restart the main host after PATH changes. For workspace ACP configuration changes, run `/reload` in Pi or restart dsh.
|
|
104
|
-
|
|
105
|
-
When a program is missing, the tool returns its installation command, authentication guidance, and a path configuration example. See [ACP members](docs/agent-collaboration.md#acp-成员) (Chinese) for calls and continued conversations.
|
|
106
|
-
|
|
107
|
-
### Use from source
|
|
63
|
+
Requires Linux/macOS, Node.js 22.19+, and Antigravity CLI (`agy` `1.5+`):
|
|
108
64
|
|
|
109
65
|
```bash
|
|
110
|
-
|
|
111
|
-
cd personal-bot
|
|
112
|
-
npm ci --ignore-scripts
|
|
113
|
-
npm run build:cli
|
|
114
|
-
node bin/pbot.mjs setup
|
|
66
|
+
npx personal-bot@latest install-antigravity
|
|
115
67
|
```
|
|
116
68
|
|
|
117
|
-
|
|
69
|
+
Run `/pbot init` in the workspace. Hooks inject `SessionStart` context and gate bundled skills when disabled without intercepting native `invoke_subagent` or `/swarm`; `mcp_config.json` mounts `worker_*`. See the [Antigravity guide](docs/hosts/antigravity.md).
|
|
118
70
|
|
|
119
|
-
###
|
|
71
|
+
### Other MCP hosts & custom ACP harnesses
|
|
120
72
|
|
|
121
|
-
|
|
73
|
+
Point any MCP client (Codex, Cursor, etc.) at:
|
|
122
74
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Describe the task directly: organize materials, compare findings, delegate a review, or run calculations. These commands are for Pi; see the [dsh](docs/dsh.md) and [Claude](docs/claude-code.md) guides for their native interfaces.
|
|
75
|
+
```bash
|
|
76
|
+
npx personal-bot@latest mcp
|
|
77
|
+
# Or after global install
|
|
78
|
+
pbot mcp
|
|
79
|
+
```
|
|
130
80
|
|
|
131
|
-
|
|
132
|
-
| --- | --- |
|
|
133
|
-
| `/pbot` | Open the workspace menu |
|
|
134
|
-
| `/pbot init` | Enable the workspace and create missing material directories and root `AGENTS.md` |
|
|
135
|
-
| `/pbot status` | Inspect activation, workspace, and version |
|
|
136
|
-
| `/pbot history [text]` | Search exchanges and summaries, then read originals |
|
|
137
|
-
| `/pbot agents` | Inspect, enter, rename, stop, or send instructions to specialists |
|
|
138
|
-
| `/pbot teams` | Inspect teams and public messages; start rounds, pause, or close |
|
|
139
|
-
| `/reload` | Pi's native command to reload extensions and resources |
|
|
140
|
-
|
|
141
|
-
- **Initialization and materials:** `/pbot init` creates missing materials and enables the workspace, preserving existing materials and other configuration fields. Pi reloads on first activation; an already running workspace loads a newly created root AGENTS after `/reload`.
|
|
142
|
-
- **Native tools:** Use CLI tools through Bash and MCP through the host's configuration. Add Pi project connections with `pi mcp add --local <server> ...` and inspect their source with `/mcp`. See the [connection skill](resources/skills/provider-connections/SKILL.md).
|
|
143
|
-
- **History:** Pi/dsh refresh and summarize their own sources and query all existing archives, including preserved Claude archives. Originals are searchable first; after a main interaction, the current model fills pending summaries through additional model calls. New input cancels that work first. Claude uses native session history. See [history](docs/history.md).
|
|
144
|
-
- **Specialists and teams:** Default Pi specialists require tmux; dsh uses native sessions. Pi/dsh pbot teams support ordered discussions and parallel rounds; pause and drain their work before private tasks. Claude uses native Agent and native team tools. Pi/dsh ACP calls Pi, dsh, and Claude Code for independent conversations, reports, and explicit restoration. ACP model and thinking are independently optional; omitted values use the target host defaults. See [specialist collaboration](docs/agent-collaboration.md).
|
|
145
|
-
- **Calculations:** Use native Bash with the project's interpreter, dependencies, and working directory. The [Python calculation reference](resources/references/compute.md) covers common methods; [indicators and backtesting](resources/references/compute-finance.md) covers financial calculations. Install the tools and libraries required by the project in its chosen environment.
|
|
146
|
-
- **Material maintenance:** Ask the assistant to organize a project, repeat an analysis with its existing definitions, or check a delivery. The [maintenance skill](resources/skills/project-maintenance/SKILL.md) updates current guidance and extracts reusable methods while preserving formal materials, history, and backups.
|
|
147
|
-
|
|
148
|
-
Use `pi --resume` to select the main session explicitly; `pi --continue` can select the most recently active child. Enter managed specialists through `/pbot agents`. Opening a stopped specialist's saved session leaves it idle; use resume with a new instruction to continue work. Keep one writer per running session.
|
|
81
|
+
Supports built-in presets (`pi`, `dsh`, `claude`, `antigravity`, `codex`) and arbitrary custom ACP v1 binaries declared in `.pbot/config.json` under `acp` (`{ "command", "args", "env?" }`). See [cross-harness workers](docs/guides/cross-harness-workers.md).
|
|
149
82
|
|
|
150
83
|
## Workspace materials
|
|
151
84
|
|
|
152
85
|
| Location | Purpose |
|
|
153
86
|
| --- | --- |
|
|
154
|
-
| `.pbot/config.json` | Shared
|
|
155
|
-
| `AGENTS.md` |
|
|
156
|
-
| `areas/`, `projects/` | Long-term
|
|
157
|
-
| `
|
|
158
|
-
|
|
|
159
|
-
| `
|
|
160
|
-
|
|
|
161
|
-
| `agents/` | Role additions |
|
|
162
|
-
| `.agents/skills/` (Pi/dsh), `.claude/skills/` (Claude) | Workspace skills discovered by the current host |
|
|
163
|
-
|
|
164
|
-
Existing layouts and agreements take precedence. Fetch queryable data when needed using the recorded definitions. Stop writes in the old instance before copying a workspace; concurrent writes from multiple machines to a synchronized directory are unsupported. See [file storage](docs/file-storage.md).
|
|
165
|
-
|
|
166
|
-
## Updates and operating scope
|
|
167
|
-
|
|
168
|
-
Current release: **0.2.19**. Update through the host's native package manager. For a local Pi source, update the checkout, run `npm ci --ignore-scripts` when dependencies change, then reload or restart. Stop active specialists before changing versions. Recreate specialists across compatibility lines; existing materials, history, and backups are preserved.
|
|
87
|
+
| `.pbot/config.json` | Shared workspace opt-in and extensible ACP harness configuration |
|
|
88
|
+
| `AGENTS.md` | Project index, working agreements, and optional harness routing preferences |
|
|
89
|
+
| `areas/`, `projects/`, `knowledge/` | Long-term areas, project deliverables, and reusable methods |
|
|
90
|
+
| `providers/` | External CLI/MCP guides and data definitions |
|
|
91
|
+
| `scratch/` | Temporary scripts, data, and working environments |
|
|
92
|
+
| `agents/` | Role additions (`coordinator.md`, `general-purpose.md`) |
|
|
93
|
+
| `.pbot/history/` | Pi/dsh raw exchanges (`raw/`) and derived summaries (`summary/`); preserved Claude archives remain read-only |
|
|
169
94
|
|
|
170
|
-
|
|
95
|
+
## Development
|
|
171
96
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
## Development and documentation
|
|
175
|
-
|
|
176
|
-
Development and complete acceptance for all three hosts use Linux and Node.js 24.9+. After installing locked dependencies, run:
|
|
97
|
+
Current release: **0.3.0**. Full development uses Linux/macOS and Node.js 24.9+:
|
|
177
98
|
|
|
178
99
|
```bash
|
|
100
|
+
npm ci --ignore-scripts
|
|
179
101
|
npm run check
|
|
180
102
|
npm test
|
|
103
|
+
agy plugin validate --strict ./lib/antigravity-plugin --json
|
|
104
|
+
claude plugin validate --json ./.claude-plugin/plugin.json
|
|
181
105
|
git diff --check
|
|
182
|
-
npm pack --dry-run
|
|
183
106
|
```
|
|
184
107
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- [
|
|
188
|
-
- [npm release](docs/release.md): candidate checks, configuration, and publication.
|
|
189
|
-
- [Domain terms](CONTEXT.md).
|
|
108
|
+
- [Documentation index](docs/README.md)
|
|
109
|
+
- [Architecture principles](docs/architecture/principles.md) · [Technical design](docs/architecture/design.md) · [Extensibility design](docs/architecture/extensibility.md)
|
|
110
|
+
- [Release guide](docs/maintainers/release.md) · [Maintenance scripts](scripts/README.md) · [Domain terms](CONTEXT.md)
|