personal-bot 0.2.8 → 0.2.10
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 +70 -119
- package/README.zh-CN.md +73 -116
- package/docs/README.md +22 -19
- package/docs/agent-collaboration.md +10 -12
- package/docs/architecture-guidelines.md +2 -2
- package/docs/capability-design.md +4 -12
- package/docs/dsh.md +32 -96
- package/docs/file-storage.md +8 -5
- package/docs/history.md +5 -12
- package/docs/installation-design.md +56 -198
- package/docs/model-context.md +23 -37
- package/docs/model-instruction-guidelines.md +2 -2
- package/docs/release.md +5 -5
- package/docs/technical-design.md +16 -12
- package/docs/workspace-configuration.md +55 -0
- package/lib/client.js +28 -3
- package/lib/common/typebox.LICENSE +23 -0
- package/lib/common/typebox.js +4740 -0
- package/lib/dsh.js +0 -5
- package/lib/extension/dsh/command.js +15 -11
- package/lib/extension/dsh/history.js +1 -1
- package/lib/extension/dsh/management.d.ts +4 -0
- package/lib/extension/dsh/management.js +21 -6
- package/lib/extension/dsh/workspace.d.ts +7 -1
- package/lib/extension/dsh/workspace.js +68 -1
- package/lib/extension/setup-cli.js +1 -1
- package/lib/integrations/dsh/skills.d.ts +4 -0
- package/lib/integrations/dsh/skills.js +27 -0
- package/lib/model/history.d.ts +1 -0
- package/lib/model/workspace-config.d.ts +9 -0
- package/lib/model/workspace-config.js +1 -0
- package/lib/services/history/history-service.d.ts +1 -2
- package/lib/services/history/history-service.js +27 -40
- package/lib/services/workspace/workspace-config.d.ts +7 -0
- package/lib/services/workspace/workspace-config.js +50 -0
- package/lib/services/workspace/workspace-preparation.d.ts +1 -0
- package/lib/services/workspace/workspace-preparation.js +8 -0
- package/lib/storage/history-files.d.ts +5 -1
- package/lib/storage/history-files.js +68 -15
- package/lib/tools/agents/contract.js +1 -1
- package/lib/tools/agents/dsh-contract.js +1 -1
- package/lib/tools/history/contract.js +1 -1
- package/lib/tools/teams/contract.js +1 -1
- package/lib/ui/dsh/management.js +27 -3
- package/npm-shrinkwrap.json +10 -3
- package/package.json +102 -31
- package/python/README.md +6 -6
- package/resources/prompts/workspace.md +3 -3
- package/scripts/README.md +16 -15
- package/src/dsh.ts +0 -5
- package/src/extension/command.ts +25 -8
- package/src/extension/dsh/command.ts +13 -8
- package/src/extension/dsh/history.ts +2 -2
- package/src/extension/dsh/management.ts +21 -5
- package/src/extension/dsh/workspace.ts +62 -5
- package/src/extension/events.ts +18 -1
- package/src/extension/lifecycle.ts +9 -2
- package/src/extension/setup-cli.ts +1 -1
- package/src/extension/subagent-entry.ts +4 -1
- package/src/integrations/dsh/skills.ts +30 -0
- package/src/integrations/pi/skills.ts +52 -0
- package/src/model/history.ts +1 -0
- package/src/model/workspace-config.ts +10 -0
- package/src/pbot.ts +2 -3
- package/src/services/history/history-service.ts +15 -25
- package/src/services/workspace/workspace-config.ts +49 -0
- package/src/services/workspace/workspace-preparation.ts +8 -0
- package/src/storage/history-files.ts +53 -15
- package/src/ui/dsh/management.ts +20 -3
- package/docs/dsh-implementation-plan.md +0 -160
- package/docs/dsh-support-proposal.md +0 -298
- package/docs/dsh.en.md +0 -333
- package/docs/subagent-upgrade-proposal.md +0 -357
- package/docs/validation.md +0 -189
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,23 @@ 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 dsh Web integration
|
|
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.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Enable a workspace
|
|
10
|
+
|
|
11
|
+
After installation, open Pi or dsh in the target workspace and run `/pbot init` to initialize and enable it. Pi and dsh share the `.pbot/config.json` created by this command:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{ "enabled": true }
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A missing file or false leaves Personal Bot inactive, without packaged skills or pbot prompts, and directs the user to `init`. Pi's status bar and the dsh workspace page show the runtime state; `/pbot status` remains available. After manual configuration edits, use `/reload` in Pi or restart dsh. See [workspace configuration](docs/workspace-configuration.md) (Chinese).
|
|
10
18
|
|
|
11
19
|
## Install
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
### Pi setup wizard
|
|
22
|
+
|
|
23
|
+
Linux and macOS require Node.js 22.19+, npm, and Python 3.11+ with venv/ensurepip. Run in an interactive terminal:
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
26
|
npx personal-bot@latest setup
|
|
@@ -18,191 +28,132 @@ npx personal-bot@latest setup
|
|
|
18
28
|
npx personal-bot@latest setup --workspace ~/pbot-workspace
|
|
19
29
|
```
|
|
20
30
|
|
|
21
|
-
The wizard selects
|
|
31
|
+
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
32
|
|
|
23
|
-
Missing tmux is installed through an existing Homebrew or supported Linux package manager. Missing Python prerequisites produce repair instructions.
|
|
33
|
+
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
34
|
|
|
25
|
-
For a persistent short command, install the
|
|
35
|
+
For a persistent short command, install the CLI globally:
|
|
26
36
|
|
|
27
37
|
```bash
|
|
28
38
|
npm install -g personal-bot@latest
|
|
29
39
|
pbot setup
|
|
30
40
|
```
|
|
31
41
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
A core failure stops startup. If a configured Git or local directory source is missing or has no identifiable package name, setup stops and asks you to repair the source through Pi; it preserves the declaration. Existing standalone extension files remain supported. An optional plugin failure allows the other plugins to proceed and is reported before you choose whether to start Pi. Completed steps remain in place; fix the cause and rerun setup. There is no automatic rollback across package managers. See the [installation design](docs/installation-design.md) for scope and recovery rules.
|
|
42
|
+
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.
|
|
35
43
|
|
|
36
|
-
###
|
|
44
|
+
### Existing Pi installation
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
Run from the workspace root:
|
|
39
47
|
|
|
40
48
|
```bash
|
|
41
49
|
pi install --local npm:personal-bot
|
|
42
50
|
pi
|
|
43
51
|
```
|
|
44
52
|
|
|
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).
|
|
48
|
-
|
|
49
|
-
### Install from source
|
|
50
|
-
|
|
51
|
-
To try the installer from source:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
git clone https://github.com/realqiyan/personal-bot.git
|
|
55
|
-
cd personal-bot
|
|
56
|
-
npm ci --ignore-scripts
|
|
57
|
-
npm run build:cli
|
|
58
|
-
node bin/pbot.mjs setup
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
To load only the source extension:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
cd /path/to/workspace
|
|
65
|
-
pi install --local /absolute/path/to/personal-bot
|
|
66
|
-
pi
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Replace the example paths with your actual paths. A local installation loads the source directory directly, so keep that directory and its dependencies available.
|
|
53
|
+
`--local` saves the installation declaration in the project's `.pi/settings.json`. Once Pi starts, enter `/pbot init` in chat. A global installation can serve several explicitly enabled workspaces. Manage existing sources with `pi list` or `pi config`, keeping one active source per package.
|
|
70
54
|
|
|
71
|
-
###
|
|
55
|
+
### dsh
|
|
72
56
|
|
|
73
|
-
|
|
57
|
+
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:
|
|
74
58
|
|
|
75
59
|
```bash
|
|
76
60
|
npm install -g @deepseek-ai/dsh@latest pnpm@latest
|
|
77
|
-
|
|
78
|
-
pnpm --version
|
|
79
|
-
# First creation only: this replaces an existing profile of the same name.
|
|
61
|
+
# First creation only; this replaces an existing profile of the same name.
|
|
80
62
|
dsh --profile pbot --from-default-profile web --dump-config
|
|
81
63
|
dsh plugin --profile pbot add personal-bot@latest
|
|
82
64
|
dsh --profile pbot
|
|
83
65
|
```
|
|
84
66
|
|
|
85
|
-
|
|
67
|
+
Select the workspace and a main session in the browser, configure models and authentication, and run `/pbot init` to initialize and enable it. Enter `/pbot` in chat to open management or `/pbot status` to inspect state.
|
|
86
68
|
|
|
87
|
-
For
|
|
69
|
+
For later starts, run `dsh --profile pbot`. Stop active specialists and the server before updating the plugin:
|
|
88
70
|
|
|
89
71
|
```bash
|
|
90
|
-
npm install -g @deepseek-ai/dsh@latest
|
|
91
72
|
dsh plugin --profile pbot update personal-bot --latest
|
|
92
|
-
dsh plugin --profile pbot list personal-bot --depth 0
|
|
93
|
-
dsh --profile pbot
|
|
94
73
|
```
|
|
95
74
|
|
|
96
|
-
|
|
75
|
+
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.
|
|
97
76
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### Optional: Task Conductor
|
|
101
|
-
|
|
102
|
-
For scheduled tasks, recurring workflows, or DAGs, use the optional `task-conductor-plugin` and its shared `using-task-conductor` skill. The plugin and the `task-conductor` service are installed separately. Follow the [upstream integration guide](https://github.com/realqiyan/task-conductor/blob/master/docs/host-integrations.md) for service setup, connection settings, and updates.
|
|
103
|
-
|
|
104
|
-
**Pi:** Check `pi list` for an existing installation and its resource settings. For the published Pi integration, run from the workspace root:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
pi install --local npm:task-conductor-plugin
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
For unreleased plugin changes, use `pi install --local /absolute/path/to/task-conductor/plugin` instead. Keep one source enabled. Run `/reload` in Pi, then `/skill:using-task-conductor`. The skill covers service installation, `task-conductor setup`, and Pi's native MCP registration. `--local` limits plugin loading; choose MCP scope separately and reuse existing connections.
|
|
111
|
-
|
|
112
|
-
**dsh:** The native Host integration is included in the unpublished Task Conductor `0.1.6` release candidate. Until publication, build the plugin and matching service from that source, then install the plugin tarball into your existing Web profile:
|
|
77
|
+
### Use from source
|
|
113
78
|
|
|
114
79
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
80
|
+
git clone https://github.com/realqiyan/personal-bot.git
|
|
81
|
+
cd personal-bot
|
|
82
|
+
npm ci --ignore-scripts
|
|
83
|
+
npm run build:cli
|
|
84
|
+
node bin/pbot.mjs setup
|
|
119
85
|
```
|
|
120
86
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
The service keeps its own coordinator model configuration and `pi-durable` runtime. Using dsh as the host does not require the interactive Pi CLI. To also run task nodes with dsh, register the canonical absolute dsh executable through Task Conductor's admin CLI or Web interface as custom executor `dsh-acp`, with arguments `["--profile", "acp"]`. Follow the upstream skill's [custom ACP instructions](https://github.com/realqiyan/task-conductor/blob/master/plugin/skills/using-task-conductor/references/custom-acp.md); `dsh` is not a built-in executor ID. Nodes use their own dsh profile, authentication, tools, and environment.
|
|
87
|
+
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.md#从源码安装) (Chinese).
|
|
124
88
|
|
|
125
|
-
|
|
89
|
+
### Optional: Task Conductor
|
|
126
90
|
|
|
127
|
-
|
|
91
|
+
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).
|
|
128
92
|
|
|
129
|
-
|
|
93
|
+
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.md#task-conductor) (Chinese) and read `/using-task-conductor` in the main session.
|
|
130
94
|
|
|
131
|
-
|
|
95
|
+
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.
|
|
132
96
|
|
|
133
97
|
## Daily use
|
|
134
98
|
|
|
135
|
-
Describe the task directly: organize
|
|
99
|
+
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.
|
|
136
100
|
|
|
137
101
|
| Command | Purpose |
|
|
138
102
|
| --- | --- |
|
|
139
103
|
| `/pbot` | Open the workspace menu |
|
|
140
|
-
| `/pbot init` |
|
|
141
|
-
| `/pbot status` |
|
|
142
|
-
| `/pbot history [text]` | Search
|
|
143
|
-
| `/pbot agents` | Inspect
|
|
144
|
-
| `/pbot teams` | Inspect teams and public messages; start rounds, pause,
|
|
145
|
-
| `/pbot python setup` | Retry shared
|
|
104
|
+
| `/pbot init` | Enable the workspace and create missing material directories and root `AGENTS.md` |
|
|
105
|
+
| `/pbot status` | Inspect activation, workspace, version, and Python state |
|
|
106
|
+
| `/pbot history [text]` | Search exchanges and summaries, then read originals |
|
|
107
|
+
| `/pbot agents` | Inspect, enter, rename, stop, or send instructions to specialists |
|
|
108
|
+
| `/pbot teams` | Inspect teams and public messages; start rounds, pause, or close |
|
|
109
|
+
| `/pbot python setup` | Retry shared Python preparation |
|
|
146
110
|
| `/reload` | Pi's native command to reload extensions and resources |
|
|
147
111
|
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
150
|
-
- **
|
|
151
|
-
- **
|
|
152
|
-
- **
|
|
153
|
-
- **
|
|
154
|
-
- **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).
|
|
155
|
-
- **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.
|
|
156
|
-
|
|
157
|
-
Main and child transcripts use Pi's native session storage. Use `pi --resume` to select a chat explicitly; `pi --continue` may select the most recently active child. Enter managed children through `/pbot agents`; stopped children reopen their saved session idle, without calling a model. Use `pbot_agent resume` to restart with a new instruction. Never open a second writer for a running child's session file. Do not resend a potentially side-effecting operation merely because a session resumed.
|
|
112
|
+
- **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`.
|
|
113
|
+
- **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).
|
|
114
|
+
- **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).
|
|
115
|
+
- **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).
|
|
116
|
+
- **Python:** Enabled workspaces share one venv for the current user. Workspace activation 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.
|
|
117
|
+
- **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.
|
|
158
118
|
|
|
159
|
-
|
|
119
|
+
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.
|
|
160
120
|
|
|
161
121
|
## Workspace materials
|
|
162
122
|
|
|
163
123
|
| Location | Purpose |
|
|
164
124
|
| --- | --- |
|
|
165
|
-
|
|
|
166
|
-
| `
|
|
125
|
+
| `.pbot/config.json` | Shared Pi/dsh workspace activation and configuration |
|
|
126
|
+
| `AGENTS.md` | Navigation and working agreements |
|
|
127
|
+
| `areas/`, `projects/` | Long-term goals, tasks, conclusions, and deliverables |
|
|
167
128
|
| `knowledge/` | Reusable concepts, methods, and analysis definitions |
|
|
168
|
-
| `.
|
|
169
|
-
| `providers/` |
|
|
170
|
-
| `scratch/` | Temporary scripts,
|
|
171
|
-
| `agents/`, `.agents/skills/` |
|
|
172
|
-
|
|
173
|
-
Fetch data that can be queried again when needed, using the recorded definitions.
|
|
129
|
+
| `.pbot/history/` | Pi/dsh exchanges, summaries, and node links |
|
|
130
|
+
| `providers/` | External tool guidance, data definitions, and sources |
|
|
131
|
+
| `scratch/` | Temporary scripts, calculation data, downloads, and environments |
|
|
132
|
+
| `agents/`, `.agents/skills/` | Role additions and workspace skills |
|
|
174
133
|
|
|
175
|
-
|
|
134
|
+
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).
|
|
176
135
|
|
|
177
|
-
## Updates and
|
|
136
|
+
## Updates and operating scope
|
|
178
137
|
|
|
179
|
-
Current release: **0.2.
|
|
138
|
+
Current release: **0.2.10**. 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.
|
|
180
139
|
|
|
181
|
-
|
|
140
|
+
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.
|
|
182
141
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
## Trust and risks
|
|
186
|
-
|
|
187
|
-
- Personal Bot provides no per-tool permission system or unified approval gate. CLI, MCP, Bash, Python, and extensions have the permissions of their actual accounts and credentials. They are not sandboxed. Use read-only credentials, service-side controls, or a restricted environment for hard limits.
|
|
188
|
-
- Tool availability is not user authorization. Research, connection setup, and validation do not authorize trades, transfers, or ledger changes.
|
|
189
|
-
- 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.
|
|
190
|
-
- 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.
|
|
191
|
-
|
|
192
|
-
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.
|
|
142
|
+
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).
|
|
193
143
|
|
|
194
144
|
## Development and documentation
|
|
195
145
|
|
|
146
|
+
Development for both hosts uses Linux and Node.js 24.9+. After installing locked dependencies, run:
|
|
147
|
+
|
|
196
148
|
```bash
|
|
197
149
|
npm run check
|
|
198
150
|
npm test
|
|
199
151
|
git diff --check
|
|
152
|
+
npm pack --dry-run
|
|
200
153
|
```
|
|
201
154
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
The README is available in English and Simplified Chinese. Detailed design documents and bundled guides are currently primarily in Chinese.
|
|
155
|
+
`npm test` includes smoke and E2E tests and generates `dist/` for tests and `lib/` for distribution. Pi loads source at runtime.
|
|
205
156
|
|
|
206
|
-
- [
|
|
207
|
-
- [npm
|
|
208
|
-
- [Domain
|
|
157
|
+
- [Documentation index](docs/README.md): current architecture, usage, and development guidance.
|
|
158
|
+
- [npm release](docs/release.md): candidate checks, configuration, and publication.
|
|
159
|
+
- [Domain terms](CONTEXT.md).
|