instar 1.3.130 → 1.3.131

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.130",
3
+ "version": "1.3.131",
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-05-31T00:33:26.641Z",
5
- "instarVersion": "1.3.130",
4
+ "generatedAt": "2026-05-31T01:22:54.429Z",
5
+ "instarVersion": "1.3.131",
6
6
  "entryCount": 193,
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
14
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
23
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
32
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
41
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
50
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
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": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
59
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
60
60
  "since": "2025-01-01"
61
61
  },
62
62
  "hook:post-action-reflection": {
@@ -65,7 +65,7 @@
65
65
  "domain": "evolution",
66
66
  "sourcePath": "src/core/PostUpdateMigrator.ts",
67
67
  "installedPath": ".instar/hooks/instar/post-action-reflection.js",
68
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
68
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
69
69
  "since": "2025-01-01"
70
70
  },
71
71
  "hook:external-communication-guard": {
@@ -74,7 +74,7 @@
74
74
  "domain": "safety",
75
75
  "sourcePath": "src/core/PostUpdateMigrator.ts",
76
76
  "installedPath": ".instar/hooks/instar/external-communication-guard.js",
77
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
77
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
78
78
  "since": "2025-01-01"
79
79
  },
80
80
  "hook:scope-coherence-collector": {
@@ -83,7 +83,7 @@
83
83
  "domain": "coherence",
84
84
  "sourcePath": "src/core/PostUpdateMigrator.ts",
85
85
  "installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
86
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
86
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
87
87
  "since": "2025-01-01"
88
88
  },
89
89
  "hook:scope-coherence-checkpoint": {
@@ -92,7 +92,7 @@
92
92
  "domain": "coherence",
93
93
  "sourcePath": "src/core/PostUpdateMigrator.ts",
94
94
  "installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
95
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
95
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
96
96
  "since": "2025-01-01"
97
97
  },
98
98
  "hook:free-text-guard": {
@@ -101,7 +101,7 @@
101
101
  "domain": "safety",
102
102
  "sourcePath": "src/core/PostUpdateMigrator.ts",
103
103
  "installedPath": ".instar/hooks/instar/free-text-guard.sh",
104
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
104
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
105
105
  "since": "2025-01-01"
106
106
  },
107
107
  "hook:claim-intercept": {
@@ -110,7 +110,7 @@
110
110
  "domain": "coherence",
111
111
  "sourcePath": "src/core/PostUpdateMigrator.ts",
112
112
  "installedPath": ".instar/hooks/instar/claim-intercept.js",
113
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
113
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
114
114
  "since": "2025-01-01"
115
115
  },
116
116
  "hook:claim-intercept-response": {
@@ -119,7 +119,7 @@
119
119
  "domain": "coherence",
120
120
  "sourcePath": "src/core/PostUpdateMigrator.ts",
121
121
  "installedPath": ".instar/hooks/instar/claim-intercept-response.js",
122
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
122
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
123
123
  "since": "2025-01-01"
124
124
  },
125
125
  "hook:stop-gate-router": {
@@ -128,7 +128,7 @@
128
128
  "domain": "safety",
129
129
  "sourcePath": "src/core/PostUpdateMigrator.ts",
130
130
  "installedPath": ".instar/hooks/instar/stop-gate-router.js",
131
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
131
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
132
132
  "since": "2025-01-01"
133
133
  },
134
134
  "hook:auto-approve-permissions": {
@@ -137,7 +137,7 @@
137
137
  "domain": "safety",
138
138
  "sourcePath": "src/core/PostUpdateMigrator.ts",
139
139
  "installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
140
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
140
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
141
141
  "since": "2025-01-01"
142
142
  },
143
143
  "job:health-check": {
@@ -1129,7 +1129,7 @@
1129
1129
  "type": "template",
1130
1130
  "domain": "operations",
1131
1131
  "sourcePath": "src/templates/scripts/instar-worktree-create.sh",
1132
- "contentHash": "2e3f78d72a00a56a9bae9dfe0af0ecc48557e5af2cd59fc6435356784c8e6796",
1132
+ "contentHash": "c258707dafb41518f376ffbab4ea3c5a824d6ab7dc9b1df5f8b8a2f7f99fbaee",
1133
1133
  "since": "2025-01-01"
1134
1134
  },
