instar 1.3.617 → 1.3.618

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.617",
3
+ "version": "1.3.618",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-06-17T18:44:27.024Z",
5
- "instarVersion": "1.3.617",
4
+ "generatedAt": "2026-06-17T22:02:39.555Z",
5
+ "instarVersion": "1.3.618",
6
6
  "entryCount": 201,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -11,7 +11,7 @@
11
11
  "domain": "identity",
12
12
  "sourcePath": "src/core/PostUpdateMigrator.ts",
13
13
  "installedPath": ".instar/hooks/instar/session-start.sh",
14
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
14
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
15
15
  "since": "2025-01-01"
16
16
  },
17
17
  "hook:dangerous-command-guard": {
@@ -20,7 +20,7 @@
20
20
  "domain": "safety",
21
21
  "sourcePath": "src/core/PostUpdateMigrator.ts",
22
22
  "installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
23
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
23
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
24
24
  "since": "2025-01-01"
25
25
  },
26
26
  "hook:grounding-before-messaging": {
@@ -29,7 +29,7 @@
29
29
  "domain": "safety",
30
30
  "sourcePath": "src/core/PostUpdateMigrator.ts",
31
31
  "installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
32
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
32
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
33
33
  "since": "2025-01-01"
34
34
  },
35
35
  "hook:compaction-recovery": {
@@ -38,7 +38,7 @@
38
38
  "domain": "identity",
39
39
  "sourcePath": "src/core/PostUpdateMigrator.ts",
40
40
  "installedPath": ".instar/hooks/instar/compaction-recovery.sh",
41
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
41
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
42
42
  "since": "2025-01-01"
43
43
  },
44
44
  "hook:external-operation-gate": {
@@ -47,7 +47,7 @@
47
47
  "domain": "safety",
48
48
  "sourcePath": "src/core/PostUpdateMigrator.ts",
49
49
  "installedPath": ".instar/hooks/instar/external-operation-gate.js",
50
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
50
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
51
51
  "since": "2025-01-01"
52
52
  },
53
53
  "hook:deferral-detector": {
@@ -56,7 +56,7 @@
56
56
  "domain": "safety",
57
57
  "sourcePath": "src/core/PostUpdateMigrator.ts",
58
58
  "installedPath": ".instar/hooks/instar/deferral-detector.js",
59
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
59
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
60
60
  "since": "2025-01-01"
61
61
  },
62
62
  "hook:self-stop-guard": {
@@ -65,7 +65,7 @@
65
65
  "domain": "coherence",
66
66
  "sourcePath": "src/core/PostUpdateMigrator.ts",
67
67
  "installedPath": ".instar/hooks/instar/self-stop-guard.js",
68
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
68
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
69
69
  "since": "2025-01-01"
70
70
  },
71
71
  "hook:post-action-reflection": {
@@ -74,7 +74,7 @@
74
74
  "domain": "evolution",
75
75
  "sourcePath": "src/core/PostUpdateMigrator.ts",
76
76
  "installedPath": ".instar/hooks/instar/post-action-reflection.js",
77
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
77
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
78
78
  "since": "2025-01-01"
79
79
  },
80
80
  "hook:external-communication-guard": {
@@ -83,7 +83,7 @@
83
83
  "domain": "safety",
84
84
  "sourcePath": "src/core/PostUpdateMigrator.ts",
85
85
  "installedPath": ".instar/hooks/instar/external-communication-guard.js",
86
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
86
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
87
87
  "since": "2025-01-01"
88
88
  },
89
89
  "hook:scope-coherence-collector": {
@@ -92,7 +92,7 @@
92
92
  "domain": "coherence",
93
93
  "sourcePath": "src/core/PostUpdateMigrator.ts",
94
94
  "installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
95
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
95
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
96
96
  "since": "2025-01-01"
97
97
  },
98
98
  "hook:scope-coherence-checkpoint": {
@@ -101,7 +101,7 @@
101
101
  "domain": "coherence",
102
102
  "sourcePath": "src/core/PostUpdateMigrator.ts",
103
103
  "installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
104
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
104
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
105
105
  "since": "2025-01-01"
106
106
  },
107
107
  "hook:free-text-guard": {
@@ -110,7 +110,7 @@
110
110
  "domain": "safety",
111
111
  "sourcePath": "src/core/PostUpdateMigrator.ts",
112
112
  "installedPath": ".instar/hooks/instar/free-text-guard.sh",
113
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
113
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
114
114
  "since": "2025-01-01"
115
115
  },
116
116
  "hook:claim-intercept": {
@@ -119,7 +119,7 @@
119
119
  "domain": "coherence",
120
120
  "sourcePath": "src/core/PostUpdateMigrator.ts",
121
121
  "installedPath": ".instar/hooks/instar/claim-intercept.js",
122
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
122
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
123
123
  "since": "2025-01-01"
124
124
  },
