pum-agent 0.2.18-beta.1 → 0.2.20-beta.1
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/README.md +58 -327
- package/package.json +1 -1
- package/src/app.tsx +189 -52
- package/src/goal.ts +8 -29
- package/src/help-popup.tsx +1 -0
- package/src/main.tsx +6 -2
- package/src/news.ts +15 -27
- package/src/relocation.ts +6 -33
- package/src/replay.ts +38 -36
- package/src/sandbox/index.ts +79 -0
- package/src/session-companion.ts +94 -0
- package/src/session-settings.ts +17 -35
- package/src/settings-popup.tsx +2 -0
- package/src/settings.ts +6 -0
- package/src/subagents/manager.ts +113 -31
- package/src/todo.ts +20 -34
- package/src/tool-groups.ts +28 -32
- package/src/tool-line.ts +2 -0
- package/src/tool-row.ts +75 -0
- package/src/transcript-dwell.ts +240 -0
- package/src/transcript-output.ts +15 -10
- package/src/transcript.tsx +212 -139
- package/src/triggers/tools.ts +15 -1
- package/src/user-bash.ts +51 -0
package/README.md
CHANGED
|
@@ -13,74 +13,77 @@ Plan, edit, run commands, review Markdown, and coordinate parallel Git worktrees
|
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
## Quick
|
|
16
|
+
## Quick start
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
bun i -g pum-agent@beta
|
|
20
20
|
pum
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
PUM opens the login panel automatically on the first start.
|
|
23
|
+
PUM opens the login panel automatically on the first start. Press `?` on an
|
|
24
|
+
empty prompt to see every control.
|
|
24
25
|
|
|
25
26
|
> [!WARNING]
|
|
26
|
-
> PUM can read, write, and delete files. Check mode adds deterministic policy
|
|
27
|
+
> PUM can read, write, and delete files. Check mode adds deterministic policy
|
|
28
|
+
> checks, and supported hosts can enforce native Bash isolation, but the
|
|
29
|
+
> file-tool sandbox is a process-local path guard, not operating-system
|
|
30
|
+
> isolation. Read [Safety](docs/security.md) before using untrusted workspaces.
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
The following screens are real OpenTUI renders captured through `tmux`. A local mock provider supplied the model output.
|
|
31
|
-
|
|
32
|
-

|
|
32
|
+

|
|
33
33
|
|
|
34
34
|
<details>
|
|
35
35
|
<summary><strong>Settings panel</strong></summary>
|
|
36
36
|
|
|
37
|
-

|
|
37
|
+