1135
1135
  "template:secret-drop-retrieve.mjs": {
@@ -1489,7 +1489,7 @@
1489
1489
  "type": "subsystem",
1490
1490
  "domain": "updates",
1491
1491
  "sourcePath": "src/core/PostUpdateMigrator.ts",
1492
- "contentHash": "8804d1b46f2b0f32f053b1cc18a42113857fcdd6462d3fe43205aee2452b5a26",
1492
+ "contentHash": "89b3df4de4f24c8825ec19797392f021c54d12a9a18826cb4380ce6986f4558f",
1493
1493
  "since": "2025-01-01"
1494
1494
  },
1495
1495
  "subsystem:scheduler": {
@@ -67,6 +67,10 @@ if [[ -e "$WORKTREE_PATH" ]]; then
67
67
  fi
68
68
  mkdir -p "$WORKTREES_ROOT"
69
69
  chmod 0700 "$WORKTREES_ROOT"
70
+ # OS resource hygiene: keep macOS Spotlight/mediaanalysisd from re-indexing every
71
+ # worktree under here (a top OS-level CPU consumer). Honored recursively; no-op
72
+ # elsewhere. The CLI path does the same via ensureWorktreeSpotlightExclusion.
73
+ [[ -f "$WORKTREES_ROOT/.metadata_never_index" ]] || : > "$WORKTREES_ROOT/.metadata_never_index" 2>/dev/null || true
70
74
  cd "$INSTAR_REPO"
71
75
  if git rev-parse --verify --quiet "$BRANCH" >/dev/null; then
72
76
  git worktree add "$WORKTREE_PATH" "$BRANCH"
@@ -0,0 +1,56 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ **Agent worktrees are now excluded from macOS Spotlight indexing — a top
8
+ OS-level CPU drain on multi-worktree machines.**
9
+
10
+ Each `instar worktree create` leaves a full source tree on disk under the agent's
11
+ `.worktrees/` directory. macOS Spotlight (mds_stores) and mediaanalysisd treat
12
+ every one of those trees as new content to index and re-index — and on a machine
13
+ that has accumulated dozens of worktrees that becomes one of the single biggest
14
+ CPU consumers on the box (measured: mediaanalysisd pulling ~80% CPU under a
15
+ ~120-worktree backlog), entirely separate from anything instar's own code is
16
+ doing.
17
+
18
+ instar now drops a single `.metadata_never_index` marker at the `.worktrees/`
19
+ container root, which tells Spotlight to skip that whole subtree. New worktrees
20
+ are covered automatically at creation time, and existing agents get the marker
21
+ backfilled on update via a new migration. The marker lives at the container (not
22
+ inside any worktree, so it adds no git noise), is honored recursively for every
23
+ worktree beneath it, is harmless on non-macOS, and is idempotent.
24
+
25
+ This is the first piece of the **OS resource hygiene** facet of the Responsible
26
+ Resource Usage standard.
27
+
28
+ ## What to Tell Your User
29
+
30
+ Nothing to configure. On a Mac, the throwaway worktrees instar creates for
31
+ parallel development will no longer be re-indexed by Spotlight — which quietly
32
+ removes a large chunk of background CPU load that had nothing to do with your
33
+ agents actually working. If you have built up a lot of worktrees over time, you
34
+ should feel this as lower idle CPU after the update settles.
35
+
36
+ ## Summary of New Capabilities
37
+
38
+ - `instar worktree create` (and the convention wrapper's fallback path) drop a
39
+ `.metadata_never_index` marker at the `.worktrees/` container so Spotlight skips
40
+ indexing every worktree under it.
41
+ - New exported helper `ensureWorktreeSpotlightExclusion(worktreesDir)` — idempotent,
42
+ best-effort, never throws, returns whether it created the marker.
43
+ - New `PostUpdateMigrator.migrateWorktreeSpotlightExclusion` backfills the marker
44
+ into existing agents' `.worktrees/` on update.
45
+
46
+ ## Evidence
47
+
48
+ - `tests/unit/worktree-spotlight-exclusion.test.ts` — new: the helper (creates the
49
+ marker, idempotent return, never throws on an unwritable path) and the migration
50
+ backfill (drops the marker into an existing `.worktrees/`, idempotent on re-run).
51
+ - `tests/unit/InstarWorktreeManager.test.ts` + `migrateWorktreeConvention.test.ts`
52
+ still green (the `ensureWorktreesDir` hook + always-overwrite wrapper unchanged
53
+ in behavior).
54
+ - Operationally verified live: dropping the marker on echo's real 121-worktree
55
+ `.worktrees/` directory; mediaanalysisd dropped from its earlier ~80% spike.
56
+ - Full `npm run lint` clean.
@@ -0,0 +1,81 @@
1
+ # Side-Effects Review — Worktree Spotlight exclusion
2
+
3
+ **Version / slug:** `worktree-spotlight-exclusion`
4
+ **Date:** `2026-05-30`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ Drop a `.metadata_never_index` marker at the `.worktrees/` container root so macOS
11
+ Spotlight/mediaanalysisd skip indexing every worktree beneath it. Covered at
12
+ creation (`ensureWorktreesDir` → `ensureWorktreeSpotlightExclusion`, plus the
13
+ convention wrapper's fallback path) and backfilled for existing agents via a new
14
+ `PostUpdateMigrator.migrateWorktreeSpotlightExclusion`.
15
+
16
+ ## Decision-point inventory
17
+
18
+ None. The change adds no decision logic — it writes one inert OS-hint file.
19
+
20
+ ## 1. Over-block
21
+
22
+ **What legitimate inputs does this change reject?** Nothing is rejected. The marker
23
+ only affects Spotlight indexing of throwaway build trees; it does not change git,
24
+ the worktree, the build, or any agent behavior. Source files inside worktrees are
25
+ unaffected (the marker is at the container, not inside a worktree).
26
+
27
+ ## 2. Under-block
28
+
29
+ **What does this still miss?** It does not reduce indexing of anything outside
30
+ `.worktrees/` (by design), and it does not reclaim the worktrees themselves (the
31
+ sibling reaper work). Spotlight may take time to honor a newly-dropped marker on an
32
+ already-indexed tree, so the relief on existing backlogs is gradual, not instant.
33
+
34
+ ## 3. Level-of-abstraction fit
35
+
36
+ **Right layer?** Yes. The marker-ensure lives in `ensureWorktreesDir`, the single
37
+ chokepoint all CLI create paths run through, and the backfill lives beside the
38
+ existing `migrateWorktreeConvention`. The exported helper keeps the rule in one
39
+ place, reused by the migrator.
40
+
41
+ ## 4. Signal vs authority compliance
42
+
43
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
44
+
45
+ No blocking authority added. The helper is best-effort and total: a write failure
46
+ returns false and is swallowed (`@silent-fallback-ok`), never throwing and never
47
+ blocking worktree creation or a migration pass.
48
+
49
+ ## 5. Interactions
50
+
51
+ Reuses `resolveAgentHomeForWorktree` (same validation as `migrateWorktreeConvention`)
52
+ so non-convention agents are skipped silently. The wrapper fallback change rides the
53
+ existing always-overwrite of `instar-worktree-create.sh`. No interaction with the
54
+ SessionReaper, sentinels, or recovery paths. Idempotent everywhere.
55
+
56
+ ## 6. External surfaces
57
+
58
+ One new on-disk file per agent (`.worktrees/.metadata_never_index`, empty). No HTTP
59
+ routes, no config, no notifications, no Telegram. Purely a filesystem hint to the OS.
60
+
61
+ ## 7. Rollback cost
62
+
63
+ Trivial. Delete the marker to restore indexing; revert the PR to remove the
64
+ create-path drop + migration. No state, no schema, no irreversible op.
65
+
66
+ ## Conclusion
67
+
68
+ Lowest-risk possible change: additive, inert, idempotent, best-effort, reversible,
69
+ no decision logic. Directly targets a measured top OS-level CPU drain (mediaanalysisd
70
+ ~80% under a ~120-worktree backlog). Operationally pre-validated by dropping the
71
+ marker on echo's real `.worktrees/` (121 worktrees) live.
72
+
73
+ ## Second-pass review (if required)
74
+
75
+ Not required — inert additive OS hint, no authority, no decision logic.
76
+
77
+ ## Evidence pointers
78
+
79
+ - `tests/unit/worktree-spotlight-exclusion.test.ts` — helper + migration backfill.
80
+ - `tests/unit/InstarWorktreeManager.test.ts`, `migrateWorktreeConvention.test.ts` — green.
81
+ - `upgrades/NEXT.md` — upgrade guide.