@junghanacs/entwurf 0.41.2 → 0.45.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/AGENTS.md +1 -0
- package/CHANGELOG.md +159 -0
- package/ENTWURF.json +236 -0
- package/README.md +12 -7
- package/docs/setup-clean-host.md +8 -8
- package/mcp/entwurf-bridge/dist/ENTWURF.json +236 -0
- package/mcp/entwurf-bridge/dist/mcp/entwurf-bridge/src/index.js +27 -188
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/agent-guidance.js +299 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-surface.js +21 -25
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/entwurf-v2-visible-resume.js +15 -11
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/mux-fresh-call.js +23 -20
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/mux-resume-call.js +18 -16
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/remote-pair-send.js +7 -4
- package/mcp/entwurf-bridge/dist/pi-extensions/meta-bridge-pi-durable.js +23 -45
- package/mcp/entwurf-bridge/src/index.ts +121 -319
- package/package.json +3 -2
- package/pi-extensions/lib/agent-guidance.ts +341 -0
- package/pi-extensions/lib/entwurf-v2-surface.ts +25 -31
- package/pi-extensions/lib/entwurf-v2-visible-resume.ts +15 -16
- package/pi-extensions/lib/mux-fresh-call.ts +23 -26
- package/pi-extensions/lib/mux-resume-call.ts +18 -19
- package/pi-extensions/lib/remote-pair-send.ts +7 -4
- package/pi-extensions/meta-bridge-pi-durable.ts +23 -64
- package/run.sh +9 -0
- package/scripts/build-bridge.sh +10 -0
- package/scripts/check-capability-bundle-reach.ts +86 -0
- package/scripts/check-entwurf-self-address.ts +3 -3
- package/scripts/check-entwurf-v2-surface.ts +94 -98
- package/scripts/check-gate-qualification.ts +9 -7
- package/scripts/check-mux-resume-call.ts +20 -3
- package/scripts/mutants/agent-guidance.json +160 -0
- package/scripts/mutants/bridge-boot-resume.json +6 -8
- package/scripts/mutants/capability-bundle-reach.json +124 -0
- package/scripts/mutants/control-send-receipt.json +21 -4
- package/scripts/mutants/mux-fresh-call.json +14 -3
- package/scripts/mutants/mux-resume-call.json +28 -3
- package/scripts/mutants/pi-durable.json +17 -5
- package/scripts/mutants/remote-pair-send.json +21 -2
- package/scripts/mutants/self-address.json +10 -10
- package/scripts/mutants/v2-surface.json +50 -64
- package/scripts/mutants/v2-visible-resume.json +11 -0
|
@@ -114,6 +114,7 @@ import * as fs from "node:fs";
|
|
|
114
114
|
import * as path from "node:path";
|
|
115
115
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
116
116
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
117
|
+
import { ENTWURF_TOOL_GUIDANCE } from "./lib/agent-guidance.js";
|
|
117
118
|
import { defaultMetaMailboxDir, defaultMetaReceiversDir, defaultMetaSendersDir, defaultMetaSessionsDir, listAllMetaIdentitiesDir, readAddressableMetaIdentity, readMetaReceiverMarker, readMetaSenderMarker, requireGardenId, upsertMetaSession, writeMetaReceiverMarker, writeMetaSenderMarker, } from "./lib/meta-session.js";
|
|
118
119
|
/** The backend id this contact mints under. */
|
|
119
120
|
export const PI_DURABLE_BACKEND = "pi-durable";
|
|
@@ -162,26 +163,26 @@ export const PI_DURABLE_TOOL_SCHEMAS = {
|
|
|
162
163
|
target: {
|
|
163
164
|
type: "string",
|
|
164
165
|
minLength: 1,
|
|
165
|
-
description: "
|
|
166
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_v2.parameters["target"],
|
|
166
167
|
},
|
|
167
168
|
intent: {
|
|
168
169
|
type: "string",
|
|
169
170
|
enum: ["fire-and-forget"],
|
|
170
|
-
description:
|
|
171
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_v2.parameters["intent"],
|
|
171
172
|
},
|
|
172
173
|
message: {
|
|
173
174
|
type: "string",
|
|
174
175
|
minLength: 1,
|
|
175
176
|
maxLength: 16000,
|
|
176
|
-
description:
|
|
177
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_v2.parameters["message"],
|
|
177
178
|
},
|
|
178
179
|
mode: {
|
|
179
|
-
description:
|
|
180
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_v2.parameters["mode"],
|
|
180
181
|
type: "string",
|
|
181
182
|
enum: ["steer", "follow_up"],
|
|
182
183
|
},
|
|
183
184
|
wants_reply: {
|
|
184
|
-
description: "
|
|
185
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_v2.parameters["wants_reply"],
|
|
185
186
|
type: "boolean",
|
|
186
187
|
},
|
|
187
188
|
},
|
|
@@ -194,7 +195,7 @@ export const PI_DURABLE_TOOL_SCHEMAS = {
|
|
|
194
195
|
gardenId: {
|
|
195
196
|
type: "string",
|
|
196
197
|
minLength: 1,
|
|
197
|
-
description:
|
|
198
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_inbox_read.parameters["gardenId"],
|
|
198
199
|
},
|
|
199
200
|
},
|
|
200
201
|
required: ["gardenId"],
|
|
@@ -207,32 +208,32 @@ export const PI_DURABLE_TOOL_SCHEMAS = {
|
|
|
207
208
|
backend: {
|
|
208
209
|
type: "string",
|
|
209
210
|
enum: ["pi", "claude-code", "copilot", "omp", "codex", "pi-durable"],
|
|
210
|
-
description:
|
|
211
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["backend"],
|
|
211
212
|
},
|
|
212
213
|
model: {
|
|
213
214
|
type: "string",
|
|
214
215
|
minLength: 1,
|
|
215
216
|
maxLength: 200,
|
|
216
217
|
pattern: "^[A-Za-z0-9][A-Za-z0-9._/:\\[\\]-]*$",
|
|
217
|
-
description:
|
|
218
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["model"],
|
|
218
219
|
},
|
|
219
220
|
task: {
|
|
220
221
|
type: "string",
|
|
221
222
|
minLength: 1,
|
|
222
223
|
maxLength: 16000,
|
|
223
|
-
description:
|
|
224
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["task"],
|
|
224
225
|
},
|
|
225
226
|
cwd: {
|
|
226
|
-
description:
|
|
227
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["cwd"],
|
|
227
228
|
type: "string",
|
|
228
229
|
},
|
|
229
230
|
placement: {
|
|
230
|
-
description:
|
|
231
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["placement"],
|
|
231
232
|
type: "object",
|
|
232
233
|
properties: {
|
|
233
234
|
tmuxSession: {
|
|
234
235
|
type: "string",
|
|
235
|
-
description:
|
|
236
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.parameters["placement.tmuxSession"],
|
|
236
237
|
},
|
|
237
238
|
},
|
|
238
239
|
required: ["tmuxSession"],
|
|
@@ -248,7 +249,7 @@ export const PI_DURABLE_TOOL_SCHEMAS = {
|
|
|
248
249
|
type: "string",
|
|
249
250
|
minLength: 1,
|
|
250
251
|
pattern: "^\\d{8}T\\d{6}-[0-9a-f]{6}$",
|
|
251
|
-
description:
|
|
252
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_resume_call.parameters["target"],
|
|
252
253
|
},
|
|
253
254
|
},
|
|
254
255
|
required: ["target"],
|
|
@@ -261,7 +262,7 @@ export const PI_DURABLE_TOOL_SCHEMAS = {
|
|
|
261
262
|
type: "string",
|
|
262
263
|
minLength: 1,
|
|
263
264
|
pattern: "^\\d{8}T\\d{6}-[0-9a-f]{6}$",
|
|
264
|
-
description: "
|
|
265
|
+
description: ENTWURF_TOOL_GUIDANCE.entwurf_retire_call.parameters["target"],
|
|
265
266
|
},
|
|
266
267
|
},
|
|
267
268
|
required: ["target"],
|
|
@@ -458,37 +459,14 @@ export class PiDurableIdentityNotReady extends Error {
|
|
|
458
459
|
/** The receiver marker's owner kind: the durable host process, which holds the watch AND keys the sender marker. */
|
|
459
460
|
export const PI_DURABLE_RECEIVER_OWNER_KIND = "pi-durable-host";
|
|
460
461
|
const TOOL_DESCRIPTIONS = {
|
|
461
|
-
entwurf_self:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
entwurf_callback: "Call home once, before a fresh sibling's task: the entwurf-bridge reads the caller's garden id and " +
|
|
470
|
-
"nonce from this host's launch environment and delivers the nonce to that caller. No arguments. Refuses by " +
|
|
471
|
-
"name when this host was not launched with a callback pair.",
|
|
472
|
-
entwurf_fresh_call: "Open ONE fresh visible sibling beside this durable host through the entwurf-bridge and hand it a first task " +
|
|
473
|
-
"(backend, model and task required; optional cwd and placement). Returns the bridge's LAUNCH receipt or its " +
|
|
474
|
-
"named refusal — not a started runtime, a delivered task or a reply; the sibling's callback names it. Opening " +
|
|
475
|
-
"beside this host needs the tmux pane this host itself was launched in.",
|
|
476
|
-
entwurf_resume_call: "Reopen ONE dormant pi or Claude Code citizen under its own garden id in a visible tmux window through the " +
|
|
477
|
-
"entwurf-bridge (target required; the record supplies the session and cwd — no task, no prompt, no turn). " +
|
|
478
|
-
"Returns the bridge's LAUNCH and OBSERVATION receipts or its named refusal: a live target, another backend, " +
|
|
479
|
-
"or a Claude Code citizen not proven dormant is refused by name, and opening the window needs the tmux " +
|
|
480
|
-
"session this host itself was launched in.",
|
|
481
|
-
entwurf_retire_call: "Only when the human operator explicitly requested this particular target/work: make ONE retirement attempt for that request " +
|
|
482
|
-
"through the bridge (target only, Pi or Claude Code; self retirement refuses). Development work, a role or " +
|
|
483
|
-
"a record-backed actor is NOT a grant. Use host approval where provided/configured; " +
|
|
484
|
-
"Pi and pi-durable have no built-in per-call approval prompt by default. An explicit operator request and " +
|
|
485
|
-
"agent operating policy are required; attribution and MCP annotations are hints, not grants or proof of approval. " +
|
|
486
|
-
"No autonomous cleanup, timers or automatic " +
|
|
487
|
-
"retry of unknown, cancelled or lost results. Do not manually /resume or /clear the target during the request. " +
|
|
488
|
-
"Pi shutdown-requested is only an ACK, not process exit, flush or model silence. Claude Code exited is that " +
|
|
489
|
-
"fd-pinned process only, not conversation end, children or flush. The JSON receipt keeps outcome, record and " +
|
|
490
|
-
"release separate; receipt return does not mean exit, and cancellation does not undo an action. Invoke once " +
|
|
491
|
-
"per explicitly named target, never infer a roster. This contact does not turn hints into authorization.",
|
|
462
|
+
entwurf_self: ENTWURF_TOOL_GUIDANCE.entwurf_self.descriptions.durable,
|
|
463
|
+
entwurf_peers: ENTWURF_TOOL_GUIDANCE.entwurf_peers.descriptions.durable,
|
|
464
|
+
entwurf_v2: ENTWURF_TOOL_GUIDANCE.entwurf_v2.descriptions.durable,
|
|
465
|
+
entwurf_inbox_read: ENTWURF_TOOL_GUIDANCE.entwurf_inbox_read.descriptions.durable,
|
|
466
|
+
entwurf_callback: ENTWURF_TOOL_GUIDANCE.entwurf_callback.descriptions.durable,
|
|
467
|
+
entwurf_fresh_call: ENTWURF_TOOL_GUIDANCE.entwurf_fresh_call.descriptions.durable,
|
|
468
|
+
entwurf_resume_call: ENTWURF_TOOL_GUIDANCE.entwurf_resume_call.descriptions.durable,
|
|
469
|
+
entwurf_retire_call: ENTWURF_TOOL_GUIDANCE.entwurf_retire_call.descriptions.durable,
|
|
492
470
|
};
|
|
493
471
|
/** Announce, never push: the notice names the garden and the tool, never the body. */
|
|
494
472
|
function doorbellNotice(gardenId, unread) {
|