instar 1.3.291 → 1.3.293

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.
Files changed (41) hide show
  1. package/dist/core/types.d.ts +9 -0
  2. package/dist/core/types.d.ts.map +1 -1
  3. package/dist/core/types.js.map +1 -1
  4. package/dist/scheduler/AgentMdJobLoader.d.ts +3 -0
  5. package/dist/scheduler/AgentMdJobLoader.d.ts.map +1 -1
  6. package/dist/scheduler/AgentMdJobLoader.js +6 -0
  7. package/dist/scheduler/AgentMdJobLoader.js.map +1 -1
  8. package/dist/scheduler/InstallBuiltinJobs.d.ts.map +1 -1
  9. package/dist/scheduler/InstallBuiltinJobs.js +5 -0
  10. package/dist/scheduler/InstallBuiltinJobs.js.map +1 -1
  11. package/dist/scheduler/JobScheduler.d.ts.map +1 -1
  12. package/dist/scheduler/JobScheduler.js +5 -0
  13. package/dist/scheduler/JobScheduler.js.map +1 -1
  14. package/dist/scheduler/buildPerSlugManifest.d.ts +2 -0
  15. package/dist/scheduler/buildPerSlugManifest.d.ts.map +1 -1
  16. package/dist/scheduler/buildPerSlugManifest.js +2 -0
  17. package/dist/scheduler/buildPerSlugManifest.js.map +1 -1
  18. package/dist/server/routes.d.ts.map +1 -1
  19. package/dist/server/routes.js +7 -3
  20. package/dist/server/routes.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/data/builtin-manifest.json +47 -47
  23. package/src/scaffold/templates/jobs/instar/commitment-detection.md +1 -0
  24. package/src/scaffold/templates/jobs/instar/correction-analyzer.md +1 -0
  25. package/src/scaffold/templates/jobs/instar/docs-coverage-audit.md +1 -0
  26. package/src/scaffold/templates/jobs/instar/evolution-overdue-check.md +1 -0
  27. package/src/scaffold/templates/jobs/instar/evolution-proposal-evaluate.md +1 -0
  28. package/src/scaffold/templates/jobs/instar/failure-analyzer.md +1 -0
  29. package/src/scaffold/templates/jobs/instar/health-check.md +1 -0
  30. package/src/scaffold/templates/jobs/instar/identity-review.md +1 -0
  31. package/src/scaffold/templates/jobs/instar/initiative-digest-review.md +1 -0
  32. package/src/scaffold/templates/jobs/instar/insight-harvest.md +1 -0
  33. package/src/scaffold/templates/jobs/instar/org-intent-drift-audit.md +1 -0
  34. package/src/scaffold/templates/jobs/instar/reflection-trigger.md +1 -0
  35. package/src/scaffold/templates/jobs/instar/relationship-maintenance.md +1 -0
  36. package/src/scaffold/templates/jobs/instar/release-readiness-check.md +1 -0
  37. package/upgrades/1.3.292.md +22 -0
  38. package/upgrades/1.3.293.md +26 -0
  39. package/upgrades/job-mcp-access.eli16.md +5 -0
  40. package/upgrades/side-effects/dashboard-headless-gemini-framework.md +90 -0
  41. package/upgrades/side-effects/job-mcp-access.md +51 -0
