mulmoterminal 2.1.0 → 2.2.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 +116 -25
- package/bin/mulmoterminal.js +26 -7
- package/common/collectionPush.ts +26 -0
- package/common/dirChrome.ts +10 -0
- package/common/fileWriteChannel.ts +9 -0
- package/common/keymap.ts +22 -1
- package/common/notifyKinds.ts +26 -0
- package/common/notifySounds.ts +44 -0
- package/common/orderPriority.ts +20 -0
- package/common/pushKinds.ts +6 -2
- package/common/terminalClipboard.ts +52 -0
- package/common/terminalFontFamily.ts +79 -0
- package/common/voiceInputStatus.ts +21 -0
- package/dist/assets/{abnfDiagram-VRR7QNED-RjiYivmv-BMVn5P4x.js → abnfDiagram-VRR7QNED-RjiYivmv-6R9yRbUC.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-0NsD2xW1-C95zkDEU.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-3nWA91tG-BaVwq5YO.js → architectureDiagram-ZJ3FMSHR-3nWA91tG-DzS5ABJE.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-BPuAJQRW-O8HvKllF.js → blockDiagram-677ZJIJ3-BPuAJQRW-Cw9RkJxY.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-C0LAqQso-qV_LVJW3.js → c4Diagram-LMCZKHZV-C0LAqQso-CWltXMHP.js} +1 -1
- package/dist/assets/channel-7wUqSdoX-BYaGw2yS.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-BRrYpgtb-B9twQFRU.js → chunk-32BRIVSS-BRrYpgtb-DrrsZ2u5.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-BJ-ss3Xr-OC_lubzj.js → chunk-52WLFC77-BJ-ss3Xr-WJMq_L8L.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-BZEucKEL-mCVH59ut.js → chunk-C7G6YPKG-BZEucKEL-BafXJkh7.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-DLS6FBN1-CL8lofeg.js → chunk-EX3LRPZG-DLS6FBN1-Q8lsrJXs.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-DHLSFw1H-BcVi6QV6.js → chunk-FWX5IMBZ-DHLSFw1H-Cgm5-zaI.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-Bhlt8hXJ-D3M0sdaj.js → chunk-HOUHSVGY-Bhlt8hXJ-Cp5J5cOD.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-DwgHBX_g-9pz8KjdB.js → chunk-ICXQ74PX-DwgHBX_g-CLdnp-d2.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-CMZRaeqt-DsiY753w.js → chunk-MOJQB5TN-CMZRaeqt-BsIB0ZXR.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-8Qy4a8b5-DzD8vBv9.js → chunk-OGEWGWER-8Qy4a8b5-DlTM-RTP.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-DcrWQRYh-B3EqHnC7.js → chunk-PUDLZKDR-DcrWQRYh-XujP_H1v.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-ZXVGkG8Z-DAzhqKqQ.js → chunk-Q4XR5HBZ-ZXVGkG8Z-DhxnzVDy.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DmGdheTX-sWPxsoge.js → chunk-V7JOEXUC-DmGdheTX-C-xPmCQA.js} +1 -1
- package/dist/assets/{chunk-VAUOI2AC-CS9QJ4yz-C6T0-Q0n.js → chunk-VAUOI2AC-CS9QJ4yz-Cng5RPUP.js} +1 -1
- package/dist/assets/{chunk-VR4S4FIN-C6a91eNY-CzCW244T.js → chunk-VR4S4FIN-C6a91eNY-Bmb0moA3.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-BlzOfotS-BRhqiyoJ.js → chunk-WYO6CB5R-BlzOfotS-DmR4SyZL.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-BYwxNFTK-2uN_ofIP.js → chunk-ZGVPDNZ5-BYwxNFTK-CD8nNM8_.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BYlRi6YQ-EDJcEZLp.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-BCHaYHxj-EDJcEZLp.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-CGYr2F6h-Co-phwWx.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-DHA9iPo--rvLMXkNB.js → cynefinDiagram-TSTJHNR4-DHA9iPo--pv1DCSfy.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB--oJKqXBZ-CGanW7aY.js → dagre-VKFMJZFB--oJKqXBZ-BPcGEiSl.js} +1 -1
- package/dist/assets/{diagram-FQU43EPY-CcJCB9bG-BcrxMiAD.js → diagram-FQU43EPY-CcJCB9bG-CCOrHV0U.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-C_o-WGG1-4PTH1NOO.js → diagram-G47NLZAW-C_o-WGG1-Crm_IB8Y.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-CXJCYvY--DLVaK2vZ.js → diagram-NH7WQ7WH-CXJCYvY--UcH8gkTE.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-BMzeJ87A-C0axta9a.js → diagram-OA4YK3LP-BMzeJ87A-7C9Me5sS.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-D_93NKqo-3zfR6xo1.js → diagram-WEI45ONY-D_93NKqo-BBztQ9hK.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CVai1Ii9-Bfd3ExQu.js → ebnfDiagram-CCIWWBDH-CVai1Ii9-TkJNOqEw.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-CiABnA0s-BGq_5dj0.js → erDiagram-Q63AITRT-CiABnA0s-DS2blJuc.js} +1 -1
- package/dist/assets/eventmodeling-45OFAUF4-CWmqhm3a-D-dhMOz8.js +1 -0
- package/dist/assets/flowDiagram-23GEKE2U-DKSB5AiY-KiTeh-IZ.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-DQZvdFo1-z8Owlyg6.js → ganttDiagram-NO4QXBWP-DQZvdFo1-ZB_lhurA.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-BR9qPwdN-Cd1rBWSG.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-C2ovBouh-BA-6Yy_K.js → gitGraphDiagram-IHSO6WYX-C2ovBouh-Vm6I27hg.js} +1 -1
- package/dist/assets/index-BP05wTLW.js +618 -0
- package/dist/assets/index-CGwcisib.css +1 -0
- package/dist/assets/info-DKCQHKI2-Dplx5kMp-Dic4-0_Y.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-7UnoB5AP-BW36KQ8e.js → infoDiagram-FWYZ7A6U-7UnoB5AP-Cr34YkAb.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-ByUDM_N2-DrQDG1os.js → ishikawaDiagram-FXEZZL3T-ByUDM_N2-at4P1zMV.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-c5xIah9o-CtJ0D_mQ.js → journeyDiagram-5HDEW3XC-c5xIah9o-D4ZV57k7.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-Cnt6loYD-bm-RqJor.js → kanban-definition-HUTT4EX6-Cnt6loYD-BiJ3JUjX.js} +1 -1
- package/dist/assets/{lib-BmwIEKvb.js → lib-Du_IVDkN.js} +1 -1
- package/dist/assets/{line-D7ziSjKi-DrYnqDhF.js → line-D7ziSjKi-CPM0FMWw.js} +1 -1
- package/dist/assets/{marp-gEV1mQM4.js → marp-BBre1w8X.js} +1 -1
- package/dist/assets/{mermaid-parser.core-DxEa8E3F-iymJ5XTw.js → mermaid-parser.core-DxEa8E3F-CO4zEYzL.js} +2 -2
- package/dist/assets/{mermaid.core-V0OYwIz3-CEFC0tc3.js → mermaid.core-V0OYwIz3-CzPQxhwu.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-CexN3O6L-maxHe_oT.js → mindmap-definition-LN4V7U3C-CexN3O6L-Nez_xicT.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-CQI3flND-BBywyu3N.js +1 -0
- package/dist/assets/{pegDiagram-2B236MQR-BiM4G0cW-CrLCH9dK.js → pegDiagram-2B236MQR-BiM4G0cW-0AEyhHwQ.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-CnmKE2Wa-CoicOL1H.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-B_fBBS-2-DVbko3rP.js → pieDiagram-ENE6RG2P-B_fBBS-2-DXBEfgPl.js} +1 -1
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-BigGVxCR-DUwLLJXe.js → quadrantDiagram-ABIIQ3AL-BigGVxCR-dZ16XJ8-.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-us6x-Z9R-BeFXvO0F.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-BKdz6pdN-BZY5Z4oN.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-m_CSSIfd-Dubi7PGc.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-Nu3nAG7C-wnb7FBOh.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6--Y3mD4R_-P7vJjL8M.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6--lNIlG64-t4pt5DRk.js → railroadDiagram-RFXS5EU6--lNIlG64-DHNapLB9.js} +1 -1
- package/dist/assets/{requirementDiagram-TGXJPOKE-D-B0Y5Wu-DJVGeSnt.js → requirementDiagram-TGXJPOKE-D-B0Y5Wu-C-9SVxpD.js} +1 -1
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DlutaXDv-2m-PGq5V.js → sankeyDiagram-HTMAVEWB-DlutaXDv-Cv-mFz76.js} +1 -1
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-BOLgtggH-DSwO6_CW.js → sequenceDiagram-DBY2YBRQ-BOLgtggH-BR0sUcBe.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-jf_dXUEU-DuBsukdi.js → stateDiagram-2N3HPSRC-jf_dXUEU-DjqY9a1u.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-CuzgCL2v-DjKerI1O.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-CYjtALQH-BwT2NtP8.js → swimlanes-5IMT3BWC-CYjtALQH-DV8Ha8XJ.js} +1 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-3bmSBtKs-Dm5TS_6E.js +8 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-DYJ4oUm8-B7uglxWU.js → timeline-definition-FHXFAJF6-DYJ4oUm8-D2oq5bFn.js} +1 -1
- package/dist/assets/treeView-QDETBFTQ-D27HWG6Q-H3pflPYY.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-CmGIU3H5-CIoNkikG.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-CdKAHoek-Bi97b0Q1.js → vennDiagram-L72KCM5P-CdKAHoek-I-wP-h9k.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-CbHWsb2k-JQdCXyum.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-BF6c4_CW-DuE3v_zR.js → wardleyDiagram-EHGQE667-BF6c4_CW-BkrH7vLX.js} +1 -1
- package/dist/assets/{xychartDiagram-FW5EYKEG-CGiKngj7-B0CJGTzS.js → xychartDiagram-FW5EYKEG-CGiKngj7-DMYCP46V.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +8 -8
- package/server/agents/claude-args.ts +7 -0
- package/server/backends/calendarPush.ts +81 -0
- package/server/backends/calendarPushResult.ts +44 -0
- package/server/backends/remoteHost/googleCalendar.spec.ts +7 -1
- package/server/backends/whisper.ts +3 -5
- package/server/config/app-config.ts +56 -0
- package/server/config/config-body.ts +12 -1
- package/server/config/config-routes.ts +35 -4
- package/server/config/config-schema.ts +66 -0
- package/server/config/dir-config.ts +75 -19
- package/server/config/sound-presets.ts +96 -0
- package/server/files/atomic-write.ts +1 -1
- package/server/files/backup-store.ts +101 -0
- package/server/files/files-browse.ts +85 -5
- package/server/files/tool-writes.ts +20 -0
- package/server/infra/sandbox.ts +7 -0
- package/server/routes/app-routes.ts +11 -2
- package/server/routes/dir-routes.ts +16 -5
- package/server/routes/hook-routes.ts +19 -4
- package/server/session/activity-hook.ts +23 -4
- package/server/session/pty-spawn.ts +2 -2
- package/server/session/spawn-claude.ts +2 -1
- package/server/skills/mulmoterminal-config/SKILL.md +37 -3
- package/dist/assets/architecture-TIHT7OUA-0NsD2xW1-JfeahpZ_.js +0 -1
- package/dist/assets/channel-7wUqSdoX-C4JGl6VC.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BYlRi6YQ-DtJISQUb.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BCHaYHxj-DtJISQUb.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-CGYr2F6h-DB6705af.js +0 -1
- package/dist/assets/eventmodeling-45OFAUF4-CWmqhm3a-Bl19zj9_.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-DKSB5AiY-DdIGCbvn.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-BR9qPwdN-BnZW4EXW.js +0 -1
- package/dist/assets/index-DbKckN7Z.js +0 -618
- package/dist/assets/index-u-r21U2t.css +0 -1
- package/dist/assets/info-DKCQHKI2-Dplx5kMp-CrJfKOA1.js +0 -1
- package/dist/assets/packet-7NZHBO7P-CQI3flND-mf_ng5Fx.js +0 -1
- package/dist/assets/pie-RZYD4A2V-CnmKE2Wa-CSySnxGv.js +0 -1
- package/dist/assets/radar-I7S5WNFK-us6x-Z9R-DfA0aimG.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-BKdz6pdN-T35PQ5gg.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-m_CSSIfd-DavwfL2m.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-Nu3nAG7C-Yk8Oj2bi.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6--Y3mD4R_-DOPPkkTw.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-CuzgCL2v-BuaQTnnn.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-3bmSBtKs-CVMbYKXX.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-D27HWG6Q-DSRzdn6E.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-CmGIU3H5-pjqGjUmo.js +0 -1
- package/dist/assets/wardley-OPB4EBWU-CbHWsb2k-_qoOv9rX.js +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// The xterm font-family stack. Shared because both sides decide from it: the server validates
|
|
2
|
+
// `.mulmoterminal.json` and `config.json`, and the client re-validates what comes off the wire
|
|
3
|
+
// and supplies the fallback when neither file names one.
|
|
4
|
+
|
|
5
|
+
// The CJK tail every monospace stack in the app ends with, Japanese before the other locales — a
|
|
6
|
+
// stack that reached `…CJK SC` first would draw kanji with mainland glyph shapes. Named explicitly
|
|
7
|
+
// rather than left to the generic `monospace` fallback: the face a browser picks for an unnamed
|
|
8
|
+
// glyph is not required to be em-square, and a terminal reserves exactly TWO cells for a fullwidth
|
|
9
|
+
// character, so a face whose fullwidth advance isn't exactly twice the Latin one tears every
|
|
10
|
+
// box-drawing frame — which is most of what an agent TUI draws.
|
|
11
|
+
//
|
|
12
|
+
// Exported because the app chrome needs the same tail: Tailwind's `font-mono` (`--font-mono` in
|
|
13
|
+
// src/tailwind.css) had no CJK either, so a Japanese header or diff line fell to the browser's
|
|
14
|
+
// pick. CSS can't import this, so that file restates it and a spec pins the two together.
|
|
15
|
+
export const TERMINAL_CJK_FAMILIES = [
|
|
16
|
+
"'Noto Sans Mono CJK JP'",
|
|
17
|
+
"'Hiragino Sans'",
|
|
18
|
+
"'BIZ UDGothic'",
|
|
19
|
+
"'MS Gothic'",
|
|
20
|
+
"IPAGothic",
|
|
21
|
+
"'Noto Sans Mono CJK KR'",
|
|
22
|
+
"'Malgun Gothic'",
|
|
23
|
+
"'Noto Sans Mono CJK SC'",
|
|
24
|
+
"'Microsoft YaHei'",
|
|
25
|
+
"'Noto Sans Mono CJK TC'",
|
|
26
|
+
"'Microsoft JhengHei'",
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
// Latin first, so an existing install's ASCII rendering is unchanged.
|
|
30
|
+
export const TERMINAL_FONT_FAMILY_DEFAULT = ["'JetBrains Mono'", "'Fira Code'", "Menlo", "Consolas", ...TERMINAL_CJK_FAMILIES, "monospace"].join(", ");
|
|
31
|
+
|
|
32
|
+
// Long enough for a hand-written stack of a dozen names, short enough that the value stays a font
|
|
33
|
+
// list rather than a place to park arbitrary text.
|
|
34
|
+
export const TERMINAL_FONT_FAMILY_MAX_CHARS = 400;
|
|
35
|
+
|
|
36
|
+
// The portable half of the rule, for the JSON Schema shipped with the config skill. A JSON Schema
|
|
37
|
+
// `pattern` is ECMA-262 WITHOUT the `u` flag, so it cannot use the `\p{L}` classes the exact rule
|
|
38
|
+
// below needs to accept font names in every script. It denies the CSS syntax that makes a value
|
|
39
|
+
// dangerous or silently breaking, and leaves the per-entry structure to normalizeFontFamily at
|
|
40
|
+
// load time. A spec pins that whatever the exact rule accepts, this accepts too.
|
|
41
|
+
export const TERMINAL_FONT_FAMILY_SAFE_RE = /^[^;{}()<>\\/@!]+$/;
|
|
42
|
+
|
|
43
|
+
// One entry of the list: a leading letter or digit, then letters of ANY script (`游ゴシック` and
|
|
44
|
+
// `MS ゴシック` are real font names and must pass), digits, combining marks, spaces of any width,
|
|
45
|
+
// and the three separators real font names use. Everything CSS treats as syntax, plus quotes and
|
|
46
|
+
// control characters, is outside it and stays out.
|
|
47
|
+
const FONT_NAME_RE = /^[\p{L}\p{N}][\p{L}\p{N}\p{M}\p{Zs}._-]*$/u;
|
|
48
|
+
|
|
49
|
+
// CSS falls back to the browser's default when no named family matched, and that default is
|
|
50
|
+
// PROPORTIONAL — an xterm rendered in it has every column misaligned, with nothing on screen to
|
|
51
|
+
// explain why. So a stack that names no generic family gets `monospace` appended.
|
|
52
|
+
const GENERIC_FAMILIES = new Set(["monospace", "ui-monospace", "system-ui", "serif", "sans-serif", "cursive", "fantasy"]);
|
|
53
|
+
|
|
54
|
+
// Quotes are legal, but only as a matching pair around a whole entry: a stray one unbalances the
|
|
55
|
+
// CSS declaration, which invalidates it entirely rather than just that entry.
|
|
56
|
+
function isFontName(entry: string): boolean {
|
|
57
|
+
const quote = entry[0] === "'" || entry[0] === '"' ? entry[0] : "";
|
|
58
|
+
if (!quote) return FONT_NAME_RE.test(entry);
|
|
59
|
+
return entry.length >= 3 && entry.endsWith(quote) && FONT_NAME_RE.test(entry.slice(1, -1));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Deliberately unquoted-only. In CSS a generic family is a KEYWORD: quoting it turns it into a
|
|
63
|
+
// lookup for a font literally named "monospace", which resolves nowhere and provides no fallback.
|
|
64
|
+
// Counting a quoted one as satisfying the rule below would skip the append in precisely the case
|
|
65
|
+
// the append exists to catch.
|
|
66
|
+
const isGenericFamily = (entry: string): boolean => GENERIC_FAMILIES.has(entry.toLowerCase());
|
|
67
|
+
|
|
68
|
+
// Reject the whole stack on a bad entry, where normalizeFontSize clamps: a size is a continuous
|
|
69
|
+
// quantity, so honouring the direction the user asked for beats ignoring it, but a stack is one
|
|
70
|
+
// intent — dropping half of it would render in a font the author never named. Returning null lets
|
|
71
|
+
// the caller fall back to the level below (dir → global → default).
|
|
72
|
+
export function normalizeFontFamily(input: unknown): string | null {
|
|
73
|
+
if (typeof input !== "string") return null;
|
|
74
|
+
const stack = input.trim();
|
|
75
|
+
if (!stack || stack.length > TERMINAL_FONT_FAMILY_MAX_CHARS) return null;
|
|
76
|
+
const names = stack.split(",").map((name) => name.trim());
|
|
77
|
+
if (!names.every(isFontName)) return null;
|
|
78
|
+
return [...names, ...(names.some(isGenericFamily) ? [] : ["monospace"])].join(", ");
|
|
79
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// The `GET /api/transcribe/model` response. The server builds it; the UI decides the mic
|
|
2
|
+
// button's visibility and the settings section's from it — both sides read it, so it lives
|
|
3
|
+
// here rather than as one interface per side.
|
|
4
|
+
//
|
|
5
|
+
// Deliberately independent of whisper's own types: this is the API contract, and which
|
|
6
|
+
// package implements transcription behind it is not the UI's business. The server's
|
|
7
|
+
// `getVoiceInputStatus(): VoiceInputStatus` annotation is what keeps the two in step.
|
|
8
|
+
|
|
9
|
+
export type VoiceModelState = "idle" | "downloading" | "ready" | "error";
|
|
10
|
+
|
|
11
|
+
export interface VoiceInputStatus {
|
|
12
|
+
/** The platform and binaries are present — the mic can appear. */
|
|
13
|
+
capable: boolean;
|
|
14
|
+
model: {
|
|
15
|
+
name: string;
|
|
16
|
+
state: VoiceModelState;
|
|
17
|
+
/** 0..1, only while downloading and only when the size is known. */
|
|
18
|
+
progress?: number;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-Bdt8pFDJ-DsF7k-Jl.js";import{f as t}from"./src-Brzfja-q-ch1VcTiG.js";import{_ as n,g as r}from"./mermaid-parser.core-DxEa8E3F-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-Bdt8pFDJ-DsF7k-Jl.js";import{f as t}from"./src-Brzfja-q-ch1VcTiG.js";import{_ as n,g as r}from"./mermaid-parser.core-DxEa8E3F-CO4zEYzL.js";import"./chunk-WYO6CB5R-BlzOfotS-DmR4SyZL.js";import"./chunk-VAUOI2AC-CS9QJ4yz-Cng5RPUP.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-CMZRaeqt-BsIB0ZXR.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-DxEa8E3F-CO4zEYzL.js";export{e as createArchitectureServices};
|