claude-code-session-manager 0.143.0 → 0.145.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 (128) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/AppSettings-BR5b6oof.js +2 -0
  3. package/dist/assets/{History-DTttbvPb.js → History-B4U0mCdK.js} +2 -2
  4. package/dist/assets/HomeClaudeConfig-DQqG7lFE.js +5 -0
  5. package/dist/assets/{Panel-B_D4Bg7L.js → Panel-CwsOJ0nI.js} +1 -1
  6. package/dist/assets/ProjectClaudeConfig-BzRowu8x.js +26 -0
  7. package/dist/assets/Scheduler-dr7CNOcL.js +16 -0
  8. package/dist/assets/{SkillReferenceGraph-D1b2aiol.js → SkillReferenceGraph-CroBPY4C.js} +1 -1
  9. package/dist/assets/{Skills-cfV7sgk6.js → Skills-BiW2lCnD.js} +23 -23
  10. package/dist/assets/{TiptapBody-DVXtEIVy.js → TiptapBody-CYTkQiva.js} +27 -27
  11. package/dist/assets/{Toggle-CYajnSdx.js → Toggle-WFBYo8JI.js} +1 -1
  12. package/dist/assets/{VoiceButton-DJ4gGRuE.js → VoiceButton-DZu8dTpO.js} +1 -1
  13. package/dist/assets/{historyTotals-D3MoHY2U.js → historyTotals-B7KeXLSE.js} +1 -1
  14. package/dist/assets/{index-DVHIHoJf.css → index-BJ5TJvmz.css} +1 -1
  15. package/dist/assets/{index-CdTppjKR.js → index-hXRNm0UJ.js} +698 -697
  16. package/dist/index.html +2 -2
  17. package/dist-web/app.css +1 -1
  18. package/dist-web/app.js +442 -439
  19. package/package.json +4 -2
  20. package/plugins/session-manager-dev/skills/develop/SKILL.md +25 -19
  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 +91 -0
  23. package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +9 -6
  24. package/scripts/README.md +1 -1
  25. package/scripts/scheduler-mcp-server.cjs +77 -0
  26. package/src/main/adminRouteRegistry.cjs +6 -0
  27. package/src/main/agentLibrary.cjs +60 -11
  28. package/src/main/agentsIpc.cjs +19 -0
  29. package/src/main/build-info.json +4 -4
  30. package/src/main/chatRunner.cjs +139 -0
  31. package/src/main/config.cjs +12 -0
  32. package/src/main/health.cjs +59 -17
  33. package/src/main/index.cjs +6 -2
  34. package/src/main/ipcSchemas.cjs +55 -1
  35. package/src/main/lib/claude/agentArmory.cjs +128 -0
  36. package/src/main/lib/claude/agentModelResolve.cjs +3 -2
  37. package/src/main/lib/claude/agentSnapshot.cjs +24 -3
  38. package/src/main/lib/claude/builtinTools.cjs +110 -0
  39. package/src/main/lib/claude/environmentProfiles.cjs +1 -1
  40. package/src/main/lib/claude/headlessMcpServers.cjs +138 -0
  41. package/src/main/lib/claude/jobSandboxPolicy.cjs +8 -2
  42. package/src/main/lib/claude/personaToolScope.cjs +100 -14
  43. package/src/main/lib/demo-video-kit/resumableRun.cjs +21 -14
  44. package/src/main/lib/demo-video-kit/seedKit.cjs +2 -2
  45. package/src/main/lib/epic/epicDepsSync.cjs +66 -0
  46. package/src/main/lib/epic/epicOutsideRead.cjs +74 -2
  47. package/src/main/lib/epic/epicSettle.cjs +48 -4
  48. package/src/main/lib/epic/epicSpawnPlan.cjs +3 -1
  49. package/src/main/lib/epic/epicValidationHook.cjs +9 -1
  50. package/src/main/lib/epic/planReviewInput.cjs +125 -0
  51. package/src/main/lib/epic/restorableSessions.cjs +1 -0
  52. package/src/main/lib/epic/scriptStartedBy.cjs +86 -0
  53. package/src/main/lib/externalContract.cjs +12 -0
  54. package/src/main/lib/feedback-remote/createdProjects.cjs +291 -0
  55. package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +108 -14
  56. package/src/main/lib/feedback-remote/localAdminHttp.cjs +5 -1
  57. package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +24 -3
  58. package/src/main/lib/feedback-remote/pendingReplies.cjs +8 -4
  59. package/src/main/lib/feedback-remote/projectCreate.cjs +415 -0
  60. package/src/main/lib/feedback-remote/replyClaims.cjs +15 -6
  61. package/src/main/lib/feedback-remote/serviceMcpSession.cjs +35 -4
  62. package/src/main/lib/feedback-remote/serviceMcpTools.cjs +43 -2
  63. package/src/main/lib/feedback-remote/servicePairLocalRoutes.cjs +91 -0
  64. package/src/main/lib/feedback-remote/servicePairings.cjs +95 -7
  65. package/src/main/lib/feedback-remote/serviceStdioBridge.cjs +104 -1
  66. package/src/main/lib/git/gitWorktree.cjs +1 -1
  67. package/src/main/lib/git/worktreeDeps.cjs +9 -3
  68. package/src/main/lib/mcpToolCatalog.cjs +47 -7
  69. package/src/main/lib/mcpToolsProbe.cjs +19 -2
  70. package/src/main/lib/opsOwnership.cjs +2 -0
  71. package/src/main/lib/packs/packCatalog.cjs +98 -5
  72. package/src/main/lib/persona-macro/agentPersonaSchema.cjs +6 -0
  73. package/src/main/lib/persona-macro/builtinMacros.cjs +6 -4
  74. package/src/main/lib/persona-macro/personaFrontmatterSchema.cjs +9 -0
  75. package/src/main/lib/persona-macro/personaLoadout.cjs +58 -0
  76. package/src/main/lib/persona-macro/personaMerge.cjs +11 -3
  77. package/src/main/lib/persona-macro/personaUpgrade.cjs +96 -0
  78. package/src/main/lib/persona-macro/projectVideoToolCheck.cjs +1 -1
  79. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +94 -0
  80. package/src/main/lib/prd/prdCreate.cjs +49 -5
  81. package/src/main/lib/prd/prdFrontmatter.cjs +5 -2
  82. package/src/main/lib/prd/prdMcpReachWarnings.cjs +46 -0
  83. package/src/main/lib/prd/prdSandboxWarnings.cjs +49 -0
  84. package/src/main/lib/process/peerChatSession.cjs +165 -0
  85. package/src/main/lib/project-pages/videoScriptPress.cjs +6 -0
  86. package/src/main/lib/project-pages/videoScriptRunRoute.cjs +24 -4
  87. package/src/main/lib/promptSessionSchema.cjs +2 -0
  88. package/src/main/lib/scheduler/baselineGate.cjs +31 -2
  89. package/src/main/lib/scheduler/planRecordHarvest.cjs +104 -12
  90. package/src/main/lib/scheduler/planReleaseRoute.cjs +110 -0
  91. package/src/main/lib/scheduler/planReviewSchema.cjs +182 -0
  92. package/src/main/lib/scheduler/planReviewStats.cjs +63 -0
  93. package/src/main/lib/scheduler/planReviewStore.cjs +150 -0
  94. package/src/main/lib/scheduler/reviewNotice.cjs +3 -1
  95. package/src/main/lib/scheduler/sandboxEnvironmentLimit.cjs +141 -0
  96. package/src/main/lib/scheduler/scheduleJobSchema.cjs +2 -0
  97. package/src/main/lib/scheduler/upgradeDrain.cjs +32 -5
  98. package/src/main/lib/scheduler/validatorVerdictSchema.cjs +12 -2
  99. package/src/main/lib/tasks/memoryConsolidation.cjs +118 -37
  100. package/src/main/lib/tasks/taskAdminRoutes.cjs +26 -14
  101. package/src/main/lib/tasks/taskRun.cjs +3 -1
  102. package/src/main/lib/tasks/weeklyConsolidationInputs.cjs +298 -0
  103. package/src/main/projectPages.cjs +22 -14
  104. package/src/main/pty.cjs +3 -0
  105. package/src/main/runVerify.cjs +80 -5
  106. package/src/main/scheduler/gitTreeGuard.cjs +6 -0
  107. package/src/main/scheduler/planReviewHold.cjs +146 -0
  108. package/src/main/scheduler/prdParser.cjs +1 -0
  109. package/src/main/scheduler/prdPaths.cjs +10 -1
  110. package/src/main/scheduler/reviewLadder.cjs +2 -0
  111. package/src/main/scheduler/utilizationHold.cjs +7 -2
  112. package/src/main/scheduler.cjs +692 -86
  113. package/src/main/seedAgentPersonas.cjs +11 -6
  114. package/src/main/seedStatus.cjs +1 -1
  115. package/src/main/templates/PRD_AUTHORING.md +17 -2
  116. package/src/main/webRemote.cjs +69 -7
  117. package/src/preload/api.d.ts +79 -1
  118. package/src/preload/apiSurface.json +39 -0
  119. package/src/preload/index.cjs +11 -0
  120. package/src/seed/agents/architect.md +28 -43
  121. package/src/seed/agents/dev-lead.md +3 -1
  122. package/src/seed/agents/md-network-curator.md +27 -0
  123. package/src/seed/agents/plan-reviewer.md +47 -0
  124. package/src/seed/agents/validator.md +2 -1
  125. package/dist/assets/AppSettings-BO4jDVGO.js +0 -2
  126. package/dist/assets/HomeClaudeConfig-DADP5bfn.js +0 -3
  127. package/dist/assets/ProjectClaudeConfig-DPnDJKcr.js +0 -26
  128. package/dist/assets/Scheduler-CNLjn90m.js +0 -16
