@junghanacs/entwurf 0.12.0 → 0.12.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +88 -28
  3. package/docs/setup-clean-host.md +117 -219
  4. package/mcp/entwurf-bridge/dist/mcp/entwurf-bridge/src/index.js +454 -0
  5. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-control-rpc.js +111 -0
  6. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-core.js +1683 -0
  7. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-deliverability.js +76 -0
  8. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-fact-provider.js +121 -0
  9. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-facts.js +155 -0
  10. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-peers-render.js +119 -0
  11. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-preflight.js +160 -0
  12. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-resume-args.js +63 -0
  13. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-self-address.js +81 -0
  14. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-contract.js +290 -0
  15. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-decider.js +254 -0
  16. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-lock.js +365 -0
  17. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-mailbox.js +64 -0
  18. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-production.js +218 -0
  19. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-release.js +108 -0
  20. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-resume-marker.js +33 -0
  21. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-runner.js +116 -0
  22. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-send-fallback.js +125 -0
  23. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-send.js +184 -0
  24. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-spawn-production.js +237 -0
  25. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-spawn.js +216 -0
  26. package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-surface.js +164 -0
  27. package/mcp/entwurf-bridge/dist/pi-extensions/lib/meta-mailbox-body.js +66 -0
  28. package/mcp/entwurf-bridge/dist/pi-extensions/lib/meta-session.js +1502 -0
  29. package/mcp/entwurf-bridge/dist/pi-extensions/lib/session-id.js +50 -0
  30. package/mcp/entwurf-bridge/dist/pi-extensions/lib/socket-discovery.js +259 -0
  31. package/mcp/entwurf-bridge/dist/pi-extensions/lib/socket-probe.js +81 -0
  32. package/mcp/entwurf-bridge/dist/protocol.js +29 -0
  33. package/mcp/entwurf-bridge/start.sh +49 -7
  34. package/mcp/entwurf-bridge/test.sh +12 -3
  35. package/mcp/entwurf-bridge/tsconfig.build.json +42 -0
  36. package/package.json +30 -9
  37. package/pi/meta-bridge/.claude-plugin/marketplace.json +0 -1
  38. package/pi-extensions/lib/entwurf-v2-contract-schema.ts +101 -0
  39. package/pi-extensions/lib/entwurf-v2-contract.ts +10 -78
  40. package/pi-extensions/lib/entwurf-v2-decider.ts +6 -2
  41. package/pi-extensions/lib/entwurf-v2-production.ts +26 -4
  42. package/run.sh +150 -15
  43. package/scripts/check-entwurf-bridge-pi-free.ts +146 -0
  44. package/scripts/check-entwurf-v2-contract.ts +6 -4
  45. package/scripts/check-meta-manifest-schema.py +145 -0
  46. package/scripts/meta-bridge-install.sh +17 -3
  47. package/scripts/meta-bridge-state.py +37 -10
  48. package/scripts/smoke-acp-bundled-mcp-live.ts +13 -2
  49. package/scripts/smoke-acp-carrier-augment-live.ts +35 -19
@@ -1,305 +1,203 @@
1
1
  # Clean-host setup walk-through
2
2
 
3
3
  End-to-end install of **entwurf** on a host with only `git` available — no
4
- node, no pnpm, no pi binary, no dotfiles. The point is to validate the public
5
- install surface as an outside user would experience it.
4
+ node, no npm package, no pi binary, no dotfiles. The point is to validate the
5
+ public install surface as an outside user would experience it.
6
6
 
7
- > **Scope.** This is the entwurf 0.12.0 install recipe. The earlier per-command
8
- > cleanhost evidence dumps (recorded 2026-05-18, pi-shell-acp era) are not
9
- > carried forward here they live in git history. The command *shape* below is
10
- > the current one; substitute your own host.
7
+ > **Scope.** This is the entwurf 0.12.1 install recipe. The base package install
8
+ > is **neutral npm**, not `pi install npm:...`. Pi is an optional adapter lane for
9
+ > the ACP provider / control-socket runtime.
11
10
 
