@coderifts/agent-guard 1.6.2 → 1.7.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.
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAmF3C,+FAA+F;AAC/F,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACzC,IAAI,CAAgC;IACpC,QAAQ,CAAU;IAC3B,YAAY,IAAmC,EAAE,OAAe,EAAE,QAAiB;QACjF,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED,qGAAqG;AACrG,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACxK,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAC1F,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC/E,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,MAAM,gBAAgB,GAAG,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;AAC7F,MAAM,eAAe,GAAG,CAAC,gBAAgB,E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C;IAEtB,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAoB;QACvD,QAAQ;QACR,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,GAA6B;IAC/C,OAAO,GAAG,IAAI,IAAI,IAAI,GAAG,KAAK,UAAU,CAAC;AAC3C,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * withCodeRifts — additive orchestration layer above the frozen security core (slices S1 + S2).
2
+ * withCodeRifts — additive orchestration layer above the frozen security core (slices S1 + S2 +
3
+ * composition observation).
3
4
  *
4
5
  * S1 DELIVERS: a single entry point that wraps the frozen `guardToolRegistry` with a MANDATORY
5
6
  * `operation` and returns, side by side, (a) the registry's own untouched coverage report and (b) a
@@ -12,7 +13,30 @@
12
13
  * (2) an optional `requireCoverage` that aborts construction when the registry's coverage is weaker
13
14
  * than required, by an EXPLICIT strength ordering; (3) weakening-override residuals recorded onto
14
15
  * `composition_assurance` so the trace survives into any later coverageReport consumer. S2 adds NO
15
- * call-time behaviour.
16
+ * enforcement at call time.
17
+ *
18
+ * COMPOSITION OBSERVATION (this slice): optional `onEvent` is forwarded UNCHANGED onto the guard
19
+ * config the composition builds (the same surface guardToolRegistry already spreads into
20
+ * guardToolCall). Optional `onOutcome` is a composition-level hook: after each GUARDED tool's
21
+ * execute returns a GuardOutcome, the composition invokes onOutcome then returns that outcome to the
22
+ * host byte-identical. Observation is NOT enforcement — it does not change COMPOSITION_CALL_POLICY_COMPLETE,
23
+ * coverage, residuals, or whether any tool runs.
24
+ *
25
+ * TELEMETRY GAPS (honest boundaries — read before claiming "every mutation was checked"):
26
+ * - onEvent does NOT emit a dedicated event for BLOCK or REQUIRE_APPROVAL; after preflight_result
27
+ * those paths return blocked with no further emit. Those outcomes ARE visible via onOutcome
28
+ * (outcome.executed === false, outcome.verdict.kind === 'BLOCK' | 'APPROVAL'), not via onEvent.
29
+ * - The GuardEvent payload carries no envelope, receipt, or fingerprint — only optional decisionId
30
+ * (and action/cause/signals/…). onOutcome carries the full GuardOutcome, including
31
+ * outcome.verdict.envelope where the frozen path attached one (BLOCK / APPROVAL / ALLOW / MONITOR).
32
+ * - onOutcome fires ONLY for guarded tools (_coderifts.guarded === true). Readonly passthrough
33
+ * tools never enter guardToolCall and produce no GuardOutcome; they are not wrapped and never
34
+ * fire onOutcome.
35
+ * - onEvent is partial even for other branches (e.g. closed-availability stops may emit only
36
+ * preflight_start; the declared type 'execution_skipped' is never emitted by the frozen core).
37
+ * - Neither hook alone is a complete substrate for receipt carry-forward: onEvent lacks the
38
+ * envelope/receipt; onOutcome exposes them when present but does not retain or re-inject them
39
+ * across calls (that is a later slice).
16
40
  *
17
41
  * S2 does NOT re-guard what the registry already fails closed on. A `forceReadonly`/`classify`
18
42
  * downgrade of a heuristic mutator is, under the registry's default `failOnUnguardedMutator:true`,
@@ -40,8 +64,22 @@
40
64
  * `composition_forced_readonly_on_heuristic_mutator` so it does not promise coverage of the case it
41
65
  * cannot see.
42
66
  *
