mulmoterminal 10.4.0 → 10.6.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 (158) hide show
  1. package/README.md +14 -4
  2. package/bin/avatar-check.d.ts +3 -0
  3. package/bin/avatar-check.js +25 -0
  4. package/bin/mulmoterminal.js +3 -0
  5. package/bin/remotion-check.d.ts +1 -0
  6. package/bin/remotion-check.js +9 -4
  7. package/bin/update-check.js +6 -1
  8. package/common/endedCellClose.ts +26 -0
  9. package/common/fileChannel.ts +4 -0
  10. package/dist/assets/{abnfDiagram-YUKMZFIV-1a-PY4nd.js → abnfDiagram-WEYOIA3C-Ll8Tq6AV.js} +1 -1
  11. package/dist/assets/{architecture-WOLXFQ4H-BcfO8oGO.js → architecture-WOLXFQ4H-F2o7qqpo.js} +1 -1
  12. package/dist/assets/{architectureDiagram-47P4ROYG-BdKH3Yik.js → architectureDiagram-ZHVYKT53-DaboVwEe.js} +1 -1
  13. package/dist/assets/{blockDiagram-E7TT5TSB-DcHZBO9O.js → blockDiagram-RJAE7QA3-CGWn_g-c.js} +1 -1
  14. package/dist/assets/{c4Diagram-CRA5TL53-D0T0eOFn.js → c4Diagram-XDPPPE54-BuP9UC59.js} +1 -1
  15. package/dist/assets/channel-B0OajmtD.js +1 -0
  16. package/dist/assets/{chunk-AW2ZBBNX-3dLb1pnr.js → chunk-2E7WHVMD-Bo7YuQoV.js} +1 -1
  17. package/dist/assets/{chunk-HTAEGDNF-DtEsRvQq.js → chunk-4EMNKR2T-D8wywNvw.js} +1 -1
  18. package/dist/assets/{chunk-7TKQ45FW-CzqFtEPJ.js → chunk-55XCU76K-vGQ9DpDb.js} +1 -1
  19. package/dist/assets/{chunk-3YJQHVM4-BMcZm-Hv.js → chunk-7S6XSTFO-Dzp8lPeY.js} +1 -1
  20. package/dist/assets/{chunk-E2ZNV5FY-DsDZphpO.js → chunk-AQDTSKZB-CFGL68LD.js} +1 -1
  21. package/dist/assets/{chunk-VPRB5NB3-sIyPxnYU.js → chunk-DSNLSHJZ-CEzOMBUc.js} +2 -2
  22. package/dist/assets/chunk-HAGFOTED-DyNvkM5y.js +62 -0
  23. package/dist/assets/chunk-HNE4Q36P-BnSZkit3.js +1 -0
  24. package/dist/assets/{chunk-EU5HNXII-DLxa3y3e.js → chunk-NQOKRVIF-DH69Ts2R.js} +1 -1
  25. package/dist/assets/{chunk-4EA7E6EY-F7Mst5qX.js → chunk-UHW7PFBP-TIkE7nGG.js} +1 -1
  26. package/dist/assets/{chunk-KQW6MTUR-R3h7c83D.js → chunk-VQ5W62QI-C2v_pZhZ.js} +1 -1
  27. package/dist/assets/chunk-WQQL4CDK-BfSxT8fr.js +10 -0
  28. package/dist/assets/{chunk-HJ2JQQFS-WPbIPBPU.js → chunk-YZO67HFG-BXyqT0YR.js} +1 -1
  29. package/dist/assets/{chunk-DBDB3WZW-Bx5h6vuo.js → chunk-ZAUX2LTX-Disc29s0.js} +1 -1
  30. package/dist/assets/{chunk-FVRAUYC3-ulNhT-b7.js → chunk-ZCHMQSOR-B1NM7cOo.js} +1 -1
  31. package/dist/assets/{classDiagram-v2-K4WV4PDN-C1kID963.js → classDiagram-v2-4MYWR3UA-Dz8IZJSz.js} +1 -1
  32. package/dist/assets/{cynefin-EF2NZ3EQ-BRhDQncU.js → cynefin-EF2NZ3EQ-CG9ZrOj-.js} +1 -1
  33. package/dist/assets/{cynefinDiagram-3GCD6N5R-DsHxAkmG.js → cynefinDiagram-WF24UDRP-CPzYbm5j.js} +1 -1
  34. package/dist/assets/{dagre-W4DXFKR2-C9spv494.js → dagre-NK4GIZVX-FthvuIgc.js} +1 -1
  35. package/dist/assets/{diagram-OVF4WLC6-RWG-hpqP.js → diagram-CBK3MWTC-_8CfeJGW.js} +1 -1
  36. package/dist/assets/{diagram-UMYRVEAY-CUZ98qEX.js → diagram-I5XIIV2D-vRgOi3de.js} +1 -1
  37. package/dist/assets/{diagram-PFPMY2P6-q5FXp7bR.js → diagram-ODIL2UCW-Db6re-y8.js} +1 -1
  38. package/dist/assets/{diagram-ZIFT7M5P-pTq41yhu.js → diagram-PFBEJUXE-B5soKDZ1.js} +1 -1
  39. package/dist/assets/{diagram-YEKJPTXX-CeAtXY_Z.js → diagram-RJA3I4VV-BOCJIA3i.js} +1 -1
  40. package/dist/assets/{diagram-2UJZ2QOL-TbP4rnLm.js → diagram-TYUNFSNR-DHE509KX.js} +1 -1
  41. package/dist/assets/{dist-CpZygVDf.js → dist-BhwfRHUZ.js} +1 -1
  42. package/dist/assets/{dist-ColzxW_C.js → dist-CcRq66XZ.js} +1 -1
  43. package/dist/assets/{dist-DVxnjpk-.js → dist-D9Zv1PMa.js} +1 -1
  44. package/dist/assets/{dist-DVkTItOZ.js → dist-DbuQdU8b.js} +1 -1
  45. package/dist/assets/{dist-BXNyE9Om.js → dist-Dn3sBVeP.js} +1 -1
  46. package/dist/assets/{ebnfDiagram-VR2GEFS7-DCOxqnAj.js → ebnfDiagram-V4P3TTPT-CKWGw4eq.js} +1 -1
  47. package/dist/assets/elk-QONTBCTQ-Dd-835hH.js +27 -0
  48. package/dist/assets/{erDiagram-O2IAPWRE-DvN6nYqN.js → erDiagram-KYQIGQAA-CDK17xNJ.js} +1 -1
  49. package/dist/assets/{eventmodeling-K75KTNOO-BffcDOZV.js → eventmodeling-K75KTNOO-BW542wZb.js} +1 -1
  50. package/dist/assets/flowDiagram-IUGLLWBU-D7LlzDxp.js +1 -0
  51. package/dist/assets/{ganttDiagram-R7TSEDQI-BXtrr88i.js → ganttDiagram-R7GPNTJY-CPFqLQbq.js} +1 -1
  52. package/dist/assets/{gitGraph-VSP46ZUC-B9IvIRQT.js → gitGraph-VSP46ZUC-DSo0pTTR.js} +1 -1
  53. package/dist/assets/{gitGraphDiagram-XJZIOB7I-DPe8wss1.js → gitGraphDiagram-PDYL7XHY-BH_YgYI9.js} +1 -1
  54. package/dist/assets/{index-DCYQH7HO.js → index-BGfm9wjj.js} +2132 -376
  55. package/dist/assets/{info-OHQRW6UA-CPNbTLJk.js → info-OHQRW6UA-Y2jOMp_q.js} +1 -1
  56. package/dist/assets/{infoDiagram-5W2HQ5XZ-CJmq2Fo1.js → infoDiagram-MVDRKAX5-BaeTa6op.js} +1 -1
  57. package/dist/assets/{ishikawaDiagram-K3B6WC7H-CB7ofYDd.js → ishikawaDiagram-HPEHV2GE-BTbbDH3h.js} +1 -1
  58. package/dist/assets/{journeyDiagram-COXZFDF6-D-WTvHLU.js → journeyDiagram-BOSHW7O7-TNk2cBxF.js} +1 -1
  59. package/dist/assets/{kanban-definition-P3RFRI5V-BaIVCZej.js → kanban-definition-FNSA4HC5-QSGoV6OY.js} +1 -1
  60. package/dist/assets/katex-B940_AAO.js +257 -0
  61. package/dist/assets/{line-DNJ3FEEl.js → line-Bs9za57d.js} +1 -1
  62. package/dist/assets/{manifold-Dp1qsv9E.js → manifold-Cng45y0-.js} +1 -1
  63. package/dist/assets/{marp-BantkFXR.js → marp-CWAfhmUo.js} +8 -8
  64. package/dist/assets/{mermaid-parser.core-C4UlFswH.js → mermaid-parser.core-CdnPzxSk.js} +3 -3
  65. package/dist/assets/{mermaid.core-CuefGF0S.js → mermaid.core-BVLO7qMH.js} +5 -5
  66. package/dist/assets/{mindmap-definition-LZFPQGKD-BQqVoS5B.js → mindmap-definition-6OY57UG3-DRWQIjeE.js} +11 -9
  67. package/dist/assets/{packet-JDAUHWVQ-DHl4ttnZ.js → packet-JDAUHWVQ-BZOTrQNk.js} +1 -1
  68. package/dist/assets/{pegDiagram-BGZESJAR-Dp-4HUhB.js → pegDiagram-ECIUJNBX-Dpwrv2z1.js} +1 -1
  69. package/dist/assets/{pie-XZMESJXO-ec1rFZSK.js → pie-XZMESJXO-D0EbxseJ.js} +1 -1
  70. package/dist/assets/{pieDiagram-CAPJLFHJ-uCWBWt0n.js → pieDiagram-GNMPY74T-DRuZ06Db.js} +1 -1
  71. package/dist/assets/{quadrantDiagram-GDMTTRAM-C0bx7INP.js → quadrantDiagram-D57K4MC3-CKlpFVim.js} +1 -1
  72. package/dist/assets/{radar-ABXABTNO-BerQeT63.js → radar-ABXABTNO-CAc2PaQt.js} +1 -1
  73. package/dist/assets/{railroad-I3PHUGI6-DGMbnInh.js → railroad-I3PHUGI6-Comi3RuA.js} +1 -1
  74. package/dist/assets/{railroad-abnf-LNEFI6M7-C91dtcVh.js → railroad-abnf-LNEFI6M7-CtGDrthG.js} +1 -1
  75. package/dist/assets/{railroad-ebnf-DWYD2UWJ-BtASeeFU.js → railroad-ebnf-DWYD2UWJ-BnhGglff.js} +1 -1
  76. package/dist/assets/{railroad-peg-JR7BVNR7-BLwhWLup.js → railroad-peg-JR7BVNR7-ClkVE9ii.js} +1 -1
  77. package/dist/assets/{railroadDiagram-SM67HX2B-B6Q62kZe.js → railroadDiagram-Y72NRBL7-ScBJj1FO.js} +1 -1
  78. package/dist/assets/{requirementDiagram-X7JNWC4A-BjL8Bux3.js → requirementDiagram-EQYSW5RA-CRVIl6Q-.js} +1 -1
  79. package/dist/assets/{sankeyDiagram-UM26HJRW-6GJJrLTP.js → sankeyDiagram-SY24JHO5-DFdiFLDW.js} +1 -1
  80. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-ePSLSZXA.js → sequenceDiagram-BLEHNHQU-DQMDYLGK.js} +1 -1
  81. package/dist/assets/{stateDiagram-v2-TBUQTH76-uf4Kl6c2.js → stateDiagram-v2-A6IESKWZ-E-Am9Bi3.js} +1 -1
  82. package/dist/assets/swimlanes-B3ENRKFQ-AlvLqUC0.js +1 -0
  83. package/dist/assets/swimlanesDiagram-AYQRV4AK-DiOz2s_v.js +8 -0
  84. package/dist/assets/{timeline-definition-YOQAKGHF-BKUL1fni.js → timeline-definition-JXYKGLGB-CmBedob5.js} +1 -1
  85. package/dist/assets/{treeView-D4JQ5SDB-CuUTmm1_.js → treeView-D4JQ5SDB-Dhipj3ZB.js} +1 -1
  86. package/dist/assets/{treemap-SAJKECNS-q3C7gduJ.js → treemap-SAJKECNS-CjstBoW1.js} +1 -1
  87. package/dist/assets/{usecaseDiagram-VIAY4XPW-QQbvR1nw.js → usecaseDiagram-WPOLBNNX-CmfTl_Et.js} +1 -1
  88. package/dist/assets/{vennDiagram-BLWOH2XV-BIzDFgsU.js → vennDiagram-Q3Y3IDCW-C_AEIecK.js} +1 -1
  89. package/dist/assets/{wardley-7MLQ67FV-BCNp2PxX.js → wardley-7MLQ67FV-RuDAm31w.js} +1 -1
  90. package/dist/assets/{wardleyDiagram-YMQ3BMBF-CpEpxLtR.js → wardleyDiagram-IVAIDKWA-BHHEGzwz.js} +1 -1
  91. package/dist/assets/{xychartDiagram-TAQBALBS-Dt81ggdZ.js → xychartDiagram-4URNHDU4-FnxylosZ.js} +1 -1
  92. package/dist/index.html +1 -1
  93. package/docs/ChangeLog.md +66 -0
  94. package/docs/facts.json +1 -1
  95. package/docs/guide/en/agents.md +4 -3
  96. package/docs/guide/en/feature-list.md +8 -1
  97. package/docs/guide/en/features.md +1 -1
  98. package/docs/guide/en/index.md +2 -2
  99. package/docs/guide/en/mulmocast.md +86 -1
  100. package/docs/guide/en/v10.5.0.md +128 -0
  101. package/docs/guide/en/v10.6.0.md +78 -0
  102. package/docs/guide/ja/agents.md +4 -3
  103. package/docs/guide/ja/feature-list.md +8 -1
  104. package/docs/guide/ja/features.md +1 -1
  105. package/docs/guide/ja/index.md +2 -2
  106. package/docs/guide/ja/mulmocast.md +79 -1
  107. package/docs/guide/ja/v10.5.0.md +122 -0
  108. package/docs/guide/ja/v10.6.0.md +75 -0
  109. package/package.json +21 -21
  110. package/server/agents/antigravity/antigravity-config-file.ts +45 -0
  111. package/server/agents/antigravity/antigravity-hook.ts +62 -0
  112. package/server/agents/antigravity/antigravity-hooks-file.ts +62 -0
  113. package/server/agents/antigravity/antigravity-skills.ts +3 -19
  114. package/server/backends/boot-backends.ts +6 -2
  115. package/server/backends/files/fileChange.ts +16 -2
  116. package/server/backends/plugins/mulmoscript.ts +27 -4
  117. package/server/backends/plugins/mulmoscriptWatch.ts +105 -0
  118. package/server/backends/plugins/mulmoscriptWatchRules.ts +39 -0
  119. package/server/config/env.ts +24 -0
  120. package/server/config/home-scope.ts +18 -0
  121. package/server/files/documentWatch.ts +19 -5
  122. package/server/infra/process/tmux.ts +6 -4
  123. package/server/mcp/broker.ts +12 -3
  124. package/server/mcp/tool-gate.ts +31 -3
  125. package/server/routes/app-routes.ts +4 -0
  126. package/server/routes/hook-routes.ts +2 -0
  127. package/server/routes/mcp-routes.ts +59 -20
  128. package/server/routes/plugin-routes.ts +15 -7
  129. package/server/routes/tool-routes.ts +16 -3
  130. package/server/routes/ws-routes.ts +9 -0
  131. package/server/session/pty/agent-pty-start.ts +1 -1
  132. package/server/session/pty/pty-exit-log.ts +1 -3
  133. package/server/session/pty/pty-exit.ts +46 -11
  134. package/server/session/pty/pty-relay.ts +4 -5
  135. package/server/session/registry.ts +42 -2
  136. package/server/session/scheduled/background-chat.ts +28 -4
  137. package/server/session/session-drops.ts +3 -2
  138. package/server/session/spawn/agents/gui-group-restriction-log.ts +36 -0
  139. package/server/session/spawn/agents/inherited-gui-restriction.ts +21 -0
  140. package/server/session/spawn/agents/session-gui-restriction.ts +25 -0
  141. package/server/session/spawn/agents/spawn-antigravity.ts +7 -3
  142. package/server/session/spawn/agents/spawn-claude.ts +33 -19
  143. package/server/session/spawn/agents/spawn-codex.ts +9 -3
  144. package/server/session/spawn/agents/spawn-copilot.ts +10 -4
  145. package/server/session/spawn/setup/mcp-config.ts +8 -0
  146. package/server/session/spawn/spawn-shell.ts +8 -7
  147. package/server/session/spawn/spawn-with-full-gui-claim.ts +6 -2
  148. package/server/session/types.ts +4 -0
  149. package/server/session/ws-frames.ts +13 -3
  150. package/dist/assets/channel-C9q4RMyO.js +0 -1
  151. package/dist/assets/chunk-2BW5OAIV-Ck_cbiU5.js +0 -10
  152. package/dist/assets/chunk-NTY3LDVX-D6-mE0IG.js +0 -1
  153. package/dist/assets/chunk-XC4XBNZT-DMb2Kcdk.js +0 -62
  154. package/dist/assets/elk-IJKZMXRS-CtxZtIWh.js +0 -27
  155. package/dist/assets/flowDiagram-OXPTDLAJ-ROw4PMg1.js +0 -1
  156. package/dist/assets/katex-DJhrJSbw.js +0 -257
  157. package/dist/assets/swimlanes-N4OXWK64-DqCgHQbo.js +0 -1
  158. package/dist/assets/swimlanesDiagram-K3J5GTZL-Bsa0QQGU.js +0 -8
