personal-bot 0.2.6 → 0.2.9
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/CONTEXT.md +40 -59
- package/README.md +65 -91
- package/README.zh-CN.md +69 -89
- package/docs/README.md +21 -17
- package/docs/agent-collaboration.md +11 -13
- package/docs/architecture-guidelines.md +2 -2
- package/docs/capability-design.md +8 -10
- package/docs/dsh.en.md +339 -0
- package/docs/dsh.md +284 -48
- package/docs/file-storage.md +3 -3
- package/docs/history.md +6 -4
- package/docs/installation-design.md +55 -197
- package/docs/model-context.md +46 -0
- package/docs/model-instruction-guidelines.md +51 -0
- package/docs/release.md +10 -6
- package/docs/technical-design.md +24 -16
- package/lib/common/typebox.LICENSE +23 -0
- package/lib/common/typebox.js +4740 -0
- package/lib/dsh.js +4 -0
- package/lib/extension/dsh/agent-events.js +1 -1
- package/lib/extension/dsh/agent-runtime.js +8 -5
- package/lib/extension/dsh/command.js +1 -1
- package/lib/extension/dsh/management.js +1 -1
- package/lib/integrations/dsh/resources.d.ts +1 -1
- package/lib/integrations/dsh/resources.js +14 -14
- package/lib/integrations/dsh/session.js +1 -0
- package/lib/integrations/installation/pi-bridge.js +9 -9
- package/lib/integrations/team-context.js +7 -3
- package/lib/services/agents/agent-notices.js +2 -2
- package/lib/services/agents/team-service.js +1 -1
- package/lib/tools/agents/contract.d.ts +1 -1
- package/lib/tools/agents/contract.js +8 -8
- package/lib/tools/agents/dsh-contract.js +5 -5
- package/lib/tools/history/contract.d.ts +1 -1
- package/lib/tools/history/contract.js +3 -3
- package/lib/tools/teams/contract.d.ts +2 -2
- package/lib/tools/teams/contract.js +12 -12
- package/npm-shrinkwrap.json +33 -25
- package/package.json +124 -53
- package/python/README.md +5 -5
- package/resources/agents/coordinator.md +5 -33
- package/resources/agents/general-purpose.md +3 -15
- package/resources/prompts/history-summary.md +1 -1
- package/resources/prompts/team-member.md +7 -0
- package/resources/prompts/workspace.md +13 -24
- package/resources/references/compute-finance.md +22 -0
- package/resources/references/compute.md +11 -88
- package/resources/references/task-conductor.md +20 -15
- package/resources/skills/project-maintenance/SKILL.md +9 -11
- package/resources/skills/provider-connections/SKILL.md +7 -7
- package/scripts/README.md +16 -15
- package/src/dsh.ts +4 -0
- package/src/extension/agent-events.ts +17 -4
- package/src/extension/command.ts +1 -1
- package/src/extension/dsh/agent-events.ts +1 -1
- package/src/extension/dsh/agent-runtime.ts +7 -6
- package/src/extension/events.ts +14 -9
- package/src/extension/subagent-entry.ts +24 -16
- package/src/integrations/dsh/resources.ts +17 -14
- package/src/integrations/dsh/session.ts +2 -0
- package/src/integrations/installation/pi-bridge.ts +9 -7
- package/src/integrations/pi/agent-context.ts +1 -1
- package/src/integrations/team-context.ts +7 -3
- package/src/services/agents/agent-notices.ts +2 -2
- package/src/services/agents/team-service.ts +1 -1
- package/src/tools/agents/contract.ts +7 -7
- package/src/tools/agents/dsh-contract.ts +4 -4
- package/src/tools/history/contract.ts +2 -2
- package/src/tools/register.ts +1 -7
- package/src/tools/teams/contract.ts +11 -11
- package/docs/dsh-implementation-plan.md +0 -158
- package/docs/dsh-support-proposal.md +0 -314
- package/docs/subagent-upgrade-proposal.md +0 -357
- package/docs/validation.md +0 -132
- package/resources/prompts/tool-guidelines.md +0 -3
package/CONTEXT.md
CHANGED
|
@@ -1,100 +1,81 @@
|
|
|
1
1
|
# Personal Bot 领域术语
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 资料与接入
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**项目**:围绕明确任务保存的目标、资料、结论与交付物。研究项目还包括假设和实验。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**长期事务**:持续维护的目标、约束、决策依据与复盘,可关联多个项目;投资事务保留相应市场与持仓约定。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**专业方法**:按任务选择的研究、计算、分析或复核方法,包含适用条件与判断依据。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**工作区**:组织资料和开展工作的目录范围。两种宿主共享业务资料与历史归档,各自管理原生会话、配置和运行状态。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**工作区记忆**:跨会话查找、使用与修正资料的能力,同一主题维护一份当前正文。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**历史消息树(history)**:问答原文、分层摘要、父子关系和来源引用组成的检索资料。完整工具日志、图片与会话恢复由原生存储负责。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**资料维护**:根据任务进展更新相关说明,归集成果,提炼可复用的方法与口径。
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**能力提供方(provider)**:通过 CLI 或 MCP 提供查询、计算或业务操作的外部系统;代码中的 `src/services/` 则是插件自身的业务服务。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
**原生接入**:使用 CLI 的命令与认证,或宿主的 MCP 配置、工具发现与调用。
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
**提供方手册**:外部系统的使用入口,记录接口用途、数据口径、配置位置、限制与来源。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**调用约定**:当前工具版本的输入、结果与执行要求。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
**Personal Bot 启用**:宿主按原生配置加载扩展。资料准备使用可选的 `/pbot init`。
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
**配套插件**:独立安装的附加能力。所需外部服务按该插件的流程准备。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
**配套插件清单**:安装器展示的候选集合;用户选择本次安装项,未选中的已有插件保留。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
## 专家与团队
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**协调者**:主会话助手,负责分析、任务组织、专家协作和结果跟踪。
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
**通用专家(general-purpose)**:具有独立上下文和任务归属的子会话,在委派范围内完成研究、实现、计算或复核。工作区可在 `agents/general-purpose.md` 补充职责,协调者对应 `agents/coordinator.md`。
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
_避免_:用工作区表示单个会话或真实账户。
|
|
39
|
+
**子会话(agent)**:由 start 创建,以 agentId 标识,绑定所属宿主、父会话和分支。存活时可 send,停止后用 resume 携新要求恢复。
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
**团队(team)**:同一父会话中的固定成员、共同目标与公共记录,以 teamId 标识。关闭团队保留成员与历史。
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
**团队批次(team run)**:以 runId 标识的有限轮次。roundRobin 按成员顺序执行;parallel 同轮并行,完成后进入下一轮。继续讨论使用新批次。
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
**工作周期(cycle)**:子会话一次受管工作,以 cycleId 标识,可处理多条消息。结果通过对应周期报告查看。
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
**消息请求(request)**:以 requestId 标识的一条输入,按接纳、消费和完成记录状态。
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
**专家交付**:本次任务的报告、产物与来源引用;要求修改文件时包含约定范围内的修改。
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
**独立复核**:由新专家会话或独立 Task Conductor 节点,根据原始资料核验具体方案。复核者沿用通用专家类型,复核要求由任务决定。
|
|
53
52
|
|
|
54
|
-
##
|
|
53
|
+
## 外部任务与操作
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
**Task Conductor**:通过原生 MCP 使用的独立任务系统,管理周期、重复流程、DAG 与持久执行状态。taskId 对应任务定义,runId 对应一次执行,节点 ID 对应 DAG 节点;与 pbot 的标识分别使用。
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
**定时任务**:由服务按约定频率和时区触发,每轮明确数据期间与执行范围。当前执行与未来周期分别停止。
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
**用户授权**:用户请求或明确确认的操作范围与条件。交易、转账和账本修改需在相应授权范围内执行。
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
**受控变更**:按任务完成准备、必要复核与用户授权后执行的业务状态改变。
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
**执行意图、尝试与回执**:分别指操作准备、进入执行阶段和外部工具返回的结果。
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
**未知结果**:操作可能已经生效而结果尚不清楚的状态。先按原业务标识查询,再决定后续动作,避免重复执行。
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
**人工结案**:用户核对外部事实后保存处理结论,结束待核对事项。
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
## 投资研究
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
**投资偏好**:用户对风险、仓位、收益、持有期限等事项的要求。
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
**回测实验**:使用记录的数据、策略规则、市场约束与交易假设检验策略。
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
**交易机会分析**:结合目标、市场与持仓约束比较候选行动,可得出继续研究或等待的结论。
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
**候选合约**:参与当前分析与比较的具体期权合约。
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
**交易方案**:包含对象、方向、数量、价格条件及约束的行动建议。
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
**交易复核**:对具体方案的规则、数据、持仓、计算和订单约束进行独立核验。复核通过不代表用户授权。
|
|
85
|
-
_避免_:将批准与授权混用。
|
|
86
|
-
|
|
87
|
-
**复核证据**:本次核验的规则、数据、计算和订单依据,包含来源与时间。
|
|
88
|
-
|
|
89
|
-
**用户授权**:用户请求或明确确认的业务范围与条件。工具可用、研究请求和复核通过不自动授权业务变更。
|
|
90
|
-
|
|
91
|
-
**执行意图**:包含目标、参数和约束的具体操作准备,不表示已获许可或已发送。
|
|
92
|
-
_避免_:用订单指尚未发送的意图。
|
|
93
|
-
|
|
94
|
-
**执行尝试**:一次操作进入执行阶段的事实,不证明外部能力提供方已收到或执行。
|
|
95
|
-
|
|
96
|
-
**执行回执**:外部工具返回的结果,不必然证明成功或成交。
|
|
97
|
-
|
|
98
|
-
**未知执行义务**:调用可能已生效但结果无法确定的待核对事项,不自动阻塞其他调用,也不授予重发许可。后续操作仍须符合当前任务授权;不能从未知结果推断没有副作用。
|
|
99
|
-
|
|
100
|
-
**人工结案**:用户核对外部事实后记录处理结论,结束该未知义务的核对事项,不授权重发操作。
|
|
81
|
+
**交易复核**:核验方案的规则、数据、持仓、计算与订单约束,保留所用依据和时间。执行仍遵循用户授权。
|
package/README.md
CHANGED
|
@@ -4,13 +4,13 @@ English | [简体中文](README.zh-CN.md)
|
|
|
4
4
|
|
|
5
5
|
**A personal assistant connecting knowledge, research, and action.**
|
|
6
6
|
|
|
7
|
-
Personal Bot provides a workspace-scoped [Pi](https://pi.dev) extension and a native Web integration for
|
|
8
|
-
|
|
9
|
-
The model handles analysis, coordination, and native tools. Personal Bot adds workspace materials, specialist collaboration, and Python environment preparation. It does not create a second main agent or start tasks or trades automatically.
|
|
7
|
+
Personal Bot provides a workspace-scoped [Pi](https://pi.dev) extension and a native dsh Web integration for organizing materials, project work, research, specialist collaboration, and authorized operations. The model handles analysis and coordination; the plugin adds workspace materials, specialist sessions, history search, and a shared Python environment.
|
|
10
8
|
|
|
11
9
|
## Install
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
### Pi setup wizard
|
|
12
|
+
|
|
13
|
+
Linux and macOS require Node.js 22.19+, npm, and Python 3.11+ with venv/ensurepip. Run in an interactive terminal:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npx personal-bot@latest setup
|
|
@@ -18,157 +18,131 @@ npx personal-bot@latest setup
|
|
|
18
18
|
npx personal-bot@latest setup --workspace ~/pbot-workspace
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
The wizard selects
|
|
21
|
+
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.
|
|
22
22
|
|
|
23
|
-
Missing tmux is installed through an existing Homebrew or supported Linux package manager. Missing Python prerequisites produce repair instructions.
|
|
23
|
+
Missing tmux is installed through an existing Homebrew or supported Linux package manager. Missing Python prerequisites produce repair instructions. After installation, the wizard can start Pi and run `/pbot init`. Follow Pi's prompts for project trust, login, and model selection.
|
|
24
24
|
|
|
25
|
-
For a persistent short command, install the
|
|
25
|
+
For a persistent short command, install the CLI globally:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
npm install -g personal-bot@latest
|
|
29
29
|
pbot setup
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
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.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
### Existing Pi installation
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
If Pi is already installed, run from your workspace root:
|
|
36
|
+
Run from the workspace root:
|
|
39
37
|
|
|
40
38
|
```bash
|
|
41
39
|
pi install --local npm:personal-bot
|
|
42
40
|
pi
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
`--local` saves the
|
|
46
|
-
|
|
47
|
-
Use `pi install` without `--local` only when you want the extension in every Pi session. Use Pi package management or `pi config` to adjust an existing installation's scope. Do not load both the npm and source installations. The development and test baseline is Pi 1.5.0; installer acceptance limits are recorded in [validation](docs/validation.md).
|
|
43
|
+
`--local` saves the declaration in the project's `.pi/settings.json`. Start Pi from that workspace root. Loading the package enables roles, skills, tools, and Python preparation. Use a global extension installation only when you want it in every Pi session. Manage existing sources with `pi list` or `pi config`, keeping one active source per package.
|
|
48
44
|
|
|
49
|
-
###
|
|
45
|
+
### dsh
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
You need Node.js 24.9+, npm, pnpm, and Python 3.11+. Follow the installed dsh release's `engines` if it requires a newer runtime. Use its native profiles and plugin manager:
|
|
52
48
|
|
|
53
49
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
npm install -g @deepseek-ai/dsh@latest pnpm@latest
|
|
51
|
+
# First creation only; this replaces an existing profile of the same name.
|
|
52
|
+
dsh --profile pbot --from-default-profile web --dump-config
|
|
53
|
+
dsh plugin --profile pbot add personal-bot@latest
|
|
54
|
+
dsh --profile pbot
|
|
59
55
|
```
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
In the browser, select a workspace and main session, then configure models and authentication. Enter `/pbot` in chat to open management, `/pbot status` to inspect state, or `/pbot init` to prepare materials.
|
|
58
|
+
|
|
59
|
+
For later starts, run `dsh --profile pbot`. Stop active specialists and the server before updating the plugin:
|
|
62
60
|
|
|
63
61
|
```bash
|
|
64
|
-
|
|
65
|
-
pi install --local /absolute/path/to/personal-bot
|
|
66
|
-
pi
|
|
62
|
+
dsh plugin --profile pbot update personal-bot --latest
|
|
67
63
|
```
|
|
68
64
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Use with dsh
|
|
72
|
-
|
|
73
|
-
The integration targets `@deepseek-ai/dsh@0.2.2-rc.1` and requires Node.js 24.9+. Build a tarball from the current source with normal `npm pack`, create a separate `pbot` Web profile, and install it with `dsh plugin --profile pbot add <tarball>`. Follow the [dsh guide](docs/dsh.md); `pbot setup` remains the Pi installer.
|
|
74
|
-
|
|
75
|
-
The bare `/pbot` action opens workspace, specialist, team, and history management. Specialists use native Agent/Session instances in the server process. Refreshing a page does not stop accepted work. Both hosts query the saved history archives while each maintains its own source. Models, authentication, and MCP remain under native host configuration. Real model workflows and the latest Linux checks remain subject to the [validation record](docs/validation.md).
|
|
76
|
-
|
|
77
|
-
### Optional: Task Conductor
|
|
65
|
+
The desktop application installs `personal-bot@latest` through its native Plugins page and uses a separate desktop profile. See the [dsh guide](docs/dsh.en.md) ([中文](docs/dsh.md)) for launcher options, updates, and chat commands.
|
|
78
66
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Check `pi list` first. If the package is already installed but its skill is missing, check resource configuration and reload rather than installing it again. Review the [upstream integration guide](https://github.com/realqiyan/task-conductor/blob/master/docs/host-integrations.md), then run from the workspace root:
|
|
67
|
+
### Use from source
|
|
82
68
|
|
|
83
69
|
```bash
|
|
84
|
-
|
|
70
|
+
git clone https://github.com/realqiyan/personal-bot.git
|
|
71
|
+
cd personal-bot
|
|
72
|
+
npm ci --ignore-scripts
|
|
73
|
+
npm run build:cli
|
|
74
|
+
node bin/pbot.mjs setup
|
|
85
75
|
```
|
|
86
76
|
|
|
87
|
-
|
|
77
|
+
To load only the Pi source extension, run `pi install --local /absolute/path/to/personal-bot` from the workspace and keep that source directory and its dependencies available. For dsh, follow the [source installation steps](docs/dsh.en.md#installing-from-source).
|
|
88
78
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`--local` limits plugin loading, not service data access. Choose MCP configuration scope separately, and keep existing connections without duplicate registration. Use `/mcp` or `pi mcp list` to check actual tools, then follow the skill's read-only validation steps. Do not create model tasks just to test installation. A working connection does not prove model authentication or task delivery.
|
|
79
|
+
### Optional: Task Conductor
|
|
92
80
|
|
|
93
|
-
|
|
81
|
+
Use `task-conductor-plugin` for schedules, recurring workflows, DAGs, and tasks that continue after the host exits. Install the plugin and its service separately, following the [upstream integration guide](https://github.com/realqiyan/task-conductor/blob/master/docs/host-integrations.md).
|
|
94
82
|
|
|
95
|
-
|
|
83
|
+
Pi users run `pi install --local npm:task-conductor-plugin` from the workspace, reload, then read `/skill:using-task-conductor`. dsh users follow the [Task Conductor setup](docs/dsh.en.md#task-conductor) and read `/using-task-conductor` in the main session.
|
|
96
84
|
|
|
97
|
-
|
|
85
|
+
Notifications return to the session that submitted the task. Service tasks continue after Pi or dsh closes. Query and stop the current run and future recurrences separately.
|
|
98
86
|
|
|
99
87
|
## Daily use
|
|
100
88
|
|
|
101
|
-
Describe the task directly: organize
|
|
89
|
+
Describe the task directly: organize materials, compare findings, delegate a review, or run calculations. These commands are for Pi; dsh commands are in its guide.
|
|
102
90
|
|
|
103
91
|
| Command | Purpose |
|
|
104
92
|
| --- | --- |
|
|
105
93
|
| `/pbot` | Open the workspace menu |
|
|
106
94
|
| `/pbot init` | Create missing material directories and root `AGENTS.md` |
|
|
107
|
-
| `/pbot status` |
|
|
108
|
-
| `/pbot history [text]` | Search
|
|
109
|
-
| `/pbot agents` | Inspect
|
|
110
|
-
| `/pbot teams` | Inspect teams and public messages; start rounds, pause,
|
|
111
|
-
| `/pbot python setup` | Retry shared
|
|
95
|
+
| `/pbot status` | Inspect workspace, version, and Python state |
|
|
96
|
+
| `/pbot history [text]` | Search exchanges and summaries, then read originals |
|
|
97
|
+
| `/pbot agents` | Inspect, enter, rename, stop, or send instructions to specialists |
|
|
98
|
+
| `/pbot teams` | Inspect teams and public messages; start rounds, pause, or close |
|
|
99
|
+
| `/pbot python setup` | Retry shared Python preparation |
|
|
112
100
|
| `/reload` | Pi's native command to reload extensions and resources |
|
|
113
101
|
|
|
114
|
-
- **
|
|
115
|
-
- **
|
|
116
|
-
- **
|
|
117
|
-
- **
|
|
118
|
-
- **
|
|
119
|
-
- **
|
|
120
|
-
- **Python:** All workspaces share one dedicated venv for the current user. Loading Personal Bot creates or updates it with locked dependencies and activates it in the current Pi process. Main and specialist sessions use `python` or `python3` through Bash. Failures are reported; fix the cause and retry with `/pbot python setup`. System Python, external terminals, existing scripts, and historical results are not changed. Shared dependency updates affect other workspaces, so stop relevant scripts before changing plugin versions or retrying setup. See the [Python guide](python/README.md) and [computation reference](resources/references/compute.md).
|
|
121
|
-
- **Material maintenance:** Ask to organize project materials, reproduce a report using its previous definitions, or review delivery and close a task. The [project maintenance skill](resources/skills/project-maintenance/SKILL.md) updates the current task and affected materials within your requested scope. Current guidance is consolidated by topic, with reusable methods and analysis definitions extracted from project conclusions. Sources and important decisions remain traceable. Cleanup removes unnecessary temporary outputs within scope, not formal materials, history, or backups.
|
|
102
|
+
- **Material preparation:** `/pbot init` is optional. It creates missing items and preserves existing files. In Pi, a new root AGENTS file loads after `/reload` or the next startup.
|
|
103
|
+
- **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).
|
|
104
|
+
- **History:** Pi and dsh query shared workspace 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. See [history](docs/history.md).
|
|
105
|
+
- **Specialists and teams:** Delegate independent work, continue a conversation, or organize ordered discussions and parallel rounds. Pi specialists require tmux; dsh uses native sessions. A running team reserves its members. Pause and drain in-flight work before private tasks. See [specialist collaboration](docs/agent-collaboration.md).
|
|
106
|
+
- **Python:** All workspaces share one venv for the current user. Loading the plugin prepares it and activates it in the host process. Use `python` or `python3` through Bash. Stop scripts using the environment before dependency updates. See the [Python guide](python/README.md) for paths, troubleshooting, and licenses.
|
|
107
|
+
- **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.
|
|
122
108
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Personal Bot maintains no separate provider-call ledger or result wrapper. Native tools own their results and large-output handling; project conclusions cite relevant sources and results. If an outcome is unclear, query native status first. Complete result retention is not guaranteed after a process crash.
|
|
109
|
+
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.
|
|
126
110
|
|
|
127
111
|
## Workspace materials
|
|
128
112
|
|
|
129
113
|
| Location | Purpose |
|
|
130
114
|
| --- | --- |
|
|
131
|
-
| `AGENTS.md` |
|
|
132
|
-
| `areas/`, `projects/` | Long-term goals,
|
|
115
|
+
| `AGENTS.md` | Navigation and working agreements |
|
|
116
|
+
| `areas/`, `projects/` | Long-term goals, tasks, conclusions, and deliverables |
|
|
133
117
|
| `knowledge/` | Reusable concepts, methods, and analysis definitions |
|
|
134
|
-
| `.pi/pbot/history/`, `.dsh/pbot/history/` |
|
|
135
|
-
| `providers/` |
|
|
136
|
-
| `scratch/` | Temporary scripts,
|
|
137
|
-
| `agents/`, `.agents/skills/` |
|
|
138
|
-
|
|
139
|
-
Fetch data that can be queried again when needed, using the recorded definitions.
|
|
140
|
-
|
|
141
|
-
Personal Bot stores no private activation state in the workspace. Pi owns its configuration; reload when required by Pi. Stop the old instance before copying a workspace. Concurrent writes from multiple machines to a synchronized directory are not supported. See [file storage](docs/file-storage.md) for storage and copying boundaries.
|
|
142
|
-
|
|
143
|
-
## Updates and historical data
|
|
118
|
+
| `.pi/pbot/history/`, `.dsh/pbot/history/` | Exchanges, summaries, and node links |
|
|
119
|
+
| `providers/` | External tool guidance, data definitions, and sources |
|
|
120
|
+
| `scratch/` | Temporary scripts, calculation data, downloads, and environments |
|
|
121
|
+
| `agents/`, `.agents/skills/` | Role additions and workspace skills |
|
|
144
122
|
|
|
145
|
-
|
|
123
|
+
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).
|
|
146
124
|
|
|
147
|
-
|
|
125
|
+
## Updates and operating scope
|
|
148
126
|
|
|
149
|
-
|
|
127
|
+
Current release: **0.2.9**. 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.
|
|
150
128
|
|
|
151
|
-
|
|
129
|
+
Operations follow the user's request, existing agreements, and required confirmations. Bash, Python, MCP, and extensions use the actual account and credential permissions. Enforce hard limits through read-only credentials, service controls, or restricted environments. Trades, transfers, and ledger changes require authorization for those operations. After cancellation, timeout, or disconnection, query native status before retrying to avoid duplicate execution.
|
|
152
130
|
|
|
153
|
-
|
|
154
|
-
- Tool availability is not user authorization. Research, connection setup, and validation do not authorize trades, transfers, or ledger changes.
|
|
155
|
-
- Protocol success does not prove business completion. Cancellation, timeout, and session recovery do not undo external side effects. Check native status before retrying an operation that may have been sent.
|
|
156
|
-
- Task Conductor nodes do not automatically inherit the main session's tools, environment, or skills. Do not schedule unattended operations without user authorization or when the native service requires human confirmation.
|
|
157
|
-
|
|
158
|
-
See [native tools and execution boundaries](docs/capability-design.md). Real models, external services, and full TUI/RPC interactions still require an approved acceptance environment. Local tests do not prove readiness for live trading.
|
|
131
|
+
Task Conductor nodes need their own tools, environment, skills, and authentication. Preserve human interaction for operations that require confirmation. See [tools and execution](docs/capability-design.md).
|
|
159
132
|
|
|
160
133
|
## Development and documentation
|
|
161
134
|
|
|
135
|
+
Development for both hosts uses Linux and Node.js 24.9+. After installing locked dependencies, run:
|
|
136
|
+
|
|
162
137
|
```bash
|
|
163
138
|
npm run check
|
|
164
139
|
npm test
|
|
165
140
|
git diff --check
|
|
141
|
+
npm pack --dry-run
|
|
166
142
|
```
|
|
167
143
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
The README is available in English and Simplified Chinese. Detailed design documents and bundled guides are currently primarily in Chinese.
|
|
144
|
+
`npm test` includes smoke and E2E tests and generates `dist/` for tests and `lib/` for distribution. Pi loads source at runtime.
|
|
171
145
|
|
|
172
|
-
- [
|
|
173
|
-
- [npm
|
|
174
|
-
- [Domain
|
|
146
|
+
- [Documentation index](docs/README.md): current architecture, usage, and development guidance.
|
|
147
|
+
- [npm release](docs/release.md): candidate checks, configuration, and publication.
|
|
148
|
+
- [Domain terms](CONTEXT.md).
|