43
- * STILL DELIBERATELY OUT OF SCOPE (later slices; not stubbed, not implied here): call-time policy,
44
- * automatic binders, receipt carry-forward, WARN monitoring, framework adapters, artifact resolution.
67
+ * COMPOSITION_CALL_POLICY_COMPLETE (when the composition may claim product-level runtime
68
+ * inescapability) requires ALL of the following do not flip the constant when only a subset lands:
69
+ * (1) Automatic binders for call shapes that ALREADY carry both sides of the change (old_string/
70
+ * new_string, edits[]) — DONE (commit 582504a / defaultBinder lift). Not the same as covering
71
+ * every real agent edit shape.
72
+ * (2) Receipt carry-forward (S5) — NOT done.
73
+ * (3) A freshness-safe source of prior content for write-style calls (path + new content only),
74
+ * where the host never supplied `before` — NOT done. The package performs no IO, so a prior it
75
+ * was not given cannot be obtained; inventing one (including empty-string before) would send a
76
+ * fabricated artifact to the oracle. That needs a host/guard freshness protocol, not another
77
+ * binder rename. Flipping this constant on (1)+(2) alone is incorrect.
78
+ *
79
+ * STILL DELIBERATELY OUT OF SCOPE (later slices; not stubbed, not implied here): receipt carry-forward;
80
+ * freshness-safe prior content for write-style calls; call-time STOP re-implementation (already
81
+ * complete in the frozen guardToolCall path); WARN monitoring policy beyond the frozen sink gate;
82
+ * framework adapters. (Both-sides edit-side lifting in defaultBinder is landed — see (1) above.)
45
83
  *
46
84
  * THE TWO-SCOPE RULE (never merged):
47
85
  * - `registry_report` is EXACTLY what `guardToolRegistry` returned, passed through untouched. It may
@@ -49,16 +87,17 @@
49
87
  * tool-boundary's own honest truth (Placement A).
50
88
  * - `composition_assurance` is the narrower PRODUCT-level statement — what withCodeRifts as a whole
51
89
  * is willing to claim today. It is computed SEPARATELY and never rewrites the registry's verdict.
52
- * Its S1 semantics are UNCHANGED in S2: coverage stays 'PARTIAL', inescapable_runtime stays false
53
- * via the same COMPOSITION_CALL_POLICY_COMPLETE conjunction. S2 only appends residuals.
90
+ * Its S1 semantics are UNCHANGED in S2 and under observation: coverage stays 'PARTIAL',
91
+ * inescapable_runtime stays false via the same COMPOSITION_CALL_POLICY_COMPLETE conjunction.
54
92
  * The two truths coexist; neither is derived by mutating the other.
55
93
  *
56
94
  * `requireCoverage` scope (read this before trusting a green construction): it constrains the
57
- * REGISTRY-level coverage ONLY. It CANNOT be used to demand composition-level runtime inescapability,
58
- * because S1's invariant makes that unreachable until S3 (binders) and S5 (receipt carry-forward)
59
- * land. A caller passing `requireCoverage:'COMPLETE'` is asserting an expectation about the registry
60
- * tool-boundary surface — NOT a product-level guarantee. The abort text and this doc say so explicitly
61
- * so nobody reads a green construction as product-level enforcement.
95
+ * REGISTRY-level coverage ONLY. It CANNOT be used to demand composition-level runtime inescapability
96
+ * that remains unreachable while COMPOSITION_CALL_POLICY_COMPLETE is false (see the three conditions
97
+ * above, not merely "binders + receipts"). A caller passing `requireCoverage:'COMPLETE'` is asserting
98
+ * an expectation about the registry tool-boundary surface — NOT a product-level guarantee. The abort
99
+ * text and this doc say so explicitly so nobody reads a green construction as product-level
100
+ * enforcement.
62
101
  *
63
102
  * Operation semantics (accurate scope): `operationForClass` (tool-registry.ts) already derives a
64
103
  * per-tool operation from the tool's mutation class, OVERRIDING the guard config for specialised
@@ -74,7 +113,7 @@
74
113
  * because a valid operation+client are required even to reach the registry.
75
114
  */
76
115
  import type { RawTool, ProtectedTool, EnforcementCoverage, RegistryCoverageReport, ToolBinder, ToolMutationClass } from './tool-registry.js';
77
- import type { GuardConfig } from './types.js';
116
+ import type { GuardConfig, GuardEvent, GuardOutcome } from './types.js';
78
117
  /** Registry config fields callers may forward untouched (S1/S2 do not re-declare them). */