125
125
  "hook:claim-intercept-response": {
@@ -128,7 +128,7 @@
128
128
  "domain": "coherence",
129
129
  "sourcePath": "src/core/PostUpdateMigrator.ts",
130
130
  "installedPath": ".instar/hooks/instar/claim-intercept-response.js",
131
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
131
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
132
132
  "since": "2025-01-01"
133
133
  },
134
134
  "hook:stop-gate-router": {
@@ -137,7 +137,7 @@
137
137
  "domain": "safety",
138
138
  "sourcePath": "src/core/PostUpdateMigrator.ts",
139
139
  "installedPath": ".instar/hooks/instar/stop-gate-router.js",
140
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
140
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
141
141
  "since": "2025-01-01"
142
142
  },
143
143
  "hook:auto-approve-permissions": {
@@ -146,7 +146,7 @@
146
146
  "domain": "safety",
147
147
  "sourcePath": "src/core/PostUpdateMigrator.ts",
148
148
  "installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
149
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
149
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
150
150
  "since": "2025-01-01"
151
151
  },
152
152
  "job:health-check": {
@@ -1554,7 +1554,7 @@
1554
1554
  "type": "subsystem",
1555
1555
  "domain": "updates",
1556
1556
  "sourcePath": "src/core/PostUpdateMigrator.ts",
1557
- "contentHash": "6122e1de18a07a602a39b840dd9ee199b9b786268b401c901154e0cabced997c",
1557
+ "contentHash": "fbbfc1adac0ebc5e8405574f97a758ce5a391961465f99f40a735cafded65097",
1558
1558
  "since": "2025-01-01"
1559
1559
  },