12
- `entwurf` is a thin meta-bridge. It does not provide, copy, or mediate any
13
- backend credential — it spawns the official backend CLI and lets it read
14
- whatever auth the user already trusts on the host (AGENTS.md Hard Rule #9).
11
+ `entwurf` is a garden-citizen dispatch substrate and meta-bridge. It does not
12
+ provide, copy, or mediate backend credentials — it lets the official backend CLI
13
+ or the pi adapter read whatever auth the user already trusts on the host
14
+ (AGENTS.md Hard Rule #9).
15
15
 
16
16
  ## Reference target
17
17
 
18
18
  Written against a clean Ubuntu / Debian / macOS host reachable via SSH, here
19
- called `cleanhost`. `nvm` + `corepack` keep the path identical across them.
19
+ called `cleanhost`. `nvm` keeps the path identical across them.
20
20
 
21
21
  ```bash
22
- ssh cleanhost 'uname -a; whoami; which git node pnpm pi 2>/dev/null'
23
- # expect: git present, node/pnpm/pi absent
22
+ ssh cleanhost 'uname -a; whoami; which git node npm pi claude 2>/dev/null'
23
+ # expect on a fully clean host: git present, node/npm/pi/claude absent
24
24
  ```
25
25
 
26
26
  ## Pin matrix
27
27
 
28
- These pins are the verification axis drift from them moves you off the
29
- walk-through and onto your own integration.
30
-
31
- | Component | Pin | Source of truth |
28
+ | Component | Pin / floor | Source of truth |
32
29
  |---|---|---|
33
- | Node | **24** (LTS line) | `engines.node` is `>=22.6.0` (minimum, for TypeScript strip-types); verification axis is **24** |
34
- | pnpm | **10.33.0** (via corepack) | matches the version entwurf's `pnpm check` chain runs under |
35
- | pi binary | **`@earendil-works/pi-coding-agent` 0.80.2 or newer** | npm registry; binary name `pi`; garden-native session identity needs `--session-id` / `--name` |
36
- | entwurf install path | `npm:@junghanacs/entwurf` (published release path) | the `git:github.com/junghan0611/entwurf` source path remains the alternative for tracking `main` |
30
+ | Node | **24** recommended; `>=22.6.0` minimum | `engines.node` (Node strip-types / ESM runtime) |
31
+ | npm | bundled with Node 24 | public package install path |
32
+ | entwurf | `@junghanacs/entwurf` | neutral npm package; exposes `entwurf` and `entwurf-bridge` bins |
33
+ | pi binary | **optional**, `@earendil-works/pi-coding-agent >=0.80.2 <0.81` | needed only for the pi adapter / ACP provider / spawn-bg resume lane |
37
34
 
38
- ## Stage 0 — Node 24 + pnpm via nvm
35
+ ## Stage 0 — Node 24 via nvm
39
36
 
40
37
  ```bash
41
38
  ssh cleanhost
42
39
 
43
- # nvm (user-scope, no global root)
44
40
  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
45
41
  source ~/.nvm/nvm.sh
46
42
 
47
- # Node 24 explicit — not --lts (re-runnable across calendar drift)
48
43
  nvm install 24
49
44
  nvm alias default 24
50
- node -v # expect: v24.x.y
51
-
52
- # pnpm via corepack (user-scope, no -g)
53
- corepack enable
54
- corepack prepare pnpm@10.33.0 --activate
55
- pnpm -v # expect: 10.33.0
45
+ node -v
46
+ npm -v
56
47
  ```
57
48
 
58
49
  Drift points:
59
- - corporate proxy / sudo policy may block `curl | bash`. Fallback: clone `nvm` via git and source `~/.nvm/nvm.sh` directly.
60
- - `corepack enable` needs Node 24's bundled corepack — confirm with `corepack -v` before activate.
61
- - **Subshell trap**: `nvm install 24 | tail` runs the install inside a pipe-subshell, so PATH changes do not reach the parent shell and `node -v` fails right after. Drop the pipe, or follow with an explicit `nvm use 24` in the same shell (the recipe above already does).
50
+ - Corporate proxy / sudo policy may block `curl | bash`. Fallback: clone `nvm`
51
+ via git and source `~/.nvm/nvm.sh` directly.
52
+ - **Subshell trap**: `nvm install 24 | tail` runs in a pipe-subshell, so PATH
53
+ changes do not reach the parent shell. Drop the pipe, or run `nvm use 24` in
54
+ the same shell afterward.
62
55
 
63
- ## Stage 1 — pi binary
56
+ ## Stage 1 — neutral entwurf npm install
57
+
58
+ Install the public package with npm. This does **not** require pi.
64
59
 
65
60
  ```bash
66
- # global install with the user's nvm shim (no system-wide root)
67
- npm i -g @earendil-works/pi-coding-agent
68
- pi --version # expect: 0.80.2 or newer
61
+ npm install -g @junghanacs/entwurf
69
62
 
70
- # pi's data dir is created lazily on first run
71
- pi --help | head -5
63
+ which entwurf
64
+ which entwurf-bridge
65
+ entwurf --help | head -5
72
66
  ```
73
67
 
74
- Drift points:
75
- - if `npm i -g` lands outside the nvm shim, `pi` may not be on `$PATH` after a shell reload. `which pi` should resolve under `~/.nvm/versions/node/v24.*/bin/pi`.
76
- - backend ACP server packages (e.g. `claude-agent-acp`) ship as pinned `dependencies` of entwurf and get installed in the next stage **do not install them globally yourself**.
68
+ `@earendil-works/*` pi packages are optional peers. A neutral npm install should
69
+ not pull them in as package dependencies. That separation is intentional: the
70
+ MCP bridge can boot in Claude Code / Codex / Antigravity without pi present.
77
71
 
78
- ## Stage 2 — entwurf install (npm path)
72
+ ## Stage 2 — auth-free bridge boot
79
73
 
80
- Install the bridge from the published npm package. `pi install` lands it under
81
- `~/.pi/agent/npm/node_modules/@junghanacs/entwurf/`, then `run.sh install` wires
82
- it into a target project's `.pi/` directory.
74
+ Prove the installed MCP server answers `tools/list` from inside `node_modules`.
75
+ This is the regression that 0.12.0 missed: Node refuses `--experimental-strip-types`
76
+ for `.ts` under `node_modules`, so the installed package must boot the prebuilt
77
+ JS under `mcp/entwurf-bridge/dist/`.
83
78
 
84
79
  ```bash
85
- # package-side install — populates ~/.pi/agent/npm/node_modules/...
86
- pi install npm:@junghanacs/entwurf
87
-
88
- # verify the package landed where pi expects it
89
- ls ~/.pi/agent/npm/node_modules/@junghanacs/entwurf/
90
-
91
- # project-side wire-up — pick an empty cwd for the smoke
92
- mkdir -p ~/entwurf-smoke
93
- cd ~/entwurf-smoke
94
- ~/.pi/agent/npm/node_modules/@junghanacs/entwurf/run.sh install .
95
- ```
96
-
97
- `run.sh install .` runs the one-shot wiring the consumer-project README
98
- documents: writes `.pi/` config, registers the extensions (provider,
99
- `entwurf-control`, `model-lock`), adds `entwurfProvider.mcpServers.entwurf-bridge`,
100
- and links `~/.pi/agent/entwurf-targets.json` to the package's
101
- `pi/entwurf-targets.json`. Expected log lines:
102
-
103
- ```
104
- install: added entwurfProvider.mcpServers.entwurf-bridge
105
- install: updated <cwd>/.pi/settings.json
106
- install: package source -> ~/.pi/agent/npm/node_modules/@junghanacs/entwurf
107
- install: linked ~/.pi/agent/entwurf-targets.json -> .../pi/entwurf-targets.json
80
+ node --input-type=module <<'JS'
81
+ import { spawn } from 'node:child_process';
82
+ const child = spawn('entwurf-bridge', { stdio: ['pipe', 'pipe', 'pipe'], env: { ...process.env, NODE_PATH: '' } });
83
+ let out = '', err = '';
84
+ const timer = setTimeout(() => { child.kill('SIGKILL'); console.error(err || 'timeout'); process.exit(1); }, 5000);
85
+ child.stderr.on('data', d => err += d);
86
+ child.stdout.on('data', d => {
87
+ out += d;
88
+ try {
89
+ const msg = JSON.parse(out.trim());
90
+ const names = (msg.result?.tools ?? []).map(t => t.name).sort();
91
+ for (const n of ['entwurf_v2','entwurf_peers','entwurf_self','entwurf_inbox_read']) {
92
+ if (!names.includes(n)) throw new Error(`missing ${n}: ${names.join(',')}`);
93
+ }
94
+ clearTimeout(timer);
95
+ child.kill('SIGTERM');
96
+ console.log(names.join(','));
97
+ } catch {}
98
+ });
99
+ child.stdin.write(JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' }) + '\n');
100
+ JS
108
101
  ```
109
102
 
110
- Drift points:
111
- - with no backend credentials yet, `run.sh install .` still completes — it does not validate backend auth, only registers the bridge.
112
- - `~/.pi/agent/npm/...` is fixed by pi's install scanner. Use `pi install -l npm:...` to land it inside the project cwd instead.
113
- - the `git:github.com/junghan0611/entwurf` source path is the alternative for tracking `main` or hacking on the bridge; it clones into `~/.pi/agent/git/...` with the same `run.sh install .` wire-up.
114
- - `pi install` runs `npm install` inside the package; `husky` is dev-only and absent on a target host, so its `prepare` hook silently exits 0.
103
+ Expected: a comma-separated tool list containing all four `entwurf_*` tools,
104
+ exit code 0, no backend auth required.
115
105
 
116
- ## Stage 3 — package-surface verification (auth-free)
106
+ ## Stage 3 — wire a project for the pi adapter / ACP plugin (optional)
117
107
 
118
- Proves the bridge is registered and visible to pi, without touching any
119
- backend.
108
+ If the host will run pi sessions or the Claude ACP provider through pi, install
109
+ a compatible pi binary separately and wire the target project.
120
110
 
121
111
  ```bash
112
+ npm install -g @earendil-works/pi-coding-agent@0.80.2
113
+ pi --version
114
+
115
+ mkdir -p ~/entwurf-smoke
122
116
  cd ~/entwurf-smoke
117
+ entwurf install .
118
+ entwurf check-bridge
123
119
 
124
- # the entwurf provider should now appear in pi's catalog
125
- pi --list-models entwurf
126
- # expect: curated model ids under provider entwurf
127
- # (claude-opus-4-8, claude-sonnet-4-6, ...), exit code 0
120
+ # pi adapter/provider registration smoke
121
+ pi -e "$(npm root -g)/@junghanacs/entwurf" --list-models entwurf
128
122
  ```
129
123
 
130
- Deterministic gates (no live backend) from the clone:
124
+ Drift points:
125
+ - `entwurf install .` writes `.pi/settings.json`, registers the bundled
126
+ `entwurf-bridge`, and links `~/.pi/agent/entwurf-targets.json` to the package's
127
+ `pi/entwurf-targets.json`.
128
+ - Older pi versions may silently miss the provider/extension surface. Use the
129
+ pinned floor (`>=0.80.2 <0.81`) for release verification.
130
+ - A host that only uses the external MCP bridge can skip this stage until it
131
+ needs `owned-outcome` spawn-bg resume or pi-native control sockets.
132
+
133
+ ## Stage 4 — Claude Code meta-bridge (optional, garden-native native sessions)
134
+
135
+ For an external Claude Code session to be replyable by garden id, install the
136
+ meta-bridge plugin globally. This is still a neutral npm-package command; it
137
+ registers Claude Code USER-scope MCP + the SessionStart hook.
131
138
 
132
139
  ```bash
133
- cd ~/.pi/agent/git/github.com/junghan0611/entwurf
134
- pnpm install
135
- pnpm typecheck
136
- ./run.sh check-bridge # MCP tool contract (tools/list + negatives)
137
- ./run.sh check-package-source-routing # install-root resolver, fail-fast routing
138
- # full deterministic floor (longer, ~60 gates): pnpm check
140
+ entwurf install-meta-bridge
141
+ entwurf doctor-meta-bridge
139
142
  ```
140
143
 
141
- Drift points:
142
- - `pi --list-models entwurf` failing here means the install scanner did not register the extension — most often a node engines mismatch or a permission issue under `~/.pi/`. Re-run Stage 2 after fixing.
143
- - the `pnpm install` step may emit an `Ignored build scripts` warning for transitive deps (pnpm refuses postinstall hooks by default). Our surface does not need them; the warning is informational.
144
-
145
- ## Stage 4 — runtime smoke (backend auth required)
144
+ A plain external MCP host can call tools but is non-replyable. A garden-native
145
+ meta-session has a garden id, a mailbox, and a trusted sender marker; it can call
146
+ `entwurf_self`, receive mailbox wakeups, and be replied to by garden id.
146
147
 
147
- Backend authentication is **the operator's responsibility** and lives entirely
148
- outside entwurf. The 0.12.0 runtime floor is **Claude-first** — the
149
- `smoke-acp-*-live` floor inside `release-gate` exercises the Claude ACP backend
150
- only (there is no standalone per-backend smoke command). Codex reaches the
151
- garden as a native citizen (ACP only via the `ENTWURF_ACP_FOR_CODEX=1` opt-in,
152
- off the live floor); the Gemini path is deprecated.
148
+ ## Stage 5 backend auth and live runtime smoke
153
149
 
154
- ### Stage 4 prep Claude CLI install + login
150
+ Backend authentication is the operator's responsibility and lives entirely
151
+ outside entwurf. For the Claude ACP lane:
155
152
 
156
153
  ```bash
157
- # Claude — official install script (writes into ~/.local/bin, no sudo).
158
154
  curl -fsSL https://claude.ai/install.sh | bash
159
155
  echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
160
156
  source ~/.bashrc
161
- which claude && claude --version
162
-
163
- # interactive login (opens browser or prints a token-paste URL)
164
157
  claude login
165
- ```
166
-
167
- `claude login` writes into Claude's own state directory. entwurf does not
168
- provide, copy, decrypt, or mediate these credentials. If a smoke fails, run the
169
- backend CLI directly first (`claude -p "ping"`); if that also fails, the
170
- missing piece is upstream of entwurf.
171
-
172
- > **Codex / Gemini (optional).** `npm i -g @openai/codex` + `codex login` for
173
- > the Codex lane; `npm i -g @google/gemini-cli` + `gemini auth` for the
174
- > deprecated Gemini probe. Neither is on the 0.12.0 live floor — the
175
- > `smoke-acp-*-live` gates run the Claude ACP backend only; Codex/agy delivery
176
- > is captured as raw probes in [DELIVERY.md](../DELIVERY.md).
177
-
178
- ### Stage 4 prep — interactive setting (optional)
179
-
180
- For live interactive use (vs. headless CI), pin tool-progress visibility:
181
158
 
182
- ```bash
183
- node -e '
184
- const fs = require("fs");
185
- const path = process.env.HOME + "/entwurf-smoke/.pi/settings.json";
186
- const cur = JSON.parse(fs.readFileSync(path, "utf8"));
187
- cur.entwurfProvider = cur.entwurfProvider || {};
188
- cur.entwurfProvider.showToolNotifications = true;
189
- fs.writeFileSync(path, JSON.stringify(cur, null, 2) + "\n");
190
- '
191
- ```
192
-
193
- `showToolNotifications` defaults to `true` already; setting it explicitly pins
194
- the value for reproducibility. **No operator config is needed to make tool
195
- calls flow without prompts when a backend is invoked through entwurf** — the
196
- bridge runs the backend YOLO inside its own isolated overlay
197
- (`~/.pi/agent/*-config-overlay/`, AGENTS.md Hard Rule #10), so native backend
198
- config is neither read nor required on the bridged path.
199
-
200
- ### Stage 4 — runtime smoke
201
-
202
- ```bash
203
- ENTWURF=~/.pi/agent/git/github.com/junghan0611/entwurf
204
159
  cd ~/entwurf-smoke
205
-
206
- # lightweight: one Claude turn through entwurf (proves auth + bridge round-trip)
207
160
  pi --provider entwurf --model claude-sonnet-4-6 -p "reply with ok only"
208
-
209
- # full live floor (LIVE=1 required): pnpm check + the v2-native live gates
210
- # + the ACP plugin acceptance floor (10 smoke-acp-*-live smokes). Two-tier
211
- # MUST/BEHAVIOR summary; MUST owns the exit code. GLG authorizes the cut.
212
- LIVE=1 $ENTWURF/run.sh release-gate .
213
- ```
214
-
215
- A passing turn is a full round-trip: bootstrap → ACP session → bridge response
216
- → clean shutdown.
217
-
218
- Drift points:
219
- - a backend you have not authenticated fails loudly with `Authentication required` (Claude/Codex shape) or an early `EPIPE` (Gemini-CLI shape). **That is not an entwurf failure** — the bridge surfaces missing auth, it does not fix it. Add the credential and re-run.
220
- - `release-gate` honest-skips its LIVE-gated MUST steps when `LIVE!=1`; a real cut needs `LIVE=1` with `SKIP=0`.
221
-
222
- ## Stage 5 — entwurf surface (optional)
223
-
224
- > Do not run Stage 5 until at least one authenticated `smoke-*` is green — a
225
- > live entwurf flow drives a real backend turn, so an unauthenticated host just
226
- > re-surfaces the Stage 4 auth noise.
227
-
228
- ### Package-source ACP routing — auth-free, run this first
229
-
230
- Covers the boundary where a package-installed bridge (a `git:` / `npm:`
231
- settings source, not a local checkout) must still resolve so a
232
- `provider=entwurf` child does not die with `Unknown provider`:
233
-
234
- ```bash
235
- # from the installed bridge root (auth-free, also in pnpm check)
236
- ./run.sh check-package-source-routing
237
161
  ```
238
162
 
239
- It pins the package-source install-root resolver math across the full install
240
- matrix (local / git / npm / missing × local + remote). The live ACP routing
241
- itself is exercised by the `smoke-acp-*-live` floor under `release-gate`.
163
+ If the backend CLI fails directly (`claude -p "ping"`), fix that upstream first.
164
+ `entwurf` surfaces missing auth; it does not repair it.
242
165
 
243
- ### Resident control session
166
+ ## Stage 6 — garden/control-socket surface (optional)
244
167
 
245
- To address a long-lived pi session from another session (or an external MCP
246
- host like Claude Code), open it with `--entwurf-control`. A garden-native
247
- `--session-id` is **required** — a raw `pi --entwurf-control` (pi-assigned
248
- uuid) hard-exits at `session_start` before any model turn. Mint the id from the
249
- SSOT:
168
+ To address a long-lived pi session from another session or an external MCP host,
169
+ open it with `--entwurf-control`. A garden-native `--session-id` is required —
170
+ a raw pi-assigned uuid hard-exits before any model turn.
250
171
 
251
172
  ```bash
252
- pi --session-id "$(/path/to/entwurf/run.sh new-session-id)" \
173
+ pi --session-id "$(entwurf new-session-id)" \
253
174
  --entwurf-control --provider entwurf --model claude-sonnet-4-6
254
- # control socket: ~/.pi/entwurf-control/<sessionId>.sock
175
+ # control socket: ~/.pi/entwurf-control/<garden-id>.sock
255
176
  ```
256
177
 
257
- Inside such a session, builtin `/new` / `/fork` / `/clone` are blocked (they
258
- would mint a non-garden uuid); use `/gnew` (alias `/garden-new`) for a
259
- same-terminal fresh garden session (a zero-token switch into a pre-created
260
- garden file).
261
-
262
- The bridge exposes four MCP tools — `entwurf_v2` (canonical dispatch /
263
- delivery verb), `entwurf_peers` (discover live citizens), `entwurf_self`
264
- (identity envelope), `entwurf_inbox_read` (drain meta-bridge inbox). From any
265
- other pi session on the same host, call `entwurf_peers` to list live targets
266
- and `entwurf_v2` to message/hand off by garden id. Dispatch is fire-and-forget
267
- on a live target; set `wants_reply` if you need an answer. See AGENTS.md
268
- `Send-is-throw` for the full rule.
269
-
270
- ### Native-harness wake (optional)
271
-
272
- For an external Claude Code session to receive async messages, install the
273
- meta-bridge plugin globally (Claude Code only):
274
-
275
- ```bash
276
- ./run.sh install-meta-bridge # plugin + USER-scope entwurf-bridge MCP
277
- ./run.sh doctor-meta-bridge # fail-loud health check
278
- ```
178
+ Use `entwurf_peers` to discover citizens and `entwurf_v2` to deliver by garden
179
+ id. Do not choose the transport by hand: the same-looking id may name a live pi
180
+ socket, a dormant pi record, or a mailbox-backed native session.
279
181
 
280
182
  ## Teardown
281
183
 
282
- The bridge has no daemon. To remove everything installed:
283
-
284
184
  ```bash
285
- # entwurf clone
286
- rm -rf ~/.pi/agent/git/github.com/junghan0611/entwurf
287
-
288
- # project wiring (per-project)
185
+ # project wiring
289
186
  rm -rf ~/entwurf-smoke/.pi
290
187
 
291
188
  # meta-bridge plugin (if installed)
292
- ~/.pi/agent/git/github.com/junghan0611/entwurf/run.sh uninstall-meta-bridge 2>/dev/null || true
189
+ entwurf uninstall-meta-bridge 2>/dev/null || true
293
190
 
294
- # pi binary
295
- npm uninstall -g @earendil-works/pi-coding-agent
191
+ # package and optional pi binary
192
+ npm uninstall -g @junghanacs/entwurf
193
+ npm uninstall -g @earendil-works/pi-coding-agent 2>/dev/null || true
296
194
 
297
- # node + pnpm via nvm
195
+ # node via nvm
298
196
  nvm uninstall 24
299
197
  rm -rf ~/.nvm
300
198
  ```
301
199
 
302
- This walk-through is the **verification floor** underneath every downstream
303
- publish step install, package surface, and at least one authenticated
304
- runtime smoke green not the publish trigger itself. GLG owns the publish/tag
305
- decision.
200
+ This walk-through is a verification floor underneath release cuts: neutral npm
201
+ install, installed bridge boot, optional pi adapter registration, and at least
202
+ one authenticated runtime smoke when cutting a live release. GLG owns the
203
+ publish/tag decision.