79
118
  export type WithCodeRiftsRegistryConfig = {
80
119
  unknownToolPolicy?: 'mutating' | 'readonly' | 'reject';
@@ -83,6 +122,15 @@ export type WithCodeRiftsRegistryConfig = {
83
122
  forceReadonly?: string[];
84
123
  failOnUnguardedMutator?: boolean;
85
124
  };
125
+ /**
126
+ * Composition-level observation of one guarded-tool return. Carries the tool name and the
127
+ * GuardOutcome EXACTLY as returned by the frozen path — no summary, no extracted convenience fields.
128
+ * Consumers that need the envelope read `outcome.verdict.envelope` (when present on that arm).
129
+ */
130
+ export type ObservedOutcome = {
131
+ toolName: string;
132
+ outcome: GuardOutcome<unknown>;
133
+ };
86
134
  export type WithCodeRiftsInput = {
87
135
  /** Raw tool list handed to the frozen guardToolRegistry (required). */
88
136
  tools: RawTool[];
@@ -99,12 +147,25 @@ export type WithCodeRiftsInput = {
99
147
  /**
100
148
  * Optional (S2). Minimum REGISTRY-level coverage required at construction. If the registry's actual
101
149
  * coverage is weaker than this (by the COVERAGE_STRENGTH ordering), construction ABORTS. It does NOT
102
- * demand composition-level inescapability (unreachable until S3/S5) — a green construction here is
103
- * NOT a product-level runtime-enforcement guarantee.
150
+ * demand composition-level inescapability (unreachable while COMPOSITION_CALL_POLICY_COMPLETE is
151
+ * false binders-for-both-sides alone do not suffice; see file header) — a green construction here
152
+ * is NOT a product-level runtime-enforcement guarantee.
104
153
  */
105
154
  requireCoverage?: EnforcementCoverage;
106
155
  /** Optional passthrough of existing GuardToolRegistryConfig fields (forwarded as given). */
107
156
  registry?: WithCodeRiftsRegistryConfig;
157
+ /**
158
+ * Optional. Forwarded UNCHANGED onto the guard config (config.guard.onEvent) so the frozen
159
+ * guardToolCall emit path can reach it. Not wrapped, not filtered, no extra events added.
160
+ * See header TELEMETRY GAPS: partial; does not carry envelope/receipt/fingerprint.
161
+ */
162
+ onEvent?: (e: GuardEvent) => void;
163
+ /**
164
+ * Optional. Invoked by the composition after each GUARDED tool execute returns, with toolName + the
165
+ * unmodified GuardOutcome. Does not fire for readonly passthrough. Throws and rejected promises are
166
+ * swallowed so observation never changes host-visible execution. See header TELEMETRY GAPS.
167
+ */
168
+ onOutcome?: (o: ObservedOutcome) => void | PromiseLike<void>;
108
169
  };
109
170
  /** The narrower product-level statement, computed separately from the registry's own report. */
110
171
  export type CompositionAssurance = {
@@ -1 +1 @@
1
- {"version":3,"file":"with-coderifts.d.ts","sourceRoot":"","sources":["../../src/with-coderifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAGH,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EAEtB,UAAU,EACV,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,2FAA2F;AAC3F,MAAM,MAAM,2BAA2B,GAAG;IACxC,iBAAiB,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,MA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CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,mGAAmG;IACnG,eAAe,EAAE,sBAAsB,CAAC;IACxC,yEAAyE;IACzE,qBAAqB,EAAE,oBAAoB,CAAC;IAC5C,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAsGF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,CAgH5E"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * withCodeRifts — additive orchestration layer above the frozen security core (slices S1 + S2).
2
+ * withCodeRifts — additive orchestration layer above the frozen security core (slices S1 + S2 +
3
+ * composition observation).
3
4
  *
4
5
  * S1 DELIVERS: a single entry point that wraps the frozen `guardToolRegistry` with a MANDATORY
5
6
  * `operation` and returns, side by side, (a) the registry's own untouched coverage report and (b) a
@@ -12,7 +13,30 @@
12
13
  * (2) an optional `requireCoverage` that aborts construction when the registry's coverage is weaker
13
14
  * than required, by an EXPLICIT strength ordering; (3) weakening-override residuals recorded onto
14
15
  * `composition_assurance` so the trace survives into any later coverageReport consumer. S2 adds NO
15
- * call-time behaviour.
16
+ * enforcement at call time.
17
+ *
18
+ * COMPOSITION OBSERVATION (this slice): optional `onEvent` is forwarded UNCHANGED onto the guard
19
+ * config the composition builds (the same surface guardToolRegistry already spreads into
20
+ * guardToolCall). Optional `onOutcome` is a composition-level hook: after each GUARDED tool's
21
+ * execute returns a GuardOutcome, the composition invokes onOutcome then returns that outcome to the
22
+ * host byte-identical. Observation is NOT enforcement — it does not change COMPOSITION_CALL_POLICY_COMPLETE,
23
+ * coverage, residuals, or whether any tool runs.
24
+ *
25
+ * TELEMETRY GAPS (honest boundaries — read before claiming "every mutation was checked"):
26
+ * - onEvent does NOT emit a dedicated event for BLOCK or REQUIRE_APPROVAL; after preflight_result
27
+ * those paths return blocked with no further emit. Those outcomes ARE visible via onOutcome
28
+ * (outcome.executed === false, outcome.verdict.kind === 'BLOCK' | 'APPROVAL'), not via onEvent.
29
+ * - The GuardEvent payload carries no envelope, receipt, or fingerprint — only optional decisionId
30
+ * (and action/cause/signals/…). onOutcome carries the full GuardOutcome, including
31
+ * outcome.verdict.envelope where the frozen path attached one (BLOCK / APPROVAL / ALLOW / MONITOR).
32
+ * - onOutcome fires ONLY for guarded tools (_coderifts.guarded === true). Readonly passthrough
33
+ * tools never enter guardToolCall and produce no GuardOutcome; they are not wrapped and never
34
+ * fire onOutcome.
35
+ * - onEvent is partial even for other branches (e.g. closed-availability stops may emit only
36
+ * preflight_start; the declared type 'execution_skipped' is never emitted by the frozen core).
37
+ * - Neither hook alone is a complete substrate for receipt carry-forward: onEvent lacks the
38
+ * envelope/receipt; onOutcome exposes them when present but does not retain or re-inject them
39
+ * across calls (that is a later slice).
16
40
  *
17
41
  * S2 does NOT re-guard what the registry already fails closed on. A `forceReadonly`/`classify`
18
42
  * downgrade of a heuristic mutator is, under the registry's default `failOnUnguardedMutator:true`,
@@ -40,8 +64,22 @@
40
64
  * `composition_forced_readonly_on_heuristic_mutator` so it does not promise coverage of the case it
41
65
  * cannot see.
42
66
  *
43
- * STILL DELIBERATELY OUT OF SCOPE (later slices; not stubbed, not implied here): call-time policy,
44
- * automatic binders, receipt carry-forward, WARN monitoring, framework adapters, artifact resolution.
67
+ * COMPOSITION_CALL_POLICY_COMPLETE (when the composition may claim product-level runtime
68
+ * inescapability) requires ALL of the following do not flip the constant when only a subset lands:
69
+ * (1) Automatic binders for call shapes that ALREADY carry both sides of the change (old_string/
70
+ * new_string, edits[]) — DONE (commit 582504a / defaultBinder lift). Not the same as covering
71
+ * every real agent edit shape.
72
+ * (2) Receipt carry-forward (S5) — NOT done.
73
+ * (3) A freshness-safe source of prior content for write-style calls (path + new content only),
74
+ * where the host never supplied `before` — NOT done. The package performs no IO, so a prior it
75
+ * was not given cannot be obtained; inventing one (including empty-string before) would send a
76
+ * fabricated artifact to the oracle. That needs a host/guard freshness protocol, not another
77
+ * binder rename. Flipping this constant on (1)+(2) alone is incorrect.
78
+ *
79
+ * STILL DELIBERATELY OUT OF SCOPE (later slices; not stubbed, not implied here): receipt carry-forward;
80
+ * freshness-safe prior content for write-style calls; call-time STOP re-implementation (already
81
+ * complete in the frozen guardToolCall path); WARN monitoring policy beyond the frozen sink gate;
82
+ * framework adapters. (Both-sides edit-side lifting in defaultBinder is landed — see (1) above.)
45
83
  *
46
84
  * THE TWO-SCOPE RULE (never merged):
47
85
  * - `registry_report` is EXACTLY what `guardToolRegistry` returned, passed through untouched. It may
@@ -49,16 +87,17 @@
49
87
  * tool-boundary's own honest truth (Placement A).
50
88
  * - `composition_assurance` is the narrower PRODUCT-level statement — what withCodeRifts as a whole
51
89
  * is willing to claim today. It is computed SEPARATELY and never rewrites the registry's verdict.
52
- * Its S1 semantics are UNCHANGED in S2: coverage stays 'PARTIAL', inescapable_runtime stays false
53
- * via the same COMPOSITION_CALL_POLICY_COMPLETE conjunction. S2 only appends residuals.
90
+ * Its S1 semantics are UNCHANGED in S2 and under observation: coverage stays 'PARTIAL',
91
+ * inescapable_runtime stays false via the same COMPOSITION_CALL_POLICY_COMPLETE conjunction.
54
92
  * The two truths coexist; neither is derived by mutating the other.
55
93
  *
56
94
  * `requireCoverage` scope (read this before trusting a green construction): it constrains the
57
- * REGISTRY-level coverage ONLY. It CANNOT be used to demand composition-level runtime inescapability,
58
- * because S1's invariant makes that unreachable until S3 (binders) and S5 (receipt carry-forward)
59
- * land. A caller passing `requireCoverage:'COMPLETE'` is asserting an expectation about the registry
60
- * tool-boundary surface — NOT a product-level guarantee. The abort text and this doc say so explicitly
61
- * so nobody reads a green construction as product-level enforcement.
95
+ * REGISTRY-level coverage ONLY. It CANNOT be used to demand composition-level runtime inescapability
96
+ * that remains unreachable while COMPOSITION_CALL_POLICY_COMPLETE is false (see the three conditions
97
+ * above, not merely "binders + receipts"). A caller passing `requireCoverage:'COMPLETE'` is asserting
98
+ * an expectation about the registry tool-boundary surface — NOT a product-level guarantee. The abort
99
+ * text and this doc say so explicitly so nobody reads a green construction as product-level
100
+ * enforcement.
62
101
  *
63
102
  * Operation semantics (accurate scope): `operationForClass` (tool-registry.ts) already derives a
64
103
  * per-tool operation from the tool's mutation class, OVERRIDING the guard config for specialised
@@ -75,12 +114,24 @@
75
114
  */
76
115
  import { guardToolRegistry } from './tool-registry.js';
77
116
  /**
78
- * Whether the composition's call-time policy is complete. FALSE in S1/S2: automatic binders (S3) and
79
- * receipt carry-forward (S5) are not yet delivered, so the composition cannot claim runtime
80
- * inescapability. Later slices AND additional conjuncts into the composition invariant below rather
81
- * than replacing this one. UNCHANGED by S2.
117
+ * Whether the composition's call-time / content policy is complete enough to claim product-level
118
+ * runtime inescapability. Stays FALSE until EVERY condition below is delivered later slices ADD
119
+ * conjuncts to the invariant that uses this flag; they must not replace a narrower false narrative.
120
+ *
121
+ * Conditions (all required; do NOT flip this constant because a subset landed):
122
+ * (1) DONE — automatic binders for shapes that already carry both edit sides (old_string/new_string,
123
+ * edits[] → artifacts). Commit 582504a. Does NOT cover write-style path+new-content-only calls.
124
+ * (2) NOT DONE — receipt carry-forward (S5).
125
+ * (3) NOT DONE — freshness-safe prior content for write-style calls. The package does no IO, so a
126
+ * `before` the host never supplied cannot be obtained; inventing one (including empty string)
127
+ * fabricates an oracle input. Needs a host/guard freshness protocol, not binder renaming.
128
+ *
129
+ * Historically this comment named only (1) and (2). That wording is narrower than reality: after (1)
130
+ * shipped, a reader could think "binders + S5" was enough and flip the flag incorrectly. Do not.
131
+ *
132
+ * UNCHANGED by S2 / composition observation (observing ≠ enforcing). Value stays false until all three.
82
133
  */
83
- const COMPOSITION_CALL_POLICY_COMPLETE = false; // becomes true only once S3 (binders) + S5 (receipt carry-forward) land
134
+ const COMPOSITION_CALL_POLICY_COMPLETE = false;
84
135
  const RESIDUAL_CALL_POLICY_INCOMPLETE = 'composition_call_policy_incomplete';
85
136
  // S2 weakening-override residuals — derived SOLELY from registry report.warnings (never recomputed).
86
137
  // The name says "heuristic_mutator" on purpose: the registry only emits the underlying warning for a
@@ -107,6 +158,51 @@ function coverageRank(coverage) {
107
158
  ? COVERAGE_STRENGTH[coverage]
108
159
  : undefined;
109
160
  }
161
+ /**
162
+ * Invoke onOutcome without affecting the host call. Swallows synchronous throws AND rejected
163
+ * promises (unlike the frozen emit hook, which only try/catches sync throws and ignores returned
164
+ * promises — that host-side footgun is deliberately not reproduced here).
165
+ */
166
+ async function safeOnOutcome(onOutcome, payload) {
167
+ try {
168
+ await Promise.resolve(onOutcome(payload));
169
+ }
170
+ catch {
171
+ /* observation never changes execution */
172
+ }
173
+ }
174
+ /**
175
+ * Build a NEW ProtectedTool shell around a frozen guarded tool so we can replace execute without
176
+ * mutating the frozen registry object. name / description / inputSchema / meta / _coderifts are
177
+ * copied by reference (the _coderifts bag is already frozen by the registry). The new shell is
178
+ * frozen for parity with registry tools.
179
+ */
180
+ function wrapGuardedForObservation(tool, onOutcome) {
181
+ const innerExecute = tool.execute;
182
+ const toolName = tool.name;
183
+ const shell = {
184
+ name: tool.name,
185
+ description: tool.description,
186
+ inputSchema: tool.inputSchema,
187
+ meta: tool.meta,
188
+ _coderifts: tool._coderifts,
189
+ execute: async (args) => {
190
+ // If the inner execute rejects, do NOT invent an outcome — propagate the rejection unchanged.
191
+ const outcome = await innerExecute(args);
192
+ await safeOnOutcome(onOutcome, {
193
+ toolName,
194
+ // Guarded execute always returns a GuardOutcome from guardToolCall; assert the type for callers.
195
+ outcome: outcome,
196
+ });
197
+ // Host must receive the same object the unwrapped tool returned (reference-identical).
198
+ return outcome;
199
+ },
200
+ };
201
+ // Match registry freeze discipline: freeze _coderifts if not already, freeze the shell.
202
+ if (!Object.isFrozen(shell._coderifts))
203
+ Object.freeze(shell._coderifts);
204
+ return Object.freeze(shell);
205
+ }
110
206
  /**
111
207
  * Wrap guardToolRegistry with a mandatory operation and a separately-computed composition assurance.
112
208
  * Fails at CONSTRUCTION (never at first tool call) for a missing client, a missing/empty operation, an
@@ -141,8 +237,14 @@ export function withCodeRifts(input) {
141
237
  // composition_unknown_treated_as_readonly residual below.
142
238
  // - failOnUnguardedMutator: NOT defaulted here — the registry owns its own default (true). Forward
143
239
  // the caller's value if given so there is a single source of truth for it.
240
+ // Guard config: client + operation always; onEvent forwarded UNCHANGED when provided (no second
241
+ // try/catch layer — frozen emit already swallows sync throws).
242
+ const guard = { client: input.client, operation: input.operation };
243
+ if (input.onEvent !== undefined) {
244
+ guard.onEvent = input.onEvent;
245
+ }
144
246
  const config = {
145
- guard: { client: input.client, operation: input.operation },
247
+ guard,
146
248
  unknownToolPolicy: reg.unknownToolPolicy ?? 'mutating',
147
249
  classify: reg.classify,
148
250
  binders: reg.binders,
@@ -163,12 +265,12 @@ export function withCodeRifts(input) {
163
265
  if (requiredRank !== undefined && actualRank < requiredRank) {
164
266
  throw new Error(`withCodeRifts: requireCoverage not met — registry coverage '${report.coverage}' is weaker than required '${input.requireCoverage}' `
165
267
  + `(strength ordering COMPLETE > PARTIAL > BYPASSED > UNKNOWN). requireCoverage constrains the REGISTRY tool-boundary surface ONLY; `
166
- + `a green construction here is NOT a product-level runtime-inescapability guarantee — composition_assurance.inescapable_runtime stays false until S3/S5.`);
268
+ + `a green construction here is NOT a product-level runtime-inescapability guarantee — composition_assurance.inescapable_runtime stays false until receipt carry-forward and a freshness-safe prior for write-style calls land.`);
167
269
  }
168
270
  }
169
271
  // Composition invariant — a conjunction later slices EXTEND (add conjuncts), never replace. Because
170
272
  // COMPOSITION_CALL_POLICY_COMPLETE is false, the result is deterministically false regardless of the
171
- // registry's own (possibly true) inescapable_runtime. UNCHANGED by S2.
273
+ // registry's own (possibly true) inescapable_runtime. UNCHANGED by S2. UNCHANGED by observation.
172
274
  const compositionInescapableRuntime = report.claim.inescapable_runtime && COMPOSITION_CALL_POLICY_COMPLETE;
173
275
  // S2 residuals — DERIVED from the registry's own report.warnings, never recomputed. The registry
174
276
  // conflates forceReadonly and classify downgrades into one warning string, so this maps to two
@@ -181,14 +283,23 @@ export function withCodeRifts(input) {
181
283
  residuals.push(RESIDUAL_UNKNOWN_READONLY);
182
284
  }
183
285
  // 'PARTIAL' from the existing EnforcementCoverage union — never 'COMPLETE' while inescapable_runtime
184
- // is false (that combination would contradict the registry's own formula). UNCHANGED by S2.
286
+ // is false (that combination would contradict the registry's own formula). UNCHANGED by S2 / observation.
185
287
  const composition_assurance = {
186
288
  coverage: 'PARTIAL',
187
289
  inescapable_runtime: compositionInescapableRuntime,
188
290
  residuals,
189
291
  };
292
+ // Outcome observation: registry returns FROZEN ProtectedTool objects (and a frozen tools array).
293
+ // We cannot reassign execute on a frozen tool, so we build NEW shells for guarded tools only when
294
+ // onOutcome is provided. Readonly tools are left as the same object references (no GuardOutcome).
295
+ // The tools ARRAY is also frozen by the registry — always return a fresh array when we wrap.
296
+ let toolsOut = tools;
297
+ if (input.onOutcome) {
298
+ const onOutcome = input.onOutcome;
299
+ toolsOut = Object.freeze(tools.map((t) => (t._coderifts.guarded ? wrapGuardedForObservation(t, onOutcome) : t)));
300
+ }
190
301
  const result = {
191
- tools,
302
+ tools: toolsOut,
192
303
  registry_report: report,
193
304
  composition_assurance,
194
305
  };
@@ -1 +1 @@
1
- {"version":3,"file":"with-coderifts.js","sourceRoot":"","sources":["../../src/with-coderifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AA8DvD;;;;;GAKG;AACH,MAAM,gCAAgC,GAAG,KAAK,CAAC,CAAC,wEAAwE;AAExH,MAAM,+BAA+B,GAAG,oCAAoC,CAAC;AAC7E,qGAAqG;AACrG,qGAAqG;AACrG,oGAAoG;AACpG,kFAAkF;AAClF,MAAM,wBAAwB,GAAG,kDAAkD,CAAC;AACpF,MAAM,yBAAyB,GAAG,yCAAyC,CAAC;AAE5E;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C7F,IAAI,QAAQ,GAAoB,KAAwB,CAAC;IACzD,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,QAAQ,GAAG,MAAM,CAAC,MAAM,CACtB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACpE,CAAC;IACvB,CAAC;IAED,MAAM,MAAM,GAAwB;QAClC,KAAK,EAAE,QAAQ;QACf,eAAe,EAAE,MAAM;QACvB,qBAAqB;KACtB,CAAC;IACF,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACzE,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderifts/agent-guard",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Fail-closed guard for AI agent tool calls — preflight contract changes before they execute. Security core frozen (agent-guard-api v1.0); v1.1 adds client-side enforcement: receipt→envelope binding, decision↔action reconciliation, safe_for_agent + degraded fail-closed, and enforced⟺executed (P0 client-enforcement pack).",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",