1560
1560
  "subsystem:scheduler": {
@@ -0,0 +1,27 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ Fixed a fleet-wide crash in a generated Stop hook. `PostUpdateMigrator.getActionClaimFollowthroughHook()` emitted `.instar/hooks/instar/action-claim-followthrough.js` with a stray, unbalanced `})();` on the last line (the hook body opens with a bare `let data = ''`, not an IIFE). Node rejected the file with `SyntaxError: Unexpected token '}'` on **every** Stop-hook fire — the red "Ran 5 stop hooks → Stop hook error" seen in Claude Code session logs. The hook is signal-only and dark-by-default, so the crash was noisy but harmless (nothing blocked or corrupted); it simply spammed errors once per turn on every agent.
9
+
10
+ Removed the stray line from the source template. Existing agents auto-heal on their next update via the always-overwrite migration path (`migrateHooks` unconditionally re-writes this hook from the corrected template) — no new migration code needed.
11
+
12
+ Added a CI parse gate (`tests/unit/generated-hooks-parse.test.ts`) that GENERATES every `get*Hook()` result and runs `node --check` on each JS hook. The pre-existing `no-bare-require-in-generated-hooks.test.ts` only source-scans for one forbidden pattern and never parses, which is exactly how a plain syntax typo shipped. The new gate closes the whole "generated hook fails to parse" class — a hook typo can no longer reach the fleet.
13
+
14
+ ## What to Tell Your User
15
+
16
+ The recurring "Stop hook error / SyntaxError: Unexpected token '}'" noise in your Claude Code session logs is fixed. It was a harmless-but-noisy typo in one of the always-on bookkeeping hooks — it never blocked or corrupted any work, just printed an error every turn. After this update it's gone, and a new CI check guarantees a broken hook can't ship again.
17
+
18
+ ## Summary of New Capabilities
19
+
20
+ - No new user capability. This is a reliability fix: a fleet-wide per-turn Stop-hook crash is removed, and CI now parse-checks every generated hook so the class can't recur.
21
+
22
+ ## Evidence
23
+
24
+ - `tests/unit/generated-hooks-parse.test.ts` — RED before the fix (failed on `getActionClaimFollowthroughHook` with `SyntaxError: Unexpected token '}'`, 23 other generators passed), GREEN after removing the stray line. Runs `node --check` on the real generated output of every `get*Hook()`.
25
+ - `tests/unit/no-bare-require-in-generated-hooks.test.ts` — still GREEN (unchanged; the two tests cover different failure modes).
26
+ - `pnpm build` — clean TypeScript compile after the template edit.
27
+ - Always-overwrite confirmed at `PostUpdateMigrator.ts` (`fs.writeFileSync(..., 'action-claim-followthrough.js', this.getActionClaimFollowthroughHook())`) — the corrected hook is unconditionally re-written on every migration, healing the deployed fleet on update.
@@ -0,0 +1,67 @@
1
+ # Side-Effects Review — Fix fleet-wide stray-`})();` in action-claim Stop hook + CI parse gate
2
+
3
+ **Version / slug:** `action-claim-hook-parse-fix`
4
+ **Date:** `2026-06-17`
5
+ **Author:** `Echo (instar-dev agent)`
6
+ **Second-pass reviewer:** `not required` (no decision-point / no runtime authority — CI-only guard + a generated-text fix)
7
+
8
+ ## Summary of the change
9
+
10
+ `PostUpdateMigrator.getActionClaimFollowthroughHook()` emitted a hook whose template literal ended with `});\n})();` — but the hook body is **not** wrapped in an IIFE (it opens with a bare `let data = ''`). The trailing `})();` is therefore unbalanced, so `node` rejects the generated `.instar/hooks/instar/action-claim-followthrough.js` with `SyntaxError: Unexpected token '}'` on **every** Stop-hook fire. Because built-in hooks are always-overwritten on every migration, this broken hook shipped to the entire fleet and crashes once per turn (visible as the red "Ran 5 stop hooks → Stop hook error" in Claude Code). The hook is signal-only and dark-by-default, so the crash was noisy-but-harmless (it never blocked or corrupted work) — but it spammed errors continuously.
11
+
12
+ Two files change:
13
+ - `src/core/PostUpdateMigrator.ts` — remove the single stray `})();` line from the template (the hook body was already correct top-level code; only the extra IIFE-close was wrong).
14
+ - `tests/unit/generated-hooks-parse.test.ts` (new) — GENERATES every `get*Hook()` result and runs `node --check` on each JS hook. This is the gate that was missing: the existing `no-bare-require-in-generated-hooks.test.ts` only source-scans for one forbidden pattern and never parses, so a plain typo sailed past it.
15
+
16
+ The deployed fleet auto-heals on next update via the existing always-overwrite migration path (`migrateHooks` unconditionally re-writes this hook from the now-correct template). No new migration code required.
17
+
18
+ ## Decision-point inventory
19
+
20
+ This change adds no runtime decision point. It corrects generated text and adds a CI test.
21
+
22
+ - `getActionClaimFollowthroughHook()` template — **modify** — remove one stray line; generated hook now parses.
23
+ - `tests/unit/generated-hooks-parse.test.ts` — **add** — CI-time parse gate over all generated hooks. A build-time signal (fails CI); it holds no runtime authority over any agent.
24
+
25
+ ---
26
+
27
+ ## 1. Over-block
28
+
29
+ No block/allow surface — over-block not applicable. The CI test only fails the build when a generated hook genuinely fails `node --check`; that is the intended (and only) "block."
30
+
31
+ ## 2. Under-block
32
+
33
+ `node --check` validates parse-ability, not runtime correctness — a hook that parses but throws at runtime would still pass this test. That gap is acceptable for this layer (parse failure was the actual fleet bug) and is the explicit motivation for Fix B (the runtime session-start hook-integrity guard), which catches post-deploy/runtime breakage. The test also skips `.sh`/`.py` generators (it is a `node` parse gate); shell/python hooks are out of scope here.
34
+
35
+ ## 3. Level-of-abstraction fit
36
+
37
+ Correct layer. The bug is in source-generated text, so the prevention belongs in CI over the source generators (cheap, deterministic, runs before ship). The complementary runtime layer (heal already-broken hooks on disk without waiting for an update) is deliberately a separate change (Fix B) — this one does not try to be both.
38
+
39
+ ## 4. Signal vs authority compliance
40
+
41
+ - [x] No — this change has no block/allow surface. The new test is a CI signal (fails the build); it never gates agent behavior at runtime. The template edit is a correctness fix to generated code. `docs/signal-vs-authority.md` reviewed — no brittle-detector-with-authority introduced.
42
+
43
+ ## 5. Interactions
44
+
45
+ - **Shadowing:** None. The new test is additive and independent of `no-bare-require-in-generated-hooks.test.ts` (that one keeps its narrower source-scan; this one parses). They cover different failure modes and do not shadow each other.
46
+ - **Double-fire:** N/A — test-only + a one-line generated-text fix.
47
+ - **Races:** None. The test writes to a per-run `mkdtemp` dir; no shared state.
48
+ - **Feedback loops:** None.
49
+
50
+ ## 6. External surfaces
51
+
52
+ - **Other agents / install base:** Positive-only. On next update every agent's `action-claim-followthrough.js` is re-written from the corrected template (always-overwrite), so the per-turn `SyntaxError` stops fleet-wide. No behavior change when the feature is enabled — the hook body is byte-identical except for the removed invalid line.
53
+ - **External systems:** None.
54
+ - **Persistent state:** None.
55
+ - **Operator surface:** No operator-facing actions — not applicable.
56
+
57
+ ## 6b. Operator-surface quality
58
+
59
+ No operator surface (no `dashboard/*` or form files touched) — not applicable.
60
+
61
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
62
+
63
+ **machine-local BY DESIGN** — the fix is to a generated on-disk hook file; each machine installs and runs its own hook files locally (hooks are per-checkout infrastructure). The correction reaches every machine through the same always-overwrite migration each machine runs on update — there is no cross-machine state, notice, durable record, or generated URL involved. No one-voice gating, no topic-transfer stranding, no machine-boundary links.
64
+
65
+ ## 8. Rollback cost
66
+
67
+ Trivial. Revert the two-file commit: the template line returns (re-breaking the hook) and the test is removed. No data migration, no agent-state repair. Because the hook is always-overwritten, a roll-forward or roll-back simply re-writes the hook from whichever template version is shipped.