pi-daddy 0.18.1 → 0.19.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/CHANGELOG.md +136 -0
- package/README.md +46 -2
- package/contracts/ledger/v2/README.md +59 -0
- package/contracts/ledger/v2/fixtures/capability-decision.json +95 -0
- package/contracts/ledger/v2/fixtures/check-receipt.json +40 -0
- package/contracts/ledger/v2/fixtures/child-lifecycle.json +42 -0
- package/contracts/ledger/v2/fixtures/workspace-lease.json +41 -0
- package/contracts/ledger/v2/ledger-event.schema.json +633 -0
- package/dist/approval-prompt.d.ts +2 -1
- package/dist/approval-prompt.d.ts.map +1 -1
- package/dist/approval-prompt.js +9 -0
- package/dist/approval-prompt.js.map +1 -1
- package/dist/approval.d.ts +4 -2
- package/dist/approval.d.ts.map +1 -1
- package/dist/approval.js +4 -0
- package/dist/approval.js.map +1 -1
- package/dist/capabilities.d.ts +90 -0
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +114 -3
- package/dist/capabilities.js.map +1 -1
- package/dist/catalog.d.ts +15 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +54 -3
- package/dist/catalog.js.map +1 -1
- package/dist/check-runner.d.ts.map +1 -1
- package/dist/check-runner.js +5 -7
- package/dist/check-runner.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +21 -1
- package/dist/cli.js.map +1 -1
- package/dist/definitions.d.ts.map +1 -1
- package/dist/definitions.js +7 -1
- package/dist/definitions.js.map +1 -1
- package/dist/delegate.d.ts.map +1 -1
- package/dist/delegate.js +31 -4
- package/dist/delegate.js.map +1 -1
- package/dist/delegation-approval.d.ts.map +1 -1
- package/dist/delegation-approval.js +37 -12
- package/dist/delegation-approval.js.map +1 -1
- package/dist/executor.d.ts +2 -1
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js +1 -0
- package/dist/executor.js.map +1 -1
- package/dist/grant-env.d.ts +2 -0
- package/dist/grant-env.d.ts.map +1 -1
- package/dist/grant-env.js +26 -3
- package/dist/grant-env.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +13 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +35 -2
- package/dist/init.js.map +1 -1
- package/dist/lease-helper.d.ts +58 -0
- package/dist/lease-helper.d.ts.map +1 -0
- package/dist/lease-helper.js +94 -0
- package/dist/lease-helper.js.map +1 -0
- package/dist/lease-record.d.ts +15 -3
- package/dist/lease-record.d.ts.map +1 -1
- package/dist/lease-record.js.map +1 -1
- package/dist/ledger-events.d.ts +35 -14
- package/dist/ledger-events.d.ts.map +1 -1
- package/dist/ledger-events.js +41 -0
- package/dist/ledger-events.js.map +1 -1
- package/dist/ledger.d.ts +10 -5
- package/dist/ledger.d.ts.map +1 -1
- package/dist/ledger.js +13 -3
- package/dist/ledger.js.map +1 -1
- package/dist/propagation.d.ts +16 -0
- package/dist/propagation.d.ts.map +1 -1
- package/dist/propagation.js +20 -1
- package/dist/propagation.js.map +1 -1
- package/dist/refusals.d.ts +1 -1
- package/dist/refusals.d.ts.map +1 -1
- package/dist/refusals.js +1 -0
- package/dist/refusals.js.map +1 -1
- package/dist/resolve.d.ts +10 -0
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +27 -3
- package/dist/resolve.js.map +1 -1
- package/dist/routing-authority.d.ts +71 -0
- package/dist/routing-authority.d.ts.map +1 -0
- package/dist/routing-authority.js +100 -0
- package/dist/routing-authority.js.map +1 -0
- package/dist/skill-packages.d.ts +11 -5
- package/dist/skill-packages.d.ts.map +1 -1
- package/dist/skill-packages.js +20 -11
- package/dist/skill-packages.js.map +1 -1
- package/dist/workspace-lease.d.ts +15 -3
- package/dist/workspace-lease.d.ts.map +1 -1
- package/dist/workspace-lease.js +81 -24
- package/dist/workspace-lease.js.map +1 -1
- package/dist/workspace.d.ts +25 -0
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +142 -5
- package/dist/workspace.js.map +1 -1
- package/extensions/delegation.ts +7 -1
- package/extensions/grants-command.ts +11 -1
- package/extensions/grants.ts +6 -1
- package/extensions/init-command.ts +33 -2
- package/extensions/session-report.ts +13 -20
- package/extensions/session.ts +9 -1
- package/extensions/workspace-runtime.ts +34 -4
- package/package.json +8 -3
- package/src/approval-prompt.ts +2 -1
- package/src/approval.ts +4 -2
- package/src/capabilities.ts +120 -4
- package/src/catalog.ts +62 -4
- package/src/check-runner.ts +8 -8
- package/src/cli.ts +24 -1
- package/src/definitions.ts +7 -1
- package/src/delegate.ts +41 -4
- package/src/delegation-approval.ts +37 -12
- package/src/executor.ts +2 -1
- package/src/grant-env.ts +39 -7
- package/src/index.ts +1 -0
- package/src/init.ts +40 -2
- package/src/lease-helper.ts +97 -0
- package/src/lease-record.ts +15 -3
- package/src/ledger-events.ts +66 -22
- package/src/ledger.ts +30 -6
- package/src/propagation.ts +21 -1
- package/src/refusals.ts +1 -0
- package/src/resolve.ts +29 -3
- package/src/routing-authority.ts +121 -0
- package/src/skill-packages.ts +20 -13
- package/src/workspace-lease.ts +84 -24
- package/src/workspace.ts +179 -6
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,sBAAsB,GAIvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,GAQf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAuC,MAAM,YAAY,CAAC;AAE5E,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GAOnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,GAIrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,OAAO,GAGR,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,GAK5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,aAAa,GAId,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,gBAAgB,GAOjB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,sBAAsB,GAIvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,wBAAwB,EACxB,WAAW,EACX,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,GAQf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAuC,MAAM,YAAY,CAAC;AAE5E,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GAOnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,GAIrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,OAAO,GAGR,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,GAK5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,aAAa,GAId,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,gBAAgB,GAOjB,MAAM,sBAAsB,CAAC"}
|
package/dist/init.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface InitPlan {
|
|
|
65
65
|
grant: Capability[];
|
|
66
66
|
/** Withheld capability → the definitions that declared it (ADR-0029). Emitted commented. */
|
|
67
67
|
withheldCapabilities: Map<Capability, string[]>;
|
|
68
|
+
/** `workspace:<id>` this project could route to (ADR-0035). Always commented — `init` does not choose. */
|
|
69
|
+
routableWorkspaces: Capability[];
|
|
68
70
|
grantEnvPath: string;
|
|
69
71
|
grantEnvContent: string;
|
|
70
72
|
/** Capabilities a declared ceiling names that pi 0.84.1 has no tool for — a caution, not a verdict. */
|
|
@@ -88,7 +90,17 @@ export declare function withPlaceholder(text: string, declared: boolean, note?:
|
|
|
88
90
|
* tools at all and the whole file is inert. Everything else is emitted commented, named, and one uncomment
|
|
89
91
|
* away (ADR-0029).
|
|
90
92
|
*/
|
|
91
|
-
export declare function planInit(packages: SkillPackage[], cwd: string
|
|
93
|
+
export declare function planInit(packages: SkillPackage[], cwd: string,
|
|
94
|
+
/**
|
|
95
|
+
* Ids from the operator's workspace registry, when one is configured — read by the CALLER, because
|
|
96
|
+
* `planInit` is pure and stays that way.
|
|
97
|
+
*
|
|
98
|
+
* ADR-0035 made routing a capability and said `init` "scaffolds the registered ids so the common path is a
|
|
99
|
+
* one-line grant edit". It did not: `init` had never heard of the registry, so the ADR's own stated
|
|
100
|
+
* migration path for a breaking change did not exist. These are emitted **commented**, never live —
|
|
101
|
+
* offering the ids while refusing to choose among them is exactly ADR-0028's position.
|
|
102
|
+
*/
|
|
103
|
+
registeredWorkspaceIds?: readonly string[]): InitPlan;
|
|
92
104
|
export interface InitOutcome {
|
|
93
105
|
written: string[];
|
|
94
106
|
/** Present already, so left alone. `init` never silently overwrites an edited ceiling. */
|
package/dist/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAQH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,2FAA2F;AAC3F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAEzE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,4FAA4F;IAC5F,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,0GAA0G;IAC1G,UAAU,E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|
|
25
25
|
import { join } from "node:path";
|
|
26
|
-
import { agentCapability } from "./capabilities.js";
|
|
26
|
+
import { agentCapability, workspaceCapability } from "./capabilities.js";
|
|
27
27
|
import { ceilingForDefinition } from "./definitions.js";
|
|
28
28
|
import { ALWAYS_LIVE, assertGrantIsWritable, isLiveByDefault, renderGrantEnv } from "./grant-env.js";
|
|
29
29
|
import { PI_BUILTIN_TOOLS } from "./pi-tools.js";
|
|
@@ -103,7 +103,17 @@ function unknownToolIds(capabilities) {
|
|
|
103
103
|
* tools at all and the whole file is inert. Everything else is emitted commented, named, and one uncomment
|
|
104
104
|
* away (ADR-0029).
|
|
105
105
|
*/
|
|
106
|
-
export function planInit(packages, cwd
|
|
106
|
+
export function planInit(packages, cwd,
|
|
107
|
+
/**
|
|
108
|
+
* Ids from the operator's workspace registry, when one is configured — read by the CALLER, because
|
|
109
|
+
* `planInit` is pure and stays that way.
|
|
110
|
+
*
|
|
111
|
+
* ADR-0035 made routing a capability and said `init` "scaffolds the registered ids so the common path is a
|
|
112
|
+
* one-line grant edit". It did not: `init` had never heard of the registry, so the ADR's own stated
|
|
113
|
+
* migration path for a breaking change did not exist. These are emitted **commented**, never live —
|
|
114
|
+
* offering the ids while refusing to choose among them is exactly ADR-0028's position.
|
|
115
|
+
*/
|
|
116
|
+
registeredWorkspaceIds = []) {
|
|
107
117
|
const skills = [];
|
|
108
118
|
const collisions = [];
|
|
109
119
|
const seen = new Set();
|
|
@@ -146,6 +156,21 @@ export function planInit(packages, cwd) {
|
|
|
146
156
|
for (const capability of skill.ceiling) {
|
|
147
157
|
if (isLiveByDefault(capability))
|
|
148
158
|
continue;
|
|
159
|
+
// A routing destination is withheld but does NOT belong in this map, and the difference is not
|
|
160
|
+
// cosmetic. This map drives two things: the "WITHHELD BY DEFAULT — these can change your machine"
|
|
161
|
+
// block, and `/grants init`'s dialog. Review found a `workspace:` id reaching both — described to the
|
|
162
|
+
// operator with `tool:bash`'s rationale (routing does not change your machine, and unlike `bash` it
|
|
163
|
+
// *is* gateable), and then granted **live and persisted** on one "Yes", off a third-party package's
|
|
164
|
+
// declaration. That is the rule `grant-env.ts` states — "does not become live because a package asked
|
|
165
|
+
// for it" — honoured by the rendered file and broken by the dialog beside it: two surfaces of one
|
|
166
|
+
// command disagreeing, which is R-28's shape inside the fix for R-28.
|
|
167
|
+
//
|
|
168
|
+
// Which worktree a child starts in is not derivable from a declaration (ADR-0028), so `init` lists
|
|
169
|
+
// routing and never grants it. `routableWorkspaces` below is where these go; the definition that
|
|
170
|
+
// declared one still loses its live `agent:` id via the `needs-withheld` pass, so nothing becomes
|
|
171
|
+
// spawnable behind the operator's back either.
|
|
172
|
+
if (capability.startsWith("workspace:"))
|
|
173
|
+
continue;
|
|
149
174
|
withheldCapabilities.set(capability, [...(withheldCapabilities.get(capability) ?? []), skill.name]);
|
|
150
175
|
}
|
|
151
176
|
}
|
|
@@ -190,11 +215,18 @@ export function planInit(packages, cwd) {
|
|
|
190
215
|
ceiling: s.ceiling,
|
|
191
216
|
...(s.withheld ? { unspawnable: describe[s.withheld](s) } : {}),
|
|
192
217
|
}));
|
|
218
|
+
// Registry ids the operator could route to, plus any a copied definition actually declares — a package
|
|
219
|
+
// naming `workspace:prod` is evidence that id matters here, and it must still be uncommented by hand.
|
|
220
|
+
const declaredWorkspaces = skills.flatMap((s) => s.ceiling.filter((c) => c.startsWith("workspace:")));
|
|
221
|
+
const routableWorkspaces = [
|
|
222
|
+
...new Set([...registeredWorkspaceIds.map(workspaceCapability), ...declaredWorkspaces]),
|
|
223
|
+
].sort();
|
|
193
224
|
return {
|
|
194
225
|
skills,
|
|
195
226
|
collisions,
|
|
196
227
|
grant,
|
|
197
228
|
withheldCapabilities,
|
|
229
|
+
routableWorkspaces,
|
|
198
230
|
grantEnvPath: join(cwd, ".pi", "grants.env"),
|
|
199
231
|
grantEnvContent: renderGrantEnv({
|
|
200
232
|
skills: grantEnvSkills,
|
|
@@ -203,6 +235,7 @@ export function planInit(packages, cwd) {
|
|
|
203
235
|
withheldDefinitions: skills.filter((s) => s.withheld === "needs-withheld").map((s) => s.name),
|
|
204
236
|
crossReferences,
|
|
205
237
|
cautions,
|
|
238
|
+
routableWorkspaces,
|
|
206
239
|
}),
|
|
207
240
|
cautions,
|
|
208
241
|
};
|
package/dist/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,cAAc,EAAsB,MAAM,gBAAgB,CAAC;AACzH,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIjD,2FAA2F;AAC3F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB,EAAE,IAAY;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,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C,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/F,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc,EAAE,UAA+B,EAAE;IAC/E,MAAM,OAAO,GAAgB,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACnE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC;IACrC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAChC,IAAI,KAAK;YAAE,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;;YAC9D,MAAM,mBAAmB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC5E,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The lock helper: a separate program, and the parent's side of its pipes.**
|
|
3
|
+
*
|
|
4
|
+
* Split out of `workspace-lease.ts` because `test/file-size.test.ts` refused that file — at 405 lines on the
|
|
5
|
+
* ADR-0035 branch when PR #14 merged into it, and at 435 here once R-152's guards landed. Both branches take
|
|
6
|
+
* the same seam so they converge rather than diverge, and the cap has never been raised: `delegate.ts` was
|
|
7
|
+
* split at 413 the same way (rule: when a guard fails, obey it).
|
|
8
|
+
*
|
|
9
|
+
* The seam is not arbitrary. Everything here concerns the process that HOLDS the kernel lock — the source it
|
|
10
|
+
* runs, the readiness token it prints, and the parent-side handles that keep it referenced.
|
|
11
|
+
* `workspace-lease.ts` keeps the lease lifecycle that talks to it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LEASE_READY = "PI_DADDY_LEASE_READY";
|
|
14
|
+
export declare const HELPER_SOURCE: string;
|
|
15
|
+
/**
|
|
16
|
+
* `unref` the parent's end of one of the helper's pipes.
|
|
17
|
+
*
|
|
18
|
+
* A spawned pipe is a `net.Socket`, which has `unref`; `ChildProcess.stdin` is typed `Writable`, which does
|
|
19
|
+
* not. Hence the narrow cast. The optional call is **defensive, not load-bearing** — the holder is spawned at
|
|
20
|
+
* exactly one site with three pipes, so none of these is ever `null`, and an earlier version of this comment
|
|
21
|
+
* claimed otherwise by citing a `stdio: "ignore"` caller that does not exist.
|
|
22
|
+
*
|
|
23
|
+
* Only `stdout` and `stderr` are unref'ed. `stdin` was too, until a line-by-line reversion showed the suite
|
|
24
|
+
* stayed green without it — an unforced line inside the fix that exists to be forced, which is exactly the
|
|
25
|
+
* shape R-122 was about.
|
|
26
|
+
*/
|
|
27
|
+
export declare const unrefStream: (stream: unknown) => void;
|
|
28
|
+
/**
|
|
29
|
+
* The bounds on the helper's `herdr tab close` attempts live here, with the attempts they bound — moved out of
|
|
30
|
+
* `workspace-lease.ts` when the line ceiling refused it at 402 lines, once both this branch's ADR-0035 work and
|
|
31
|
+
* `main`'s R-152 guards had landed in it. Third time that guard has fired on this file and third time the
|
|
32
|
+
* answer was a seam rather than a bigger cap.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* **A bound that is not a bound throws, and it throws a `RangeError` (R-146, R-152).**
|
|
36
|
+
*
|
|
37
|
+
* Both ends fail, in opposite directions and both silently:
|
|
38
|
+
*
|
|
39
|
+
* - `0` reads as "no limit" and Node agrees — `execFile` treats `timeout: 0` as *no* timeout (measured: the
|
|
40
|
+
* callback for a 3s sleep arrives at 3004ms with no error), reinstating the unbounded hang the bound exists
|
|
41
|
+
* to prevent. Negatives behave identically.
|
|
42
|
+
* - anything above `2^31 - 1` truncates: `setTimeout` warns `TimeoutOverflowWarning … set to 1`, so
|
|
43
|
+
* `Number.MAX_SAFE_INTEGER` — the plausible "effectively no limit" sentinel, given the argument about `0`
|
|
44
|
+
* — SIGKILLs every `herdr tab close` after 1ms, before herdr can act. Measured: callback at 3ms.
|
|
45
|
+
*
|
|
46
|
+
* **Not a `GovernanceRefusal`.** It was one, carrying `WORKSPACE_LEASE_STALE`, which everywhere else in this
|
|
47
|
+
* package means *the lease went stale or was lost* — so an ADR-0034 controller switching on codes (the reason
|
|
48
|
+
* codes exist, R-103) would classify a permanent caller bug as transient and retry a call that can never
|
|
49
|
+
* succeed. A refusal is a governance outcome that gets ledgered; a bad argument is neither.
|
|
50
|
+
*
|
|
51
|
+
* Checked for read leases too, which the first version did not: it sat below the read-lease early return, so a
|
|
52
|
+
* controller smoke-testing its configuration against a read lease got a false all-clear.
|
|
53
|
+
*/
|
|
54
|
+
export declare const assertCloseBounds: (input: {
|
|
55
|
+
herdrCloseTimeoutMs?: number;
|
|
56
|
+
herdrCloseAttempts?: number;
|
|
57
|
+
}) => void;
|
|
58
|
+
//# sourceMappingURL=lease-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lease-helper.d.ts","sourceRoot":"","sources":["../src/lease-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAelD,eAAO,MAAM,aAAa,QAQF,CAAC;AAEzB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,OAAO,KAAG,IAE7C,CAAC;AAEF;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO;IAAE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,IAgBxG,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The lock helper: a separate program, and the parent's side of its pipes.**
|
|
3
|
+
*
|
|
4
|
+
* Split out of `workspace-lease.ts` because `test/file-size.test.ts` refused that file — at 405 lines on the
|
|
5
|
+
* ADR-0035 branch when PR #14 merged into it, and at 435 here once R-152's guards landed. Both branches take
|
|
6
|
+
* the same seam so they converge rather than diverge, and the cap has never been raised: `delegate.ts` was
|
|
7
|
+
* split at 413 the same way (rule: when a guard fails, obey it).
|
|
8
|
+
*
|
|
9
|
+
* The seam is not arbitrary. Everything here concerns the process that HOLDS the kernel lock — the source it
|
|
10
|
+
* runs, the readiness token it prints, and the parent-side handles that keep it referenced.
|
|
11
|
+
* `workspace-lease.ts` keeps the lease lifecycle that talks to it.
|
|
12
|
+
*/
|
|
13
|
+
export const LEASE_READY = "PI_DADDY_LEASE_READY";
|
|
14
|
+
// The lock holder also owns crash cleanup for the governed child. If the parent dies, stdin closes;
|
|
15
|
+
// the helper signals the attached process, or closes the herdr tab, before releasing flock. A raw
|
|
16
|
+
// descendant deliberately detached by bash remains ADR-0012's OS-containment boundary, not a lease
|
|
17
|
+
// guarantee. The process branch SIGTERMs, escalates to SIGKILL at +500ms, and releases at +750ms
|
|
18
|
+
// WITHOUT confirming death (R-101). The herdr branch retries `tab close` a BOUNDED number of times
|
|
19
|
+
// and then releases anyway, leaving a marker file: an unreleasable lock strands a worktree forever
|
|
20
|
+
// with no in-product recovery, which is strictly worse than a recorded failure to close (R-102).
|
|
21
|
+
//
|
|
22
|
+
// **Each attempt is bounded in WALL CLOCK, not just in count (R-146).** `execFile` with no `timeout`
|
|
23
|
+
// never calls back if `herdr` accepts the close and does not answer, so the retry counter never
|
|
24
|
+
// decrements, `giveUp` never runs and no marker is written — the lock is held forever. That was masked
|
|
25
|
+
// while the parent could not exit, because the operator saw a hung `pi` instead; measured with a `herdr`
|
|
26
|
+
// that sleeps, the parent then exited in 82ms and left a silent strand, which is R-102's rejected outcome
|
|
27
|
+
// reached quietly. A bound on retries is not a bound on time.
|
|
28
|
+
export const HELPER_SOURCE = `
|
|
29
|
+
import { execFile } from "node:child_process";
|
|
30
|
+
import { writeFileSync } from "node:fs";
|
|
31
|
+
let clean=false, target=null, buffered="";
|
|
32
|
+
process.stdout.write(${JSON.stringify(`${LEASE_READY}:`)}+process.pid+"\\n");
|
|
33
|
+
process.stdin.setEncoding("utf8");
|
|
34
|
+
process.stdin.on("data",chunk=>{buffered+=chunk;for(;;){const i=buffered.indexOf("\\n");if(i<0)break;const line=buffered.slice(0,i);buffered=buffered.slice(i+1);try{const value=JSON.parse(line);if(value.release)clean=true;else if(value.process_pid)target={process_pid:value.process_pid};else if(value.herdr_tab)target={herdr_tab:value.herdr_tab};}catch{}}});
|
|
35
|
+
process.stdin.on("end",()=>{if(clean||!target)return process.exit(0);if(target.process_pid){try{process.kill(target.process_pid,"SIGTERM")}catch{return process.exit(0)}setTimeout(()=>{try{process.kill(target.process_pid,"SIGKILL")}catch{}},500);return setTimeout(()=>process.exit(0),750);}let left=Number(process.env.PI_DADDY_LEASE_CLOSE_ATTEMPTS||10);const giveUp=last=>{try{if(process.env.PI_DADDY_LEASE_MARKER)writeFileSync(process.env.PI_DADDY_LEASE_MARKER,JSON.stringify({reason:last&&(last.killed||last.signal==="SIGKILL")?"herdr-close-timeout":"herdr-close-failed",herdr_tab:target.herdr_tab})+"\\n")}catch{}process.exit(0)};const close=()=>execFile("herdr",["tab","close",target.herdr_tab],{timeout:Number(process.env.PI_DADDY_LEASE_CLOSE_TIMEOUT_MS||15000),killSignal:"SIGKILL"},error=>{if(!error)return process.exit(0);if(--left<=0)return giveUp(error);setTimeout(close,1000)});close();});
|
|
36
|
+
process.stdin.resume();`;
|
|
37
|
+
/**
|
|
38
|
+
* `unref` the parent's end of one of the helper's pipes.
|
|
39
|
+
*
|
|
40
|
+
* A spawned pipe is a `net.Socket`, which has `unref`; `ChildProcess.stdin` is typed `Writable`, which does
|
|
41
|
+
* not. Hence the narrow cast. The optional call is **defensive, not load-bearing** — the holder is spawned at
|
|
42
|
+
* exactly one site with three pipes, so none of these is ever `null`, and an earlier version of this comment
|
|
43
|
+
* claimed otherwise by citing a `stdio: "ignore"` caller that does not exist.
|
|
44
|
+
*
|
|
45
|
+
* Only `stdout` and `stderr` are unref'ed. `stdin` was too, until a line-by-line reversion showed the suite
|
|
46
|
+
* stayed green without it — an unforced line inside the fix that exists to be forced, which is exactly the
|
|
47
|
+
* shape R-122 was about.
|
|
48
|
+
*/
|
|
49
|
+
export const unrefStream = (stream) => {
|
|
50
|
+
stream?.unref?.();
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The bounds on the helper's `herdr tab close` attempts live here, with the attempts they bound — moved out of
|
|
54
|
+
* `workspace-lease.ts` when the line ceiling refused it at 402 lines, once both this branch's ADR-0035 work and
|
|
55
|
+
* `main`'s R-152 guards had landed in it. Third time that guard has fired on this file and third time the
|
|
56
|
+
* answer was a seam rather than a bigger cap.
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* **A bound that is not a bound throws, and it throws a `RangeError` (R-146, R-152).**
|
|
60
|
+
*
|
|
61
|
+
* Both ends fail, in opposite directions and both silently:
|
|
62
|
+
*
|
|
63
|
+
* - `0` reads as "no limit" and Node agrees — `execFile` treats `timeout: 0` as *no* timeout (measured: the
|
|
64
|
+
* callback for a 3s sleep arrives at 3004ms with no error), reinstating the unbounded hang the bound exists
|
|
65
|
+
* to prevent. Negatives behave identically.
|
|
66
|
+
* - anything above `2^31 - 1` truncates: `setTimeout` warns `TimeoutOverflowWarning … set to 1`, so
|
|
67
|
+
* `Number.MAX_SAFE_INTEGER` — the plausible "effectively no limit" sentinel, given the argument about `0`
|
|
68
|
+
* — SIGKILLs every `herdr tab close` after 1ms, before herdr can act. Measured: callback at 3ms.
|
|
69
|
+
*
|
|
70
|
+
* **Not a `GovernanceRefusal`.** It was one, carrying `WORKSPACE_LEASE_STALE`, which everywhere else in this
|
|
71
|
+
* package means *the lease went stale or was lost* — so an ADR-0034 controller switching on codes (the reason
|
|
72
|
+
* codes exist, R-103) would classify a permanent caller bug as transient and retry a call that can never
|
|
73
|
+
* succeed. A refusal is a governance outcome that gets ledgered; a bad argument is neither.
|
|
74
|
+
*
|
|
75
|
+
* Checked for read leases too, which the first version did not: it sat below the read-lease early return, so a
|
|
76
|
+
* controller smoke-testing its configuration against a read lease got a false all-clear.
|
|
77
|
+
*/
|
|
78
|
+
export const assertCloseBounds = (input) => {
|
|
79
|
+
const MAX_TIMER = 2_147_483_647;
|
|
80
|
+
for (const [name, value, ceiling] of [
|
|
81
|
+
["herdrCloseTimeoutMs", input.herdrCloseTimeoutMs, MAX_TIMER],
|
|
82
|
+
["herdrCloseAttempts", input.herdrCloseAttempts, Number.MAX_SAFE_INTEGER],
|
|
83
|
+
]) {
|
|
84
|
+
if (value === undefined)
|
|
85
|
+
continue;
|
|
86
|
+
if (!Number.isInteger(value) || value < 1 || value > ceiling) {
|
|
87
|
+
throw new RangeError(`${name} must be a whole number between 1 and ${ceiling}, not ${String(value)}. Zero and negatives ` +
|
|
88
|
+
`are not "no limit" but no bound at all, a value past ${MAX_TIMER} truncates to 1ms, and a ` +
|
|
89
|
+
`fractional count is not a count — this bound exists so a hung herdr cannot hold the writer lock ` +
|
|
90
|
+
`forever (R-146).`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=lease-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lease-helper.js","sourceRoot":"","sources":["../src/lease-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAClD,oGAAoG;AACpG,kGAAkG;AAClG,mGAAmG;AACnG,iGAAiG;AACjG,mGAAmG;AACnG,mGAAmG;AACnG,iGAAiG;AACjG,EAAE;AACF,qGAAqG;AACrG,gGAAgG;AAChG,uGAAuG;AACvG,yGAAyG;AACzG,0GAA0G;AAC1G,8DAA8D;AAC9D,MAAM,CAAC,MAAM,aAAa,GAAG;;;;uBAIN,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,CAAC;;;;wBAIhC,CAAC;AAEzB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAe,EAAQ,EAAE;IAClD,MAAwC,EAAE,KAAK,EAAE,EAAE,CAAC;AACvD,CAAC,CAAC;AAEF;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAoE,EAAQ,EAAE;IAC9G,MAAM,SAAS,GAAG,aAAa,CAAC;IAChC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI;QACnC,CAAC,qBAAqB,EAAE,KAAK,CAAC,mBAAmB,EAAE,SAAS,CAAC;QAC7D,CAAC,oBAAoB,EAAE,KAAK,CAAC,kBAAkB,EAAE,MAAM,CAAC,gBAAgB,CAAC;KACjE,EAAE,CAAC;QACX,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,OAAO,EAAE,CAAC;YAC7D,MAAM,IAAI,UAAU,CAClB,GAAG,IAAI,yCAAyC,OAAO,SAAS,MAAM,CAAC,KAAK,CAAC,uBAAuB;gBAClG,wDAAwD,SAAS,2BAA2B;gBAC5F,kGAAkG;gBAClG,kBAAkB,CACrB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
package/dist/lease-record.d.ts
CHANGED
|
@@ -41,7 +41,12 @@ export interface WorkspaceLease {
|
|
|
41
41
|
* Needed because a retained lease never calls `release()`, so the metadata stays `state: "active"` and
|
|
42
42
|
* whoever acquires next reports `recovered: true` — blaming a crash on a known-good path.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Record that the lease is being KEPT rather than handed back, and answer what actually happened — the
|
|
46
|
+
* caller ledgers this word (R-152). It is not always `retained`: a helper that has already died makes the
|
|
47
|
+
* fact `lost`, and a lease already settled by `release()` keeps the outcome it had.
|
|
48
|
+
*/
|
|
49
|
+
markRetained(reason?: string): Promise<LeaseReleaseOutcome>;
|
|
45
50
|
/** Reads the give-up marker the helper leaves when it could not close a herdr writer tab. */
|
|
46
51
|
readCloseFailure(): Promise<{
|
|
47
52
|
reason: string;
|
|
@@ -49,7 +54,7 @@ export interface WorkspaceLease {
|
|
|
49
54
|
} | null>;
|
|
50
55
|
}
|
|
51
56
|
/**
|
|
52
|
-
* What a release actually did.
|
|
57
|
+
* What a release actually did. Six members rather than three, because the first version conflated facts
|
|
53
58
|
* that call for different responses — and one of them is an alarm:
|
|
54
59
|
* `released` the lock went back and THIS owner wrote its own handover;
|
|
55
60
|
* `released-unrecorded` the lock went back and the record does not say so, so the next owner will report
|
|
@@ -62,7 +67,14 @@ export interface WorkspaceLease {
|
|
|
62
67
|
* release side of the same defect;
|
|
63
68
|
* `lost` the helper was already gone; this owner released nothing.
|
|
64
69
|
*/
|
|
65
|
-
export type LeaseReleaseOutcome = "released" | "released-unrecorded" | "released-superseded" | "not-held" | "lost"
|
|
70
|
+
export type LeaseReleaseOutcome = "released" | "released-unrecorded" | "released-superseded" | "not-held" | "lost"
|
|
71
|
+
/**
|
|
72
|
+
* The lease was RETAINED and is therefore already settled — `release()` after `markRetained()` answers
|
|
73
|
+
* this instead of running the clean handshake (R-146). It was previously expressible only as the
|
|
74
|
+
* `| "retained"` bolted onto two signatures, which is why `release()` could not say it and claimed
|
|
75
|
+
* `released` instead: a clean handover for a lease kept precisely because a pane would not close.
|
|
76
|
+
*/
|
|
77
|
+
| "retained";
|
|
66
78
|
export declare function leasePaths(leaseDir: string, root: string): {
|
|
67
79
|
lock: string;
|
|
68
80
|
metadata: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lease-record.d.ts","sourceRoot":"","sources":["../src/lease-record.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,CAAC,CAAC;IACX,KAAK,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,iGAAiG;IACjG,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,+EAA+E;IAC/E,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACvD;;;;;OAKG;IACH,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"lease-record.d.ts","sourceRoot":"","sources":["../src/lease-record.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,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AE,IAAI,EAAE,MAAM;;;;EAQxD;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAItF;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,GAAG,WAAW,CAAC,CAgB5F"}
|
package/dist/lease-record.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lease-record.js","sourceRoot":"","sources":["../src/lease-record.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"lease-record.js","sourceRoot":"","sources":["../src/lease-record.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAoFjC,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,IAAY;IACvD,2FAA2F;IAC3F,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpE,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC;QACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC;QACvC,MAAM,EAAE,IAAI,CAAC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,OAAO,WAAW,CAAC;IACrB,CAAC;AACH,CAAC"}
|
package/dist/ledger-events.d.ts
CHANGED
|
@@ -8,6 +8,15 @@ import { LEDGER_VERSION, type LedgerEventBase, type GrantRecord } from "./ledger
|
|
|
8
8
|
import type { ExecutorKind } from "./executor.ts";
|
|
9
9
|
import type { CorrelationMetadata } from "./correlation.ts";
|
|
10
10
|
import type { StructuredRefusal } from "./refusals.ts";
|
|
11
|
+
export declare const WORKSPACE_ACCESSES: readonly ["read", "write"];
|
|
12
|
+
export type WorkspaceAccess = typeof WORKSPACE_ACCESSES[number];
|
|
13
|
+
export declare const WORKSPACE_RECOVERY_VALUES: readonly [false, true, "unknown"];
|
|
14
|
+
export type WorkspaceRecovery = typeof WORKSPACE_RECOVERY_VALUES[number];
|
|
15
|
+
export declare const CHILD_LIFECYCLE_STATES: readonly ["starting", "completed", "failed"];
|
|
16
|
+
export type ChildLifecycleState = typeof CHILD_LIFECYCLE_STATES[number];
|
|
17
|
+
/** The complete Node signal vocabulary accepted by a v2 child-lifecycle event. */
|
|
18
|
+
export declare const CHILD_PROCESS_SIGNALS: readonly ["SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD", "SIGCONT", "SIGFPE", "SIGHUP", "SIGILL", "SIGINT", "SIGIO", "SIGIOT", "SIGKILL", "SIGPIPE", "SIGPOLL", "SIGPROF", "SIGPWR", "SIGQUIT", "SIGSEGV", "SIGSTKFLT", "SIGSTOP", "SIGSYS", "SIGTERM", "SIGTRAP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGUNUSED", "SIGURG", "SIGUSR1", "SIGUSR2", "SIGVTALRM", "SIGWINCH", "SIGXCPU", "SIGXFSZ", "SIGBREAK", "SIGLOST", "SIGINFO"];
|
|
19
|
+
export type ChildProcessSignal = typeof CHILD_PROCESS_SIGNALS[number];
|
|
11
20
|
/**
|
|
12
21
|
* `released` is a handover this owner performed. FOUR members were added by the 0.18.0 review pass, and
|
|
13
22
|
* they were not all previously recorded the same way — `uncontended` was recorded as an *acquisition*, and
|
|
@@ -19,17 +28,18 @@ import type { StructuredRefusal } from "./refusals.ts";
|
|
|
19
28
|
* `uncontended` a read lease took no kernel lock at all, so counting it as an acquisition
|
|
20
29
|
* overstated how many exclusions the kernel actually performed (R-105).
|
|
21
30
|
*/
|
|
22
|
-
export
|
|
31
|
+
export declare const WORKSPACE_LEASE_OUTCOMES: readonly ["acquired", "uncontended", "refused", "released", "released-unrecorded", "lost", "retained", "timeout", "recovered"];
|
|
32
|
+
export type WorkspaceLeaseOutcome = typeof WORKSPACE_LEASE_OUTCOMES[number];
|
|
23
33
|
export interface WorkspaceLeaseEvent extends LedgerEventBase {
|
|
24
34
|
ledgerVersion: typeof LEDGER_VERSION;
|
|
25
35
|
event: "workspace_lease";
|
|
26
36
|
childId: string;
|
|
27
37
|
workspaceId: string;
|
|
28
38
|
root: string;
|
|
29
|
-
access:
|
|
39
|
+
access: WorkspaceAccess;
|
|
30
40
|
outcome: WorkspaceLeaseOutcome;
|
|
31
41
|
/** `"unknown"` when the prior owner's record was unreadable — not evidence of a clean handover. */
|
|
32
|
-
recovered?:
|
|
42
|
+
recovered?: WorkspaceRecovery;
|
|
33
43
|
releaseReason?: string;
|
|
34
44
|
refusal?: StructuredRefusal;
|
|
35
45
|
}
|
|
@@ -37,13 +47,13 @@ export interface ChildLifecycleEvent extends LedgerEventBase {
|
|
|
37
47
|
ledgerVersion: typeof LEDGER_VERSION;
|
|
38
48
|
event: "child_lifecycle";
|
|
39
49
|
childId: string;
|
|
40
|
-
state:
|
|
50
|
+
state: ChildLifecycleState;
|
|
41
51
|
executor: ExecutorKind;
|
|
42
52
|
exitCode?: number | null;
|
|
43
|
-
signal?:
|
|
44
|
-
timedOut?:
|
|
45
|
-
aborted?:
|
|
46
|
-
truncated?:
|
|
53
|
+
signal?: ChildProcessSignal | null;
|
|
54
|
+
timedOut?: true;
|
|
55
|
+
aborted?: true;
|
|
56
|
+
truncated?: true;
|
|
47
57
|
reason?: string;
|
|
48
58
|
}
|
|
49
59
|
export interface CheckReceiptLedgerEvent extends LedgerEventBase {
|
|
@@ -55,28 +65,39 @@ export interface CheckReceiptLedgerEvent extends LedgerEventBase {
|
|
|
55
65
|
checkId: string;
|
|
56
66
|
treeSha: string;
|
|
57
67
|
}
|
|
58
|
-
export type
|
|
68
|
+
export type CapabilityDecisionEvent = GrantRecord & {
|
|
59
69
|
ledgerVersion: typeof LEDGER_VERSION;
|
|
60
70
|
event: "capability_decision";
|
|
61
|
-
|
|
71
|
+
taskDigest: string;
|
|
72
|
+
};
|
|
73
|
+
export type RuntimeLedgerEvent = CapabilityDecisionEvent | WorkspaceLeaseEvent | ChildLifecycleEvent | CheckReceiptLedgerEvent;
|
|
62
74
|
export declare function buildWorkspaceLeaseEvent(args: {
|
|
63
75
|
childId: string;
|
|
64
76
|
workspaceId: string;
|
|
65
77
|
root: string;
|
|
66
|
-
access:
|
|
78
|
+
access: WorkspaceAccess;
|
|
67
79
|
outcome: WorkspaceLeaseOutcome;
|
|
68
|
-
recovered?:
|
|
80
|
+
recovered?: WorkspaceRecovery;
|
|
69
81
|
releaseReason?: string;
|
|
70
82
|
refusal?: StructuredRefusal;
|
|
71
83
|
correlation?: CorrelationMetadata;
|
|
72
84
|
now: Date;
|
|
73
85
|
}): WorkspaceLeaseEvent;
|
|
86
|
+
export declare function buildCheckReceiptLedgerEvent(args: {
|
|
87
|
+
childId: string;
|
|
88
|
+
receiptId: string;
|
|
89
|
+
workspaceId: string;
|
|
90
|
+
checkId: string;
|
|
91
|
+
treeSha: string;
|
|
92
|
+
correlation?: CorrelationMetadata;
|
|
93
|
+
now: Date;
|
|
94
|
+
}): CheckReceiptLedgerEvent;
|
|
74
95
|
export declare function buildChildLifecycleEvent(args: {
|
|
75
96
|
childId: string;
|
|
76
|
-
state:
|
|
97
|
+
state: ChildLifecycleState;
|
|
77
98
|
executor: ExecutorKind;
|
|
78
99
|
exitCode?: number | null;
|
|
79
|
-
signal?:
|
|
100
|
+
signal?: ChildProcessSignal | null;
|
|
80
101
|
timedOut?: boolean;
|
|
81
102
|
aborted?: boolean;
|
|
82
103
|
truncated?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-events.d.ts","sourceRoot":"","sources":["../src/ledger-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"ledger-events.d.ts","sourceRoot":"","sources":["../src/ledger-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,eAAO,MAAM,kBAAkB,4BAA6B,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,yBAAyB,mCAAoC,CAAC;AAC3E,MAAM,MAAM,iBAAiB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,sBAAsB,8CAA+C,CAAC;AACnF,MAAM,MAAM,mBAAmB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAExE,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,+ZAKY,CAAC;AAC/C,MAAM,MAAM,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,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,GAAG,EAAE,IAAI,CAAC;CACX,GAAG,mBAAmB,CAgBtB"}
|
package/dist/ledger-events.js
CHANGED
|
@@ -5,6 +5,31 @@
|
|
|
5
5
|
* remains one import.
|
|
6
6
|
*/
|
|
7
7
|
import { LEDGER_VERSION } from "./ledger.js";
|
|
8
|
+
export const WORKSPACE_ACCESSES = ["read", "write"];
|
|
9
|
+
export const WORKSPACE_RECOVERY_VALUES = [false, true, "unknown"];
|
|
10
|
+
export const CHILD_LIFECYCLE_STATES = ["starting", "completed", "failed"];
|
|
11
|
+
/** The complete Node signal vocabulary accepted by a v2 child-lifecycle event. */
|
|
12
|
+
export const CHILD_PROCESS_SIGNALS = [
|
|
13
|
+
"SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD", "SIGCONT", "SIGFPE", "SIGHUP", "SIGILL", "SIGINT", "SIGIO",
|
|
14
|
+
"SIGIOT", "SIGKILL", "SIGPIPE", "SIGPOLL", "SIGPROF", "SIGPWR", "SIGQUIT", "SIGSEGV", "SIGSTKFLT",
|
|
15
|
+
"SIGSTOP", "SIGSYS", "SIGTERM", "SIGTRAP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGUNUSED", "SIGURG",
|
|
16
|
+
"SIGUSR1", "SIGUSR2", "SIGVTALRM", "SIGWINCH", "SIGXCPU", "SIGXFSZ", "SIGBREAK", "SIGLOST", "SIGINFO",
|
|
17
|
+
];
|
|
18
|
+
/**
|
|
19
|
+
* `released` is a handover this owner performed. FOUR members were added by the 0.18.0 review pass, and
|
|
20
|
+
* they were not all previously recorded the same way — `uncontended` was recorded as an *acquisition*, and
|
|
21
|
+
* `lost` was recorded as nothing at all, because the old `release()` threw before the append ran:
|
|
22
|
+
* `lost` the kernel lock went away under a live governed writer — NOT the same fact as a user
|
|
23
|
+
* cancelling, which is what it used to be indistinguishable from (R-103);
|
|
24
|
+
* `retained` the lease was deliberately kept because a herdr writer tab would not close, so the
|
|
25
|
+
* successor's `recovered: true` would otherwise blame a healthy path (R-104);
|
|
26
|
+
* `uncontended` a read lease took no kernel lock at all, so counting it as an acquisition
|
|
27
|
+
* overstated how many exclusions the kernel actually performed (R-105).
|
|
28
|
+
*/
|
|
29
|
+
export const WORKSPACE_LEASE_OUTCOMES = [
|
|
30
|
+
"acquired", "uncontended", "refused", "released", "released-unrecorded", "lost", "retained", "timeout",
|
|
31
|
+
"recovered",
|
|
32
|
+
];
|
|
8
33
|
export function buildWorkspaceLeaseEvent(args) {
|
|
9
34
|
return {
|
|
10
35
|
ledgerVersion: LEDGER_VERSION,
|
|
@@ -25,6 +50,22 @@ export function buildWorkspaceLeaseEvent(args) {
|
|
|
25
50
|
...(args.correlation ? { correlation: structuredClone(args.correlation) } : {}),
|
|
26
51
|
};
|
|
27
52
|
}
|
|
53
|
+
export function buildCheckReceiptLedgerEvent(args) {
|
|
54
|
+
if (!/^[a-f0-9]{64}$/i.test(args.receiptId)) {
|
|
55
|
+
throw new TypeError("receiptId must be a SHA-256 hex digest");
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
ledgerVersion: LEDGER_VERSION,
|
|
59
|
+
event: "check_receipt",
|
|
60
|
+
ts: args.now.toISOString(),
|
|
61
|
+
childId: args.childId,
|
|
62
|
+
receiptId: args.receiptId,
|
|
63
|
+
workspaceId: args.workspaceId,
|
|
64
|
+
checkId: args.checkId,
|
|
65
|
+
treeSha: args.treeSha,
|
|
66
|
+
...(args.correlation ? { correlation: structuredClone(args.correlation) } : {}),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
28
69
|
export function buildChildLifecycleEvent(args) {
|
|
29
70
|
return {
|
|
30
71
|
ledgerVersion: LEDGER_VERSION,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-events.js","sourceRoot":"","sources":["../src/ledger-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAA0C,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ledger-events.js","sourceRoot":"","sources":["../src/ledger-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAA0C,MAAM,aAAa,CAAC;AAKrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAG7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAGnF,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;IACrG,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW;IACjG,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ;IACjG,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS;CACzD,CAAC;AAG/C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,EAAE,UAAU,EAAE,S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