mulmoterminal 11.5.0 → 11.7.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.
- package/README.md +29 -17
- package/bin/child-shutdown.d.ts +23 -0
- package/bin/child-shutdown.js +83 -0
- package/bin/mulmoterminal.js +1 -38
- package/bin/server-supervision.js +8 -7
- package/bin/stop.d.ts +6 -0
- package/bin/stop.js +46 -14
- package/common/headerChips.ts +1 -1
- package/dist/assets/{Notation-ntjjL2Db-CWj9gTcd.js → Notation-ntjjL2Db-SIELVvDc.js} +1 -1
- package/dist/assets/{abnfDiagram-WEYOIA3C-Zss16q3K.js → abnfDiagram-WEYOIA3C-qrj5omIa.js} +1 -1
- package/dist/assets/{architecture-WOLXFQ4H-DTsHKn0G.js → architecture-WOLXFQ4H-scj6_TFp.js} +1 -1
- package/dist/assets/{architectureDiagram-ZHVYKT53-BNbFIRvQ.js → architectureDiagram-ZHVYKT53-Ct8HZycm.js} +1 -1
- package/dist/assets/{blockDiagram-RJAE7QA3-D6HPyPO_.js → blockDiagram-RJAE7QA3-CEqcREax.js} +1 -1
- package/dist/assets/{c4Diagram-XDPPPE54-CD2luMRS.js → c4Diagram-XDPPPE54-D1uSR0-h.js} +1 -1
- package/dist/assets/channel-CXxv-lYJ.js +1 -0
- package/dist/assets/{chunk-2E7WHVMD-BPmLRCSF.js → chunk-2E7WHVMD-Bg9e9cMJ.js} +1 -1
- package/dist/assets/{chunk-4EMNKR2T-DEOOfxe8.js → chunk-4EMNKR2T-Diae1x3Z.js} +1 -1
- package/dist/assets/{chunk-55XCU76K-rymJ-3S9.js → chunk-55XCU76K-DEYgPowh.js} +1 -1
- package/dist/assets/{chunk-7S6XSTFO-ChlqVvq-.js → chunk-7S6XSTFO-B32Jswou.js} +1 -1
- package/dist/assets/{chunk-AQDTSKZB-imLL2Lvo.js → chunk-AQDTSKZB-Cl8QnO0x.js} +1 -1
- package/dist/assets/{chunk-DSNLSHJZ-B5SdfiDR.js → chunk-DSNLSHJZ-CTGJuMWJ.js} +1 -1
- package/dist/assets/{chunk-HAGFOTED-8NfWMcDD.js → chunk-HAGFOTED-Ts34JiHo.js} +1 -1
- package/dist/assets/{chunk-HNE4Q36P-BrnajitG.js → chunk-HNE4Q36P-DcIdHmLs.js} +1 -1
- package/dist/assets/{chunk-NQOKRVIF-DIb2o8lr.js → chunk-NQOKRVIF-BpOxOTb_.js} +1 -1
- package/dist/assets/{chunk-UHW7PFBP-D8Ky3MG9.js → chunk-UHW7PFBP-CATa77xv.js} +1 -1
- package/dist/assets/{chunk-VQ5W62QI-BVpVFla-.js → chunk-VQ5W62QI-Dut0o7r8.js} +1 -1
- package/dist/assets/{chunk-WQQL4CDK-C7JQ4A38.js → chunk-WQQL4CDK-CI6ZYaNQ.js} +1 -1
- package/dist/assets/{chunk-YZO67HFG-CrRxld04.js → chunk-YZO67HFG-C9GK9EHI.js} +1 -1
- package/dist/assets/{chunk-ZAUX2LTX-BinEoQbm.js → chunk-ZAUX2LTX-DvB1xrTf.js} +1 -1
- package/dist/assets/{chunk-ZCHMQSOR-CZSq1Lsx.js → chunk-ZCHMQSOR-Ba-Wa_ai.js} +1 -1
- package/dist/assets/{classDiagram-v2-4MYWR3UA-CNiE_Ji5.js → classDiagram-v2-4MYWR3UA-CgZfd72R.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-BbN_p-vu.js → cynefin-EF2NZ3EQ-CUuOyaIi.js} +1 -1
- package/dist/assets/{cynefinDiagram-WF24UDRP-CH42Y5v7.js → cynefinDiagram-WF24UDRP-ba-b3Kr4.js} +1 -1
- package/dist/assets/{dagre-NK4GIZVX-_muelWrm.js → dagre-NK4GIZVX-DYI4hiqr.js} +1 -1
- package/dist/assets/{diagram-CBK3MWTC-DpzeZPYt.js → diagram-CBK3MWTC-CyPx1gkV.js} +1 -1
- package/dist/assets/{diagram-I5XIIV2D-C4Fdf-JM.js → diagram-I5XIIV2D-C6Pfgk9c.js} +1 -1
- package/dist/assets/{diagram-ODIL2UCW-O5Cxitlb.js → diagram-ODIL2UCW-BvpAaDcb.js} +1 -1
- package/dist/assets/{diagram-PFBEJUXE-BUuigBun.js → diagram-PFBEJUXE-DRzZejrT.js} +1 -1
- package/dist/assets/{diagram-RJA3I4VV-CONsFXyj.js → diagram-RJA3I4VV-DPrfDi_p.js} +1 -1
- package/dist/assets/{diagram-TYUNFSNR-CpynoTAh.js → diagram-TYUNFSNR-BmbLii_g.js} +1 -1
- package/dist/assets/{dist-CmQ40R5k.js → dist-6r7uSjcE.js} +1 -1
- package/dist/assets/{dist-BzByTvhm.js → dist-7R-Qkasc.js} +1 -1
- package/dist/assets/{dist-DWXMgh4m.js → dist-B5Pfp7fC.js} +1 -1
- package/dist/assets/dist-BKFd7qac.js +2 -0
- package/dist/assets/{dist-CHuoIB6Q.js → dist-BbBhGgZY.js} +1 -1
- package/dist/assets/{dist-D8RIqh79.js → dist-D5GzfZuB.js} +1 -1
- package/dist/assets/{ebnfDiagram-V4P3TTPT-Cc_ovyXz.js → ebnfDiagram-V4P3TTPT-CN-xjjCu.js} +1 -1
- package/dist/assets/{echarts-gl-CI_7dr5Y.js → echarts-gl-DdjFnJmg.js} +1 -1
- package/dist/assets/{elk-QONTBCTQ-CLzPyAjy.js → elk-QONTBCTQ-BSJ4liYc.js} +1 -1
- package/dist/assets/{emscripten-module-Q67P5WYC-DHAzrbpf.js → emscripten-module-Q67P5WYC-BRT9QNsx.js} +1 -1
- package/dist/assets/{erDiagram-KYQIGQAA-WhXXqU4j.js → erDiagram-KYQIGQAA-BTgLj8Bq.js} +1 -1
- package/dist/assets/{eventmodeling-K75KTNOO-cMxcC0PI.js → eventmodeling-K75KTNOO-BL4C76Nz.js} +1 -1
- package/dist/assets/flowDiagram-IUGLLWBU-BcEStGDe.js +1 -0
- package/dist/assets/{ganttDiagram-R7GPNTJY-C6kevpBh.js → ganttDiagram-R7GPNTJY-DXeezOIA.js} +1 -1
- package/dist/assets/{gitGraph-VSP46ZUC-DjeGzW_y.js → gitGraph-VSP46ZUC-CRsvIlNG.js} +1 -1
- package/dist/assets/{gitGraphDiagram-PDYL7XHY-BQ1zSOMT.js → gitGraphDiagram-PDYL7XHY-nMUAcytr.js} +1 -1
- package/dist/assets/{index-CC-6hdYl.css → index-CRezQ7dF.css} +1 -1
- package/dist/assets/{index-CusRx9qi.js → index-V8EFkGOj.js} +614 -614
- package/dist/assets/{info-OHQRW6UA-CmM4Q4IB.js → info-OHQRW6UA-DTSGHLpf.js} +1 -1
- package/dist/assets/{infoDiagram-MVDRKAX5-or8fsYr6.js → infoDiagram-MVDRKAX5-tWohr5ca.js} +1 -1
- package/dist/assets/{ishikawaDiagram-HPEHV2GE-X64B1gsF.js → ishikawaDiagram-HPEHV2GE-CTELYtAZ.js} +1 -1
- package/dist/assets/{journeyDiagram-BOSHW7O7-JEMaR_hp.js → journeyDiagram-BOSHW7O7-CmxoqusI.js} +1 -1
- package/dist/assets/{kanban-definition-FNSA4HC5-CLsrRMy7.js → kanban-definition-FNSA4HC5-DRI-TDyi.js} +1 -1
- package/dist/assets/{line-D9yZQMYH.js → line-DTuFqe2v.js} +1 -1
- package/dist/assets/{manifold-BCGa0xSy.js → manifold-C7zxPzH4.js} +1 -1
- package/dist/assets/{mermaid-parser.core-buF30qM2.js → mermaid-parser.core-D43YG_Lz.js} +3 -3
- package/dist/assets/{mermaid.core-C4fn8974.js → mermaid.core-BT_hXsMY.js} +4 -4
- package/dist/assets/{mindmap-definition-6OY57UG3-BIeat7cx.js → mindmap-definition-6OY57UG3-Di7hdZ3w.js} +1 -1
- package/dist/assets/{packet-JDAUHWVQ-DS02QUvq.js → packet-JDAUHWVQ-B-BbLorh.js} +1 -1
- package/dist/assets/{pegDiagram-ECIUJNBX-NNs_91In.js → pegDiagram-ECIUJNBX-LFPIhQPf.js} +1 -1
- package/dist/assets/{pie-XZMESJXO-CgRSIBxi.js → pie-XZMESJXO-CszfEvIf.js} +1 -1
- package/dist/assets/{pieDiagram-GNMPY74T-C0UoQ1-r.js → pieDiagram-GNMPY74T-DomAB1q9.js} +1 -1
- package/dist/assets/{quadrantDiagram-D57K4MC3-D5Wbn8Cu.js → quadrantDiagram-D57K4MC3-oxjixNRR.js} +1 -1
- package/dist/assets/{radar-ABXABTNO-BuU3LZP7.js → radar-ABXABTNO-BNPaJq7e.js} +1 -1
- package/dist/assets/{railroad-I3PHUGI6-CbZvnqVq.js → railroad-I3PHUGI6-BOFGU08T.js} +1 -1
- package/dist/assets/{railroad-abnf-LNEFI6M7-DMTQ5ilY.js → railroad-abnf-LNEFI6M7-BvmNoIpm.js} +1 -1
- package/dist/assets/{railroad-ebnf-DWYD2UWJ-DPzo0tSy.js → railroad-ebnf-DWYD2UWJ-DKt4Abtu.js} +1 -1
- package/dist/assets/{railroad-peg-JR7BVNR7-D9JUN3tH.js → railroad-peg-JR7BVNR7-8yAJ4xxt.js} +1 -1
- package/dist/assets/{railroadDiagram-Y72NRBL7-D2_RwvSv.js → railroadDiagram-Y72NRBL7-eZDOlwyP.js} +1 -1
- package/dist/assets/{requirementDiagram-EQYSW5RA-DlvzxgDj.js → requirementDiagram-EQYSW5RA-CN67TEVw.js} +1 -1
- package/dist/assets/{sankeyDiagram-SY24JHO5-BrOFtBRY.js → sankeyDiagram-SY24JHO5-Cx4_JPbB.js} +1 -1
- package/dist/assets/{sequenceDiagram-BLEHNHQU-CuQmun7K.js → sequenceDiagram-BLEHNHQU-DRhlprVi.js} +1 -1
- package/dist/assets/{stateDiagram-v2-A6IESKWZ-DIYl6A4R.js → stateDiagram-v2-A6IESKWZ-OKU5HoKo.js} +1 -1
- package/dist/assets/{swimlanes-B3ENRKFQ-zWPb3HUM.js → swimlanes-B3ENRKFQ-BLEHIC-n.js} +1 -1
- package/dist/assets/swimlanesDiagram-AYQRV4AK-DJxhGpRP.js +8 -0
- package/dist/assets/{timeline-definition-JXYKGLGB-By3IMB4u.js → timeline-definition-JXYKGLGB-km7e4ipt.js} +1 -1
- package/dist/assets/{treeView-D4JQ5SDB-tTt-lUMH.js → treeView-D4JQ5SDB-CkTy4fNJ.js} +1 -1
- package/dist/assets/{treemap-SAJKECNS-DEzgMQGq.js → treemap-SAJKECNS-CoNtm-YL.js} +1 -1
- package/dist/assets/{usecaseDiagram-WPOLBNNX-jZw5S7L2.js → usecaseDiagram-WPOLBNNX-BngpchH7.js} +1 -1
- package/dist/assets/{vennDiagram-Q3Y3IDCW-DqJQFjkp.js → vennDiagram-Q3Y3IDCW-W_Qtt2Z2.js} +1 -1
- package/dist/assets/{wardley-7MLQ67FV-DrD0u4NO.js → wardley-7MLQ67FV-C6g6oCoi.js} +1 -1
- package/dist/assets/{wardleyDiagram-IVAIDKWA-KP8YD5qL.js → wardleyDiagram-IVAIDKWA-CbzF0ViY.js} +1 -1
- package/dist/assets/{xychartDiagram-4URNHDU4-kBzELbXd.js → xychartDiagram-4URNHDU4-DfeIJDAf.js} +1 -1
- package/dist/index.html +2 -2
- package/docs/ChangeLog.md +80 -0
- package/docs/facts.json +1 -1
- package/docs/guide/en/config.md +1 -1
- package/docs/guide/en/feature-list.md +9 -1
- package/docs/guide/en/features.md +6 -3
- package/docs/guide/en/header-reference.md +2 -1
- package/docs/guide/en/index.md +3 -2
- package/docs/guide/en/v11.5.0.md +4 -0
- package/docs/guide/en/v11.6.0.md +117 -0
- package/docs/guide/en/v11.7.0.md +128 -0
- package/docs/guide/ja/config.md +1 -1
- package/docs/guide/ja/feature-list.md +9 -1
- package/docs/guide/ja/features.md +6 -3
- package/docs/guide/ja/header-reference.md +2 -1
- package/docs/guide/ja/index.md +3 -2
- package/docs/guide/ja/v11.5.0.md +7 -2
- package/docs/guide/ja/v11.6.0.md +108 -0
- package/docs/guide/ja/v11.7.0.md +124 -0
- package/package.json +2 -2
- package/server/agents/claude/claude-peer-registry.ts +172 -0
- package/server/agents/claude/claude-peers.ts +132 -0
- package/server/backends/plugins/markdown-pdf.ts +122 -0
- package/server/backends/plugins/markdown.ts +2 -16
- package/server/backends/remoteHost/hostSessionList.ts +1 -0
- package/server/backends/remoteHost/phoneRowText.ts +4 -1
- package/server/config/config-schema.ts +1 -1
- package/server/files/browseEntry.ts +21 -0
- package/server/files/files-browse.ts +62 -42
- package/server/files/mermaidAssets.ts +6 -0
- package/server/files/previewMermaid.ts +6 -2
- package/server/files/renderedDoc.ts +24 -6
- package/server/files/renderedTabTools.ts +314 -0
- package/server/infra/fs/file-contains.ts +26 -0
- package/server/infra/process/psmux.ts +0 -6
- package/server/infra/process/pty-env.ts +46 -6
- package/server/infra/process/shutdown.ts +29 -11
- package/server/infra/process/tmux.ts +4 -17
- package/server/routes/session-routes.ts +6 -1
- package/server/routes/shutdown-routes.ts +6 -5
- package/server/session/list/session-detail-view.ts +6 -0
- package/server/session/list/sessionListTitle.ts +11 -7
- package/server/session/pty/pty-relay.ts +19 -11
- package/server/session/pty/pty-spawn.ts +2 -4
- package/server/session/session-reads.ts +40 -12
- package/server/session/spawn/agents/spawn-codex.ts +1 -1
- package/server/session/spawn/spawn-shell.ts +4 -19
- package/server/session/transcript/summary-scan.ts +9 -0
- package/server/session/transcript/transcript.ts +7 -0
- package/server/skills/mulmoterminal-header/SKILL.md +4 -1
- package/dist/assets/channel-DqF2Qyzp.js +0 -1
- package/dist/assets/dist-Cl9Cn33x.js +0 -2
- package/dist/assets/flowDiagram-IUGLLWBU-D8mbkZ4E.js +0 -1
- package/dist/assets/swimlanesDiagram-AYQRV4AK-CbKp-bmm.js +0 -8
package/README.md
CHANGED
|
@@ -173,15 +173,18 @@ copying from a web page usually does, so that pasting text keeps working.
|
|
|
173
173
|
|
|
174
174
|
<a id="clicking-a-file-path"></a>
|
|
175
175
|
|
|
176
|
-
**Clicking a file path** — the other direction. A path an agent *prints* becomes a link
|
|
176
|
+
**Clicking a file path** — the other direction. A path an agent *prints* becomes a link (in a
|
|
177
|
+
Windows session that includes `\`-separated ones such as `.claude\notes\a.md` and `C:\work\a.ts`; a path
|
|
178
|
+
holding a space in a folder name is linked whole when it sits inside `"…"`, `'…'`, a backtick pair,
|
|
179
|
+
`(…)`, `(…)` or `「…」`, as in `Read(/Users/me/My Docs/a.md)`), and
|
|
177
180
|
**what it opens is chosen by its extension**, so each kind arrives as the thing it is rather
|
|
178
181
|
than as bytes:
|
|
179
182
|
|
|
180
183
|
| A clicked … | opens as |
|
|
181
184
|
|---|---|
|
|
182
|
-
| `.md` `.markdown` | **rendered** markdown in a new tab — the same sandboxed `…/md` HTML the Files preview renders,
|
|
183
|
-
| `.json` | **indented** in a new tab (Chrome and Safari otherwise show one long line) |
|
|
184
|
-
| `.csv` `.tsv` | a **table** in a new tab, with a sticky header that scrolls inside its own box |
|
|
185
|
+
| `.md` `.markdown` | **rendered** markdown in a new tab — the same sandboxed `…/md` HTML the Files preview renders, with a **toolbar** at the top that switches between the preview and the file's **source** and has a copy button for each (the source as it is; the preview as text and as HTML, so a rich editor keeps the headings). That toolbar is the one script the tab runs, admitted by a per-response nonce the way the pane's scroll reporter is, and nothing in the file runs; the two scripts the preview needs are still absent (the one that reports where you are reading, and the one that draws mermaid diagrams — so a mermaid fence stays a code block here). It follows your system light/dark setting and your browser's language, since under the sandbox it can't ask the app which theme or language is on |
|
|
186
|
+
| `.json` | **indented** in a new tab (Chrome and Safari otherwise show one long line), with the same toolbar: switch to the file as it is, copy either |
|
|
187
|
+
| `.csv` `.tsv` | a **table** in a new tab, with a sticky header that scrolls inside its own box, and the same toolbar: switch to the file as it is, copy either |
|
|
185
188
|
| source, config, logs, and `.txt` — 46 extensions | the app's own **Files** view (`/files?path=`), where CodeMirror highlights it, the tree is right there, and it can be edited |
|
|
186
189
|
| `.html` `.htm` | the **rendered page** in a new tab, under the same sandboxed policy as the Files pane's Preview: its scripts run at an opaque origin with no fetch or XHR (so they cannot reach the app or its API), and an image beside it loads by its relative path (a relative stylesheet or script does not). The raw route answers `.html` as plain text, so opening one there showed its source |
|
|
187
190
|
| images, PDF, SVG, video, audio | raw bytes in a new tab, which the browser renders better than an editor would |
|
|
@@ -203,6 +206,8 @@ to and simply opens as itself. A route that renders the file in a new tab (`.md`
|
|
|
203
206
|
keyboard stays in the terminal; the full-screen Files view, with no terminal beside it,
|
|
204
207
|
puts it in the editor. (ESLint's default output puts the path on a line of its own, with no line number to follow.)
|
|
205
208
|
|
|
209
|
+
**A right-click on the path opens a menu** instead of the browser's: open it in the pane (what a plain click does), open it in a **new tab** (the rendered document for Markdown, JSON and tables, the Files page for source, the one-file link for a picture or a PDF outside the cell), open it in the **Files view**, or **copy the path** as an absolute path, ready for a prompt or an issue. A right-click only opens the menu; it no longer also opens the file the way a click does (it used to, under the browser's menu). Off a link the right-click is the browser's as before. Cmd/Ctrl+click still opens a new Files tab.
|
|
210
|
+
|
|
206
211
|
**While a grid cell is enlarged, or a pane is open beside the tiled grid, the [Files pane](#files-view-browse--edit) takes the click first** — every
|
|
207
212
|
row above, since the pane is the same editor with a Preview for Markdown, HTML and SVG, shows an
|
|
208
213
|
image as a picture and a PDF in a frame, and plays a video or an audio file with the browser's own
|
|
@@ -688,9 +693,10 @@ there is no terminal to start it again in. A stop you asked for is still a stop:
|
|
|
688
693
|
managed to bind is not restarted either — the reason it printed is the answer, and
|
|
689
694
|
retrying would bury it. Repeated failures give up rather than respawn forever.
|
|
690
695
|
|
|
691
|
-
**Not on Windows**, where it is not yet possible: Node has no real signals there, so
|
|
692
|
-
|
|
693
|
-
a crash. Windows keeps the old behaviour — the launcher ends when its
|
|
696
|
+
**Not on Windows**, where it is not yet possible: Node has no real signals there, so a
|
|
697
|
+
`taskkill` (or a `stop` the server did not answer) terminates it outright, and the launcher
|
|
698
|
+
cannot tell that from a crash. Windows keeps the old behaviour — the launcher ends when its
|
|
699
|
+
server does.
|
|
694
700
|
|
|
695
701
|
**No tmux? No problem** — terminals fall back to plain (non-persistent) PTYs, exactly as
|
|
696
702
|
before. An explicit close (a cell's ✕) ends the tmux session; a machine reboot does not
|
|
@@ -738,8 +744,8 @@ What MulmoTerminal does differently behind psmux, and only there:
|
|
|
738
744
|
after it is not taken into it. `PSMUX_VT_INPUT=0` in the server's environment turns this off;
|
|
739
745
|
- counts emoji two cells wide in the browser (Unicode 11), as Claude Code and psmux do — otherwise
|
|
740
746
|
each emoji shifts the rest of its row by one column;
|
|
741
|
-
- keeps Volta's `_VOLTA_TOOL_RECURSION` out of
|
|
742
|
-
Volta's shim again;
|
|
747
|
+
- keeps Volta's `_VOLTA_TOOL_RECURSION` out of every cell's environment (psmux and real tmux alike), so
|
|
748
|
+
`node` in a cell resolves through Volta's shim again;
|
|
743
749
|
- turns psmux's warm pool off (`set -g warm off`, psmux 3.3.1+), in new servers and in the ones
|
|
744
750
|
already running. Every cell starts with `-e`, which never claims a spare shell, so the spares
|
|
745
751
|
only held memory and were restarted on every resize;
|
|
@@ -873,7 +879,7 @@ The Settings modal (the gear button) persists per-user UI choices to `~/.mulmote
|
|
|
873
879
|
| `quickCommands` | `{ label, text, agents? }` phrases the **phone** offers as chips on a session's terminal view. Tapping one puts `text` in the input box; it is not sent until you press send. `agents` scopes a chip to session kinds — any of `SESSION_AGENTS` (`"claude"`, `"codex"`, `"antigravity"`, `"grok"`, `"muse"`, `"copilot"`, `"cursor"`, `"shell"`); omit it to offer the chip everywhere. Empty by default. |
|
|
874
880
|
| `userMcpServers` | `{ id, url }` HTTP MCP servers merged into the `--mcp-config` of the **Claude** sessions that carry the full GUI MCP (codex is handed the GUI server alone, `codexGuiMcpServers`) — a cell whose working directory is the **workspace**, and a session the server starts itself (the phone, a scheduled task) unless it asks for a grid cell's shape, as an issue's seed session does (`issueSpawnOptions`). A cell in a project directory does not get this merge; the MCP config the user wrote is read either way. Takes effect on the next session. |
|
|
875
881
|
| `buttons` | Header action buttons — see [Header buttons](#header-buttons). Omit to keep the defaults; set to replace them. |
|
|
876
|
-
| `chips` | Header info chips (`dir` / `git` / `work` / `diff` / `ctx` / `usage` / `status` / `tools` / `env`, or custom text). `env` shows what this working tree was reserved by [`worktreeEnv`](#per-directory-settings-projectmulmoterminaljson) (`:3010`, clickable) and draws nothing where none is declared. Omit to keep the default set; `[]` hides all built-ins. `work` shows which PR / issue the cell is on (`#977 → #966`) and clears itself when the PR merges — see the [Configuration guide](https://receptron.github.io/mulmoterminal/guide/en/config.html#work-chip). |
|
|
882
|
+
| `chips` | Header info chips (`dir` / `git` / `work` / `diff` / `ctx` / `usage` / `status` / `tools` / `env` / `peer`, or custom text). `peer` is the name the other Claude Code sessions on this machine message this one by (`myrepo-66`, what their `ListAgents` lists), as an icon that copies it; it draws nothing on a cell that is not a Claude session. `env` shows what this working tree was reserved by [`worktreeEnv`](#per-directory-settings-projectmulmoterminaljson) (`:3010`, clickable) and draws nothing where none is declared. Omit to keep the default set; `[]` hides all built-ins. `work` shows which PR / issue the cell is on (`#977 → #966`) and clears itself when the PR merges — see the [Configuration guide](https://receptron.github.io/mulmoterminal/guide/en/config.html#work-chip). |
|
|
877
883
|
| `pushEnabled` | `true` to send a **Web Push** to your registered devices. Off by default; only sends while the **RemoteHost** channel is connected (see below). The master switch — `pushKinds` picks which moments. |
|
|
878
884
|
| `pushKinds` | Which moments push: `"finished"` (a turn ended, ✅) and/or `"waiting"` (the agent stopped to ask — a permission prompt or a question, ❓, **once per prompt**). Omit to keep both; `[]` for none. A kind added in a later version stays off until you tick it. |
|
|
879
885
|
| `worklogEnabled` | `true` to run the built-in **dev worklog** batch (see below). Off by default (each run spawns an LLM session, so it costs tokens). Editable in Settings → **Sessions and background tasks**. |
|
|
@@ -1149,7 +1155,7 @@ show are left as they are, and a file that isn't a JSON object is not touched
|
|
|
1149
1155
|
```bash
|
|
1150
1156
|
yarn install # postinstall fixes node-pty prebuilt binary perms
|
|
1151
1157
|
|
|
1152
|
-
yarn dev # backend (:34567) + Vite UI (:6856), concurrently — open http://localhost:6856
|
|
1158
|
+
yarn dev # backend (:34567) + Vite UI (:6856), concurrently (on Windows started directly, unprefixed) — open http://localhost:6856
|
|
1153
1159
|
# or individually:
|
|
1154
1160
|
yarn dev:server # backend only (node --import tsx --env-file-if-exists=.env server/index.ts)
|
|
1155
1161
|
yarn dev:client # Vite dev server only
|
|
@@ -1556,6 +1562,10 @@ and refused, where before it could be confirmed away — which detached whoever
|
|
|
1556
1562
|
`mulmoterminal` process on this machine: the server answers from its own PTY table plus
|
|
1557
1563
|
tmux, not from what one page can see.
|
|
1558
1564
|
|
|
1565
|
+
Once that list is long, a **filter box** sits above it: every word you type has to be in a
|
|
1566
|
+
conversation's title, in any order, and the box empties when you change the directory or
|
|
1567
|
+
the agent.
|
|
1568
|
+
|
|
1559
1569
|
**Change the directory and those lists empty immediately**, replaced by a single
|
|
1560
1570
|
`Loading this directory's sessions, worktrees and scripts…` row until the new ones arrive.
|
|
1561
1571
|
Everything the launch form offers below the field — **OR RESUME HERE**, the worktrees and
|
|
@@ -2139,7 +2149,7 @@ name in `MULMOTERMINAL_HOST` / `MULMOTERMINAL_ALLOWED_ORIGINS`, against DNS rebi
|
|
|
2139
2149
|
|
|
2140
2150
|
| Endpoint | Purpose |
|
|
2141
2151
|
| -------- | ------- |
|
|
2142
|
-
| `GET /api/session/:id?cwd=` | One session's summary — cumulative `usage` and `context` (model + last-turn context tokens). Backs the cell token & ctx% badges. |
|
|
2152
|
+
| `GET /api/session/:id?cwd=` | One session's summary — cumulative `usage` and `context` (model + last-turn context tokens), and for a Claude session `peerName`, the name other Claude Code sessions on this machine message it by (`null` when no running claude answers to the id). Backs the cell token & ctx% badges and the `peer` chip. |
|
|
2143
2153
|
| `GET /api/codex/sessions?cwd=` | Codex sessions for the project (from `~/.codex` rollouts), newest first. |
|
|
2144
2154
|
| `GET /api/antigravity/sessions?cwd=` | Antigravity conversations for the project, newest first. agy does record a workspace, but never as a complete conversation-to-workspace map (`cache/last_conversations.json` keeps one conversation per directory and is written at exit; `history.jsonl` carries no conversation id), so the project comes from MulmoTerminal's own `~/.mulmoterminal/antigravity-conversations.jsonl`; agy's transcript supplies the title. |
|
|
2145
2155
|
| `GET /api/grok/sessions?cwd=` | Grok conversations for the project, newest first. `~/.grok/sessions` is partitioned by working directory (percent-encoded), so this is a directory listing; each conversation's `summary.json` supplies the title and the last-active time, falling back to the directory's `prompt_history.jsonl`. |
|
|
@@ -2486,12 +2496,14 @@ A session's display **title** is derived by scanning its JSONL for, in order of
|
|
|
2486
2496
|
preference:
|
|
2487
2497
|
|
|
2488
2498
|
1. the **session note** the user wrote (see below),
|
|
2489
|
-
2. else
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2499
|
+
2. else the name the user gave with `/rename` (the latest `custom-title` record; an
|
|
2500
|
+
empty one clears it),
|
|
2501
|
+
3. else a live **AI title** the server generated for the session this run (see below),
|
|
2502
|
+
4. else the latest `ai-title` record's `aiTitle` (e.g. written by MulmoClaude),
|
|
2503
|
+
5. else the latest `last-prompt` record's `lastPrompt`,
|
|
2504
|
+
6. else the first real user message (slash/local-command wrappers like
|
|
2493
2505
|
`<local-command-…>` are skipped),
|
|
2494
|
-
|
|
2506
|
+
7. else `"(untitled session)"`.
|
|
2495
2507
|
|
|
2496
2508
|
In-memory sessions not yet persisted show as `"New session"` until their file
|
|
2497
2509
|
appears, at which point the on-disk title takes over.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const SHUTDOWN_MESSAGE_TYPE = "shutdown";
|
|
2
|
+
export declare function isShutdownMessage(message: unknown): boolean;
|
|
3
|
+
export interface StoppableChild {
|
|
4
|
+
connected: boolean;
|
|
5
|
+
send: (message: unknown, callback: (error: Error | null) => void) => boolean;
|
|
6
|
+
kill: (signal?: NodeJS.Signals) => boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function askChildToStop(child: StoppableChild): void;
|
|
9
|
+
export interface ParentShutdownOptions {
|
|
10
|
+
graceMs?: number;
|
|
11
|
+
exit?: (code: number) => void;
|
|
12
|
+
on?: (signal: NodeJS.Signals, listener: () => void) => void;
|
|
13
|
+
onStopping?: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** What the parent's shutdown reads of its child — a ChildProcess satisfies it. */
|
|
16
|
+
export interface SupervisedChild extends StoppableChild {
|
|
17
|
+
exitCode: number | null;
|
|
18
|
+
signalCode: NodeJS.Signals | null;
|
|
19
|
+
once: (event: "close", listener: () => void) => unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare const CHILD_EXIT_GRACE_MS: number;
|
|
22
|
+
export declare function stopChildWithin(child: SupervisedChild, graceMs: number, onGone?: () => void): void;
|
|
23
|
+
export declare function installParentShutdown(getChild: () => SupervisedChild | null, options?: ParentShutdownOptions): void;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// How a parent stops its server: a message on the IPC channel both of its parents already open (the
|
|
2
|
+
// launcher and `yarn dev`), not a signal. On Windows a signal to ANOTHER process is
|
|
3
|
+
// TerminateProcess — the server's own handler never runs, and what it would have flushed to disk
|
|
4
|
+
// is lost (#3234). A message is handled the same way on every platform.
|
|
5
|
+
|
|
6
|
+
export const SHUTDOWN_MESSAGE_TYPE = "shutdown";
|
|
7
|
+
|
|
8
|
+
/** @param {unknown} message */
|
|
9
|
+
export function isShutdownMessage(message) {
|
|
10
|
+
return typeof message === "object" && message !== null && "type" in message && message.type === SHUTDOWN_MESSAGE_TYPE;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Ask a child server to run its own shutdown. Over the channel when there is one; a signal is the
|
|
15
|
+
* fallback for a child with no channel, or one the message could not reach.
|
|
16
|
+
*
|
|
17
|
+
* @param {{ connected: boolean, send: (message: unknown, callback: (error: Error | null) => void) => boolean, kill: (signal?: NodeJS.Signals) => boolean }} child
|
|
18
|
+
*/
|
|
19
|
+
export function askChildToStop(child) {
|
|
20
|
+
if (!child.connected) {
|
|
21
|
+
child.kill("SIGTERM");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
child.send({ type: SHUTDOWN_MESSAGE_TYPE }, (error) => {
|
|
25
|
+
if (error) child.kill("SIGTERM");
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const CHILD_EXIT_GRACE_MS = 2000;
|
|
30
|
+
|
|
31
|
+
/** Ask the child to stop, and end it outright if it has not closed within `graceMs` — asking no
|
|
32
|
+
* longer comes with a signal that would have ended it anyway, and a child left running holds the
|
|
33
|
+
* port. `onGone` runs once, whichever comes first. */
|
|
34
|
+
export function stopChildWithin(child, graceMs, onGone = () => {}) {
|
|
35
|
+
let gone = false;
|
|
36
|
+
const finish = () => {
|
|
37
|
+
if (gone) return;
|
|
38
|
+
gone = true;
|
|
39
|
+
clearTimeout(giveUp);
|
|
40
|
+
onGone();
|
|
41
|
+
};
|
|
42
|
+
const giveUp = setTimeout(() => {
|
|
43
|
+
child.kill("SIGKILL");
|
|
44
|
+
finish();
|
|
45
|
+
}, graceMs);
|
|
46
|
+
giveUp.unref?.();
|
|
47
|
+
child.once("close", finish);
|
|
48
|
+
askChildToStop(child);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Ctrl+C reaches the child too (the signal goes to the whole process group), and the child now
|
|
52
|
+
* flushes queued session state before it exits (#2161). Exiting here the instant we have
|
|
53
|
+
* signalled would hand the shell back first and, when the terminal then goes away, cut that
|
|
54
|
+
* flush short — so we wait for the child's own exit.
|
|
55
|
+
*
|
|
56
|
+
* ASKED over the IPC channel, not signalled: on Windows a signal to the child is TerminateProcess,
|
|
57
|
+
* which ended it before that flush could run (#3234).
|
|
58
|
+
*
|
|
59
|
+
* Capped, because a child that will not die must not leave the user unable to get their prompt
|
|
60
|
+
* back. Past the cap the child is killed and we go.
|
|
61
|
+
*
|
|
62
|
+
* `getChild` rather than the child itself: it is replaced across restarts and bind-retries, and
|
|
63
|
+
* the handler is registered once. `onStopping` is for a parent that must stop restarting it. */
|
|
64
|
+
export function installParentShutdown(
|
|
65
|
+
getChild,
|
|
66
|
+
{ graceMs = CHILD_EXIT_GRACE_MS, exit = (code) => process.exit(code), on = (sig, fn) => process.on(sig, fn), onStopping = () => {} } = {},
|
|
67
|
+
) {
|
|
68
|
+
let shuttingDown = false;
|
|
69
|
+
const shutdown = () => {
|
|
70
|
+
const child = getChild();
|
|
71
|
+
// A second Ctrl+C means "stop waiting", not "signal twice".
|
|
72
|
+
if (shuttingDown || !child) return exit(0);
|
|
73
|
+
// A child that has already gone emits no further `close`, so waiting for one would spend the
|
|
74
|
+
// whole grace period doing nothing — Ctrl+C after a crash would feel like a hang (Codex on
|
|
75
|
+
// #2195 called this bounded and escapable; it is, and it is also free to avoid).
|
|
76
|
+
if (child.exitCode !== null || child.signalCode !== null) return exit(0);
|
|
77
|
+
shuttingDown = true;
|
|
78
|
+
onStopping();
|
|
79
|
+
stopChildWithin(child, graceMs, () => exit(0));
|
|
80
|
+
};
|
|
81
|
+
on("SIGINT", shutdown);
|
|
82
|
+
on("SIGTERM", shutdown);
|
|
83
|
+
}
|
package/bin/mulmoterminal.js
CHANGED
|
@@ -47,6 +47,7 @@ import { agentBin, AGENT_BIN_SPEC } from "./agent-bins.js";
|
|
|
47
47
|
import { configuredDefaultAgent, gateFor, isKnownAgent, missingAgentMessage, parseAgentArg, resolveDeclaredAgent } from "./default-agent.js";
|
|
48
48
|
import { setProcessTitle } from "./process-title.js";
|
|
49
49
|
import { nodeUpgradeGuide } from "./node-install.js";
|
|
50
|
+
import { installParentShutdown } from "./child-shutdown.js";
|
|
50
51
|
|
|
51
52
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
52
53
|
const PKG_DIR = join(__dirname, "..");
|
|
@@ -707,44 +708,6 @@ function notePortFromEnvironment(port) {
|
|
|
707
708
|
log(` Terminals inside cells inherit that PORT too, as in any shell you exported it from.`);
|
|
708
709
|
}
|
|
709
710
|
|
|
710
|
-
const CHILD_EXIT_GRACE_MS = 2000;
|
|
711
|
-
|
|
712
|
-
/** Ctrl+C reaches the child too (the signal goes to the whole process group), and the child now
|
|
713
|
-
* flushes queued session state before it exits (#2161). Exiting here the instant we have
|
|
714
|
-
* signalled would hand the shell back first and, when the terminal then goes away, cut that
|
|
715
|
-
* flush short — so we wait for the child's own exit.
|
|
716
|
-
*
|
|
717
|
-
* Capped, because a child that will not die must not leave the user unable to get their prompt
|
|
718
|
-
* back. Past the cap we go and leave it orphaned, which is what used to happen every time.
|
|
719
|
-
*
|
|
720
|
-
* `getChild` rather than the child itself: it is replaced across restarts and bind-retries, and
|
|
721
|
-
* the handler is registered once. */
|
|
722
|
-
export function installParentShutdown(
|
|
723
|
-
getChild,
|
|
724
|
-
{ graceMs = CHILD_EXIT_GRACE_MS, exit = (code) => process.exit(code), on = (sig, fn) => process.on(sig, fn) } = {},
|
|
725
|
-
) {
|
|
726
|
-
let shuttingDown = false;
|
|
727
|
-
const shutdown = () => {
|
|
728
|
-
const child = getChild();
|
|
729
|
-
// A second Ctrl+C means "stop waiting", not "signal twice".
|
|
730
|
-
if (shuttingDown || !child) return exit(0);
|
|
731
|
-
// A child that has already gone emits no further `close`, so waiting for one would spend the
|
|
732
|
-
// whole grace period doing nothing — Ctrl+C after a crash would feel like a hang (Codex on
|
|
733
|
-
// #2195 called this bounded and escapable; it is, and it is also free to avoid).
|
|
734
|
-
if (child.exitCode !== null || child.signalCode !== null) return exit(0);
|
|
735
|
-
shuttingDown = true;
|
|
736
|
-
const giveUp = setTimeout(() => exit(0), graceMs);
|
|
737
|
-
giveUp.unref?.();
|
|
738
|
-
child.once("close", () => {
|
|
739
|
-
clearTimeout(giveUp);
|
|
740
|
-
exit(0);
|
|
741
|
-
});
|
|
742
|
-
child.kill("SIGTERM");
|
|
743
|
-
};
|
|
744
|
-
on("SIGINT", shutdown);
|
|
745
|
-
on("SIGTERM", shutdown);
|
|
746
|
-
}
|
|
747
|
-
|
|
748
711
|
async function main() {
|
|
749
712
|
const args = process.argv.slice(2);
|
|
750
713
|
|
|
@@ -48,12 +48,13 @@ const CRASH_SIGNALS = new Set(["SIGABRT", "SIGSEGV", "SIGBUS", "SIGILL", "SIGFPE
|
|
|
48
48
|
/**
|
|
49
49
|
* Whether this platform can tell a stop from a crash at all.
|
|
50
50
|
*
|
|
51
|
-
* Windows cannot. Node has no real signals there, so `mulmoterminal stop
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
51
|
+
* Windows cannot. Node has no real signals there, so a `taskkill` — or a `mulmoterminal stop` the
|
|
52
|
+
* server did not answer over HTTP, which falls back to a signal — TERMINATES the process instead of
|
|
53
|
+
* delivering something its handler runs. The server then never reaches the `exit(0)` that means
|
|
54
|
+
* "somebody asked for this", and the exit arrives as a bare non-zero code with no signal: the exact
|
|
55
|
+
* shape of the crash this module exists to recover from. Restarting on it would resurrect a server
|
|
56
|
+
* the user just stopped, and leave them no way to stop it at all. (The Stop button and an answered
|
|
57
|
+
* `stop` do reach `exit(0)` there since #3234; the fallbacks are what still look like a crash.)
|
|
57
58
|
*
|
|
58
59
|
* So Windows keeps the behaviour it had before supervision existed — the launcher leaves with its
|
|
59
60
|
* server — and says nothing new about it. Fixing it properly means giving `stop` a way to reach
|
|
@@ -86,7 +87,7 @@ const canTellStopFromCrash = (platform) => platform !== "win32";
|
|
|
86
87
|
export function planAfterServerExit({ code, signal, everServed, consecutiveFailures, platform }) {
|
|
87
88
|
// A port that is taken will still be taken next time; the caller names who has it and stops.
|
|
88
89
|
if (code === PORT_IN_USE_EXIT_CODE) return { action: "port-in-use", delayMs: 0, reason: null };
|
|
89
|
-
// `mulmoterminal stop` and the browser's Stop button both
|
|
90
|
+
// `mulmoterminal stop` and the browser's Stop button both end in the server's own shutdown, which
|
|
90
91
|
// exits 0 (server/infra/process/shutdown.ts). Restarting that is the product's stop button not stopping.
|
|
91
92
|
if (code === 0) return { action: "stop", delayMs: 0, reason: null };
|
|
92
93
|
// Nothing below can be decided on a platform where a stop and a crash arrive identically, so it
|
package/bin/stop.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { InstanceEntry } from "./instances.js";
|
|
|
2
2
|
|
|
3
3
|
export interface StopEffects {
|
|
4
4
|
kill?: (pid: number) => void;
|
|
5
|
+
request?: (instance: InstanceEntry) => Promise<boolean>;
|
|
5
6
|
isAlive?: (pid: number) => boolean;
|
|
6
7
|
sleep?: (ms: number) => Promise<void>;
|
|
7
8
|
graceMs?: number;
|
|
@@ -26,6 +27,11 @@ export interface ConfirmDeps {
|
|
|
26
27
|
owners?: (port: number) => Promise<number[] | null>;
|
|
27
28
|
}
|
|
28
29
|
export declare function confirmInstance(instance: InstanceEntry, deps?: ConfirmDeps): Promise<boolean>;
|
|
30
|
+
export interface AskDeps {
|
|
31
|
+
fetchImpl?: (url: string, init: RequestInit) => Promise<{ ok: boolean }>;
|
|
32
|
+
timeoutMs?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function askServerToStop(instance: InstanceEntry, deps?: AskDeps): Promise<boolean>;
|
|
29
35
|
export declare function stopInstances(instances: readonly InstanceEntry[], effects?: StopEffects): Promise<StopResult>;
|
|
30
36
|
export declare function describeInstance(instance: InstanceEntry): string;
|
|
31
37
|
export declare function manualStopCommand(pids: readonly number[], platform?: NodeJS.Platform): string;
|
package/bin/stop.js
CHANGED
|
@@ -23,6 +23,8 @@ import { portOwners } from "./port-owner.js";
|
|
|
23
23
|
// a server that was merely mid-shutdown would send the user hunting for a problem that isn't there.
|
|
24
24
|
const GRACE_MS = 5000;
|
|
25
25
|
const POLL_MS = 100;
|
|
26
|
+
// How long the server has to answer the stop request before the signal is used instead.
|
|
27
|
+
const REQUEST_TIMEOUT_MS = 2000;
|
|
26
28
|
|
|
27
29
|
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
28
30
|
|
|
@@ -50,20 +52,55 @@ export async function confirmInstance(instance, deps = {}) {
|
|
|
50
52
|
return pids !== null && pids.includes(instance.pid);
|
|
51
53
|
}
|
|
52
54
|
|
|
55
|
+
/** Why the signal could not be sent, or null when it was. ESRCH means the process ended between the
|
|
56
|
+
* registry being read and now — success, just not ours. Anything else (EPERM: another user's
|
|
57
|
+
* process) is a refusal the user has to see. */
|
|
58
|
+
function signalRefusal(kill, pid) {
|
|
59
|
+
try {
|
|
60
|
+
kill(pid);
|
|
61
|
+
return null;
|
|
62
|
+
} catch (err) {
|
|
63
|
+
return err?.code ?? "failed";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Ask a server to stop the way the browser's Stop button does: POST /api/shutdown on its own port,
|
|
69
|
+
* which runs the same shutdown Ctrl+C runs. True when it said it is stopping.
|
|
70
|
+
*
|
|
71
|
+
* Not a signal first, because on Windows a signal to another process is TerminateProcess: the
|
|
72
|
+
* server never ran its shutdown, and the session state it flushes on the way out was lost (#3234).
|
|
73
|
+
* The Origin is the one the browser sends, which the same-origin gate admits.
|
|
74
|
+
*/
|
|
75
|
+
export async function askServerToStop(instance, { fetchImpl = fetch, timeoutMs = REQUEST_TIMEOUT_MS } = {}) {
|
|
76
|
+
const url = `http://127.0.0.1:${instance.port}/api/shutdown`;
|
|
77
|
+
const controller = new AbortController();
|
|
78
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
79
|
+
try {
|
|
80
|
+
const res = await fetchImpl(url, { method: "POST", headers: { Origin: `http://localhost:${instance.port}` }, signal: controller.signal });
|
|
81
|
+
return res.ok;
|
|
82
|
+
} catch {
|
|
83
|
+
return false;
|
|
84
|
+
} finally {
|
|
85
|
+
clearTimeout(timer);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
53
89
|
/**
|
|
54
90
|
* Ask every instance to stop, and report which did.
|
|
55
91
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* the reporting can be tested without
|
|
92
|
+
* Over HTTP first (`askServerToStop`), SIGTERM when that is not answered: the signal lands on the
|
|
93
|
+
* server's own handler on macOS and Linux, and is the only way left to a server that has stopped
|
|
94
|
+
* answering. The effects are injected so the waiting and the reporting can be tested without
|
|
95
|
+
* spawning anything.
|
|
59
96
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* the whisper sidecar, which exists on macOS alone.
|
|
97
|
+
* `--force` skips the request and only signals: the pid is not confirmed to own the port then, so
|
|
98
|
+
* the server answering on it may be a different one.
|
|
63
99
|
*/
|
|
64
100
|
export async function stopInstances(instances, effects = {}) {
|
|
65
101
|
const {
|
|
66
102
|
kill = (pid) => process.kill(pid, "SIGTERM"),
|
|
103
|
+
request = askServerToStop,
|
|
67
104
|
isAlive = isProcessAlive,
|
|
68
105
|
sleep = wait,
|
|
69
106
|
graceMs = GRACE_MS,
|
|
@@ -81,14 +118,9 @@ export async function stopInstances(instances, effects = {}) {
|
|
|
81
118
|
unconfirmed.push(instance);
|
|
82
119
|
continue;
|
|
83
120
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
} catch (err) {
|
|
88
|
-
// ESRCH means it ended between the registry being read and now — which is success, just not
|
|
89
|
-
// ours. Anything else (EPERM: another user's process) is a refusal the user has to see.
|
|
90
|
-
if (err?.code !== "ESRCH") stubborn.push({ ...instance, reason: err?.code ?? "failed" });
|
|
91
|
-
}
|
|
121
|
+
const refusal = !force && (await request(instance)) ? null : signalRefusal(kill, instance.pid);
|
|
122
|
+
if (refusal === null) asked.push(instance);
|
|
123
|
+
else if (refusal !== "ESRCH") stubborn.push({ ...instance, reason: refusal });
|
|
92
124
|
}
|
|
93
125
|
|
|
94
126
|
for (let waited = 0; waited < graceMs && asked.some((i) => isAlive(i.pid)); waited += POLL_MS) {
|
package/common/headerChips.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { isRecord } from "./isRecord.js";
|
|
|
10
10
|
export const MAX_HEADER_CHIPS = 16;
|
|
11
11
|
|
|
12
12
|
/** The built-in chips a terminal cell draws, in the order an unconfigured header shows them. */
|
|
13
|
-
export const CELL_CHIP_IDS = ["git", "work", "diff", "ctx", "usage", "env"] as const;
|
|
13
|
+
export const CELL_CHIP_IDS = ["git", "work", "diff", "ctx", "usage", "env", "peer"] as const;
|
|
14
14
|
export type CellChipId = (typeof CELL_CHIP_IDS)[number];
|
|
15
15
|
export const isCellChipId = (value: unknown): value is CellChipId => CELL_CHIP_IDS.some((id) => id === value);
|
|
16
16
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/opensheetmusicdisplay.min-CeBHhrOd.js","assets/rolldown-runtime-BCiCTKAo.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-BCiCTKAo.js";import{C as t,D as n,E as r,S as i,T as a,_ as o,b as s,f as c,n as l,t as u,v as d,w as f,x as p,y as m}from"./index-
|
|
2
|
+
import{o as e}from"./rolldown-runtime-BCiCTKAo.js";import{C as t,D as n,E as r,S as i,T as a,_ as o,b as s,f as c,n as l,t as u,v as d,w as f,x as p,y as m}from"./index-V8EFkGOj.js";p(),r();var h={class:`sheet`},g={key:0,class:`status`},_={key:1,class:`status`},v=l(s({__name:`Notation`,props:{musicxml:{},tempo:{},now:{}},setup(r){let s=r,l=n(null),p=n(`loading`),v,y=[],b=0;function x(e){let t=v?.cursor;if(t===void 0||y.length===0)return;let n=u(y,e);if(n!==b)for(n<b&&(t.reset(),b=0);b<n;)t.next(),b++}let S=0;async function C(t){let n=l.value;if(!n)return;let r=++S;p.value=`loading`;try{let{OpenSheetMusicDisplay:i}=await c(async()=>{let{OpenSheetMusicDisplay:t}=await import(`./opensheetmusicdisplay.min-CeBHhrOd.js`).then(t=>e(t.default,1));return{OpenSheetMusicDisplay:t}},__vite__mapDeps([0,1]));if(r!==S)return;v??=new i(n,{backend:`svg`,autoResize:!0,autoBeam:!0,drawTitle:!1,drawComposer:!1,drawCredits:!1,followCursor:!0,defaultColorMusic:`#000000`});let a=v;if(await a.load(t),r!==S)return;a.render();let o=a.cursor;o.show(),o.reset();let l=240/s.tempo,u=[];for(;!o.iterator.EndReached;)u.push(o.iterator.currentTimeStamp.RealValue*l),o.next();o.reset(),y=u,b=0,p.value=`ready`,x(s.now)}catch(e){if(r!==S)return;console.error(`jinglescript: the sheet music could not be drawn`,e),p.value=`failed`}}return t(()=>void C(s.musicxml)),a(()=>s.musicxml,e=>void C(e)),a(()=>s.now,e=>x(e)),i(()=>{S++,v?.clear(),v=void 0}),(e,t)=>(f(),m(`div`,h,[p.value===`loading`?(f(),m(`p`,g,`Drawing the sheet music…`)):p.value===`failed`?(f(),m(`p`,_,`The sheet music could not be drawn. The audio still plays; the MusicXML can be downloaded below.`)):d(``,!0),o(`div`,{ref_key:`container`,ref:l,class:`page`},null,512)]))}}),[[`__scopeId`,`data-v-80f75f9d`]]);export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-D43YG_Lz.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Bc_iCBZR.js";import"./chunk-DSNLSHJZ-CTGJuMWJ.js";import{n as i,r as a,t as o}from"./chunk-2E7WHVMD-Bg9e9cMJ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BT_hXsMY.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-Bw6tHVuc.js";export{M as createArchitectureServices}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-NGNAAXSQ-Bw6tHVuc.js";export{M as createArchitectureServices}from"./mermaid-parser.core-D43YG_Lz.js";
|