@@ -0,0 +1,90 @@
1
+ # Side-Effects Review — dashboard headless Gemini framework parity
2
+
3
+ **Version / slug:** `dashboard-headless-gemini-framework`
4
+ **Date:** `2026-06-05`
5
+ **Author:** `instar-codey`
6
+ **Second-pass reviewer:** `self-review required by session-spawn lifecycle surface; concur`
7
+
8
+ ## Summary of the change
9
+
10
+ The dashboard headless session-spawn route had a stale framework allowlist that accepted Claude and Codex but rejected Gemini before `SessionManager.spawnSession` could handle the request. This change updates that route-level validation to accept the same three shipped frameworks (`claude-code`, `codex-cli`, `gemini-cli`) and makes route model validation framework-aware for Gemini by accepting the known Gemini CLI model ids exported by the Gemini adapter. Regression tests cover successful Gemini pass-through, invalid-framework error text, and Gemini model acceptance.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `POST /sessions/spawn` framework validation — **modify** — widens the accepted framework values to include Gemini, matching the already-supported headless launcher surface.
15
+ - `POST /sessions/spawn` model validation — **modify** — routes Gemini requests to Gemini's known-model list instead of falling through to Claude model names.
16
+ - Session launching authority — **pass-through** — unchanged; `SessionManager` and `buildHeadlessLaunch` still own actual launch behavior.
17
+
18
+ ---
19
+
20
+ ## 1. Over-block
21
+
22
+ No new over-block identified. The only rejection behavior changed is that previously-rejected Gemini requests now pass route validation. Claude and Codex allowed model sets are unchanged. Invalid framework values are still rejected, but the error message now includes Gemini in the valid set.
23
+
24
+ ---
25
+
26
+ ## 2. Under-block
27
+
28
+ The route still rejects unknown raw Gemini model ids because it only accepts generic tiers and the adapter's current known Gemini model list. That is intentional for this route-level validator: arbitrary model-id passthrough belongs either in the Gemini adapter policy or in an explicit model-discovery change, not in a dashboard route hotfix. A Gemini request with no model remains allowed and continues to use downstream defaulting.
29
+
30
+ ---
31
+
32
+ ## 3. Level-of-abstraction fit
33
+
34
+ This fix is at the correct layer because the bug was route-local validation rejecting a value that the lower-level session launcher already supports. The route should validate the request envelope and then pass supported framework values through; it should not invent a narrower framework universe than `SessionManager`. Reusing `KNOWN_GEMINI_MODELS` avoids duplicating Gemini model names in a second place.
35
+
36
+ ---
37
+
38
+ ## 4. Signal vs authority compliance
39
+
40
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
41
+
42
+ - [ ] No — this change produces a signal consumed by an existing smart gate.
43
+ - [ ] No — this change has no block/allow surface.
44
+ - [x] Yes — but this is deterministic schema validation at an HTTP boundary, not a brittle detector making contextual behavioral decisions.
45
+ - [ ] Yes, with brittle logic — STOP. Reshape the design.
46
+
47
+ The route has blocking authority over malformed requests, but the logic is a deterministic allowlist of shipped framework identifiers and shipped adapter model ids. It does not interpret conversation content, infer intent, or suppress agent behavior. The authority is appropriate for request schema validation.
48
+
49
+ ---
50
+
51
+ ## 5. Interactions
52
+
53
+ - **Shadowing:** this route validation runs before `SessionManager.spawnSession`. The old version shadowed Gemini's existing launcher support by rejecting the request too early; the new version removes that shadow for Gemini.
54
+ - **Double-fire:** no double action. Successful requests still call exactly one session-manager spawn path.
55
+ - **Races:** no shared mutable state added. The Gemini model list is a static exported constant.
56
+ - **Feedback loops:** none. The change does not alter dashboard refresh, prompt gates, degradation reporters, or launcher retry behavior.
57
+
58
+ ---
59
+
60
+ ## 6. External surfaces
61
+
62
+ Visible external surface: dashboard/headless API callers can now create Gemini sessions through the existing spawn route. Invalid-framework error text changes to include Gemini as a valid value. No persistent state format, config, migration, Telegram behavior, Cloudflare tunnel behavior, or session cleanup policy changes.
63
+
64
+ ---
65
+
66
+ ## 7. Rollback cost
67
+
68
+ Rollback is a pure code revert and patch release. No data migration or agent state repair is required. During rollback, dashboard Gemini headless spawns would return to the known-broken route rejection while lower-level Gemini session support would remain intact.
69
+
70
+ ---
71
+
72
+ ## Conclusion
73
+
74
+ This is a narrow route-parity fix: the dashboard route now accepts the Gemini framework and known Gemini models already supported by the headless launcher. The main risk was accidentally widening model validation too far or changing Claude/Codex validation; tests bind both the successful Gemini path and invalid-framework behavior, and the implementation keeps Claude/Codex allowlists unchanged.
75
+
76
+ ---
77
+
78
+ ## Second-pass review
79
+
80
+ **Reviewer:** instar-codey self-review
81
+ **Independent read of the artifact:** concur
82
+
83
+ The lifecycle surface is a session-spawn route, so I re-read the change as a reviewer after writing the artifact. The fix removes a route-local false rejection and does not add a new launcher path, lifecycle transition, or cleanup behavior. The scoped tests cover the route boundary where the regression lived.
84
+
85
+ ---
86
+
87
+ ## Evidence pointers
88
+
89
+ - Focused unit gate: `npx vitest run tests/unit/server.test.ts tests/unit/route-validation-edge.test.ts` — 46 tests passed.
90
+ - Original observed failure from verification: dashboard/headless spawn rejected Gemini with `"framework" must be one of: claude-code, codex-cli`.
@@ -0,0 +1,51 @@
1
+ # Side-Effects Review — per-job MCP access scoping (`mcpAccess`)
2
+
3
+ **Version / slug:** `job-mcp-access`
4
+ **Date:** `2026-06-05`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `self-review under the Tier-1 lite lane; the capability-loss question (does any job need MCP?) is addressed explicitly below`
7
+
8
+ ## Summary of the change
9
+
10
+ `JobDefinition.mcpAccess?: 'project' | 'none'`. When `'none'`, `spawnJobSession` passes the EXISTING `disableProjectMcp` option to `spawnSession` (shipped + verified by the mentor autonomous-fix loop, docs/specs/LOOP-SESSION-NO-MCP-SPEC.md), which emits `--strict-mcp-config --mcp-config '{"mcpServers":{}}'` on claude-code spawns and nothing on other frameworks. The field flows frontmatter → InstallBuiltinJobs → per-slug manifest → validateManifest → manifestToJobDefinition. 14 shipped utility templates declare `mcpAccess: none`.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `types.ts JobDefinition.mcpAccess` — add — optional, absent = legacy.
15
+ - `AgentMdJobLoader.ALLOWED_FRONTMATTER_KEYS` — modified — `mcpAccess` joins the closed-set whitelist (deliberate, per the set's own doc).
16
+ - `PerSlugManifest.mcpAccess` + `validateManifest` — add — closed two-value enum, loud throw otherwise.
17
+ - `buildPerSlugManifest` — modified — carries the field; omits the key when undefined.
18
+ - `InstallBuiltinJobs` — modified — derives from frontmatter; out-of-set values → undefined (fail-safe to legacy), then validateManifest re-checks the generated manifest.
19
+ - `JobScheduler.spawnJobSession` — modified — `disableProjectMcp: job.mcpAccess === 'none' ? true : undefined`.
20
+ - 14 templates — modified — `mcpAccess: none` added to frontmatter.
21
+
22
+ ## 1. Direction-of-failure analysis (capability loss)
23
+
24
+ The risk: a job whose body NEEDS an MCP tool gets spawned without MCP and fails mid-run.
25
+
26
+ - **Grounding:** zero shipped templates reference `mcp__*`, `threadline_*`, playwright, browser, or chrome (grep across `src/scaffold/templates/jobs/instar/*.md`). The marked 14 are bash/curl-only by construction.
27
+ - **Deliberately unmarked:** the orchestration family (`mentor-onboarding`, all `overseer-*`, `evolution-proposal-implement`) keeps project MCP — they drive sessions/build code and are the apprenticeship machinery; this slice does not touch their spawn behavior.
28
+ - **Custom/user jobs:** never affected — the field is opt-in and absent on every existing user job.
29
+ - **Worst NEW case:** a future template author marks a job `none` then writes a body that wants MCP — the session still runs (built-in tools work; MCP tools are simply absent), the job degrades visibly in its own output rather than hanging. That is strictly better than the current failure direction (auth-required remote MCP can hang the headless boot silently).
30
+
31
+ ## 2. Over-permit
32
+
33
+ None — the change only ever REMOVES servers from a spawn, never adds; and only for jobs that explicitly opt in.
34
+
35
+ ## 3. Scope deliberately NOT taken
36
+
37
+ - No default flip: absent stays legacy full-MCP. A future slice may flip instar-origin jobs by default after this one soaks.
38
+ - Topic/chat sessions untouched (capability matters there; the standing-cost problem for those is the idle-reap path, fixed separately by the meaningful-tail work).
39
+ - No per-job CUSTOM MCP subset (`--mcp-config` with a real server list) — only the binary none/project. Subset selection is a follow-up if a real job needs it.
40
+
41
+ ## 4. Migration parity
42
+
43
+ Built-in templates are re-installed by `installBuiltinJobs()` on every update via `refreshHooksAndSettings()`, and the per-slug manifests are REGENERATED from the templates — existing agents pick up the 14 `mcpAccess: none` declarations on their next update without a dedicated migration. Operator-disabled jobs keep their disabled state (existing `existingEnabled` preservation). No config/hook/skill/CLAUDE.md surface changes.
44
+
45
+ ## 5. Token/cost impact
46
+
47
+ Strictly negative (saves): every marked job spawn skips MCP server boot (playwright-mcp alone ≈125MB + node startup per spawn; health-check spawns 288×/day). No new LLM calls.
48
+
49
+ ## 6. Rollback
50
+
51
+ Revert the commit. Manifests regenerate without the field on the next install pass; spawns return to full-project-MCP.