mulmoterminal 4.7.0 → 4.7.1
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 +6 -5
- package/bin/update-check.d.ts +10 -0
- package/bin/update-check.js +30 -15
- package/common/updateStatus.ts +42 -0
- package/dist/assets/{abnfDiagram-VRR7QNED-WSmThe6b-D7o5fw1r.js → abnfDiagram-VRR7QNED-WSmThe6b-dBgFOZJ6.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-Cqhmai3f-sj7JkliI.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-Tj3i7Oow-qFko9kCE.js → architectureDiagram-ZJ3FMSHR-Tj3i7Oow-DEsMCnCO.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-c-hNYBhI-CixyWpNJ.js → blockDiagram-677ZJIJ3-c-hNYBhI-B2nmyPz0.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-WIGVajf5-DAX3Om5N.js → c4Diagram-LMCZKHZV-WIGVajf5-CmCUDAtE.js} +1 -1
- package/dist/assets/channel-OqG5cGJi-zdxP6MgL.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-CtSq3QOR-BffBZP9f.js → chunk-32BRIVSS-CtSq3QOR-DYYdxRvv.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-2Up0T-6t-oG1jhM8x.js → chunk-52WLFC77-2Up0T-6t-DkAuUA9O.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-ivengO-7-BIJz2IVz.js → chunk-C7G6YPKG-ivengO-7-DAJ9T7Qf.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-BHoWQ6W8-Xx1eDNWz.js → chunk-EX3LRPZG-BHoWQ6W8-B2e2_95p.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-PvRXPghr-CsrDNNhN.js → chunk-FWX5IMBZ-PvRXPghr-CjeJ_Ar9.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-A3_zwY4q-DmY2m0Ak.js → chunk-HOUHSVGY-A3_zwY4q-C95KqDEI.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-vzZqgurQ--OQCYCJd.js → chunk-ICXQ74PX-vzZqgurQ-FWkJ2cxG.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-CorQ_Pl1-Bo-W29fw.js → chunk-MOJQB5TN-CorQ_Pl1-mXFOYgnO.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-BVhfs7WG-C6-xivCq.js → chunk-OGEWGWER-BVhfs7WG-4RsxS3fR.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CJo7KQJ3-B3NhAbN0.js → chunk-PUDLZKDR-CJo7KQJ3-CqLwqZmB.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-DLkq8ZGO-pa6s8c6B.js → chunk-Q4XR5HBZ-DLkq8ZGO-9ClFvrdq.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DqefuUOb-dAvwkopm.js → chunk-V7JOEXUC-DqefuUOb-H1x3ZOme.js} +1 -1
- package/dist/assets/{chunk-VAUOI2AC-BKx35BBi-DF4roMbC.js → chunk-VAUOI2AC-BKx35BBi-E0yAewsj.js} +1 -1
- package/dist/assets/{chunk-VR4S4FIN-DpJgr4Ur-OJFNZPOB.js → chunk-VR4S4FIN-DpJgr4Ur-Cw4po3Ii.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-nS6zX9ct-CEyECF4F.js → chunk-WYO6CB5R-nS6zX9ct-KrP8SxMs.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-DNtiHxpJ-Du2jEWIg.js → chunk-ZGVPDNZ5-DNtiHxpJ-chUFyGWx.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-C6h0nbT3-CqjORMBj.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-CzsXJ_wA-CqjORMBj.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-DvSvuXnG-hgNrUHK4.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-969y1qZK-Czc3nk-B.js → cynefinDiagram-TSTJHNR4-969y1qZK-BGIuynhv.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-CZfgAZFk-BAU9MQjJ.js → dagre-VKFMJZFB-CZfgAZFk-BTpA5SlQ.js} +1 -1
- package/dist/assets/{diagram-FQU43EPY-CSdnleGM-DYTiEZKM.js → diagram-FQU43EPY-CSdnleGM-Bpa9ofDC.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-DKYe-Mwx-DDc61ZrT.js → diagram-G47NLZAW-DKYe-Mwx-WAKYgBrz.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-DMasKpwa-urCd5zHO.js → diagram-NH7WQ7WH-DMasKpwa-CW4r7qyE.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CSyc0BDR-HYgoBJgE.js → diagram-OA4YK3LP-CSyc0BDR-BKacee04.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-CcJW2fNK-DgDEbPeN.js → diagram-WEI45ONY-CcJW2fNK-BeAKCOeu.js} +1 -1
- package/dist/assets/{dist-De7z8hYT.js → dist-BxW5R1_A.js} +1 -1
- package/dist/assets/{dist-DmeqT16V.js → dist-ChlNuoKi.js} +1 -1
- package/dist/assets/{dist-C5Zo-KHU.js → dist-Cpy0pAqt.js} +1 -1
- package/dist/assets/{dist-BmKUp6B_.js → dist-V67wX5oT.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CeBUH2N0-CVbiuH2Y.js → ebnfDiagram-CCIWWBDH-CeBUH2N0-oK8JFLJb.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-1OOp34oV-BaP_H4cL.js → erDiagram-Q63AITRT-1OOp34oV-BmDLJ3fH.js} +1 -1
- package/dist/assets/eventmodeling-45OFAUF4-jdctDg0T-TG7KUatZ.js +1 -0
- package/dist/assets/flowDiagram-23GEKE2U-DK0InIny-qxrjE7ea.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-DQT88dUZ-DtByhyeF.js → ganttDiagram-NO4QXBWP-DQT88dUZ-Dgt5eOG6.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-C4cKwl5j-D7MFV63o.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-CeZGS4qi-CVchYIt9.js → gitGraphDiagram-IHSO6WYX-CeZGS4qi-CD-l0vgt.js} +1 -1
- package/dist/assets/index-CJj8AYYF.js +621 -0
- package/dist/assets/index-DNLQibYX.css +1 -0
- package/dist/assets/info-DKCQHKI2-DPUCBYWS-BxgyIApr.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-BDt8lBTy-CissNDjy.js → infoDiagram-FWYZ7A6U-BDt8lBTy-BYSwvgW6.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-DOHYs_AA-CFtjTBXT.js → ishikawaDiagram-FXEZZL3T-DOHYs_AA-DkznAJGt.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-B33IW9yy-BcIIur36.js → journeyDiagram-5HDEW3XC-B33IW9yy-CknzrT3m.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-Bkdm46eX-De883A50.js → kanban-definition-HUTT4EX6-Bkdm46eX-CY-MchUy.js} +1 -1
- package/dist/assets/{lib-B-7XHKN-.js → lib-B-JYnmBA.js} +1 -1
- package/dist/assets/{line-Dy_Qlcgo-YN10axId.js → line-Dy_Qlcgo-BdzF7qLz.js} +1 -1
- package/dist/assets/{marp-jVDysiSn.js → marp-BRsT17Gj.js} +1 -1
- package/dist/assets/{mermaid-parser.core-C1baW7NG-D6V0bamn.js → mermaid-parser.core-C1baW7NG-DMZf-3IA.js} +2 -2
- package/dist/assets/{mermaid.core-C09q4TmN-2yfF6I6y.js → mermaid.core-C09q4TmN-B_dowtFH.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-bfYIhPQ0-CKAbVaUS.js → mindmap-definition-LN4V7U3C-bfYIhPQ0-Dx9H0q0M.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-CC7His0F-BDwWs1zX.js +1 -0
- package/dist/assets/{pegDiagram-2B236MQR-CZQOKUMC-CC0RIOMO.js → pegDiagram-2B236MQR-CZQOKUMC-B0QBQEzx.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-CCrcq2sL-BUfGnZ_U.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-DiVKPdHE-PJb2uZUl.js → pieDiagram-ENE6RG2P-DiVKPdHE-6bFmgSSf.js} +1 -1
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CbPY3kXI-CpeIJ5cW.js → quadrantDiagram-ABIIQ3AL-CbPY3kXI-DR6UcImk.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-C5TUrpHf-xJ223euq.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-CGuuFEd8-BjavHk8u.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-DuoCSFZY-DaxGYsAG.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-ig-DG9e_-BiuEkpVy.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-BkBgpyvu-DjtS9QjD.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-CFRaQzr0-_qHVckh1.js → railroadDiagram-RFXS5EU6-CFRaQzr0-B13UgpCt.js} +1 -1
- package/dist/assets/{requirementDiagram-TGXJPOKE-BiIDduje-DGWofb8o.js → requirementDiagram-TGXJPOKE-BiIDduje-BnyCbAFy.js} +1 -1
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DcK87A5Y-Bi4ngM9j.js → sankeyDiagram-HTMAVEWB-DcK87A5Y-DBqEvMS1.js} +1 -1
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-DgEQYcvc-D1J0YDNs.js → sequenceDiagram-DBY2YBRQ-DgEQYcvc-RMWJvTQk.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-Bg7EXtW2-DAsjkoLJ.js → stateDiagram-2N3HPSRC-Bg7EXtW2-DTYEsQki.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BjhArXP_-BwX0TEg2.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-CKORDKr0-DXiMSf2W.js → swimlanes-5IMT3BWC-CKORDKr0-D9FhEzB6.js} +1 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-CyvIfl1o-CdxmBQcP.js +8 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-BM3Iky2r-DOheaxIs.js → timeline-definition-FHXFAJF6-BM3Iky2r-BYeRiXBY.js} +1 -1
- package/dist/assets/treeView-QDETBFTQ-CqfT0I1z-s6d8KKbp.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-CiJkiGWo-0QbEhU31.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-VNmAhEFP-C2GWgfPO.js → vennDiagram-L72KCM5P-VNmAhEFP-BjzOgidI.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-D1tuVHAV-8lAEinVX.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-BkHQpyFm-C-h5twdG.js → wardleyDiagram-EHGQE667-BkHQpyFm-DzQER1Jf.js} +1 -1
- package/dist/assets/{xychartDiagram-FW5EYKEG-Yz-8aLqK-CUZcHWQQ.js → xychartDiagram-FW5EYKEG-Yz-8aLqK-D9KxXZYS.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/server/backends/collectionActionGuards.ts +67 -0
- package/server/backends/collections.ts +11 -42
- package/server/backends/customViewRoutes.ts +9 -28
- package/server/config/update-status.ts +21 -19
- package/server/session/session-settings.ts +59 -1
- package/server/session/spawn-antigravity.ts +26 -10
- package/server/session/spawn-grok.ts +26 -9
- package/server/session/spawn-muse.ts +13 -2
- package/dist/assets/architecture-TIHT7OUA-Cqhmai3f-R3ZCNmlM.js +0 -1
- package/dist/assets/channel-OqG5cGJi-BwbBOK-P.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-C6h0nbT3-9x_ObMZR.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-CzsXJ_wA-9x_ObMZR.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-DvSvuXnG-CUSoofIc.js +0 -1
- package/dist/assets/eventmodeling-45OFAUF4-jdctDg0T-COMVRYlu.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-DK0InIny-BGzwORBA.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-C4cKwl5j-p99B1sB1.js +0 -1
- package/dist/assets/index-BShBNIbp.js +0 -621
- package/dist/assets/index-C96r_nGv.css +0 -1
- package/dist/assets/info-DKCQHKI2-DPUCBYWS-B3Xogxjv.js +0 -1
- package/dist/assets/packet-7NZHBO7P-CC7His0F-DK0gG3W_.js +0 -1
- package/dist/assets/pie-RZYD4A2V-CCrcq2sL-tVbhk8PH.js +0 -1
- package/dist/assets/radar-I7S5WNFK-C5TUrpHf-C6nl9qN3.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CGuuFEd8-B0tG64BI.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-DuoCSFZY-xn6rR9WF.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-ig-DG9e_-Cf1RsQF2.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-BkBgpyvu-DS1TVkAn.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BjhArXP_-ByBnkuoH.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-CyvIfl1o-rxdxX3BL.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-CqfT0I1z-RLAgEKh2.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-CiJkiGWo-YdjbZwx5.js +0 -1
- package/dist/assets/wardley-OPB4EBWU-D1tuVHAV-DfKSfsi1.js +0 -1
package/README.md
CHANGED
|
@@ -567,12 +567,12 @@ CLAUDE_CWD=/Users/you/my-project
|
|
|
567
567
|
|
|
568
568
|
### UI settings (`~/.mulmoterminal/config.json`)
|
|
569
569
|
|
|
570
|
-
The Settings modal (
|
|
570
|
+
The Settings modal (the gear button) persists per-user UI choices to `~/.mulmoterminal/config.json`
|
|
571
571
|
(read/written via `GET`/`POST /api/config`):
|
|
572
572
|
|
|
573
573
|

|
|
574
574
|
|
|
575
|
-
*Open it from the
|
|
575
|
+
*Open it from the gear button in the toolbar. Under the title, a **Version** row shows what is running: the version from the shipped `package.json`, plus a `commit <sha>` chip on a git checkout — there the version is only whatever was last released, so the commit is what identifies the build. When something newer exists, the row is followed by the header badge's update notice, command included. Pick a **theme**, set the **terminal font size**, **font** and **scroll speed**, set a custom **attention sound**, list the repos the cross-repo **PRs & Issues** view should aggregate, add **launch commands** for grid cells, register your own **MCP servers**, and turn on the switches for what this app writes on your behalf — **issue work comments**, the **PR clone footer**, the **closing summary**, the **decision digest**, the **dev worklog** — no need to hand-edit the config file. Four settings stay with their skill because a form would be the wrong tool for them (`keymap`, `themes`, `providers`, `buttons`/`chips`); Settings shows what each is doing now and launches that skill. Note that **theme, font size and scroll speed are stored per browser** (they're display preferences, so a phone and a desktop keep their own); the rest live in `~/.mulmoterminal/config.json` and are shared by every client.*
|
|
576
576
|
|
|
577
577
|
| Field | Meaning |
|
|
578
578
|
| ------------ | ------- |
|
|
@@ -879,7 +879,7 @@ alongside the Claude sessions. Scripts are **per-directory**: the cell reads the
|
|
|
879
879
|
different projects' scripts.
|
|
880
880
|
|
|
881
881
|
The same launcher also has an **or launch** row for your configured **launch commands**
|
|
882
|
-
— any interactive command — set in Settings (
|
|
882
|
+
— any interactive command — set in Settings (the gear button) → **Launch commands** as
|
|
883
883
|
`{ label, command }` (e.g. `htop` → `htop`, `Codex` → `codex`). A plain shell needs no
|
|
884
884
|
entry here: the Agent Picker's **Shell** option already opens `$SHELL`. Unlike
|
|
885
885
|
a one-shot script, a launcher runs as a **persistent terminal in the cell's directory**:
|
|
@@ -1170,7 +1170,7 @@ with no schema on disk, so the fields are identified by measurement (see
|
|
|
1170
1170
|
rather than a number it is unsure of, so if a future agy release moves those fields, an
|
|
1171
1171
|
Antigravity cell falls back to showing its model alone — it will not show a wrong percentage.
|
|
1172
1172
|
|
|
1173
|
-
The **Settings** modal (
|
|
1173
|
+
The **Settings** modal (the gear button) shows an **estimated $ cost** — Session / Today / Month — from
|
|
1174
1174
|
`GET /api/cost`, using a built-in public per-model price table (cache reads billed at
|
|
1175
1175
|
0.1×, cache writes at 1.25× input). It's an estimate: real billing differs, **flat-plan
|
|
1176
1176
|
(Max) usage isn't reflected**, and turns on unpriced models are flagged and excluded.
|
|
@@ -1611,6 +1611,7 @@ From a shell: `mulmoterminal room read <room>` · `room post <room> <text…> [-
|
|
|
1611
1611
|
| `GET /api/sound?kind=` · `/api/dir-sound?cwd=&kind=` · `/api/sound-preset/:id` · `/api/dir-config?cwd=` | Custom / per-directory / preset attention sound + per-dir config. `kind` selects a config entry, never a path. |
|
|
1612
1612
|
| `GET /api/dir-config-detail?cwd=` | The same per-dir config, **plus** the settings a running terminal doesn't need (`provider`, `model`, `skills`, `addDirs`, header button/chip **labels**), **plus** which keys the file set and how each fared (applied / dropped in validation / not a setting at all). Read-only; backs the Settings modal's **Directory settings** preview. Unlike the other `?cwd=` routes this one does **not** fall back to the default workspace — it reports on the directory it was asked about, so a path that no longer exists comes back as `exists:false`. Sound paths and button commands stay server-side. |
|
|
1613
1613
|
| `GET /api/launch-options` | The Anthropic-compatible backends this server can reach, each with its models and — when it can't — the reason. Reports the **name** of the env var a key is read from, never the key. |
|
|
1614
|
+
| `GET /api/update-status` | What is running and whether anything newer exists: `install` (`npm` / `git`), `version`, `commit` (a checkout's short HEAD sha), `latest` (npm, only when newer) and the one-line `notice`. Backs the header's **Update** badge and the Settings version line. Computed once at startup and served from memory — `ready` is false until that check lands. |
|
|
1614
1615
|
| `GET /api/notifications`(`/history`) · `POST /api/notifications/:id/clear` | Notification feed. |
|
|
1615
1616
|
| `POST /api/transcribe`(`/model`…) | Voice-input transcription (Whisper, macOS). |
|
|
1616
1617
|
| `POST /api/translation` | Runtime UI-string translation. |
|
|
@@ -1958,7 +1959,7 @@ src/
|
|
|
1958
1959
|
PrsOverlay.vue cross-repo PRs & Issues
|
|
1959
1960
|
Wiki*View.vue, Collections*.vue, AccountingOverlay.vue workspace views
|
|
1960
1961
|
TimelineOverlay.vue, ToolsPane.vue, NotificationBell.vue, RemoteHostControl.vue
|
|
1961
|
-
SettingsModal.vue
|
|
1962
|
+
SettingsModal.vue settings — the dialog shell + section order
|
|
1962
1963
|
settings/ one file per settings section (theme, sounds,
|
|
1963
1964
|
web push, google, PR repos, launchers, quick
|
|
1964
1965
|
commands, MCP, cost, shortcuts, …), plus the
|
package/bin/update-check.d.ts
CHANGED
|
@@ -6,6 +6,16 @@ export interface UpdateNoticeDeps {
|
|
|
6
6
|
fetchLatest?: () => Promise<string | null>;
|
|
7
7
|
}
|
|
8
8
|
export declare function computeUpdateNotice(pkgDir: string, currentVersion: string, deps?: UpdateNoticeDeps): Promise<string | null>;
|
|
9
|
+
export declare function readInstallInfo(
|
|
10
|
+
pkgDir: string,
|
|
11
|
+
currentVersion: string,
|
|
12
|
+
deps?: UpdateNoticeDeps,
|
|
13
|
+
): Promise<Pick<import("../common/updateStatus.js").UpdateStatus, "install" | "version" | "commit">>;
|
|
14
|
+
export declare function computeUpdateInfo(
|
|
15
|
+
pkgDir: string,
|
|
16
|
+
currentVersion: string,
|
|
17
|
+
deps?: UpdateNoticeDeps,
|
|
18
|
+
): Promise<Omit<import("../common/updateStatus.js").UpdateStatus, "ready">>;
|
|
9
19
|
export declare function isUpdateCheckDisabled(env: Record<string, string | undefined>): boolean;
|
|
10
20
|
export declare function hasNodeModulesSegment(pkgDir: string): boolean;
|
|
11
21
|
export declare function classifyInstall(pkgDir: string, isGitWorkTree: boolean): "npm" | "git";
|
package/bin/update-check.js
CHANGED
|
@@ -168,15 +168,12 @@ export function gitUpdateNotice({ localSha, localShort, remoteSha, defaultBranch
|
|
|
168
168
|
const LS_REMOTE_TIMEOUT_MS = 6000;
|
|
169
169
|
|
|
170
170
|
// The git branch of the check: local HEAD vs the remote's, read with ls-remote so no fetch is
|
|
171
|
-
// forced. Silent on a dirty tree (can't fast-forward) or any unreadable probe.
|
|
172
|
-
|
|
171
|
+
// forced. Silent on a dirty tree (can't fast-forward) or any unreadable probe. `localShort` is
|
|
172
|
+
// passed in because the caller has already read it for the version display.
|
|
173
|
+
async function gitUpdateNotice_(git, localShort) {
|
|
173
174
|
const status = await git(["status", "--porcelain"]);
|
|
174
175
|
if (status === null || isTreeDirtyForUpdate(status)) return null;
|
|
175
|
-
const [localSha,
|
|
176
|
-
git(["rev-parse", "HEAD"]),
|
|
177
|
-
git(["rev-parse", "--short", "HEAD"]),
|
|
178
|
-
git(["ls-remote", "--symref", "origin", "HEAD"], LS_REMOTE_TIMEOUT_MS),
|
|
179
|
-
]);
|
|
176
|
+
const [localSha, lsRemote] = await Promise.all([git(["rev-parse", "HEAD"]), git(["ls-remote", "--symref", "origin", "HEAD"], LS_REMOTE_TIMEOUT_MS)]);
|
|
180
177
|
return gitUpdateNotice({
|
|
181
178
|
localSha,
|
|
182
179
|
localShort,
|
|
@@ -186,14 +183,32 @@ async function gitUpdateNotice_(git) {
|
|
|
186
183
|
});
|
|
187
184
|
}
|
|
188
185
|
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
export async function computeUpdateNotice(pkgDir, currentVersion, deps = {}) {
|
|
186
|
+
// What is running, without asking the network: the install kind and — for a checkout, where the
|
|
187
|
+
// package.json version is only the last release — the commit that identifies the build. Local
|
|
188
|
+
// probes only, so this is also what the UI gets when the update check is opted out.
|
|
189
|
+
export async function readInstallInfo(pkgDir, currentVersion, deps = {}) {
|
|
194
190
|
const git = deps.runGit ?? ((args, timeout_ms) => runGit(pkgDir, args, timeout_ms));
|
|
195
|
-
const fetchLatest = deps.fetchLatest ?? fetchLatestVersion;
|
|
196
191
|
const inWorkTree = hasNodeModulesSegment(pkgDir) ? false : (await git(["rev-parse", "--is-inside-work-tree"])) === "true";
|
|
197
|
-
|
|
198
|
-
return
|
|
192
|
+
const install = classifyInstall(pkgDir, inWorkTree);
|
|
193
|
+
return { install, version: currentVersion, commit: install === "git" ? await git(["rev-parse", "--short", "HEAD"]) : null };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// The whole check, front to back: what is running, what is newer, and the one line that says so
|
|
197
|
+
// (null when current). `pkgDir` is where the tool lives — a node_modules dir (→ npm) or a bare
|
|
198
|
+
// checkout (→ git). `deps` lets tests drive it without spawning git or hitting the network;
|
|
199
|
+
// production callers pass nothing and get the real git/registry probes bound to pkgDir.
|
|
200
|
+
export async function computeUpdateInfo(pkgDir, currentVersion, deps = {}) {
|
|
201
|
+
const git = deps.runGit ?? ((args, timeout_ms) => runGit(pkgDir, args, timeout_ms));
|
|
202
|
+
const fetchLatest = deps.fetchLatest ?? fetchLatestVersion;
|
|
203
|
+
const info = await readInstallInfo(pkgDir, currentVersion, { runGit: git });
|
|
204
|
+
if (info.install === "git") return { ...info, latest: null, notice: await gitUpdateNotice_(git, info.commit) };
|
|
205
|
+
const latest = await fetchLatest();
|
|
206
|
+
// `latest` is what the UI OFFERS, so it carries only a version worth moving to — the registry
|
|
207
|
+
// answering with the version already installed is not news.
|
|
208
|
+
return { ...info, latest: latest && isNewerVersion(latest, currentVersion) ? latest : null, notice: npmUpdateNotice(currentVersion, latest) };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// The notice alone, for the launcher's console line.
|
|
212
|
+
export async function computeUpdateNotice(pkgDir, currentVersion, deps = {}) {
|
|
213
|
+
return (await computeUpdateInfo(pkgDir, currentVersion, deps)).notice;
|
|
199
214
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// What GET /api/update-status answers: which install is running, what it is, and what is newer.
|
|
2
|
+
// Shared because both sides decide from it — the server builds it from the startup probe, the
|
|
3
|
+
// header badge and the Settings version line read it.
|
|
4
|
+
|
|
5
|
+
import { isRecord } from "./isRecord.js";
|
|
6
|
+
|
|
7
|
+
/** How the tool was installed, which decides what "the running version" even means. */
|
|
8
|
+
export type InstallKind = "npm" | "git";
|
|
9
|
+
|
|
10
|
+
export interface UpdateStatus {
|
|
11
|
+
/** False until the startup check has landed; `commit` / `latest` / `notice` are not final yet. */
|
|
12
|
+
ready: boolean;
|
|
13
|
+
install: InstallKind;
|
|
14
|
+
/** The shipped package.json version. For a git checkout this is the last release, not the build. */
|
|
15
|
+
version: string;
|
|
16
|
+
/** git installs: short HEAD sha — the only thing that identifies which build is running. */
|
|
17
|
+
commit: string | null;
|
|
18
|
+
/** npm installs: the registry's version, present only when it is newer than `version`. */
|
|
19
|
+
latest: string | null;
|
|
20
|
+
/** The one-line "update available" rendering both the launcher and the header badge show. */
|
|
21
|
+
notice: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const isInstallKind = (value: unknown): value is InstallKind => value === "npm" || value === "git";
|
|
25
|
+
|
|
26
|
+
const stringOrNull = (value: unknown): string | null => (typeof value === "string" ? value : null);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The response as a status, or null when it is not one. Null rather than a filled-in default: a
|
|
30
|
+
* body we could not read must leave the version line hidden, not print a version nobody is on.
|
|
31
|
+
*/
|
|
32
|
+
export function parseUpdateStatus(body: unknown): UpdateStatus | null {
|
|
33
|
+
if (!isRecord(body) || !isInstallKind(body.install) || typeof body.version !== "string") return null;
|
|
34
|
+
return {
|
|
35
|
+
ready: body.ready === true,
|
|
36
|
+
install: body.install,
|
|
37
|
+
version: body.version,
|
|
38
|
+
commit: stringOrNull(body.commit),
|
|
39
|
+
latest: stringOrNull(body.latest),
|
|
40
|
+
notice: stringOrNull(body.notice),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-Bdt8pFDJ-DsF7k-Jl.js";import{f as t}from"./src-CvsWqFln-Tc7ZSrRz.js";import{_ as n,g as r}from"./mermaid-parser.core-C1baW7NG-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-Bdt8pFDJ-DsF7k-Jl.js";import{f as t}from"./src-CvsWqFln-Tc7ZSrRz.js";import{_ as n,g as r}from"./mermaid-parser.core-C1baW7NG-DMZf-3IA.js";import"./chunk-WYO6CB5R-nS6zX9ct-KrP8SxMs.js";import"./chunk-VAUOI2AC-BKx35BBi-E0yAewsj.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-CorQ_Pl1-mXFOYgnO.js";import{t as s}from"./chunk-JWPE2WC7-BQ3zXr2k-DSd3Ct95.js";var c=r().RailroadAbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=e(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=e(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=e(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=e(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=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{s(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{a.clear(),t.debug(`[ABNF Parser] Starting Langium parse`);let r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new n(r);let i=r.value;t.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),t.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:o,styles:i};export{g as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e}from"./mermaid-parser.core-C1baW7NG-DMZf-3IA.js";export{e as createArchitectureServices};
|