claude-code-session-manager 0.143.0 → 0.144.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.
Files changed (119) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/AppSettings-Z68gQiVE.js +2 -0
  3. package/dist/assets/{History-DTttbvPb.js → History-C3E6y_7t.js} +2 -2
  4. package/dist/assets/HomeClaudeConfig-Yd1vXzBn.js +5 -0
  5. package/dist/assets/{Panel-B_D4Bg7L.js → Panel-CnfWs46Z.js} +1 -1
  6. package/dist/assets/ProjectClaudeConfig-CP0Wsg-H.js +26 -0
  7. package/dist/assets/Scheduler-D8un7N3B.js +16 -0
  8. package/dist/assets/{SkillReferenceGraph-D1b2aiol.js → SkillReferenceGraph-DRtZV1Al.js} +1 -1
  9. package/dist/assets/{Skills-cfV7sgk6.js → Skills-Bg5O2Hyn.js} +23 -23
  10. package/dist/assets/{TiptapBody-DVXtEIVy.js → TiptapBody-BdzoBmqu.js} +27 -27
  11. package/dist/assets/{Toggle-CYajnSdx.js → Toggle-Dt5K1OXt.js} +1 -1
  12. package/dist/assets/{VoiceButton-DJ4gGRuE.js → VoiceButton-CTLyRgdF.js} +1 -1
  13. package/dist/assets/{historyTotals-D3MoHY2U.js → historyTotals-B2_KWBga.js} +1 -1
  14. package/dist/assets/{index-CdTppjKR.js → index-446b69rr.js} +698 -697
  15. package/dist/assets/{index-DVHIHoJf.css → index-BJ5TJvmz.css} +1 -1
  16. package/dist/index.html +2 -2
  17. package/dist-web/app.css +1 -1
  18. package/dist-web/app.js +439 -436
  19. package/package.json +4 -2
  20. package/plugins/session-manager-dev/skills/develop/SKILL.md +14 -13
  21. package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +16 -2
  22. package/plugins/session-manager-dev/skills/maintaining-md-network/weekly-consolidation.md +87 -0
  23. package/scripts/README.md +1 -1
  24. package/scripts/scheduler-mcp-server.cjs +77 -0
  25. package/src/main/adminRouteRegistry.cjs +6 -0
  26. package/src/main/agentLibrary.cjs +60 -11
  27. package/src/main/agentsIpc.cjs +19 -0
  28. package/src/main/build-info.json +4 -4
  29. package/src/main/chatRunner.cjs +109 -0
  30. package/src/main/health.cjs +59 -17
  31. package/src/main/index.cjs +4 -0
  32. package/src/main/ipcSchemas.cjs +50 -1
  33. package/src/main/lib/claude/agentArmory.cjs +128 -0
  34. package/src/main/lib/claude/agentModelResolve.cjs +3 -2
  35. package/src/main/lib/claude/agentSnapshot.cjs +24 -3
  36. package/src/main/lib/claude/builtinTools.cjs +110 -0
  37. package/src/main/lib/claude/environmentProfiles.cjs +1 -1
  38. package/src/main/lib/claude/headlessMcpServers.cjs +138 -0
  39. package/src/main/lib/claude/jobSandboxPolicy.cjs +8 -2
  40. package/src/main/lib/claude/personaToolScope.cjs +77 -6
  41. package/src/main/lib/epic/epicDepsSync.cjs +66 -0
  42. package/src/main/lib/epic/epicOutsideRead.cjs +38 -1
  43. package/src/main/lib/epic/epicSettle.cjs +48 -4
  44. package/src/main/lib/epic/epicSpawnPlan.cjs +3 -1
  45. package/src/main/lib/epic/epicValidationHook.cjs +9 -1
  46. package/src/main/lib/epic/planReviewInput.cjs +123 -0
  47. package/src/main/lib/epic/restorableSessions.cjs +1 -0
  48. package/src/main/lib/epic/scriptStartedBy.cjs +71 -0
  49. package/src/main/lib/externalContract.cjs +12 -0
  50. package/src/main/lib/feedback-remote/createdProjects.cjs +291 -0
  51. package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +24 -2
  52. package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +24 -3
  53. package/src/main/lib/feedback-remote/pendingReplies.cjs +8 -4
  54. package/src/main/lib/feedback-remote/projectCreate.cjs +415 -0
  55. package/src/main/lib/feedback-remote/replyClaims.cjs +15 -6
  56. package/src/main/lib/feedback-remote/serviceMcpSession.cjs +29 -1
  57. package/src/main/lib/feedback-remote/serviceMcpTools.cjs +43 -2
  58. package/src/main/lib/feedback-remote/servicePairLocalRoutes.cjs +91 -0
  59. package/src/main/lib/feedback-remote/servicePairings.cjs +47 -7
  60. package/src/main/lib/feedback-remote/serviceStdioBridge.cjs +99 -1
  61. package/src/main/lib/git/gitWorktree.cjs +1 -1
  62. package/src/main/lib/git/worktreeDeps.cjs +9 -3
  63. package/src/main/lib/mcpToolCatalog.cjs +43 -5
  64. package/src/main/lib/mcpToolsProbe.cjs +19 -2
  65. package/src/main/lib/packs/packCatalog.cjs +98 -5
  66. package/src/main/lib/persona-macro/agentPersonaSchema.cjs +6 -0
  67. package/src/main/lib/persona-macro/builtinMacros.cjs +6 -4
  68. package/src/main/lib/persona-macro/personaFrontmatterSchema.cjs +9 -0
  69. package/src/main/lib/persona-macro/personaLoadout.cjs +58 -0
  70. package/src/main/lib/persona-macro/personaMerge.cjs +11 -3
  71. package/src/main/lib/persona-macro/personaUpgrade.cjs +96 -0
  72. package/src/main/lib/persona-macro/projectVideoToolCheck.cjs +1 -1
  73. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +94 -0
  74. package/src/main/lib/prd/prdCreate.cjs +48 -5
  75. package/src/main/lib/prd/prdFrontmatter.cjs +5 -2
  76. package/src/main/lib/prd/prdMcpReachWarnings.cjs +44 -0
  77. package/src/main/lib/prd/prdSandboxWarnings.cjs +49 -0
  78. package/src/main/lib/process/peerChatSession.cjs +165 -0
  79. package/src/main/lib/project-pages/videoScriptPress.cjs +6 -0
  80. package/src/main/lib/project-pages/videoScriptRunRoute.cjs +24 -4
  81. package/src/main/lib/promptSessionSchema.cjs +2 -0
  82. package/src/main/lib/scheduler/baselineGate.cjs +31 -2
  83. package/src/main/lib/scheduler/planRecordHarvest.cjs +104 -12
  84. package/src/main/lib/scheduler/planReleaseRoute.cjs +110 -0
  85. package/src/main/lib/scheduler/planReviewSchema.cjs +182 -0
  86. package/src/main/lib/scheduler/planReviewStats.cjs +63 -0
  87. package/src/main/lib/scheduler/planReviewStore.cjs +128 -0
  88. package/src/main/lib/scheduler/sandboxEnvironmentLimit.cjs +141 -0
  89. package/src/main/lib/scheduler/scheduleJobSchema.cjs +2 -0
  90. package/src/main/lib/scheduler/upgradeDrain.cjs +32 -5
  91. package/src/main/lib/scheduler/validatorVerdictSchema.cjs +12 -2
  92. package/src/main/lib/tasks/memoryConsolidation.cjs +109 -37
  93. package/src/main/lib/tasks/taskAdminRoutes.cjs +26 -14
  94. package/src/main/lib/tasks/taskRun.cjs +3 -1
  95. package/src/main/lib/tasks/weeklyConsolidationInputs.cjs +178 -0
  96. package/src/main/projectPages.cjs +22 -14
  97. package/src/main/pty.cjs +3 -0
  98. package/src/main/runVerify.cjs +3 -2
  99. package/src/main/scheduler/planReviewHold.cjs +140 -0
  100. package/src/main/scheduler/prdParser.cjs +1 -0
  101. package/src/main/scheduler/reviewLadder.cjs +2 -0
  102. package/src/main/scheduler/utilizationHold.cjs +7 -2
  103. package/src/main/scheduler.cjs +532 -78
  104. package/src/main/seedAgentPersonas.cjs +11 -6
  105. package/src/main/seedStatus.cjs +1 -1
  106. package/src/main/templates/PRD_AUTHORING.md +16 -1
  107. package/src/main/webRemote.cjs +47 -7
  108. package/src/preload/api.d.ts +71 -1
  109. package/src/preload/apiSurface.json +28 -0
  110. package/src/preload/index.cjs +9 -0
  111. package/src/seed/agents/architect.md +28 -43
  112. package/src/seed/agents/dev-lead.md +3 -1
  113. package/src/seed/agents/md-network-curator.md +27 -0
  114. package/src/seed/agents/plan-reviewer.md +47 -0
  115. package/src/seed/agents/validator.md +2 -1
  116. package/dist/assets/AppSettings-BO4jDVGO.js +0 -2
  117. package/dist/assets/HomeClaudeConfig-DADP5bfn.js +0 -3
  118. package/dist/assets/ProjectClaudeConfig-DPnDJKcr.js +0 -26
  119. package/dist/assets/Scheduler-CNLjn90m.js +0 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-session-manager",
