ruvnet-brain 4.6.3 → 4.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.
- package/README.md +1 -1
- package/bin/install.mjs +6 -50
- package/config/practical-rule-catalog.json +22 -22
- package/console/app.js +1 -1
- package/console/architecture.html +2 -2
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/commands/checkpoint.md +22 -40
- package/plugin/commands/rnb-brief.md +18 -15
- package/plugin/hooks/codex-hooks.json +1 -58
- package/plugin/hooks/hook-contracts.json +19 -220
- package/plugin/hooks/hooks.json +1 -70
- package/plugin/mcp/managed-cli-interface.mjs +0 -56
- package/plugin/scripts/agentdb-recall-reader.mjs +29 -9
- package/plugin/scripts/agentdb-recall.mjs +27 -21
- package/plugin/scripts/brain-footprint.mjs +1 -1
- package/plugin/scripts/codex-hook-wrapper.mjs +13 -3
- package/plugin/scripts/completion-claim-evidence.mjs +1 -1
- package/plugin/scripts/continuation-gate.mjs +78 -1
- package/plugin/scripts/continuity-events.mjs +90 -82
- package/plugin/scripts/continuity-hook-policy.mjs +5 -14
- package/plugin/scripts/decision-gate.mjs +3 -3
- package/plugin/scripts/decision-recall-gate.mjs +141 -0
- package/plugin/scripts/decision-record.mjs +324 -0
- package/plugin/scripts/deferral-evidence.mjs +134 -0
- package/plugin/scripts/hook-failures.mjs +61 -0
- package/plugin/scripts/hook-shim.mjs +71 -6
- package/plugin/scripts/learn-capture.mjs +88 -37
- package/plugin/scripts/learning-store.mjs +70 -60
- package/plugin/scripts/node-sqlite.mjs +1 -1
- package/plugin/scripts/ruflo-bin.mjs +71 -1
- package/plugin/scripts/ruflo-memory-hooks.mjs +132 -0
- package/plugin/scripts/runtime-preferences.mjs +1 -1
- package/plugin/scripts/session-snapshot-hook.mjs +85 -332
- package/plugin/scripts/session-start-core.mjs +7 -9
- package/plugin/scripts/signal-watch.mjs +1 -1
- package/plugin/scripts/substitution-wall.mjs +222 -0
- package/plugin/scripts/turn-outcome-capture.mjs +74 -88
- package/scripts/codex-host-execution-proof.mjs +1 -1
- package/scripts/console-engine.mjs +0 -32
- package/scripts/deferral-replay.mjs +47 -0
- package/scripts/health-repair.mjs +1 -81
- package/scripts/hook-qualify-core.mjs +2 -2
- package/scripts/model-managed-workflow-service.mjs +9 -10
- package/scripts/model-routing-controller.mjs +9 -8
- package/scripts/no-silent-substitution.mjs +65 -1
- package/scripts/onboarding-console.mjs +8 -23
- package/scripts/product-integrity-contract.mjs +1 -1
- package/scripts/release-qualification-contract.mjs +9 -27
- package/scripts/remedy-registry.mjs +0 -18
- package/scripts/wired-check.mjs +1 -5
- package/plugin/scripts/continuity-brief.mjs +0 -357
- package/plugin/scripts/continuity-journal.mjs +0 -553
- package/plugin/scripts/learn-flush.mjs +0 -96
- package/plugin/scripts/learning-observation.mjs +0 -51
- package/plugin/scripts/learning-queue.mjs +0 -135
- package/plugin/scripts/learning-worker-supervisor.mjs +0 -79
- package/plugin/scripts/project-capture-queue.mjs +0 -357
- package/plugin/scripts/project-memory-enrollment.mjs +0 -203
- package/plugin/scripts/project-progression-checkpoint.mjs +0 -145
- package/plugin/scripts/project-progression-contract.mjs +0 -496
- package/plugin/scripts/project-progression-hook.mjs +0 -233
- package/plugin/scripts/project-progression-outbox.mjs +0 -225
- package/plugin/scripts/project-progression-producer.mjs +0 -309
- package/plugin/scripts/project-progression-reader.mjs +0 -304
- package/plugin/scripts/project-progression-session-start.mjs +0 -320
- package/plugin/scripts/project-progression-sources.mjs +0 -246
- package/plugin/scripts/project-progression-store.mjs +0 -723
- package/plugin/scripts/project-progression-suspension.mjs +0 -60
- package/plugin/scripts/project-transition-hook.mjs +0 -246
- package/plugin/scripts/session-snapshot-contract.mjs +0 -105
- package/plugin/scripts/turn-transport-journal.mjs +0 -108
- package/scripts/qa/progression-validation-benchmark.mjs +0 -66
- package/scripts/session-snapshot-contract.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_note": "The legacy automatic gate collection remains retired. What is permitted is the continuity plane below and nothing else: SessionStart restores the canonical project checkpoint; UserPromptSubmit runs the single unprompted-speech chokepoint; Stop may nudge one explicitly authorized project-scoped objective AND capture a project snapshot; PreCompact and SessionEnd capture a project snapshot. Version 3 of this file permitted exactly two handlers, which was not a safety property but a contradiction: it demanded a restore while forbidding any event that could WRITE the journal the restore reads, so the canonical store held zero progression rows. Adding to this list is still a deliberate act that must pass `npm run hooks:check`; what changed is that the shape can now express the plane that actually works. Amended 2026-09-11 (Stuart): the continuity-only charter had retired the ONLY enforcement of ADR-0012
|
|
3
|
-
"_version":
|
|
2
|
+
"_note": "The legacy automatic gate collection remains retired. What is permitted is the continuity plane below and nothing else: SessionStart restores the canonical project checkpoint; UserPromptSubmit runs the single unprompted-speech chokepoint; Stop may nudge one explicitly authorized project-scoped objective AND capture a project snapshot; PreCompact and SessionEnd capture a project snapshot. Version 3 of this file permitted exactly two handlers, which was not a safety property but a contradiction: it demanded a restore while forbidding any event that could WRITE the journal the restore reads, so the canonical store held zero progression rows. Adding to this list is still a deliberate act that must pass `npm run hooks:check`; what changed is that the shape can now express the plane that actually works. Amended 2026-09-11 (Stuart): the continuity-only charter had retired the ONLY enforcement of ADR-0012 — never write rUv-product code the brain has not seen — and the failure it exists to prevent recurred the day it was measured absent. The plane now also carries three grounding registrations: ground-ruvnet (UserPromptSubmit, grounding injection — a second owner of that event, scoped by ADR-040 §Amendment 2026-09-11 to directives rather than speech), decision-gate’s write route (PreToolUse, the one refuser, ADR-067), and grounding-stamp (PostToolUse on a successful search_ruvnet, the receipt that opens the write gate). Amended 2026-09-12: the 2026-09-11 claim that Codex PreToolUse/PostToolUse delivery had never been observed was measured with a prompt that never invoked a tool (`codex exec \"reply OK\"`), so it was an untested path, not a failing one. Re-measured with prompts that actually call a tool (a real apply_patch write, a real MCP search_ruvnet call against this repo's own server): both events FIRED on codex-cli 0.154.0 with real payloads. decision-gate's write route and grounding-stamp are now dual-host (see _codexCapture and contracts below); the bash route (exec_command) remains Claude-only — today's measurement did not exercise it. Also amended 2026-09-12: added grounding-turn-mark (UserPromptSubmit) and grounding-turn-gate (Stop), the \"answered without searching\" pair — ground-ruvnet's Gate 1 directive is advisory, so nothing previously checked whether the model complied before the turn ended. grounding-turn-mark records that Gate 1 fired for a turn; grounding-turn-gate forces continuation at Stop if grounding-stamp's own evidence shows no search_ruvnet call happened since. Both dual-host from the start (the Stop-block contract is already proven on Codex via continuation-gate). Added capacity-aware-parallel-work at UserPromptSubmit on both measured hosts: it is context-only, resource-bounded, and requires the coordinator to check actual tool/runtime slots; it does not spawn or claim workers. Amended 2026-09-30 (ADR-0030 decision point #1, no new registration): grounding-turn-mark also arms a turn when the prompt asks a capability/feasibility/architecture question about any tool or platform, and grounding-turn-gate then requires every capability claim in the final answer to be bound to a relevant STRONG source read this turn after the last weak one (a WebFetch body is a small model's summary: weak); on Claude it reads the transcript instead of stamp mtimes, which removed the measured 'no search recorded' false alarms. ADR-0030 #2/#3 run in shadow only. Amendment 2026-10-03: normalized prompt/tool/failure/child observations are automatic; startup replays before restoring. Queued and unavailable evidence remain distinct from exact committed readback. Native Grok prompt recall is unsupported. Amendment 2026-10-12 (ADR-106): the hand-rolled progression store, outbox, capture queue, continuity journal, turn journal and learning queue are deleted; session-snapshot keeps Stop (turn outcome), PreCompact/SessionEnd (checkpoint + distill) and PostToolUse (opted-in learning), each a direct `ruflo memory store` with exact-key readback, and a refusal is a hook-failures row.",
|
|
3
|
+
"_version": 12,
|
|
4
4
|
"_eventOwners": [
|
|
5
5
|
{
|
|
6
6
|
"event": "SessionStart",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"claude",
|
|
11
11
|
"codex"
|
|
12
12
|
],
|
|
13
|
-
"responsibility": "
|
|
13
|
+
"responsibility": "Restore the newest project-state-current-* checkpoint (and a newer project-state-auto-* one) by exact-key `ruflo memory retrieve`, list lesson keys, and summarize hook failures once; disclose unknown rather than claim a restore."
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"event": "UserPromptSubmit",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"claude",
|
|
31
31
|
"codex"
|
|
32
32
|
],
|
|
33
|
-
"responsibility": "May request one continuation for one explicitly authorized, project-scoped objective read from the user's own work ledger (ADR-043). Never a refusal, never a second task store. Amended 2026-09-30 (ADR-074 class `completion`, no new registration): the same Stop body also requests ONE correction when the final answer claims work is done without a verification command run after the last state change this turn (Claude transcript), a named check, and a NOT-verified disclosure
|
|
33
|
+
"responsibility": "May request one continuation for one explicitly authorized, project-scoped objective read from the user's own work ledger (ADR-043). Never a refusal, never a second task store. Amended 2026-09-30 (ADR-074 class `completion`, no new registration): the same Stop body also requests ONE correction when the final answer claims work is done without a verification command run after the last state change this turn (Claude transcript), a named check, and a NOT-verified disclosure — on Codex, whose rollout format is not parsed, only the answer-side half is enforced and the transcript half is reported UNKNOWN. It also records first-person promises from the final answer into the SAME per-project ledger (Claude only; capped; closed only by a later evidence-passing completion claim, never by --done) and requests continuation on them under the same loop guards and cooldown. Amended 2026-10-11 (ADR-106, no new registration): the same body asks ONCE when a Claude answer ends by asking permission for, or postponing, work a standing instruction or open promise already authorized and names no genuine blocker class (no-deferral); Codex is not enforced because its prompts are not parsed."
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"event": "Stop",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"claude",
|
|
41
41
|
"codex"
|
|
42
42
|
],
|
|
43
|
-
"responsibility": "
|
|
43
|
+
"responsibility": "Write the redacted turn outcome with one bounded `ruflo memory store` in namespace turns and prove it by exact-key readback; a refusal is a hook-failures row. No journal, outbox or replay."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"event": "PreCompact",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"claude",
|
|
51
51
|
"codex"
|
|
52
52
|
],
|
|
53
|
-
"responsibility": "
|
|
53
|
+
"responsibility": "Store one append-only project-state-auto-<ms> checkpoint through `ruflo memory store` and read it back by exact key; start turn distillation (`ruflo memory distill run`)."
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"event": "SessionEnd",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"claude",
|
|
61
61
|
"codex"
|
|
62
62
|
],
|
|
63
|
-
"responsibility": "
|
|
63
|
+
"responsibility": "Store one append-only project-state-auto-<ms> checkpoint through `ruflo memory store` and read it back by exact key; start turn distillation (`ruflo memory distill run`)."
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"event": "UserPromptSubmit",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"claude",
|
|
71
71
|
"codex"
|
|
72
72
|
],
|
|
73
|
-
"responsibility": "Injects a grounding directive into the model
|
|
73
|
+
"responsibility": "Injects a grounding directive into the model’s context when the prompt names the rUv stack, reaches for a classical default, or asks to build: call search_ruvnet before you assert. Not speech — emits no advocacy, promotion, lesson or alarm and reads no dial; silenced by the brain switch (ADR-054); scoped by ADR-040 §Amendment 2026-09-11."
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"event": "UserPromptSubmit",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"claude",
|
|
81
81
|
"codex"
|
|
82
82
|
],
|
|
83
|
-
"responsibility": "For clearly substantial, independently splittable work, adds context-only guidance based on bounded memory-pressure, swap, compression, and normalized-load signals. It never creates workers, claims they are running, or overrides the coordinator
|
|
83
|
+
"responsibility": "For clearly substantial, independently splittable work, adds context-only guidance based on bounded memory-pressure, swap, compression, and normalized-load signals. It never creates workers, claims they are running, or overrides the coordinator’s live agent-tool/runtime cap; unknown capacity recommends serial execution."
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"event": "PreToolUse",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"claude",
|
|
111
111
|
"codex"
|
|
112
112
|
],
|
|
113
|
-
"responsibility": "Records that ground-ruvnet's Gate 1 (the same regex, proven byte-identical by test) matched this turn's prompt, so grounding-turn-gate has something to check at Stop
|
|
113
|
+
"responsibility": "Records that ground-ruvnet's Gate 1 (the same regex, proven byte-identical by test) matched this turn's prompt, so grounding-turn-gate has something to check at Stop — Stop's own payload carries no prompt text. Amended 2026-09-30: also arms when the prompt asks a capability/feasibility/architecture question about any tool or platform, recording the subjects it named; a marker not yet consumed is merged without moving its mtime (a queued mid-turn prompt re-dating it was a measured false-alarm cause). Writes only a marker file under ~/.cache/ruvnet-brain/grounding-turn/; never blocks, never speaks to the model."
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"event": "Stop",
|
|
@@ -120,27 +120,7 @@
|
|
|
120
120
|
"claude",
|
|
121
121
|
"codex"
|
|
122
122
|
],
|
|
123
|
-
"responsibility": "The 'answered without searching' gate (2026-09-12): if grounding-turn-mark's marker shows Gate 1 fired this turn and grounding-stamp's own stamp evidence shows no search_ruvnet call happened since, forces continuation via the same hookSpecificOutput.additionalContext contract continuation-gate already uses on both hosts. A separate registration from continuation-gate
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"event": "UserPromptSubmit",
|
|
127
|
-
"owner": "session-snapshot",
|
|
128
|
-
"class": "normalized continuity observation",
|
|
129
|
-
"hosts": [
|
|
130
|
-
"claude",
|
|
131
|
-
"codex"
|
|
132
|
-
],
|
|
133
|
-
"responsibility": "Capture bounded redacted observable intent or outcome through the canonical progression bridge; retain pending/failed status and do not infer success from pre-tool intent."
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"event": "PreToolUse",
|
|
137
|
-
"owner": "session-snapshot",
|
|
138
|
-
"class": "normalized continuity observation",
|
|
139
|
-
"hosts": [
|
|
140
|
-
"claude",
|
|
141
|
-
"codex"
|
|
142
|
-
],
|
|
143
|
-
"responsibility": "Capture bounded redacted observable intent or outcome through the canonical progression bridge; retain pending/failed status and do not infer success from pre-tool intent."
|
|
123
|
+
"responsibility": "The 'answered without searching' gate (2026-09-12): if grounding-turn-mark's marker shows Gate 1 fired this turn and grounding-stamp's own stamp evidence shows no search_ruvnet call happened since, forces continuation via the same hookSpecificOutput.additionalContext contract continuation-gate already uses on both hosts. A separate registration from continuation-gate — see grounding-turn-gate.mjs's header for why folding it into that file's ledger/cooldown semantics would corrupt them rather than extend them. Consumes its marker unconditionally so a stale one can never pressure an unrelated later turn. Amended 2026-09-30 (ADR-0030 #1): on Claude, 'was search_ruvnet called' is read from the transcript, and on an armed turn each capability claim in the final answer must be bound to a relevant strong source read this turn after the last weak one, else ONE correction naming the claim and what was read; on Codex (rollout not parsed) only rUv-term claims are judged, from stamps, and the rest are UNKNOWN. Gates #2/#3 are shadow-logged, never delivered."
|
|
144
124
|
},
|
|
145
125
|
{
|
|
146
126
|
"event": "PostToolUse",
|
|
@@ -150,56 +130,7 @@
|
|
|
150
130
|
"claude",
|
|
151
131
|
"codex"
|
|
152
132
|
],
|
|
153
|
-
"responsibility": "
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"event": "PostToolUseFailure",
|
|
157
|
-
"owner": "session-snapshot",
|
|
158
|
-
"class": "normalized continuity observation",
|
|
159
|
-
"hosts": [
|
|
160
|
-
"claude"
|
|
161
|
-
],
|
|
162
|
-
"responsibility": "Capture bounded redacted observable intent or outcome through the canonical progression bridge; retain pending/failed status and do not infer success from pre-tool intent."
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"event": "SubagentStop",
|
|
166
|
-
"owner": "session-snapshot",
|
|
167
|
-
"class": "normalized continuity observation",
|
|
168
|
-
"hosts": [
|
|
169
|
-
"claude",
|
|
170
|
-
"codex"
|
|
171
|
-
],
|
|
172
|
-
"responsibility": "Capture bounded redacted observable intent or outcome through the canonical progression bridge; retain pending/failed status and do not infer success from pre-tool intent."
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"event": "PostToolUse",
|
|
176
|
-
"owner": "learn-capture",
|
|
177
|
-
"class": "workflow learning",
|
|
178
|
-
"hosts": [
|
|
179
|
-
"claude",
|
|
180
|
-
"codex"
|
|
181
|
-
],
|
|
182
|
-
"responsibility": "Fixed vocabulary capture or finite selected-scope orphan recovery; no cross-scope legacy drain; registration alone does not prove native delivery."
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"event": "SessionEnd",
|
|
186
|
-
"owner": "learn-flush",
|
|
187
|
-
"class": "workflow learning",
|
|
188
|
-
"hosts": [
|
|
189
|
-
"claude",
|
|
190
|
-
"codex"
|
|
191
|
-
],
|
|
192
|
-
"responsibility": "Fixed vocabulary capture or finite selected-scope orphan recovery; no cross-scope legacy drain; registration alone does not prove native delivery."
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"event": "SessionStart",
|
|
196
|
-
"owner": "learn-flush",
|
|
197
|
-
"class": "workflow learning",
|
|
198
|
-
"hosts": [
|
|
199
|
-
"claude",
|
|
200
|
-
"codex"
|
|
201
|
-
],
|
|
202
|
-
"responsibility": "Fixed vocabulary capture or finite selected-scope orphan recovery; no cross-scope legacy drain; registration alone does not prove native delivery."
|
|
133
|
+
"responsibility": "When learning is opted in, write one minimized workflow observation with `ruflo memory store` + exact-key readback; a refusal is a hook-failures row. No queue."
|
|
203
134
|
}
|
|
204
135
|
],
|
|
205
136
|
"_notInThisPlane": [
|
|
@@ -207,7 +138,7 @@
|
|
|
207
138
|
"id": "decision-gate (bash route)",
|
|
208
139
|
"class": "consequential-action authorization",
|
|
209
140
|
"adr": "ADR-067",
|
|
210
|
-
"reachability": "The bash sub-event (protect-state, identifier-preflight, spend-guard, degradation-watch, hijack-ruvnet, design-wall) stays reachable through hook-shim.mjs by explicit invocation and is not registered: the 2026-09-11 mandate was the WRITE path (ADR-0012), and no host has proven PreToolUse delivery for Bash under the plane
|
|
141
|
+
"reachability": "The bash sub-event (protect-state, identifier-preflight, spend-guard, degradation-watch, hijack-ruvnet, design-wall) stays reachable through hook-shim.mjs by explicit invocation and is not registered: the 2026-09-11 mandate was the WRITE path (ADR-0012), and no host has proven PreToolUse delivery for Bash under the plane’s measured-not-assumed rule. The write route IS in the plane — see contracts."
|
|
211
142
|
},
|
|
212
143
|
{
|
|
213
144
|
"id": "execution-policy",
|
|
@@ -220,13 +151,13 @@
|
|
|
220
151
|
"state": "partial",
|
|
221
152
|
"measuredOn": "2026-09-12",
|
|
222
153
|
"host": "codex-cli 0.154.0",
|
|
223
|
-
"method": "2026-09-11: a probe hook was registered in a temporary CODEX_HOME on all twelve event names the installed binary declares, and a real `codex exec \"reply OK\"` was run against it
|
|
154
|
+
"method": "2026-09-11: a probe hook was registered in a temporary CODEX_HOME on all twelve event names the installed binary declares, and a real `codex exec \"reply OK\"` was run against it — a prompt that never invokes a tool. 2026-09-12: re-probed with prompts that DO invoke a tool — a real apply_patch write, and a real MCP call to this repo's own plugin/mcp/server.mjs registered as `search_ruvnet` in the probe's CODEX_HOME config.toml.",
|
|
224
155
|
"fired": [
|
|
225
156
|
"SessionStart",
|
|
226
157
|
"UserPromptSubmit",
|
|
227
158
|
"SessionEnd",
|
|
228
159
|
"PreToolUse (apply_patch write; tool_input.command carried the raw patch)",
|
|
229
|
-
"PostToolUse (apply_patch write; tool_response = \"Exit code: 0
|
|
160
|
+
"PostToolUse (apply_patch write; tool_response = \"Exit code: 0 … Success. Updated the following files: A <path>\")",
|
|
230
161
|
"PreToolUse (MCP search_ruvnet; tool_name mcp__ruvnet_brain__search_ruvnet, tool_input.query preserved verbatim)",
|
|
231
162
|
"PostToolUse (MCP search_ruvnet; tool_response.content[0].text carried the \"Searched N RuvNet repos\" banner)"
|
|
232
163
|
],
|
|
@@ -234,7 +165,7 @@
|
|
|
234
165
|
"Stop": "The 2026-09-11 probe turn never completed, so run_turn_stop_hooks had no completion to fire on. The binary declares the event and StopCommandOutputWire, so this is not-proven rather than unsupported. Stop keeps only the pre-existing continuation gate; no capture handler was added to an event whose delivery has not been seen.",
|
|
235
166
|
"PreCompact": "A one-line turn never approaches a compaction threshold. The binary declares PreCompact and PreCompactCommandOutputWire. No capture handler registered."
|
|
236
167
|
},
|
|
237
|
-
"consequence": "Codex captures at SessionEnd only; Stop/PreCompact remain unproven and unregistered as above (unchanged by this measurement). PreToolUse/PostToolUse are now proven for a write (apply_patch) and an MCP tool call (search_ruvnet) specifically, and decision-gate's write route plus grounding-stamp are registered on Codex accordingly (see contracts below). Bash-class tool calls (exec_command) were not exercised by this measurement and remain unregistered
|
|
168
|
+
"consequence": "Codex captures at SessionEnd only; Stop/PreCompact remain unproven and unregistered as above (unchanged by this measurement). PreToolUse/PostToolUse are now proven for a write (apply_patch) and an MCP tool call (search_ruvnet) specifically, and decision-gate's write route plus grounding-stamp are registered on Codex accordingly (see contracts below). Bash-class tool calls (exec_command) were not exercised by this measurement and remain unregistered — extending on unexercised evidence would repeat the exact mistake this record corrects. Amended 2026-09-29: session-snapshot is registered on Codex Stop so each Codex turn's outcome is recorded (SessionEnd carries no last_assistant_message). Stop delivery is still NOT live-observed; the registration rests on codex-cli 0.158.0's declared stop.command.input schema and fails open.",
|
|
238
169
|
"preCompact": "Registered using supported Codex0.160.1 native event and existing session-snapshot handler; native delivery remains separately unproven.",
|
|
239
170
|
"currentRegistration": {
|
|
240
171
|
"checkedOn": "2026-10-07",
|
|
@@ -388,30 +319,6 @@
|
|
|
388
319
|
"matcher": "*",
|
|
389
320
|
"timeout": 10
|
|
390
321
|
},
|
|
391
|
-
{
|
|
392
|
-
"id": "session-snapshot",
|
|
393
|
-
"event": "UserPromptSubmit",
|
|
394
|
-
"hosts": [
|
|
395
|
-
"claude",
|
|
396
|
-
"codex"
|
|
397
|
-
],
|
|
398
|
-
"mode": "advisory",
|
|
399
|
-
"offBehavior": "run",
|
|
400
|
-
"matcher": "*",
|
|
401
|
-
"timeout": 10
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"id": "session-snapshot",
|
|
405
|
-
"event": "PreToolUse",
|
|
406
|
-
"hosts": [
|
|
407
|
-
"claude",
|
|
408
|
-
"codex"
|
|
409
|
-
],
|
|
410
|
-
"mode": "advisory",
|
|
411
|
-
"offBehavior": "run",
|
|
412
|
-
"matcher": "*",
|
|
413
|
-
"timeout": 10
|
|
414
|
-
},
|
|
415
322
|
{
|
|
416
323
|
"id": "session-snapshot",
|
|
417
324
|
"event": "PostToolUse",
|
|
@@ -423,65 +330,6 @@
|
|
|
423
330
|
"offBehavior": "run",
|
|
424
331
|
"matcher": "*",
|
|
425
332
|
"timeout": 10
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"id": "session-snapshot",
|
|
429
|
-
"event": "PostToolUseFailure",
|
|
430
|
-
"hosts": [
|
|
431
|
-
"claude"
|
|
432
|
-
],
|
|
433
|
-
"mode": "advisory",
|
|
434
|
-
"offBehavior": "run",
|
|
435
|
-
"matcher": "*",
|
|
436
|
-
"timeout": 10
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"id": "session-snapshot",
|
|
440
|
-
"event": "SubagentStop",
|
|
441
|
-
"hosts": [
|
|
442
|
-
"claude",
|
|
443
|
-
"codex"
|
|
444
|
-
],
|
|
445
|
-
"mode": "advisory",
|
|
446
|
-
"offBehavior": "run",
|
|
447
|
-
"matcher": "*",
|
|
448
|
-
"timeout": 10
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"id": "learn-capture",
|
|
452
|
-
"event": "PostToolUse",
|
|
453
|
-
"hosts": [
|
|
454
|
-
"claude",
|
|
455
|
-
"codex"
|
|
456
|
-
],
|
|
457
|
-
"mode": "advisory",
|
|
458
|
-
"offBehavior": "silence",
|
|
459
|
-
"matcher": "^(?:Bash|Write|Edit|MultiEdit|exec_command|apply_patch|functions(?:\\.|__)(?:exec_command|apply_patch))$",
|
|
460
|
-
"timeout": 3
|
|
461
|
-
},
|
|
462
|
-
{
|
|
463
|
-
"id": "learn-flush",
|
|
464
|
-
"event": "SessionEnd",
|
|
465
|
-
"hosts": [
|
|
466
|
-
"claude",
|
|
467
|
-
"codex"
|
|
468
|
-
],
|
|
469
|
-
"mode": "advisory",
|
|
470
|
-
"offBehavior": "silence",
|
|
471
|
-
"matcher": "*",
|
|
472
|
-
"timeout": 3
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
"id": "learn-flush",
|
|
476
|
-
"event": "SessionStart",
|
|
477
|
-
"hosts": [
|
|
478
|
-
"claude",
|
|
479
|
-
"codex"
|
|
480
|
-
],
|
|
481
|
-
"mode": "advisory",
|
|
482
|
-
"offBehavior": "silence",
|
|
483
|
-
"matcher": "startup|resume|clear|compact|fork",
|
|
484
|
-
"timeout": 3
|
|
485
333
|
}
|
|
486
334
|
],
|
|
487
335
|
"matcherAllowlist": [
|
|
@@ -524,22 +372,15 @@
|
|
|
524
372
|
"layer": "plugin",
|
|
525
373
|
"event": "PreToolUse",
|
|
526
374
|
"matcher": "^(Write|Edit|MultiEdit|NotebookEdit|apply_patch)$",
|
|
527
|
-
"reason": "The write-class tools, anchored
|
|
528
|
-
"retiredBy": "not retired
|
|
375
|
+
"reason": "The write-class tools, anchored — the exact matcher ADR-067 shipped and hook-registry-lint’s matcher-semantics test models. Claude Code matchers are searches, so the anchors are load-bearing. apply_patch (Codex's raw write-tool name) was added 2026-09-12 after a real apply_patch call was measured to fire this event live on codex-cli 0.154.0 — a dead branch on Claude, which never names a tool apply_patch.",
|
|
376
|
+
"retiredBy": "not retired — registered 2026-09-11 (ADR-0012 / ADR-067, Stuart mandate); extended to Codex 2026-09-12"
|
|
529
377
|
},
|
|
530
378
|
{
|
|
531
379
|
"layer": "plugin",
|
|
532
380
|
"event": "PostToolUse",
|
|
533
381
|
"matcher": "^(?:.*__)?search_ruvnet$",
|
|
534
382
|
"reason": "The grounding tool with or without an MCP server prefix (mcp__plugin_ruvnet-brain_ruvnet-brain__search_ruvnet, or Codex's mcp__ruvnet_brain__search_ruvnet, measured live 2026-09-12). Only a successful search may mint a stamp; the body checks the result banner.",
|
|
535
|
-
"retiredBy": "not retired
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"layer": "plugin",
|
|
539
|
-
"event": "PreToolUse",
|
|
540
|
-
"matcher": "*",
|
|
541
|
-
"reason": "Observe normalized lifecycle transitions independently of the write-refusal and grounding matchers; the body enforces canonical identity, consent and bounded non-authoritative semantic observations.",
|
|
542
|
-
"retiredBy": "not retired - owner automatic AgentDB mandate 2026-10-03"
|
|
383
|
+
"retiredBy": "not retired — registered 2026-09-11 (ADR-0012); Codex host proven reachable 2026-09-12, matcher unchanged"
|
|
543
384
|
},
|
|
544
385
|
{
|
|
545
386
|
"layer": "plugin",
|
|
@@ -548,27 +389,6 @@
|
|
|
548
389
|
"reason": "Observe normalized lifecycle transitions independently of the write-refusal and grounding matchers; the body enforces canonical identity, consent and bounded non-authoritative semantic observations.",
|
|
549
390
|
"retiredBy": "not retired - owner automatic AgentDB mandate 2026-10-03"
|
|
550
391
|
},
|
|
551
|
-
{
|
|
552
|
-
"layer": "plugin",
|
|
553
|
-
"event": "PostToolUseFailure",
|
|
554
|
-
"matcher": "*",
|
|
555
|
-
"reason": "Observe normalized lifecycle transitions independently of the write-refusal and grounding matchers; the body enforces canonical identity, consent and bounded non-authoritative semantic observations.",
|
|
556
|
-
"retiredBy": "not retired - owner automatic AgentDB mandate 2026-10-03"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"layer": "plugin",
|
|
560
|
-
"event": "SubagentStop",
|
|
561
|
-
"matcher": "*",
|
|
562
|
-
"reason": "Observe normalized lifecycle transitions independently of the write-refusal and grounding matchers; the body enforces canonical identity, consent and bounded non-authoritative semantic observations.",
|
|
563
|
-
"retiredBy": "not retired - owner automatic AgentDB mandate 2026-10-03"
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
"layer": "codex",
|
|
567
|
-
"event": "PreToolUse",
|
|
568
|
-
"matcher": "*",
|
|
569
|
-
"reason": "Canonical observation owner sees tool transitions before normalization; bounded body selects substantive observations. The independent anchored decision and grounding matchers remain unchanged.",
|
|
570
|
-
"retiredBy": "not retired - automatic memory mandate 2026-10-03"
|
|
571
|
-
},
|
|
572
392
|
{
|
|
573
393
|
"layer": "codex",
|
|
574
394
|
"event": "PostToolUse",
|
|
@@ -618,27 +438,6 @@
|
|
|
618
438
|
"reason": "Explicit supported Codex lifecycle registration, corresponding to the host-filtered continuity policy; its enforcing handler and live registration are checked independently.",
|
|
619
439
|
"retiredBy": "not retired - canonical continuity host parity"
|
|
620
440
|
},
|
|
621
|
-
{
|
|
622
|
-
"layer": "codex",
|
|
623
|
-
"event": "SubagentStop",
|
|
624
|
-
"matcher": "*",
|
|
625
|
-
"reason": "Explicit supported Codex lifecycle registration, corresponding to the host-filtered continuity policy; its enforcing handler and live registration are checked independently.",
|
|
626
|
-
"retiredBy": "not retired - canonical continuity host parity"
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
"layer": "plugin",
|
|
630
|
-
"event": "PostToolUse",
|
|
631
|
-
"matcher": "^(?:Bash|Write|Edit|MultiEdit|exec_command|apply_patch|functions(?:\\.|__)(?:exec_command|apply_patch))$",
|
|
632
|
-
"reason": "Consent-eligible normalized fixed workflow vocabulary, privacy-minimized before write.",
|
|
633
|
-
"retiredBy": "reviewed issue377 learning repair"
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
"layer": "codex",
|
|
637
|
-
"event": "PostToolUse",
|
|
638
|
-
"matcher": "^(?:Bash|Write|Edit|MultiEdit|exec_command|apply_patch|functions(?:\\.|__)(?:exec_command|apply_patch))$",
|
|
639
|
-
"reason": "Consent-eligible normalized fixed workflow vocabulary, privacy-minimized before write.",
|
|
640
|
-
"retiredBy": "reviewed issue377 learning repair"
|
|
641
|
-
},
|
|
642
441
|
{
|
|
643
442
|
"layer": "codex",
|
|
644
443
|
"event": "PreCompact",
|
package/plugin/hooks/hooks.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "RuvNet Brain lifecycle plane. The broad legacy routing, learning, and release interceptors remain retired.
|
|
2
|
+
"description": "RuvNet Brain lifecycle plane. The broad legacy routing, learning, and release interceptors remain retired. Lifecycle memory only CALLS ruflo (owner ruling 2026-10-12, ADR-106): there is no hand-rolled store, queue, journal or outbox. SessionStart restores the newest project-state-current-* checkpoint (and a newer project-state-auto-* one) and lists lesson keys by exact-key `ruflo memory list|retrieve`, and summarizes hook failures once. UserPromptSubmit runs the single unprompted-speech chokepoint, ground-ruvnet grounding injection (with one bounded AgentDB recall search), a capacity-aware context hint, and grounding-turn-mark. PreToolUse runs decision-gate's write route, the ONE process that may refuse a Write/Edit/MultiEdit/NotebookEdit/apply_patch (ADR-067, ADR-0012); PostToolUse on a successful search_ruvnet mints the grounding stamp that opens that gate, and session-snapshot PostToolUse writes an opted-in learning observation with `ruflo memory store`. Stop runs the continuation gate, writes the turn outcome with `ruflo memory store` in namespace turns proven by exact-key readback, and runs grounding-turn-gate. PreCompact and SessionEnd store one append-only project-state-auto-<ms> checkpoint with exact-key readback and start `ruflo memory distill run`. Every body is advisory and fails open except decision-gate; a refused or unverified ruflo write, or a body stopped by the shim watchdog, is one row in hook-failures.jsonl, summarized at the next SessionStart.",
|
|
3
3
|
"hooks": {
|
|
4
4
|
"SessionStart": [
|
|
5
5
|
{
|
|
@@ -11,27 +11,12 @@
|
|
|
11
11
|
"timeout": 8
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"matcher": "startup|resume|clear|compact|fork",
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" learn-flush || true",
|
|
21
|
-
"timeout": 3
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
14
|
}
|
|
25
15
|
],
|
|
26
16
|
"UserPromptSubmit": [
|
|
27
17
|
{
|
|
28
18
|
"matcher": "*",
|
|
29
19
|
"hooks": [
|
|
30
|
-
{
|
|
31
|
-
"type": "command",
|
|
32
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" session-snapshot UserPromptSubmit || true",
|
|
33
|
-
"timeout": 10
|
|
34
|
-
},
|
|
35
20
|
{
|
|
36
21
|
"type": "command",
|
|
37
22
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" unprompted-speech UserPromptSubmit",
|
|
@@ -56,16 +41,6 @@
|
|
|
56
41
|
}
|
|
57
42
|
],
|
|
58
43
|
"PreToolUse": [
|
|
59
|
-
{
|
|
60
|
-
"matcher": "*",
|
|
61
|
-
"hooks": [
|
|
62
|
-
{
|
|
63
|
-
"type": "command",
|
|
64
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" session-snapshot PreToolUse || true",
|
|
65
|
-
"timeout": 10
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
44
|
{
|
|
70
45
|
"matcher": "^(Write|Edit|MultiEdit|NotebookEdit|apply_patch)$",
|
|
71
46
|
"hooks": [
|
|
@@ -97,16 +72,6 @@
|
|
|
97
72
|
"timeout": 5
|
|
98
73
|
}
|
|
99
74
|
]
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"matcher": "^(?:Bash|Write|Edit|MultiEdit|exec_command|apply_patch|functions(?:\\.|__)(?:exec_command|apply_patch))$",
|
|
103
|
-
"hooks": [
|
|
104
|
-
{
|
|
105
|
-
"type": "command",
|
|
106
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" learn-capture || true",
|
|
107
|
-
"timeout": 3
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
75
|
}
|
|
111
76
|
],
|
|
112
77
|
"Stop": [
|
|
@@ -153,40 +118,6 @@
|
|
|
153
118
|
"timeout": 10
|
|
154
119
|
}
|
|
155
120
|
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"matcher": "*",
|
|
159
|
-
"hooks": [
|
|
160
|
-
{
|
|
161
|
-
"type": "command",
|
|
162
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" learn-flush || true",
|
|
163
|
-
"timeout": 3
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"SubagentStop": [
|
|
169
|
-
{
|
|
170
|
-
"matcher": "*",
|
|
171
|
-
"hooks": [
|
|
172
|
-
{
|
|
173
|
-
"type": "command",
|
|
174
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" session-snapshot SubagentStop || true",
|
|
175
|
-
"timeout": 10
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"PostToolUseFailure": [
|
|
181
|
-
{
|
|
182
|
-
"matcher": "*",
|
|
183
|
-
"hooks": [
|
|
184
|
-
{
|
|
185
|
-
"type": "command",
|
|
186
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hook-shim.mjs\" session-snapshot PostToolUseFailure || true",
|
|
187
|
-
"timeout": 10
|
|
188
|
-
}
|
|
189
|
-
]
|
|
190
121
|
}
|
|
191
122
|
]
|
|
192
123
|
}
|
|
@@ -7,9 +7,6 @@ import { managedGenerationIdentity } from './managed-cli-generation.mjs';
|
|
|
7
7
|
import { loadRuntimePreferences, runtimeChildEnv } from '../scripts/runtime-preferences.mjs';
|
|
8
8
|
import { projectDirectory } from '../scripts/project-identity.mjs';
|
|
9
9
|
import { recordManagedCliObservation, recordRegistryLatestObservation } from '../scripts/capability-claim-evidence.mjs';
|
|
10
|
-
import { runSessionSnapshotHook } from '../scripts/session-snapshot-hook.mjs';
|
|
11
|
-
import { resolveProjectStore } from '../scripts/project-store-resolver.mjs';
|
|
12
|
-
import { isAutomaticProgressionSuspension } from '../scripts/project-progression-suspension.mjs';
|
|
13
10
|
|
|
14
11
|
export const MANAGED_EXECUTABLES = Object.freeze([
|
|
15
12
|
'ruflo',
|
|
@@ -275,40 +272,6 @@ export function normalizeManagedExecution(execution) {
|
|
|
275
272
|
return { outcome: execution.code === 0 ? 'success' : 'failure', output, contradictoryFailure };
|
|
276
273
|
}
|
|
277
274
|
|
|
278
|
-
function managedSessionId(env) {
|
|
279
|
-
const supplied = env.RUVNET_BRAIN_SESSION_ID || env.RUVNET_HOOK_SESSION_ID;
|
|
280
|
-
return typeof supplied === 'string' && supplied.trim() ? supplied.trim() : `managed-cli-${process.pid}`;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/** Bind managed CLI execution to the existing progression writer when this project has adopted it. */
|
|
284
|
-
function managedProgressionCapture({ executable, argv, projectRoot, env, event, execution, normalized }) {
|
|
285
|
-
const adopted = fs.existsSync(path.join(projectRoot, '.swarm'));
|
|
286
|
-
if (!adopted) return { adopted: false, skipped: 'project has not adopted the canonical store' };
|
|
287
|
-
const host = String(env.RUVNET_HOOK_HOST || '').toLowerCase();
|
|
288
|
-
if (!['claude', 'codex'].includes(host)) return { adopted: true, error: 'managed host identity unavailable' };
|
|
289
|
-
let resolution;
|
|
290
|
-
try { resolution = resolveProjectStore({ projectDir: projectRoot }); }
|
|
291
|
-
catch (error) { return { adopted: true, error: `project store could not be resolved: ${error?.message || error}` }; }
|
|
292
|
-
const payload = {
|
|
293
|
-
session_id: managedSessionId(env),
|
|
294
|
-
hook_event_name: event,
|
|
295
|
-
tool_name: executable,
|
|
296
|
-
tool_input: { command: [executable, ...argv].join(' ') },
|
|
297
|
-
...(execution ? {
|
|
298
|
-
tool_response: {
|
|
299
|
-
stdout: execution.stdout,
|
|
300
|
-
stderr: execution.stderr,
|
|
301
|
-
exit_code: execution.code,
|
|
302
|
-
...(execution.signal ? { signal: execution.signal, interrupted: true } : {}),
|
|
303
|
-
outcome: normalized?.outcome,
|
|
304
|
-
...(execution.error ? { error: execution.error } : {}),
|
|
305
|
-
},
|
|
306
|
-
} : {}),
|
|
307
|
-
};
|
|
308
|
-
const result = runSessionSnapshotHook(projectRoot, event, { rawInput: JSON.stringify(payload), host, env });
|
|
309
|
-
return isAutomaticProgressionSuspension(result) ? result : { adopted: true, ...result };
|
|
310
|
-
}
|
|
311
|
-
|
|
312
275
|
function resultOf(executable, argv, result) {
|
|
313
276
|
const output = [result.stdout, result.stderr].filter(Boolean).join(result.stdout && result.stderr ? '\n' : '');
|
|
314
277
|
const normalized = normalizeManagedExecution(result);
|
|
@@ -406,35 +369,16 @@ export async function callManagedCli(toolName, args, env = process.env, fetchImp
|
|
|
406
369
|
const childEnv = (executable === 'agentic-flow' || executable === 'agentic-qe')
|
|
407
370
|
? runtimeChildEnv({ env, cwd: projectRoot })
|
|
408
371
|
: env;
|
|
409
|
-
const capture = typeof lifecycle.capture === 'function' ? lifecycle.capture : managedProgressionCapture;
|
|
410
|
-
const beforeCapture = await capture({ executable, argv, projectRoot, env: childEnv, event: 'PreToolUse' });
|
|
411
|
-
if (beforeCapture?.error || (beforeCapture?.adopted && beforeCapture.progressionCaptured !== true
|
|
412
|
-
&& !isAutomaticProgressionSuspension(beforeCapture))) {
|
|
413
|
-
const reason = beforeCapture.error || beforeCapture.skipped || 'pre-execution progression was not durably captured';
|
|
414
|
-
return { content: [{ type: 'text', text: `managed execution refused: ${reason}` }], isError: true };
|
|
415
|
-
}
|
|
416
372
|
if (lifecycle && typeof lifecycle.beforeExecute === 'function') {
|
|
417
373
|
await lifecycle.beforeExecute({ executable, argv, projectRoot, env: childEnv });
|
|
418
374
|
}
|
|
419
375
|
const execution = await execute(executable, argv, childEnv);
|
|
420
376
|
const normalized = normalizeManagedExecution(execution);
|
|
421
|
-
const afterCapture = await capture({ executable, argv, projectRoot, env: childEnv, event: 'PostToolUse', execution, normalized });
|
|
422
377
|
if (lifecycle && typeof lifecycle.afterExecute === 'function') {
|
|
423
378
|
await lifecycle.afterExecute({ executable, argv, projectRoot, env: childEnv, execution, normalized });
|
|
424
379
|
}
|
|
425
380
|
recordManagedCliObservation({ toolName, executable, argv, execution, env });
|
|
426
|
-
if (afterCapture?.adopted && afterCapture.progressionCaptured !== true
|
|
427
|
-
&& !isAutomaticProgressionSuspension(afterCapture)) {
|
|
428
|
-
return {
|
|
429
|
-
content: [{ type: 'text', text: `managed command ${normalized.outcome}; continuity result was not durably captured: ${afterCapture.skipped || 'unknown reason'}` }],
|
|
430
|
-
isError: true,
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
381
|
const result = resultOf(executable, argv, execution);
|
|
434
|
-
if (isAutomaticProgressionSuspension(beforeCapture) || isAutomaticProgressionSuspension(afterCapture)) {
|
|
435
|
-
result.content.push({ type: 'text', text: 'Automatic project progression is operator-suspended; suspended captures produced no progression receipt. Ordinary AgentDB memory and explicit checkpoints remain available.' });
|
|
436
|
-
result.structuredContent.continuity = 'operator-suspended';
|
|
437
|
-
}
|
|
438
382
|
return result;
|
|
439
383
|
}
|
|
440
384
|
|