@junghanacs/entwurf 0.23.1 → 0.24.0
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/BASELINE.md +1 -0
- package/CHANGELOG.md +173 -0
- package/FAQ.md +47 -0
- package/README.md +5 -3
- package/VERIFY.md +2 -2
- package/demo/README.md +1 -1
- package/docs/acp-backend-rail.md +2 -2
- package/docs/setup-clean-host.md +8 -7
- package/mcp/entwurf-bridge/dist/mcp/entwurf-bridge/src/index.js +33 -1
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/acp/context.js +19 -5
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/callback-env.js +68 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/fresh-call-composition.js +54 -22
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/herdr-fresh-call.js +7 -3
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/herdr-placement.js +13 -4
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/mux-fresh-call.js +19 -10
- package/mcp/entwurf-bridge/dist/pi-extensions/meta-bridge-omp.js +35 -42
- package/mcp/entwurf-bridge/dist/scripts/probe-bridge-command.js +1 -0
- package/mcp/entwurf-bridge/src/index.ts +41 -1
- package/mcp/entwurf-bridge/test.sh +2 -2
- package/package.json +8 -7
- package/pi-extensions/entwurf-control.ts +56 -0
- package/pi-extensions/lib/acp/backend.ts +16 -6
- package/pi-extensions/lib/acp/context.ts +30 -10
- package/pi-extensions/lib/acp/session-store.ts +2 -2
- package/pi-extensions/lib/callback-env.ts +78 -0
- package/pi-extensions/lib/compaction-send-guard.ts +4 -1
- package/pi-extensions/lib/fresh-call-composition.ts +56 -22
- package/pi-extensions/lib/herdr-fresh-call.ts +12 -4
- package/pi-extensions/lib/herdr-placement.ts +13 -4
- package/pi-extensions/lib/mux-fresh-call.ts +23 -8
- package/pi-extensions/meta-bridge-omp.ts +35 -48
- package/run.sh +135 -50
- package/scripts/check-acp-backend-preflight.ts +117 -9
- package/scripts/check-acp-carrier-augment.ts +6 -4
- package/scripts/check-acp-event-mapper.ts +17 -6
- package/scripts/check-acp-prompt-builder.ts +17 -9
- package/scripts/check-acp-prompt-lifecycle.ts +23 -6
- package/scripts/check-acp-session-reuse.ts +64 -51
- package/scripts/check-acp-session-store.ts +31 -8
- package/scripts/check-acp-stop-reason.ts +20 -2
- package/scripts/check-acp-stream-hooks.ts +22 -5
- package/scripts/check-acp-usage-accounting.ts +33 -9
- package/scripts/check-entwurf-bridge-boot.ts +16 -1
- package/scripts/check-fresh-call-dispatch.ts +4 -5
- package/scripts/check-gate-qualification.ts +44 -5
- package/scripts/check-herdr-activation.ts +73 -0
- package/scripts/check-herdr-fresh-call.ts +22 -6
- package/scripts/check-herdr-sandbox.ts +14 -2
- package/scripts/check-install-container.sh +1 -1
- package/scripts/check-pi-launch.ts +5 -2
- package/scripts/lib/mutation-qualify.ts +1 -1
- package/scripts/mutants/acp-backend-preflight.json +20 -0
- package/scripts/mutants/bridge-boot-resume.json +26 -0
- package/scripts/mutants/herdr-activation.json +16 -0
- package/scripts/mutants/herdr-fresh-call.json +11 -0
- package/scripts/mutants/mux-fresh-call.json +21 -8
- package/scripts/mutants/omp-fresh.json +5 -9
- package/scripts/mutants/pack-install.json +3 -3
- package/scripts/probe-bridge-command.ts +1 -0
- package/scripts/smoke-acp-session-reuse-live.ts +23 -5
- package/scripts/smoke-agy-install-state.sh +2 -2
- package/scripts/smoke-copilot-mcp-state.sh +1 -1
- package/scripts/smoke-herdr-fresh-call-live.ts +56 -28
- package/scripts/smoke-herdr-raw-install-live.sh +31 -3
- package/scripts/smoke-omp-fresh-live.ts +4 -2
- package/scripts/smoke-omp-mcp-state.sh +1 -1
- package/scripts/smoke-pi-provider-state.sh +2 -2
|
@@ -50,6 +50,16 @@ export const FRESH_CALL_BACKENDS = ["pi", "claude-code", "copilot", "omp", "code
|
|
|
50
50
|
* permission dialect: omp's approval layer consults the same minted string (`source-audit.md`).
|
|
51
51
|
*/
|
|
52
52
|
export const FRESH_CALL_CALLBACK_TOOL = {
|
|
53
|
+
pi: "entwurf_callback",
|
|
54
|
+
"claude-code": "mcp__entwurf-bridge__entwurf_callback",
|
|
55
|
+
copilot: "entwurf-bridge-entwurf_callback",
|
|
56
|
+
omp: "mcp__entwurf_bridge_entwurf_callback",
|
|
57
|
+
// Codex's tool process is the operator app-server, not the pane: the no-arg
|
|
58
|
+
// verb refuses there by name. First action stays the delivery verb with args.
|
|
59
|
+
codex: "mcp__entwurf_bridge__entwurf_v2",
|
|
60
|
+
};
|
|
61
|
+
/** Where a sibling SENDS the task result. Always the delivery verb, never the birth callback. */
|
|
62
|
+
export const FRESH_CALL_DELIVERY_TOOL = {
|
|
53
63
|
pi: "entwurf_v2",
|
|
54
64
|
"claude-code": "mcp__entwurf-bridge__entwurf_v2",
|
|
55
65
|
copilot: "entwurf-bridge-entwurf_v2",
|
|
@@ -95,8 +105,11 @@ export const FRESH_CALL_PEERS_TOOL = {
|
|
|
95
105
|
* `[측정, n=3, same model]` adding the sentence below produced 3/3 callbacks. It is a FACT about the
|
|
96
106
|
* runtime, in the register the rest of this framing uses since the prohibitions came out: it grants
|
|
97
107
|
* nothing, forbids nothing, and names the one call that turns a listed name into a callable tool.
|
|
98
|
-
*
|
|
99
|
-
*
|
|
108
|
+
* ALL THREE tools ride ONE `ToolSearch` select — the birth callback, the DELIVERY verb the last
|
|
109
|
+
* line of the framing names, and the peers listing the corroboration sentence offers. The delivery
|
|
110
|
+
* verb has to be in the same select or the deferral simply moves from the first action to the last:
|
|
111
|
+
* a sibling that finishes its task and cannot call `entwurf_v2` is the same production silence,
|
|
112
|
+
* spent instead of saved.
|
|
100
113
|
*
|
|
101
114
|
* Every other backend gets an EMPTY array, deliberately: pi has no deferred-tool surface, and the
|
|
102
115
|
* other three were never measured to need it. A hint invented for a runtime nobody probed would be
|
|
@@ -106,7 +119,7 @@ export const FRESH_CALL_TOOL_LOAD_HINT = {
|
|
|
106
119
|
pi: [],
|
|
107
120
|
"claude-code": [
|
|
108
121
|
"If ${callbackTool} is not callable yet, the entwurf-bridge server is still connecting or its",
|
|
109
|
-
'tools are deferred: load them first with ToolSearch("select:${callbackTool},${peersTool}") —',
|
|
122
|
+
'tools are deferred: load them first with ToolSearch("select:${callbackTool},${deliveryTool},${peersTool}") —',
|
|
110
123
|
"it waits for the server — then call ${callbackTool}.",
|
|
111
124
|
],
|
|
112
125
|
copilot: [],
|
|
@@ -125,21 +138,21 @@ export const FRESH_CALL_TOOL_LOAD_HINT = {
|
|
|
125
138
|
export const OMP_BOOTSTRAP_FLAG = "entwurf-bootstrap";
|
|
126
139
|
/** Payload grammar version, matched exactly by the decoder. A bump means a stale installed
|
|
127
140
|
* unit, which is the one thing `doctor-omp-bridge` exists to say out loud. */
|
|
128
|
-
export const OMP_BOOTSTRAP_VERSION =
|
|
141
|
+
export const OMP_BOOTSTRAP_VERSION = 2;
|
|
129
142
|
/**
|
|
130
143
|
* The whole of what a fresh omp sibling is launched with.
|
|
131
144
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
145
|
+
* TWO FIELDS, CLOSED. Address (target + nonce) rides process env, not this payload — a second
|
|
146
|
+
* copy here would be a second address axis. The decoder refuses an unknown key, so this object
|
|
147
|
+
* is the entire remaining contract: the task released after the no-arg callback succeeds.
|
|
148
|
+
* `callerGardenId` / `nonce` stay on the function so launcher call sites do not grow a second
|
|
149
|
+
* shape; they are not serialised.
|
|
137
150
|
*/
|
|
138
151
|
export function buildOmpBootstrapPayload(params) {
|
|
152
|
+
void params.callerGardenId;
|
|
153
|
+
void params.nonce;
|
|
139
154
|
return JSON.stringify({
|
|
140
155
|
v: OMP_BOOTSTRAP_VERSION,
|
|
141
|
-
target: params.callerGardenId,
|
|
142
|
-
nonce: params.nonce,
|
|
143
156
|
task: params.task,
|
|
144
157
|
});
|
|
145
158
|
}
|
|
@@ -271,7 +284,11 @@ export function composeBackendArgs(backend, composition, model, resolveCodexSock
|
|
|
271
284
|
case "pi":
|
|
272
285
|
return [composition.prompt, "--entwurf-control", "--model", model];
|
|
273
286
|
case "claude-code":
|
|
274
|
-
return [
|
|
287
|
+
return [
|
|
288
|
+
composition.prompt,
|
|
289
|
+
`--allowedTools=${FRESH_CALL_CALLBACK_TOOL["claude-code"]},${FRESH_CALL_DELIVERY_TOOL["claude-code"]}`,
|
|
290
|
+
`--model=${model}`,
|
|
291
|
+
];
|
|
275
292
|
case "copilot":
|
|
276
293
|
return ["copilot", "--interactive", composition.prompt, "--model", model, "--yolo"];
|
|
277
294
|
case "omp":
|
|
@@ -319,26 +336,41 @@ export function composeBackendArgs(backend, composition, model, resolveCodexSock
|
|
|
319
336
|
* corroborate the caller instead of an instruction not to look.
|
|
320
337
|
*/
|
|
321
338
|
export function composeFreshCallFraming(params) {
|
|
322
|
-
const
|
|
339
|
+
const birthTool = FRESH_CALL_CALLBACK_TOOL[params.backend];
|
|
340
|
+
const deliveryTool = FRESH_CALL_DELIVERY_TOOL[params.backend];
|
|
323
341
|
const peersTool = FRESH_CALL_PEERS_TOOL[params.backend];
|
|
324
342
|
// The hint is a per-backend TEMPLATE so the two tool dialects stay the single source of their
|
|
325
343
|
// own spelling here too — a hint that hard-coded Claude's name would go stale the day a dialect
|
|
326
344
|
// moves, and it would go stale silently, in the one sentence a stuck child depends on.
|
|
327
|
-
const loadHint = FRESH_CALL_TOOL_LOAD_HINT[params.backend].map((line) => line
|
|
345
|
+
const loadHint = FRESH_CALL_TOOL_LOAD_HINT[params.backend].map((line) => line
|
|
346
|
+
.replaceAll("${callbackTool}", birthTool)
|
|
347
|
+
.replaceAll("${deliveryTool}", deliveryTool)
|
|
348
|
+
.replaceAll("${peersTool}", peersTool));
|
|
328
349
|
const hintBlock = loadHint.length === 0 ? [] : ["", ...loadHint];
|
|
329
350
|
if (params.openingLine.length === 0) {
|
|
330
351
|
throw new Error("fresh-call composition: openingLine is empty — the rail must state where it placed the sibling");
|
|
331
352
|
}
|
|
353
|
+
const firstAction = params.backend === "codex"
|
|
354
|
+
? [
|
|
355
|
+
`FIRST ACTION, before reading files or anything else: call ${birthTool} with ` +
|
|
356
|
+
`target=${params.callerGardenId}, intent=fire-and-forget, wants_reply=false, and ` +
|
|
357
|
+
`message set to exactly ${params.nonce} — that string alone, nothing added.`,
|
|
358
|
+
`${params.nonce} is a correlation tag this caller minted for this one launch: it names no`,
|
|
359
|
+
"secret and grants no access. Sending it is how the caller learns the garden id you were born",
|
|
360
|
+
"with, which it has no other way to know. Your own record does not carry the caller's address,",
|
|
361
|
+
"so reporting your identity here does not reach it — that tool call does.",
|
|
362
|
+
"entwurf_callback is refused on this rail: the tool process is the operator app-server, not this pane.",
|
|
363
|
+
]
|
|
364
|
+
: [
|
|
365
|
+
`FIRST ACTION, before reading files or anything else: call ${birthTool} with no arguments.`,
|
|
366
|
+
"That call is how the caller learns the garden id you were born with. There are no",
|
|
367
|
+
"parameters: a target or message you type would be a second address axis.",
|
|
368
|
+
"Your own record does not carry the caller's address, so reporting your identity here does not reach it — that tool call does.",
|
|
369
|
+
];
|
|
332
370
|
return [
|
|
333
371
|
params.openingLine,
|
|
334
372
|
"",
|
|
335
|
-
|
|
336
|
-
`target=${params.callerGardenId}, intent=fire-and-forget, wants_reply=false, and ` +
|
|
337
|
-
`message set to exactly ${params.nonce} — that string alone, nothing added.`,
|
|
338
|
-
`${params.nonce} is a correlation tag this caller minted for this one launch: it names no`,
|
|
339
|
-
"secret and grants no access. Sending it is how the caller learns the garden id you were born",
|
|
340
|
-
"with, which it has no other way to know. Your own record does not carry the caller's address,",
|
|
341
|
-
"so reporting your identity here does not reach it — that tool call does.",
|
|
373
|
+
...firstAction,
|
|
342
374
|
"",
|
|
343
375
|
`You can corroborate the caller first if you want to: ${peersTool} is a read-only listing of`,
|
|
344
376
|
`this garden's citizens and ${params.callerGardenId} is one of them. That listing is capped, so`,
|
|
@@ -356,7 +388,7 @@ export function composeFreshCallFraming(params) {
|
|
|
356
388
|
// its window is not the delivery. Nothing here watches for completion or sends on the
|
|
357
389
|
// sibling's behalf — this rail launches and lets go (Hard Rule 16, and the reason there is no
|
|
358
390
|
// supervisor anywhere in it).
|
|
359
|
-
`When the task reaches its requested final result, send that result to the same target with ${
|
|
391
|
+
`When the task reaches its requested final result, send that result to the same target with ${deliveryTool}.`,
|
|
360
392
|
"Output in this sibling window is not delivered to the caller.",
|
|
361
393
|
];
|
|
362
394
|
}
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
import { createHash } from "node:crypto";
|
|
44
44
|
import { statSync } from "node:fs";
|
|
45
45
|
import path from "node:path";
|
|
46
|
+
import { callbackEnvAssignments } from "./callback-env.js";
|
|
46
47
|
import { buildOmpBootstrapPayload, composeBackendArgs, composeFreshCallFraming, normalizeFreshCallInputs, TASK_MAX_CHARS, } from "./fresh-call-composition.js";
|
|
47
48
|
/** The pilot set, closed. `[#116 decision]` herdr's own `--kind` enum is much larger, and that is
|
|
48
49
|
* NOT evidence of support: every other backend is a pre-mutation named reject here, and there is
|
|
@@ -235,6 +236,7 @@ export function buildHerdrTabCreateArgs(params) {
|
|
|
235
236
|
"PI_SESSION_ID=",
|
|
236
237
|
"--env",
|
|
237
238
|
"PI_AGENT_ID=",
|
|
239
|
+
...callbackEnvAssignments(params.callback).flatMap((assignment) => ["--env", assignment]),
|
|
238
240
|
];
|
|
239
241
|
}
|
|
240
242
|
/** `agent start <name> --kind <kind> --pane <id> -- <backend argv>`. Everything after `--` is the
|
|
@@ -565,6 +567,7 @@ export async function herdrFreshCall(params, run, env, nonce, clock = HERDR_REAL
|
|
|
565
567
|
const tabRun = await run(buildHerdrTabCreateArgs({
|
|
566
568
|
workspaceId: callerPane.workspaceId,
|
|
567
569
|
...(cwd === undefined ? {} : { cwd }),
|
|
570
|
+
callback: { target: callerGardenId, nonce },
|
|
568
571
|
}));
|
|
569
572
|
if (tabRun.status !== 0) {
|
|
570
573
|
// WHETHER ANYTHING EXISTS depends on WHO failed, and the stderr says which. herdr's own
|
|
@@ -881,9 +884,10 @@ export function renderHerdrFreshCall(result) {
|
|
|
881
884
|
`mean the sibling is running, that its first turn ran, or that the task was delivered. The tab and pane ` +
|
|
882
885
|
`coordinates are a view and can change under the sibling — they are not an address and nothing may be ` +
|
|
883
886
|
`dispatched to them.\n` +
|
|
884
|
-
`The sibling's garden id arrives separately —
|
|
885
|
-
`
|
|
886
|
-
`
|
|
887
|
+
`The sibling's garden id arrives separately — its first action is the zero-argument callback verb, and ` +
|
|
888
|
+
`the sender envelope of THAT message is the address. The nonce above is the correlation tag it carries; ` +
|
|
889
|
+
`the sibling reads it from its own launch env, never from this receipt. Nothing is polling for it; if it ` +
|
|
890
|
+
`never comes, the pane is visible and can be read directly.`,
|
|
887
891
|
isError: false,
|
|
888
892
|
};
|
|
889
893
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* THE TWO AXES ARE NOT EQUALLY EXACT, AND THE DIFFERENCE IS NAMED. On the claude axis
|
|
22
22
|
* the reported value IS the key, byte for byte. On the pi axis it is a session FILE
|
|
23
23
|
* PATH, and the key is recovered from that filename by a strict conversion measured on
|
|
24
|
-
* pi 0.
|
|
24
|
+
* pi 0.86.0 — a VENDOR FLOOR, not a key equality. Calling both "a unique-key join"
|
|
25
25
|
* would hide which one can drift when a vendor renames a file. The conversion is
|
|
26
26
|
* deliberately strict at both ends so that drift lands as a missed join, never a wrong
|
|
27
27
|
* one, and a listing that declined to read anything says so (see `declinedReports`).
|
|
@@ -65,14 +65,23 @@ const OFFICIAL_REPORTS = {
|
|
|
65
65
|
"herdr:pi": { agent: "pi", kind: "path", backend: "pi" },
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
|
-
* A pi session filename, measured 2026-09-
|
|
68
|
+
* A pi session filename, measured 2026-09-20 on pi 0.86.0:
|
|
69
69
|
*
|
|
70
|
-
* 2026-09-
|
|
70
|
+
* 2026-09-20T00-35-44-197Z_01a0bc3d-87c4-738e-b391-265c8ba5a1b0.jsonl
|
|
71
71
|
* └────────── start stamp ─────────┘ └──────── nativeSessionId ────────┘
|
|
72
72
|
*
|
|
73
|
+
* `[측정 2026-09-20]` that is a REAL file a sandboxed pi 0.86.0 wrote, and its own
|
|
74
|
+
* `{"type":"session"}` header carries `id: 01a0bc3d-87c4-738e-b391-265c8ba5a1b0` —
|
|
75
|
+
* the exact string `piNativeSessionIdFromPath` recovers from the name. The layout was
|
|
76
|
+
* re-measured rather than carried: pi 0.86.0 rewrote session-manager.ts (+269 −141
|
|
77
|
+
* over v0.85.1), but every line that BUILDS a name is byte-unchanged
|
|
78
|
+
* (`${fileTimestamp}_${this.sessionId}.jsonl`, session-manager.ts:991/1527/1703); the
|
|
79
|
+
* only diff in that file's `.jsonl` lines is a lambda parameter rename on the READER
|
|
80
|
+
* side. A source read alone would not have settled it, so the real file is the receipt.
|
|
81
|
+
*
|
|
73
82
|
* WHY THIS IS PINNED HERE AND NOT INFERRED. The uuid is the join key and it lives in
|
|
74
83
|
* a VENDOR filename, so this rule depends on pi's naming and would break silently if
|
|
75
|
-
* pi changed it. **Vendor floor: pi 0.
|
|
84
|
+
* pi changed it. **Vendor floor: pi 0.86.0, measured 2026-09-20** — whether that layout
|
|
76
85
|
* is a vendor contract or a convention is NOT measured, so this is the one place in the
|
|
77
86
|
* axis that can drift under us. It is therefore strict on both ends — the name must end
|
|
78
87
|
* in `.jsonl` and the tail after the last `_` must be a well-formed uuid — and a name
|
|
@@ -85,11 +85,12 @@
|
|
|
85
85
|
* the session the window is actually in. It still reports no `pane_current_path`, and
|
|
86
86
|
* there is no "session created" field because nothing here creates one.
|
|
87
87
|
*/
|
|
88
|
+
import { callbackEnvAssignments } from "./callback-env.js";
|
|
88
89
|
import { classifyTmuxCwd } from "./classify-tmux-cwd.js";
|
|
89
90
|
import { CODEX_CALLER_SEAT_HINT, resolveCodexCallerSeat, } from "./codex-caller-seat.js";
|
|
90
91
|
import { CODEX_CALLER_PREFLIGHT_HINT, CODEX_LAUNCH_CWD_PREFLIGHT_HINT, CODEX_PREFLIGHT_HINT, codexLaunchCwdFreshPreflight, } from "./codex-fresh-preflight.js";
|
|
91
92
|
import { COPILOT_PREFLIGHT_HINT, copilotFreshPreflight, } from "./copilot-fresh-preflight.js";
|
|
92
|
-
import { buildOmpBootstrapPayload, composeBackendArgs, composeFreshCallPrompt, FRESH_CALL_BACKENDS, FRESH_CALL_CALLBACK_TOOL, isSafeFreshCallModel, MODEL_MAX_CHARS, mintNonce, normalizeFreshCallInputs, OMP_BOOTSTRAP_FLAG, OMP_BOOTSTRAP_VERSION, TASK_MAX_CHARS, } from "./fresh-call-composition.js";
|
|
93
|
+
import { buildOmpBootstrapPayload, composeBackendArgs, composeFreshCallPrompt, FRESH_CALL_BACKENDS, FRESH_CALL_CALLBACK_TOOL, FRESH_CALL_DELIVERY_TOOL, isSafeFreshCallModel, MODEL_MAX_CHARS, mintNonce, normalizeFreshCallInputs, OMP_BOOTSTRAP_FLAG, OMP_BOOTSTRAP_VERSION, TASK_MAX_CHARS, } from "./fresh-call-composition.js";
|
|
93
94
|
import { assertLaunchTarget, LaunchPreconditionError, resolveRuntimeOnPath, } from "./mux-launch.js";
|
|
94
95
|
import { APPEND_FORMAT, assertSelector, assertTmuxOk, inspectPlacement, parseWindowFields, requireSameContext, runTmux, } from "./mux-placement.js";
|
|
95
96
|
import { resolveCodexDefaultSocketPath } from "./native-push/codex-ws-client.js";
|
|
@@ -106,7 +107,7 @@ import { classifyTmuxSessionName, resolveTmuxSessionId } from "./resolve-tmux-se
|
|
|
106
107
|
* says a sibling was opened in the operator's tmux session, and the Codex socket path. Both are
|
|
107
108
|
* arguments to the leaf rather than knowledge inside it.
|
|
108
109
|
*/
|
|
109
|
-
export { buildOmpBootstrapPayload, FRESH_CALL_BACKENDS, FRESH_CALL_CALLBACK_TOOL, isSafeFreshCallModel, MODEL_MAX_CHARS, mintNonce, OMP_BOOTSTRAP_FLAG, OMP_BOOTSTRAP_VERSION, TASK_MAX_CHARS, };
|
|
110
|
+
export { buildOmpBootstrapPayload, FRESH_CALL_BACKENDS, FRESH_CALL_CALLBACK_TOOL, FRESH_CALL_DELIVERY_TOOL, isSafeFreshCallModel, MODEL_MAX_CHARS, mintNonce, OMP_BOOTSTRAP_FLAG, OMP_BOOTSTRAP_VERSION, TASK_MAX_CHARS, };
|
|
110
111
|
/** What the tmux rail tells a sibling about where it woke up. The resume verb has no equivalent
|
|
111
112
|
* because it composes no first turn at all; a herdr rail will pass its own sentence here. */
|
|
112
113
|
export const TMUX_FRESH_CALL_OPENING_LINE = "You are a fresh visible citizen that entwurf opened in the operator's tmux session.";
|
|
@@ -200,9 +201,11 @@ export function selectFreshCallSeat(placement) {
|
|
|
200
201
|
* scrub only on the backend whose measurement surfaced it would encode the claim that the other
|
|
201
202
|
* four are immune, which is false. It costs the legitimate case nothing: a carrier is only ever
|
|
202
203
|
* authoritative when the process that owns it exported it ITSELF, and a fresh `pi` sibling does
|
|
203
|
-
* exactly that after this argv has run. This is a fixed
|
|
204
|
-
*
|
|
205
|
-
*
|
|
204
|
+
* exactly that after this argv has run. This is a fixed seam and deliberately NOT a general env
|
|
205
|
+
* carrier — an arbitrary `-e` passthrough would hand callers the environment-shaping power this
|
|
206
|
+
* rail exists to refuse. Two more `-e` assignments ride beside the scrub: the callback pair
|
|
207
|
+
* (`callback-env.ts`), launcher-computed, so the sibling's first action does not retype an
|
|
208
|
+
* address out of prose.
|
|
206
209
|
*/
|
|
207
210
|
const SCRUBBED_INHERITED_ENV = ["PI_SESSION_ID=", "PI_AGENT_ID="];
|
|
208
211
|
/** Launch argv: the leaf's detached-append shape, the identity scrub, optionally `-c` at the
|
|
@@ -215,7 +218,7 @@ const SCRUBBED_INHERITED_ENV = ["PI_SESSION_ID=", "PI_AGENT_ID="];
|
|
|
215
218
|
* name never reaches this function — the seat is resolved to a native `$id` before it is
|
|
216
219
|
* called, and `assertSelector` refuses anything that is not one. `-d` is not optional: without
|
|
217
220
|
* it a window opened into another session steals that session's focus (measured). */
|
|
218
|
-
export function buildFreshCallArgs(targetSessionId, runtimePath, backendArgs, cwd) {
|
|
221
|
+
export function buildFreshCallArgs(targetSessionId, runtimePath, backendArgs, cwd, callback) {
|
|
219
222
|
assertSelector("session", targetSessionId);
|
|
220
223
|
assertLaunchTarget(runtimePath);
|
|
221
224
|
if (cwd !== undefined) {
|
|
@@ -228,6 +231,7 @@ export function buildFreshCallArgs(targetSessionId, runtimePath, backendArgs, cw
|
|
|
228
231
|
"-d",
|
|
229
232
|
"-a",
|
|
230
233
|
...SCRUBBED_INHERITED_ENV.flatMap((assignment) => ["-e", assignment]),
|
|
234
|
+
...callbackEnvAssignments(callback).flatMap((assignment) => ["-e", assignment]),
|
|
231
235
|
"-t",
|
|
232
236
|
`${targetSessionId}:{end}`,
|
|
233
237
|
...(cwd === undefined ? [] : ["-c", cwd]),
|
|
@@ -403,7 +407,10 @@ export function freshCall(params, env = process.env, nonce = mintNonce()) {
|
|
|
403
407
|
console.error(`[fresh-call] ${unanswered}: ${launchCwd}\n` + ` ${CODEX_LAUNCH_CWD_PREFLIGHT_HINT[unanswered]}`);
|
|
404
408
|
}
|
|
405
409
|
}
|
|
406
|
-
const run = runTmux(buildFreshCallArgs(targetSessionId, runtimePath, backendArgs, cwd
|
|
410
|
+
const run = runTmux(buildFreshCallArgs(targetSessionId, runtimePath, backendArgs, cwd, {
|
|
411
|
+
target: callerGardenId,
|
|
412
|
+
nonce,
|
|
413
|
+
}), env);
|
|
407
414
|
assertTmuxOk("new-window", run);
|
|
408
415
|
let fields;
|
|
409
416
|
try {
|
|
@@ -503,9 +510,11 @@ export function renderFreshCall(result) {
|
|
|
503
510
|
`\n` +
|
|
504
511
|
`This is a LAUNCH receipt: tmux created that window and was asked to start the runtime with the model above. It does ` +
|
|
505
512
|
`NOT mean the sibling is running, that its first turn ran, or that the task was delivered.\n` +
|
|
506
|
-
`The sibling's garden id arrives separately —
|
|
507
|
-
`
|
|
508
|
-
`
|
|
513
|
+
`The sibling's garden id arrives separately — its first action is the zero-argument callback verb ` +
|
|
514
|
+
`(codex is the one arm that still sends the nonce as arguments), and the sender envelope of THAT ` +
|
|
515
|
+
`message is the address. The nonce above is the correlation tag it carries; the sibling reads it ` +
|
|
516
|
+
`from its own launch env, never from this receipt. Nothing is polling for it; if it never comes, ` +
|
|
517
|
+
`the window is visible and can be read directly.`,
|
|
509
518
|
isError: false,
|
|
510
519
|
};
|
|
511
520
|
}
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
*/
|
|
78
78
|
import * as fs from "node:fs";
|
|
79
79
|
import * as path from "node:path";
|
|
80
|
-
import { isPlausibleOwnerPid, ompMetaRootBase, ompMetaRoots,
|
|
80
|
+
import { isPlausibleOwnerPid, ompMetaRootBase, ompMetaRoots, upsertMetaSession, writeMetaSenderMarker, } from "./lib/meta-session.js";
|
|
81
81
|
/**
|
|
82
82
|
* The §3.5 host discriminator. THE one new predicate this whole lane is allowed to
|
|
83
83
|
* introduce, and it is the vendor's own top-level mode — not a heuristic over cwd,
|
|
@@ -147,7 +147,7 @@ export const OMP_BOOTSTRAP_FLAG = "entwurf-bootstrap";
|
|
|
147
147
|
/** Payload grammar version. A payload that does not say exactly this is refused rather than
|
|
148
148
|
* best-guessed: the launcher and this unit ship in the same package, so a mismatch means a
|
|
149
149
|
* STALE installed unit — the one condition `doctor-omp-bridge` exists to name out loud. */
|
|
150
|
-
export const OMP_BOOTSTRAP_VERSION =
|
|
150
|
+
export const OMP_BOOTSTRAP_VERSION = 2;
|
|
151
151
|
/**
|
|
152
152
|
* The model-facing callback tool, spelled for omp. `[측정]` the vendor's minter sanitises to
|
|
153
153
|
* `[a-z_]` and EATS the digit in `entwurf_v2` (`mcp/tool-bridge.ts:384-396`;
|
|
@@ -161,7 +161,7 @@ export const OMP_BOOTSTRAP_VERSION = 1;
|
|
|
161
161
|
* spellings are held equal by `test/omp-fresh-bootstrap.contract.test.ts`, the same shape
|
|
162
162
|
* `check-omp-fresh-preflight` already uses for the preflight's reproduced oracles.
|
|
163
163
|
*/
|
|
164
|
-
export const OMP_BOOTSTRAP_CALLBACK_TOOL = "
|
|
164
|
+
export const OMP_BOOTSTRAP_CALLBACK_TOOL = "mcp__entwurf_bridge_entwurf_callback";
|
|
165
165
|
/** Task ceiling, held equal to the launcher's `TASK_MAX_CHARS` by the same contract test. */
|
|
166
166
|
export const OMP_BOOTSTRAP_TASK_MAX_CHARS = 16000;
|
|
167
167
|
/** How long readiness may take before this bootstrap FAILS and the task is never sent.
|
|
@@ -175,12 +175,10 @@ export const OMP_BOOTSTRAP_READY_TIMEOUT_MS = 60_000;
|
|
|
175
175
|
* MCP ones (`runner.ts:907-978`). Polling the two public snapshots is the smallest honest
|
|
176
176
|
* primitive; a FIXED DELAY is forbidden because the gap is a race, not a constant. */
|
|
177
177
|
export const OMP_BOOTSTRAP_POLL_MS = 100;
|
|
178
|
-
/** The nonce the launcher mints (`mintNonce`: `mux-fresh-call-` + 12 random bytes as hex). */
|
|
179
|
-
const BOOTSTRAP_NONCE_RE = /^mux-fresh-call-[0-9a-f]{24}$/;
|
|
180
178
|
/** The wire keys, closed. An unknown key is a REFUSAL rather than an ignored extra: this
|
|
181
179
|
* flag is the one thing a caller can put arbitrary bytes into, so the decoder's job is to
|
|
182
180
|
* make "what the launcher meant" and "what this unit will act on" the same set. */
|
|
183
|
-
const BOOTSTRAP_KEYS = new Set(["v", "
|
|
181
|
+
const BOOTSTRAP_KEYS = new Set(["v", "task"]);
|
|
184
182
|
/**
|
|
185
183
|
* Read the flag value into a payload, or name why not.
|
|
186
184
|
*
|
|
@@ -212,22 +210,12 @@ export function decodeOmpBootstrapPayload(raw) {
|
|
|
212
210
|
if (!BOOTSTRAP_KEYS.has(key))
|
|
213
211
|
return { ok: false, reason: "payload-unknown-key" };
|
|
214
212
|
}
|
|
215
|
-
let target;
|
|
216
|
-
try {
|
|
217
|
-
target = requireGardenId(obj.target);
|
|
218
|
-
}
|
|
219
|
-
catch {
|
|
220
|
-
return { ok: false, reason: "target-invalid" };
|
|
221
|
-
}
|
|
222
|
-
const nonce = obj.nonce;
|
|
223
|
-
if (typeof nonce !== "string" || !BOOTSTRAP_NONCE_RE.test(nonce))
|
|
224
|
-
return { ok: false, reason: "nonce-invalid" };
|
|
225
213
|
const task = obj.task;
|
|
226
214
|
if (typeof task !== "string" || task.trim().length === 0)
|
|
227
215
|
return { ok: false, reason: "task-empty" };
|
|
228
216
|
if (task.length > OMP_BOOTSTRAP_TASK_MAX_CHARS)
|
|
229
217
|
return { ok: false, reason: "task-too-long" };
|
|
230
|
-
return { ok: true, value: {
|
|
218
|
+
return { ok: true, value: { task } };
|
|
231
219
|
}
|
|
232
220
|
/**
|
|
233
221
|
* Stage one's whole message: call back, and nothing else.
|
|
@@ -238,18 +226,13 @@ export function decodeOmpBootstrapPayload(raw) {
|
|
|
238
226
|
* no competing goal at all. Stage two exists so this message never has to compete with the
|
|
239
227
|
* work; adding "then do X" back into it would rebuild exactly the prompt that failed.
|
|
240
228
|
*/
|
|
241
|
-
export function buildOmpCallbackOnlyPrompt(
|
|
229
|
+
export function buildOmpCallbackOnlyPrompt() {
|
|
242
230
|
return [
|
|
243
231
|
"You are a fresh visible citizen that entwurf opened in the operator's tmux session.",
|
|
244
232
|
"",
|
|
245
|
-
`FIRST AND ONLY ACTION RIGHT NOW: call ${OMP_BOOTSTRAP_CALLBACK_TOOL} with
|
|
246
|
-
`target=${params.target}, intent=fire-and-forget, wants_reply=false, and ` +
|
|
247
|
-
`message set to exactly ${params.nonce} — that string alone, nothing added.`,
|
|
233
|
+
`FIRST AND ONLY ACTION RIGHT NOW: call ${OMP_BOOTSTRAP_CALLBACK_TOOL} with no arguments.`,
|
|
248
234
|
"That call is how the agent that opened you learns your address. Make the call before",
|
|
249
|
-
"reading files, before planning, and before answering in prose.
|
|
250
|
-
"",
|
|
251
|
-
"Do not inspect environment variables, do not call entwurf_self, and do not start an MCP",
|
|
252
|
-
"server yourself. Your own report of your identity is not the address anyone needs.",
|
|
235
|
+
"reading files, before planning, and before answering in prose. There are no parameters.",
|
|
253
236
|
"",
|
|
254
237
|
"Your actual task arrives as the NEXT user message, immediately after that call succeeds.",
|
|
255
238
|
"Do not ask for it and do not guess at it.",
|
|
@@ -521,22 +504,32 @@ export function ompCallbackToolReady(pi) {
|
|
|
521
504
|
return registered && active.includes(OMP_BOOTSTRAP_CALLBACK_TOOL);
|
|
522
505
|
}
|
|
523
506
|
/**
|
|
524
|
-
* Does this tool event name OUR callback
|
|
507
|
+
* Does this tool event name OUR callback?
|
|
525
508
|
*
|
|
526
509
|
* The event carries no server name, no session id and no original MCP tool name
|
|
527
|
-
* (`extensions/types.ts:916-1017`), so the match is built from what IS there:
|
|
528
|
-
* minted tool name
|
|
529
|
-
*
|
|
530
|
-
*
|
|
510
|
+
* (`extensions/types.ts:916-1017`), so the match is built from what IS there: exact string
|
|
511
|
+
* equality on the canonical minted tool name — a prefix or `includes` here would let a
|
|
512
|
+
* neighbouring tool release this session's task.
|
|
513
|
+
*
|
|
514
|
+
* The target/nonce half of this predicate is GONE, and that is the point of the out-of-band
|
|
515
|
+
* callback: the address rides the sibling's process env, so the verb takes no arguments and
|
|
516
|
+
* there are no argument values left to compare. What replaces the comparison is the ABSENCE
|
|
517
|
+
* of arguments — a call carrying a target or a message is a model supplying an address, which
|
|
518
|
+
* is the second address axis Hard Rule 2 refuses, and it must not release the task. Correlation
|
|
519
|
+
* to THIS bootstrap is not weakened by the removal: it is carried by the stored `toolCallId`
|
|
520
|
+
* (one session, one live tool call) plus the fact that only this session's env named the caller.
|
|
531
521
|
*/
|
|
532
|
-
function matchesCallback(event,
|
|
522
|
+
function matchesCallback(event, _payload) {
|
|
533
523
|
if (event?.toolName !== OMP_BOOTSTRAP_CALLBACK_TOOL)
|
|
534
524
|
return false;
|
|
535
525
|
const input = event?.input;
|
|
536
|
-
if (
|
|
526
|
+
if (input === undefined || input === null)
|
|
527
|
+
return true;
|
|
528
|
+
if (typeof input !== "object" || Array.isArray(input))
|
|
537
529
|
return false;
|
|
538
530
|
const args = input;
|
|
539
|
-
|
|
531
|
+
// No-arg verb: a supplied target/message is a second address axis — not our callback.
|
|
532
|
+
return args.target === undefined && args.message === undefined;
|
|
540
533
|
}
|
|
541
534
|
/**
|
|
542
535
|
* Create one bootstrap for one minted session.
|
|
@@ -580,7 +573,7 @@ export function createOmpBootstrap(opts) {
|
|
|
580
573
|
if (isFinal())
|
|
581
574
|
return;
|
|
582
575
|
phase = "failed";
|
|
583
|
-
log("WARN", `bootstrap-failed
|
|
576
|
+
log("WARN", `bootstrap-failed: ${why}; the task was NOT sent`);
|
|
584
577
|
}
|
|
585
578
|
/**
|
|
586
579
|
* Both stages send the SAME way: `pi.sendUserMessage(content)` with NO delivery option.
|
|
@@ -616,8 +609,8 @@ export function createOmpBootstrap(opts) {
|
|
|
616
609
|
// two callback prompts for one bootstrap.
|
|
617
610
|
phase = "callback-sent";
|
|
618
611
|
stopTimer();
|
|
619
|
-
log("INFO",
|
|
620
|
-
send(buildOmpCallbackOnlyPrompt(
|
|
612
|
+
log("INFO", "bootstrap-ready: callback tool live, sending callback-only prompt");
|
|
613
|
+
send(buildOmpCallbackOnlyPrompt());
|
|
621
614
|
return;
|
|
622
615
|
}
|
|
623
616
|
if (timers.now() >= deadline) {
|
|
@@ -654,7 +647,7 @@ export function createOmpBootstrap(opts) {
|
|
|
654
647
|
if (typeof id !== "string" || id.length === 0)
|
|
655
648
|
return;
|
|
656
649
|
callId = id;
|
|
657
|
-
log("INFO", `bootstrap-callback-observed
|
|
650
|
+
log("INFO", `bootstrap-callback-observed toolCallId=${id}`);
|
|
658
651
|
},
|
|
659
652
|
onToolResult(event) {
|
|
660
653
|
if (phase !== "callback-sent" || callId === null)
|
|
@@ -664,7 +657,7 @@ export function createOmpBootstrap(opts) {
|
|
|
664
657
|
if (!matchesCallback(event, payload))
|
|
665
658
|
return;
|
|
666
659
|
if (event?.isError !== false) {
|
|
667
|
-
log("WARN", `bootstrap-callback-errored
|
|
660
|
+
log("WARN", `bootstrap-callback-errored toolCallId=${callId}; the task was NOT sent`);
|
|
668
661
|
return;
|
|
669
662
|
}
|
|
670
663
|
// RELEASED, AND THE TASK IS NOT SENT HERE. This handler runs inside the callback
|
|
@@ -673,7 +666,7 @@ export function createOmpBootstrap(opts) {
|
|
|
673
666
|
// record that the callback provably succeeded; `onTurnEnd` owns the send.
|
|
674
667
|
phase = "released";
|
|
675
668
|
stopTimer();
|
|
676
|
-
log("INFO", `bootstrap-released
|
|
669
|
+
log("INFO", `bootstrap-released toolCallId=${callId}: task armed for the next turn_end`);
|
|
677
670
|
},
|
|
678
671
|
/**
|
|
679
672
|
* The stage-two boundary: the callback turn is over, so the session is at the edge
|
|
@@ -695,7 +688,7 @@ export function createOmpBootstrap(opts) {
|
|
|
695
688
|
if (phase !== "released")
|
|
696
689
|
return;
|
|
697
690
|
phase = "task-sent";
|
|
698
|
-
log("INFO",
|
|
691
|
+
log("INFO", "bootstrap-task-sent: delivering the task at the turn_end boundary");
|
|
699
692
|
send(payload.task);
|
|
700
693
|
},
|
|
701
694
|
invalidate(why) {
|
|
@@ -706,7 +699,7 @@ export function createOmpBootstrap(opts) {
|
|
|
706
699
|
if (isFinal())
|
|
707
700
|
return;
|
|
708
701
|
phase = "failed";
|
|
709
|
-
log("INFO", `bootstrap-invalidated
|
|
702
|
+
log("INFO", `bootstrap-invalidated: ${why}; the task was NOT sent`);
|
|
710
703
|
},
|
|
711
704
|
};
|
|
712
705
|
}
|
|
@@ -869,7 +862,7 @@ export function startOmpBootstrap(opts) {
|
|
|
869
862
|
const handle = createOmpBootstrap({ payload: decoded.value, pi, timers, log });
|
|
870
863
|
activeBootstrap = { sessionId: envelope.nativeSessionId, handle };
|
|
871
864
|
bootstrapConsumed = true;
|
|
872
|
-
log("INFO",
|
|
865
|
+
log("INFO", "bootstrap-armed: payload admitted, waiting for callback tool");
|
|
873
866
|
handle.start();
|
|
874
867
|
}
|
|
875
868
|
/**
|
|
@@ -42,6 +42,7 @@ export const EXPECTED_TOOLS = [
|
|
|
42
42
|
"entwurf_register_native",
|
|
43
43
|
"entwurf_fresh_call",
|
|
44
44
|
"entwurf_resume_call",
|
|
45
|
+
"entwurf_callback",
|
|
45
46
|
];
|
|
46
47
|
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
47
48
|
/** How long a probed child gets to die politely before it is killed outright. */
|
|
@@ -34,8 +34,13 @@
|
|
|
34
34
|
* - entwurf_resume_call — reopen ONE DORMANT pi citizen under its OWN garden id in a visible
|
|
35
35
|
* window; target-only, runs no turn, LAUNCH and OBSERVATION receipts stay
|
|
36
36
|
* apart.
|
|
37
|
+
* - entwurf_callback — ZERO-ARGUMENT fresh-sibling callback. Reads ENTWURF_CALLBACK_TARGET +
|
|
38
|
+
* ENTWURF_CALLBACK_NONCE from this process env (launcher-injected), validates
|
|
39
|
+
* grammar, and dispatches through the existing v2 runner. Refuses by name
|
|
40
|
+
* when env is absent/malformed or this process is a Codex-provenance bridge.
|
|
41
|
+
* No model-supplied target fallback.
|
|
37
42
|
*
|
|
38
|
-
* That list is the WHOLE public surface —
|
|
43
|
+
* That list is the WHOLE public surface — eight verbs — and `check-entwurf-bridge-boot`
|
|
39
44
|
* (G1f) holds it as an exact set on the runtime tools/list, so a verb added or dropped
|
|
40
45
|
* here without a decision is red rather than merely undocumented.
|
|
41
46
|
*
|
|
@@ -65,6 +70,7 @@ import * as process from "node:process";
|
|
|
65
70
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
66
71
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
67
72
|
import { z } from "zod";
|
|
73
|
+
import { readCallbackEnv } from "../../../pi-extensions/lib/callback-env.ts";
|
|
68
74
|
import { controlSocketPathIn, defaultControlSocketDir } from "../../../pi-extensions/lib/control-socket-path.js";
|
|
69
75
|
import { resolveMailboxReceiverFacts } from "../../../pi-extensions/lib/entwurf-deliverability.ts";
|
|
70
76
|
import { listEntwurfFacts } from "../../../pi-extensions/lib/entwurf-fact-provider.ts";
|
|
@@ -877,6 +883,40 @@ server.tool(
|
|
|
877
883
|
},
|
|
878
884
|
);
|
|
879
885
|
|
|
886
|
+
server.tool(
|
|
887
|
+
"entwurf_callback",
|
|
888
|
+
"ZERO-ARGUMENT callback for a fresh sibling this process was launched as. Reads " +
|
|
889
|
+
"ENTWURF_CALLBACK_TARGET and ENTWURF_CALLBACK_NONCE from this process environment " +
|
|
890
|
+
"(injected by the launcher next to the identity scrub), validates garden-id and nonce " +
|
|
891
|
+
"grammar, and dispatches through the existing v2 runner with intent fire-and-forget, " +
|
|
892
|
+
"message=nonce, wants_reply=false. The target is re-resolved by record/decider — env " +
|
|
893
|
+
"names the id, it does not skip dispatch. REFUSES BY NAME when the pair is absent, " +
|
|
894
|
+
"malformed, or this process is a Codex-provenance bridge (window env never reaches that " +
|
|
895
|
+
"MCP child). No arguments, no fallback to a model-supplied target.",
|
|
896
|
+
{},
|
|
897
|
+
async (_args, extra) => {
|
|
898
|
+
const read = readCallbackEnv(process.env);
|
|
899
|
+
if (!read.ok) {
|
|
900
|
+
return textErr(`entwurf_callback: ${read.reason}`);
|
|
901
|
+
}
|
|
902
|
+
try {
|
|
903
|
+
const sender = await buildSendSenderEnvelope({ requestMeta: extra._meta });
|
|
904
|
+
const rendered = await runAndRenderEntwurfV2FromSurface(
|
|
905
|
+
{
|
|
906
|
+
target: read.target,
|
|
907
|
+
intent: "fire-and-forget",
|
|
908
|
+
message: read.nonce,
|
|
909
|
+
wants_reply: false,
|
|
910
|
+
},
|
|
911
|
+
{ senderProvider: () => sender },
|
|
912
|
+
);
|
|
913
|
+
return rendered.isError ? textErr(rendered.text) : textOk(rendered.text);
|
|
914
|
+
} catch (err) {
|
|
915
|
+
return textErr(`entwurf_callback error: ${err instanceof Error ? err.message : String(err)}`);
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
);
|
|
919
|
+
|
|
880
920
|
// ============================================================================
|
|
881
921
|
// Main
|
|
882
922
|
// ============================================================================
|
|
@@ -55,7 +55,7 @@ names=set(raw)
|
|
|
55
55
|
# was an artifact-surface hole: a bundle missing entwurf_fresh_call / entwurf_resume_call
|
|
56
56
|
# answered tools/list and passed. Equality also refuses an undecided extra verb; the
|
|
57
57
|
# duplicate arm catches a name registered twice, which set membership cannot see.
|
|
58
|
-
expected={'entwurf_v2','entwurf_self','entwurf_peers','entwurf_inbox_read','entwurf_register_native','entwurf_fresh_call','entwurf_resume_call'}
|
|
58
|
+
expected={'entwurf_v2','entwurf_self','entwurf_peers','entwurf_inbox_read','entwurf_register_native','entwurf_fresh_call','entwurf_resume_call','entwurf_callback'}
|
|
59
59
|
legacy={'entwurf','entwurf_resume','entwurf_send'} & names
|
|
60
60
|
if len(raw)!=len(names):
|
|
61
61
|
raise SystemExit(f"duplicate tool registrations: {sorted(raw)}")
|
|
@@ -66,7 +66,7 @@ if legacy:
|
|
|
66
66
|
if names!=expected:
|
|
67
67
|
raise SystemExit(f"tool set MISMATCH — missing {sorted(expected-names)}, unexpected {sorted(names-expected)}")
|
|
68
68
|
PY
|
|
69
|
-
ok "public tool surface is EXACTLY the
|
|
69
|
+
ok "public tool surface is EXACTLY the eight garden verbs (no v1 verb, no undecided extra, no duplicate)"
|
|
70
70
|
|
|
71
71
|
SELF_JSON="$(printf '%s\n' "$OUT" | grep '"id":3' | tail -1)"
|
|
72
72
|
[[ "$SELF_JSON" == *"isError"* ]] || fail "entwurf_self without identity should be an error: $SELF_JSON"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junghanacs/entwurf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Garden-citizen dispatch substrate and meta-bridge for pi, Claude Code, Copilot CLI, OMP, Antigravity, and Codex CLI; Claude and Snowflake Cortex Code ACP backends.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"pi/skill-plugin-example/",
|
|
68
68
|
"run.sh",
|
|
69
69
|
"AGENTS.md",
|
|
70
|
+
"FAQ.md",
|
|
70
71
|
"BASELINE.md",
|
|
71
72
|
"VERIFY.md",
|
|
72
73
|
"DELIVERY.md",
|
|
@@ -91,16 +92,16 @@
|
|
|
91
92
|
"zod": "^3.25.0 || ^4.0.0"
|
|
92
93
|
},
|
|
93
94
|
"peerDependencies": {
|
|
94
|
-
"@earendil-works/pi-ai": ">=0.
|
|
95
|
-
"@earendil-works/pi-coding-agent": ">=0.
|
|
96
|
-
"@earendil-works/pi-tui": ">=0.
|
|
95
|
+
"@earendil-works/pi-ai": ">=0.86.0 <0.87",
|
|
96
|
+
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.87",
|
|
97
|
+
"@earendil-works/pi-tui": ">=0.86.0 <0.87",
|
|
97
98
|
"typebox": "*"
|
|
98
99
|
},
|
|
99
100
|
"devDependencies": {
|
|
100
101
|
"@biomejs/biome": "^2.4.13",
|
|
101
|
-
"@earendil-works/pi-ai": "0.
|
|
102
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
103
|
-
"@earendil-works/pi-tui": "0.
|
|
102
|
+
"@earendil-works/pi-ai": "0.86.0",
|
|
103
|
+
"@earendil-works/pi-coding-agent": "0.86.0",
|
|
104
|
+
"@earendil-works/pi-tui": "0.86.0",
|
|
104
105
|
"@types/node": "^24.3.0",
|
|
105
106
|
"husky": "^9.1.7",
|
|
106
107
|
"rregex": "1.13.1",
|