|
|
38
38
|
|
|
39
39
|
</details>
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Both are real OpenTUI renders, not mockups — `bun run scripts/capture-screenshots.tsx`
|
|
42
|
+
drives the actual TUI and converts the captured cells to SVG.
|
|
43
|
+
|
|
44
|
+
## What it does
|
|
45
|
+
|
|
46
|
+
- **A full coding loop** — `read`, `write`, `edit`, `bash`, and atomic `apply_patch`, with streaming Markdown, syntax highlighting, usage, cost, and Git status.
|
|
47
|
+
- **Parallel subagents** — persistent agents in isolated Git worktrees that message each other durably and report to their spawner. See [Subagents](docs/subagents.md).
|
|
48
|
+
- **Goals that outlive a turn** — `/goal` keeps working, reviewed after each turn by a judge that reads but never writes. See [Goals](docs/goals.md).
|
|
49
|
+
- **Supervised processes** — background shells and external triggers such as `gh run watch`, which wake the exact agent that was waiting. See [Tools](docs/tools.md).
|
|
50
|
+
- **Layered safeguards** — a path guard on the file tools, deterministic Check mode, and a native OS sandbox for the processes the model starts. See [Safety](docs/security.md).
|
|
51
|
+
- **A terminal-first look** — nine themes, semantic colour overrides, and optional animation. See [Appearance](docs/appearance.md).
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- **Parallel subagents:** Persistent agents work in isolated Git worktrees, communicate durably, and report lifecycle transitions to their direct spawners.
|
|
46
|
-
- **Prompt control:** Steer active work, answer model questionnaires, use an ownership-aware message cache, attach clipboard images, and resume sessions with metadata-rich history.
|
|
47
|
-
- **External triggers:** Supervise background commands such as `gh run watch` and automatically wake the exact target agent when they exit.
|
|
48
|
-
- **Provider choice:** Search the providers exposed by pi, or add an OpenAI-compatible custom endpoint.
|
|
49
|
-
- **Filesystem boundary:** `read`, `write`, and `edit` stay inside the project and configured allowed roots. `apply_patch` stays project-local.
|
|
50
|
-
- **Optional safeguards:** Turn on Check mode to gate `bash`, `edit`, `apply_patch`, and external-trigger process proposals. Supported hosts can also use native Bash sandboxing through Bubblewrap or Windows CreateProcessInSandbox.
|
|
51
|
-
- **Terminal-first appearance:** Nine themes, semantic color overrides, Unicode glyphs, and optional animation.
|
|
53
|
+
PUM uses [pi](https://github.com/earendil-works/pi) for the agent loop and
|
|
54
|
+
[OpenTUI](https://github.com/anomalyco/opentui) for rendering.
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
## Documentation
|
|
57
|
+
|
|
58
|
+
| Guide | Contents |
|
|
59
|
+
|---|---|
|
|
60
|
+
| [Command line](docs/cli.md) | Options, headless runs, sandboxed launches, environment |
|
|
61
|
+
| [Controls](docs/controls.md) | Keys, slash commands, shell command mode, copying, News |
|
|
62
|
+
| [Goals](docs/goals.md) | `/goal`, the judge, retries, stopping |
|
|
63
|
+
| [Subagents](docs/subagents.md) | Spawning, merging, previews, readonly children |
|
|
64
|
+
| [Tools](docs/tools.md) | Tool groups, patches, questionnaires, triggers, shells, todos |
|
|
65
|
+
| [Safety](docs/security.md) | Filesystem sandbox, Check mode, native sandbox, outer sandbox |
|
|
66
|
+
| [Appearance](docs/appearance.md) | Transcript detail, themes, Markdown, animation, title |
|
|
67
|
+
| [Configuration](docs/configuration.md) | Where PUM stores things, and what |
|
|
54
68
|
|
|
55
69
|
## Requirements
|
|
56
70
|
|
|
57
|
-
- [Bun](https://bun.sh)
|
|
71
|
+
- [Bun](https://bun.sh) — PUM runs on Bun, not Node
|
|
58
72
|
- Git
|
|
59
73
|
- An interactive terminal with ANSI/VT and Unicode support
|
|
60
74
|
- Credentials for a supported provider, or an OpenAI-compatible endpoint
|
|
61
75
|
|
|
62
|
-
Linux and macOS are the primary environments. Windows CI checks the code and
|
|
63
|
-
|
|
64
|
-
On Linux, native Bash sandboxing requires Bubblewrap (`bwrap`) and working unprivileged user namespaces. PUM probes a minimal sandbox launch; finding the executable alone is not sufficient. On Arch Linux, install the prerequisite separately with `sudo pacman -S --needed bubblewrap`.
|
|
65
|
-
|
|
66
|
-
On Windows, install Git for Windows. Ensure that `bash.exe` is in `PATH` or remains in its standard location. Use Windows Terminal with PowerShell. Do not use PowerShell ISE. Native Bash sandboxing uses the optional alpha `@microsoft/mxc-sdk` package and requires its `base-container` CreateProcessInSandbox tier. PUM deliberately rejects the SDK's AppContainer+DACL fallback because it can modify host ACLs.
|
|
76
|
+
Linux and macOS are the primary environments. Windows CI checks the code and
|
|
77
|
+
Windows path behaviour, but native Windows TUI operation is provisional.
|
|
67
78
|
|
|
68
|
-
|
|
79
|
+
Native Bash sandboxing is optional and platform-specific: on Linux it needs
|
|
80
|
+
Bubblewrap (`bwrap`) with working unprivileged user namespaces, which PUM probes
|
|
81
|
+
by launching a minimal sandbox rather than by finding the executable; on Windows
|
|
82
|
+
it uses the alpha `@microsoft/mxc-sdk` and its `base-container` tier. On Windows,
|
|
83
|
+
also install Git for Windows, keep `bash.exe` on `PATH`, and use Windows
|
|
84
|
+
Terminal with PowerShell — not PowerShell ISE.
|
|
69
85
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Windows Terminal and common Linux terminal emulators accept the title through OpenTUI. Inside `tmux`, PUM sets the active pane title. To copy that pane title to the outer terminal title, add this configuration:
|
|
73
|
-
|
|
74
|
-
```tmux
|
|
75
|
-
set -g set-titles on
|
|
76
|
-
set -g set-titles-string '#T'
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Keep `allow-set-title` enabled so applications can update the pane title. A `tmux` configuration can replace or suppress application titles. PUM cannot override that server policy.
|
|
80
|
-
|
|
81
|
-
## Install and start
|
|
82
|
-
|
|
83
|
-
### Install from source
|
|
86
|
+
## Install from source
|
|
84
87
|
|
|
85
88
|
```bash
|
|
86
89
|
git clone https://github.com/eugen1763/Pum.git
|
|
@@ -90,285 +93,13 @@ bun run login
|
|
|
90
93
|
bun run start
|
|
91
94
|
```
|
|
92
95
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Custom OpenAI-compatible provider fields accept terminal bracketed paste and local `Ctrl+V` clipboard paste for endpoint URLs and API keys. PUM routes pasted API keys directly to the login controller and renders only a length mask. Remote sessions do not invoke a local host clipboard command.
|
|
96
|
-
|
|
97
|
-
Resume the latest session for the current directory:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
bun run start -r
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Install the beta package
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
bun i -g pum-agent@beta
|
|
107
|
-
pum
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
The package is named `pum-agent` because the bare `pum` name is already owned. The installed command is still `pum`.
|
|
111
|
-
|
|
112
|
-
PUM runs on [Bun](https://bun.sh), not on Node. Install Bun first. `npm i -g pum-agent` copies the files, but `pum` then fails with `env: 'bun': No such file or directory`, because the command starts with `#!/usr/bin/env bun`.
|
|
113
|
-
|
|
114
|
-
## Command-line options
|
|
115
|
-
|
|
116
|
-
```text
|
|
117
|
-
pum [options]
|
|
118
|
-
pum login [options]
|
|
119
|
-
pum -p "<text>" [options]
|
|
120
|
-
pum s [login] [options] [directory[:ro|:rw] ...]
|
|
121
|
-
pum sr [login] [options] [directory[:ro|:rw] ...]
|
|
122
|
-
pum ss
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
| Option or command | Action |
|
|
126
|
-
|---|---|
|
|
127
|
-
| `-h`, `--help` | Print the command-line manual and exit |
|
|
128
|
-
| `-v`, `--version` | Print the exact `pum-agent` package version and exit |
|
|
129
|
-
| `-r`, `--resume` | Resume the latest session for the current directory |
|
|
130
|
-
| `-p`, `--prompt <text>` | Run one prompt without the TUI, print the answer, and exit |
|
|
131
|
-
| `--statsFile <path>` | Write a JSON statistics artifact after a headless run |
|
|
132
|
-
| `--override` | Let `--statsFile` replace an existing file |
|
|
133
|
-
| `--` | End the options; later arguments are directories |
|
|
134
|
-
| `login` | Start PUM with the provider login panel open |
|
|
135
|
-
| `s` | Start PUM in a writable outer `claudebox` sandbox |
|
|
136
|
-
| `sr` | Start PUM with the current directory read-only |
|
|
137
|
-
| `ss` | Check the `claudebox` runtime and protocol version |
|
|
138
|
-
|
|
139
|
-
Plain extra directories use the command default. Add `:ro` or `:rw` to select explicit access. `pum sr` always keeps the launch directory read-only, but it permits an explicit writable extra directory. A custom `PUM_DIR` must remain outside the project for `pum sr`.
|
|
140
|
-
|
|
141
|
-
Write `login` before the directories. PUM rejects a later `login` instead of mounting it. Put `--` before a directory whose name starts with a dash or is called `login`.
|
|
142
|
-
|
|
143
|
-
Help, version, and sandbox setup checks do not initialize the TUI, credentials, or sessions. Help and version print even when a later argument is invalid. Other unknown options and commands return an error and a help hint.
|
|
144
|
-
|
|
145
|
-
Set `PUM_DIR` to override PUM's complete configuration and data directory. Set `PUM_CLAUDEBOX` to select a specific `claudebox` executable. Run `pum --help` for a concise directory summary. Enter `?` on an empty in-app prompt to see all controls.
|
|
146
|
-
|
|
147
|
-
### Outer sandbox MVP
|
|
148
|
-
|
|
149
|
-
`pum s` and `pum sr` currently require Linux. On Windows, install PUM and `claudebox` inside WSL 2 and run the commands there.
|
|
150
|
-
|
|
151
|
-
PUM requires `claudebox` launcher protocol 1. Run `pum ss` to verify the executable and protocol. The runtime also needs `runsc`, `pasta`, `iptables`, `ip6tables`, `ip`, `nsenter`, and `unshare`.
|
|
152
|
-
|
|
153
|
-
The launcher hides the normal home mount. It mounts the project, explicit extra directories, the required PUM runtime files, and the PUM configuration directory. The sandboxed child uses the saved Check mode setting and disables nested Bubblewrap.
|
|
154
|
-
|
|
155
|
-
This MVP mounts the PUM configuration directory, including provider credentials, inside gVisor. When Check mode is on, it blocks credential access through supported tools, but it is not a second OS boundary. A host-side credential broker is planned for stronger separation.
|
|
156
|
-
|
|
157
|
-
## Essential controls
|
|
158
|
-
|
|
159
|
-
| Key | Action |
|
|
160
|
-
|---|---|
|
|
161
|
-
| `Enter` | Send or steer; while input mode is on, insert a new line |
|
|
162
|
-
| `Alt+I` | Toggle multiline input mode; the prompt gutter changes to `i` while active |
|
|
163
|
-
| `↑` on an empty prompt | Recall the newest queued user message for the selected agent |
|
|
164
|
-
| `Ctrl+Enter` / `Shift+Enter` | Insert a new line |
|
|
165
|
-
| `Alt+Enter` / `Ctrl+Alt+Enter` | Cache without sending; the Ctrl alias works around terminals that reserve Alt+Enter |
|
|
166
|
-
| `Tab` | Open the prompt cache on an empty input |
|
|
167
|
-
| `Shift+↑` / `Shift+↓` | Select a range of cached tasks |
|
|
168
|
-
| `Alt+V` | Attach an image from the graphical clipboard |
|
|
169
|
-
| `Ctrl+L` | Open the agent transcript selector |
|
|
170
|
-
| `Shift+Tab` / `Ctrl+Shift+Tab` | Cycle through agent transcripts |
|
|
171
|
-
| `Ctrl+H` | Open session history when reported distinctly; use `/history` otherwise |
|
|
172
|
-
| `Ctrl+N` | Open recent answers (News) |
|
|
173
|
-
| `n` / `p` in News | Jump to the answer / source |
|
|
174
|
-
| `Ctrl+End` | Scroll to the end of the selected transcript |
|
|
175
|
-
| `Ctrl+P` | Open settings |
|
|
176
|
-
| `Ctrl+T` | Open Processes for supervised triggers and shells |
|
|
177
|
-
| `Esc` twice | Cancel the selected working agent |
|
|
178
|
-
| `Ctrl+C` | Close the active popup, or clear a non-empty draft; on an empty prompt, press twice to quit |
|
|
179
|
-
| `?` | Show all controls when the prompt is empty |
|
|
180
|
-
|
|
181
|
-
Sent-prompt history with `↑` / `↓` is available in the main transcript. Wrapped or multiline drafts keep those keys for cursor movement. Subagent views still support empty-prompt queued-message recall.
|
|
182
|
-
|
|
183
|
-
Useful commands include `/login`, `/history`, `/news`, `/processes`, `/triggers`, `/check-path`, `/clear`, `/compress`, and `/worktree`. `/triggers` opens Processes directly on the Triggers tab.
|
|
184
|
-
|
|
185
|
-
For automated benchmarks, add `--statsFile <path>` to a headless `-p` run. PUM writes a versioned JSON artifact with run metadata and all `/stats` data. PUM creates missing parent directories. PUM rejects an existing file before startup unless `--override` is present. The alias `--stats-file` is also accepted.
|
|
186
|
-
|
|
187
|
-
### Copy transcript text
|
|
188
|
-
|
|
189
|
-
Drag across transcript text with the left mouse button. PUM copies the completed selection when you release the button.
|
|
190
|
-
|
|
191
|
-
- On local Windows, PUM first uses the native clipboard module. PUM then tries `clip.exe`.
|
|
192
|
-
- On local macOS, PUM first uses the native clipboard module. PUM then tries `pbcopy`.
|
|
193
|
-
- On local Linux, PUM tries `wl-copy`, `xclip`, or `xsel` when the matching display is available.
|
|
194
|
-
- Over SSH or Mosh, PUM sends OSC 52 through OpenTUI. OpenTUI wraps OSC 52 for detected `tmux` sessions.
|
|
195
|
-
|
|
196
|
-
Windows Terminal accepts OSC 52 from remote sessions. The terminal can still ask for clipboard-write approval.
|
|
197
|
-
|
|
198
|
-
For `tmux`, enable clipboard integration and passthrough when the server configuration blocks OSC 52:
|
|
199
|
-
|
|
200
|
-
```tmux
|
|
201
|
-
set -g set-clipboard on
|
|
202
|
-
set -g allow-passthrough on
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Reload the `tmux` configuration after this change. Use the terminal's Shift-drag selection as a manual fallback.
|
|
206
|
-
|
|
207
|
-
PUM limits remote OSC 52 payloads to 100,000 Base64 characters. This limit prevents large selections from corrupting terminal output.
|
|
208
|
-
|
|
209
|
-
### Recent answers (News)
|
|
210
|
-
|
|
211
|
-
Open the News popup with `Ctrl+N` or `/news`. It lists the final answers of user-initiated turns, newest first. Each entry shows the user prompt and any follow-up steers that produced the answer, above the answer itself.
|
|
212
|
-
|
|
213
|
-
- `←` / `→` — move between answers
|
|
214
|
-
- `n` — jump to the answer
|
|
215
|
-
- `p` — jump to the source prompt or completion notice
|
|
216
|
-
- `Space` — toggle an answer between read and unread
|
|
217
|
-
- `c` — copy the current answer to the clipboard
|
|
218
|
-
- `Enter` — reply to the current answer with a quoted draft
|
|
219
|
-
- `Esc` — close the popup
|
|
220
|
-
|
|
221
|
-
PUM marks an answer read automatically only when a new user prompt follows it directly in the transcript. If anything else appears between the answer and the next prompt — a subagent message, a trigger event, a queued message, or an in-progress stream — the answer stays unread.
|
|
222
|
-
|
|
223
|
-
## Parallel subagents
|
|
224
|
-
|
|
225
|
-
PUM runs up to 10 active subagents by default. Configure a limit from 1 through 25 in Settings. Only starting and running agents count toward the limit. Each subagent has these resources:
|
|
226
|
-
|
|
227
|
-
- A persistent pi session
|
|
228
|
-
- An isolated branch and worktree under `.pum/worktrees`
|
|
229
|
-
- Its own transcript, draft, usage data, and cancellation state
|
|
230
|
-
- Tools for progress messages and a single final completion report
|
|
231
|
-
|
|
232
|
-
Select a range of cached prompts and press `Enter`. The main agent can group related work and run independent groups in parallel. A managed merge requires both authoritative `completed` status and a persisted completion notice. Idle settlement is not completion. Successful managed merges remove the completed worktree and branch. A parent cannot finish, merge, or be removed until every retained descendant closes deepest-first.
|
|
233
|
-
|
|
234
|
-
Use `Ctrl+L` to select an agent transcript. Input then goes to that agent. Finished or interrupted agents remain available until PUM merges or removes them.
|
|
235
|
-
|
|
236
|
-
The public `spawn_subagent` tool accepts `preview: true`. PUM then shows the exact child task before it creates any worktree or session. Press `Enter` to approve. An optional note becomes a separate visible user instruction to the new child. Press `Esc` to cancel without creating a child. Cancellation discards the preview note because no child exists. PUM preserves the existing parent transcript draft.
|
|
237
|
-
|
|
238
|
-
When the Sandbox setting is `Auto` or `Require`, `spawn_subagent` also accepts `readonly: true`. A readonly child can inspect files and run sandboxed inspection commands. PUM omits `write`, `edit`, `apply_patch`, child spawning, inter-agent delegation, process-starting trigger tools, and message-cache mutation tools from that child. The remaining tool guard blocks unknown or mutation-capable child paths. Worktree access is limited to `list` and `status`. Bash requires an enforced native sandbox, receives read-only project, `/check-path`, and managed Git metadata roots, and receives no network access. If native enforcement is unavailable, readonly Bash blocks instead of using the `Auto` direct fallback. PUM persists readonly state across resume. Sandbox `Off` removes the argument from live spawn tool schemas and rejects any explicit readonly spawn request.
|
|
239
|
-
|
|
240
|
-
Press `↑` on an empty single-line prompt to recall the newest queued user-authored message for the selected transcript. PUM removes the message from the authoritative queue before restoring its text. PUM does not recall inter-agent, trigger, lifecycle, cache, delivered, or image-bearing messages.
|
|
241
|
-
|
|
242
|
-
Idle notices report settled work cycles to the direct spawner. They are not completion notices. PUM acknowledges completion delivery only after the notice enters the parent session. Persisted completion intent and stable message identifiers let interrupted delivery resume without duplicate completion messages.
|
|
96
|
+
Use `bun run start -r` to resume the latest session for the current directory,
|
|
97
|
+
and `/login` to add or update a provider later.
|
|
243
98
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
The `questionnaire` tool asks one or more questions inside PUM's OpenTUI interface. Each question provides selectable options and a custom-answer field. Use arrow keys or `Tab` to move and `Enter` to select. `Esc` cancels from the option view; while editing a custom answer, it returns to the options.
|
|
249
|
-
|
|
250
|
-
PUM returns structured answers to the requesting main agent or managed child agent. Custom text stays outside React labels and session data until the user explicitly submits the answer.
|
|
251
|
-
|
|
252
|
-
### Agent message cache
|
|
253
|
-
|
|
254
|
-
Main and managed child agents can list and read the current workspace message cache. Agent-created entries include exact ownership metadata.
|
|
255
|
-
|
|
256
|
-
Agents can add entries. An agent can delete only entries created by that exact agent. User-created and legacy entries remain user-owned.
|
|
257
|
-
|
|
258
|
-
The `message_cache_send` tool accepts stable entry IDs. Single entries use the selected agent delivery path. Multiple entries use main-agent worktree orchestration. PUM reserves selected entries during delivery and marks them executed only after delivery succeeds. Failed main or child delivery leaves the entries pending.
|
|
259
|
-
|
|
260
|
-
### External triggers
|
|
261
|
-
|
|
262
|
-
The trigger tools create process-local supervised commands with an executable and argument array. Trigger definitions can be listed, inspected, paused, resumed, cancelled, or run manually. Definitions disappear when PUM exits.
|
|
263
|
-
|
|
264
|
-
Use `Ctrl+T` or `/processes` to open the combined Processes view. `/triggers` is an alias that opens its Triggers tab. PUM limits definitions, pending deliveries, output size, run counts, repeat frequency, and lifetime. Output goes to a private temporary file and is removed after the triggered turn settles.
|
|
265
|
-
|
|
266
|
-
Trigger events target one exact main or retained child session. A missing session or child cancels its definitions instead of redirecting them. Check mode evaluates each process proposal without flattening its argument boundaries into shell text.
|
|
267
|
-
|
|
268
|
-
### Atomic `apply_patch`
|
|
269
|
-
|
|
270
|
-
`apply_patch` supports add, update, delete, move, multiple files, and multiple hunks. PUM validates the full patch before changing files. It rejects traversal, absolute paths, escaping symlinks, path conflicts, and ambiguous context. A failed commit restores all touched files.
|
|
271
|
-
|
|
272
|
-
### Filesystem sandbox
|
|
273
|
-
|
|
274
|
-
The process-local filesystem sandbox validates `read`, `write`, `edit`, and `apply_patch` before execution.
|
|
275
|
-
|
|
276
|
-
- Project paths and `/check-path` roots are allowed.
|
|
277
|
-
- Credential-sensitive paths are blocked.
|
|
278
|
-
- Symbolic links and junctions in tool paths are blocked.
|
|
279
|
-
- `apply_patch` remains project-local and keeps its atomic validation.
|
|
280
|
-
|
|
281
|
-
This boundary does not isolate `bash`, package scripts, extensions, or trigger processes from the operating system. Use a container, VM, or policy-controlled sandbox for stronger isolation.
|
|
282
|
-
|
|
283
|
-
### Check mode
|
|
284
|
-
|
|
285
|
-
Select Check mode in `Ctrl+P` — either **Off** or **On**. It applies to `bash`, `edit`, `apply_patch`, and external-trigger process execution:
|
|
286
|
-
|
|
287
|
-
- **Off:** Checked tools run without the deterministic policy or the advisory verifier.
|
|
288
|
-
- **On:** The deterministic policy runs first, then an advisory verifier reviews the complete proposal.
|
|
289
|
-
|
|
290
|
-
On allows ordinary complete project-local calls, explicit on-mode external reads (read-only), and project-local edits. It accepts one direct `npm pack` only when lifecycle scripts are disabled, an explicit cache stays in an approved root, output stays in an approved root, and any package operand is one exact registry version. On also accepts one direct `npm install` of one exact registry version only when `--ignore-scripts`, an approved `--prefix`, and an approved `--cache` are explicit. File, Git, URL, tag, range, composed, general install, and global-install forms remain blocked. On hard-blocks external writes, location changes, execution operands, ambiguous path access, escaping links or junctions, credential access, privilege escalation, persistence, remote-script execution, destructive Git operations, and broad deletion. These hard blocks cannot be overridden and never open a popup.
|
|
291
|
-
|
|
292
|
-
On blocks an explicit verifier verdict of `UNSAFE`. An unclear, unavailable, failed, or timed-out review does not block a fully validated call. The only exception outside the verifier verdict is a deterministic match for a direct main-agent `npm publish` or `npm dist-tag add ... latest`, which On allows outright. The verifier category does not control this exception. Managed subagents cannot use it.
|
|
293
|
-
|
|
294
|
-
There is no approval popup and no approval store. Check mode is off by default.
|
|
295
|
-
|
|
296
|
-
Use `/check-path list`, `/check-path add <directory>`, `/check-path remove <directory>`, or `/check-path clear` to manage up to 16 additional directory roots for the current launch project. The filesystem sandbox applies these roots to `read`, `write`, and `edit`. Bash, edit, and external-trigger checks also use these roots; `apply_patch` remains project-local. Added roots are canonicalized and remain subject to credential, traversal, symlink or junction, broad-deletion, and other hard blocks.
|
|
297
|
-
|
|
298
|
-
For `edit` and `apply_patch`, PUM validates the complete proposed change before any mutation. Review data includes the unified diff, changed paths, line counts, sensitivity flags, project containment, and full-content SHA-256. Invalid, stale, malformed, escaping, or incompletely analyzed input blocks the call. Patch length alone does not block a complete validated on-mode call.
|
|
299
|
-
|
|
300
|
-
The verifier uses a structured decision schema. One unclear response can receive one bounded adjudication under the shared 15-second watchdog. On blocks aborts, malformed verifier replies, and incomplete analysis, and it blocks any explicit `UNSAFE` verdict. Check mode is off by default.
|
|
301
|
-
|
|
302
|
-
#### Native Bash sandbox
|
|
303
|
-
|
|
304
|
-
The **Sandbox** setting has three modes:
|
|
305
|
-
|
|
306
|
-
- **Auto:** Enforce the platform sandbox for Bash when available. If probing fails, retain deterministic Check mode and show one process-local warning that is not written to session context.
|
|
307
|
-
- **Require:** Block checked Bash calls unless native enforcement is available.
|
|
308
|
-
- **Off:** Do not sandbox Bash. Check mode policy and approval behavior remain unchanged.
|
|
309
|
-
|
|
310
|
-
Check mode **Off** always uses pi's normal unsandboxed Bash backend. For an active Check mode, PUM recomputes the sandbox policy from the exact approved command, authoritative working directory, configured additional roots, and deterministic access analysis. Model input cannot supply policy fields.
|
|
311
|
-
|
|
312
|
-
The project and configured additional roots are writable. Explicit on-mode external reads are mounted read-only. PUM configuration and common credential paths are denied, and credential-shaped or process-injection environment variables are removed. A private temporary directory is supplied for the command. Safe pi metadata such as `PI_PROVIDER`, `PI_MODEL`, and `PI_REASONING_LEVEL` remains available; session paths and identifiers are withheld.
|
|
313
|
-
|
|
314
|
-
Network access is denied unless deterministic analysis recognizes an approved network operation. Bubblewrap's host-network mode is all-or-nothing and is **not domain-filtered**. Windows similarly grants or withholds the SDK's broad network capabilities; it does not provide hostname allowlists.
|
|
315
|
-
|
|
316
|
-
The override uses pi's `createBashTool` implementation and custom Bash operations, preserving streaming, truncation, full-output files, rendering, timeout messages, abort handling, shell configuration, and child-tree cleanup. Only Bash commands are routed through this backend. PUM does not sandbox the TUI/model process itself.
|
|
317
|
-
|
|
318
|
-
External triggers preserve direct executable/argument boundaries and continue to use deterministic Check mode, but they are not routed through the native sandbox in this release. The trigger manager's synchronous spawn boundary does not carry the exact approved policy object into execution; silently recomputing a second process policy there would weaken approval identity. Trigger output, environment, limits, and process supervision remain unchanged.
|
|
319
|
-
|
|
320
|
-
The filesystem sandbox is a process-local path guard for `read`, `write`, `edit`, and `apply_patch`. It does not replace native Bash isolation and does not cover scripts, extensions, or trigger processes.
|
|
321
|
-
|
|
322
|
-
Verifier prompts stay bounded. For an oversized On-mode review, PUM sends complete validation metadata, counts, findings, and SHA-256 digests. PUM does not send a raw prefix or suffix as if it were complete.
|
|
323
|
-
|
|
324
|
-
### Hosted web search
|
|
325
|
-
|
|
326
|
-
Web search is on by default for supported OpenAI Codex providers. Searches appear as transcript tool rows and persist in resumed sessions. Other providers continue without the hosted search tool. Disable web search in `Ctrl+P`.
|
|
327
|
-
|
|
328
|
-
Setting **Output** to detailed adds a result preview under the tool row. Bash shows the last five lines of output, `write` shows the first thirty lines of the new file, and `edit` shows the patch. These limits are fixed; there is no setting for them.
|
|
329
|
-
|
|
330
|
-
### Themes and Markdown
|
|
331
|
-
|
|
332
|
-
PUM includes `tokyonight`, `gruvbox`, `catppuccin`, `nord`, `dracula`, `rosepine`, `solarized`, `kanagawa`, and `github-light`. Select a preset in `Ctrl+P`.
|
|
333
|
-
|
|
334
|
-
Create `theme.json` in the PUM config directory to override semantic tokens:
|
|
335
|
-
|
|
336
|
-
```json
|
|
337
|
-
{
|
|
338
|
-
"accent": "#ff7a93",
|
|
339
|
-
"userBg": "#2a2f45"
|
|
340
|
-
}
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
Markdown renders while streaming. OpenTUI provides syntax parsers for JavaScript, TypeScript, Zig, and Markdown. Other fenced languages still render as code blocks without syntax colors.
|
|
344
|
-
|
|
345
|
-
## Configuration and data
|
|
346
|
-
|
|
347
|
-
Set `PUM_DIR` to override the complete PUM data directory.
|
|
348
|
-
|
|
349
|
-
| Platform | Default directory |
|
|
350
|
-
|---|---|
|
|
351
|
-
| Linux | `$XDG_CONFIG_HOME/pum` or `~/.config/pum` |
|
|
352
|
-
| macOS | `~/Library/Application Support/pum` |
|
|
353
|
-
| Windows | `%LOCALAPPDATA%\pum`, with `%APPDATA%\pum` as fallback |
|
|
354
|
-
|
|
355
|
-
| Path | Purpose |
|
|
356
|
-
|---|---|
|
|
357
|
-
| `auth.json` | Provider credentials and custom-provider keys |
|
|
358
|
-
| `models.json` | Custom endpoints and model metadata; submitted keys are not stored here |
|
|
359
|
-
| `settings.json` | Model and thinking level managed by pi |
|
|
360
|
-
| `pum.json` | Theme, animation, thinking traces, transcript output, search, writing, explanation, Check mode, extra Check mode roots (`checkPaths`), sandbox, Bash output limits (`bashOutput`), and subagent settings |
|
|
361
|
-
| `theme.json` | Optional semantic color overrides |
|
|
362
|
-
| `history.json` | Prompt history by working directory |
|
|
363
|
-
| `prompt-stash.json` | Cached prompts by working directory (legacy filename) |
|
|
364
|
-
| `sessions/` | Main conversation sessions |
|
|
365
|
-
| `subagents/` | Persistent subagent sessions |
|
|
366
|
-
|
|
367
|
-
PUM preserves all cached prompt occurrences. PUM also keeps the 100 most recent additional sent-history occurrences for each working directory.
|
|
368
|
-
|
|
369
|
-
Session history shows the latest sent user-message time, on-disk JSONL size, and known outgoing, incoming, and cache-read token counts. Corrupt or partially written session lines do not prevent the history popup from opening.
|
|
370
|
-
|
|
371
|
-
PUM keeps this directory separate from pi's default configuration directory.
|
|
99
|
+
The published package is called `pum-agent` because the bare `pum` name is
|
|
100
|
+
taken; the installed command is still `pum`. `npm i -g pum-agent` copies the
|
|
101
|
+
files, but `pum` then fails with `env: 'bun': No such file or directory` —
|
|
102
|
+
install Bun first.
|
|
372
103
|
|
|
373
104
|
## Development
|
|
374
105
|
|
|
@@ -379,17 +110,17 @@ bun run typecheck
|
|
|
379
110
|
git diff --check
|
|
380
111
|
```
|
|
381
112
|
|
|
382
|
-
Run the TUI from the repository root
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
Use a throwaway `PUM_DIR` for local integration tests. Capture TUI output through `tmux`; do not pipe standard output. See [AGENTS.md](AGENTS.md) for architecture, locked decisions, and TUI test guidance.
|
|
113
|
+
Run the TUI from the repository root with `bun run start`, and refresh the
|
|
114
|
+
README images with `bun run scripts/capture-screenshots.tsx`. Use a throwaway
|
|
115
|
+
`PUM_DIR` for local integration tests, and capture TUI output through `tmux`
|
|
116
|
+
rather than piping standard output. [AGENTS.md](AGENTS.md) holds the
|
|
117
|
+
architecture, the locked decisions, and the TUI test guidance.
|
|
389
118
|
|
|
390
119
|
## Release status
|
|
391
120
|
|
|
392
|
-
PUM `0.2` is in beta. Interfaces and persisted formats can still change before
|
|
121
|
+
PUM `0.2` is in beta. Interfaces and persisted formats can still change before
|
|
122
|
+
the stable release. Review the release notes before upgrading sessions or custom
|
|
123
|
+
configuration.
|
|
393
124
|
|
|
394
125
|
## License
|
|
395
126
|
|