3
- "version": "0.143.0",
3
+ "version": "0.144.0",
4
4
  "description": "Free desktop app for Claude Code: run many sessions, each in its own git worktree; queue work that runs headless within your usage limits; agents drive it through an MCP server and skills.",
5
5
  "type": "module",
6
6
  "main": "src/main/index.cjs",
@@ -83,8 +83,10 @@
83
83
  "lint:page-stewards": "node scripts/check-page-stewards.cjs",
84
84
  "lint:e2e-budget": "node scripts/check-e2e-budget.cjs",
85
85
  "lint:scroll": "node scripts/check-scroll-into-view.cjs",
86
+ "lint:persona-gear": "node scripts/lint-persona-gear.cjs",
87
+ "report:loadouts": "node scripts/report-persona-loadouts.cjs",
86
88
  "check:frame": "node scripts/frame-integrity.mjs",
87
- "lint": "npm run lint:selectors && npm run lint:hooks && npm run lint:docs && npm run lint:paths && npm run lint:status-writes && npm run lint:event-log && npm run lint:any && npm run lint:main-ts-check && npm run lint:filenames && npm run lint:renderer-storage && npm run lint:test-smells && npm run lint:page-stewards && npm run lint:e2e-budget && npm run lint:scroll && npm run lint:readme",
89
+ "lint": "npm run lint:selectors && npm run lint:hooks && npm run lint:docs && npm run lint:paths && npm run lint:status-writes && npm run lint:event-log && npm run lint:any && npm run lint:main-ts-check && npm run lint:filenames && npm run lint:renderer-storage && npm run lint:test-smells && npm run lint:page-stewards && npm run lint:e2e-budget && npm run lint:scroll && npm run lint:readme && npm run lint:persona-gear",
88
90
  "sync:settings-schema": "node scripts/sync-settings-schema.cjs"
89
91
  },
90
92
  "keywords": [
@@ -32,9 +32,9 @@ new work. **report** = your final message to the human.
32
32
  human settles that code is wanted. An Epic with no tag (No mission) is treated like `discussion`.
33
33
  If `developLoop` is `false`, do not author PRDs (the API refuses them): tell the human this
34
34
  session was started without the develop loop and a new session with it on is needed to queue work. Stop.
35
- 3. **Never hand-implement in this session**, even when the plan is agreed. Why: this session
36
- runs an expensive planner model; a cheaper executor runs each PRD as a headless `claude -p`
37
- job.
35
+ 3. **Never hand-implement a PRD's work in this session**, even when the plan is agreed. Work
36
+ small enough to do inline (the Actor persona's lane rule) never becomes a PRD. Why: this
37
+ session runs an expensive planner model; a cheaper executor runs each PRD headless.
38
38
  4. **Never delegate PRD authoring.** You write scope, title, goal, criteria and notes. Calling
39
39
  `scheduler_create_prd` with your own text is not delegation.
40
40
  5. **Never restate the engineering rules.** They live in `standards.md` beside this file, with
@@ -110,11 +110,9 @@ three failure modes have different fixes:
110
110
  (empty, max, concurrent, malformed, permission, failure); interaction effects (what depends
111
111
  on your change); integration (reuse the existing schema, store, API, primitives);
112
112
  validation (for UI: which screenshot, light and dark, proves which criterion).
113
- 4. **Run a completeness pass** if the ask exceeds one or two PRDs or spans subsystems: start it as a
114
- background sub-agent as soon as the draft list exists (Explore or general-purpose; the ask
115
- verbatim, your draft list, the lenses; ask what is missing) and keep exploring while it runs.
116
- The planner turn is hard-killed at 30 minutes with a warning at 24; late gaps become sibling
117
- PRDs. Fold in real gaps, drop vague ones. Repeat at most once. It reviews; you author.
113
+ 4. **Plans of 3+ PRDs, or any chain, are held for an independent plan review before dispatch**
114
+ (`held: plan-review`). `SM_PLAN_REVIEW=0` is off;
115
+ `SM_PLAN_REVIEW_HOLD_MINUTES` is the timeout.
118
116
  5. **Tests and security go inside the feature's own PRD** as criteria (security when it
119
117
  touches input, auth or data), never as follow-ups. Why: TDD needs the test with the code;
120
118
  security is decided while writing it. Also check quality (performance, error handling).
@@ -126,8 +124,8 @@ three failure modes have different fixes:
126
124
  `manual.json`. Why: a release never finds a gap it can only report.
127
125
  6. **Pick a shape.** Most asks are an independent set. Chain 3–5 PRDs only for truly
128
126
  sequential work: each link `dependsOn` the previous one; its notes name what that link
129
- delivers and say to read the landed code first. Never chain past 5; redo the completeness
130
- pass. Each goal's first sentence names its type, in chain order: `primitive` (new helper
127
+ delivers and say to read the landed code first. Never chain past 5; re-split the plan.
128
+ Each goal's first sentence names its type, in chain order: `primitive` (new helper
131
129
  and its test), `wire` (adopt it at named call sites), `behavior` (one function's logic and
132
130
  its test), `migration` (mechanical change), `doc`, `validate`. A gap you leave out of the
