mulmoterminal 13.2.0 → 13.3.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 +42 -4
- package/common/bundledSkills.ts +1 -0
- package/common/ghItems.ts +4 -0
- package/common/githubBoard.ts +9 -0
- package/common/libraryMemory.ts +74 -0
- package/common/libraryPromote.ts +25 -0
- package/common/libraryRepeats.ts +86 -0
- package/common/libraryRetrospective.ts +36 -0
- package/common/librarySettings.ts +61 -0
- package/common/libraryStorage.ts +105 -0
- package/common/libraryTools.ts +52 -0
- package/common/ptyOpenedChannel.ts +18 -0
- package/common/trimEndOf.ts +8 -0
- package/dist/assets/{Notation-CypJd7OM-Bkj3ugvx.js → Notation-CypJd7OM-D4oJLFIP.js} +1 -1
- package/dist/assets/{abnfDiagram-S7VZAUFO-D1ywcxJJ.js → abnfDiagram-S7VZAUFO-BMcgYOG2.js} +1 -1
- package/dist/assets/{architecture-WOLXFQ4H-CzxWOh7g.js → architecture-WOLXFQ4H-CqhsvxLg.js} +1 -1
- package/dist/assets/{architectureDiagram-YGSQEFNW-DXkBxnZB.js → architectureDiagram-YGSQEFNW-DsijgzL1.js} +1 -1
- package/dist/assets/{blockDiagram-APKKGZFW-C93vJZ60.js → blockDiagram-APKKGZFW-erx3F2wt.js} +1 -1
- package/dist/assets/{c4Diagram-KJ2TOQU5-CzhIrSPv.js → c4Diagram-KJ2TOQU5-Dr5IktyG.js} +1 -1
- package/dist/assets/{chunk-6MUBBAK2-B8dba2D5.js → chunk-6MUBBAK2-DH9iP_SO.js} +1 -1
- package/dist/assets/{chunk-AXFCVDMN-BF1BaeZM.js → chunk-AXFCVDMN-B4mG9OUM.js} +1 -1
- package/dist/assets/{chunk-BG4553SI-CrlLpYyS.js → chunk-BG4553SI-B01m1Fri.js} +1 -1
- package/dist/assets/{chunk-DQASFODM-31XKM8G5.js → chunk-DQASFODM-CJxMupbb.js} +1 -1
- package/dist/assets/{chunk-HFQBQIA3-hdZEPui0.js → chunk-HFQBQIA3-KFFKf4m6.js} +1 -1
- package/dist/assets/{chunk-KQLB2F66-pq29Bwny.js → chunk-KQLB2F66-BLFTzPrj.js} +1 -1
- package/dist/assets/{chunk-KS47KZWR-D8euv6BW.js → chunk-KS47KZWR-DUf5pi0p.js} +1 -1
- package/dist/assets/{chunk-LEVMRMFU-DxfgjwMM.js → chunk-LEVMRMFU-ComSfUsY.js} +1 -1
- package/dist/assets/{chunk-M57EVK23-CbRhplaG.js → chunk-M57EVK23-Cym5WjjC.js} +1 -1
- package/dist/assets/{chunk-OY52VR5R-WRzw8fSZ.js → chunk-OY52VR5R-BqExdpA8.js} +1 -1
- package/dist/assets/{chunk-QB3YPZ4I-BomH8StZ.js → chunk-QB3YPZ4I-C6vMfT9j.js} +1 -1
- package/dist/assets/{chunk-R3KSYZAL-U5ZTWDjT.js → chunk-R3KSYZAL-jJrOTMxV.js} +1 -1
- package/dist/assets/{chunk-STOXU5M4-Cwsfrp8s.js → chunk-STOXU5M4-TtyPEMjC.js} +1 -1
- package/dist/assets/{chunk-TU62E6Q5-CgTV0yCN.js → chunk-TU62E6Q5-BcX9C3vU.js} +1 -1
- package/dist/assets/{chunk-X4PVCEUW-DkeipGOD.js → chunk-X4PVCEUW-622V7pcP.js} +1 -1
- package/dist/assets/{classDiagram-v2-L25IHNXF-D_SUDLFf.js → classDiagram-v2-L25IHNXF-CG2OEy42.js} +1 -1
- package/dist/assets/cynefin-EF2NZ3EQ-DwqnCkiL.js +1 -0
- package/dist/assets/{cynefinDiagram-L36ESFBY-SGjnYvMu.js → cynefinDiagram-L36ESFBY-b0PW0BRV.js} +1 -1
- package/dist/assets/{dagre-SPEB5RXH-BgdOh_QS.js → dagre-SPEB5RXH-ChpooqkD.js} +1 -1
- package/dist/assets/{diagram-3B7GL73J-BpgZlDn8.js → diagram-3B7GL73J-COJn-Hnl.js} +1 -1
- package/dist/assets/{diagram-DNEMPZML-xrSdIhy8.js → diagram-DNEMPZML-DPoos9W_.js} +1 -1
- package/dist/assets/{diagram-L3MUGCDN-CQsJbFFT.js → diagram-L3MUGCDN-BomMVHrk.js} +1 -1
- package/dist/assets/{diagram-LA4NIPWU-kJV1gdXE.js → diagram-LA4NIPWU-DOmO8Jer.js} +1 -1
- package/dist/assets/{diagram-MHCOC4E2-CNBRjzg8.js → diagram-MHCOC4E2-BHBeHFy8.js} +1 -1
- package/dist/assets/{diagram-XPFHEONP-BuoqzWAD.js → diagram-XPFHEONP-DD7FFvTB.js} +1 -1
- package/dist/assets/{dist-CaAdsmKa.js → dist-BOQlrxwy.js} +1 -1
- package/dist/assets/{dist-CH6Es3_d.js → dist-B_e8GY23.js} +1 -1
- package/dist/assets/dist-CSp1bGLv.js +2 -0
- package/dist/assets/{dist-BGAjB1Pl.js → dist-CvW1pMqB.js} +1 -1
- package/dist/assets/{dist-CkwWFeBg.js → dist-DnfM3aPI.js} +1 -1
- package/dist/assets/{dist-BoBnhiwu.js → dist-DreEPxod.js} +1 -1
- package/dist/assets/{ebnfDiagram-UZSYDL2S-COZ_UYsS.js → ebnfDiagram-UZSYDL2S-DFzHCxXo.js} +1 -1
- package/dist/assets/{echarts-gl-Cju9Hjy8.js → echarts-gl-YiN0LqIW.js} +1 -1
- package/dist/assets/{elk-XV6XMXQE-Bf_zpXJ-.js → elk-XV6XMXQE-Kgff7tvd.js} +1 -1
- package/dist/assets/{emscripten-module-Q67P5WYC-C2pz9hud.js → emscripten-module-Q67P5WYC-B9iy4Bgu.js} +1 -1
- package/dist/assets/{erDiagram-EYBAPDEH-B_wEcY9d.js → erDiagram-EYBAPDEH-BTWkB5PA.js} +1 -1
- package/dist/assets/{eventmodeling-K75KTNOO-Bz-7Ov6a.js → eventmodeling-K75KTNOO-BgZU1_zA.js} +1 -1
- package/dist/assets/flowDiagram-MALGAFMO-BPTzCYVB.js +1 -0
- package/dist/assets/{ganttDiagram-23REXITY-9dI4Sb-Y.js → ganttDiagram-23REXITY-DlFGlYNT.js} +1 -1
- package/dist/assets/gitGraph-VSP46ZUC-C-zLTI42.js +1 -0
- package/dist/assets/{gitGraphDiagram-STJD7YCW-CJrcuSxh.js → gitGraphDiagram-STJD7YCW-DratNofa.js} +1 -1
- package/dist/assets/index--APEAsVF.css +1 -0
- package/dist/assets/{index-2biruWQx.js → index-Dc8zMoSG.js} +637 -626
- package/dist/assets/info-OHQRW6UA-D6xccwYW.js +1 -0
- package/dist/assets/{infoDiagram-KBXO4MBG-CFuszPhx.js → infoDiagram-KBXO4MBG-D9vm3eva.js} +1 -1
- package/dist/assets/{ishikawaDiagram-M35NCXHK-0cLJulAY.js → ishikawaDiagram-M35NCXHK-C16xQBfm.js} +1 -1
- package/dist/assets/{journeyDiagram-OPLOXDXO-BLj4TqPQ.js → journeyDiagram-OPLOXDXO-C3MJaTdC.js} +1 -1
- package/dist/assets/{kanban-definition-BZKZHSQY-BwxUFQi3.js → kanban-definition-BZKZHSQY-CgHSD97S.js} +1 -1
- package/dist/assets/{line-BY6Cr-hg.js → line-DGc9Wwrr.js} +1 -1
- package/dist/assets/{manifold-CHW6v47O.js → manifold-DO1Dy1jV.js} +1 -1
- package/dist/assets/{mermaid-parser.core-DCy09sdt.js → mermaid-parser.core-CZXw0Z-h.js} +3 -3
- package/dist/assets/{mermaid.core-DII2m8Jh.js → mermaid.core-Am2s49wf.js} +4 -4
- package/dist/assets/{mindmap-definition-I2QAS2VK-DPuWv7ac.js → mindmap-definition-I2QAS2VK-AYuUi-1t.js} +1 -1
- package/dist/assets/packet-JDAUHWVQ-BRmDFxbP.js +1 -0
- package/dist/assets/{pegDiagram-FD4XPPHP-RxkPvHT3.js → pegDiagram-FD4XPPHP-ZgRyArnU.js} +1 -1
- package/dist/assets/pie-XZMESJXO-BcU8uN2-.js +1 -0
- package/dist/assets/{pieDiagram-J4AKIIQI-CLtu6zfB.js → pieDiagram-J4AKIIQI-Jdh-2iWY.js} +1 -1
- package/dist/assets/{quadrantDiagram-XTYBLID2-CzWQe7_L.js → quadrantDiagram-XTYBLID2-B-L_DUcJ.js} +1 -1
- package/dist/assets/radar-ABXABTNO-q6s0ov8g.js +1 -0
- package/dist/assets/railroad-I3PHUGI6-FiR2iLTA.js +1 -0
- package/dist/assets/{railroad-abnf-LNEFI6M7-BD6waUQF.js → railroad-abnf-LNEFI6M7-BRsICqY5.js} +1 -1
- package/dist/assets/{railroad-ebnf-DWYD2UWJ-ClBqanFH.js → railroad-ebnf-DWYD2UWJ-J581SN3T.js} +1 -1
- package/dist/assets/{railroad-peg-JR7BVNR7-VMHl1tcR.js → railroad-peg-JR7BVNR7-C-QY0AZR.js} +1 -1
- package/dist/assets/{railroadDiagram-MRQ6NCDL-RiGAgMaB.js → railroadDiagram-MRQ6NCDL-CvjjFwVP.js} +1 -1
- package/dist/assets/{requirementDiagram-Y7LWUY3S-gMasSNPL.js → requirementDiagram-Y7LWUY3S-qrXGd3zr.js} +1 -1
- package/dist/assets/{sankeyDiagram-WGJFYUXA-DWRWy9ya.js → sankeyDiagram-WGJFYUXA-Bx0N1IkY.js} +1 -1
- package/dist/assets/{sequenceDiagram-5NDRBG5M-Cc0GMFmT.js → sequenceDiagram-5NDRBG5M-w24GJW4g.js} +1 -1
- package/dist/assets/{stateDiagram-v2-FJ4FJNEA-kZUOgUaG.js → stateDiagram-v2-FJ4FJNEA-D1KVlNmY.js} +1 -1
- package/dist/assets/{swimlanes-UMQ2AFYF-Cc3zY4p-.js → swimlanes-UMQ2AFYF-DTCUOS1f.js} +1 -1
- package/dist/assets/swimlanesDiagram-OMPLPG4O-674lZwKu.js +8 -0
- package/dist/assets/{timeline-definition-SEUHKTQE-CJQzhcUU.js → timeline-definition-SEUHKTQE-C2r1NiQI.js} +1 -1
- package/dist/assets/treeView-D4JQ5SDB-Cg-BEsgg.js +1 -0
- package/dist/assets/treemap-SAJKECNS-BSixpn8-.js +1 -0
- package/dist/assets/{usecaseDiagram-AFA6YXN4-BNz1ziZs.js → usecaseDiagram-AFA6YXN4-CMJfAL7M.js} +1 -1
- package/dist/assets/{vennDiagram-NNMJR3RB-BGNM3y1D.js → vennDiagram-NNMJR3RB-BQYxzZ6O.js} +1 -1
- package/dist/assets/wardley-7MLQ67FV-BicDp3r_.js +1 -0
- package/dist/assets/{wardleyDiagram-S7YFUSEH-DdgXJ6yj.js → wardleyDiagram-S7YFUSEH-DtT564L-.js} +1 -1
- package/dist/assets/{xychartDiagram-GGNKY7IX-CnD9_h1u.js → xychartDiagram-GGNKY7IX-ByQ3LQkA.js} +1 -1
- package/dist/index.html +2 -2
- package/docs/ChangeLog.md +69 -0
- package/docs/facts.json +1 -1
- package/docs/guide/en/conversation.md +5 -2
- package/docs/guide/en/feature-list.md +17 -1
- package/docs/guide/en/features.md +4 -4
- package/docs/guide/en/github.md +19 -1
- package/docs/guide/en/index.md +4 -2
- package/docs/guide/en/v13.3.0.md +227 -0
- package/docs/guide/ja/conversation.md +5 -2
- package/docs/guide/ja/feature-list.md +17 -1
- package/docs/guide/ja/features.md +4 -4
- package/docs/guide/ja/github.md +17 -1
- package/docs/guide/ja/index.md +3 -2
- package/docs/guide/ja/v13.3.0.md +214 -0
- package/package.json +1 -1
- package/server/agents/antigravity/antigravity-last-turn.ts +61 -0
- package/server/agents/antigravity/antigravity-session.ts +3 -0
- package/server/agents/antigravity/antigravity-sessions.ts +3 -2
- package/server/agents/copilot/copilot-last-turn.ts +76 -0
- package/server/agents/copilot/copilot-sessions.ts +3 -0
- package/server/agents/cursor/cursor-last-turn.ts +2 -24
- package/server/agents/cursor/cursor-sessions.ts +2 -2
- package/server/agents/grok/grok-last-turn.ts +66 -0
- package/server/agents/grok/grok-sessions.ts +3 -0
- package/server/agents/user-query.ts +24 -0
- package/server/backends/library/cleanup-period.ts +20 -0
- package/server/backends/library/conversation-fold.ts +16 -0
- package/server/backends/library/index-queries.ts +35 -0
- package/server/backends/library/index-store.ts +7 -4
- package/server/backends/library/instruction-files-read.ts +282 -0
- package/server/backends/library/instruction-files.ts +113 -0
- package/server/backends/library/instruction-references.ts +72 -0
- package/server/backends/library/library-client.ts +1 -1
- package/server/backends/library/library-dispatch.ts +21 -1
- package/server/backends/library/library-service.ts +71 -2
- package/server/backends/library/library-worker.ts +2 -2
- package/server/backends/library/memory-folders.ts +28 -8
- package/server/backends/library/memory-health-read.ts +163 -0
- package/server/backends/library/memory-health.ts +145 -0
- package/server/backends/library/memory-index-lines.ts +33 -0
- package/server/backends/library/memory-link-rewrite.ts +99 -0
- package/server/backends/library/memory-merge-links.ts +82 -0
- package/server/backends/library/memory-source.ts +30 -0
- package/server/backends/library/memory-trash.ts +343 -0
- package/server/backends/library/memory-workcopies.ts +50 -0
- package/server/backends/library/memory-write.ts +59 -0
- package/server/backends/library/repeat-detect.ts +207 -0
- package/server/backends/library/repeat-source.ts +59 -0
- package/server/backends/library/retrospective.ts +67 -0
- package/server/backends/library/settings-layers-read.ts +32 -0
- package/server/backends/library/settings-layers.ts +82 -0
- package/server/backends/library/storage-home.ts +80 -0
- package/server/backends/library/storage-measurer.ts +101 -0
- package/server/backends/library/storage-projects.ts +56 -0
- package/server/backends/library/storage-walk.ts +72 -0
- package/server/backends/library/storage-worker.ts +18 -0
- package/server/backends/skills/skillCatalog.ts +9 -4
- package/server/backends/skills/skillEdit.ts +19 -0
- package/server/files/files-tree-routes.ts +1 -4
- package/server/files/tree-ops.ts +15 -3
- package/server/git/board-fetch.ts +60 -25
- package/server/git/board-repos.ts +34 -0
- package/server/git/board.ts +19 -4
- package/server/index.ts +3 -0
- package/server/routes/app-routes.ts +1 -1
- package/server/routes/library-memory-routes.ts +191 -10
- package/server/routes/library-promote-routes.ts +57 -0
- package/server/routes/library-repeat-routes.ts +48 -0
- package/server/routes/library-routes.ts +23 -1
- package/server/routes/library-storage-routes.ts +108 -0
- package/server/routes/library-tools-routes.ts +80 -0
- package/server/routes/repo-routes.ts +16 -10
- package/server/routes/session-routes.ts +57 -1
- package/server/routes/skill-catalog-routes.ts +27 -1
- package/server/routes/ws-routes.ts +5 -3
- package/server/session/activity/task-push.ts +9 -7
- package/server/session/pty/agent-pty-start.ts +2 -2
- package/server/session/pty/pty-register.ts +25 -0
- package/server/session/session-reads.ts +51 -3
- package/server/session/spawn/agents/permission-mode-log.ts +25 -0
- package/server/session/spawn/agents/session-permission-mode.ts +49 -0
- package/server/session/spawn/agents/spawn-claude.ts +15 -4
- package/server/session/spawn/issue-session-spawn.ts +19 -5
- package/server/session/spawn/issue-spawn-options.ts +2 -1
- package/server/session/spawn/spawn-shell.ts +3 -3
- package/server/session/transcript/handoff-text.ts +39 -0
- package/server/session/transcript/relay-mark-store.ts +48 -0
- package/server/session/transcript/relay-marks.ts +41 -0
- package/server/session/transcript/relay-range.ts +116 -0
- package/server/session/transcript/relay-read.ts +64 -0
- package/server/session/transcript/transcript-view-antigravity.ts +104 -0
- package/server/session/transcript/transcript-view-cursor.ts +4 -3
- package/server/session/transcript/transcript-view-grok.ts +98 -0
- package/server/session/transcript/transcript-view-read.ts +36 -17
- package/server/skills/mulmoterminal-decisions/SKILL.md +1 -1
- package/server/skills/mulmoterminal-library/SKILL.md +94 -0
- package/dist/assets/cynefin-EF2NZ3EQ-BO6sbOTe.js +0 -1
- package/dist/assets/dist-CvoDRBOB.js +0 -2
- package/dist/assets/flowDiagram-MALGAFMO-BNCQgw2W.js +0 -1
- package/dist/assets/gitGraph-VSP46ZUC-C1LDt_Ps.js +0 -1
- package/dist/assets/index-Bosx0ygR.css +0 -1
- package/dist/assets/info-OHQRW6UA-DRlKlOwD.js +0 -1
- package/dist/assets/packet-JDAUHWVQ-D5o3cjnq.js +0 -1
- package/dist/assets/pie-XZMESJXO-M5OsFE3Z.js +0 -1
- package/dist/assets/radar-ABXABTNO-FzD2sCnH.js +0 -1
- package/dist/assets/railroad-I3PHUGI6-D5_ZVXhN.js +0 -1
- package/dist/assets/swimlanesDiagram-OMPLPG4O-DtDwYrQ2.js +0 -8
- package/dist/assets/treeView-D4JQ5SDB-Bw6TRccc.js +0 -1
- package/dist/assets/treemap-SAJKECNS-DV1Ic9Gc.js +0 -1
- package/dist/assets/wardley-7MLQ67FV-BMhRQwOU.js +0 -1
package/README.md
CHANGED
|
@@ -1882,8 +1882,12 @@ narrow and tall for one record you are discussing — and each position keeps it
|
|
|
1882
1882
|
**Resume** (or `Enter`) to open it in a terminal in the directory it ran in. `/` focuses the
|
|
1883
1883
|
search, the arrow keys move. The **⋯** menu pins a conversation to the top of the list or renames
|
|
1884
1884
|
it; pins and names are MulmoTerminal's own (`~/.mulmoterminal/library/marks.json`) and the
|
|
1885
|
-
conversation's file is never written.
|
|
1886
|
-
|
|
1885
|
+
conversation's file is never written. **⋯** → **Promote to** turns the conversation into a memory,
|
|
1886
|
+
a `CLAUDE.md` rule, a plan under `plans/`, an issue or a skill: it opens a Claude cell in plan mode in the
|
|
1887
|
+
directory the conversation ran in, running the bundled `mulmoterminal-library` skill, which reads
|
|
1888
|
+
the conversation, shows the change as a diff, and writes nothing until you approve its plan (it backs up every
|
|
1889
|
+
file it changes first, and says how to undo). **Repeats** lists instructions you typed 3 times or more, in 2 conversations or more, in the last 90 days, read from `~/.claude/history.jsonl` (commands, pastes, automated runs and one-prompt sessions left out; short ones alike in a project grouped), with the conversations each was typed in lately; **Make a rule** / **Make a skill** start the same skill on it, in plan mode. **Storage** shows what each entry of `~/.claude` (or `CLAUDE_CONFIG_DIR`) takes on disk, and under `projects/` each project, largest first, with temp-directory ones marked; it is measured in the background and measured again when the last one is over an hour old, and it says what `cleanupPeriodDays` is set to. The conversation list leaves out `claude -p` and SDK runs, and runs from temp
|
|
1890
|
+
directories. The index behind it is built in the background the first time you open it and kept up to
|
|
1887
1891
|
date from what is appended; it is `~/.mulmoterminal/library/index.db` and can be deleted at any
|
|
1888
1892
|
time (it is rebuilt). `marks.json` beside it holds your pins and names and is not rebuilt.
|
|
1889
1893
|
A conversation's PR numbers open the PR; in the GitHub view, a PR a conversation made has a
|
|
@@ -1892,12 +1896,44 @@ narrow and tall for one record you are discussing — and each position keeps it
|
|
|
1892
1896
|
the whole change or of one turn's (read only; read from Claude Code's own file history).
|
|
1893
1897
|
**Memory** beside **Conversations** lists Claude Code's auto memory for every project, with how
|
|
1894
1898
|
full each `MEMORY.md` is against what Claude Code loads (200 lines / 25,000 bytes); a memory
|
|
1895
|
-
reads as Markdown and its `[[name]]` links open the memory they name (read only for now).
|
|
1899
|
+
reads as Markdown and its `[[name]]` links open the memory they name (read only for now).
|
|
1900
|
+
Memory that can be tidied is marked with a dot and counted above the list (**Show** narrows to
|
|
1901
|
+
it): a memory missing from `MEMORY.md`, missing frontmatter, a `[[link]]` to no memory, a file it
|
|
1902
|
+
names that is gone, a memory of the same name in another work copy of the repository (a directory
|
|
1903
|
+
whose `origin` is the same remote; the reader says which copies hold the same text), or an index
|
|
1904
|
+
that is missing, overfull or pointing at a file that is gone. For a copy that differs, the reader
|
|
1905
|
+
offers **Add its text here** (opens the editor with that copy's body added; saving writes this
|
|
1906
|
+
memory only) and **Write this text there** (writes this memory's text over that copy, refused if
|
|
1907
|
+
it changed since it was read, with **Undo**), so the copies can be made one. Under a memory's title,
|
|
1908
|
+
**Written in** names the conversation that last wrote it (from the file writes its transcript
|
|
1909
|
+
recorded) and opens it.
|
|
1910
|
+
**Edit** (`Enter`) changes a memory's whole text in place (`⌘Enter` saves, `Esc` cancels); a save
|
|
1911
|
+
is refused when the file changed on disk since it was opened, and a running session there is warned of.
|
|
1912
|
+
**⋯** → **Move to Trash** moves a memory to the system Trash with its lines in `MEMORY.md`, and
|
|
1913
|
+
**Undo** in the notice puts both back. **⋯** → **Merge into another memory** picks another memory of
|
|
1914
|
+
the same project and opens it in the editor with this one's body added at its end; saving writes it
|
|
1915
|
+
and moves this one to the Trash with its lines. It also points the `[[links]]` to this memory, in
|
|
1916
|
+
the merged text and in the project's other memories (as listed when the merge starts), at the one kept (never one inside code or by
|
|
1917
|
+
a name another memory also has; how many is said before saving, and a link that cannot be rewritten exactly stops the merge). **Undo**
|
|
1918
|
+
puts all of it back. **Tools** picks a directory a conversation ran in and lists the instruction
|
|
1919
|
+
files Claude Code loads there, in the order it loads them: the managed `CLAUDE.md`, yours and your
|
|
1920
|
+
`~/.claude/rules`, every `CLAUDE.md` / `.claude/CLAUDE.md` / `CLAUDE.local.md` from the filesystem root
|
|
1921
|
+
down, the project's `.claude/rules` (a rule with `paths` marked as loading only for matching files),
|
|
1922
|
+
and what their `@path` imports bring in — or `AGENTS.md` where no `CLAUDE.md` counts. Each is read
|
|
1923
|
+
beside the list, with the paths it names (Markdown links, code-span paths) that are not there. Above them, **Settings, laid over each other** reads the user, project, local and
|
|
1924
|
+
managed `settings.json` files in Claude Code's order and shows the permission rules (every file's,
|
|
1925
|
+
added up), environment variables, hooks and other keys in effect, each naming the file that set it.
|
|
1926
|
+
Read only. **More features** → **Usage** adds a retrospective of the last twelve weeks from the
|
|
1927
|
+
same index: money, conversations and the PRs they made, by week, project and agent (a conversation
|
|
1928
|
+
counts in the week it started); the token windows appear above it while token rotation is on. Design: [`docs/library-design.md`](docs/library-design.md).
|
|
1896
1929
|
- **Skills viewer** — **More features** → **Skills** lists every Claude skill on disk in three
|
|
1897
1930
|
columns — where it lives, its skills, its `SKILL.md`. The places are your `~/.claude/skills`,
|
|
1898
1931
|
each enabled plugin (skills shown as `plugin:skill`), and the `.claude/skills` of each folder a
|
|
1899
1932
|
terminal has run in (folders with none are left out). A project skill with the same name as one
|
|
1900
1933
|
of yours is marked as overriding it. The search (name, description or folder) narrows both lists.
|
|
1934
|
+
**Edit** changes one of your own or a project's `SKILL.md` in place (`⌘Enter` saves, `Esc`
|
|
1935
|
+
cancels), refused if it changed on disk since it was opened; a plugin's skills and the ones
|
|
1936
|
+
MulmoTerminal ships (copied over at every start) are read only.
|
|
1901
1937
|
Switch to **skills.sh** to search the public directory at [skills.sh](https://skills.sh) for
|
|
1902
1938
|
skills you do not have yet and read one before installing it: its `SKILL.md`, every file it would
|
|
1903
1939
|
bring, and a warning listing the files that can run code. Nothing is installed from the viewer —
|
|
@@ -1978,7 +2014,7 @@ narrow and tall for one record you are discussing — and each position keeps it
|
|
|
1978
2014
|
- **Tool traffic is folded away**, one line saying what ran (`Bash · Read`); click to open it.
|
|
1979
2015
|
It is most of a turn's bulk and almost none of what you came back to read.
|
|
1980
2016
|
- A **snapshot**, not a live tail — the terminal beside it is the live view — and the header's
|
|
1981
|
-
reload fetches the newest turns again. Claude, Codex, Cursor and
|
|
2017
|
+
reload fetches the newest turns again. Claude, Codex, Cursor, Copilot, Grok and Antigravity; an agent whose
|
|
1982
2018
|
conversation no reader here can read yet says so rather than showing an empty pane.
|
|
1983
2019
|
- **Notifications** (🔔) — a toolbar bell with an unread badge and a dropdown of active
|
|
1984
2020
|
notifications; click a row to jump to its session.
|
|
@@ -2199,6 +2235,8 @@ name in `MULMOTERMINAL_HOST` / `MULMOTERMINAL_ALLOWED_ORIGINS`, against DNS rebi
|
|
|
2199
2235
|
| `GET /api/cursor/sessions?cwd=` | Cursor chats for the project, newest first. Cursor's project directory name is a truncated-and-hashed slug of the path, so this reads each directory's own `.workspace-trusted` to learn which one it stands for and omits any that does not say. |
|
|
2200
2236
|
| `GET /api/cost?cwd=&session=` | Estimated $ cost — session / today / month. |
|
|
2201
2237
|
| `GET /api/transcript/timeline?session=&cwd=` | Per-session activity timeline (tools run). |
|
|
2238
|
+
| `GET /api/transcript/relay?session=&cwd=&agent=&dest=` | Every exchange of that session since the last relay to directory `dest`: `status` (`ok` / `nothing-new` / `no-turn`), the `text` to paste, and the `mark` to record. |
|
|
2239
|
+
| `POST /api/transcript/relay-mark?session=&cwd=&agent=&dest=` | Body `{ mark }`. Records where the relay to `dest` ended, once the text was pasted. |
|
|
2202
2240
|
| `GET /api/transcript/last-turn?session=&cwd=&agent=` | A session's last completed exchange (`prompt`, `reply`) plus the `text` to paste into another terminal. `agent=codex` reads the codex rollout instead of the Claude transcript. |
|
|
2203
2241
|
| `GET /api/decisions?cwd=&limit=` | The decisions a human was asked to make in this project, newest first — each question with the options it offered, their descriptions, and the answer. `answerKind` says whether the answer was one of the options, text the user wrote instead (the question was wrong), or never given. Read out of Claude's own transcripts; writes nothing. `scanned` reports how many transcripts were read (the scan is capped) and `unreadable` how many could not be, so a partial answer is visible rather than implied. A `cwd` that is not an existing directory answers an empty response rather than falling back to the default workspace. |
|
|
2204
2242
|
| `GET /api/decisions/digest?cwd=` | The same decisions as Markdown, for an agent to read (`{ enabled, markdown }`). `enabled: false` means the `decisionDigest` setting is off — a different answer from an empty digest, so a reader can tell "switched off" from "nothing decided here". |
|
package/common/bundledSkills.ts
CHANGED
package/common/ghItems.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface RepoPrs {
|
|
|
29
29
|
// True when the repo has at least PR_LIMIT open PRs, so the list may be incomplete —
|
|
30
30
|
// surfaced in the UI so a truncated view isn't mistaken for full coverage.
|
|
31
31
|
truncated?: boolean;
|
|
32
|
+
/** Read only because a live cell is in it: not in `prRepos`. */
|
|
33
|
+
unregistered?: boolean;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export interface RepoIssues {
|
|
@@ -40,4 +42,6 @@ export interface RepoIssues {
|
|
|
40
42
|
truncated?: boolean;
|
|
41
43
|
// The repo's GitHub issues page, used as the "see the rest" target when truncated.
|
|
42
44
|
url?: string;
|
|
45
|
+
/** Read only because a live cell is in it: not in `prRepos`. */
|
|
46
|
+
unregistered?: boolean;
|
|
43
47
|
}
|
package/common/githubBoard.ts
CHANGED
|
@@ -49,6 +49,11 @@ export interface BoardCell {
|
|
|
49
49
|
waiting: boolean;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/** A live cell on no piece of work: on the default branch, which `branch` names, or on no branch (null). */
|
|
53
|
+
export interface BoardMainlineCell extends BoardCell {
|
|
54
|
+
branch: string | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
export interface BoardCard {
|
|
53
58
|
/** Stable within a repo: `pr-N`, `issue-N` or `branch-<name>`. */
|
|
54
59
|
key: string;
|
|
@@ -64,6 +69,10 @@ export interface RepoBoard {
|
|
|
64
69
|
repo: string;
|
|
65
70
|
cards?: BoardCard[];
|
|
66
71
|
error?: string;
|
|
72
|
+
/** Read only because a live cell is in it: not in `prRepos`. */
|
|
73
|
+
unregistered?: boolean;
|
|
74
|
+
/** The cells on the default branch or on no branch, which belong to no card. Absent when none. */
|
|
75
|
+
mainlineCells?: BoardMainlineCell[];
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
export interface BoardResponse {
|
package/common/libraryMemory.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { isRecord } from "./isRecord.js";
|
|
|
6
6
|
* bytes). Past either, the rest of the index is not in the agent's context. */
|
|
7
7
|
export const MEMORY_INDEX_LINES_MAX = 200;
|
|
8
8
|
export const MEMORY_INDEX_BYTES_MAX = 25_000;
|
|
9
|
+
/** The most a memory edit may write: far past any real memory, and what the editor refuses to send. */
|
|
10
|
+
export const MEMORY_EDIT_MAX_BYTES = 256 * 1024;
|
|
11
|
+
|
|
9
12
|
/** The index's own name in a memory folder. */
|
|
10
13
|
export const MEMORY_INDEX_FILE = "MEMORY.md";
|
|
11
14
|
|
|
@@ -76,6 +79,28 @@ export function frontmatterStillOpen(text: string): boolean {
|
|
|
76
79
|
return normalized.startsWith("---\n") && frontmatterEnd(normalized) === -1;
|
|
77
80
|
}
|
|
78
81
|
|
|
82
|
+
/** Where a memory's body starts in its text as written — after the frontmatter's closing line, or 0 when
|
|
83
|
+
* there is none — found as `parseMemoryFrontmatter` finds it, but on the text itself rather than its
|
|
84
|
+
* normalised copy, so the body can be edited and the frontmatter left byte for byte. */
|
|
85
|
+
export function memoryBodyStart(text: string): number {
|
|
86
|
+
const open = /^\uFEFF?---\r?\n/.exec(text);
|
|
87
|
+
if (open === null) return 0;
|
|
88
|
+
const close = /\r?\n---(?:\r?\n|$)/.exec(text.slice(open[0].length - 1));
|
|
89
|
+
return close === null ? 0 : open[0].length - 1 + close.index + close[0].length;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Whether a `[[link]]` names a memory: by its file name without `.md`, or by its frontmatter `name`,
|
|
93
|
+
* either side's surrounding spaces aside (a link's own are, and a quoted value can carry some). The one
|
|
94
|
+
* rule the reader, the health check and a merge's rewrite all decide a link's memory by. */
|
|
95
|
+
export const linkNamesMemory = (link: string, memory: { file: string; name: string | null }): boolean => {
|
|
96
|
+
const wanted = link.trim();
|
|
97
|
+
return wanted !== "" && (wanted === memory.file.replace(/\.md$/, "") || wanted === (memory.name ?? "").trim());
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** The names a `[[link]]` reaches a memory by, as `linkNamesMemory` decides it. */
|
|
101
|
+
export const memoryLinkNames = (memory: { file: string; name: string | null }): string[] =>
|
|
102
|
+
[memory.file.replace(/\.md$/, ""), (memory.name ?? "").trim()].filter((name, at, all) => name !== "" && all.indexOf(name) === at);
|
|
103
|
+
|
|
79
104
|
export function parseMemoryFrontmatter(text: string): MemoryFrontmatter {
|
|
80
105
|
const normalized = normalizedMemory(text);
|
|
81
106
|
const end = frontmatterEnd(normalized);
|
|
@@ -115,3 +140,52 @@ export const isLibraryMemoryProject = (value: unknown): value is LibraryMemoryPr
|
|
|
115
140
|
(value.index === null || (isRecord(value.index) && typeof value.index.lines === "number" && typeof value.index.bytes === "number")) &&
|
|
116
141
|
Array.isArray(value.files) &&
|
|
117
142
|
value.files.every(isMemoryFile);
|
|
143
|
+
|
|
144
|
+
/** A memory's type: `metadata.type`, or a top-level `type` as some memory files write it — an empty one
|
|
145
|
+
* falls through. The list and the health check both decide it here. */
|
|
146
|
+
export const memoryType = (frontmatter: Pick<MemoryFrontmatter, "fields" | "metadata">): string | null =>
|
|
147
|
+
frontmatter.metadata.type?.trim() || frontmatter.fields.type?.trim() || null;
|
|
148
|
+
|
|
149
|
+
/** What can be tidied in one memory file (#3331). */
|
|
150
|
+
export type MemoryFileIssue =
|
|
151
|
+
| { kind: "not-in-index" }
|
|
152
|
+
| { kind: "no-frontmatter"; missing: string[] }
|
|
153
|
+
| { kind: "broken-link"; names: string[] }
|
|
154
|
+
| { kind: "missing-path"; paths: string[] }
|
|
155
|
+
/** A memory of the same name in other work copies of the repository, each the same text or not. */
|
|
156
|
+
| { kind: "in-work-copies"; copies: { slug: string; same: boolean }[] };
|
|
157
|
+
|
|
158
|
+
/** What can be tidied in a project's memory as a whole: its index. */
|
|
159
|
+
export type MemoryProjectIssue = { kind: "index-over-limit" } | { kind: "no-index" } | { kind: "dead-index-entry"; files: string[] };
|
|
160
|
+
|
|
161
|
+
export interface LibraryMemoryHealth {
|
|
162
|
+
slug: string;
|
|
163
|
+
issues: MemoryProjectIssue[];
|
|
164
|
+
/** By file name; a file with nothing to tidy is not listed. */
|
|
165
|
+
files: Record<string, MemoryFileIssue[]>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const isStringList = (value: unknown): value is string[] => Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
169
|
+
|
|
170
|
+
const isFileIssue = (value: unknown): value is MemoryFileIssue => {
|
|
171
|
+
if (!isRecord(value)) return false;
|
|
172
|
+
if (value.kind === "not-in-index") return true;
|
|
173
|
+
if (value.kind === "no-frontmatter") return isStringList(value.missing);
|
|
174
|
+
if (value.kind === "broken-link") return isStringList(value.names);
|
|
175
|
+
if (value.kind === "in-work-copies") return Array.isArray(value.copies) && value.copies.length > 0 && value.copies.every(isWorkCopy);
|
|
176
|
+
return value.kind === "missing-path" && isStringList(value.paths);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const isWorkCopy = (value: unknown): value is { slug: string; same: boolean } =>
|
|
180
|
+
isRecord(value) && typeof value.slug === "string" && typeof value.same === "boolean";
|
|
181
|
+
|
|
182
|
+
const isProjectIssue = (value: unknown): value is MemoryProjectIssue =>
|
|
183
|
+
isRecord(value) && (value.kind === "index-over-limit" || value.kind === "no-index" || (value.kind === "dead-index-entry" && isStringList(value.files)));
|
|
184
|
+
|
|
185
|
+
export const isLibraryMemoryHealth = (value: unknown): value is LibraryMemoryHealth =>
|
|
186
|
+
isRecord(value) &&
|
|
187
|
+
typeof value.slug === "string" &&
|
|
188
|
+
Array.isArray(value.issues) &&
|
|
189
|
+
value.issues.every(isProjectIssue) &&
|
|
190
|
+
isRecord(value.files) &&
|
|
191
|
+
Object.values(value.files).every((issues) => Array.isArray(issues) && issues.every(isFileIssue));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Promoting a conversation from the Library (#3334): what it can become, and the turn that asks the
|
|
2
|
+
// bundled skill to make it. Both sides decide from these — the reader lists the targets, the server
|
|
3
|
+
// refuses any other and writes the turn — so they are named once, here.
|
|
4
|
+
import type { BundledSkillName } from "./bundledSkills.js";
|
|
5
|
+
|
|
6
|
+
/** What a conversation can be promoted to: a memory, a `CLAUDE.md` rule, a plan under `plans/`, an
|
|
7
|
+
* issue, or a skill. */
|
|
8
|
+
export const PROMOTE_TARGETS = ["memory", "rule", "plan", "issue", "skill"] as const;
|
|
9
|
+
|
|
10
|
+
export type PromoteTarget = (typeof PROMOTE_TARGETS)[number];
|
|
11
|
+
|
|
12
|
+
export const isPromoteTarget = (value: unknown): value is PromoteTarget => PROMOTE_TARGETS.some((target) => target === value);
|
|
13
|
+
|
|
14
|
+
/** The skill that reads the conversation and writes what it is promoted to, once the person approves. */
|
|
15
|
+
export const PROMOTE_SKILL: BundledSkillName = "mulmoterminal-library";
|
|
16
|
+
|
|
17
|
+
/** A Claude session id, a UUID: the only shape the transcript routes the skill reads it through take
|
|
18
|
+
* (a subagent's file name is not one, so a subagent's conversation is not promoted). Only such an id
|
|
19
|
+
* is put into the turn, so nothing the browser sent can become words the agent reads. */
|
|
20
|
+
const SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
21
|
+
|
|
22
|
+
/** The first turn of the session that promotes `sessionId`, or null for an id that is not one. */
|
|
23
|
+
export function promoteTurn(target: PromoteTarget, sessionId: string): string | null {
|
|
24
|
+
return SESSION_ID.test(sessionId) ? `/${PROMOTE_SKILL} promote ${target} ${sessionId}` : null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Instructions typed again and again (#3334), for the Library's Repeats view: candidates for a
|
|
2
|
+
// CLAUDE.md rule or a skill. The server finds them; the browser shows them; a candidate is promoted by
|
|
3
|
+
// its id, so nothing the browser sends becomes words the agent reads.
|
|
4
|
+
import { isRecord } from "./isRecord.js";
|
|
5
|
+
import { PROMOTE_SKILL } from "./libraryPromote.js";
|
|
6
|
+
|
|
7
|
+
/** How far back, how many times and in how many conversations an instruction has to be typed to count
|
|
8
|
+
* as repeated. The server decides by them and the view says them. */
|
|
9
|
+
export const REPEAT_WINDOW_DAYS = 90;
|
|
10
|
+
export const REPEAT_MIN_COUNT = 3;
|
|
11
|
+
export const REPEAT_MIN_SESSIONS = 2;
|
|
12
|
+
|
|
13
|
+
/** What a repeated instruction can become. */
|
|
14
|
+
export const REPEAT_TARGETS = ["rule", "skill"] as const;
|
|
15
|
+
|
|
16
|
+
export type RepeatTarget = (typeof REPEAT_TARGETS)[number];
|
|
17
|
+
|
|
18
|
+
export const isRepeatTarget = (value: unknown): value is RepeatTarget => REPEAT_TARGETS.some((target) => target === value);
|
|
19
|
+
|
|
20
|
+
/** One time the instruction was typed. */
|
|
21
|
+
export interface RepeatOccurrence {
|
|
22
|
+
sessionId: string;
|
|
23
|
+
project: string | null;
|
|
24
|
+
at: number;
|
|
25
|
+
text: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface RepeatCandidate {
|
|
29
|
+
/** Stable while the instruction's most typed form stays the most typed: hex. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Its most typed form. */
|
|
32
|
+
text: string;
|
|
33
|
+
/** The forms it was typed in, most typed first. */
|
|
34
|
+
variants: string[];
|
|
35
|
+
count: number;
|
|
36
|
+
sessions: number;
|
|
37
|
+
/** The directories it was typed in, most first. */
|
|
38
|
+
projects: string[];
|
|
39
|
+
lastAt: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** GET /api/library/repeats: the most typed candidates, and how many there are in all. */
|
|
43
|
+
export interface RepeatList {
|
|
44
|
+
candidates: RepeatCandidate[];
|
|
45
|
+
total: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** One candidate with the latest times it was typed, newest first (for the skill that promotes it);
|
|
49
|
+
* `count` is how many there were in all, and `projects` names every directory it was typed in. */
|
|
50
|
+
export interface RepeatDetail extends RepeatCandidate {
|
|
51
|
+
occurrences: RepeatOccurrence[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const REPEAT_ID = /^[0-9a-f]{16}$/;
|
|
55
|
+
|
|
56
|
+
export const isRepeatId = (value: string): boolean => REPEAT_ID.test(value);
|
|
57
|
+
|
|
58
|
+
/** The first turn of the session that promotes a candidate, or null for an id that is not one. */
|
|
59
|
+
export function repeatTurn(target: RepeatTarget, id: string): string | null {
|
|
60
|
+
return isRepeatId(id) ? `/${PROMOTE_SKILL} repeat ${target} ${id}` : null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const isStrings = (value: unknown): value is string[] => Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
64
|
+
|
|
65
|
+
export const isRepeatCandidate = (value: unknown): value is RepeatCandidate =>
|
|
66
|
+
isRecord(value) &&
|
|
67
|
+
typeof value.id === "string" &&
|
|
68
|
+
typeof value.text === "string" &&
|
|
69
|
+
isStrings(value.variants) &&
|
|
70
|
+
typeof value.count === "number" &&
|
|
71
|
+
typeof value.sessions === "number" &&
|
|
72
|
+
isStrings(value.projects) &&
|
|
73
|
+
typeof value.lastAt === "number";
|
|
74
|
+
|
|
75
|
+
const isOccurrence = (value: unknown): value is RepeatOccurrence =>
|
|
76
|
+
isRecord(value) &&
|
|
77
|
+
typeof value.sessionId === "string" &&
|
|
78
|
+
(value.project === null || typeof value.project === "string") &&
|
|
79
|
+
typeof value.at === "number" &&
|
|
80
|
+
typeof value.text === "string";
|
|
81
|
+
|
|
82
|
+
export const isRepeatDetail = (value: unknown): value is RepeatDetail =>
|
|
83
|
+
isRepeatCandidate(value) && isRecord(value) && Array.isArray(value.occurrences) && value.occurrences.every(isOccurrence);
|
|
84
|
+
|
|
85
|
+
export const isRepeatList = (value: unknown): value is RepeatList =>
|
|
86
|
+
isRecord(value) && Array.isArray(value.candidates) && value.candidates.every(isRepeatCandidate) && typeof value.total === "number";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// The retrospective in /usage (#3335): what the last weeks went on — money, conversations and the PRs
|
|
2
|
+
// they made — by week, by project and by agent, computed from the Library's index rather than Claude
|
|
3
|
+
// Code's own stats cache, which can stop updating. Shared by the route and the view.
|
|
4
|
+
import { isRecord } from "./isRecord.js";
|
|
5
|
+
|
|
6
|
+
/** How far back the retrospective reaches. */
|
|
7
|
+
export const RETROSPECTIVE_WEEKS = 12;
|
|
8
|
+
|
|
9
|
+
export interface RetrospectiveTotals {
|
|
10
|
+
costUsd: number;
|
|
11
|
+
conversations: number;
|
|
12
|
+
prs: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface LibraryRetrospective {
|
|
16
|
+
/** Each week's totals, oldest first, every week present (an empty one is all zeros). `start_ms` is the
|
|
17
|
+
* Monday the week starts on, at local midnight on the server. */
|
|
18
|
+
weeks: (RetrospectiveTotals & { start_ms: number })[];
|
|
19
|
+
/** By project directory, the most spent first; a conversation with no directory is under "". */
|
|
20
|
+
projects: (RetrospectiveTotals & { cwd: string })[];
|
|
21
|
+
/** By agent, the most spent first. */
|
|
22
|
+
agents: (RetrospectiveTotals & { agent: string })[];
|
|
23
|
+
total: RetrospectiveTotals;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const isTotals = (value: unknown): value is RetrospectiveTotals =>
|
|
27
|
+
isRecord(value) && typeof value.costUsd === "number" && typeof value.conversations === "number" && typeof value.prs === "number";
|
|
28
|
+
const listOf = (value: unknown, key: string, kind: "string" | "number"): boolean =>
|
|
29
|
+
Array.isArray(value) && value.every((entry) => isTotals(entry) && isRecord(entry) && typeof entry[key] === kind);
|
|
30
|
+
|
|
31
|
+
export const isLibraryRetrospective = (value: unknown): value is LibraryRetrospective =>
|
|
32
|
+
isRecord(value) &&
|
|
33
|
+
listOf(value.weeks, "start_ms", "number") &&
|
|
34
|
+
listOf(value.projects, "cwd", "string") &&
|
|
35
|
+
listOf(value.agents, "agent", "string") &&
|
|
36
|
+
isTotals(value.total);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// What the Library's tools kind shows of Claude Code's settings for one directory (#3332): each file it
|
|
2
|
+
// reads, and the result of laying them over each other, every value naming the file it came from.
|
|
3
|
+
// Shared by the route and the view.
|
|
4
|
+
import { isRecord } from "./isRecord.js";
|
|
5
|
+
|
|
6
|
+
/** The settings files, weakest first: a key in a later one overrides the same key in an earlier one, and
|
|
7
|
+
* a list adds to it (code.claude.com/docs/en/settings, "Settings precedence"). */
|
|
8
|
+
export const SETTINGS_SOURCES = ["user", "project", "local", "managed"] as const;
|
|
9
|
+
export type SettingsSource = (typeof SETTINGS_SOURCES)[number];
|
|
10
|
+
|
|
11
|
+
export const PERMISSION_KINDS = ["allow", "ask", "deny"] as const;
|
|
12
|
+
export type PermissionKind = (typeof PERMISSION_KINDS)[number];
|
|
13
|
+
|
|
14
|
+
export interface SettingsFile {
|
|
15
|
+
source: SettingsSource;
|
|
16
|
+
path: string;
|
|
17
|
+
/** "absent": no such file; "invalid": not a JSON object, so Claude Code skips it. */
|
|
18
|
+
state: "ok" | "absent" | "invalid";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FromSource<T> {
|
|
22
|
+
value: T;
|
|
23
|
+
source: SettingsSource;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface LibrarySettings {
|
|
27
|
+
cwd: string;
|
|
28
|
+
files: SettingsFile[];
|
|
29
|
+
/** Every rule of each kind, from every file: the lists merge. */
|
|
30
|
+
permissions: Record<PermissionKind, FromSource<string>[]>;
|
|
31
|
+
/** Each variable's value from the strongest file that sets it. */
|
|
32
|
+
env: (FromSource<string> & { name: string })[];
|
|
33
|
+
/** Each hook event's entries, from every file. */
|
|
34
|
+
hooks: (FromSource<string> & { event: string })[];
|
|
35
|
+
/** Every other top-level key, from the strongest file that sets it, as JSON. */
|
|
36
|
+
other: (FromSource<string> & { key: string })[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const isSource = (value: unknown): value is SettingsSource => SETTINGS_SOURCES.some((source) => source === value);
|
|
40
|
+
const isFrom = (value: unknown, extra: string | null = null): boolean =>
|
|
41
|
+
isRecord(value) && typeof value.value === "string" && isSource(value.source) && (extra === null || typeof value[extra] === "string");
|
|
42
|
+
const isFile = (value: unknown): value is SettingsFile =>
|
|
43
|
+
isRecord(value) &&
|
|
44
|
+
isSource(value.source) &&
|
|
45
|
+
typeof value.path === "string" &&
|
|
46
|
+
(value.state === "ok" || value.state === "absent" || value.state === "invalid");
|
|
47
|
+
|
|
48
|
+
const listOf = (value: unknown, extra: string | null): boolean => Array.isArray(value) && value.every((entry) => isFrom(entry, extra));
|
|
49
|
+
|
|
50
|
+
const isPermissions = (value: unknown): value is LibrarySettings["permissions"] =>
|
|
51
|
+
isRecord(value) && PERMISSION_KINDS.every((kind) => listOf(value[kind], null));
|
|
52
|
+
|
|
53
|
+
export const isLibrarySettings = (value: unknown): value is LibrarySettings =>
|
|
54
|
+
isRecord(value) &&
|
|
55
|
+
typeof value.cwd === "string" &&
|
|
56
|
+
Array.isArray(value.files) &&
|
|
57
|
+
value.files.every(isFile) &&
|
|
58
|
+
isPermissions(value.permissions) &&
|
|
59
|
+
listOf(value.env, "name") &&
|
|
60
|
+
listOf(value.hooks, "event") &&
|
|
61
|
+
listOf(value.other, "key");
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// What Claude Code's home takes on disk, for the Library's Storage view (#3333). The server measures
|
|
2
|
+
// it on a worker thread and answers in this shape; the browser only shows it.
|
|
3
|
+
import { isRecord } from "./isRecord.js";
|
|
4
|
+
|
|
5
|
+
/** Space taken under one path: bytes on disk, how many files, and how many entries could not be read
|
|
6
|
+
* (counted, then skipped). */
|
|
7
|
+
export interface StorageSize {
|
|
8
|
+
bytes: number;
|
|
9
|
+
files: number;
|
|
10
|
+
unreadable: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** One entry directly under Claude Code's home (`projects`, `debug`, `history.jsonl`, …). */
|
|
14
|
+
export interface StorageEntry extends StorageSize {
|
|
15
|
+
name: string;
|
|
16
|
+
directory: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** One project folder under `projects/`, with the directory it is named after when the Library's
|
|
20
|
+
* index knows it. */
|
|
21
|
+
export interface StorageProject extends StorageSize {
|
|
22
|
+
slug: string;
|
|
23
|
+
cwd: string | null;
|
|
24
|
+
temporary: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** The projects matching a query beyond the ones listed, summed. */
|
|
28
|
+
export interface StorageProjectRest extends StorageSize {
|
|
29
|
+
count: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface StorageMeasure {
|
|
33
|
+
/** Epoch ms the measurement finished. */
|
|
34
|
+
measuredAt: number;
|
|
35
|
+
total: StorageSize;
|
|
36
|
+
entries: StorageEntry[];
|
|
37
|
+
/** The largest projects matching the query, largest first. */
|
|
38
|
+
projects: StorageProject[];
|
|
39
|
+
otherProjects: StorageProjectRest;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Claude Code's `cleanupPeriodDays`: as set, its default when unset, or unreadable settings. */
|
|
43
|
+
export type CleanupPeriod = { state: "set" | "default"; days: number } | { state: "unreadable" };
|
|
44
|
+
|
|
45
|
+
/** Claude Code's default for `cleanupPeriodDays`, from its own settings documentation. */
|
|
46
|
+
export const CLEANUP_PERIOD_DEFAULT_DAYS = 30;
|
|
47
|
+
|
|
48
|
+
export interface StorageProgress {
|
|
49
|
+
done: number;
|
|
50
|
+
of: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** GET /api/library/storage. `measure` is the last finished measurement (null before the first);
|
|
54
|
+
* `measuring` is the one running now, if any; `measureFailed` says the last one ended without an
|
|
55
|
+
* answer, `measure` then being an older one or null. */
|
|
56
|
+
export interface LibraryStorageAnswer {
|
|
57
|
+
root: string;
|
|
58
|
+
measure: StorageMeasure | null;
|
|
59
|
+
measuring: StorageProgress | null;
|
|
60
|
+
measureFailed: boolean;
|
|
61
|
+
cleanup: CleanupPeriod;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** The entry that holds the project folders. */
|
|
65
|
+
export const PROJECTS_ENTRY = "projects";
|
|
66
|
+
|
|
67
|
+
const isSize = (value: Record<string, unknown>): boolean =>
|
|
68
|
+
typeof value.bytes === "number" && typeof value.files === "number" && typeof value.unreadable === "number";
|
|
69
|
+
|
|
70
|
+
const isEntry = (value: unknown): value is StorageEntry =>
|
|
71
|
+
isRecord(value) && isSize(value) && typeof value.name === "string" && typeof value.directory === "boolean";
|
|
72
|
+
|
|
73
|
+
const isProject = (value: unknown): value is StorageProject =>
|
|
74
|
+
isRecord(value) &&
|
|
75
|
+
isSize(value) &&
|
|
76
|
+
typeof value.slug === "string" &&
|
|
77
|
+
(value.cwd === null || typeof value.cwd === "string") &&
|
|
78
|
+
typeof value.temporary === "boolean";
|
|
79
|
+
|
|
80
|
+
const isMeasure = (value: unknown): value is StorageMeasure =>
|
|
81
|
+
isRecord(value) &&
|
|
82
|
+
typeof value.measuredAt === "number" &&
|
|
83
|
+
isRecord(value.total) &&
|
|
84
|
+
isSize(value.total) &&
|
|
85
|
+
Array.isArray(value.entries) &&
|
|
86
|
+
value.entries.every(isEntry) &&
|
|
87
|
+
Array.isArray(value.projects) &&
|
|
88
|
+
value.projects.every(isProject) &&
|
|
89
|
+
isRecord(value.otherProjects) &&
|
|
90
|
+
isSize(value.otherProjects) &&
|
|
91
|
+
typeof value.otherProjects.count === "number";
|
|
92
|
+
|
|
93
|
+
const isCleanup = (value: unknown): value is CleanupPeriod =>
|
|
94
|
+
isRecord(value) && (value.state === "unreadable" || ((value.state === "set" || value.state === "default") && typeof value.days === "number"));
|
|
95
|
+
|
|
96
|
+
export const isStorageProgress = (value: unknown): value is StorageProgress =>
|
|
97
|
+
isRecord(value) && typeof value.done === "number" && typeof value.of === "number";
|
|
98
|
+
|
|
99
|
+
export const isLibraryStorageAnswer = (value: unknown): value is LibraryStorageAnswer =>
|
|
100
|
+
isRecord(value) &&
|
|
101
|
+
typeof value.root === "string" &&
|
|
102
|
+
(value.measure === null || isMeasure(value.measure)) &&
|
|
103
|
+
(value.measuring === null || isStorageProgress(value.measuring)) &&
|
|
104
|
+
typeof value.measureFailed === "boolean" &&
|
|
105
|
+
isCleanup(value.cleanup);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// What the Library's tools kind shows for one directory (#3332): the instruction files Claude Code
|
|
2
|
+
// loads there, in the order it loads them. Shared by the route and the view.
|
|
3
|
+
import { isRecord } from "./isRecord.js";
|
|
4
|
+
|
|
5
|
+
export const INSTRUCTION_SCOPES = ["managed", "user", "user-rule", "directory", "project", "local", "rule", "agents", "import"] as const;
|
|
6
|
+
export type LibraryInstructionScope = (typeof INSTRUCTION_SCOPES)[number];
|
|
7
|
+
|
|
8
|
+
/** Claude Code skips an instruction file larger than this and loads none of it. */
|
|
9
|
+
export const INSTRUCTION_FILE_MAX_BYTES = 4 * 1024 * 1024;
|
|
10
|
+
|
|
11
|
+
export interface LibraryInstructionFile {
|
|
12
|
+
scope: LibraryInstructionScope;
|
|
13
|
+
path: string;
|
|
14
|
+
/** "launch": read at session start; "on-demand": only when Claude works with matching files;
|
|
15
|
+
* "approval": outside the directory, read only once external imports are approved for it. */
|
|
16
|
+
loads: "launch" | "on-demand" | "approval";
|
|
17
|
+
/** The file whose `@path` import brought this one in, for an import. */
|
|
18
|
+
importedBy: string | null;
|
|
19
|
+
lines: number;
|
|
20
|
+
bytes: number;
|
|
21
|
+
/** "too-large": over the size Claude Code reads at all, so none of it loads. */
|
|
22
|
+
state: "ok" | "too-large" | "unreadable";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LibraryInstructions {
|
|
26
|
+
cwd: string;
|
|
27
|
+
files: LibraryInstructionFile[];
|
|
28
|
+
/** No CLAUDE.md counts here, so Claude Code reads AGENTS.md instead (the default setting). */
|
|
29
|
+
agentsMd: boolean;
|
|
30
|
+
/** The listing stopped at its bound: more files load than are listed. */
|
|
31
|
+
truncated: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const isScope = (value: unknown): value is LibraryInstructionScope => INSTRUCTION_SCOPES.some((scope) => scope === value);
|
|
35
|
+
|
|
36
|
+
const isInstructionFile = (value: unknown): value is LibraryInstructionFile =>
|
|
37
|
+
isRecord(value) &&
|
|
38
|
+
isScope(value.scope) &&
|
|
39
|
+
typeof value.path === "string" &&
|
|
40
|
+
(value.loads === "launch" || value.loads === "on-demand" || value.loads === "approval") &&
|
|
41
|
+
(value.importedBy === null || typeof value.importedBy === "string") &&
|
|
42
|
+
typeof value.lines === "number" &&
|
|
43
|
+
typeof value.bytes === "number" &&
|
|
44
|
+
(value.state === "ok" || value.state === "too-large" || value.state === "unreadable");
|
|
45
|
+
|
|
46
|
+
export const isLibraryInstructions = (value: unknown): value is LibraryInstructions =>
|
|
47
|
+
isRecord(value) &&
|
|
48
|
+
typeof value.cwd === "string" &&
|
|
49
|
+
Array.isArray(value.files) &&
|
|
50
|
+
value.files.every(isInstructionFile) &&
|
|
51
|
+
typeof value.agentsMd === "boolean" &&
|
|
52
|
+
typeof value.truncated === "boolean";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isRecord } from "./isRecord.js";
|
|
2
|
+
|
|
3
|
+
// The pub/sub channel carrying "a terminal process was just registered for this session" — a fresh
|
|
4
|
+
// spawn, or a tmux session re-attached after a server restart. The GitHub board listens so a
|
|
5
|
+
// terminal opened anywhere shows on its card without waiting for the next read (#3363).
|
|
6
|
+
//
|
|
7
|
+
// A channel of its own rather than the `sessions` row: every consumer of that channel reads a row
|
|
8
|
+
// as attention state (the sound, the favicon, the cell's status), so a row that only says "opened"
|
|
9
|
+
// would be taken as idle and could even end a turn that was working before a restart. And a quiet
|
|
10
|
+
// shell never moves a flag, so the row is never published for it at all.
|
|
11
|
+
export const PTY_OPENED_CHANNEL = "pty-opened";
|
|
12
|
+
|
|
13
|
+
export interface PtyOpenedEvent {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
cwd: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const isPtyOpenedEvent = (data: unknown): data is PtyOpenedEvent => isRecord(data) && typeof data.sessionId === "string" && typeof data.cwd === "string";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// A string without the characters of a set at its end — `trimEnd` for characters other than spaces.
|
|
2
|
+
|
|
3
|
+
/** `text` without any of `chars` at its end. Measured in UTF-16 units, as `slice` is. */
|
|
4
|
+
export function trimEndOf(text: string, chars: ReadonlySet<string>): string {
|
|
5
|
+
let end = text.length;
|
|
6
|
+
while (end > 0 && chars.has(text.charAt(end - 1))) end -= 1;
|
|
7
|
+
return text.slice(0, end);
|
|
8
|
+
}
|
|
@@ -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-Dc8zMoSG.js";p(),r();var h={class:`sheet`},g={key:0,class:`status`},_={key:1,class:`status`},v=u(s({__name:`Notation`,props:{musicxml:{},tempo:{},now:{}},setup(r){let s=r,u=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=l(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=u.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:u,class:`page`},null,512)]))}}),[[`__scopeId`,`data-v-80f75f9d`]]);export{v as default};
|