@junghanacs/entwurf 0.41.2 → 0.50.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 +4 -2
- package/BASELINE.md +110 -1
- package/CHANGELOG.md +328 -0
- package/CONTRIBUTING.md +1 -1
- package/ENTWURF-CLI.json +1229 -0
- package/ENTWURF.json +284 -0
- package/FAQ.md +4 -4
- package/README.md +125 -184
- package/VERIFY.md +2 -2
- package/docs/external-mcp-host.md +3 -3
- package/docs/setup-clean-host.md +37 -12
- package/mcp/entwurf-bridge/dist/ENTWURF.json +284 -0
- package/mcp/entwurf-bridge/dist/mcp/entwurf-bridge/src/index.js +46 -196
- 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 +498 -29
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/fresh-call-dispatch.js +47 -10
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/herdr-fresh-call.js +613 -33
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/herdr-resume-call.js +497 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/meta-session.js +3 -1
- 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 +68 -21
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/pi-durable-fresh-preflight.js +7 -1
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/pi-durable-location.js +347 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/pi-durable-owner-fence.js +1132 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/pi-durable-runtime.js +1 -0
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/remote-pair-send.js +7 -4
- package/mcp/entwurf-bridge/dist/pi-extensions/lib/resume-launch-identity.js +18 -11
- package/mcp/entwurf-bridge/dist/pi-extensions/meta-bridge-pi-durable.js +53 -60
- package/mcp/entwurf-bridge/dist/scripts/herdr-rails.mjs +40 -7
- package/mcp/entwurf-bridge/dist/scripts/meta-bridge-fresh-cut.js +1 -27
- package/mcp/entwurf-bridge/dist/scripts/meta-bridge-prune.js +1 -1
- package/mcp/entwurf-bridge/dist/scripts/meta-facts.js +1 -1
- package/mcp/entwurf-bridge/dist/scripts/peer-facts.js +1 -1
- package/mcp/entwurf-bridge/src/index.ts +149 -327
- package/mcp/entwurf-bridge/tsconfig.build.json +7 -1
- package/native/win32-x64/manifest.json +1 -1
- package/package.json +8 -4
- package/pi/pi-durable/bootstrap.mjs +179 -6
- package/pi/pi-durable/carrier/runtime.js +108 -9
- package/pi/pi-durable/carrier/session-name.js +11 -0
- package/pi/pi-durable/carrier/sessions.js +96 -20
- package/pi/pi-durable/overlay/upstream-pin.json +11 -5
- 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 +725 -54
- package/pi-extensions/lib/fresh-call-dispatch.ts +64 -12
- package/pi-extensions/lib/herdr-fresh-call.ts +919 -40
- package/pi-extensions/lib/herdr-resume-call.ts +810 -0
- package/pi-extensions/lib/meta-session.ts +13 -8
- package/pi-extensions/lib/mux-fresh-call.ts +23 -26
- package/pi-extensions/lib/mux-resume-call.ts +95 -23
- package/pi-extensions/lib/pi-durable-fresh-preflight.ts +9 -2
- package/pi-extensions/lib/pi-durable-location.ts +446 -0
- package/pi-extensions/lib/pi-durable-owner-fence.ts +1461 -0
- package/pi-extensions/lib/pi-durable-runtime.ts +4 -0
- package/pi-extensions/lib/remote-pair-send.ts +7 -4
- package/pi-extensions/lib/resume-launch-identity.ts +31 -12
- package/pi-extensions/meta-bridge-pi-durable.ts +52 -79
- package/run.sh +417 -654
- package/scripts/build-bridge.sh +10 -0
- package/scripts/check-capability-bundle-reach.ts +86 -0
- package/scripts/check-claude-launch.ts +341 -0
- package/scripts/check-entwurf-self-address.ts +3 -3
- package/scripts/check-entwurf-v2-surface.ts +94 -98
- package/scripts/check-fresh-call-dispatch.ts +70 -9
- package/scripts/check-fresh-cut-gate.sh +23 -9
- package/scripts/check-gate-qualification.ts +24 -17
- package/scripts/check-herdr-activation.ts +301 -23
- package/scripts/check-herdr-fresh-call.ts +161 -25
- package/scripts/check-herdr-plugin-build.ts +173 -1
- package/scripts/check-herdr-plugin.ts +28 -2
- package/scripts/check-herdr-runtime-bootstrap.ts +136 -0
- package/scripts/check-install-surface.ts +1236 -6
- package/scripts/check-meta-doctor-oracle.sh +1 -1
- package/scripts/check-meta-facts.ts +20 -1
- package/scripts/check-mux-resume-call.ts +48 -3
- package/scripts/check-peer-facts.ts +39 -2
- package/scripts/cli-help.mjs +222 -0
- package/scripts/dev-bin.sh +39 -2
- package/scripts/herdr-activation.mjs +28 -6
- package/scripts/herdr-operator-link.mjs +389 -0
- package/scripts/herdr-plugin-activate.mjs +5 -0
- package/scripts/herdr-plugin-deactivate.mjs +18 -5
- package/scripts/herdr-rails.mjs +43 -7
- package/scripts/herdr-runtime.mjs +27 -0
- package/scripts/meta-bridge-fresh-cut.ts +1 -27
- package/scripts/meta-bridge-prune.ts +1 -1
- package/scripts/meta-facts.ts +1 -1
- 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/claude-launch.json +142 -0
- package/scripts/mutants/cli-help-source.json +420 -0
- package/scripts/mutants/control-send-receipt.json +21 -4
- package/scripts/mutants/dev-gate-dispatch.json +109 -0
- package/scripts/mutants/fresh-call-dispatch.json +38 -2
- package/scripts/mutants/fresh-cut.json +15 -0
- package/scripts/mutants/herdr-activation.json +128 -0
- package/scripts/mutants/herdr-fresh-call.json +278 -5
- package/scripts/mutants/herdr-operator-link.json +318 -0
- package/scripts/mutants/herdr-plugin-build.json +55 -0
- package/scripts/mutants/herdr-plugin.json +17 -0
- package/scripts/mutants/herdr-resume-call.json +288 -0
- package/scripts/mutants/herdr-runtime-bootstrap.json +48 -0
- package/scripts/mutants/meta-facts.json +15 -0
- package/scripts/mutants/mux-fresh-call.json +14 -3
- package/scripts/mutants/mux-resume-call.json +89 -3
- package/scripts/mutants/peer-facts.json +15 -0
- package/scripts/mutants/pi-durable.json +996 -6
- package/scripts/mutants/remote-pair-send.json +21 -2
- package/scripts/mutants/self-address.json +10 -10
- package/scripts/mutants/source-install.json +35 -0
- package/scripts/mutants/v2-surface.json +50 -64
- package/scripts/mutants/v2-visible-resume.json +266 -6
- package/scripts/peer-facts.ts +1 -1
- package/scripts/smoke-agy-install-state.sh +66 -0
- package/scripts/smoke-meta-prune.sh +23 -0
- package/scripts/smoke-omp-fresh-live.ts +12 -3
- package/scripts/smoke-omp-receive-live.ts +7 -1
- package/scripts/smoke-pi-durable-fresh-live.ts +12 -2
- package/team.json.example +39 -0
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { basename } from "node:path";
|
|
21
|
+
import {
|
|
22
|
+
ENTWURF_DELIVERY_RESULT_CLAUSES,
|
|
23
|
+
ENTWURF_REJECT_HINTS,
|
|
24
|
+
ENTWURF_SLOTTED_REJECT_HINTS,
|
|
25
|
+
} from "./agent-guidance.ts";
|
|
21
26
|
import type { SenderEnvelope } from "./entwurf-control-rpc.ts";
|
|
22
27
|
import type { DispatchInput, EntwurfV2Mode } from "./entwurf-v2-decider.ts";
|
|
23
28
|
import { makeProductionEntwurfV2Deps, type ProductionEntwurfV2Opts } from "./entwurf-v2-production.ts";
|
|
@@ -65,7 +70,9 @@ export function toDispatchInput(params: SurfaceEntwurfV2Params): DispatchInput {
|
|
|
65
70
|
* Detour B (B-a) — actionable rendering of an honest reject. The decider is UNCHANGED:
|
|
66
71
|
* a reject stays a reject (Hard Rule 3). This only appends a one-line "what to do instead"
|
|
67
72
|
* to the reject TEXT, so an honest reject stops reading as "delivery impossible". Returns
|
|
68
|
-
* undefined for rejects with no useful next step.
|
|
73
|
+
* undefined for rejects with no useful next step. Hint English is authored in root ENTWURF.json
|
|
74
|
+
* (#154); the reason switch stays here, and so do the record-less-socket slot value and its
|
|
75
|
+
* concatenation (#154 E1b).
|
|
69
76
|
*/
|
|
70
77
|
export function actionableRejectHint(reason: string): string | undefined {
|
|
71
78
|
switch (reason) {
|
|
@@ -74,13 +81,7 @@ export function actionableRejectHint(reason: string): string | undefined {
|
|
|
74
81
|
// state — the citizen exists and is not running — matters more than ever now that
|
|
75
82
|
// there is no verb behind it: a caller that reads "reject" as "wrong id" goes
|
|
76
83
|
// looking in the wrong place.
|
|
77
|
-
return
|
|
78
|
-
"this citizen's record is intact but its session is not running, and delivery has no way to wake it. " +
|
|
79
|
-
"The resume that used to answer here launched a hidden background child and was withdrawn under the " +
|
|
80
|
-
"visible-first rule; the visible same-id resume is the separate lifecycle verb entwurf_resume_call. " +
|
|
81
|
-
"Only on an explicit operator request, use entwurf_resume_call {target} for Pi or Claude Code; " +
|
|
82
|
-
"it submits no prompt. This capability hint is not permission to resume automatically."
|
|
83
|
-
);
|
|
84
|
+
return ENTWURF_REJECT_HINTS["dormant-fire-forget-unsupported"];
|
|
84
85
|
case "indeterminate-no-spawn":
|
|
85
86
|
// The socket probe did not settle, so liveness is UNKNOWN — an unestablished probe
|
|
86
87
|
// is not a measured death, and dispatching into it could double-deliver. Say
|
|
@@ -91,35 +92,27 @@ export function actionableRejectHint(reason: string): string | undefined {
|
|
|
91
92
|
// (never dispatch into an indeterminate target), not a capability that still
|
|
92
93
|
// exists. So the hint's job is to say plainly what did NOT happen: nothing
|
|
93
94
|
// delivered, nothing started.
|
|
94
|
-
return
|
|
95
|
-
"the control-socket probe was inconclusive, so the target's liveness is UNKNOWN — this is not a " +
|
|
96
|
-
"measured death. NOTHING was delivered and NO process was started (the reason id keeps its frozen " +
|
|
97
|
-
"'-no-spawn' wire spelling from an era when one could be; entwurf_v2 starts nothing on any rail). " +
|
|
98
|
-
"Re-run entwurf_peers to re-probe; if it stays indeterminate, check for a stale socket file left at " +
|
|
99
|
-
"that garden id by a session that died without cleaning up."
|
|
100
|
-
);
|
|
95
|
+
return ENTWURF_REJECT_HINTS["indeterminate-no-spawn"];
|
|
101
96
|
case "native-push-target-dead":
|
|
102
97
|
// The adapter probe found no live native host serving this conversation/thread. Stays
|
|
103
98
|
// backend-neutral: agy speaks conversations over an LS port, Codex threads over an
|
|
104
99
|
// app-server socket, and this hint is read by callers of both.
|
|
105
|
-
return "
|
|
100
|
+
return ENTWURF_REJECT_HINTS["native-push-target-dead"];
|
|
106
101
|
case "native-push-probe-indeterminate":
|
|
107
102
|
// Native host up, but nothing served this conversation/thread — inconclusive, not a
|
|
108
103
|
// hard dead. Backend-neutral for the same reason as the dead cell above.
|
|
109
|
-
return "
|
|
104
|
+
return ENTWURF_REJECT_HINTS["native-push-probe-indeterminate"];
|
|
110
105
|
case "native-push-paused":
|
|
111
106
|
// #152: a policy refusal, not a liveness verdict — this dispatch probed and sent nothing.
|
|
112
|
-
return "native-push
|
|
113
|
-
case "record-less-socket":
|
|
107
|
+
return ENTWURF_REJECT_HINTS["native-push-paused"];
|
|
108
|
+
case "record-less-socket": {
|
|
114
109
|
// #50 C4: name the true cause AND the fix — a bare socket is a diagnostic
|
|
115
|
-
// state, not an addressable citizen (the record is the address).
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
`${FRESH_CUT_PRESCRIPTION}. A stale/forged socket should be removed.`
|
|
122
|
-
);
|
|
110
|
+
// state, not an addressable citizen (the record is the address). The text on either
|
|
111
|
+
// side of the fix command is authored in root ENTWURF.json; the command itself stays
|
|
112
|
+
// with its owner (meta-session.ts), so the root file never copies it.
|
|
113
|
+
const hint = ENTWURF_SLOTTED_REJECT_HINTS["record-less-socket"];
|
|
114
|
+
return `${hint.beforeFreshCutPrescription}${FRESH_CUT_PRESCRIPTION}${hint.afterFreshCutPrescription}`;
|
|
115
|
+
}
|
|
123
116
|
default:
|
|
124
117
|
return undefined;
|
|
125
118
|
}
|
|
@@ -221,17 +214,18 @@ export function renderEntwurfV2Result(result: EntwurfV2RunResult): EntwurfV2Surf
|
|
|
221
214
|
// the same acceptance vocabulary the ordinary receipt uses is named here too — a
|
|
222
215
|
// dirty lock is a reason to be MORE precise about what happened, not less, because
|
|
223
216
|
// the operator is about to decide by hand whether anything needs re-sending.
|
|
217
|
+
// The two static clauses are authored in root ENTWURF.json (#154 E1a); this receipt's
|
|
218
|
+
// syntax, branches and slots stay here.
|
|
224
219
|
const what =
|
|
225
220
|
result.finalizedOutcome === "rejected"
|
|
226
|
-
? `rejected${result.finalizedRejectReason ? ` (${result.finalizedRejectReason})` : ""} —
|
|
221
|
+
? `rejected${result.finalizedRejectReason ? ` (${result.finalizedRejectReason})` : ""} — ${ENTWURF_DELIVERY_RESULT_CLAUSES["finalized-rejected"]}`
|
|
227
222
|
: `${result.finalizedBoundary ?? "mailbox-enqueued"}${
|
|
228
223
|
result.finalizedMessagePath ? ` (enqueued ${basename(result.finalizedMessagePath)})` : ""
|
|
229
224
|
}`;
|
|
230
225
|
return {
|
|
231
226
|
text:
|
|
232
|
-
`entwurf_v2 ${result.transport} finalized as ${what}, and
|
|
233
|
-
|
|
234
|
-
`\n error: ${result.error}`,
|
|
227
|
+
`entwurf_v2 ${result.transport} finalized as ${what}, and ` +
|
|
228
|
+
`${ENTWURF_DELIVERY_RESULT_CLAUSES["dirty-lock"]}\n error: ${result.error}`,
|
|
235
229
|
isError: true,
|
|
236
230
|
};
|
|
237
231
|
}
|