133
131
  first plan is queued in the same turn as a later wave that `dependsOn` the PRDs it builds
@@ -165,7 +163,7 @@ three failure modes have different fixes:
165
163
  change a PRD only to silence a warning. Then post one short message: each PRD's number and
166
164
  slug, the validate slug, and that no per-PRD check will come from this session. Name a
167
165
  warning only if you changed a PRD because of it.
168
- 13. **Never stop for review after queueing.** Why: the validator is the review.
166
+ 13. **Never stop for review after queueing.** Why: the plan reviewer reviews before dispatch and the validator after.
169
167
 
170
168
  ### PRD fields
171
169
 
@@ -246,7 +244,7 @@ scheduler saves it as `session-manager-operations/plan-records/<epic-id>/<valida
246
244
  `GET /admin/epic` serves it as `verdicts`. Queue the validate PRD in the same `scheduler_create_prds` call as the plan (its `dependsOn` may name that call's entries); with single creates it goes last: in a single `scheduler_create_prd`, `dependsOn` accepts only slugs that already exist. The
247
245
  scheduler sends no per-PRD validation prompt. When the Epic has no pending or running PRD for
248
246
  `SM_EPIC_SETTLE_SECONDS` (default 120), it queues one `validate-sweep-*` validator for completed
249
- PRDs no validator checked (a large sweep becomes several sweeps in turn), then sends one PLAN SETTLED digest. Several validators in one Epic
247
+ PRDs no validator checked (a large sweep becomes several sweeps in turn), then sends one PLAN SETTLED digest. PRDs held on a precondition, and validators waiting only on them, do not hold back the digest, which lists them. Several validators in one Epic
250
248
  are fine: each runs headless.
251
249
 
252
250
  If the API rejects `agentType: "validator"`, the persona is not installed: keep the plan
@@ -299,7 +297,10 @@ Rules:
299
297
  under Needs you (rule 6) with the validator's reason and what was tried. Why: a second miss on the same criterion means the plan is wrong, and another
300
298
  wave would repeat it. A Not validated list means validate exactly those PRDs here. All
301
299
  `VERIFIED` with nothing open means Done: write the final report.
302
- 3. **A `PRECONDITION HOLD` notice** is not a park and not a fix-wave trigger. Do nothing — no
300
+ 3. **A PLAN REVIEWED digest.** Apply amendments via `scheduler_update_prd`, give a one-line
301
+ reason per rejected finding, then release with one `scheduler_release_plan` call
302
+ (`rereview` only after a block, once).
303
+ 4. **A `PRECONDITION HOLD` notice** is not a park and not a fix-wave trigger. Do nothing — no
303
304
  reset, no edit, no fix PRD; the scheduler re-checks the preflight on its own. State the
304
305
  missing precondition in the report. Why: only a person can supply it.
305
306
  4. **Done** = the latest validator marked every PRD `VERIFIED`, including each PRD an earlier
@@ -7,7 +7,7 @@ description: >-
7
7
  place, with nothing stale. Use when the user asks to review, audit, clean up,
8
8
  restructure or drift-check a project's CLAUDE.md or docs, when the Review MD
9
9
  network macro runs, or says "/maintaining-md-network". Takes a Scope and a
10
- Mode (Full review or Drift check).
10
+ Mode (Full review, Drift check or Weekly consolidation).
11
11
  ---
12
12
 
13
13
  # maintaining-md-network
@@ -17,7 +17,7 @@ description: >-
17
17
  ## Inputs
18
18
 
19
19
  - **Scope:** a folder, or the whole project (default).
20
- - **Mode:** Full review or Drift check.
20
+ - **Mode:** Full review, Drift check or Weekly consolidation.
21
21
 
22
22
  ## Rule
23
23
 
@@ -40,6 +40,7 @@ Each is one level deep; none links another, except audit.md's census step, which
40
40
  - [audit.md](audit.md): read for steps 1-4 (census, audiences, links, truth check), the time box and the subagent brief.
41
41
  - [plan.md](plan.md): read for the report contents, verdicts, history and runtime state, the `/develop` order and cross-repo routing.
42
42
  - [drift-check.md](drift-check.md): read for Drift check mode, running the script and the review record.
43
+ - [weekly-consolidation.md](weekly-consolidation.md): read for Weekly consolidation mode: inputs, change kinds, caps, the record and apply.
43
44
  - [migrate-to-agents-md.md](migrate-to-agents-md.md): read when moving a project's CLAUDE.md text into AGENTS.md.
44
45
 
45
46
  The script is `<skill base dir>/scripts/drift-check.cjs`.
@@ -70,3 +71,16 @@ Drift check
70
71
  - [ ] Report findings; change no files until approved
71
72
  - [ ] After approval, fix with /develop and write a new review record (drift-check.md)
72
73
  ```
