@standardagents/code 0.13.0 → 0.13.2

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 CHANGED
@@ -17,14 +17,22 @@
17
17
  **A best-in-class terminal coding agent.**
18
18
 
19
19
  The LLM loop runs remotely on a [Standard Agents](https://github.com/standardagents) instance;
20
- every filesystem and shell tool executes locally on your machine via this CLI — so the agent
21
- works in *your* environment, against *your* code, with *your* permissions.
20
+ every filesystem and shell tool executes on your own machine, through that machine's Standard
21
+ Code **daemon** — so the agent works in *your* environment, against *your* code, with *your*
22
+ permissions. The CLI is the terminal you watch and steer it from, and it never executes tools
23
+ itself: a session survives closing the terminal, and any client can attach to it.
22
24
 
23
25
  ```
24
26
  ┌─────────────────────────┐ bridge (WebSocket) ┌──────────────────────┐
25
- │ Standard Agents instance│ ── tool_request ──────────────▶ │ Standard Code CLI
27
+ │ Standard Agents instance│ ── tool_request ──────────────▶ │ Standard Code daemon
26
28
  │ (the agent's LLM loop) │ ◀──────────── tool_response ── │ (your machine) │
27
29
  └─────────────────────────┘ └──────────────────────┘
30
+ │ ▲
31
+ │ conversation, steering, approvals │ same machine,
32
+ ▼ │ or a VPS
33
+ ┌─────────────────────────┐
34
+ │ Standard Code CLI │ the terminal you watch and steer from
35
+ └─────────────────────────┘
28
36
  ```
29
37
 
30
38
  </div>
@@ -51,8 +59,13 @@ we're letting new folks in every week.
51
59
 
52
60
  ## Why Standard Code
53
61
 
54
- - **Your machine, your rules.** Tools run on your host — read/write/edit files, list, grep, glob,
55
- bash, delete — never in some sandboxed cloud container. The agent edits the same files you do.
62
+ - **Your machine, your rules.** Tools run on your own machines — read/write/edit files, list,
63
+ grep, glob, bash, delete — never in some sandboxed cloud container. The agent edits the same
64
+ files you do.
65
+ - **The daemon is the executor.** Every machine that runs sessions installs one
66
+ (`standardcode daemon install`); the CLI, web console, and macOS app all attach as clients.
67
+ Work continues on that machine after you close the terminal, and a machine without a daemon
68
+ still runs the full CLI as a watcher of sessions executing elsewhere.
56
69
  - **Permission-aware by design.** A single auto-accept level (1–5) controls what runs unattended;
57
70
  anything riskier prompts you first. A catastrophic-command guard blocks dangerous shell calls
58
71
  at *every* level, so you can't accidentally `rm -rf` your way into a bad day.
@@ -65,9 +78,10 @@ we're letting new folks in every week.
65
78
  transitions, stream and idle execution-bridge heartbeats use Durable Object hibernation
66
79
  auto-responses, and transcript safety requests run only while the agent is active. The bridge
67
80
  switches to an observable liveness heartbeat only during a forwarded tool or approval, so
68
- leaving a terminal attached does not continuously wake an idle thread. A machine daemon keeps
69
- one account user stream and opens a per-thread execution bridge only while forwarded work is
70
- active.
81
+ leaving a terminal attached does not continuously wake an idle thread. Each running client owns
82
+ one account user stream; a machine daemon opens a per-thread execution bridge only while
83
+ forwarded work is active. Stream transitions update machine presence once. Remote filesystem
84
+ responses arrive through account events and trigger one response read, with no response loop.
71
85
  - **Subagents & research built in.** Delegate focused subtasks to a coding subagent, or spin up a
72
86
  non-blocking web-research agent that returns source-backed findings.
73
87
  - **MCP, first-class.** The CLI is a Model Context Protocol host — connect local MCP servers
@@ -83,8 +97,11 @@ we're letting new folks in every week.
83
97
 
84
98
  ## Quick start
85
99
 
86
- Standard Code is a zero-dependency CLI (Node built-ins only). For local development it
87
- runs through `tsx`; published builds are bundled with `tsup`:
100
+ Standard Code has one exact runtime dependency on its version-matched
101
+ `@standardagents/code-network` package. Both packages use Node built-ins and
102
+ web-platform APIs without third-party runtime dependencies. For local
103
+ development the CLI runs through `tsx`; published builds are bundled with
104
+ `tsup`:
88
105
 
89
106
  ```bash
90
107
  pnpm install # installs dev dependencies
@@ -120,8 +137,14 @@ environment on the instance — shared by the CLI, web console, and macOS app
120
137
  and the CLI itself never sees or stores the OpenAI key. Sama One sessions are
121
138
  not limited by the simultaneous-thread lease.
122
139
 
123
- You only do this once per machine. It then offers to **resume** a session tagged for this
124
- project + machine, or **start a new one**.
140
+ You only do this once per machine. Session start then asks **where the session should run**
141
+ this machine or any machine whose daemon is online — and offers to **resume** a session for that
142
+ project or **start a new one**.
143
+
144
+ The first time you choose this machine, the CLI offers to install its daemon in one keypress
145
+ (the same flow as `standardcode daemon install`), because that daemon is what runs sessions
146
+ here. Declining leaves local execution unavailable; remote machines and watching stay available,
147
+ and the command sets it up any time.
125
148
 
126
149
  Use `--endpoint [url]` or `-e [url]` to point a single CLI run at a different Standard Agents
127
150
  instance (local dev, self-hosted). If you omit the URL, the CLI prompts for it. Tokens are
@@ -138,14 +161,16 @@ remembered per endpoint, but this override does not change the saved default end
138
161
 
139
162
  ## Features
140
163
 
141
- - **Forwarded tools** executed on your host: read/write/edit files, list, grep, glob, bash, delete.
164
+ - **Forwarded tools** executed by the session's machine daemon: read/write/edit files, list,
165
+ grep, glob, bash, delete.
142
166
  - **Permissions**: a single auto-accept level 1–5 (shift-tab cycles it); risky calls prompt;
143
167
  a catastrophic-command guard blocks dangerous shell commands at every level.
144
168
  - **Durable, resumable** long-running/permission-gated tool calls (park & resume over HTTP).
145
169
  - **Background processes** tracked in the thread (survive resume from any machine).
146
170
  - **Subagent delegation** and non-blocking web research.
147
- - **MCP (Model Context Protocol)**: connect local MCP servers — the CLI is the MCP host,
148
- negotiating JSON-RPC over stdio. Manage them with `/mcp`; install new ones in natural
171
+ - **MCP (Model Context Protocol)**: connect MCP servers on your machine — the daemon is the MCP
172
+ host, negotiating JSON-RPC over stdio. Manage the machine's server list with `/mcp` (the daemon
173
+ connects the enabled ones when it next starts a session there); install new ones in natural
149
174
  language ("install the playwright mcp server") and the agent researches + installs them.
150
175
 
151
176
  ---
@@ -162,13 +187,15 @@ pnpm test # typecheck + MCP client/protocol + install actuator (no bac
162
187
 
163
188
  Standard Code is the **client** half of a two-part system. The agent loop and tool definitions
164
189
  live on the Standard Agents instance ([agentbuilder](https://github.com/standardagents/agentbuilder));
165
- this CLI connects to a thread, executes the agent's forwarded tool calls on the host, and renders
166
- the session.
190
+ this CLI connects to a thread and renders, steers, and approves the session, while the machine
191
+ daemon (`src/daemon.ts`) executes the agent's forwarded tool calls.
167
192
 
168
193
  See **[`AGENTS.md`](./AGENTS.md)** for the full source map, bridge protocol, MCP internals,
169
194
  test layout, and contributor conventions.
170
195
 
171
- - Zero runtime dependencies — Node built-ins only, run via `tsx`. No build step for development.
196
+ - Two version-locked packages: `@standardagents/code` and its shared
197
+ `@standardagents/code-network` client. Both use Node built-ins and
198
+ web-platform APIs without third-party runtime packages.
172
199
  - `src/progressive-markdown.ts` is the canonical structured streaming parser shared with the web
173
200
  and native heads. Run `pnpm markdown:sync` after changing it and `pnpm markdown:check` in CI.
174
201
  - The hosted instance's generated `src/session-state.ts` owns live-draft accumulation as well as