package/README.md CHANGED
@@ -363,7 +363,8 @@ for the details and model notes.
363
363
  A global install isn't auto-updated, so on startup MulmoTerminal checks npm and
364
364
  prints a one-line notice when a newer version is available — and the web toolbar shows a
365
365
  clickable **update badge** with the exact command for your install (`npm i -g mulmoterminal`,
366
- or `git pull` for a clone). The server repeats that check every few hours, so a release that
366
+ or `git pull origin main && yarn install && yarn build` for a clone, then restart — a pull alone
367
+ updates the server's code but leaves the dependencies and the browser's build as they were). The server repeats that check every few hours, so a release that
367
368
  ships while it is running still reaches the badge; the startup console notice is printed once
368
369
  and is not repeated. Disable with `MULMOTERMINAL_NO_UPDATE_CHECK=1` (or `NO_UPDATE_NOTIFIER=1`).
369
370
 
@@ -668,7 +669,9 @@ a tmux session, so **a server crash or restart doesn't kill your terminals** —
668
669
  processes keep running and reattach when the server comes back (like `screen`/`tmux`).
669
670
  A long build, a dev server, or a mid-turn Claude session all survive `node --watch`
670
671
  reloads and crashes. It uses its **own** tmux server (`-L mulmoterminal`) and config, so