@@ -13,8 +13,9 @@
13
13
  * bundled file's own stamp. Same or higher stays untouched. Lower checks
14
14
  * the installed file's body against every body this app has ever shipped
15
15
  * for that persona (`lib/persona-macro/shippedPersonaSeeds.cjs`). No match means a
16
- * person wrote or edited that file; it is left alone and the skip is
17
- * logged. Why: a lower stamp alone does not prove the file is a stale
16
+ * person wrote or edited that file; it is left alone, the skip is
17
+ * logged, and the Agent Library shows it as a newer version available
18
+ * (lib/persona-macro/personaUpgrade.cjs). Why: a lower stamp alone does not prove the file is a stale
18
19
  * shipped copy — only a body match does. A match replaces the installed
19
20
  * file with the bundled one. Frontmatter keys the user changed are kept,
20
21
  * including a `model:` line the user removed entirely; keys the user
@@ -80,7 +81,7 @@ const { writeJsonSync, writeTextAtomic, validatePath, validateWrite } = require(
80
81
  const { splitFrontmatter } = require('./lib/prd/prdFrontmatter.cjs');
81
82
  const { SHIPPED_PERSONA_SEEDS } = require('./lib/persona-macro/shippedPersonaSeeds.cjs');
82
83
 
83
- const PERSONAS = ['architect', 'dev-lead', 'project-home-builder', 'validator', 'demo-video-builder', 'blender-artist', 'competitive-researcher', 'competitive-analyst'];
84
+ const PERSONAS = ['architect', 'dev-lead', 'project-home-builder', 'validator', 'demo-video-builder', 'blender-artist', 'competitive-researcher', 'competitive-analyst', 'plan-reviewer', 'md-network-curator'];
84
85
  // What `{ done: true }` (the pre-seeded-set marker format) meant: only these two personas existed
85
86
  // in PERSONAS at the time. Fixed, not derived from the current PERSONAS array above — otherwise
86
87
  // every future persona added to PERSONAS would retroactively count as already delivered to a
@@ -309,7 +310,8 @@ async function upgradeStalePersonas({ logger = console, writeLog = () => {}, shi
309
310
  if (!fs.existsSync(destPath)) continue; // nothing installed yet — the first-seed pass below owns this name
310
311
  try {
311
312
  const bundledText = fs.readFileSync(path.join(srcDir, `${name}.md`), 'utf8');
312
- const installedText = fs.readFileSync(destPath, 'utf8');
313
+ const installedBytes = fs.readFileSync(destPath);
314
+ const installedText = installedBytes.toString('utf8');
313
315
  const bundledVersion = readSeedVersion(bundledText);
314
316
  const installedVersion = readSeedVersion(installedText);
315
317
  if (installedVersion >= bundledVersion) continue; // same or newer — never touched
@@ -335,10 +337,10 @@ async function upgradeStalePersonas({ logger = console, writeLog = () => {}, shi
335
337
  // catch below on failure.
336
338
  validateWrite(validatePath(destPath));
337
339
 
338
- const backupPath = backupPathFor(name, installedText);
340
+ const backupPath = backupPathFor(name, installedBytes);
339
341
  if (!fs.existsSync(backupPath)) {
340
342
  fs.mkdirSync(path.dirname(backupPath), { recursive: true });
341
- await writeTextAtomic(backupPath, installedText);
343
+ await writeTextAtomic(backupPath, installedBytes);
342
344
  } // same content already backed up by an earlier attempt — never write a second copy
343
345
 
344
346
  const nextText = buildUpgradedPersona(bundledText, installedText, matches);
@@ -404,6 +406,9 @@ module.exports = {
404
406
  personaBodyHash,
405
407
  readSeedVersion,
406
408
  normalizeNewlines,
409
+ backupPathFor,
410
+ bundledSourceDir,
411
+ destAgentsDir,
407
412
  sameFmValue,
408
413
  markerPath,
409
414
  markerStatus,
@@ -47,7 +47,7 @@ const FIXES = {
47
47
  'dev-plugin': 'Open Plugins → Library and click Install next to "session-manager-dev".',
48
48
  'scheduler-mcp': () =>
49
49
  `Run in a terminal: claude mcp add ${seedSchedulerMcp.SERVER_NAME} --scope user -- node ${seedSchedulerMcp.serverScriptPath()}`,
50
- 'agent-personas': `Copy ${seedAgentPersonas.PERSONAS.map((n) => `src/seed/agents/${n}.md`).join(', ')} into ~/.claude/agents/ (skip any that already exist there).`,
50
+ 'agent-personas': `Copy ${seedAgentPersonas.PERSONAS.map((n) => `src/seed/agents/${n}.md`).join(', ')} into ~/.claude/agents/, copying only the ones that are missing. Installed copies you never edited update on their own at app start; a copy you edited is kept, and a newer bundled version is offered in the Agent Library.`,
51
51
  };
52
52
 
53
53
  /** { 'dev-plugin': {status, fix}, 'scheduler-mcp': {status, fix}, 'agent-personas': {status, fix} } */
@@ -1,4 +1,4 @@
1
- <!-- PRD_AUTHORING.md v30 -->
1
+ <!-- PRD_AUTHORING.md v37 -->
2
2
  # PRD Authoring Guide — Scheduler Safety Rules
3
3
 
4
4
  Rule: every PRD you queue follows the rules below.
@@ -146,12 +146,24 @@ The executor can't ask you anything: no `ScheduleWakeup`, Cron, Monitor, `AskUse
146
146
  Worktree reach: every PRD runs in an isolated git worktree holding tracked files plus linked dependencies: `node_modules` (the root and each nested npm package's) is a worktree-local folder whose entries link to the main checkout's, and non-uv `.venv`/`venv` is symlinked whole; pnpm projects (pnpm-lock.yaml) get a worktree-local `node_modules` installed offline from the store, and uv projects (uv.lock) get a worktree-local env built by an offline frozen `uv sync`, not a symlink. Why: a pnpm install through the symlink purged the main checkout's node_modules (Bilko-Game-Academy 2026-10-18). A step that needs gitignored runtime state (databases, downloads/, browser profiles, logs) or a live side effect must address the main checkout by absolute path (e.g. `$HOME/Projects/<repo>/...`), be artifact-only (a deliverable artifact + `artifactPaths`, no tracked edits), and `dependsOn` the PRD that lands its tracked edits. A project may declare `worktreeSetup` gate-syntax commands in a tracked `.session-manager.json` at the repo root; they run once per fresh job worktree and baseline scratch worktree, before the executor starts, with cwd = the worktree root (a project in a subfolder names it, e.g. `timeout 600 godot --headless --path game --import`). Setups run one at a time per project and are never skipped; they must write only inside the worktree (node_modules entries and non-uv venvs link into the main checkout). The outcome is the `[scheduler] worktree setup:` lines at the top of the run log plus `worktreeSetup` in the run's meta.json. Host crontab installs stay human-only (see §14).
147
147
  Why: burrow PRD 1516 halted because its relative `.venv` python against downloads/fb-tracker.db, scripts/install-cron.sh and `pipeline-cron.sh --now` resolved inside the worktree (no runtime state; install-cron would bake a temporary worktree path into crontab), while sibling 1494 succeeded the same day using an absolute main-checkout path and artifact-only output. `scheduler_create_prd` warns on relative gitignored paths.
148
148
 
149
+ Live checks: A check against a running local service is an `http` criterion (loopback only, run by the scheduler outside the sandbox). `http` criteria are GET-only and send no credentials, so a bearer-authed route (Session Manager's own `/admin/*` routes) is never probed from a PRD gate, job step or criterion. The Epic's architect probes it read-only at PLAN SETTLED, publishes the record with `artifact_publish`, and a validator criterion cites the record's `storedPath` and `sha256`; see [Authenticated admin routes](../../../session-manager-operations/architecture/scheduler-operations.md#authenticated-admin-routes).
150
+
149
151
  Rule: gates never run `npm ci` or `npm install` — dependencies are already linked, so an install only slows the run.
150
152
  Why: `npm --prefix web/feedback-widget ci` through the old whole-folder link emptied the main checkout's web/feedback-widget/node_modules (session-manager, 2026-11-24).
151
153
 
152
154
  Rule: a job's processes never outlive it — the group sweep at exit, the job scope stop (systemd) and the 5-minute leftover sweep (Linux) stop anything it started, so `nohup` or `&` does not daemonize. Anything that must keep running goes to a service manager (systemd unit, cron), never `nohup` or `&`.
153
155
  Why: finished jobs left dev servers running for days, holding memory and ports.
154
156
 
157
+ ### Job sandbox limits
158
+
159
+ Rule: jobs under the OS sandbox (dev-lead, validator, any `osSandboxRequired` environment) must not depend on any of these:
160
+ - Bash writes under `.claude/` are refused (no `git mv`, `git rm` or `rm` there). **Any** write to `.claude/agents/`, `.claude/commands/`, `.claude/skills/`, `.claude/hooks/` or `.claude/settings*.json` is refused too, including by the Edit and Write tools (CLI mandatory write protections). A PRD must not list those paths in `# Files`; the architect edits them inline, outside the job sandbox. Why: PRD 4704 (2026-11-26) asked for an Edit on `.claude/agents/` and all three calls were denied.
161
+ - AF_UNIX socket bind/connect is refused (`Operation not permitted`).
162
+ - `/tmp` is read-only; only `$TMPDIR` (the job's private dir) is writable.
163
+
164
+ Gates must not run tests that open Unix sockets or hardcode `/tmp` — run those outside the job, or mark them skipped in the gate.
165
+ Why: the CLI sandbox protects `.claude/` config dirs even inside the worktree write root; Self PRDs 1326 and 1313 parked on exactly this.
166
+
155
167
  ---
156
168
 
157
169
  ## §8 Scope sizing — target ≤10 min, ceiling 15
@@ -227,7 +239,7 @@ Why: those verdicts mean the run ended without a clean verdict line, not that th
227
239
 
228
240
  Rule: a park caused by a DIFFERENT actor already finishing the same objective (a sibling PRD, a human) does not self-heal this way. Why: the job has no landed commit of its own. Confirm in the tree that the work is really done, then call `scheduler_archive_prd` with the slug. Archiving marks the job completed and frees the PRDs that depend on it. Never hand-edit `queue.json`: the scheduler and the watchdog both write it. Archiving clears a stale label; it does not fix a real bug.
229
241
 
230
- Rule: a no-commit PASS (`pass_no_commit`) completes only with a prior landed commit of the same slug, or when every path in the Files list landed on the base branch since the PRD was written. Otherwise it parks.
242
+ Rule: a no-commit PASS (`pass_no_commit`) completes only when the run's own commit is found (in its HEAD range, CLI-recorded, or named in its transcript and on HEAD), a prior commit of the same slug landed, or a commit on a Files path is attributable to this job (its branch or slug in the message); path overlap alone never counts. Otherwise it parks.
231
243
  Why: a tracked path existing is not proof this PRD's work shipped.
232
244
 
233
245
  ---
@@ -246,7 +258,9 @@ Before queueing a new PRD, verify each of these:
246
258
  - [ ] **§6 Gate and files:** `gate` follows every rule in §6 (or is `["none"]` alone); `files` is 1–50 repo-relative paths, no overlap with a concurrent PRD.
247
259
  - [ ] **§7 Self-contained:** no reference to "the conversation" or outside context; paths/identifiers inline; clean UTF-8, no NUL bytes (`grep -qP '\x00' file && echo BAD`).
248
260
  - [ ] **§7 Worktree reach:** no relative path to a gitignored file; live-run steps use absolute main-checkout paths in an artifact-only PRD. Why: the job worktree has no gitignored runtime state, so relative paths fail or bake a temporary path into host config (burrow 1516).
261
+ - [ ] **§7 Job sandbox limits:** no gate or step uses Bash writes under `.claude/`, Unix sockets, or hardcoded `/tmp` (see [Job sandbox limits](#job-sandbox-limits)).
249
262
  - [ ] **§7 No installs:** no gate runs `npm ci` or `npm install`. Why: dependencies are linked; an install through a link emptied the main checkout's web/feedback-widget/node_modules (2026-11-24).
263
+ - [ ] **No authed loopback probe:** no gate or criterion probes a bearer-authed loopback route (`/admin/*`); `http` criteria are GET-only with no credentials. Why: release checks 4539 and 4337 prescribed one and ended silent_no_op.
250
264
  - [ ] **§8 Scope:** targets ≤10 min, ceiling 15; e2e/publish sharded to one spec per PRD.
251
265
  - [ ] **§9 Failure surfacing:** errors exit 1 with a diagnostic line; no silent `|| true`.
252
266
  - [ ] **§10 Negative assertions:** every "should find nothing" check is inverted to exit 0 on the clean case.
@@ -259,3 +273,4 @@ Before queueing a new PRD, verify each of these:
259
273
  - [ ] **Doc links gated:** a PRD that adds, moves or renames a markdown file runs the project's doc-link check in its gate when the project has one (in session-manager: `timeout 120 npm run lint:docs`). Why: PRD kit-cast-playbook added `src/main/lib/demo-video-kit/cast.md` with only the kit tests in its gate, so the orphan doc landed on 2026-11-23 and turned lint:docs red for the next PRD.
260
274
  - [ ] **Size budgets gated:** a PRD that edits a file the project caps by size runs that cap's check in its gate when the project has one (in session-manager: README.md gates `timeout 120 npm run lint:readme`). Why: PRD 4105-web-remote-label-leftovers edited README.md with only lint:docs and typecheck in its gate, so README.md reached 24,026 bytes on 2026-11-24, over its cap, and npm run lint turned red for every later PRD.
261
275
  - [ ] **Gate purity:** a gate command must not create or modify tracked files; outputs go to the per-gate TMPDIR or a gitignored path. Why: a dirtied tree fails the clean-tree check.
276
+ - [ ] **Plan-review checklist** (the independent reviewer checks each queued PRD; check them yourself first): every criterion is provable from the tree or a read-only probe; a failure path is covered; one edge case is covered; no criterion is vacuous because a sibling PRD already satisfies it; every `dependsOn` is real (the PRD needs that PRD's output); the gate is green at base; a live-behavior change has an `http` criterion; a doc PRD depends on the code PRD it describes.
@@ -1308,7 +1308,7 @@ async function handleServiceHello(envelope, device, client, peerPubKey) {
1308
1308
  * Owner confirmed a pending service's SAS: check it against that client's own
1309
1309
  * SAS, then pin the key via store.confirmPending. Returns { ok, service } or { ok:false, error }.
1310
1310
  */
1311
- async function confirmServiceSas(pairingId, sas) {
1311
+ async function confirmServiceSas(pairingId, sas, { via } = {}) {
1312
1312
  const target = _clients.values().find((c) => c.role === 'service' && c.pendingPairingId === pairingId) || null;
1313
1313
  if (!target) return { ok: false, error: 'no_pending_service' };
1314
1314
  if (target.e2e.state !== 'pending_sas' || typeof target.e2e.pendingSas !== 'string') return { ok: false, error: 'wrong_state' };
@@ -1330,7 +1330,7 @@ async function confirmServiceSas(pairingId, sas) {
1330
1330
  target.e2e = confirmSasLogic(target.e2e).next;
1331
1331
  target.service = service;
1332
1332
  target.pendingPairingId = null;
1333
- await auditLog(new Date().toISOString(), 'service:confirm-sas', target.deviceId, undefined, `ok:service=${auditToken(service.serviceId)}`, target);
1333
+ await auditLog(new Date().toISOString(), 'service:confirm-sas', target.deviceId, undefined, `${via === 'local' ? 'ok:paired-locally:' : 'ok:'}service=${auditToken(service.serviceId)}`, target);
1334
1334
  finalizeE2eAuthenticated('paired service authenticated — SAS confirmed by owner', target);
1335
1335
  return { ok: true, service };
1336
1336
  }
@@ -1352,7 +1352,23 @@ async function pairedDevice() {
1352
1352
  function redactService(s) {
1353
1353
  if (!s) return s;
1354
1354
  const { pubKey: _omit, ...rest } = s;
1355
- return rest;
1355
+ return { ...rest, projectRoot: typeof rest.projectRoot === 'string' ? rest.projectRoot : null };
1356
+ }
1357
+
1358
+ const PROJECT_ROOT_ERROR = 'projectRoot must be an existing folder in your home folder';
1359
+
1360
+ /** True when p is an absolute path to an existing directory inside the home folder. */
1361
+ function isProjectRootOk(p) {
1362
+ if (typeof p !== 'string' || p.length === 0 || p.includes('\0') || !path.isAbsolute(p)) return false;
1363
+ try {
1364
+ // Resolve symlinks on both sides so a link inside home that points outside is refused.
1365
+ const real = fs.realpathSync(p);
1366
+ const rel = path.relative(fs.realpathSync(os.homedir()), real);
1367
+ if (rel === '' || rel === '..' || rel.startsWith('..' + path.sep) || path.isAbsolute(rel)) return false;
1368
+ return fs.statSync(real).isDirectory();
1369
+ } catch {
1370
+ return false;
1371
+ }
1356
1372
  }
1357
1373
 
1358
1374
  function logRelayFailure(op, r) {
@@ -1362,7 +1378,7 @@ function logRelayFailure(op, r) {
1362
1378
  });
1363
1379
  }
1364
1380
 
1365
- async function servicePairStart({ name, homeCwd, scope }) {
1381
+ async function startPairing({ name, homeCwd, scope, projectRoot }, pairedVia) {
1366
1382
  const device = await pairedDevice();
1367
1383
  if (!device) return { ok: false, error: 'no_paired_device' };
1368
1384
  const { SERVICE_TOOL_NAMES } = require('./lib/feedback-remote/servicePairings.cjs');
@@ -1370,6 +1386,8 @@ async function servicePairStart({ name, homeCwd, scope }) {
1370
1386
  if (!path.isAbsolute(homeCwd)) return { ok: false, error: 'homeCwd must be an absolute path' };
1371
1387
  const unknown = scope.find((t) => !SERVICE_TOOL_NAMES.includes(t));
1372
1388
  if (unknown) return { ok: false, error: `scope names an unknown tool: ${unknown}` };
1389
+ const wantsProjectCreate = scope.includes('project_create');
1390
+ if (wantsProjectCreate && !isProjectRootOk(projectRoot)) return { ok: false, error: PROJECT_ROOT_ERROR };
1373
1391
 
1374
1392
  const r = await relayRequest('POST', `${RELAY_API_BASE}/client-otp`, { body: {}, token: device.deviceToken });
1375
1393
  if (!isOk(r)) {
@@ -1381,18 +1399,38 @@ async function servicePairStart({ name, homeCwd, scope }) {
1381
1399
  const codeExpiresAt = Date.now() + CLIENT_OTP_TTL_MS;
1382
1400
  let pairingId;
1383
1401
  try {
1384
- ({ pairingId } = await getServiceStore().createPending({ name, homeCwd, scope }));
1402
+ ({ pairingId } = await getServiceStore().createPending({
1403
+ name, homeCwd, scope, projectRoot: wantsProjectCreate ? projectRoot : undefined, pairedVia,
1404
+ }));
1385
1405
  } catch (e) {
1386
1406
  return { ok: false, error: e?.message || 'pending pairing failed' };
1387
1407
  }
1388
- await auditLog(new Date().toISOString(), 'service:pair-start', device.deviceId, undefined, 'ok', null);
1408
+ await auditLog(new Date().toISOString(), 'service:pair-start', device.deviceId, undefined, pairedVia === 'local' ? 'ok:paired-locally' : 'ok', null);
1389
1409
  return { ok: true, code, pairingId, codeExpiresAt, deviceId: device.deviceId };
1390
1410
  }
1391
1411
 
1412
+ function servicePairStart(input) {
1413
+ return startPairing(input, 'window');
1414
+ }
1415
+
1416
+ /** Same-machine pairing without the window: refused while Web remote is off. */
1417
+ async function servicePairStartLocal(input) {
1418
+ if ((await loadConfig()).remoteEnabled !== true) return { ok: false, error: 'web_remote_off' };
1419
+ return startPairing(input, 'local');
1420
+ }
1421
+
1422
+ /** Confirms ONLY a 'local' pending pairing; the SAS check in confirmServiceSas still applies. */
1423
+ async function confirmServiceSasLocal(pairingId, sas) {
1424
+ if ((await loadConfig()).remoteEnabled !== true) return { ok: false, error: 'web_remote_off' };
1425
+ const pending = getServiceStore().listPending().find((p) => p.pairingId === pairingId);
1426
+ if (!pending || pending.pairedVia !== 'local') return { ok: false, error: 'not_local_pairing' };
1427
+ return confirmServiceSas(pairingId, sas, { via: 'local' });
1428
+ }
1429
+
1392
1430
  async function servicesList() {
1393
1431
  const store = getServiceStore();
1394
1432
  const services = store.list().map(redactService);
1395
- const pending = store.listPending();
1433
+ const pending = store.listPending().map(redactService);
1396
1434
  const known = new Set(services.map((s) => s.relayClientId).filter(Boolean));
1397
1435
  const device = await pairedDevice();
1398
1436
  if (!device) return { ok: true, services, pending, relayOrphans: [], relayError: 'no_paired_device' };
@@ -1440,6 +1478,24 @@ async function serviceRevoke(serviceId) {
1440
1478
  return { ok: true, relayRevoked };
1441
1479
  }
1442
1480
 
1481
+ /** Owner grant: set (or with [] revoke) where work a service opens auto-starts. Audited. */
1482
+ async function serviceSetStartWork(serviceId, targets) {
1483
+ const store = getServiceStore();
1484
+ if (!store.list().some((s) => s.serviceId === serviceId)) return { ok: false, error: 'no_such_service' };
1485
+ let service;
1486
+ try {
1487
+ service = await store.setStartWork(serviceId, targets);
1488
+ } catch (e) {
1489
+ return { ok: false, error: e?.message || 'invalid_targets' };
1490
+ }
1491
+ const granted = service.startWork ? service.startWork.targets : [];
1492
+ const detail = granted.length === 0
1493
+ ? `ok:revoked:service=${auditToken(serviceId)}`
1494
+ : `ok:granted:service=${auditToken(serviceId)}:targets=${granted.map((t) => String(t).replace(/[^\x20-\x7e]/g, '_').replace(/[,\s]/g, '_')).join(',').slice(0, 1000)}`;
1495
+ await auditLog(new Date().toISOString(), 'service:set-start-work', undefined, undefined, detail, null);
1496
+ return { ok: true, service: redactService(service) };
1497
+ }
1498
+
1443
1499
  /**
1444
1500
  * Owner denied a pending pairing: drop it from the store and fail + tear down
1445
1501
  * any service client waiting on it, so a later hello for it is refused.
@@ -2117,6 +2173,10 @@ function registerRemoteHandlers() {
2117
2173
  return serviceRevoke(serviceId);
2118
2174
  }));
2119
2175
 
2176
+ ipcMain.handle('webRemote:service-set-start-work', validated(schemas.webRemoteServiceSetStartWork, async ({ serviceId, targets }) => {
2177
+ return serviceSetStartWork(serviceId, targets);
2178
+ }));
2179
+
2120
2180
  ipcMain.handle('webRemote:relay-client-revoke', validated(schemas.webRemoteRelayClientRevoke, async ({ clientId }) => {
2121
2181
  return relayClientRevoke(clientId);
2122
2182
  }));
@@ -2172,6 +2232,8 @@ module.exports = {
2172
2232
  setServiceInvoker,
2173
2233
  getServiceStore,
2174
2234
  confirmServiceSas,
2235
+ servicePairStartLocal,
2236
+ confirmServiceSasLocal,
2175
2237
  servicePairCancel,
2176
2238
  attachWindow,
2177
2239
  registerRemoteHandlers,
@@ -569,11 +569,45 @@ export type PacksListResult =
569
569
  /** `packs.terminalArgs` result — `--plugin-dir`/`--append-system-prompt` args, already composed by main. */
570
570
  export type PacksTerminalArgsResult = { ok: true; args: string[] };
571
571
 
572
+ /** One armory entry (`agentArmory.cjs`). */
573
+ export interface ArmoryItem {
574
+ id: string;
575
+ label: string;
576
+ badges: ('risky' | 'banned' | 'floor')[];
577
+ }
578
+ export interface ArmoryMcpItem extends ArmoryItem {
579
+ tools: ArmoryItem[];
580
+ status: 'not-checked' | 'checked' | 'failing';
581
+ scope: string;
582
+ }
583
+ export interface ArmoryPackItem extends ArmoryItem {
584
+ skills: string[];
585
+ source?: string;
586
+ }
587
+ export interface Armory {
588
+ builtins: ArmoryItem[];
589
+ bundledSkills: ArmoryItem[];
590
+ mcpServers: ArmoryMcpItem[];
591
+ packs: ArmoryPackItem[];
592
+ unpackedSkills: string[];
593
+ /** Sandbox environment profiles (`environmentProfiles.cjs`). */
594
+ environments: { name: string; summary: string }[];
595
+ errors: string[];
596
+ }
597
+
572
598
  /** One global `~/.claude/agents/<name>.md` persona, per the Agent Library nav page. */
573
599
  export interface AgentPersona {
574
600
  name: string;
575
601
  description: string | null;
576
602
  tools: string[];
603
+ /** The `tools:` decision: undecided (no line) / bare (`[]`) / equipped / unbound (`*`). */
604
+ loadout?: 'undecided' | 'bare' | 'equipped' | 'unbound';
605
+ /** Declared MCP servers (`mcpServers:`); [] = none. */
606
+ mcpServers?: string[];
607
+ /** Declared context packs (`packs:`); [] = none. */
608
+ packs?: string[];
609
+ /** Declared environment profile (`environment:`); null = headless-default. */
610
+ environment?: string | null;
577
611
  model: string | null;
578
612
  /** Per-Epic reasoning effort (`effort:` frontmatter; a `models.catalog` effort level). Null = inherit. Passed to the claude spawn as `--effort` (never `auto`). */
579
613
  effort: string | null;
@@ -597,6 +631,8 @@ export interface AgentPersona {
597
631
  title?: string | null;
598
632
  /** Bundled-persona version stamp (seedAgentPersonas.cjs). Null for a persona that was never seeded, or has no stamp. */
599
633
  seedVersion?: number | null;
634
+ /** Set when a newer bundled version exists that was not applied (edited file or unseen). Null/absent otherwise. */
635
+ upgrade?: { installedVersion: number; bundledVersion: number; edited: boolean; bundledBody: string } | null;
600
636
  /** `executorOnly: true` frontmatter — persona only executes a scoped PRD; New Epic warns when it is picked as Actor. */
601
637
  executorOnly?: boolean;
602
638
  path: string;
@@ -617,6 +653,14 @@ export interface AgentPersonaSaveInput {
617
653
  originalName?: string;
618
654
  description: string;
619
655
  tools: string[];
656
+ /** Global save only: the loadout decision encoding `tools:` (omit = derive from `tools`). */
657
+ loadout?: 'bare' | 'unbound' | 'equipped';
658
+ /** Global save: declared MCP servers; omit = keep the file's value, `[]` = none. */
659
+ mcpServers?: string[];
660
+ /** Global save: declared context packs; omit = keep the file's value, `[]` = none. */
661
+ packs?: string[];
662
+ /** Global save: declared environment profile; omit = keep the file's value. */
663
+ environment?: string;
620
664
  model: string;
621
665
  /** Effort level, or `'inherit'`/omitted to write no `effort:` line. */
622
666
  effort?: string;
@@ -1117,6 +1161,8 @@ export interface ScheduleJob {
1117
1161
  artifactPaths?: string[] | null;
1118
1162
  /** PRD frontmatter library voice (in-process only); handed to the job as SM_VOICE_ID. */
1119
1163
  voiceId?: string | null;
1164
+ /** PRD frontmatter persona (queue rows carry it; absent = dev-lead). */
1165
+ agentType?: string | null;
1120
1166
  slug: string;
1121
1167
  title: string;
1122
1168
  cwd: string | null;
@@ -2930,7 +2976,8 @@ export type WebRemoteServiceTool =
2930
2976
  | 'macro_list'
2931
2977
  | 'macro_run'
2932
2978
  | 'epic_get'
2933
- | 'events_read';
2979
+ | 'events_read'
2980
+ | 'project_create';
2934
2981
 
2935
2982
  /** A paired service as the renderer sees it (its pinned key is never returned). */
2936
2983
  export interface WebRemoteService {
@@ -2938,9 +2985,15 @@ export interface WebRemoteService {
2938
2985
  name: string;
2939
2986
  homeCwd: string;
2940
2987
  scope: WebRemoteServiceTool[];
2988
+ /** Owner-approved projects folder project_create creates into; null without that tool. */
2989
+ projectRoot: string | null;
2941
2990
  relayClientId: string | null;
2942
2991
  pairedAt: number;
2943
2992
  lastSeenAt: number;
2993
+ /** How the pairing was approved: owner window (default) or the loopback admin API. */
2994
+ pairedVia?: 'window' | 'local';
2995
+ /** Owner grant: work this service opens in these projects ('*' = all) starts without a second approval. null = off. */
2996
+ startWork?: { targets: string[] } | null;
2944
2997
  }
2945
2998
 
2946
2999
  export interface WebRemotePendingService {
@@ -2948,8 +3001,10 @@ export interface WebRemotePendingService {
2948
3001
  name: string;
2949
3002
  homeCwd: string;
2950
3003
  scope: WebRemoteServiceTool[];
3004
+ projectRoot: string | null;
2951
3005
  createdAt: number;
2952
3006
  expiresAt: number;
3007
+ pairedVia?: 'window' | 'local';
2953
3008
  }
2954
3009
 
2955
3010
  /** A relay client no local service owns. */
@@ -2973,6 +3028,8 @@ export interface WebRemoteServicePairStartInput {
2973
3028
  name: string;
2974
3029
  homeCwd: string;
2975
3030
  scope: WebRemoteServiceTool[];
3031
+ /** Required (an existing folder in the home folder) when scope includes project_create. */
3032
+ projectRoot?: string;
2976
3033
  }
2977
3034
 
2978
3035
  export type WebRemoteServicePairStartResult =
@@ -2988,6 +3045,10 @@ export type WebRemoteServicePairCancelResult =
2988
3045
  | { ok: true; cancelled: boolean; dropped: number }
2989
3046
  | { ok: false; error: string };
2990
3047
 
3048
+ export type WebRemoteServiceSetStartWorkResult =
3049
+ | { ok: true; service: WebRemoteService }
3050
+ | { ok: false; error: string };
3051
+
2991
3052
  export type WebRemoteServiceRevokeResult =
2992
3053
  | { ok: true; relayRevoked: boolean }
2993
3054
  | { ok: false; error: string };
@@ -3040,6 +3101,8 @@ export interface SessionManagerAPI {
3040
3101
  onNewSession: (handler: () => void) => () => void;
3041
3102
  onRebootSession: (handler: () => void) => () => void;
3042
3103
  onOpenFreeHour: (handler: () => void) => () => void;
3104
+ /** Fired when POST /admin/projects/create makes a new project; `cwd` is its folder. */
3105
+ onProjectCreated: (handler: (payload: { cwd: string }) => void) => () => void;
3043
3106
  archiveProject: (encoded: string) => Promise<{ ok: boolean; error?: string }>;
3044
3107
  };
3045
3108
  pty: {
@@ -3114,6 +3177,10 @@ export interface SessionManagerAPI {
3114
3177
  listPersonas: () => Promise<AgentPersona[]>;
3115
3178
  savePersona: (payload: AgentPersonaSaveInput) => Promise<{ ok: boolean; path: string }>;
3116
3179
  deletePersona: (payload: { name: string }) => Promise<{ ok: boolean }>;
3180
+ /** Replaces the installed persona with the bundled one (backing the old file up). */
3181
+ takeBundledPersona: (p: { name: string }) => Promise<{ backupPath: string; seedVersion: number }>;
3182
+ /** Hides the upgrade notice for this bundled version. */
3183
+ dismissPersonaUpgrade: (p: { name: string; bundledVersion: number }) => Promise<{ ok: true }>;
3117
3184
  /** Drops the overlay of the OPEN project at `projectCwd` (an `overrideDetails[].cwd`). */
3118
3185
  removeOverride: (payload: { name: string; projectCwd: string }) => Promise<{ ok: boolean }>;
3119
3186
  /** Raw persona `.md` text for the New Epic AIM composer (epicIntake.ts's `agentBody`),
@@ -3156,6 +3223,8 @@ export interface SessionManagerAPI {
3156
3223
  effort: string | null;
3157
3224
  source: 'persona' | 'persona-overlay' | 'inherit' | null;
3158
3225
  }>;
3226
+ /** Gear armory read model (`agentArmory.cjs`): every equippable tool/skill/MCP/pack with badges. Never throws; source failures land in `errors`. */
3227
+ armory: (payload: { cwd?: string }) => Promise<Armory>;
3159
3228
  /** Fires after any save/delete/removeOverride — subscribers should re-fetch listPersonas(). */
3160
3229
  onChanged: (handler: () => void) => () => void;
3161
3230
  };
@@ -3709,6 +3778,8 @@ export interface SessionManagerAPI {
3709
3778
  servicePairCancel: (pairingId: string) => Promise<WebRemoteServicePairCancelResult>;
3710
3779
  /** Revoke a paired service locally and at the relay (relay failure still revokes locally). */
3711
3780
  serviceRevoke: (serviceId: string) => Promise<WebRemoteServiceRevokeResult>;
3781
+ /** Set (or with [] revoke) the owner's startWork grant: projects ('*' = all) where work this service opens auto-starts. */
3782
+ serviceSetStartWork: (serviceId: string, targets: string[]) => Promise<WebRemoteServiceSetStartWorkResult>;
3712
3783
  /** Revoke an orphaned relay client. */
3713
3784
  relayClientRevoke: (clientId: string) => Promise<WebRemoteMutationResult>;
3714
3785
  };
@@ -3748,6 +3819,13 @@ export interface SessionManagerAPI {
3748
3819
  /** Set when main awaits the result; echo it back via `reportExternalNewSessionResult`. */
3749
3820
  requestId?: string;
3750
3821
  via?: 'script';
3822
+ /** Set by main only for via 'script' (epic/scriptStartedBy.cjs); never on a human press. */
3823
+ startedBy?: {
3824
+ kind: 'script';
3825
+ route: string;
3826
+ caller?: { pipeline?: string; runId?: string; step?: string; attempt?: number };
3827
+ [k: string]: unknown;
3828
+ };
3751
3829
  effort?: string;
3752
3830
  /** Scripted job press: build a review cut first. */
3753
3831
  reviewStage?: boolean;
@@ -199,6 +199,13 @@
199
199
  "kind": "on",
200
200
  "remote": "deny"
201
201
  },
202
+ {
203
+ "ns": "app",
204
+ "method": "onProjectCreated",
205
+ "channel": "projects:created",
206
+ "kind": "on",
207
+ "remote": "deny"
208
+ },
202
209
  {
203
210
  "ns": "pty",
204
211
  "method": "spawn",
@@ -452,6 +459,20 @@
452
459
  "kind": "invoke",
453
460
  "remote": "mutate"
454
461
  },
462
+ {
463
+ "ns": "agents",
464
+ "method": "takeBundledPersona",
465
+ "channel": "agents:take-bundled-persona",
466
+ "kind": "invoke",
467
+ "remote": "mutate"
468
+ },
469
+ {
470
+ "ns": "agents",
471
+ "method": "dismissPersonaUpgrade",
472
+ "channel": "agents:dismiss-persona-upgrade",
473
+ "kind": "invoke",
474
+ "remote": "mutate"
475
+ },
455
476
  {
456
477
  "ns": "agents",
457
478
  "method": "removeOverride",
@@ -487,6 +508,13 @@
487
508
  "kind": "invoke",
488
509
  "remote": "read"
489
510
  },
511
+ {
512
+ "ns": "agents",
513
+ "method": "armory",
514
+ "channel": "agents:armory",
515
+ "kind": "invoke",
516
+ "remote": "read"
517
+ },
490
518
  {
491
519
  "ns": "agents",
492
520
  "method": "onChanged",
@@ -2286,6 +2314,17 @@
2286
2314
  "serviceId"
2287
2315
  ]
2288
2316
  },
2317
+ {
2318
+ "ns": "webRemote",
2319
+ "method": "serviceSetStartWork",
2320
+ "channel": "webRemote:service-set-start-work",
2321
+ "kind": "invoke",
2322
+ "remote": "deny",
2323
+ "pack": [
2324
+ "serviceId",
2325
+ "targets"
2326
+ ]
2327
+ },
2289
2328
  {
2290
2329
  "ns": "webRemote",
2291
2330
  "method": "relayClientRevoke",
@@ -54,6 +54,12 @@ contextBridge.exposeInMainWorld('api', {
54
54
  ipcRenderer.on('app:open-free-hour', listener);
55
55
  return () => ipcRenderer.removeListener('app:open-free-hour', listener);
56
56
  },
57
+ // Fired by POST /admin/projects/create on a fresh create (projectCreate.cjs defaultNotifyRenderer).
58
+ onProjectCreated: (handler) => {
59
+ const listener = (_e, payload) => handler({ cwd: payload?.cwd });
60
+ ipcRenderer.on('projects:created', listener);
61
+ return () => ipcRenderer.removeListener('projects:created', listener);
62
+ },
57
63
  },
58
64
  pty: {
59
65
  spawn: (payload) => ipcRenderer.invoke('pty:spawn', payload),
@@ -136,10 +142,13 @@ contextBridge.exposeInMainWorld('api', {
136
142
  savePersona: (payload) => ipcRenderer.invoke('agents:save-persona', payload),
137
143
  deletePersona: (payload) => ipcRenderer.invoke('agents:delete-persona', payload),
138
144
  removeOverride: (payload) => ipcRenderer.invoke('agents:remove-override', payload),
145
+ takeBundledPersona: (payload) => ipcRenderer.invoke('agents:take-bundled-persona', payload),
146
+ dismissPersonaUpgrade: (payload) => ipcRenderer.invoke('agents:dismiss-persona-upgrade', payload),
139
147
  getPersonaBody: (payload) => ipcRenderer.invoke('agents:get-persona-body', payload),
140
148
  resolveModelInfo: (payload) => ipcRenderer.invoke('agents:resolve-model-info', payload),
141
149
  resolveEpicModel: (payload) => ipcRenderer.invoke('agents:resolve-epic-model', payload),
142
150
  resolveEpicEffort: (payload) => ipcRenderer.invoke('agents:resolve-epic-effort', payload),
151
+ armory: (payload) => ipcRenderer.invoke('agents:armory', payload),
143
152
  // Fired after any save/delete/removeOverride so every mounted
144
153
  // subscriber (Agent Library, Tag Library) re-fetches the same file.
145
154
  onChanged: (handler) => {
@@ -582,6 +591,8 @@ contextBridge.exposeInMainWorld('api', {
582
591
  servicePairCancel: (pairingId) => ipcRenderer.invoke('webRemote:service-pair-cancel', { pairingId }),
583
592
  /** Revoke a paired service locally and at the relay. */
584
593
  serviceRevoke: (serviceId) => ipcRenderer.invoke('webRemote:service-revoke', { serviceId }),
594
+ /** Owner grant: auto-start work this service opens in `targets` (cwds or '*'); [] revokes. */
595
+ serviceSetStartWork: (serviceId, targets) => ipcRenderer.invoke('webRemote:service-set-start-work', { serviceId, targets }),
585
596
  /** Revoke a relay client no local service owns (an orphan). */
586
597
  relayClientRevoke: (clientId) => ipcRenderer.invoke('webRemote:relay-client-revoke', { clientId }),
587
598
  /** Push event when revokeAll completes (main broadcasts webRemote:revoked-all). */