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/docs/dsh.en.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
# Using Personal Bot with dsh
|
|
2
|
+
|
|
3
|
+
English | [简体中文](dsh.md)
|
|
4
|
+
|
|
5
|
+
Personal Bot uses dsh's native Web interface for workspace materials, specialists, teams, history, and Python preparation. Pi and dsh share materials, roles, methods, and collaboration rules while owning their own native sessions, model settings, authentication, and MCP configuration.
|
|
6
|
+
|
|
7
|
+
Install and update with the latest dsh release. The minimum host version is `0.2.2-rc.1`. This guide separates terminal commands from `/pbot` chat commands; consult the installed version's help after updates.
|
|
8
|
+
|
|
9
|
+
## Installation and first start: CLI and browser
|
|
10
|
+
|
|
11
|
+
You need Node.js 24.9+, npm, pnpm, and Python 3.11+ with venv/ensurepip. Follow dsh's engines if a newer release raises its runtime requirement. Install through native profiles and plugin management:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm view @deepseek-ai/dsh@latest version engines --json
|
|
15
|
+
npm install -g @deepseek-ai/dsh@latest pnpm@latest
|
|
16
|
+
# First creation only; this replaces an existing profile of the same name.
|
|
17
|
+
dsh --profile pbot --from-default-profile web --dump-config
|
|
18
|
+
dsh plugin --profile pbot add personal-bot@latest
|
|
19
|
+
dsh --profile pbot
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`pbot` is a profile name you choose; use it consistently. Do not repeat `--from-default-profile` when updating an existing profile.
|
|
23
|
+
|
|
24
|
+
dsh starts the Web server and normally opens a browser. Over SSH or with `--no-open`, open the printed URL yourself; keep its access token private. Select a workspace and main session, configure models and authentication, then enter in chat:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
/pbot status
|
|
28
|
+
/pbot init
|
|
29
|
+
/pbot
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`status` inspects state; optional `init` creates missing material directories and root AGENTS while preserving existing files; bare `/pbot` opens management. Loading the plugin prepares the user's shared Python venv. If preparation fails, repair the prerequisites and run `/pbot python setup`.
|
|
33
|
+
|
|
34
|
+
One profile can manage multiple workspaces. Choose a directory through the native workspace picker; the default is the system Documents directory. pbot binds to the root at main-session creation. Later cwd changes affect relative path resolution.
|
|
35
|
+
|
|
36
|
+
## Daily startup and terminal commands
|
|
37
|
+
|
|
38
|
+
Start an existing profile directly. Use `Ctrl+C` in its foreground terminal to stop the server:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
dsh --profile pbot
|
|
42
|
+
# Choose a port without opening a browser automatically.
|
|
43
|
+
dsh --profile pbot --port 8080 --no-open
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Place launcher options before Web options. The configuration inspection commands below are for an existing profile. Do not add `--from-default-profile` unless you intend to recreate it.
|
|
47
|
+
|
|
48
|
+
| Command | Purpose |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `dsh --version` / `dsh -V` | Show the actual host version |
|
|
51
|
+
| `dsh --help` | Show launcher help |
|
|
52
|
+
| `dsh --profile pbot --help` | Show the profile's Web options |
|
|
53
|
+
| `dsh plugin --help` | Show the plugin command entry's help |
|
|
54
|
+
| `dsh --profile pbot` / `dsh pbot` | Start an existing profile |
|
|
55
|
+
| `dsh --profile pbot --dump-config` | Print the composed configuration and exit without starting the server |
|
|
56
|
+
| `dsh --profile pbot --dump-default-config` | Print bundle configuration without user overrides or command-line patches |
|
|
57
|
+
| `dsh --profile pbot --dump-config-schema` | Import plugin schemas and print the configuration structure without starting the server; use with trusted plugins |
|
|
58
|
+
| `dsh --profile pbot --patch /absolute/path/extra.yml` | Apply an additional patch for this invocation; repeatable, before Web options |
|
|
59
|
+
|
|
60
|
+
The three `--dump-*` options are mutually exclusive. Configuration output may contain private settings. Native profiles belong to dsh; they are not pbot workspace files.
|
|
61
|
+
|
|
62
|
+
| Web option | Purpose |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `--port 8080` | Choose a port; the default is 3080, and `--port 0` lets the OS choose a free port |
|
|
65
|
+
| `--no-open` | Start the server without opening a browser |
|
|
66
|
+
| `--host 127.0.0.1` | Bind one concrete local IPv4/IPv6 address; defaults to loopback and rejects wildcard addresses such as `0.0.0.0` and `::` |
|
|
67
|
+
| `--public-url https://app.example/` | Advertise a public URL; does not configure a proxy or grant access |
|
|
68
|
+
| `--trusted-host app.example` | Add a hostname or host:port accepted by the native Host/Origin check |
|
|
69
|
+
| `--tls-cert /path/server-chain.pem --tls-key /path/server-key.pem` | Supply a certificate chain and unencrypted PEM private key together to enable listener HTTPS |
|
|
70
|
+
|
|
71
|
+
For proxy, network access, and authentication settings, see the [native dsh Web documentation](https://github.com/deepseek-ai/deepseek-harness/tree/main/packages/bundle/web-app).
|
|
72
|
+
|
|
73
|
+
## Updating, inspecting, and removing plugins
|
|
74
|
+
|
|
75
|
+
Update the host, pnpm, and profile plugins separately. First pause teams, let in-flight work finish, and stop active specialists. Stop the corresponding server with `Ctrl+C`, then run:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g @deepseek-ai/dsh@latest pnpm@latest
|
|
79
|
+
dsh plugin --profile pbot update personal-bot --latest
|
|
80
|
+
dsh --version
|
|
81
|
+
pnpm --version
|
|
82
|
+
dsh plugin --profile pbot list personal-bot --depth 0
|
|
83
|
+
dsh --profile pbot
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`update personal-bot --latest` selects only Personal Bot for an update to the current `latest`, even when that is outside the saved version range. Without `--latest`, update respects the existing declaration. After updating, check the version and environment with `/pbot status`. Previous specialists need explicit resumption. Disabling or reloading the plugin can also release specialists.
|
|
87
|
+
|
|
88
|
+
Package arguments after `dsh plugin --profile pbot` are forwarded to pnpm. Select the correct profile:
|
|
89
|
+
|
|
90
|
+
| Command | Purpose |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `dsh plugin --profile pbot list --depth 0` | List the profile's direct dependencies |
|
|
93
|
+
| `dsh plugin --profile pbot list personal-bot --depth 0` | Show the installed Personal Bot version |
|
|
94
|
+
| `dsh plugin --profile pbot outdated personal-bot` | Check available updates; finding an outdated package can produce a nonzero exit code |
|
|
95
|
+
| `dsh plugin --profile pbot why personal-bot` | Show why the dependency is installed |
|
|
96
|
+
| `dsh plugin --profile pbot add personal-bot@latest` | Install Personal Bot from the registry |
|
|
97
|
+
| `dsh plugin --profile pbot update personal-bot --latest` | Update this plugin |
|
|
98
|
+
| `dsh plugin --profile pbot remove personal-bot` | Remove the plugin from this profile after stopping its work; preserve workspaces and history |
|
|
99
|
+
| `dsh plugin --profile pbot version-exemptions` | List the profile's saved native compatibility exemptions |
|
|
100
|
+
|
|
101
|
+
Use the native Plugins page to disable or enable a plugin temporarily and to manage desktop installations. Plugin changes affect sessions sharing the profile. If compatibility is rejected, first check `dsh --version`, the installed package version, and release notes. Compatibility exemptions are not a routine upgrade step. Exact-version `allow-version` / `revoke-version` operations are documented in the [native compatibility reference](https://github.com/deepseek-ai/deepseek-harness/tree/main/packages/boot/plugin-manager#version-compatibility-and-exemptions).
|
|
102
|
+
|
|
103
|
+
## Installing from source
|
|
104
|
+
|
|
105
|
+
For development or acceptance, generate a tarball containing the CLI, Host, and Web artifacts from the repository:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git clone https://github.com/realqiyan/personal-bot.git
|
|
109
|
+
cd personal-bot
|
|
110
|
+
npm ci --ignore-scripts
|
|
111
|
+
npm pack
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`npm pack` runs the checks and builds through prepack. Install the actual artifact's absolute path into an existing Web profile:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
dsh plugin --profile pbot add /absolute/path/to/personal-bot-<version>.tgz
|
|
118
|
+
dsh --profile pbot
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Rebuild and install a new tarball to update a local source. To switch to the registry, run `dsh plugin --profile pbot add personal-bot@latest`.
|
|
122
|
+
|
|
123
|
+
## Desktop application
|
|
124
|
+
|
|
125
|
+
In DeepSeek Harness, install and enable `personal-bot@latest` through **Plugins → Add plugin**, or enter an absolute local tarball path. Desktop provides its runtime and package manager. Update the host and plugins through the application.
|
|
126
|
+
|
|
127
|
+
Desktop uses its own desktop profile, separate from the CLI's pbot profile. It reads the login shell environment, where Python 3.11+ must be on PATH. After installation, select a workspace and main session and inspect the environment with `/pbot status`.
|
|
128
|
+
|
|
129
|
+
## Task Conductor
|
|
130
|
+
|
|
131
|
+
Use optional `task-conductor-plugin` for schedules, recurring workflows, and DAGs. Install the plugin and service separately; configuration and updates follow the [upstream integration guide](https://github.com/realqiyan/task-conductor/blob/master/docs/host-integrations.md).
|
|
132
|
+
|
|
133
|
+
The dsh integration is part of the unpublished Task Conductor 0.1.6 candidate. Until publication, build the plugin and service from the same source:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
cd /absolute/path/to/task-conductor
|
|
137
|
+
npm ci --ignore-scripts
|
|
138
|
+
npm pack
|
|
139
|
+
npm run pack:plugin
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Install using the actual generated tarball paths:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
dsh plugin --profile pbot add /absolute/path/to/task-conductor-plugin-<version>.tgz
|
|
146
|
+
npm install -g /absolute/path/to/task-conductor-<version>.tgz
|
|
147
|
+
task-conductor setup
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For an existing service, follow the [upstream upgrade steps](https://github.com/realqiyan/task-conductor/blob/master/docs/upgrades.md) and preserve its service directory and data. Desktop users install the same plugin tarball through the application's Plugins page.
|
|
151
|
+
|
|
152
|
+
Restart the host and read `/using-task-conductor` in the main session. Use `/task-conductor status` to inspect the connection and `/task-conductor connect` after configuration repairs. The plugin creates a native MCP connection; adjust any existing connection with the same name through the upstream guide.
|
|
153
|
+
|
|
154
|
+
Notifications return to the session that submitted the task. Service tasks continue when pages or hosts close. Query and stop the current run and future recurrences separately.
|
|
155
|
+
|
|
156
|
+
To execute nodes with dsh, follow the upstream [custom ACP instructions](https://github.com/realqiyan/task-conductor/blob/master/plugin/skills/using-task-conductor/references/custom-acp.md). Register `dsh-acp` with dsh's canonical absolute executable path and `["--profile", "acp"]` arguments. Configure node models, tools, authentication, and Python separately.
|
|
157
|
+
|
|
158
|
+
## Management interface and lifecycle
|
|
159
|
+
|
|
160
|
+
Select the bare `/pbot` action in the native input to open four tabs:
|
|
161
|
+
|
|
162
|
+
| Tab | Operations |
|
|
163
|
+
| --- | --- |
|
|
164
|
+
| Workspace | Source, directory, model, Python, and history preparation state; prepare materials or retry Python |
|
|
165
|
+
| Specialists | Create, rename, stop, explicitly resume; human chat, attachments, and full native records |
|
|
166
|
+
| Teams | Fixed members and roles, bounded rounds, pause, close, public originals, and long-message paging |
|
|
167
|
+
| History | Filter Pi/dsh archives and dates, read exchanges and summaries, and navigate parents and children |
|
|
168
|
+
|
|
169
|
+
Wide windows use side navigation; narrow windows use top navigation. Specialists can be filtered by name or state. Drafts and attachments are retained per specialist, and team drafts are retained separately.
|
|
170
|
+
|
|
171
|
+
Pages query native Remotes without starting specialists, acknowledging model notifications, or generating summaries. Human commands retain native audit records. Closing the panel cancels uploads not yet accepted. Closing, refreshing, or reconnecting a page does not stop accepted work. If an outcome is unclear, inspect status and records before taking further action.
|
|
172
|
+
|
|
173
|
+
Disabling the server component, releasing its parent Agent, or fully quitting Desktop pauses scheduling and releases the specialists it owns. Reopening a page, restarting the host, or enabling the plugin reads saved records; continuing work requires explicit resumption.
|
|
174
|
+
|
|
175
|
+
The main session needs a one-time native approval for write, edit, or apply_patch outside the original workspace. Those tools reject such changes from specialists. Bash, Python, MCP, and extensions use actual account permissions; see [tools and execution](capability-design.md).
|
|
176
|
+
|
|
177
|
+
## Chat command reference
|
|
178
|
+
|
|
179
|
+
Enter these commands in dsh chat, not in a terminal. JSON must be one object with double-quoted property names. Replace `AGENT_ID`, `TEAM_ID`, and `NODE_ID` with actual returned IDs. Apart from the bare `/pbot` Web action, commands return JSON text.
|
|
180
|
+
|
|
181
|
+
| Command | Purpose |
|
|
182
|
+
| --- | --- |
|
|
183
|
+
| `/pbot` | Open management in Web; direct server execution without arguments returns status |
|
|
184
|
+
| `/pbot status` | Inspect workspace, release, model, Python, history, specialists, and teams |
|
|
185
|
+
| `/pbot init` | Optionally create missing material directories and a missing root `AGENTS.md` |
|
|
186
|
+
| `/pbot python setup` | Retry shared Python preparation and activate it in the current Host process |
|
|
187
|
+
| `/pbot agent {"action":"list"}` | Manage specialists; all actions are listed below |
|
|
188
|
+
| `/pbot chat {"agentId":"AGENT_ID","text":"Additional instructions"}` | Human chat with optional files; first pauses the specialist's team automatically |
|
|
189
|
+
| `/pbot records {"agentId":"AGENT_ID"}` | Read a specialist's complete native event records |
|
|
190
|
+
| `/pbot team {"action":"list"}` | Manage teams and read public messages |
|
|
191
|
+
| `/pbot post {"teamId":"TEAM_ID","text":"Public information"}` | Post as the human user without waking a model |
|
|
192
|
+
| `/pbot history {"action":"search"}` | Search history archives; also supports read |
|
|
193
|
+
|
|
194
|
+
`chat`, `post`, and `records` do not take `action`. There is no `/pbot help`, `/pbot agents`, or `/pbot teams` subcommand in dsh; the two plural forms belong to Pi.
|
|
195
|
+
|
|
196
|
+
## Specialist commands
|
|
197
|
+
|
|
198
|
+
`/pbot agent` and the model tool `pbot_agent` share an input contract and reject unknown fields or fields belonging to another action:
|
|
199
|
+
|
|
200
|
+
| Action | Required fields besides action | Optional fields | Purpose |
|
|
201
|
+
| --- | --- | --- | --- |
|
|
202
|
+
| `start` | None | `name`, `message`, `prompts`, `files`, `provider`, `model`, `thinking`, `cwd`, `tools`, `noSkills` | Create a specialist and return after acceptance, without waiting for completion |
|
|
203
|
+
| `list` | None | None | List specialists for the current parent session |
|
|
204
|
+
| `status` | `agentId` | None | Inspect execution and the latest cycle without reading report text |
|
|
205
|
+
| `send` | `agentId`, `message` | `delivery` | Add a delegated task to a live specialist |
|
|
206
|
+
| `rename` | `agentId`, `name` | None | Rename a specialist |
|
|
207
|
+
| `read` | `agentId` | `cycleId`, `offset`, `limit` | Read one work cycle's final report without blocking |
|
|
208
|
+
| `stop` | `agentId` | None | Request stopping and preserve history; the result may still be stopping |
|
|
209
|
+
| `resume` | `agentId`, `message` | None | Resume a stopped specialist with a new request, without replaying previous work |
|
|
210
|
+
|
|
211
|
+
A start without initial text or files creates an idle specialist and makes no model call. It still needs a valid provider/model selection, inherited or explicit; select a model in dsh first. Each parent session allows at most 50 live, starting, or disposing specialists. They use independent native Agent/Session instances in the same process, require no tmux, and do not inherit the parent chat history.
|
|
212
|
+
|
|
213
|
+
| Start option | Meaning |
|
|
214
|
+
| --- | --- |
|
|
215
|
+
| `name` | A single-line name of 1–64 characters; defaults to the first eight characters of the ID |
|
|
216
|
+
| `message`, `prompts` | The message and each prompt contain 1–24000 characters; up to 32 prompts, combined with the message in order into one input |
|
|
217
|
+
| `files` | Up to 32 server file paths, relative to the original workspace root; files alone can start a task |
|
|
218
|
+
| `cwd` | Defaults to the original workspace root; relative paths are resolved against that root |
|
|
219
|
+
| `provider`, `model` | Native dsh provider route and model ID, each 1–128 characters; inherit the parent's selection by default |
|
|
220
|
+
| `thinking` | A native dsh reasoning effort ID; changing provider/model does not inherit another model's effort |
|
|
221
|
+
| `tools` | A nonempty array of native capability tool names, not the `run_code` transport name; team members must retain `pbot_team_message` |
|
|
222
|
+
| `noSkills` | Defaults to false; true disables model skill discovery and the skill tool; explicit user skill commands retain native behavior |
|
|
223
|
+
|
|
224
|
+
Specialist creation and resume apply the parent's native preset, including its file tools, AGENTS files, and skill discovery, before applying specialist tool restrictions. An explicit complete persona supplies its full behavior requirements through the host.
|
|
225
|
+
|
|
226
|
+
Pi-only `noExtensions`, `noPromptTemplates`, and `noContextFiles` are rejected. `send.delivery` is `steer` by default, to supplement current work, or `followUp`, for after current work. `send/resume` do not accept files, prompts, or model-change options. A team reservation blocks private send; pause the team and let in-flight work finish first.
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
/pbot agent {"action":"start","name":"Evidence reviewer"}
|
|
230
|
+
/pbot agent {"action":"send","agentId":"AGENT_ID","message":"Check the sources and list missing evidence.","delivery":"followUp"}
|
|
231
|
+
/pbot agent {"action":"rename","agentId":"AGENT_ID","name":"Source reviewer"}
|
|
232
|
+
/pbot agent {"action":"status","agentId":"AGENT_ID"}
|
|
233
|
+
/pbot agent {"action":"read","agentId":"AGENT_ID","offset":0,"limit":4000}
|
|
234
|
+
/pbot agent {"action":"stop","agentId":"AGENT_ID"}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
After confirming that the specialist has stopped, resume with a new request:
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
/pbot agent {"action":"resume","agentId":"AGENT_ID","message":"Check the new material and report only what changed."}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Report read selects the latest cycle by default. Offset defaults to 0; limit defaults to 16000, with a range of 1–16000 UTF-16 code units. For subsequent pages, keep the returned `cycle.cycleId` and pass `nextOffset` as offset; null means the current report is fully read. Inspect `cycle.state` and the report for work results. Human reads preserve the model's completion notification.
|
|
244
|
+
|
|
245
|
+
## Human chat and full records
|
|
246
|
+
|
|
247
|
+
`/pbot chat` requires `agentId` and accepts `text`, `delivery`, and `files`. Supply at least one of nonblank text, server files, or native input attachments. Text is limited to 24000 characters; delivery is `steer` by default or `followUp`. This command uses `text`, while agent commands use `message`.
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
/pbot chat {"agentId":"AGENT_ID","text":"Check the definitions in the attachment.","delivery":"steer","files":["projects/review/notes.txt"]}
|
|
251
|
+
/pbot records {"agentId":"AGENT_ID","offset":0,"limit":30}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Relative chat file paths use the specialist's cwd fixed at creation. Choose either server files or local input attachments, up to 32 per request. Image formats and byte limits follow native admission rules. Use native input controls for uploads; do not send a JSON `attachments` field. Chat automatically pauses the specialist's team first and rejects input if pausing fails. After a successful pause, it can steer in-flight work. A queued result means only that the input was queued. Human intervention creates interactive/mixed cycles that are not automatically published. Create a new specialist when you need a separate confidential context. The specialist must be live; resume it first if stopped.
|
|
255
|
+
|
|
256
|
+
`records` reads complete events, distinct from the final report returned by agent read. It can read stopped specialists without resuming them or acknowledging notifications.
|
|
257
|
+
|
|
258
|
+
| Read mode | Request fields and defaults | Continue reading |
|
|
259
|
+
| --- | --- | --- |
|
|
260
|
+
| Event list, without seq | `agentId`; `limit=30`, range 1–100 events; offset defaults to the most recent page, while explicit `offset=0` starts at the beginning | Returns events, total, nextOffset; pass nextOffset as offset |
|
|
261
|
+
| One event, with seq | `agentId`, `seq` from the list, ≥0; `format="json"` or `"text"`; `textOffset=0`; `textLimit=12000`, range 2–24000 | Keep seq/format and pass the returned nextOffset as **textOffset** |
|
|
262
|
+
|
|
263
|
+
Event text uses UTF-16 code units. Text format falls back to JSON when no text can be extracted. With seq, use textOffset/textLimit instead of the list's offset/limit. Replace the example seq with one returned by the list:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
/pbot records {"agentId":"AGENT_ID","seq":0,"format":"json","textOffset":0,"textLimit":12000}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Teams and public messages
|
|
270
|
+
|
|
271
|
+
`/pbot team` and the model tool `pbot_team` share these actions:
|
|
272
|
+
|
|
273
|
+
| Action | Required fields besides action | Optional fields | Purpose |
|
|
274
|
+
| --- | --- | --- | --- |
|
|
275
|
+
| `create` | `name`, `brief`, `members` | None | Create a fixed-membership team without calling a model |
|
|
276
|
+
| `list` | None | None | List teams |
|
|
277
|
+
| `status` | `teamId` | None | Inspect batches, reservations, and unconfirmed outcomes |
|
|
278
|
+
| `read` | `teamId` | `afterSeq`, `seq`, `offset`, `limit` | Read original public messages |
|
|
279
|
+
| `run` | `teamId`, `instruction`, `mode` | `rounds`, `maxConcurrent`, `timeoutSeconds` | Start a new batch |
|
|
280
|
+
| `pause` | `teamId` | None | Stop new scheduling while allowing in-flight work to finish |
|
|
281
|
+
| `close` | `teamId` | None | Close when no batch is running and no request remains in flight; preserve members and history |
|
|
282
|
+
|
|
283
|
+
Create requires a single-line name of 1–64 characters and a brief of 1–24000 characters. Members is an array of 1–50 `{agentId,role}` entries, with roles of 1–4000 characters. Members must be distinct, belong to this parent session, and not belong to another unclosed team. To change membership, close the old team and create another.
|
|
284
|
+
|
|
285
|
+
Run's instruction must be nonblank and at most 24000 characters. Mode is required: `roundRobin` runs members in order with concurrency 1; `parallel` runs them concurrently, completing every member in a round before the next round. `rounds` defaults to 2, range 1–10. For parallel mode, `maxConcurrent` defaults to min(2,member count), range 1–50 and no greater than the member count. `timeoutSeconds` defaults to 900, range 1–86400, for the whole batch. Run requires live, idle members with ready team integration and no pending private input.
|
|
286
|
+
|
|
287
|
+
First create two specialists, then use their actual IDs to create a team:
|
|
288
|
+
|
|
289
|
+
```text
|
|
290
|
+
/pbot team {"action":"create","name":"Evidence review","brief":"Check evidence quality and the limits of the conclusions.","members":[{"agentId":"AGENT_A","role":"Check primary sources"},{"agentId":"AGENT_B","role":"Review assumptions and counterarguments"}]}
|
|
291
|
+
/pbot post {"teamId":"TEAM_ID","text":"Use only the supplied material and list evidence gaps explicitly."}
|
|
292
|
+
/pbot team {"action":"run","teamId":"TEAM_ID","instruction":"Each member should report findings and unresolved questions.","mode":"parallel","rounds":1,"maxConcurrent":2,"timeoutSeconds":900}
|
|
293
|
+
/pbot team {"action":"status","teamId":"TEAM_ID"}
|
|
294
|
+
/pbot team {"action":"read","teamId":"TEAM_ID","afterSeq":0,"limit":4000}
|
|
295
|
+
/pbot team {"action":"pause","teamId":"TEAM_ID"}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Pause does not stop specialists. Wait until status reports `activeCount=0` before closing:
|
|
299
|
+
|
|
300
|
+
```text
|
|
301
|
+
/pbot team {"action":"close","teamId":"TEAM_ID"}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
There is no team resume action; continue by starting a new run with a new instruction. A paused team may still have in-flight requests. Unresolved results can include failures, unknown outcomes, or mixed input; query reports and actual status before continuing. Only normally completed, pure team responses are automatically published. See [specialist collaboration](agent-collaboration.md) for the full rules.
|
|
305
|
+
|
|
306
|
+
`/pbot post` requires teamId and nonblank text of at most 24000 characters. Optional `replyTo` references an existing message seq, ≥1. A stored result means only that the message was saved; it does not wake a model or add a round. Closed teams reject new posts. Human authors are user; the model tool `pbot_team_message` requires `action:"post"` or `action:"read"`, and the service determines coordinator/member authorship.
|
|
307
|
+
|
|
308
|
+
Public-message read defaults afterSeq to 0 and returns later messages. Seq starts at 1 and can select one message. Offset defaults to 0; a nonzero offset requires seq. Limit defaults to 16000, range 1–16000 UTF-16 code units across message bodies, not a message count. Finish a truncated body using its seq and `nextOffset`, then continue the list with the list's `nextAfterSeq` as afterSeq.
|
|
309
|
+
|
|
310
|
+
## History queries
|
|
311
|
+
|
|
312
|
+
`/pbot history` and the model tool `pbot_history` support these effective parameters:
|
|
313
|
+
|
|
314
|
+
| Action | Required fields | Optional fields and defaults |
|
|
315
|
+
| --- | --- | --- |
|
|
316
|
+
| `search` | action | `host` is pi/dsh, omitted for both; `query`, `sessionId`, `from`, `to`; `offset=0`; `limit=20`, range 1–50 matches |
|
|
317
|
+
| `read` | action, `id` | `host`; `offset=0`; `limit=12000`, range 1–24000 UTF-16 code units; `childrenOffset=0`, with a fixed page size of 20 children |
|
|
318
|
+
|
|
319
|
+
`query` performs case-insensitive substring search over ready exchanges and summaries. Omit it or use blank text to list sessions. `sessionId` filters native sessions; read's `id` is an archive node ID returned by a query, not a specialist ID. Date fields are **from/to**, not start/end. Use ISO timestamps with explicit time zones. A date-only to value such as `2026-11-07` means midnight UTC, not the end of that day.
|
|
320
|
+
|
|
321
|
+
```text
|
|
322
|
+
/pbot history {"action":"search","host":"dsh","query":"evidence","from":"2026-11-01T00:00:00+08:00","to":"2026-11-07T23:59:59.999+08:00","offset":0,"limit":20}
|
|
323
|
+
/pbot history {"action":"read","host":"dsh","id":"NODE_ID","offset":0,"limit":12000,"childrenOffset":0}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Search returns matches, total, nextOffset, and warnings. Retain the filters and use nextOffset for the next page. Read returns node: pass `node.nextOffset` as offset for text and `node.nextChildrenOffset` as childrenOffset for children. Follow IDs in parents/children to navigate. There is no childrenLimit parameter. Summaries provide leads; check important facts against original exchanges. History archives do not replace full specialist tool records.
|
|
327
|
+
|
|
328
|
+
Pi maintains `.pi/pbot/history/`, and dsh maintains `.dsh/pbot/history/`. Both query existing archives while updating and summarizing only their own source. Queries do not call a model. After a normal main interaction ends, idle preparation uses that host's current model to fill pending summaries; new human input cancels preparation first. See [history](history.md).
|
|
329
|
+
|
|
330
|
+
## Model tools
|
|
331
|
+
|
|
332
|
+
| Tool | Operations |
|
|
333
|
+
| --- | --- |
|
|
334
|
+
| `pbot_agent` | start, send, rename, status, list, read, stop, resume |
|
|
335
|
+
| `pbot_team` | create, list, status, read, run, pause, close |
|
|
336
|
+
| `pbot_team_message` | read, post; read uses team-read paging, and post takes teamId/text/optional replyTo |
|
|
337
|
+
| `pbot_history` | search, read |
|
|
338
|
+
|
|
339
|
+
Models use the actual tool schemas; people use the commands or management pages above. Chat and records are human management entries without model tools of the same names.
|