671
- it never touches your personal tmux sessions or keybindings.
672
+ it never touches your personal tmux sessions or keybindings. A server started with `HOME`
673
+ pointed somewhere else gets a tmux server of its own (`mulmoterminal-<hash>`), so it never
674
+ sweeps or reconfigures the sessions of the one running on your real home.
672
675
 
673
676
  **And the server comes back by itself.** `npx mulmoterminal` supervises the server it
674
677
  started: a crash is restarted with a short backoff, so the browser tab reconnects to the
@@ -2134,7 +2137,7 @@ From a shell: `mulmoterminal room read <room>` · `room post <room> <text…> [-
2134
2137
  | Endpoint | Purpose |
2135
2138
  | -------- | ------- |
2136
2139
  | `POST /api/mcp/:sessionId` | Per-session GUI MCP server (Streamable HTTP; `GET`/`DELETE` → 405). |
2137
- | `POST /api/plugin/:toolName` | GUI-plugin dispatch (incl. `spawnBackgroundChat`, `manageAccounting`, `presentHtml`). |
2140
+ | `POST /api/plugin/:toolName` | GUI-plugin dispatch (incl. `spawnBackgroundChat`, `manageAccounting`, `presentHtml`). `spawnBackgroundChat` takes an optional `guiGroups` (claude, codex and copilot): a list of tool groups (`render`, `data`, `media`, `external`) the spawned session is limited to, `[]` for no GUI tool. The limit holds across a resume, including a codex resume opened by its rollout id. It is not a sandbox: the tools stay callable over HTTP. |
2138
2141
  | `GET /api/agent/toolResults/:id` · `POST /api/agent/toolResult` | GUI-panel result history / persist. |
2139
2142
  | `GET /api/tools` · `GET /api/tool-calls/:id` | Available tools / tool-call history. |
2140
2143
  | `POST /api/accounting` | Double-entry accounting (bundled plugin). |
@@ -2184,7 +2187,7 @@ connection (or reattach to an existing background PTY).
2184
2187
  | ------- | ------- |
2185
2188
  | `{ "type": "session", "id": string }` | Sent immediately on connect — the session id this socket is bound to (lets the client learn a new session's generated id). |
2186
2189
  | `{ "type": "output", "data": string }` | PTY output to write to the terminal. On reattach, the first `output` frame is the replayed tail buffer (≤ 64 KB). |
2187
- | `{ "type": "exit", "exitCode": number, "signal": number }` | The `claude` process exited; the socket then closes. |
2190
+ | `{ "type": "exit", "exitCode": number, "signal": number, "lifetimeMs": number, "reattached": boolean, "ended": boolean }` | The pty exited; the socket then closes. `ended` is true only when the SESSION ended (tmux closed with the program) — a tmux client killed from outside, or an exit after an explicit close or restart, sends `false`. Under tmux `exitCode` is the client's and reads `0` even when the program failed. `lifetimeMs` is this pty's, which on a reattach (`reattached: true`) is not the program's. An agent cell closes itself on `ended` unless the program died while starting. The three newer fields are additive; a client treats their absence as "not ended". |
2188
2191
  | `{ "type": "paneMode", "inCopyMode": boolean }` | tmux-backed sessions only: whether the pane is in tmux copy-mode, where keys go to tmux instead of the program. Sent when it changes, and again to a reattached socket. |
2189
2192
 
2190
2193
  **Client → server** (JSON text frames):
@@ -2330,6 +2333,13 @@ Key rules:
2330
2333
  offering to take it over — and the server answers "anywhere" from its own PTY
2331
2334
  table plus tmux, so another browser tab and a second `mulmoterminal` process
2332
2335
  count too.
2336
+ - **An agent that ends on its own takes its cell with it.** `/exit`, Ctrl+C or a crash
2337
+ closes the cell as the close button would, so it is in the palette's **Reopen** list
2338
+ and resumes the conversation. Three cases keep the `[session ended]` banner instead:
2339
+ an agent that died while still starting up (a launch failure — under tmux its
2340
+ exit code reads 0, so the banner is the only evidence), a tmux client killed from
2341
+ outside while the agent still runs, and a worktree cell (its close asks whether to
2342
+ keep the worktree).
2333
2343
  - Brand-new sessions are listed **immediately** (before their `.jsonl`
2334
2344
  exists) via the in-memory `knownSessions` registry + a `created` push; an
2335
2345
  unused one disappears when its PTY is reaped.
@@ -0,0 +1,3 @@
1
+ export declare const AVATAR_PACKAGES: readonly string[];
2
+ export declare function avatarCheckLine(missing: readonly string[]): string;
3
+ export declare function avatarCheck(pkgDir: string): string | null;
@@ -0,0 +1,25 @@
1
+ // Whether mulmocast can render a talking avatar on this machine. Like Remotion's, its packages are
2
+ // optional peers of mulmocast that a user installs only to use them — into ~/node_modules, since an
3
+ // npx entry is replaced on every release — so they are looked for from mulmocast's own location.
4
+
5
+ import { missingRemotionPackages, optionalPackagesLine, resolverFromMulmocast } from "./remotion-check.js";
6
+
7
+ /** What an avatar needs, as mulmocast's own install hint names it (it exports no list of its own). */
8
+ export const AVATAR_PACKAGES = ["avatarscript", "onnxruntime-node"];
9
+
10
+ const AVATAR = {
11
+ label: "avatar",
12
+ why: "talking avatars in MulmoCast videos",
13
+ guideUrl: "https://receptron.github.io/mulmoterminal/guide/en/mulmocast.html#avatar",
14
+ };
15
+
16
+ export function avatarCheckLine(missing) {
17
+ return optionalPackagesLine(AVATAR, missing, AVATAR_PACKAGES.length);
18
+ }
19
+
20
+ /** The `init` line for avatars, or null when mulmocast cannot be found. */
21
+ export function avatarCheck(pkgDir) {
22
+ const isResolvable = resolverFromMulmocast(pkgDir);
23
+ if (!isResolvable) return null;
24
+ return avatarCheckLine(missingRemotionPackages(AVATAR_PACKAGES, isResolvable));
25
+ }
@@ -15,6 +15,7 @@ import { fileURLToPath } from "node:url";
15
15
  import { computeUpdateNotice, isUpdateCheckDisabled } from "./update-check.js";
16
16
  import { detectNpxCacheDir, npxCacheHintLines } from "./npx-cache-hint.js";
17
17
  import { remotionCheck } from "./remotion-check.js";
18
+ import { avatarCheck } from "./avatar-check.js";
18
19
  import { configuredRemoteServer, sshTunnelHintLines } from "./ssh-hint.js";
19
20
  import { planAfterServerExit } from "./server-supervision.js";
20
21
  import { waitUntilReady } from "./wait-ready.js";
@@ -257,6 +258,8 @@ async function runInit(initArgs) {
257
258
  [...PATH_TOOLS, fileDialogTool()].filter(Boolean).forEach((tool) => console.log(toolCheckLine(tool)));
258
259
  const remotionLine = await remotionCheck(PKG_DIR);
259
260
  if (remotionLine) console.log(remotionLine);
261
+ const avatarLine = avatarCheck(PKG_DIR);
262
+ if (avatarLine) console.log(avatarLine);
260
263
 
261
264
  // Config half: derive working-dir presets from Claude history + write config.json.
262
265
  console.log("");
@@ -1,5 +1,6 @@
1
1
  export declare function resolverFromMulmocast(pkgDir: string): ((name: string) => boolean) | null;
2
2
  export declare function remotionPackagesFromMulmocast(pkgDir: string): Promise<readonly string[] | null>;
3
3
  export declare function missingRemotionPackages(packages: readonly string[], isResolvable: (name: string) => boolean): string[];
4
+ export declare function optionalPackagesLine(what: { label: string; why: string; guideUrl: string }, missing: readonly string[], total: number): string;
4
5
  export declare function remotionCheckLine(missing: readonly string[], total: number): string;
5
6
  export declare function remotionCheck(pkgDir: string): Promise<string | null>;
@@ -45,11 +45,16 @@ export function missingRemotionPackages(packages, isResolvable) {
45
45
  return packages.filter((name) => !isResolvable(name));
46
46
  }
47
47
 
48
- export function remotionCheckLine(missing, total) {
49
- if (missing.length === 0) return ` ✓ remotion — ${WHY}`;
48
+ /** The `init` line for a set of optional packages: passing, absent, or installed only in part. */
49
+ export function optionalPackagesLine({ label, why, guideUrl }, missing, total) {
50
+ if (missing.length === 0) return ` ✓ ${label} — ${why}`;
50
51
  const head =
51
- missing.length === total ? ` ○ remotion — optional (${WHY})` : ` ○ remotion — optional (${WHY}), installed only in part; missing: ${missing.join(", ")}`;
52
- return `${head}\n → ${GUIDE_URL}`;
52
+ missing.length === total ? ` ○ ${label} — optional (${why})` : ` ○ ${label} — optional (${why}), installed only in part; missing: ${missing.join(", ")}`;
53
+ return `${head}\n → ${guideUrl}`;
54
+ }
55
+
56
+ export function remotionCheckLine(missing, total) {
57
+ return optionalPackagesLine({ label: "remotion", why: WHY, guideUrl: GUIDE_URL }, missing, total);
53
58
  }
54
59
 
55
60
  /** The `init` line for remotion, or null when mulmocast cannot be asked. */
@@ -154,11 +154,16 @@ export function isSafeBranchName(name) {
154
154
  // and equal shas mean it is already current. Only a clean checkout whose HEAD
155
155
  // differs from the remote's is behind — count is deliberately absent, since
156
156
  // counting commits needs the objects a `git fetch` would bring and we skip it.
157
+ // A pull alone updates the server's code and nothing else: the dependencies and the browser's
158
+ // build stay as they were, and this notice clears anyway, so the command carries both steps. The
159
+ // restart is said before "run: " because what follows it is the part the badge copies.
160
+ const AFTER_PULL = "yarn install && yarn build";
161
+
157
162
  export function gitUpdateNotice({ localSha, localShort, remoteSha, defaultBranch, dirty }) {
158
163
  if (dirty) return null;
159
164
  if (!localSha || !remoteSha || localSha === remoteSha) return null;
160
165
  const pull = isSafeBranchName(defaultBranch) ? `git pull origin ${defaultBranch}` : "git pull";
161
- return `Update available: ${localShort || localSha.slice(0, 7)} → origin · run: ${pull}`;
166
+ return `Update available: ${localShort || localSha.slice(0, 7)} → origin (restart after updating) · run: ${pull} && ${AFTER_PULL}`;
162
167
  }
163
168
 
164
169
  // ls-remote reaches the network (an SSH/HTTPS handshake to the origin host), so it routinely
@@ -0,0 +1,26 @@
1
+ // When an agent cell closes itself because its session ended (#3049). Shared because the server
2
+ // measures the startup window for its exit log and the browser decides the close from the same one.
3
+
4
+ // Under this, an exit is a failure to start rather than an ending. Claude Code takes ~1.5s to
5
+ // draw its first frame here, so anything inside this window is a process that never got going.
6
+ export const STARTUP_WINDOW_MS = 2000;
7
+
8
+ export interface EndedCellExit {
9
+ /** The server reaped the session — not merely lost the tmux client, which leaves the agent running. */
10
+ sessionEnded: boolean;
11
+ /** How long the pty lived, or null when the frame named none. Under tmux the exit code is the
12
+ * client's and reads 0 even for an agent that failed to start, so the lifetime is what is left
13
+ * to tell a launch failure, whose banner must stay readable, from an agent that was ended. */
14
+ lifetimeMs: number | null;
15
+ /** The pty attached to an agent that was already running, so its lifetime is not the agent's
16
+ * and an exit soon after the attach is an ending, not a launch failure. */
17
+ reattached: boolean;
18
+ /** A worktree cell's close asks whether to keep the worktree; that is not asked unprompted. */
19
+ worktreeCell: boolean;
20
+ }
21
+
22
+ export function shouldCloseEndedCell(exit: EndedCellExit): boolean {
23
+ if (!exit.sessionEnded || exit.worktreeCell) return false;
24
+ if (exit.reattached) return true;
25
+ return exit.lifetimeMs !== null && exit.lifetimeMs >= STARTUP_WINDOW_MS;
26
+ }
@@ -14,6 +14,10 @@ const PATH_MARKER = ":file:";
14
14
  /** The scope the markdown plugin's View and the server's markdown matcher agree on. */
15
15
  export const MARKDOWN_FILE_SCOPE = "markdown";
16
16
 
17
+ /** The mulmoScript plugin's scope: its View's runtime channels (`plugin:mulmoScript:<event>`), and
18
+ * the one-file channel the Files pane subscribes to so the server watches an open story (#3014). */
19
+ export const MULMOSCRIPT_SCOPE = "mulmoScript";
20
+
17
21
  /** The channel one file is announced on, under one plugin scope. */
18
22
  export function pluginFileChannel(scope: string, posixPath: string): string {
19
23
  return `${CHANNEL_PREFIX}${scope}${PATH_MARKER}${posixPath}`;
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-C4UlFswH.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-JH1jZ6Eh.js";import"./chunk-VPRB5NB3-sIyPxnYU.js";import{n as i,r as a,t as o}from"./chunk-AW2ZBBNX-3dLb1pnr.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-CuefGF0S.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
1
+ import{m as e,t}from"./mermaid-parser.core-CdnPzxSk.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-JH1jZ6Eh.js";import"./chunk-DSNLSHJZ-CEzOMBUc.js";import{n as i,r as a,t as o}from"./chunk-2E7WHVMD-Bo7YuQoV.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BVLO7qMH.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
@@ -1 +1 @@
1
- import"./chunk-NGNAAXSQ-C2Wy9Xmz.js";export{M as createArchitectureServices}from"./mermaid-parser.core-C4UlFswH.js";
1
+ import"./chunk-NGNAAXSQ-C2Wy9Xmz.js";export{M as createArchitectureServices}from"./mermaid-parser.core-CdnPzxSk.js";