74
+
75
+ ## Weekly consolidation
76
+
77
+ Copy this checklist and tick it off:
78
+
79
+ ```
80
+ Weekly consolidation
81
+ - [ ] Look for a pending weekly Task record; walk it if found (weekly-consolidation.md)
82
+ - [ ] Else gather memory, network, transcripts, Lessons blocks, steering file
83
+ - [ ] Subagents find patterns; keep those seen in 2+ sessions
84
+ - [ ] Write the record: verify, organize, enrich changes plus housekeeping
85
+ - [ ] Owner accepts or rejects each change; apply only accepted ones, commit the record
86
+ ```
@@ -0,0 +1,87 @@
1
+ # Weekly consolidation
2
+
3
+ ## Contents
4
+
5
+ - [Inputs](#inputs)
6
+ - [Read-only](#read-only)
7
+ - [Orchestrator and subagents](#orchestrator-and-subagents)
8
+ - [Change kinds](#change-kinds)
9
+ - [Keep learnings few](#keep-learnings-few)
10
+ - [Housekeeping](#housekeeping)
11
+ - [The record](#the-record)
12
+ - [Apply](#apply)
13
+ - [Steering file](#steering-file)
14
+
15
+ One out-of-band pass that curates the markdown network and the project's auto memory together, fed by the week's session transcripts. It proposes; the owner accepts one change at a time.
16
+
17
+ ## Inputs
18
+
19
+ - The project's auto memory folder: `~/.claude/projects/<slug>/memory`.
20
+ - Its markdown network (the census in audit.md).
21
+ - Its own session transcripts since the previous consolidation: the project root's transcript folder plus the folders of its Epic and job worktrees. Never another project's.
22
+ - The Lessons blocks headless jobs handed over in that window.
23
+ - The optional steering file (see Steering file).
24
+
25
+ Read tool calls and tool errors, not only messages. A tool call that keeps failing is a main signal.
26
+
27
+ ## Read-only
28
+
29
+ The pass changes nothing live. As the scheduled Task it has only read tools. When a human presses the macro, research and report first and change no file until accepted (SKILL.md's Rule). The memory law holds: upkeep proposes, never deletes. A removal is applied only after the owner's accept.
30
+
31
+ ## Orchestrator and subagents
32
+
33
+ 1. One subagent per transcript, or per small batch (about 5), returns candidate patterns. Each carries the session id(s) it was seen in.
34
+ 2. The orchestrator keeps only patterns seen in at least 2 sessions. A pattern seen in fewer produces no change.
35
+
36
+ ## Change kinds
37
+
38
+ Each kept pattern becomes ONE change of one kind:
39
+
40
+ - **verify:** a memory or doc line no longer true is fixed or removed.
41
+ - **organize:** duplicates are merged; a lasting fact moves from memory into the doc that owns it (placement.md).
42
+ - **enrich:** a missing lesson is added.
43
+
44
+ ## Keep learnings few
45
+
46
+ - At most 5 enrich adds per run.
47
+ - Merges and removals are unlimited.
48
+ - Prefer pruning.
49
+
50
+ ## Housekeeping
51
+
52
+ Always proposed, outside the cap:
53
+
54
+ - Older dated usage-reviewer statuses in memory are removed, so only the newest per report remains.
55
+ - Every memory file missing `originSessionId` or `modified` in its frontmatter metadata gets them filled. Take `originSessionId` from the transcript that wrote the file when known.
56
+
57
+ No write log, no hash, no hook.
58
+
59
+ ## The record
60
+
61
+ Template:
62
+
63
+ ```
64
+ # Markdown network weekly consolidation <YYYY-MM-DD>
65
+
66
+ - Transcripts read: <count>, <first date> to <last date>
67
+ - Lessons blocks consumed: <job/PRD ids, or none>
68
+ - Totals: adds N, merges N, removals N
69
+
70
+ | Id | Kind | Target file | Change | Example sessions | Count |
71
+ | --- | --- | --- | --- | --- | --- |
72
+ | c1 | verify / organize / enrich | <path> | <the change> | <id>, <id> | <N, at least 2> |
73
+ ```
74
+
75
+ Every row names at least 2 session ids.
76
+
77
+ ## Apply
78
+
79
+ 1. The owner accepts or rejects each change. Only accepted changes are applied.
80
+ 2. The architect applies them in the Epic the owner opened with the macro: memory edits inline; doc changes inline when small and provable, otherwise `/develop`.
81
+ 3. Commit the record as session-manager-operations/reviews/docs/<YYYY-MM-DD>-md-network-weekly.md, following the record rules in drift-check.md.
82
+
83
+ When pressed with Mode 'Weekly consolidation', first look for the newest pending weekly Task (`task_list` with pipeline memory-consolidation, then `task_get` for its output) and walk its record. If none is pending, run the pass in the Epic.
84
+
85
+ ## Steering file
86
+
87
+ Optional: session-manager-operations/md-network/steering.md. A human writes it and tracks it in git; it says what the owner thinks matters and does not. Read it as a plain file. No code reads it through `opsPath()`, so it needs no `opsOwnership.cjs` entry and no ops AGENTS.md owners row (it has no owning writer; the folder is human-authored). If code ever reads it through `opsPath()`, add the entry and the row then.
package/scripts/README.md CHANGED
@@ -32,7 +32,7 @@ scripts/lib was moved into src/main/lib (2026-09); nothing under src/ may requir
32
32
  | ops-sweep.cjs | manual; `node scripts/ops-sweep.cjs <cwd>` | yes |
33
33
  | postinstall.cjs | npm `postinstall` | yes |
34
34
  | purge-dry-run.cjs | manual / validators, read-only; `node scripts/purge-dry-run.cjs <cwd> <epicId>` prints `purgeEpic({ dryRun: true })` JSON (artifacts by kind + counts), deletes nothing; a real purge stays the epic:purge IPC | no |
35
- | release-notes.cjs | `.github/workflows/release.yml` finalize-release job, and manual; `node scripts/release-notes.cjs --tag <ref> [--prev <tag>]` prints the GitHub release body (upgrade note from the tag tree + commit subjects since prev) — convention in [release-notes/README.md](../release-notes/README.md) | no |
35
+ | release-notes.cjs | `.github/workflows/release.yml` finalize-release job, and manual; `node scripts/release-notes.cjs --tag <ref> [--prev <tag>] [--max-chars <n>]` prints the GitHub release body (upgrade note from the tag tree, its relative links made github.com blob URLs at `<ref>` and its headings demoted two levels, + commit subjects since prev); `--max-chars` = positive integer body cap (default 120000), anything else exits 1 — convention in [release-notes/README.md](../release-notes/README.md) | no |
36
36
  | refresh-vad-assets.mjs | `npm run refresh:vad-assets` | no |
37
37
  | replay-verdicts.cjs | manual, dev-only, read-only | no |
38
38
  | scheduler-mcp-server.cjs | registered as an MCP server (`seedSchedulerMcp.cjs`, `send-feedback` SKILL.md) | yes |
@@ -78,6 +78,7 @@ const { MCP_TOOL_CATALOG, MCP_RECIPES, composeDescription, FIXES_INPUT_SCHEMA }
78
78
  const {
79
79
  FEEDBACK_LIST_PROJECTS_INPUT_SCHEMA, FEEDBACK_OPEN_SESSION_INPUT_SCHEMA, MACRO_LIST_INPUT_SCHEMA, EPIC_GET_INPUT_SCHEMA,
80
80
  } = require('../src/main/lib/feedback-remote/serviceMcpTools.cjs');
81
+ const { SERVICE_TOOL_NAMES } = require('../src/main/lib/feedback-remote/servicePairings.cjs');
81
82
  const { EPIC_OUTSIDE_STATES } = require('../src/main/lib/epic/epicOutsideState.cjs');
82
83
  const { KINDS: ARTIFACT_KINDS } = require('../src/main/lib/epic/artifactStore.cjs');
83
84
  const { REVIEW_TEXT_MAX, REVIEW_IMAGES_MAX, REVIEW_IMAGE_BYTES_MAX } = require('../src/main/lib/project-pages/videoReview.cjs');
@@ -693,6 +694,30 @@ const TOOLS = [
693
694
  required: ['prds'],
694
695
  },
695
696
  },
697
+ {
698
+ name: 'scheduler_release_plan',
699
+ description: descriptionFor('scheduler_release_plan'),
700
+ inputSchema: {
701
+ type: 'object',
702
+ properties: {
703
+ epicId: { type: 'string', description: 'The Epic id the plan belongs to.' },
704
+ validateSlug: { type: 'string', description: "The plan's validate PRD slug." },
705
+ accepted: { type: 'number', description: 'How many review findings you accepted.' },
706
+ rejected: {
707
+ type: 'array',
708
+ description: 'Each rejected finding with a one-line reason (reason must be non-empty).',
709
+ items: {
710
+ type: 'object',
711
+ properties: { finding: { type: 'string' }, reason: { type: 'string' } },
712
+ required: ['finding', 'reason'],
713
+ },
714
+ },
715
+ rereview: { type: 'boolean', description: 'Instead of releasing, request the single re-review after a block (once per plan).' },
716
+ cwd: { type: 'string', description: 'Optional: project cwd; defaults to this process cwd.' },
717
+ },
718
+ required: ['epicId', 'validateSlug'],
719
+ },
720
+ },
696
721
  {
697
722
  name: 'scheduler_list_prds',
698
723
  description: descriptionFor('scheduler_list_prds'),
@@ -965,6 +990,25 @@ const TOOLS = [
965
990
  description: descriptionFor('feedback_open_session'),
966
991
  inputSchema: FEEDBACK_OPEN_SESSION_INPUT_SCHEMA,
967
992
  },
993
+ {
994
+ name: 'service_pair_local',
995
+ description: descriptionFor('service_pair_local'),
996
+ inputSchema: {
997
+ type: 'object',
998
+ properties: {
999
+ stateDir: { type: 'string', description: 'Absolute path of the directory where the service keeps its pairing state.' },
1000
+ name: { type: 'string', description: 'Display name of the service.' },
1001
+ homeCwd: { type: 'string', description: 'Absolute path of the service\'s home project.' },
1002
+ tools: {
1003
+ type: 'array', minItems: 1,
1004
+ items: { type: 'string', enum: [...SERVICE_TOOL_NAMES] },
1005
+ description: 'The Session Manager tools the service may call.',
1006
+ },
1007
+ projectRoot: { type: 'string', description: 'Optional: the service\'s project root.' },
1008
+ },
1009
+ required: ['stateDir', 'name', 'homeCwd', 'tools'],
1010
+ },
1011
+ },
968
1012
  {
969
1013
  name: 'feedback_reply',
970
1014
  description: descriptionFor('feedback_reply'),
@@ -2025,6 +2069,8 @@ async function handleCallTool(request) {
2025
2069
  if (issueLines) {
2026
2070
  text += `\nFix these fields and call again:\n${issueLines.join('\n')}`;
2027
2071
  }
2072
+ // A refusal wrote nothing: return it as an error like scheduler_create_prds does.
2073
+ if (result?.ok === false) return errorResult(text);
2028
2074
  return { content: [{ type: 'text', text }] };
2029
2075
  }
2030
2076
  if (name === 'scheduler_create_prds') {
@@ -2071,6 +2117,21 @@ async function handleCallTool(request) {
2071
2117
  }
2072
2118
  return { content: [{ type: 'text', text }] };
2073
2119
  }
2120
+ if (name === 'scheduler_release_plan') {
2121
+ const refusal = headlessQueueRefusal('scheduler_release_plan');
2122
+ if (refusal) return refusal;
2123
+ const body = {
2124
+ cwd: typeof args?.cwd === 'string' && args.cwd ? args.cwd : process.cwd(),
2125
+ epicId: args?.epicId,
2126
+ validateSlug: args?.validateSlug,
2127
+ rejected: Array.isArray(args?.rejected) ? args.rejected : [],
2128
+ accepted: typeof args?.accepted === 'number' ? args.accepted : 0,
2129
+ ...(args?.rereview === true ? { rereview: true } : {}),
2130
+ };
2131
+ const result = await adminRequest('POST', '/admin/scheduler/release-plan', body);
2132
+ if (result?.ok === false) return errorResult(`scheduler_release_plan refused: ${result.reason ?? result.error ?? JSON.stringify(result)}`);
2133
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
2134
+ }
2074
2135
  if (name === 'feedback_list_projects') {
2075
2136
  const result = await adminRequest('GET', '/admin/feedback/targets');
2076
2137
  return { content: [{ type: 'text', text: JSON.stringify(result) }] };
@@ -2121,6 +2182,22 @@ async function handleCallTool(request) {
2121
2182
  }
2122
2183
  return { content: [{ type: 'text', text: JSON.stringify(result) + note }] };
2123
2184
  }
2185
+ if (name === 'service_pair_local') {
2186
+ const refused = humanSessionRefusal('refused: service_pair_local runs only in a Session Manager chat or terminal session where the human asked for the pairing; '
2187
+ + 'say in your final result which service the human should pair.');
2188
+ if (refused) return refused;
2189
+ if (process.env.SM_KG_INTERNAL === '1') return errorResult('refused: service_pair_local is not available to internal headless runs.');
2190
+ for (const key of ['stateDir', 'name', 'homeCwd']) {
2191
+ if (!args || typeof args[key] !== 'string' || !args[key].trim()) return errorResult(`missing required argument: ${key}`);
2192
+ }
2193
+ if (!path.isAbsolute(args.stateDir)) return errorResult('stateDir must be an absolute path');
2194
+ if (!Array.isArray(args.tools) || args.tools.length === 0) return errorResult('missing required argument: tools');
2195
+ const opts = { stateDir: args.stateDir, name: args.name, homeCwd: args.homeCwd, tools: args.tools };
2196
+ if (typeof args.projectRoot === 'string' && args.projectRoot.trim()) opts.projectRoot = args.projectRoot;
2197
+ const r = await require('../src/main/lib/feedback-remote/serviceStdioBridge.cjs').pairLocal(opts);
2198
+ if (!r || r.ok !== true) return errorResult(String((r && r.error) || 'pairing failed'));
2199
+ return { content: [{ type: 'text', text: JSON.stringify({ ok: true, service: r.service }) }] };
2200
+ }
2124
2201
  if (name === 'feedback_reply') {
2125
2202
  // Only the Epic's own interactive session can reply: a scheduled job has
2126
2203
  // no chat identity, and its work is reported in its result instead.
@@ -14,6 +14,8 @@ function registerAppAdminRoutes(adminHttp, deps = {}) {
14
14
  scheduler.registerAdminRoutes(adminHttp);
15
15
  // GET/POST /admin/scheduler/slots — read the slot cap; change it only on the human's verified words.
16
16
  require('./lib/scheduler/slotsRoute.cjs').registerSlotsRoute(adminHttp);
17
+ // POST /admin/scheduler/release-plan — the planner releases a plan held for review (or asks one re-review).
18
+ require('./lib/scheduler/planReleaseRoute.cjs').registerPlanReleaseRoute(adminHttp);
17
19
  // GET /admin/usage-hold — the 'pause above' hold POST /admin/tasks refuses on, for runners that start claude -p directly (read-only).
18
20
  require('./lib/scheduler/usageHoldRoute.cjs').registerUsageHoldRoute(adminHttp);
19
21
  require('./lib/prd/prdCreate.cjs').registerAdminRoute(adminHttp, scheduler.remote);
@@ -43,6 +45,10 @@ function registerAppAdminRoutes(adminHttp, deps = {}) {
43
45
  // several projects' operations roots open, so it performs the cross-folder
44
46
  // write (lib/feedback-remote/crossProjectFeedback.cjs).
45
47
  require('./lib/feedback-remote/crossProjectFeedback.cjs').registerAdminRoute(adminHttp);
48
+ // POST /admin/projects/create — a paired service's new local (+ private GitHub) project; broadcasts `projects:created`.
49
+ require('./lib/feedback-remote/projectCreate.cjs').registerAdminRoute(adminHttp);
50
+ // POST /admin/services/pair-local[/confirm] — same-machine service pairing with no window step.
51
+ require('./lib/feedback-remote/servicePairLocalRoutes.cjs').registerAdminRoute(adminHttp);
46
52
  // Its return leg: the receiving session answers INTO the Epic that asked
47
53
  // (lib/feedback-remote/crossProjectReply.cjs).
48
54
  require('./lib/feedback-remote/crossProjectReply.cjs').registerAdminRoute(adminHttp);
@@ -24,15 +24,21 @@ const os = require('node:os');
24
24
  const { splitFrontmatter } = require('./lib/prd/prdFrontmatter.cjs');
25
25
  const { resolveMergedPersona, PERSONA_NAME_RE } = require('./lib/persona-macro/personaMerge.cjs');
26
26
  const { isNonClaudeAgentCli, isAgentCliModel } = require('./lib/agent-cli/agentCliEvents.cjs');
27
+ const { loadoutState, encodeLoadout } = require('./lib/persona-macro/personaLoadout.cjs');
28
+ const { mcpServersFromTools } = require('./lib/claude/agentSnapshot.cjs');
29
+ const { personaUpgradeFor, readDismissals } = require('./lib/persona-macro/personaUpgrade.cjs');
27
30
  const configMgr = require('./config.cjs');
28
31
  const sessionsStore = require('./sessionsStore.cjs');
29
32
 
30
33
  /** Parses the frontmatter `tools` field ("Read, Grep, Glob, Bash") into a list. */
31
34
  function parseTools(raw) {
32
35
  if (!raw) return [];
33
- return raw.split(',').map((t) => t.trim()).filter(Boolean);
36
+ return raw.split(',').map((t) => t.trim()).filter((t) => t && t !== '[]');
34
37
  }
35
38
 
39
+ /** Explicit-empty marker for a gear list: `mcpServers: []` / `packs: []` = replace with none. */
40
+ const EMPTY_LIST_ENCODING = '[]';
41
+
36
42
  /**
37
43
  * A declared-capability frontmatter value (`mcpServers:` / `packs:`) as a
38
44
  * list: a comma string ("a, b") or a string list (structured callers).
@@ -46,7 +52,7 @@ function parseCapabilityList(raw) {
46
52
  for (const it of items) {
47
53
  if (typeof it !== 'string') continue;
48
54
  const v = it.trim();
49
- if (v && !out.includes(v)) out.push(v);
55
+ if (v && v !== EMPTY_LIST_ENCODING && !out.includes(v)) out.push(v);
50
56
  }
51
57
  return out;
52
58
  }
@@ -125,10 +131,12 @@ function extractUnmanagedLines(raw, managed) {
125
131
  return out;
126
132
  }
127
133
 
128
- function serializePersona({ name, description, tools, model, effort, color, tags, projects, action, actionLabel, title, seedVersion, executorOnly, agentCli, agentCliModel, mcpServers, packs, environment, body, preservedLines }) {
134
+ function serializePersona({ name, description, tools, loadout, model, effort, color, tags, projects, action, actionLabel, title, seedVersion, executorOnly, agentCli, agentCliModel, mcpServers, packs, environment, body, preservedLines }) {
129
135
  const lines = ['---', `name: ${name}`];
130
136
  if (description) lines.push(`description: ${description}`);
131
- if (tools && tools.length) lines.push(`tools: ${tools.join(', ')}`);
137
+ // `loadout` (bare/unbound/equipped/undecided) wins; absent, `tools` is the decision (['*'] = unbound).
138
+ const toolsValue = loadout ? encodeLoadout(loadout, tools) : (tools && tools.length ? tools.join(', ') : null);
139
+ if (toolsValue) lines.push(`tools: ${toolsValue}`);
132
140
  if (model && model !== 'inherit') lines.push(`model: ${model}`);
133
141
  if (effort && effort !== 'inherit') lines.push(`effort: ${effort}`);
134
142
  if (isNonClaudeAgentCli(agentCli)) {
@@ -144,8 +152,8 @@ function serializePersona({ name, description, tools, model, effort, color, tags
144
152
  if (title) lines.push(`title: ${title}`);
145
153
  if (typeof seedVersion === 'number' && Number.isFinite(seedVersion)) lines.push(`seedVersion: ${seedVersion}`);
146
154
  if (executorOnly === true) lines.push('executorOnly: true');
147
- if (Array.isArray(mcpServers) && mcpServers.length) lines.push(`mcpServers: ${mcpServers.join(', ')}`);
148
- if (Array.isArray(packs) && packs.length) lines.push(`packs: ${packs.join(', ')}`);
155
+ if (Array.isArray(mcpServers)) lines.push(`mcpServers: ${mcpServers.length ? mcpServers.join(', ') : EMPTY_LIST_ENCODING}`);
156
+ if (Array.isArray(packs)) lines.push(`packs: ${packs.length ? packs.join(', ') : EMPTY_LIST_ENCODING}`);
149
157
  if (typeof environment === 'string' && environment.trim()) lines.push(`environment: ${environment.trim()}`);
150
158
  if (Array.isArray(preservedLines) && preservedLines.length) lines.push(...preservedLines);
151
159
  lines.push('---', '');
@@ -179,10 +187,22 @@ async function findOpenProject(projectCwd, loadSessions) {
179
187
  return project;
180
188
  }
181
189
 
190
+ /** Frontmatter keys a project overlay may carry (everything else in an overlay is preserved verbatim). */
191
+ const OVERLAY_KEYS = new Set(['model', 'effort', 'tools', 'mcpServers', 'packs', 'environment']);
192
+
193
+ /** Throws when an overlay's managed lines fail the persona schema's per-key rules (a placeholder model stands in for the global one). */
194
+ function assertValidOverlayKeys(name, managedLines) {
195
+ const { validatePersonaFrontmatter } = require('./lib/persona-macro/personaFrontmatterSchema.cjs');
196
+ const fm = { ...splitFrontmatter(['---', ...managedLines, '---', ''].join('\n')).fm };
197
+ if (!('model' in fm) || fm.model === undefined) fm.model = 'sonnet';
198
+ const result = validatePersonaFrontmatter(fm);
199
+ if (!result.ok) throw new Error(`invalid project override for ${name}: ${result.errors.join('; ')}`);
200
+ }
201
+
182
202
  /**
183
203
  * Project OVERRIDE write: a frontmatter-only overlay at
184
204
  * `<projectCwd>/.claude/agents/<name>.md` carrying ONLY the overridden `model` /
185
- * `effort` keys and no body (lib/persona-macro/personaMerge.cjs inherits everything else
205
+ * `effort` / `tools` / `mcpServers` / `packs` / `environment` keys and no body (lib/persona-macro/personaMerge.cjs inherits everything else
186
206
  * from the global persona). `projectCwd` must be an OPEN project's cwd (see
187
207
  * findOpenProject). Keys already in an existing frontmatter-only
188
208
  * overlay are preserved; an existing overlay that has a BODY is refused so a
@@ -198,7 +218,7 @@ async function findOpenProject(projectCwd, loadSessions) {
198
218
  * unknown or empty `projectCwd` throws in findOpenProject first, so nothing is
199
219
  * registered for it.
200
220
  */
201
- async function saveOverlay({ name, projectCwd, model, effort, loadSessions, validatePath, writeTextAtomic, addAllowedRoot }) {
221
+ async function saveOverlay({ name, projectCwd, model, effort, tools, loadout, mcpServers, packs, environment, loadSessions, validatePath, writeTextAtomic, addAllowedRoot }) {
202
222
  const project = await findOpenProject(projectCwd, loadSessions);
203
223
  // Dormant tab = no pty-registered root; see JSDoc + projectBrief.cjs allowBriefWrites.
204
224
  addAllowedRoot(validatePath(project.cwd));
@@ -210,7 +230,7 @@ async function saveOverlay({ name, projectCwd, model, effort, loadSessions, vali
210
230
  if (existing.body.trim() !== '') {
211
231
  throw new Error(`${name} has a full-body override in ${project.name} — edit ${target} directly; it is not converted to a frontmatter-only override`);
212
232
  }
213
- preserved = extractUnmanagedLines(rawExisting, new Set(['model', 'effort']));
233
+ preserved = extractUnmanagedLines(rawExisting, OVERLAY_KEYS);
214
234
  } catch (e) {
215
235
  if (e.code !== 'ENOENT') throw e;
216
236
  }
@@ -218,6 +238,15 @@ async function saveOverlay({ name, projectCwd, model, effort, loadSessions, vali
218
238
  for (const [k, v] of [['model', model], ['effort', effort]]) {
219
239
  if (v && v !== 'inherit') managedLines.push(`${k}: ${v}`);
220
240
  }
241
+ // Gear keys REPLACE the global value for this project (personaMerge.cjs). Unset = no line = inherit.
242
+ // `tools: []` alone is the override call's dummy value, so Bare/Unbound need an explicit `loadout`.
243
+ const toolsValue = loadout ? encodeLoadout(loadout, tools) : (Array.isArray(tools) && tools.length ? encodeLoadout('equipped', tools) : null);
244
+ if (toolsValue) managedLines.push(`tools: ${toolsValue}`);
245
+ // An explicit [] is written as `[]` = replace the global value with none (personaMerge); undefined = inherit.
246
+ if (Array.isArray(mcpServers)) managedLines.push(`mcpServers: ${mcpServers.length ? mcpServers.join(', ') : EMPTY_LIST_ENCODING}`);
247
+ if (Array.isArray(packs)) managedLines.push(`packs: ${packs.length ? packs.join(', ') : EMPTY_LIST_ENCODING}`);
248
+ if (typeof environment === 'string' && environment.trim()) managedLines.push(`environment: ${environment.trim()}`);
249
+ if (managedLines.length) assertValidOverlayKeys(name, managedLines);
221
250
  if (managedLines.length === 0 && preserved.length === 0) {
222
251
  await removeOverride({ name, projectCwd: project.cwd, loadSessions, validatePath });
223
252
  return { ok: true, path: target, removed: true };
@@ -283,6 +312,7 @@ async function savePersona({
283
312
  mcpServers,
284
313
  packs,
285
314
  environment,
315
+ loadout,
286
316
  body,
287
317
  projectCwd,
288
318
  globalDir = path.join(os.homedir(), '.claude', 'agents'),
@@ -295,7 +325,7 @@ async function savePersona({
295
325
  throw new Error('agent name must be lowercase, hyphenated (e.g. "my-agent")');
296
326
  }
297
327
  if (projectCwd !== undefined) {
298
- return saveOverlay({ name, projectCwd, model, effort, loadSessions, validatePath, writeTextAtomic, addAllowedRoot });
328
+ return saveOverlay({ name, projectCwd, model, effort, tools, loadout, mcpServers, packs, environment, loadSessions, validatePath, writeTextAtomic, addAllowedRoot });
299
329
  }
300
330
  const target = validatePath(path.join(globalDir, `${name}.md`));
301
331
  // A caller that omits seedVersion/title/projects/action/actionLabel (the
@@ -341,7 +371,13 @@ async function savePersona({
341
371
  if (resolvedEnvironment === undefined && typeof fm.environment === 'string' && fm.environment.trim()) resolvedEnvironment = fm.environment.trim();
342
372
  } catch { /* no existing file (or unreadable) — nothing to carry over */ }
343
373
  }
344
- const text = serializePersona({ name, description, tools, model, effort, color, tags, projects: resolvedProjects, action: resolvedAction, actionLabel: resolvedActionLabel, title: resolvedTitle, seedVersion: resolvedSeedVersion, executorOnly: resolvedExecutorOnly, agentCli: resolvedAgentCli, agentCliModel: resolvedAgentCliModel, mcpServers: resolvedMcpServers, packs: resolvedPacks, environment: resolvedEnvironment, body, preservedLines });
374
+ // One write: mcpServers = caller's/carried servers ∪ servers named by mcp__<server>__<tool> tools
375
+ // (a server with no tool of its own is a whole-server grant and is kept).
376
+ const derivedServers = mcpServersFromTools(tools);
377
+ if (derivedServers.length) {
378
+ resolvedMcpServers = [...new Set([...(Array.isArray(resolvedMcpServers) ? resolvedMcpServers : []), ...derivedServers])];
379
+ }
380
+ const text = serializePersona({ name, description, tools, loadout, model, effort, color, tags, projects: resolvedProjects, action: resolvedAction, actionLabel: resolvedActionLabel, title: resolvedTitle, seedVersion: resolvedSeedVersion, executorOnly: resolvedExecutorOnly, agentCli: resolvedAgentCli, agentCliModel: resolvedAgentCliModel, mcpServers: resolvedMcpServers, packs: resolvedPacks, environment: resolvedEnvironment, body, preservedLines });
345
381
  assertValidPersonaText(name, text, preservedLines);
346
382
  await writeTextAtomic(target, text);
347
383
  if (originalName && originalName !== name) {
@@ -432,6 +468,7 @@ async function listPersonas({
432
468
  globalDir = path.join(os.homedir(), '.claude', 'agents'),
433
469
  loadSessions = sessionsStore.load,
434
470
  validatePath = configMgr.validatePath,
471
+ upgradeDeps,
435
472
  } = {}) {
436
473
  let files;
437
474
  try {
@@ -443,6 +480,7 @@ async function listPersonas({
443
480
 
444
481
  const projects = await openProjects({ loadSessions });
445
482
  const personas = [];
483
+ const dismissals = upgradeDeps?.dismissals ?? readDismissals();
446
484
 
447
485
  for (const file of files.sort()) {
448
486
  const fallbackName = file.replace(/\.md$/, '');
@@ -488,10 +526,20 @@ async function listPersonas({
488
526
 
489
527
  const trimmedCli = typeof fm.agentCli === 'string' ? fm.agentCli.trim() : '';
490
528
  const listedCli = isNonClaudeAgentCli(trimmedCli) ? trimmedCli : null;
529
+ let upgrade = null;
530
+ try {
531
+ upgrade = personaUpgradeFor(fallbackName, text, { ...upgradeDeps, dismissals }) ?? null;
532
+ } catch {
533
+ upgrade = null;
534
+ }
491
535
  personas.push({
492
536
  name: fm.name || fallbackName,
493
537
  description: fm.description || null,
494
538
  tools: parseTools(fm.tools),
539
+ loadout: loadoutState(fm),
540
+ mcpServers: parseCapabilityList(fm.mcpServers),
541
+ packs: parseCapabilityList(fm.packs),
542
+ environment: typeof fm.environment === 'string' && fm.environment.trim() ? fm.environment.trim() : null,
495
543
  model: fm.model || null,
496
544
  effort: fm.effort || null,
497
545
  color: fm.color || null,
@@ -508,6 +556,7 @@ async function listPersonas({
508
556
  body: body.trim(),
509
557
  overridingProjects,
510
558
  overrideDetails,
559
+ upgrade,
511
560
  });
512
561
  }
513
562
 
@@ -8,6 +8,7 @@
8
8
 
9
9
  const { schemas, validated } = require('./ipcSchemas.cjs');
10
10
  const agentLibrary = require('./agentLibrary.cjs');
11
+ const personaUpgrade = require('./lib/persona-macro/personaUpgrade.cjs');
11
12
  const agentModelResolve = require('./lib/claude/agentModelResolve.cjs');
12
13
  const agentEffortResolve = require('./lib/claude/agentEffortResolve.cjs');
13
14
  const { resolveEffectiveModelInfo } = require('./lib/claude/effectiveModelInfo.cjs');
@@ -51,6 +52,16 @@ function registerAgentsHandlers({ ipcMain, getWindow }) {
51
52
  broadcastAgentsChanged();
52
53
  return result;
53
54
  }));
55
+ ipcMain.handle('agents:take-bundled-persona', validated(schemas.agentsTakeBundledPersona, async ({ name }) => {
56
+ const result = await personaUpgrade.takeBundledPersona(name);
57
+ broadcastAgentsChanged();
58
+ return result;
59
+ }));
60
+ ipcMain.handle('agents:dismiss-persona-upgrade', validated(schemas.agentsDismissPersonaUpgrade, async ({ name, bundledVersion }) => {
61
+ const result = await personaUpgrade.dismissPersonaUpgrade(name, bundledVersion);
62
+ broadcastAgentsChanged();
63
+ return result;
64
+ }));
54
65
  // New Epic AIM composer (epicIntake.ts's `agentBody`/`agentPath`): unlike
55
66
  // list-personas above (global dir only), this honors the project-overlay-
56
67
  // then-global precedence so an Epic's opening prompt carries the persona
@@ -77,6 +88,14 @@ function registerAgentsHandlers({ ipcMain, getWindow }) {
77
88
  // (cwd, agentType). Read-only observer; never affects what a launch resolves.
78
89
  ipcMain.handle('agents:resolve-model-info', validated(schemas.agentsResolveModelInfo, (payload) =>
79
90
  resolveEffectiveModelInfo(payload)));
91
+
92
+ // Gear armory read model (agentArmory.cjs) for the character sheet. Read-only;
93
+ // bannedTools is the scheduler's headless disallow list (lazy-required: scheduler.cjs is heavy).
94
+ ipcMain.handle('agents:armory', validated(schemas.agentsArmory, (payload) =>
95
+ require('./lib/claude/agentArmory.cjs').buildArmory({
96
+ cwd: payload.cwd,
97
+ deps: { bannedTools: [...require('./scheduler.cjs').HEADLESS_DISALLOWED_TOOLS] },
98
+ })));
80
99
  }
81
100
 
82
101
  module.exports = { registerAgentsHandlers };
@@ -1,8 +1,8 @@
1
1
  {
2
- "version": "0.143.0",
3
- "gitSha": "9e3a35ddcda5eb03942c74a5c9f9777e31fd81ab",
4
- "gitShortSha": "9e3a35dd",
2
+ "version": "0.144.0",
3
+ "gitSha": "4760ce98481d63f0e842bcdfb9277d6eabb45c60",
4
+ "gitShortSha": "4760ce98",
5
5
  "gitBranch": "HEAD",
6
- "builtAt": "2026-11-25T04:24:39.027Z",
6
+ "builtAt": "2026-11-27T02:32:59.091Z",
7
7
  "dirty": false
8
8
  }