@standardagents/code 0.13.7 → 0.13.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/README.md +206 -9
- package/dist/index.js +327 -114
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -67,8 +67,13 @@ we're letting new folks in every week.
|
|
|
67
67
|
Work continues on that machine after you close the terminal, and a machine without a daemon
|
|
68
68
|
still runs the full CLI as a watcher of sessions executing elsewhere.
|
|
69
69
|
- **Permission-aware by design.** A single auto-accept level (1–5) controls what runs unattended;
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
higher-risk calls prompt you first. Operations explicitly marked as requiring permission prompt
|
|
71
|
+
regardless of their numeric risk unless you previously granted that exact tool. Accepting a risk
|
|
72
|
+
tier raises the shared thread level so every client displays and enforces the same policy. A
|
|
73
|
+
catastrophic-command guard blocks dangerous shell calls at *every* level.
|
|
74
|
+
- **Real project containment.** File destinations and background-process working directories are
|
|
75
|
+
checked through filesystem symlinks; any path that resolves outside the project always requires
|
|
76
|
+
a fresh human approval.
|
|
72
77
|
- **Durable, resumable sessions.** Long-running and permission-gated calls *park* and resume over
|
|
73
78
|
HTTP — a slow approval or a dropped socket can't kill your turn. Resume the same session from
|
|
74
79
|
any machine.
|
|
@@ -110,6 +115,169 @@ pnpm code <dir> # run against a project directory (defaults to cwd)
|
|
|
110
115
|
pnpm code --endpoint http://localhost:5178 <dir>
|
|
111
116
|
```
|
|
112
117
|
|
|
118
|
+
The parallel Rust TUI preview signs in, loads the shared machine → project →
|
|
119
|
+
session projection, and attaches through the same version-matched network
|
|
120
|
+
core. It owns the terminal's alternate screen and does not open native HTTP or
|
|
121
|
+
WebSocket connections. Terminals at least 100 columns wide keep the session
|
|
122
|
+
tree available as a full-height left column; Tab or its clickable divider
|
|
123
|
+
collapses it to a one-column rail with a vertically stacked `Tab` hint. A
|
|
124
|
+
one-column gutter separates that rail from the conversation while the
|
|
125
|
+
transcript, composer, and chat controls expand into the reclaimed space.
|
|
126
|
+
Narrower terminals show the session tree full-screen when focused and omit the
|
|
127
|
+
sidebar collapse control. An authenticated launch with no attached session uses
|
|
128
|
+
that same shell. A normal launch registers or refreshes the current directory
|
|
129
|
+
as a project and highlights its row without creating a thread. `--browse`
|
|
130
|
+
opens the account-wide picker without a project target. The sidebar remains
|
|
131
|
+
available while the right column presents a session-selection empty state.
|
|
132
|
+
Machine and project headings sit on the same left edge, sessions use one
|
|
133
|
+
shallow indentation step, and a blank row separates machines. A one-cell `⣿`
|
|
134
|
+
texture marks machine headings and continues through their divider. Machine
|
|
135
|
+
rows have no disclosure glyph; a collapsed machine instead shows its known
|
|
136
|
+
thread count, such as `(13)`; offline machines show that retained count too.
|
|
137
|
+
Collapsed projects likewise append their known thread count.
|
|
138
|
+
Each machine's green/red presence dot precedes its name. The leading texture
|
|
139
|
+
cell takes the branch accent only while that machine is active, hovered, or
|
|
140
|
+
keyboard-highlighted; inactive machine texture remains structural gray.
|
|
141
|
+
Machines receive stable colors from DMUX's eight-accent palette, so color
|
|
142
|
+
belongs to a branch rather than to global selection. Machine color is limited
|
|
143
|
+
to its texture/divider while the active machine name stays white. Project
|
|
144
|
+
headings and dividers remain structural gray at every state. Unrelated
|
|
145
|
+
hierarchy recedes to dark gray.
|
|
146
|
+
The attached project and thread use typography without persistent row fills;
|
|
147
|
+
the thread title inherits its machine accent. Hover or keyboard navigation uses
|
|
148
|
+
the same brighter row background for machines, projects, and threads;
|
|
149
|
+
navigated threads also add a `›` marker. Every thread has a status cell: hollow gray is idle, solid
|
|
150
|
+
blue is unread, and a green animated texture is working. Unread state uses the
|
|
151
|
+
shared core's account-scoped, message-recency watermark; opening a thread
|
|
152
|
+
advances that shared state, and background activity timestamps never create a
|
|
153
|
+
false unread dot.
|
|
154
|
+
Click a heading or select its name and press Enter to collapse it. Right moves
|
|
155
|
+
keyboard focus to the heading's complete `[+]` button; Enter activates it,
|
|
156
|
+
Left returns to the name, and Right again returns to an attached conversation.
|
|
157
|
+
The button is hidden until its row is hovered or keyboard-highlighted; while
|
|
158
|
+
hidden, the heading divider fills those final three cells instead of reserving
|
|
159
|
+
an empty control gap.
|
|
160
|
+
The project `[+]` opens a prospective session composer. The machine `[+]`
|
|
161
|
+
opens its structure-only directory picker and registers the chosen project
|
|
162
|
+
before opening that composer. The canonical thread is created when its first
|
|
163
|
+
message is submitted, so closing an untouched composer leaves no empty thread.
|
|
164
|
+
The composer takes keyboard focus and explains that the first message creates
|
|
165
|
+
the session.
|
|
166
|
+
An offline machine has no disclosure/collapse action and hides its retained
|
|
167
|
+
project/session branch. Its machine row keeps the last known thread count and
|
|
168
|
+
can still receive keyboard or mouse highlight, but its foreground remains gray
|
|
169
|
+
and activation does nothing. Creation controls are absent while that machine is
|
|
170
|
+
offline, and presence is checked again before a core request is sent.
|
|
171
|
+
Those actions use the shared core's `project.open`, `session.start`, and
|
|
172
|
+
`machines.fsBrowse` operations. The Rust face receives filesystem data and
|
|
173
|
+
canonical session metadata from the core.
|
|
174
|
+
Press Tab to reveal and focus sessions, use ↑/↓ or j/k and Enter to activate,
|
|
175
|
+
and press Esc or Tab to return to the composer. Clicking anywhere in the
|
|
176
|
+
expanded sidebar also transfers keyboard focus there, beginning on the clicked
|
|
177
|
+
row when there is one. Left from an empty composer
|
|
178
|
+
also reveals and focuses the sidebar; Left retains normal cursor movement when
|
|
179
|
+
the composer contains text. Activating a prospective or existing chat returns
|
|
180
|
+
keyboard focus to the conversation. Switching saves the current shared draft
|
|
181
|
+
before detaching, and never stops the session's remote work. While the selected
|
|
182
|
+
conversation loads, the full-height session tree stays mounted and only the
|
|
183
|
+
right chat column enters its loading state. Session rows also switch on one
|
|
184
|
+
click. Passive mouse motion gives clickable session rows a high-contrast
|
|
185
|
+
surface, highlights the sidebar toggle rail, Markdown
|
|
186
|
+
links, and the jump-to-latest pill, and asks supporting terminals such as
|
|
187
|
+
Ghostty for a pointer cursor. Redraws are coalesced until the semantic hover
|
|
188
|
+
target really changes. The transcript owns pane-local click-drag selection, so it copies
|
|
189
|
+
semantic Markdown text without Shift and never sweeps through the sidebar.
|
|
190
|
+
White is reserved for user text and high-value accents. Assistant prose and
|
|
191
|
+
tool, system, reasoning, and structural rows use sampled cool-gray tiers;
|
|
192
|
+
semantic states and Markdown keep muted accent colors. Live thought and answer blocks grow from a stable prefix,
|
|
193
|
+
so streamed chunks extend visible text without deleting and reflowing its
|
|
194
|
+
beginning. Running subagents retain a bounded list of their reads, searches,
|
|
195
|
+
edits, and other tool actions beneath the current activity phrase.
|
|
196
|
+
Settled reads and searches roll up under `Explored` while preserving every
|
|
197
|
+
action. Successful commands use one compact highlighted row. Failures retain
|
|
198
|
+
their complete output as a quiet gray block beneath the highlighted command,
|
|
199
|
+
and prose-like tool results share the transcript's word wrapper. Known
|
|
200
|
+
arguments and results receive muted semantic syntax colors. Consecutive edits
|
|
201
|
+
roll up under `Edited N files`; their complete red and green hunks fill the
|
|
202
|
+
available conversation width.
|
|
203
|
+
Thinking appears in an expandable block with an animated Braille texture while
|
|
204
|
+
the trace is active. Active traces start collapsed, and completed traces retain
|
|
205
|
+
a one-line disclosure. Click any thinking row to toggle its trace, or press Ctrl+T
|
|
206
|
+
to toggle the newest trace.
|
|
207
|
+
Releasing the button clears the highlight and shows `Copied text` in the status
|
|
208
|
+
row. Clicking anywhere in the active conversation column returns keyboard
|
|
209
|
+
focus to its composer without disrupting drag selection. Prose wraps at word
|
|
210
|
+
boundaries; long unbroken tokens and code still
|
|
211
|
+
hard-wrap to the pane. The complete loaded transcript remains scrollable with
|
|
212
|
+
the mouse wheel or Page Up/Page Down. Ctrl+Home jumps to the beginning and
|
|
213
|
+
Ctrl+End resumes bottom-follow; output that arrives while scrolled up leaves
|
|
214
|
+
the viewport anchored and shows a one-click “Jump to latest” pill at the bottom
|
|
215
|
+
of the conversation. The pill calls out new output when it arrives. Wheel bursts
|
|
216
|
+
accumulate between frames, preserving responsive trackpad motion instead of dropping input.
|
|
217
|
+
While a turn runs, an animated amber/coral/violet Braille status row stays
|
|
218
|
+
directly above the composer, after the optional `Session todos` card.
|
|
219
|
+
The composer and submitted user messages share one quiet filled rectangular
|
|
220
|
+
surface with a chevron gutter. One empty surface row sits above the editable
|
|
221
|
+
rows and one below, so the empty composer is three terminal rows; it grows
|
|
222
|
+
from one to eight content rows, wraps prose on word boundaries,
|
|
223
|
+
preserves hard newlines from Shift+Enter and multiline paste, and then scrolls
|
|
224
|
+
internally without displacing more of the transcript. Short conversations use
|
|
225
|
+
natural document flow: the composer and telemetry follow the final transcript
|
|
226
|
+
row, leaving unused space below. Once the transcript consumes the available
|
|
227
|
+
viewport, the composer stays pinned at the bottom and the transcript scrolls
|
|
228
|
+
above it. The mouse
|
|
229
|
+
wheel follows the pane under the pointer, so a capped composer scrolls without
|
|
230
|
+
moving the conversation; the next edit resumes caret-follow. Pastes over 1,000
|
|
231
|
+
characters render as an atomic cyan `[Pasted Content N chars]` element while
|
|
232
|
+
their exact text remains in the shared draft and submitted message. Backspace
|
|
233
|
+
or Delete at that element removes the complete paste. Enter sends or queues,
|
|
234
|
+
while Ctrl+Enter steers. Up/Down moves through visual editor
|
|
235
|
+
rows before recalling the core-backed per-thread sent history at the top or
|
|
236
|
+
bottom edge.
|
|
237
|
+
Structured session todos appear in a collapsible card above the composer. One
|
|
238
|
+
blank row separates the neutral teal-gray card from the transcript. Todo
|
|
239
|
+
descriptions and steps wrap to show their complete content. Escape promotes the
|
|
240
|
+
oldest queued message through the shared core. During active work with an empty
|
|
241
|
+
queue, Escape stops execution and releases the composer for a new message.
|
|
242
|
+
An offline runner does not make its cloud conversation disappear: the session
|
|
243
|
+
still opens for review, but the composer pauses instead of letting new work
|
|
244
|
+
silently wait for a missing executor. There is no separate offline banner; the
|
|
245
|
+
composer becomes a hollow, unfilled surface carrying the state inline. If work
|
|
246
|
+
is already waiting, it says `Waiting for <machine> — Esc stops`. Pushed machine-presence events unlock
|
|
247
|
+
the composer and restore the retained sidebar branch as soon as the daemon
|
|
248
|
+
reconnects; there is no presence poll or session relist.
|
|
249
|
+
The line beneath the composer is session telemetry rather than a persistent
|
|
250
|
+
keyboard cheat sheet: it shows the attached thread's agent, runner machine,
|
|
251
|
+
current working directory, running background-process count, and
|
|
252
|
+
compaction-scaled context usage. The muted path gets priority over the literal
|
|
253
|
+
`context` label. Full agent names stay visible at comfortable widths; only a
|
|
254
|
+
narrow footer abbreviates them (`Unlimited One` → `U1`, `Sama One` → `S1`)
|
|
255
|
+
before squeezing the deepest complete path breadcrumbs further.
|
|
256
|
+
The row ends with the old terminal face's five colored permission dots, so the
|
|
257
|
+
current effective auto-accept ceiling remains visible without adding another
|
|
258
|
+
row. Accepted risk grants raise the dots immediately and reconcile from the
|
|
259
|
+
persisted approval state. Approval requests show the tool summary, stated
|
|
260
|
+
reason, execution machine, five-dot risk level, and fully labeled decisions in
|
|
261
|
+
a bordered card. These
|
|
262
|
+
values come from the shared roster, session tree,
|
|
263
|
+
approvals, process registry, and context projections in the network core.
|
|
264
|
+
Headings, emphasis, links, lists, tables, quotes, and fenced code use
|
|
265
|
+
the same progressive parser contract as the TypeScript UI. PNG attachments use
|
|
266
|
+
Kitty Unicode placeholders in verified Kitty/Ghostty/WezTerm environments,
|
|
267
|
+
including configured tmux; other terminals keep the same layout and show a
|
|
268
|
+
text fallback:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
pnpm tui:rust
|
|
272
|
+
# Open the account-wide project picker:
|
|
273
|
+
pnpm tui:rust -- --browse
|
|
274
|
+
# Optional direct-attach fast path:
|
|
275
|
+
pnpm tui:rust -- --thread <thread-id>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
This preview is additive; the TypeScript CLI remains the normal entry point
|
|
279
|
+
while the Rust face is brought to feature parity.
|
|
280
|
+
|
|
113
281
|
Installed from npm:
|
|
114
282
|
|
|
115
283
|
```bash
|
|
@@ -149,9 +317,29 @@ The first time you choose this machine, the CLI offers to install its daemon in
|
|
|
149
317
|
here. Declining leaves local execution unavailable; remote machines and watching stay available,
|
|
150
318
|
and the command sets it up any time.
|
|
151
319
|
|
|
320
|
+
Manage the local daemon from any shell:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
standardcode daemon status
|
|
324
|
+
standardcode daemon restart
|
|
325
|
+
standardcode daemon update
|
|
326
|
+
standardcode daemon add-project /absolute/path/to/project
|
|
327
|
+
standardcode daemon uninstall
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
`restart` immediately reloads the installed launchd or systemd service. `update` lets active tool
|
|
331
|
+
calls finish, installs the latest Standard Code package, and restarts the daemon.
|
|
332
|
+
|
|
152
333
|
Use `--endpoint [url]` or `-e [url]` to point a single CLI run at a different Standard Agents
|
|
153
334
|
instance (local dev, self-hosted). If you omit the URL, the CLI prompts for it. Tokens are
|
|
154
335
|
remembered per endpoint, but this override does not change the saved default endpoint.
|
|
336
|
+
Endpoints without a scheme default to `https://`; using plaintext local development requires an
|
|
337
|
+
explicit URL such as `http://localhost:5178`.
|
|
338
|
+
|
|
339
|
+
For HTTPS on a loopback, private, `.local`, or `.localhost` endpoint, the CLI can relax certificate
|
|
340
|
+
verification for its own instance connections. That process-local setting is stripped from every
|
|
341
|
+
browser, shell, background process, package-manager, git, clipboard, and ripgrep child so local
|
|
342
|
+
development never disables TLS verification in unrelated commands.
|
|
155
343
|
|
|
156
344
|
### Requirements
|
|
157
345
|
|
|
@@ -166,8 +354,10 @@ remembered per endpoint, but this override does not change the saved default end
|
|
|
166
354
|
|
|
167
355
|
- **Forwarded tools** executed by the session's machine daemon: read/write/edit files, list,
|
|
168
356
|
grep, glob, bash, delete.
|
|
169
|
-
- **Permissions**: a
|
|
170
|
-
|
|
357
|
+
- **Permissions**: a shared auto-accept level 1–5 (shift-tab cycles it); accepting a risk tier
|
|
358
|
+
raises the stored thread level across clients; server-marked permission requests cannot be
|
|
359
|
+
downgraded by a model-supplied risk. A catastrophic-command guard blocks dangerous shell commands
|
|
360
|
+
at every level.
|
|
171
361
|
- **Durable, resumable** long-running/permission-gated tool calls (park & resume over HTTP).
|
|
172
362
|
- **Background processes** tracked in the thread (survive resume from any machine).
|
|
173
363
|
- **Subagent delegation** and non-blocking web research.
|
|
@@ -181,7 +371,8 @@ remembered per endpoint, but this override does not change the saved default end
|
|
|
181
371
|
## Tests
|
|
182
372
|
|
|
183
373
|
```bash
|
|
184
|
-
pnpm test #
|
|
374
|
+
pnpm test # TypeScript checks/tests plus Rust unit and PTY tests
|
|
375
|
+
pnpm check:rust # rustfmt and clippy with warnings denied
|
|
185
376
|
```
|
|
186
377
|
|
|
187
378
|
`scripts/run-tests.mjs` owns the explicit no-backend test manifest, prints each
|
|
@@ -203,10 +394,16 @@ test layout, and contributor conventions.
|
|
|
203
394
|
- Two version-locked packages: `@standardagents/code` and its shared
|
|
204
395
|
`@standardagents/code-network` client. Both use Node built-ins and
|
|
205
396
|
web-platform APIs without third-party runtime packages.
|
|
206
|
-
- `src/progressive-markdown.ts` is the canonical structured streaming parser
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
397
|
+
- `src/progressive-markdown.ts` is the canonical structured streaming parser used by every face.
|
|
398
|
+
The Node face-core sends its versioned documents to Rust, which handles
|
|
399
|
+
terminal layout and paint. Web receives an exact source copy, and macOS runs
|
|
400
|
+
the generated JavaScriptCore bundle. Shared vectors cover parser output and
|
|
401
|
+
Rust transport-schema compatibility.
|
|
402
|
+
Run `pnpm markdown:sync` after changing the authored TypeScript parser and
|
|
403
|
+
`pnpm markdown:check` in CI.
|
|
404
|
+
- The hosted instance authors the session-state reducer published through
|
|
405
|
+
`@standardagents/code-network`. It owns live-draft accumulation and busy/tool/message
|
|
406
|
+
reconciliation; a changed chunk ID is an alias, never permission to erase text.
|
|
210
407
|
- Commit messages use Conventional Commits, scope `cli` (e.g. `feat(cli): …`).
|
|
211
408
|
|
|
212
409
|
---
|