claude-code-session-manager 0.132.0 → 0.133.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 (84) hide show
  1. package/README.md +3 -3
  2. package/dist/assets/{AgentLibrary-C09MlPFx.js → AgentLibrary-DOAG-mcG.js} +1 -1
  3. package/dist/assets/{AppSettings-DvDKsCnD.js → AppSettings-BHKM_AKh.js} +2 -2
  4. package/dist/assets/{Button-BzG_KdBC.js → Button-CmO1wmPw.js} +1 -1
  5. package/dist/assets/{DocumentEditorPane-fm6zsnLM.js → DocumentEditorPane-8QMNrNRt.js} +1 -1
  6. package/dist/assets/{Extensions-DgxKT_OZ.js → Extensions-Boo21B3b.js} +2 -2
  7. package/dist/assets/{History-Nd3bKjBq.js → History-C4epd1hp.js} +1 -1
  8. package/dist/assets/{Library-R71t6VAB.js → Library-CrgzRQzL.js} +1 -1
  9. package/dist/assets/{ListDetail-CG50Ul7c.js → ListDetail-DA7y1DQ-.js} +1 -1
  10. package/dist/assets/{Panel-C7EFG4eU.js → Panel-D-WMBhKH.js} +1 -1
  11. package/dist/assets/{ProjectClaudeConfig-J92iNEGC.js → ProjectClaudeConfig-CuUADpIu.js} +1 -1
  12. package/dist/assets/{ProvenanceBadge-C3KB3ILO.js → ProvenanceBadge-B7AsoRk6.js} +1 -1
  13. package/dist/assets/{Scheduler-DeYBA7uc.js → Scheduler-C86gRh51.js} +1 -1
  14. package/dist/assets/{Settings-B6r7N4v-.js → Settings-B4Q9DwVS.js} +1 -1
  15. package/dist/assets/{SkillReferenceGraph-D7bt3fyB.js → SkillReferenceGraph-DX4ZgvlY.js} +1 -1
  16. package/dist/assets/{Skills-GpxtUrFP.js → Skills-DqKI37yi.js} +1 -1
  17. package/dist/assets/{SourceChip-uyVMCZc7.js → SourceChip-C974LROr.js} +1 -1
  18. package/dist/assets/{SystemPrompt-Cv25uFSM.js → SystemPrompt-C502jIwO.js} +1 -1
  19. package/dist/assets/{TiptapBody-uP8fJkbM.js → TiptapBody-DwNXN6Ki.js} +1 -1
  20. package/dist/assets/{Toggle-DRs80cX-.js → Toggle-C2OsxnPK.js} +1 -1
  21. package/dist/assets/{ViewTabs-BDkvvzJ8.js → ViewTabs-DBxKGbAK.js} +1 -1
  22. package/dist/assets/{VoiceButton-Cmtz2sQt.js → VoiceButton-C680wpmX.js} +1 -1
  23. package/dist/assets/{historyTotals-DHwAXunq.js → historyTotals-Cz-VYPEc.js} +1 -1
  24. package/dist/assets/{index-oXqzajWV.css → index-CMwAikUb.css} +1 -1
  25. package/dist/assets/index-Dh5geJe3.js +3111 -0
  26. package/dist/index.html +2 -2
  27. package/dist-web/app.css +1 -1
  28. package/dist-web/app.js +427 -413
  29. package/package.json +1 -1
  30. package/src/main/build-info.json +4 -4
  31. package/src/main/chatRunner.cjs +77 -14
  32. package/src/main/index.cjs +13 -0
  33. package/src/main/ipcSchemas.cjs +54 -0
  34. package/src/main/lib/CLAUDE.md +2 -0
  35. package/src/main/lib/agent-cli/adapters/antigravity.cjs +147 -0
  36. package/src/main/lib/agent-cli/adapters/codex.cjs +170 -0
  37. package/src/main/lib/agent-cli/adapters/cursor.cjs +138 -0
  38. package/src/main/lib/agent-cli/adapters/gemini.cjs +119 -0
  39. package/src/main/lib/agent-cli/adapters/opencode.cjs +117 -0
  40. package/src/main/lib/agent-cli/agentCliEvents.cjs +94 -0
  41. package/src/main/lib/agent-cli/agentCliIpc.cjs +109 -0
  42. package/src/main/lib/agent-cli/agentCliRegistry.cjs +213 -0
  43. package/src/main/lib/agent-cli/agentCliSessionStore.cjs +152 -0
  44. package/src/main/lib/agent-cli/agentCliTurn.cjs +99 -0
  45. package/src/main/lib/app-preview/appPreviewIpc.cjs +125 -0
  46. package/src/main/lib/app-preview/appPreviewManager.cjs +317 -0
  47. package/src/main/lib/app-preview/appPreviewScripts.cjs +106 -0
  48. package/src/main/lib/app-preview/appPreviewSweep.cjs +92 -0
  49. package/src/main/lib/chatBootRecovery.cjs +41 -1
  50. package/src/main/lib/claude/agentEffortResolve.cjs +11 -3
  51. package/src/main/lib/epic/activeIndexMerge.cjs +25 -2
  52. package/src/main/lib/epic/archivedTranscript.cjs +39 -6
  53. package/src/main/lib/epic/epicChanges.cjs +466 -0
  54. package/src/main/lib/epic/epicMint.cjs +45 -1
  55. package/src/main/lib/epic/epicReopen.cjs +8 -2
  56. package/src/main/lib/epic/epicSpawnPlan.cjs +12 -0
  57. package/src/main/lib/epic/epicWorktreeMerge.cjs +39 -4
  58. package/src/main/lib/epic/promptSessionsCreateEpic.cjs +9 -4
  59. package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +2 -0
  60. package/src/main/lib/git/gitExec.cjs +9 -1
  61. package/src/main/lib/git/gitWorktree.cjs +94 -0
  62. package/src/main/lib/git/unifiedDiff.cjs +207 -0
  63. package/src/main/lib/mdDocCensus.cjs +364 -0
  64. package/src/main/lib/mdDocRefs.cjs +249 -0
  65. package/src/main/lib/mdNetworkScan.cjs +158 -15
  66. package/src/main/lib/persona-macro/macroJobDispatch.cjs +4 -1
  67. package/src/main/lib/persona-macro/macroJobIpc.cjs +1 -1
  68. package/src/main/lib/prd/prdCreate.cjs +7 -2
  69. package/src/main/lib/prd/prdFrontmatter.cjs +10 -3
  70. package/src/main/lib/promptSessionSchema.cjs +6 -0
  71. package/src/main/lib/remoteTranscriptTail.cjs +23 -4
  72. package/src/main/lib/scheduler/landedSinceRun.cjs +2 -1
  73. package/src/main/lib/scheduler/scheduleJobSchema.cjs +2 -0
  74. package/src/main/lib/scheduler/schedulerPaths.cjs +3 -0
  75. package/src/main/projectPages.cjs +14 -3
  76. package/src/main/scheduler/gitTreeGuard.cjs +2 -1
  77. package/src/main/scheduler/prdParser.cjs +2 -1
  78. package/src/main/scheduler.cjs +7 -2
  79. package/src/main/transcripts.cjs +18 -4
  80. package/src/main/webRemote.cjs +10 -5
  81. package/src/preload/api.d.ts +147 -2
  82. package/src/preload/apiSurface.json +56 -0
  83. package/src/preload/index.cjs +22 -0
  84. package/dist/assets/index-CBCdyHbZ.js +0 -3097
@@ -628,11 +628,13 @@ async function tailLines(filePath, fromOffset) {
628
628
  async function pollSessionWatcher(w) {
629
629
  // The transcript may not exist yet (new session) or may live under another
630
630
  // project/worktree encoding: re-resolve while the watched file is missing.
631
+ // An agent-CLI (non-Claude) Epic's transcript lives under agentCliSessionStore.
631
632
  if (!fs.existsSync(w.filePath)) {
632
633
  try {
633
- const next = require('./transcripts.cjs').transcriptPath(w.cwd, w.sessionId);
634
+ const agentPath = require('./lib/remoteTranscriptTail.cjs').agentCliTranscriptPath(w.sessionId);
635
+ const next = agentPath ?? require('./transcripts.cjs').transcriptPath(w.cwd, w.sessionId);
634
636
  if (next && next !== w.filePath) {
635
- validatePath(next);
637
+ if (!agentPath) validatePath(next);
636
638
  w.filePath = next;
637
639
  w.offset = null;
638
640
  w.inode = undefined;
@@ -674,11 +676,14 @@ async function pollSessionWatcher(w) {
674
676
 
675
677
  function startSessionWatch(tabId, cwd, sessionId = tabId) {
676
678
  if (_sessionWatchers.has(tabId)) return;
677
- const filePath = require('./transcripts.cjs').transcriptPath(cwd, sessionId);
679
+ const claudePath = require('./transcripts.cjs').transcriptPath(cwd, sessionId);
678
680
  // Defense in depth: the schema restricts tabId charset, but re-validate the
679
681
  // FINAL joined path against the home-dir boundary (validatePath resolves
680
682
  // symlinks + rejects escapes) before any fs read. Throws → dispatch drops it.
681
- validatePath(filePath);
683
+ validatePath(claudePath);
684
+ // Agent-CLI Epics: the store builds this path from a UUID-validated id under
685
+ // its own state root (never throws — a bad id resolves to null).
686
+ const filePath = require('./lib/remoteTranscriptTail.cjs').agentCliTranscriptPath(sessionId) ?? claudePath;
682
687
  const w = {
683
688
  tabId, cwd, sessionId, filePath,
684
689
  offset: null, // null → first poll reads a bounded tail then tracks EOF
@@ -1212,7 +1217,7 @@ function getDispatchMap() {
1212
1217
  if (!filePath || !sessionId) return { messages: [], hasMore: false, nextBefore: null };
1213
1218
  validatePath(filePath);
1214
1219
  const exchanges = await listExchanges({ cwd: parsed.cwd, sessionId, limit: limit + 1, offset: before });
1215
- const tail = before === 0 ? await readRecentChatMessages(filePath, { limit: 30 }) : [];
1220
+ const tail = before === 0 ? await readRecentChatMessages(filePath, { limit: 30, claudeSessionId: sessionId }) : [];
1216
1221
  return buildRemoteConversation({ exchanges, tail, limit, before });
1217
1222
  },
1218
1223
 
@@ -309,6 +309,37 @@ export interface McpCatalogResult {
309
309
  export type AgentPersonaTag = 'feature' | 'bug' | 'discussion' | 'build' | 'project-home-builder' | 'art' | 'portfolio';
310
310
 
311
311
  /** One declared `{{name}}` argument of a macro prompt (macroLibrary.cjs `MacroInputSchema`). */
312
+ export type AppPreviewStatus = 'starting' | 'running' | 'failed' | 'stopped';
313
+
314
+ /** One Epic's dev-server preview. cwd = project root, dir = folder the dev command runs in,
315
+ * command = the script text from package.json, startedAt = ISO time. */
316
+ export interface AppPreviewState {
317
+ epicId: string;
318
+ cwd: string;
319
+ dir: string;
320
+ script: string;
321
+ command: string;
322
+ port: number;
323
+ url: string | null;
324
+ status: AppPreviewStatus;
325
+ error: string | null;
326
+ pid: number | null;
327
+ startedAt: string;
328
+ }
329
+
330
+ export interface AppPreviewScript {
331
+ name: string;
332
+ command: string;
333
+ }
334
+
335
+ export type AppPreviewScriptsResult =
336
+ | { ok: true; dir: string; inWorktree: boolean; scripts: AppPreviewScript[]; suggested: string | null }
337
+ | { ok: false; error: string };
338
+
339
+ export type AppPreviewStartResult =
340
+ | { ok: true; state: AppPreviewState }
341
+ | { ok: false; error: string };
342
+
312
343
  export interface MacroInput {
313
344
  name: string;
314
345
  label: string;
@@ -328,6 +359,9 @@ export interface MacroJobDispatchInput {
328
359
  macroId: string;
329
360
  epicId: string;
330
361
  extraInstructions?: string;
362
+ /** Per-launch effort chosen in the high-effort cost dialog: one of low, medium, high, xhigh, max;
363
+ * main refuses anything else. Omitted = the persona's own effort. */
364
+ effort?: string;
331
365
  }
332
366
 
333
367
  export type MacroJobDispatchResult =
@@ -397,6 +431,23 @@ export interface MacroSaveInput {
397
431
  autoStartTargets?: string[];
398
432
  }
399
433
 
434
+ /** One `agentCli.detect` row — a non-Claude agent CLI and whether it is installed. */
435
+ export interface AgentCliDetectRow {
436
+ id: 'codex' | 'gemini' | 'antigravity' | 'cursor' | 'opencode';
437
+ label: string;
438
+ installed: boolean;
439
+ path: string | null;
440
+ version: string | null;
441
+ install: string | null;
442
+ docs: string;
443
+ login: string | null;
444
+ }
445
+
446
+ /** `agentCli.terminalCommand` result: a single-quoted shell line, or why there is none. */
447
+ export type AgentCliTerminalCommandResult =
448
+ | { ok: true; command: string }
449
+ | { ok: false; message: string };
450
+
400
451
  /** One global `~/.claude/agents/<name>.md` persona, per the Agent Library nav page. */
401
452
  export interface AgentPersona {
402
453
  name: string;
@@ -1684,7 +1735,11 @@ export interface MdNetworkOrphan {
1684
1735
  /** Broken links come first (in walk order), then orphan groups (by folder). */
1685
1736
  export type MdNetworkFinding = MdNetworkBrokenLink | MdNetworkOrphan;
1686
1737
 
1687
- /** A project's markdown link network, mapped from its root CLAUDE.md. */
1738
+ /**
1739
+ * A project's markdown link network, mapped from its root CLAUDE.md, plus a per-doc
1740
+ * census of every tracked .md (role, size, git recency, dead/stale refs, code mentions).
1741
+ * Orphan findings leave out docs the census puts in a record collection.
1742
+ */
1688
1743
  export interface MdNetwork {
1689
1744
  ok: true;
1690
1745
  /** The root doc, 'CLAUDE.md'. */
@@ -1699,11 +1754,27 @@ export interface MdNetwork {
1699
1754
  links: number;
1700
1755
  /** Top-level folders holding reachable docs, each with a trailing slash, sorted. */
1701
1756
  scopes: string[];
1757
+ /** Every tracked .md; docs left unread past the 2000 cap have `lines`/`bytes` null. A failed git call adds a `warnings` entry, never an error. */
1758
+ census: MdCensus;
1702
1759
  }
1703
1760
 
1704
1761
  /** `{ ok: false, error }` when there is nothing to map or the scan failed (not a git repo, no root CLAUDE.md, an ephemeral cwd). */
1705
1762
  export type MdNetworkResult = MdNetwork | { ok: false; error: string };
1706
1763
 
1764
+ // ────────────────────────────────────────────── Project Pages: markdown doc census
1765
+ // Mirrors the JSDoc typedefs in src/main/lib/mdDocCensus.cjs.
1766
+ // Every path is repo-relative POSIX; folder strings end with '/'.
1767
+
1768
+ /** How agents meet a doc: 'map' = the root + its @-imports; 'scoped' = another CLAUDE.md / AGENTS.md / CLAUDE.local.md; 'agent' = .claude/, skills/, plugin agents/commands; 'record' = in a record collection and unreachable; 'doc' = anything else. */
1769
+ export type MdDocRole = 'map' | 'scoped' | 'agent' | 'record' | 'doc';
1770
+
1771
+ export interface MdDoc { path: string; role: MdDocRole; depth: number | null; lines: number | null; bytes: number | null; lastCommitMs: number | null; commits: number; linkedFrom: number; codeRefs: number; codeRefFiles: string[]; deadRefs: string[]; changedSince: { path: string; ms: number }[]; collection: string | null; }
1772
+
1773
+ /** A folder of machine-written, write-once, unlinked docs (e.g. validation records). */
1774
+ export interface MdRecordCollection { folder: string; docs: number; linked: number; lastCommitMs: number | null; source: 'heuristic' | 'override'; }
1775
+
1776
+ export interface MdCensus { docs: MdDoc[]; collections: MdRecordCollection[]; counts: { tracked: number; network: number; records: number; unlinked: number; byRole: Record<MdDocRole, number> }; gitWindow: { commits: number; oldestMs: number | null }; warnings: string[]; }
1777
+
1707
1778
  // ────────────────────────────────────────────── Competitor matrix
1708
1779
  // Mirrors CompetitiveMatrixSchema in src/main/lib/project-pages/competitiveMatrix.cjs — keep field-for-field.
1709
1780
 
@@ -1824,6 +1895,52 @@ export interface GitFileStatus {
1824
1895
  workTreeStatus: string;
1825
1896
  }
1826
1897
 
1898
+ /** One line of a unified-diff hunk. `oldNo`/`newNo` are null on the side the line doesn't exist. */
1899
+ export interface DiffLine {
1900
+ kind: 'add' | 'del' | 'ctx';
1901
+ oldNo: number | null;
1902
+ newNo: number | null;
1903
+ text: string;
1904
+ }
1905
+
1906
+ export interface DiffHunk {
1907
+ header: string;
1908
+ oldStart: number;
1909
+ oldLines: number;
1910
+ newStart: number;
1911
+ newLines: number;
1912
+ lines: DiffLine[];
1913
+ }
1914
+
1915
+ export interface DiffFile {
1916
+ path: string;
1917
+ oldPath: string | null;
1918
+ status: 'added' | 'deleted' | 'modified' | 'renamed';
1919
+ binary: boolean;
1920
+ additions: number;
1921
+ deletions: number;
1922
+ hunks: DiffHunk[];
1923
+ truncated: boolean;
1924
+ tooLarge?: boolean;
1925
+ }
1926
+
1927
+ /** One reviewable slice of an Epic's changes: the session's own worktree work, or one landed PRD. */
1928
+ export interface EpicChangeSection {
1929
+ kind: 'session' | 'prd';
1930
+ key: string;
1931
+ label: string;
1932
+ slug?: string;
1933
+ base: string | null;
1934
+ head: string | null;
1935
+ live: boolean;
1936
+ files: DiffFile[];
1937
+ error?: string;
1938
+ }
1939
+
1940
+ export type EpicChanges =
1941
+ | { ok: true; epicId: string; status: string; sections: EpicChangeSection[]; truncated: boolean }
1942
+ | { ok: false; reason: string };
1943
+
1827
1944
  export interface GitStatusResult {
1828
1945
  branch: string;
1829
1946
  ahead: number;
@@ -2142,6 +2259,13 @@ export interface SessionManagerAPI {
2142
2259
  /** Desktop-only: the web remote is denied it (apiSurface remote: deny) — it spawns the server. */
2143
2260
  checkServer: (req: McpCheckRequest) => Promise<McpCheckResult>;
2144
2261
  };
2262
+ /** Non-Claude agent CLIs (main-side registry + adapters). Desktop-only: not exposed to the web remote. */
2263
+ agentCli: {
2264
+ /** One row per non-Claude CLI; cached 60 s in main unless `refresh`. Never rejects. */
2265
+ detect: (payload?: { refresh?: boolean }) => Promise<AgentCliDetectRow[]>;
2266
+ /** The exact shell line (no trailing CR) the Epic Terminal pane types to launch/resume this Epic's CLI. */
2267
+ terminalCommand: (payload: { cwd: string; claudeSessionId: string }) => Promise<AgentCliTerminalCommandResult>;
2268
+ };
2145
2269
  agents: {
2146
2270
  listPersonas: () => Promise<AgentPersona[]>;
2147
2271
  savePersona: (payload: AgentPersonaSaveInput) => Promise<{ ok: boolean; path: string }>;
@@ -2206,6 +2330,18 @@ export interface SessionManagerAPI {
2206
2330
  /** Fires after any save/delete/setProject — re-fetch list(). */
2207
2331
  onChanged: (handler: () => void) => () => void;
2208
2332
  };
2333
+ appPreview: {
2334
+ /** The Epic's package.json scripts (dir = worktree when it has one) plus a suggested dev script. */
2335
+ scripts: (payload: { cwd: string; epicId: string }) => Promise<AppPreviewScriptsResult>;
2336
+ /** Spawns the Epic's dev script on a free port after the user confirmed it; desktop only. */
2337
+ start: (payload: { cwd: string; epicId: string; script: string }) => Promise<AppPreviewStartResult>;
2338
+ /** Stops the Epic's preview process, if any. */
2339
+ stop: (payload: { epicId: string }) => Promise<{ ok: true }>;
2340
+ /** Every tracked preview, one per Epic. */
2341
+ list: () => Promise<AppPreviewState[]>;
2342
+ /** Fires on every preview state change with the new state. */
2343
+ onChanged(handler: (state: AppPreviewState) => void): () => void;
2344
+ };
2209
2345
  models: {
2210
2346
  /** Live model/effort catalog (`modelCatalog.cjs`'s `resolveModelCatalog`). Never rejects from
2211
2347
  * the resolver itself — a failed probe degrades down cache → floor and sets `degraded`.
@@ -2523,7 +2659,7 @@ export interface SessionManagerAPI {
2523
2659
  /** Read the project-pages library (knowledge/<id>/ pages and videos/<id>/ videos, each with its meta) as a `ProjectPagesGetResult`; empty lists if nothing exists yet. Never fires an LLM call. */
2524
2660
  get: (cwd: string) => Promise<ProjectPagesGetResult>;
2525
2661
  /** Map the project's markdown link network from its root CLAUDE.md (read-only, bounded, no LLM) for the Tools pane. Scans on every call — no watcher, no cache. `ok:false` (with `error`) for a cwd `get` answers with empty lists (tmpdir / linked worktree), a folder that is not a git repo, or no root CLAUDE.md; rejects on an invalid cwd, like `get`. */
2526
- mdNetwork: (payload: { cwd: string }) => Promise<MdNetworkResult>;
2662
+ mdNetwork: (payload: { cwd: string; recordFolders?: string[]; docFolders?: string[] }) => Promise<MdNetworkResult>;
2527
2663
  /** Read the saved Competitor matrix (project-pages/matrix/matrix.json) — read-only; writes go through project_matrix_write. */
2528
2664
  matrix: (payload: { cwd: string }) => Promise<CompetitorMatrixResult>;
2529
2665
  /** Start pushing `onChanged` events for this cwd's output dir. Refcounted per cwd; `ok:false` (reason 'ephemeral'|'invalid-cwd') means no live updates are possible, not an error. */
@@ -2554,6 +2690,11 @@ export interface SessionManagerAPI {
2554
2690
  * Read-only, no new writer — reads zero on any missing/unreadable state, never throws. */
2555
2691
  get: (cwd: string, epicId: string, claudeSessionId?: string | null) => Promise<{ prdsQueued: number; inlineEdits: number }>;
2556
2692
  };
2693
+ epicChanges: {
2694
+ /** Read-only diff of an Epic's changes, sectioned by session pin and per-PRD landed commit.
2695
+ * Never throws for a missing Epic/worktree — resolves `{ ok: false, reason }`. */
2696
+ get: (args: { cwd: string; epicId: string }) => Promise<EpicChanges>;
2697
+ };
2557
2698
  auditLog: {
2558
2699
  /** Append one Epic-lifecycle audit event to ~/.claude/session-manager/audit-log.jsonl.
2559
2700
  * Kind allowlist is enforced main-side (ipcSchemas.cjs) — this channel is
@@ -2751,6 +2892,10 @@ export interface PromptSessionsCreateEpicPayload {
2751
2892
  }>;
2752
2893
  /** Adopt an existing CLI session of this project instead of minting one. */
2753
2894
  restoreSessionId?: string;
2895
+ /** Agent CLI driving this Epic; absent = Claude Code. Non-Claude forces developLoop false and refuses restore. */
2896
+ agentCli?: 'claude' | 'codex' | 'gemini' | 'antigravity' | 'cursor' | 'opencode';
2897
+ /** Model for a non-Claude CLI; absent = that CLI's default. */
2898
+ agentCliModel?: string;
2754
2899
  }
2755
2900
 
2756
2901
  export interface PromptSessionsCreateEpicResult {
@@ -356,6 +356,20 @@
356
356
  "kind": "invoke",
357
357
  "remote": "deny"
358
358
  },
359
+ {
360
+ "ns": "agentCli",
361
+ "method": "detect",
362
+ "channel": "agentCli:detect",
363
+ "kind": "invoke",
364
+ "remote": "deny"
365
+ },
366
+ {
367
+ "ns": "agentCli",
368
+ "method": "terminalCommand",
369
+ "channel": "agentCli:terminal-command",
370
+ "kind": "invoke",
371
+ "remote": "deny"
372
+ },
359
373
  {
360
374
  "ns": "agents",
361
375
  "method": "listPersonas",
@@ -475,6 +489,41 @@
475
489
  "kind": "on",
476
490
  "remote": "read"
477
491
  },
492
+ {
493
+ "ns": "appPreview",
494
+ "method": "scripts",
495
+ "channel": "appPreview:scripts",
496
+ "kind": "invoke",
497
+ "remote": "deny"
498
+ },
499
+ {
500
+ "ns": "appPreview",
501
+ "method": "start",
502
+ "channel": "appPreview:start",
503
+ "kind": "invoke",
504
+ "remote": "deny"
505
+ },
506
+ {
507
+ "ns": "appPreview",
508
+ "method": "stop",
509
+ "channel": "appPreview:stop",
510
+ "kind": "invoke",
511
+ "remote": "mutate"
512
+ },
513
+ {
514
+ "ns": "appPreview",
515
+ "method": "list",
516
+ "channel": "appPreview:list",
517
+ "kind": "invoke",
518
+ "remote": "read"
519
+ },
520
+ {
521
+ "ns": "appPreview",
522
+ "method": "onChanged",
523
+ "channel": "appPreview:changed",
524
+ "kind": "on",
525
+ "remote": "read"
526
+ },
478
527
  {
479
528
  "ns": "models",
480
529
  "method": "catalog",
@@ -1448,6 +1497,13 @@
1448
1497
  "kind": "invoke",
1449
1498
  "remote": "read"
1450
1499
  },
1500
+ {
1501
+ "ns": "epicChanges",
1502
+ "method": "get",
1503
+ "channel": "epicChanges:get",
1504
+ "kind": "invoke",
1505
+ "remote": "read"
1506
+ },
1451
1507
  {
1452
1508
  "ns": "auditLog",
1453
1509
  "method": "append",
@@ -121,6 +121,11 @@ contextBridge.exposeInMainWorld('api', {
121
121
  // Desktop-only (apiSurface remote: deny) — main spawns the named server's configured command.
122
122
  checkServer: (req) => ipcRenderer.invoke('mcp:check-server', req),
123
123
  },
124
+ // Non-Claude agent CLIs (desktop-only; apiSurface remote: deny).
125
+ agentCli: {
126
+ detect: (payload) => ipcRenderer.invoke('agentCli:detect', payload),
127
+ terminalCommand: (payload) => ipcRenderer.invoke('agentCli:terminal-command', payload),
128
+ },
124
129
  agents: {
125
130
  listPersonas: () => ipcRenderer.invoke('agents:list-personas'),
126
131
  savePersona: (payload) => ipcRenderer.invoke('agents:save-persona', payload),
@@ -153,6 +158,18 @@ contextBridge.exposeInMainWorld('api', {
153
158
  return () => ipcRenderer.removeListener('macros:changed', listener);
154
159
  },
155
160
  },
161
+ appPreview: {
162
+ scripts: (payload) => ipcRenderer.invoke('appPreview:scripts', payload),
163
+ start: (payload) => ipcRenderer.invoke('appPreview:start', payload),
164
+ stop: (payload) => ipcRenderer.invoke('appPreview:stop', payload),
165
+ list: () => ipcRenderer.invoke('appPreview:list'),
166
+ // Fired on every preview state change; forwards the AppPreviewState payload.
167
+ onChanged: (handler) => {
168
+ const listener = (_e, state) => handler(state);
169
+ ipcRenderer.on('appPreview:changed', listener);
170
+ return () => ipcRenderer.removeListener('appPreview:changed', listener);
171
+ },
172
+ },
156
173
  models: {
157
174
  catalog: (payload) => ipcRenderer.invoke('models:catalog', payload),
158
175
  },
@@ -420,6 +437,11 @@ contextBridge.exposeInMainWorld('api', {
420
437
  get: (cwd, epicId, claudeSessionId) =>
421
438
  ipcRenderer.invoke('epicDelegationStats:get', { cwd, epicId, claudeSessionId: claudeSessionId ?? null }),
422
439
  },
440
+ epicChanges: {
441
+ // ONE payload object ({ cwd, epicId }) — the web remote forwards renderer
442
+ // args unchanged to handler(event, ...args) and validated() reads one payload.
443
+ get: (args) => ipcRenderer.invoke('epicChanges:get', args),
444
+ },
423
445
  auditLog: {
424
446
  append: (kind, fields) => ipcRenderer.invoke('auditLog:append', { kind, ...fields }),
425
447
  },