mulmoclaude 0.9.0 → 0.9.2
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 +95 -38
- package/bin/mulmoclaude.js +1 -2
- package/client/assets/JsonEditor-CPJfn76E.css +1 -0
- package/client/assets/JsonEditor-CoWGJG3Y.js +10 -0
- package/client/assets/abnfDiagram-VRR7QNED-6nNByj6v-By7GJ3xW.js +1 -0
- package/client/assets/abnfDiagram-VRR7QNED-BrQlVixL.js +1 -0
- package/client/assets/arc-BXutyUAX.js +1 -0
- package/client/assets/arc-zT0wd74V-DulGJNnb.js +1 -0
- package/client/assets/architecture-TIHT7OUA-CYMWc3UT-C7HoFzWN.js +1 -0
- package/client/assets/architecture-TIHT7OUA-aml8u-G9.js +1 -0
- package/client/assets/architectureDiagram-ZJ3FMSHR-Bgnyaj_i-CCpEsCHN.js +36 -0
- package/client/assets/architectureDiagram-ZJ3FMSHR-DJTFpPjB.js +36 -0
- package/client/assets/array-BifhSqXX.js +1 -0
- package/client/assets/array-CApNbSU9-BifhSqXX.js +1 -0
- package/client/assets/blockDiagram-677ZJIJ3-DQ35o5E4-BXS11D3J.js +132 -0
- package/client/assets/blockDiagram-677ZJIJ3-aYvCODxv.js +132 -0
- package/client/assets/c4Diagram-LMCZKHZV-Bau6RMBb.js +10 -0
- package/client/assets/c4Diagram-LMCZKHZV-ClWZeiWo-DXGnOOUf.js +10 -0
- package/client/assets/channel-D9VSi_QV.js +1 -0
- package/client/assets/channel-Di5rtkx0-C3gZcytF.js +1 -0
- package/client/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/client/assets/chunk-2Q5K7J3B-DfKpwyl9-DTxwf5E9.js +1 -0
- package/client/assets/chunk-32BRIVSS-CCt9wtYd-Cwa_IP35.js +1 -0
- package/client/assets/chunk-32BRIVSS-CxzHeys5.js +1 -0
- package/client/assets/chunk-52WLFC77-BtNjbTdw.js +10 -0
- package/client/assets/chunk-52WLFC77-FbBbR4uI-wsNC5d-f.js +10 -0
- package/client/assets/chunk-5VM5RSS4-BYnnUiN6-C4rOnu9A.js +15 -0
- package/client/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/client/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
- package/client/assets/chunk-7BUUIJ7U-hh8aCuGX-mGEpPzQy.js +1 -0
- package/client/assets/chunk-C7G6YPKG-BE8ehsnc.js +1 -0
- package/client/assets/chunk-C7G6YPKG-C87hlS9c-BitbJpTa.js +1 -0
- package/client/assets/{chunk-D8eiyYIV-BY16KEZc.js → chunk-D8eiyYIV-BeeEsA1B.js} +1 -1
- package/client/assets/chunk-EX3LRPZG-Bhgskzyy.js +231 -0
- package/client/assets/chunk-EX3LRPZG-BqGqMXLN-Cl2Eo1_u.js +231 -0
- package/client/assets/chunk-FWX5IMBZ-BkbSAAuW-C2r4AuAO.js +2 -0
- package/client/assets/chunk-FWX5IMBZ-D9sskZb_.js +2 -0
- package/client/assets/chunk-HOUHSVGY-CBCXk7rb.js +1 -0
- package/client/assets/chunk-HOUHSVGY-Cxu0eDlh-owg_DcY0.js +1 -0
- package/client/assets/chunk-ICXQ74PX-DTqPpDQ9.js +2 -0
- package/client/assets/chunk-ICXQ74PX-hiraF_Xj-CdaEwVin.js +2 -0
- package/client/assets/chunk-JWPE2WC7-BQ3zXr2k-DSd3Ct95.js +1 -0
- package/client/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/client/assets/chunk-KEIR6QF5-DNzq6p3w.js +161 -0
- package/client/assets/chunk-MOJQB5TN-CqxshQHA-Cn_EpDyZ.js +88 -0
- package/client/assets/chunk-MOJQB5TN-D1s_zUGz.js +88 -0
- package/client/assets/chunk-OGEWGWER-CjCr7ceX-Dfk5-70y.js +1 -0
- package/client/assets/chunk-OGEWGWER-DzfhxoQd.js +1 -0
- package/client/assets/chunk-PUDLZKDR-BZlebNhn.js +156 -0
- package/client/assets/chunk-PUDLZKDR-Dx6M-vz1-CLyVurOz.js +156 -0
- package/client/assets/chunk-Q4XR5HBZ-BcJb7mwA.js +70 -0
- package/client/assets/chunk-Q4XR5HBZ-CZd-9lTB-qPEYoRNc.js +11 -0
- package/client/assets/chunk-RYQCIY6F-B_IgMG7T.js +1 -0
- package/client/assets/chunk-RYQCIY6F-YkbemkCt-CX4fncTQ.js +1 -0
- package/client/assets/chunk-V7JOEXUC-Buce04o6.js +206 -0
- package/client/assets/chunk-V7JOEXUC-rI0xlC_O-C607vJXy.js +206 -0
- package/client/assets/chunk-VAUOI2AC-CxhkzXN0.js +1 -0
- package/client/assets/chunk-VAUOI2AC-DrcykVNK-CSROJWdE.js +1 -0
- package/client/assets/chunk-VR4S4FIN-D5afNrsS.js +1 -0
- package/client/assets/chunk-VR4S4FIN-O6iF8Yvf-CLIwrgqU.js +1 -0
- package/client/assets/chunk-WYO6CB5R-B83L_z6I-Cs8mg9If.js +127 -0
- package/client/assets/chunk-WYO6CB5R-BXTIdTMw.js +125 -0
- package/client/assets/chunk-XXDRQBXY-DFXH_lWn-B5HjCp2c.js +1 -0
- package/client/assets/chunk-XXDRQBXY-DXMD6ofA.js +1 -0
- package/client/assets/chunk-Y2CYZVJY-Bdt8pFDJ-DsF7k-Jl.js +1 -0
- package/client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/client/assets/chunk-ZGVPDNZ5-BpFv9JSP-CHYySMjV.js +62 -0
- package/client/assets/chunk-ZGVPDNZ5-CYusI0J_.js +62 -0
- package/client/assets/chunk-ZIRB5QZD-Biy6ZNFG-D1maAiXb.js +32 -0
- package/client/assets/chunk-ZIRB5QZD-C6fEPe3t.js +32 -0
- package/client/assets/classDiagram-OUVF2IWQ-BgAZMSbT-BgxEE1D3.js +1 -0
- package/client/assets/classDiagram-OUVF2IWQ-CBD3Eidl.js +1 -0
- package/client/assets/classDiagram-v2-EOCWNBFH-CBD3Eidl.js +1 -0
- package/client/assets/classDiagram-v2-EOCWNBFH-DxHTyui1-BgxEE1D3.js +1 -0
- package/client/assets/cose-bilkent-JH36ORCC-CuSL2tA8-aMIqISfj.js +1 -0
- package/client/assets/cose-bilkent-JH36ORCC-WAJDBXv1.js +1 -0
- package/client/assets/cynefin-VYW2F7L2-DH2qkJKw.js +1 -0
- package/client/assets/cynefin-VYW2F7L2-DqA3n9nY-BNWhIK_n.js +1 -0
- package/client/assets/cynefinDiagram-TSTJHNR4-CUvPV9MV.js +62 -0
- package/client/assets/cynefinDiagram-TSTJHNR4-x0-0sQ15-Cq1gFcFu.js +62 -0
- package/client/assets/cytoscape.esm-CzdwbRaj-Djp6vQyU.js +321 -0
- package/client/assets/cytoscape.esm-Djp6vQyU.js +321 -0
- package/client/assets/dagre-CXRCoUWR.js +1 -0
- package/client/assets/dagre-VKFMJZFB-CQdfl-bx-CzZZuace.js +4 -0
- package/client/assets/dagre-VKFMJZFB-C_9IS7mB.js +4 -0
- package/client/assets/dagre-wczQIDso-CfevN9RO.js +1 -0
- package/client/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/client/assets/defaultLocale-DUNguUWs-BbDo_yJX.js +1 -0
- package/client/assets/diagram-FQU43EPY-BOSB6VUb-isPdQ8WX.js +3 -0
- package/client/assets/diagram-FQU43EPY-BP8N00-b.js +3 -0
- package/client/assets/diagram-G47NLZAW-DLXrcXsN-BIqj7RKy.js +24 -0
- package/client/assets/diagram-G47NLZAW-ulE1JlWG.js +24 -0
- package/client/assets/diagram-NH7WQ7WH-BMQp1rkF-D6-fOq_v.js +24 -0
- package/client/assets/diagram-NH7WQ7WH-D_IXrL3i.js +24 -0
- package/client/assets/diagram-OA4YK3LP-C-pC6Eyu.js +30 -0
- package/client/assets/diagram-OA4YK3LP-D1wQ0vUj-BNi6QLCK.js +30 -0
- package/client/assets/diagram-WEI45ONY-Di9m35i-.js +41 -0
- package/client/assets/diagram-WEI45ONY-RR0DpF8R-BS3nrb3w.js +41 -0
- package/client/assets/dist-BQBs5pjy-BmtZ7Oc2.js +1 -0
- package/client/assets/dist-CQ3HaWOk.js +1 -0
- package/client/assets/ebnfDiagram-CCIWWBDH-Cbwnim2x.js +1 -0
- package/client/assets/ebnfDiagram-CCIWWBDH-M123uVJ8-9-dq55nQ.js +1 -0
- package/client/assets/erDiagram-Q63AITRT-BWx_-PXG-CWGfG4z5.js +85 -0
- package/client/assets/erDiagram-Q63AITRT-CMbtO3Sm.js +85 -0
- package/client/assets/eventmodeling-45OFAUF4--32SIpkL.js +1 -0
- package/client/assets/eventmodeling-45OFAUF4-_BVSjAXf-DQdL0Icr.js +1 -0
- package/client/assets/flowDiagram-23GEKE2U-BeOc_anm-CuVzKmmU.js +1 -0
- package/client/assets/flowDiagram-23GEKE2U-Dofa_qxG.js +1 -0
- package/client/assets/ganttDiagram-NO4QXBWP-BOoJ1eTw-TWoNmSvq.js +292 -0
- package/client/assets/ganttDiagram-NO4QXBWP-BgoAVKuc.js +292 -0
- package/client/assets/gitGraph-TEB2WS4Q-CH12KLTN-Bz4frAhV.js +1 -0
- package/client/assets/gitGraph-TEB2WS4Q-DIMvNvqt.js +1 -0
- package/client/assets/gitGraphDiagram-IHSO6WYX-B2CJhk_G-ClOKkjxw.js +106 -0
- package/client/assets/gitGraphDiagram-IHSO6WYX-Dmb6KnPz.js +106 -0
- package/client/assets/graphlib-B8gBHxth.js +1 -0
- package/client/assets/graphlib-hY-1btwe-DQjxxcnr.js +1 -0
- package/client/assets/{html2canvas-CDGcmOD3-CKJ6vKPo.js → html2canvas-CDGcmOD3-DRL9pFVl.js} +2 -2
- package/client/assets/{index-9lmYSaus.js → index-Dc0R-HW5.js} +129 -190
- package/client/assets/index-Dxo1Zdd-.css +2 -0
- package/client/assets/{index.es-DqtpmBm8-DFXjJgCa.js → index.es-DqtpmBm8-EQk3NgR8.js} +1 -1
- package/client/assets/info-DKCQHKI2-Cbw3mbiK-GsDZz9IO.js +1 -0
- package/client/assets/info-DKCQHKI2-ViCqobGo.js +1 -0
- package/client/assets/infoDiagram-FWYZ7A6U-HKV7LIG-.js +2 -0
- package/client/assets/infoDiagram-FWYZ7A6U-Mp1X3pBP-ATJv87Ur.js +2 -0
- package/client/assets/init-D6jRqBbL.js +1 -0
- package/client/assets/init-DEsX3bhM-D6jRqBbL.js +1 -0
- package/client/assets/ishikawaDiagram-FXEZZL3T-BNG7tkJu-CGCeOIlJ.js +70 -0
- package/client/assets/ishikawaDiagram-FXEZZL3T-CVDUj46f.js +70 -0
- package/client/assets/journeyDiagram-5HDEW3XC-BA-ESGLP.js +139 -0
- package/client/assets/journeyDiagram-5HDEW3XC-Dbp_hY9X-Bx-IoCe9.js +139 -0
- package/client/assets/kanban-definition-HUTT4EX6-Bqaet01L.js +89 -0
- package/client/assets/kanban-definition-HUTT4EX6-DSTc5u3q-C0JGckt1.js +89 -0
- package/client/assets/katex-CddkPoXu.js +257 -0
- package/client/assets/katex-M0IxphGf-CddkPoXu.js +257 -0
- package/client/assets/lib-4Tgx7rAy.js +114 -0
- package/client/assets/line-B1wBwzrY-f5wxpqoF.js +1 -0
- package/client/assets/line-CkyHfW7d.js +1 -0
- package/client/assets/linear-B9fuEF4c.js +1 -0
- package/client/assets/linear-lrGinF5_-CqNBync7.js +1 -0
- package/client/assets/map-CgrwEyH7-DWQFomlZ.js +1 -0
- package/client/assets/map-DsCK-0Cs.js +1 -0
- package/client/assets/marked.esm-CIU5FDdN.js +64 -0
- package/client/assets/marp-CSq0PPfK.js +3448 -0
- package/client/assets/material-symbols-outlined-DdRFxZLh.woff2 +0 -0
- package/client/assets/mermaid-parser.core-DC7NPJ_M-Ca6XzwfM.js +166 -0
- package/client/assets/mermaid-parser.core-SAwSf4_o.js +7 -0
- package/client/assets/mermaid.core-BBEQfkdJ.js +11 -0
- package/client/assets/mermaid.core-DZM3Ha-E-BxOo-RYG.js +11 -0
- package/client/assets/mindmap-definition-LN4V7U3C-B4BN0efL.js +96 -0
- package/client/assets/mindmap-definition-LN4V7U3C-DYtgcMsY-DynyLTNv.js +96 -0
- package/client/assets/ordinal-B9_Llu10-CU85fhaB.js +1 -0
- package/client/assets/ordinal-CopWnP7w.js +1 -0
- package/client/assets/packet-7NZHBO7P-CY4XRk9N.js +1 -0
- package/client/assets/packet-7NZHBO7P-lwb58iYx--vqSg65J.js +1 -0
- package/client/assets/path-BWPyau1x.js +1 -0
- package/client/assets/path-COivZ1Gw-C5riojK2.js +1 -0
- package/client/assets/pegDiagram-2B236MQR-BOKErjUu.js +1 -0
- package/client/assets/pegDiagram-2B236MQR-C43eIpKM-Bi_5Sxjt.js +1 -0
- package/client/assets/pie-RZYD4A2V-6BHB7bAx.js +1 -0
- package/client/assets/pie-RZYD4A2V-B1UWb4Gu-Dmn2hLWH.js +1 -0
- package/client/assets/pieDiagram-ENE6RG2P-BkTqgJyR-Bcdm19kR.js +39 -0
- package/client/assets/pieDiagram-ENE6RG2P-DtNjvz-U.js +39 -0
- package/client/assets/preload-helper-CZgWQFsJ.js +1 -0
- package/client/assets/purify.es-DY32g7DN.js +3 -0
- package/client/assets/quadrantDiagram-ABIIQ3AL-BQmAJL2v.js +7 -0
- package/client/assets/quadrantDiagram-ABIIQ3AL-Bm1Zjm45-B3orqx_f.js +7 -0
- package/client/assets/radar-I7S5WNFK-7CKcb_l--CqKdnR0v.js +1 -0
- package/client/assets/radar-I7S5WNFK-R7Jhjfdt.js +1 -0
- package/client/assets/railroad-3IZDKUUU-BepSPyHI.js +1 -0
- package/client/assets/railroad-3IZDKUUU-gCySKdnW-CKU26HTP.js +1 -0
- package/client/assets/railroad-abnf-AHOZXSZD-BlsHsp3c.js +1 -0
- package/client/assets/railroad-abnf-AHOZXSZD-BophH4r--CGkGHq54.js +1 -0
- package/client/assets/railroad-ebnf-EBAXGLYW-AZNjl_Zu-B7bn_PF3.js +1 -0
- package/client/assets/railroad-ebnf-EBAXGLYW-B4fMcGEH.js +1 -0
- package/client/assets/railroad-peg-LSFZ7HO6-B1ZrjJIu.js +1 -0
- package/client/assets/railroad-peg-LSFZ7HO6-BSiEEyeb-CP_B-N5g.js +1 -0
- package/client/assets/railroadDiagram-RFXS5EU6-8cz0Iby3.js +1 -0
- package/client/assets/railroadDiagram-RFXS5EU6-BkfbdeAs-Di6jH5I6.js +1 -0
- package/client/assets/requirementDiagram-TGXJPOKE-CrGTTjYg-DmIC7Shp.js +84 -0
- package/client/assets/requirementDiagram-TGXJPOKE-Dlqoe9TY.js +84 -0
- package/client/assets/rough.esm-CSKSodPl.js +1 -0
- package/client/assets/rough.esm-wVmwlXu7-CSKSodPl.js +1 -0
- package/client/assets/runtime-protocol-vue-WG3JLsjz.js +1 -0
- package/client/assets/runtime-vue-lHsY5zMj.js +1 -0
- package/client/assets/sankeyDiagram-HTMAVEWB-BkTKgu8Q.js +40 -0
- package/client/assets/sankeyDiagram-HTMAVEWB-rWXPf03Z-CjV9pCSJ.js +40 -0
- package/client/assets/{schemas-D_RbFtuQ.js → schemas-DGvl73AE.js} +3 -3
- package/client/assets/sequenceDiagram-DBY2YBRQ-BpuXUcFy.js +162 -0
- package/client/assets/sequenceDiagram-DBY2YBRQ-nkJYWO2m-BqS_sTCH.js +162 -0
- package/client/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
- package/client/assets/sizeCapture-X5ZJPWSS-F5SadAuT-VHIb4_NU.js +1 -0
- package/client/assets/src-Brzfja-q-DNc4Or4z.js +1 -0
- package/client/assets/src-Cqa3Jy1j.js +1 -0
- package/client/assets/stateDiagram-2N3HPSRC-CdlGXuo7.js +1 -0
- package/client/assets/stateDiagram-2N3HPSRC-T4-clK8b-DQRiB4va.js +1 -0
- package/client/assets/stateDiagram-v2-6OUMAXLB-BN8Jr3ZM.js +1 -0
- package/client/assets/stateDiagram-v2-6OUMAXLB-DIp7nhRd-DbrOhUn_.js +1 -0
- package/client/assets/swimlanes-5IMT3BWC-HmQNEntu-CNBgZdur.js +2 -0
- package/client/assets/swimlanes-5IMT3BWC-iEJg5gki.js +2 -0
- package/client/assets/swimlanesDiagram-G3AALYLV-BeoZhwg7-DpqgeNRA.js +8 -0
- package/client/assets/swimlanesDiagram-G3AALYLV-o-sS6aEP.js +8 -0
- package/client/assets/timeline-definition-FHXFAJF6-Bjh-7QmL.js +120 -0
- package/client/assets/timeline-definition-FHXFAJF6-CNc9jSTP-BKNSymgY.js +120 -0
- package/client/assets/treeView-QDETBFTQ-D3cqRl6k.js +1 -0
- package/client/assets/treeView-QDETBFTQ-nIQcG1h9-O_ri9HxD.js +1 -0
- package/client/assets/treemap-6X3UGDF4-BnsvC8yL-Cfsty1e3.js +1 -0
- package/client/assets/treemap-6X3UGDF4-DGkZcvDG.js +1 -0
- package/client/assets/v4-B29ayslu.js +1 -0
- package/client/assets/vennDiagram-L72KCM5P-Cz3dbe7b.js +34 -0
- package/client/assets/vennDiagram-L72KCM5P-Dr3pTJ_0-C38xwcVo.js +34 -0
- package/client/assets/vue-C6d2VveO.js +1 -0
- package/client/assets/vue-i18n-CL-ejuNu.js +3 -0
- package/client/assets/vue.runtime.esm-bundler-BeoTfMNc.js +4 -0
- package/client/assets/wardley-OPB4EBWU-8Odxkx6V-CCDIVuBs.js +1 -0
- package/client/assets/wardley-OPB4EBWU-CZsCDvKk.js +1 -0
- package/client/assets/wardleyDiagram-EHGQE667-DSFc7ZZa-mlWXRiWx.js +78 -0
- package/client/assets/wardleyDiagram-EHGQE667-DiyoyO_X.js +78 -0
- package/client/assets/xychartDiagram-FW5EYKEG-BP0Nn4Pp-DRRiStGZ.js +7 -0
- package/client/assets/xychartDiagram-FW5EYKEG-DhY1_UGM.js +7 -0
- package/client/index.html +16 -12
- package/package.json +17 -19
- package/server/agent/backend/types.ts +1 -1
- package/server/agent/backgroundSessions.ts +43 -0
- package/server/agent/config.ts +3 -2
- package/server/agent/mcp-tools/manageCollection.ts +4 -4
- package/server/agent/sandboxMounts.ts +1 -1
- package/server/agent/stream.ts +1 -3
- package/server/api/auth/viewToken.ts +1 -1
- package/server/api/bridge/sessionRole.ts +47 -0
- package/server/api/routes/agent.ts +79 -2
- package/server/api/routes/collections.ts +60 -7
- package/server/api/routes/collectionsRegistry.ts +113 -0
- package/server/api/routes/dashboard.ts +47 -0
- package/server/api/routes/feeds.ts +2 -2
- package/server/api/routes/files.ts +1 -2
- package/server/api/routes/pdf.ts +48 -9
- package/server/api/routes/plugins.ts +2 -2
- package/server/api/routes/remoteHost.ts +55 -0
- package/server/api/routes/sessions.ts +20 -11
- package/server/api/routes/share.ts +105 -0
- package/server/api/routes/transcribe.ts +1 -1
- package/server/api/routes/wiki/history.ts +2 -2
- package/server/api/routes/wiki.ts +29 -177
- package/server/api/sandboxStatus.ts +1 -1
- package/server/build/dispatcher.mjs +25 -14928
- package/server/events/collection-change.ts +4 -4
- package/server/events/file-change.ts +2 -2
- package/server/events/scheduler-adapter.ts +3 -3
- package/server/events/task-manager/index.ts +3 -3
- package/server/index.ts +53 -17
- package/server/notifier/engine.ts +3 -3
- package/server/notifier/types.ts +2 -2
- package/server/plugins/html-builtin.ts +15 -1
- package/server/prompts/system/system.md +4 -0
- package/server/remoteHost/auth.ts +29 -0
- package/server/remoteHost/commandChannel.ts +56 -0
- package/server/remoteHost/firebase.ts +16 -0
- package/server/remoteHost/handlers/collectionPage.ts +29 -0
- package/server/remoteHost/handlers/getCollection.ts +32 -0
- package/server/remoteHost/handlers/getFeed.ts +35 -0
- package/server/remoteHost/handlers/index.ts +19 -0
- package/server/remoteHost/handlers/listCollections.ts +29 -0
- package/server/remoteHost/handlers/listFeeds.ts +37 -0
- package/server/remoteHost/handlers/listShortcuts.ts +24 -0
- package/server/remoteHost/handlers/startChat.ts +78 -0
- package/server/remoteHost/hostRunner.ts +122 -0
- package/server/remoteHost/index.ts +117 -0
- package/server/system/config.ts +1 -1
- package/server/system/credentials.ts +2 -3
- package/server/system/docker.ts +9 -8
- package/server/system/env.ts +8 -0
- package/server/system/whisper/index.ts +4 -4
- package/server/utils/claudeConfigPath.ts +57 -0
- package/server/utils/files/dashboard-io.ts +87 -0
- package/server/utils/files/session-io.ts +11 -0
- package/server/utils/markdown/frontmatter.ts +8 -4
- package/server/utils/regex.ts +4 -3
- package/server/utils/share/packHtml.ts +108 -0
- package/server/utils/share/rewriteAssets.ts +178 -0
- package/server/workspace/chat-index/paths.ts +8 -2
- package/server/workspace/chat-index/summarizer.ts +23 -15
- package/server/workspace/collections/configure.ts +5 -3
- package/server/workspace/collections/index.ts +8 -6
- package/server/workspace/collections/notifications.ts +3 -3
- package/server/workspace/collections/types.ts +2 -2
- package/server/workspace/collections/watcher.ts +2 -2
- package/server/workspace/feeds/configure.ts +24 -0
- package/server/workspace/hooks/handlers/skillBridge.ts +2 -2
- package/server/workspace/hooks/handlers/wikiSnapshot.ts +1 -1
- package/server/workspace/paths.ts +8 -1
- package/server/workspace/skills/catalog.ts +1 -3
- package/server/workspace/skills/external/catalog.ts +1 -3
- package/server/workspace/skills/paths.ts +4 -3
- package/server/workspace/skills/writer.ts +1 -4
- package/server/workspace/skills-preset.ts +3 -3
- package/server/workspace/wiki-pages/io.ts +2 -2
- package/server/workspace/workspace.ts +2 -2
- package/src/App.vue +41 -18
- package/src/components/ChatInput.vue +1 -1
- package/src/components/DashboardView.vue +372 -0
- package/src/components/FileContentRenderer.vue +32 -7
- package/src/components/JsonEditor.vue +1 -1
- package/src/components/PluginLauncher.vue +122 -79
- package/src/components/RemoteHostControl.vue +159 -0
- package/src/components/SessionCountBadges.vue +32 -0
- package/src/components/SessionHeaderControls.vue +1 -8
- package/src/components/SessionHistoryPanel.vue +2 -0
- package/src/components/SessionHistoryToggleButton.vue +1 -15
- package/src/components/SidebarHeader.vue +2 -0
- package/src/components/collectionTypes.ts +2 -2
- package/src/composables/accountingHost.ts +24 -0
- package/src/composables/collections/uiHost.ts +17 -2
- package/src/composables/useDashboard.ts +191 -0
- package/src/composables/useMarkdownZip.ts +51 -0
- package/src/composables/useNotifications.ts +1 -4
- package/src/composables/useSharePack.ts +60 -0
- package/src/composables/useTranslatedQueries.ts +15 -95
- package/src/composables/useTranslatedStrings.ts +68 -0
- package/src/composables/useVoiceInput.ts +3 -3
- package/src/config/apiRoutes.ts +57 -9
- package/src/config/createFilePolicy.ts +1 -1
- package/src/config/firebase.ts +12 -0
- package/src/config/firebaseConfig.ts +18 -0
- package/src/config/historyFilters.ts +7 -0
- package/src/config/pubsubChannels.ts +7 -27
- package/src/config/roles.ts +12 -10
- package/src/config/workspacePaths.ts +10 -0
- package/src/index.css +1 -1
- package/src/lang/de.ts +39 -220
- package/src/lang/en.ts +39 -191
- package/src/lang/es.ts +39 -218
- package/src/lang/fr.ts +39 -220
- package/src/lang/ja.ts +39 -216
- package/src/lang/ko.ts +39 -216
- package/src/lang/pt-BR.ts +39 -217
- package/src/lang/zh.ts +39 -215
- package/src/main.ts +3 -0
- package/src/plugins/accounting/definition.ts +12 -8
- package/src/plugins/accounting/index.ts +7 -4
- package/src/plugins/accounting/meta.ts +23 -60
- package/src/plugins/manageSkills/View.vue +9 -1
- package/src/plugins/photoLocations/View.vue +2 -2
- package/src/plugins/presentCollection/definition.ts +2 -2
- package/src/plugins/presentCollection/plugin.ts +2 -2
- package/src/plugins/presentCollection/types.ts +2 -2
- package/src/plugins/presentHtml/definition.ts +1 -1
- package/src/plugins/presentMulmoScript/View.vue +2 -2
- package/src/plugins/presentMulmoScript/helpers.ts +1 -1
- package/src/plugins/presentSVG/View.vue +2 -2
- package/src/plugins/scheduler/TasksTab.vue +1 -2
- package/src/plugins/skill/View.vue +7 -3
- package/src/plugins/spreadsheet/View.vue +3 -3
- package/src/plugins/spreadsheet/engine/functions/logical.ts +8 -1
- package/src/plugins/textResponse/View.vue +43 -16
- package/src/plugins/wiki/View.vue +29 -2
- package/src/plugins/wiki/components/WikiGraphView.vue +1 -1
- package/src/plugins/wiki/components/WikiPageBody.vue +4 -1
- package/src/plugins/wiki/helpers.ts +13 -81
- package/src/plugins/wiki/index.ts +1 -1
- package/src/router/guards.ts +1 -1
- package/src/router/index.ts +12 -0
- package/src/router/pageRoutes.ts +2 -0
- package/src/types/dashboard.ts +40 -0
- package/src/types/session.ts +3 -0
- package/src/utils/blobDownload.ts +19 -0
- package/src/utils/collections/presentSeed.ts +1 -1
- package/src/utils/html/customViewSrcdoc.ts +31 -3
- package/src/utils/html/previewCsp.ts +1 -1
- package/src/utils/id.ts +1 -1
- package/src/utils/image/htmlSrcAttrs.ts +1 -1
- package/src/utils/markdown/frontmatter.ts +12 -7
- package/src/utils/markdown/highlight.ts +22 -0
- package/src/utils/markdown/marpCustomSize.ts +2 -2
- package/src/utils/markdown/mermaidExtension.ts +56 -0
- package/src/utils/markdown/mermaidRender.ts +147 -0
- package/src/utils/markdown/setup.ts +17 -4
- package/src/utils/markdown/useMermaid.ts +33 -0
- package/src/utils/session/longRunning.ts +33 -0
- package/src/utils/session/mergeSessions.ts +1 -1
- package/client/assets/JsonEditor-Di5xGeZY.css +0 -1
- package/client/assets/JsonEditor-o5--tPQH.js +0 -10
- package/client/assets/index-tOu5ArRZ.css +0 -2
- package/client/assets/lib-D6Xy0IFc.js +0 -114
- package/client/assets/marp-D6GXA-EB.js +0 -3452
- package/client/assets/material-symbols-outlined-DtIK7AQn.woff2 +0 -0
- package/client/assets/runtime-protocol-vue-pU0Mw7Zm.js +0 -1
- package/client/assets/runtime-vue-fFYhnNg3.js +0 -1
- package/client/assets/vue-UDIWDtr8.js +0 -1
- package/client/assets/vue-i18n-CQbxVmNs.js +0 -3
- package/client/assets/vue.runtime.esm-bundler-BTyIdNAI.js +0 -4
- package/server/accounting/accountNormalize.ts +0 -32
- package/server/accounting/defaultAccounts.ts +0 -87
- package/server/accounting/eventPublisher.ts +0 -52
- package/server/accounting/journal.ts +0 -252
- package/server/accounting/openingBalances.ts +0 -114
- package/server/accounting/report.ts +0 -237
- package/server/accounting/service.ts +0 -718
- package/server/accounting/snapshotCache.ts +0 -334
- package/server/accounting/timeSeries.ts +0 -265
- package/server/accounting/types.ts +0 -148
- package/server/api/routes/accounting.ts +0 -373
- package/server/api/routes/wiki/frontmatter.ts +0 -34
- package/server/api/routes/wiki/pageIndex.ts +0 -53
- package/server/system/logs/aaa +0 -737
- package/server/system/logs/bb +0 -446
- package/server/utils/files/accounting-io.ts +0 -294
- package/server/workspace/feeds/engine.ts +0 -143
- package/server/workspace/feeds/fetch/httpClient.ts +0 -127
- package/server/workspace/feeds/fetch/rssParser.ts +0 -117
- package/server/workspace/feeds/index.ts +0 -8
- package/server/workspace/feeds/ingestTypes.ts +0 -62
- package/server/workspace/feeds/pathResolver.ts +0 -74
- package/server/workspace/feeds/paths.ts +0 -30
- package/server/workspace/feeds/projectItem.ts +0 -92
- package/server/workspace/feeds/registry.ts +0 -43
- package/server/workspace/feeds/retrievers/httpJson.ts +0 -19
- package/server/workspace/feeds/retrievers/index.ts +0 -27
- package/server/workspace/feeds/retrievers/registerAll.ts +0 -5
- package/server/workspace/feeds/retrievers/rss.ts +0 -24
- package/server/workspace/feeds/state.ts +0 -55
- package/src/composables/useAccountingChannel.ts +0 -58
- package/src/lib/wiki-page/graph.ts +0 -108
- package/src/lib/wiki-page/index-parse.ts +0 -221
- package/src/lib/wiki-page/link.ts +0 -62
- package/src/lib/wiki-page/lint.ts +0 -105
- package/src/lib/wiki-page/paths.ts +0 -35
- package/src/lib/wiki-page/slug.ts +0 -54
- package/src/plugins/accounting/Preview.vue +0 -103
- package/src/plugins/accounting/View.vue +0 -633
- package/src/plugins/accounting/actions.ts +0 -34
- package/src/plugins/accounting/api.ts +0 -301
- package/src/plugins/accounting/components/AccountEditor.vue +0 -250
- package/src/plugins/accounting/components/AccountRow.vue +0 -50
- package/src/plugins/accounting/components/AccountsList.vue +0 -102
- package/src/plugins/accounting/components/AccountsModal.vue +0 -301
- package/src/plugins/accounting/components/BalanceSheet.vue +0 -186
- package/src/plugins/accounting/components/BookSettings.vue +0 -284
- package/src/plugins/accounting/components/BookSwitcher.vue +0 -78
- package/src/plugins/accounting/components/DateRangePicker.vue +0 -140
- package/src/plugins/accounting/components/JournalEntryForm.vue +0 -505
- package/src/plugins/accounting/components/JournalList.vue +0 -554
- package/src/plugins/accounting/components/Ledger.vue +0 -206
- package/src/plugins/accounting/components/NewBookForm.vue +0 -211
- package/src/plugins/accounting/components/OpeningBalancesForm.vue +0 -272
- package/src/plugins/accounting/components/ProfitLoss.vue +0 -160
- package/src/plugins/accounting/components/accountDraft.ts +0 -13
- package/src/plugins/accounting/components/accountNumbering.ts +0 -103
- package/src/plugins/accounting/components/accountValidation.ts +0 -75
- package/src/plugins/accounting/components/useLatestRequest.ts +0 -44
- package/src/plugins/accounting/countries.ts +0 -158
- package/src/plugins/accounting/currencies.ts +0 -77
- package/src/plugins/accounting/dates.ts +0 -51
- package/src/plugins/accounting/fiscalYear.ts +0 -136
- package/src/plugins/accounting/timeSeriesEnums.ts +0 -16
- package/src/plugins/wiki/route.ts +0 -137
- /package/client/assets/{_plugin-vue_export-helper-B67ILkmu.js → _plugin-vue_export-helper-BDNMzG2s.js} +0 -0
- /package/client/assets/{purify.es-B27wDFIb-51iYcXuK.js → purify.es-B27wDFIb-Bu4Grnl0.js} +0 -0
- /package/client/assets/{typeof-DBp4T-Ny-z2wCIsir.js → typeof-DBp4T-Ny-B5XbjTb1.js} +0 -0
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
// Typed wrapper around POST /api/accounting. Centralises the action
|
|
2
|
-
// names and the response shapes so the View / sub-components don't
|
|
3
|
-
// repeat the cast at every call site.
|
|
4
|
-
//
|
|
5
|
-
// Every helper returns `ApiResult<T>` (the shared discriminated union
|
|
6
|
-
// from src/utils/api.ts) — callers pattern-match on `.ok`. There is
|
|
7
|
-
// no separate error-throwing path; all surfaces (network, HTTP, app
|
|
8
|
-
// validation) flow through the same shape.
|
|
9
|
-
|
|
10
|
-
import { apiCall, type ApiResult } from "../../utils/api";
|
|
11
|
-
import { META } from "./meta";
|
|
12
|
-
import { ACCOUNTING_ACTIONS } from "./actions";
|
|
13
|
-
import type { SupportedCountryCode } from "./countries";
|
|
14
|
-
import type { FiscalYearEnd } from "./fiscalYear";
|
|
15
|
-
import type { TimeSeriesGranularity, TimeSeriesMetric } from "./timeSeriesEnums";
|
|
16
|
-
|
|
17
|
-
export type AccountType = "asset" | "liability" | "equity" | "income" | "expense";
|
|
18
|
-
export type JournalEntryKind = "normal" | "opening" | "void" | "void-marker";
|
|
19
|
-
|
|
20
|
-
export interface Account {
|
|
21
|
-
code: string;
|
|
22
|
-
name: string;
|
|
23
|
-
type: AccountType;
|
|
24
|
-
note?: string;
|
|
25
|
-
/** Soft-delete flag. When `false`, the account is hidden from
|
|
26
|
-
* entry/ledger dropdowns but stays visible in Manage Accounts
|
|
27
|
-
* and historical entries. */
|
|
28
|
-
active?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface JournalLine {
|
|
32
|
-
accountCode: string;
|
|
33
|
-
debit?: number;
|
|
34
|
-
credit?: number;
|
|
35
|
-
memo?: string;
|
|
36
|
-
/** Counterparty's tax-authority-issued registration ID — JP
|
|
37
|
-
* T-number, EU VAT ID, UK VAT registration number, GSTIN, ABN,
|
|
38
|
-
* etc. See server/accounting/types.ts for the full doc. */
|
|
39
|
-
taxRegistrationId?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface JournalEntry {
|
|
43
|
-
id: string;
|
|
44
|
-
date: string;
|
|
45
|
-
kind: JournalEntryKind;
|
|
46
|
-
lines: JournalLine[];
|
|
47
|
-
memo?: string;
|
|
48
|
-
voidedEntryId?: string;
|
|
49
|
-
voidReason?: string;
|
|
50
|
-
/** Set on the new entry posted via the "edit" flow — id of the
|
|
51
|
-
* original entry that was voided in the same operation. The
|
|
52
|
-
* void + new-entry pair is two sequential calls on the client,
|
|
53
|
-
* not an atomic transaction. */
|
|
54
|
-
replacesEntryId?: string;
|
|
55
|
-
createdAt: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface BookSummary {
|
|
59
|
-
id: string;
|
|
60
|
-
name: string;
|
|
61
|
-
currency: string;
|
|
62
|
-
/** ISO 3166-1 alpha-2 country code identifying the tax jurisdiction
|
|
63
|
-
* the book is kept under. Constrained to `SupportedCountryCode` —
|
|
64
|
-
* see `countries.ts`. Optional for backward compatibility with
|
|
65
|
-
* books created before the field was introduced. */
|
|
66
|
-
country?: SupportedCountryCode;
|
|
67
|
-
/** Which calendar-quarter end is the book's fiscal year end:
|
|
68
|
-
* Q1 → March 31, Q2 → June 30, Q3 → September 30, Q4 → December 31.
|
|
69
|
-
* Optional in the persisted shape for backward compatibility —
|
|
70
|
-
* read-side code treats absence as Q4 via `resolveFiscalYearEnd`.
|
|
71
|
-
* See `./fiscalYear.ts`. */
|
|
72
|
-
fiscalYearEnd?: FiscalYearEnd;
|
|
73
|
-
createdAt: string;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface OpenAppPayload {
|
|
77
|
-
kind: "accounting-app";
|
|
78
|
-
/** `null` when the workspace has zero books — the View renders the
|
|
79
|
-
* empty state and prompts for book creation. */
|
|
80
|
-
bookId: string | null;
|
|
81
|
-
initialTab?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface AccountBalance {
|
|
85
|
-
accountCode: string;
|
|
86
|
-
netDebit: number;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface BalanceSheetSection {
|
|
90
|
-
type: AccountType;
|
|
91
|
-
rows: { accountCode: string; accountName: string; balance: number }[];
|
|
92
|
-
total: number;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface BalanceSheet {
|
|
96
|
-
asOf: string;
|
|
97
|
-
sections: BalanceSheetSection[];
|
|
98
|
-
imbalance: number;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface ProfitLoss {
|
|
102
|
-
from: string;
|
|
103
|
-
to: string;
|
|
104
|
-
income: { rows: { accountCode: string; accountName: string; amount: number }[]; total: number };
|
|
105
|
-
expense: { rows: { accountCode: string; accountName: string; amount: number }[]; total: number };
|
|
106
|
-
netIncome: number;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface LedgerRow {
|
|
110
|
-
entryId: string;
|
|
111
|
-
date: string;
|
|
112
|
-
kind: JournalEntryKind;
|
|
113
|
-
memo?: string;
|
|
114
|
-
debit: number;
|
|
115
|
-
credit: number;
|
|
116
|
-
runningBalance: number;
|
|
117
|
-
/** Counterparty tax-registration ID per source line. The Ledger
|
|
118
|
-
* view shows it as its own column when the selected account is
|
|
119
|
-
* in the input-tax band (14xx — see `isTaxAccountCode`). */
|
|
120
|
-
taxRegistrationId?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface Ledger {
|
|
124
|
-
accountCode: string;
|
|
125
|
-
accountName: string;
|
|
126
|
-
rows: LedgerRow[];
|
|
127
|
-
closingBalance: number;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export type ReportPeriod = { kind: "month"; period: string } | { kind: "range"; from: string; to: string };
|
|
131
|
-
|
|
132
|
-
// `META.apiRoutes.dispatch.path` is `""` and `META.apiNamespace` is
|
|
133
|
-
// `"accounting"`, so the URL composes to `/api/accounting`. Resolved
|
|
134
|
-
// inline rather than via the host `pluginEndpoints` registry — this
|
|
135
|
-
// file is plugin-internal and the META is the single source of truth.
|
|
136
|
-
const DISPATCH_URL = `/api/${META.apiNamespace}${META.apiRoutes.dispatch.path}`;
|
|
137
|
-
const DISPATCH_METHOD = META.apiRoutes.dispatch.method;
|
|
138
|
-
|
|
139
|
-
function call<T>(action: string, args: Record<string, unknown> = {}): Promise<ApiResult<T>> {
|
|
140
|
-
return apiCall<T>(DISPATCH_URL, { method: DISPATCH_METHOD, body: { action, ...args } });
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// ── Books ────────────────────────────────────────────────────────────
|
|
144
|
-
|
|
145
|
-
export function getBooks(): Promise<ApiResult<{ books: BookSummary[] }>> {
|
|
146
|
-
return call(ACCOUNTING_ACTIONS.getBooks);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export function createBook(input: {
|
|
150
|
-
name: string;
|
|
151
|
-
currency?: string;
|
|
152
|
-
country?: SupportedCountryCode;
|
|
153
|
-
/** Q1..Q4 — required at the form boundary, but the server silently
|
|
154
|
-
* defaults absent / empty to Q4 for back-compat. */
|
|
155
|
-
fiscalYearEnd?: FiscalYearEnd;
|
|
156
|
-
}): Promise<ApiResult<{ book: BookSummary }>> {
|
|
157
|
-
return call(ACCOUNTING_ACTIONS.createBook, input);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function updateBook(input: {
|
|
161
|
-
bookId: string;
|
|
162
|
-
name?: string;
|
|
163
|
-
/** Pass `""` to explicitly clear the country (server treats it as
|
|
164
|
-
* the "drop the field" sentinel). Any other value must be one of
|
|
165
|
-
* the curated `SupportedCountryCode`s. */
|
|
166
|
-
country?: SupportedCountryCode | "";
|
|
167
|
-
/** Q1..Q4 — pure metadata, only changes how the date-range
|
|
168
|
-
* shortcuts resolve. No "clear" path; absence leaves the existing
|
|
169
|
-
* value untouched. */
|
|
170
|
-
fiscalYearEnd?: FiscalYearEnd;
|
|
171
|
-
}): Promise<ApiResult<{ book: BookSummary }>> {
|
|
172
|
-
return call(ACCOUNTING_ACTIONS.updateBook, input);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export function deleteBook(bookId: string): Promise<ApiResult<{ deletedBookId: string; deletedBookName: string }>> {
|
|
176
|
-
return call(ACCOUNTING_ACTIONS.deleteBook, { bookId, confirm: true });
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// ── Accounts ─────────────────────────────────────────────────────────
|
|
180
|
-
|
|
181
|
-
export function getAccounts(bookId: string): Promise<ApiResult<{ bookId: string; accounts: Account[] }>> {
|
|
182
|
-
return call(ACCOUNTING_ACTIONS.getAccounts, { bookId });
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export function upsertAccount(account: Account, bookId: string): Promise<ApiResult<{ bookId: string; account: Account; accounts: Account[] }>> {
|
|
186
|
-
return call(ACCOUNTING_ACTIONS.upsertAccount, { account, bookId });
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// ── Entries ──────────────────────────────────────────────────────────
|
|
190
|
-
|
|
191
|
-
export interface AddEntriesItemInput {
|
|
192
|
-
date: string;
|
|
193
|
-
lines: JournalLine[];
|
|
194
|
-
memo?: string;
|
|
195
|
-
/** When set, marks this entry as the replacement posted via the
|
|
196
|
-
* "edit" flow. The caller is expected to have voided
|
|
197
|
-
* `replacesEntryId` separately just before this call — there is
|
|
198
|
-
* no atomic transaction. */
|
|
199
|
-
replacesEntryId?: string;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export function addEntries(input: {
|
|
203
|
-
bookId: string;
|
|
204
|
-
/** One or more entries to post. The server validates every entry
|
|
205
|
-
* before any write, so a single bad entry rejects the whole
|
|
206
|
-
* batch. Pass a single-element array to post just one entry. */
|
|
207
|
-
entries: AddEntriesItemInput[];
|
|
208
|
-
}): Promise<ApiResult<{ bookId: string; entries: JournalEntry[] }>> {
|
|
209
|
-
return call(ACCOUNTING_ACTIONS.addEntries, input);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export function voidEntry(input: {
|
|
213
|
-
entryId: string;
|
|
214
|
-
reason?: string;
|
|
215
|
-
bookId: string;
|
|
216
|
-
}): Promise<ApiResult<{ bookId: string; reverseEntry: JournalEntry; markerEntry: JournalEntry }>> {
|
|
217
|
-
return call(ACCOUNTING_ACTIONS.voidEntry, input);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export function getJournalEntries(input: {
|
|
221
|
-
from?: string;
|
|
222
|
-
to?: string;
|
|
223
|
-
accountCode?: string;
|
|
224
|
-
bookId: string;
|
|
225
|
-
}): Promise<ApiResult<{ bookId: string; entries: JournalEntry[]; voidedEntryIds: string[] }>> {
|
|
226
|
-
return call(ACCOUNTING_ACTIONS.getJournalEntries, input);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ── Opening balances ─────────────────────────────────────────────────
|
|
230
|
-
|
|
231
|
-
export function getOpeningBalances(bookId: string): Promise<ApiResult<{ bookId: string; opening: JournalEntry | null }>> {
|
|
232
|
-
return call(ACCOUNTING_ACTIONS.getOpeningBalances, { bookId });
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export function setOpeningBalances(input: {
|
|
236
|
-
asOfDate: string;
|
|
237
|
-
lines: JournalLine[];
|
|
238
|
-
memo?: string;
|
|
239
|
-
bookId: string;
|
|
240
|
-
}): Promise<ApiResult<{ bookId: string; openingEntry: JournalEntry; replacedExisting: boolean }>> {
|
|
241
|
-
return call(ACCOUNTING_ACTIONS.setOpeningBalances, input);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// ── Reports ──────────────────────────────────────────────────────────
|
|
245
|
-
|
|
246
|
-
export function getBalanceSheet(period: ReportPeriod, bookId: string): Promise<ApiResult<{ bookId: string; balanceSheet: BalanceSheet }>> {
|
|
247
|
-
return call(ACCOUNTING_ACTIONS.getReport, { kind: "balance", period, bookId });
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export function getProfitLoss(period: ReportPeriod, bookId: string): Promise<ApiResult<{ bookId: string; profitLoss: ProfitLoss }>> {
|
|
251
|
-
return call(ACCOUNTING_ACTIONS.getReport, { kind: "pl", period, bookId });
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export function getLedger(accountCode: string, period: ReportPeriod | undefined, bookId: string): Promise<ApiResult<{ bookId: string; ledger: Ledger }>> {
|
|
255
|
-
return call(ACCOUNTING_ACTIONS.getReport, { kind: "ledger", accountCode, period, bookId });
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export interface TimeSeriesPoint {
|
|
259
|
-
label: string;
|
|
260
|
-
from: string;
|
|
261
|
-
to: string;
|
|
262
|
-
value: number;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export interface TimeSeriesInput {
|
|
266
|
-
bookId: string;
|
|
267
|
-
metric: TimeSeriesMetric;
|
|
268
|
-
granularity: TimeSeriesGranularity;
|
|
269
|
-
/** Inclusive YYYY-MM-DD lower bound. The first bucket is the one
|
|
270
|
-
* CONTAINING this date — it can extend earlier. */
|
|
271
|
-
from: string;
|
|
272
|
-
/** Inclusive YYYY-MM-DD upper bound. The last bucket is the one
|
|
273
|
-
* CONTAINING this date — it can extend later. */
|
|
274
|
-
to: string;
|
|
275
|
-
/** Required when metric === "accountBalance"; forbidden otherwise.
|
|
276
|
-
* The server returns a 400 either way. */
|
|
277
|
-
accountCode?: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export interface TimeSeriesResult {
|
|
281
|
-
bookId: string;
|
|
282
|
-
metric: TimeSeriesMetric;
|
|
283
|
-
granularity: TimeSeriesGranularity;
|
|
284
|
-
from: string;
|
|
285
|
-
to: string;
|
|
286
|
-
accountCode?: string;
|
|
287
|
-
points: TimeSeriesPoint[];
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export function getTimeSeries(input: TimeSeriesInput): Promise<ApiResult<TimeSeriesResult>> {
|
|
291
|
-
// Spread so the named interface is widened into a fresh object
|
|
292
|
-
// literal — `call()` takes `Record<string, unknown>` which a
|
|
293
|
-
// declared interface doesn't satisfy structurally in TS.
|
|
294
|
-
return call(ACCOUNTING_ACTIONS.getTimeSeries, { ...input });
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// ── Admin ────────────────────────────────────────────────────────────
|
|
298
|
-
|
|
299
|
-
export function rebuildSnapshots(bookId: string): Promise<ApiResult<{ bookId: string; rebuilt: string[] }>> {
|
|
300
|
-
return call(ACCOUNTING_ACTIONS.rebuildSnapshots, { bookId });
|
|
301
|
-
}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- Inline editor used by AccountsModal both for "Edit" on an
|
|
3
|
-
existing row and per-section "+ Add" buttons. The parent
|
|
4
|
-
owns the open/closed state and the draft instance — this
|
|
5
|
-
component is dumb, but it runs realtime per-field validation
|
|
6
|
-
(red border) so the user gets feedback before clicking Save. -->
|
|
7
|
-
<form
|
|
8
|
-
class="flex flex-col gap-2 p-2 border border-blue-200 bg-blue-50/40 rounded text-sm"
|
|
9
|
-
:data-testid="isNew ? 'accounting-accounts-form-new' : `accounting-accounts-form-edit-${draft.code}`"
|
|
10
|
-
@submit.prevent="onSubmit"
|
|
11
|
-
>
|
|
12
|
-
<div class="flex flex-wrap gap-2">
|
|
13
|
-
<label class="text-xs text-gray-500 flex flex-col gap-1 w-28">
|
|
14
|
-
{{ t("pluginAccounting.accounts.columnCode") }}
|
|
15
|
-
<!-- New accounts: leading digit is fixed by type, so the
|
|
16
|
-
editable input is restricted to the trailing 3 digits.
|
|
17
|
-
The prefix span communicates the rule visually without
|
|
18
|
-
needing a separate help string. -->
|
|
19
|
-
<!-- The trailing-3-digit input has `outline-none bg-transparent`
|
|
20
|
-
so the prefix span and the editable digits read as one
|
|
21
|
-
pill. That removes the browser's default focus indicator,
|
|
22
|
-
so we surface it on the wrapper via `focus-within:ring-1`
|
|
23
|
-
— same shape as the name input below — to keep the field
|
|
24
|
-
keyboard-discoverable (#1115 review). -->
|
|
25
|
-
<div
|
|
26
|
-
v-if="isNew"
|
|
27
|
-
:class="[
|
|
28
|
-
'flex items-stretch h-8 rounded border bg-white text-sm font-mono overflow-hidden',
|
|
29
|
-
codeError ? 'border-red-500 ring-1 ring-red-500' : 'border-gray-300 focus-within:ring-1 focus-within:ring-blue-500',
|
|
30
|
-
]"
|
|
31
|
-
>
|
|
32
|
-
<span
|
|
33
|
-
class="px-2 flex items-center bg-gray-100 text-gray-500 border-r border-gray-200 select-none"
|
|
34
|
-
data-testid="accounting-accounts-form-code-prefix"
|
|
35
|
-
>{{ codePrefix }}</span
|
|
36
|
-
>
|
|
37
|
-
<input
|
|
38
|
-
v-model="codeTrailing"
|
|
39
|
-
type="text"
|
|
40
|
-
inputmode="numeric"
|
|
41
|
-
maxlength="3"
|
|
42
|
-
pattern="\d{3}"
|
|
43
|
-
class="px-2 grow w-0 outline-none bg-transparent"
|
|
44
|
-
data-testid="accounting-accounts-form-code"
|
|
45
|
-
@input="codeTouched = true"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
<!-- Edit: code is immutable, so we display the actual stored
|
|
49
|
-
value as a single disabled field rather than splitting
|
|
50
|
-
prefix + trailing (legacy non-4-digit codes would
|
|
51
|
-
otherwise be misrendered). -->
|
|
52
|
-
<input
|
|
53
|
-
v-else
|
|
54
|
-
v-model="local.code"
|
|
55
|
-
type="text"
|
|
56
|
-
disabled
|
|
57
|
-
class="h-8 px-2 rounded border border-gray-300 text-sm font-mono bg-gray-100 text-gray-500"
|
|
58
|
-
data-testid="accounting-accounts-form-code"
|
|
59
|
-
/>
|
|
60
|
-
</label>
|
|
61
|
-
<label class="text-xs text-gray-500 flex flex-col gap-1 grow min-w-[10rem]">
|
|
62
|
-
{{ t("pluginAccounting.accounts.columnName") }}
|
|
63
|
-
<input
|
|
64
|
-
ref="nameInput"
|
|
65
|
-
v-model="local.name"
|
|
66
|
-
type="text"
|
|
67
|
-
:class="[
|
|
68
|
-
'h-8 px-2 rounded border text-sm focus:outline-none',
|
|
69
|
-
nameError ? 'border-red-500 ring-1 ring-red-500' : 'border-gray-300 focus:ring-1 focus:ring-blue-500',
|
|
70
|
-
]"
|
|
71
|
-
data-testid="accounting-accounts-form-name"
|
|
72
|
-
@input="nameTouched = true"
|
|
73
|
-
/>
|
|
74
|
-
</label>
|
|
75
|
-
<label class="text-xs text-gray-500 flex flex-col gap-1 w-32">
|
|
76
|
-
{{ t("pluginAccounting.accounts.columnType") }}
|
|
77
|
-
<!-- Type is locked in both modes:
|
|
78
|
-
- NEW: the per-category "+ Add" button already chose
|
|
79
|
-
it, and the suggested code is keyed off it.
|
|
80
|
-
- EDIT: the type is part of the account's identity (it
|
|
81
|
-
drives section placement, the code-prefix rule, and
|
|
82
|
-
report categorization); changing it after the fact
|
|
83
|
-
leads to surprising downstream effects. -->
|
|
84
|
-
<select
|
|
85
|
-
v-model="local.type"
|
|
86
|
-
class="h-8 px-2 rounded border border-gray-300 text-sm bg-white disabled:bg-gray-100 disabled:text-gray-500"
|
|
87
|
-
disabled
|
|
88
|
-
data-testid="accounting-accounts-form-type"
|
|
89
|
-
>
|
|
90
|
-
<option v-for="option in TYPE_OPTIONS" :key="option" :value="option">
|
|
91
|
-
{{ t(`pluginAccounting.accounts.typeOption.${option}`) }}
|
|
92
|
-
</option>
|
|
93
|
-
</select>
|
|
94
|
-
</label>
|
|
95
|
-
</div>
|
|
96
|
-
<label class="text-xs text-gray-500 flex flex-col gap-1">
|
|
97
|
-
<span
|
|
98
|
-
>{{ t("pluginAccounting.accounts.columnNote") }} <span class="text-gray-400">{{ t("pluginAccounting.accounts.noteOptional") }}</span></span
|
|
99
|
-
>
|
|
100
|
-
<input v-model="local.note" type="text" class="h-8 px-2 rounded border border-gray-300 text-sm" data-testid="accounting-accounts-form-note" />
|
|
101
|
-
</label>
|
|
102
|
-
<p v-if="!isNew" class="text-xs text-gray-400">{{ t("pluginAccounting.accounts.codeReadOnlyHint") }}</p>
|
|
103
|
-
<!-- Always rendered with min-h to reserve a single line of space
|
|
104
|
-
so the Save / Cancel buttons stay put as the message shows
|
|
105
|
-
and clears. Field error wins over a stale parent error. -->
|
|
106
|
-
<p class="text-xs text-red-500 min-h-[1rem]" data-testid="accounting-accounts-form-error">{{ fieldErrorMessage ?? error ?? "" }}</p>
|
|
107
|
-
<div class="flex justify-end gap-2">
|
|
108
|
-
<button
|
|
109
|
-
type="button"
|
|
110
|
-
class="h-8 px-2.5 rounded border border-gray-300 text-sm text-gray-600 hover:bg-gray-50"
|
|
111
|
-
data-testid="accounting-accounts-form-cancel"
|
|
112
|
-
@click="emit('cancel')"
|
|
113
|
-
>
|
|
114
|
-
{{ t("pluginAccounting.accounts.cancel") }}
|
|
115
|
-
</button>
|
|
116
|
-
<button
|
|
117
|
-
type="submit"
|
|
118
|
-
class="h-8 px-2.5 rounded bg-blue-600 hover:bg-blue-700 text-white text-sm disabled:opacity-50"
|
|
119
|
-
:disabled="busy"
|
|
120
|
-
data-testid="accounting-accounts-form-save"
|
|
121
|
-
>
|
|
122
|
-
{{ busy ? t("pluginAccounting.accounts.saving") : t("pluginAccounting.accounts.save") }}
|
|
123
|
-
</button>
|
|
124
|
-
</div>
|
|
125
|
-
</form>
|
|
126
|
-
</template>
|
|
127
|
-
|
|
128
|
-
<script setup lang="ts">
|
|
129
|
-
import { computed, nextTick, onMounted, reactive, ref, watch } from "vue";
|
|
130
|
-
import { useI18n } from "vue-i18n";
|
|
131
|
-
import type { Account, AccountType } from "../api";
|
|
132
|
-
import type { AccountDraft } from "./accountDraft";
|
|
133
|
-
import { ACCOUNT_TYPE_PREFIX } from "./accountNumbering";
|
|
134
|
-
import { validateCodeField, validateNameField, type AccountValidationError, type CodeValidationError, type NameValidationError } from "./accountValidation";
|
|
135
|
-
|
|
136
|
-
const { t } = useI18n();
|
|
137
|
-
|
|
138
|
-
const props = defineProps<{
|
|
139
|
-
draft: AccountDraft;
|
|
140
|
-
isNew: boolean;
|
|
141
|
-
busy: boolean;
|
|
142
|
-
error: string | null;
|
|
143
|
-
existingAccounts: readonly Account[];
|
|
144
|
-
}>();
|
|
145
|
-
const emit = defineEmits<{ save: [draft: AccountDraft]; cancel: [] }>();
|
|
146
|
-
|
|
147
|
-
const TYPE_OPTIONS: readonly AccountType[] = ["asset", "liability", "equity", "income", "expense"];
|
|
148
|
-
|
|
149
|
-
const VALIDATION_MESSAGE_KEYS: Record<AccountValidationError, string> = {
|
|
150
|
-
emptyCode: "pluginAccounting.accounts.errorEmptyCode",
|
|
151
|
-
reservedCode: "pluginAccounting.accounts.errorReservedCode",
|
|
152
|
-
invalidCodeFormat: "pluginAccounting.accounts.errorInvalidCodeFormat",
|
|
153
|
-
codeTypeMismatch: "pluginAccounting.accounts.errorCodeTypeMismatch",
|
|
154
|
-
emptyName: "pluginAccounting.accounts.errorEmptyName",
|
|
155
|
-
duplicateCode: "pluginAccounting.accounts.errorDuplicateCode",
|
|
156
|
-
duplicateName: "pluginAccounting.accounts.errorDuplicateName",
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
// Local copy so the parent's `draft` ref stays untouched until the
|
|
160
|
-
// user clicks Save. Cancelling reverts cleanly because the parent
|
|
161
|
-
// just discards its draft.
|
|
162
|
-
const local = reactive<AccountDraft>({ ...props.draft });
|
|
163
|
-
const nameInput = ref<HTMLInputElement | null>(null);
|
|
164
|
-
|
|
165
|
-
// Track which fields the user has interacted with so we can suppress
|
|
166
|
-
// "empty required" errors on a freshly-opened editor (the suggested
|
|
167
|
-
// code is always valid, but a brand-new account starts with an empty
|
|
168
|
-
// name — flashing red before the user has typed would be noise).
|
|
169
|
-
// Format / collision errors fire immediately because they only
|
|
170
|
-
// happen when the user has actually entered something.
|
|
171
|
-
const codeTouched = ref(false);
|
|
172
|
-
const nameTouched = ref(false);
|
|
173
|
-
|
|
174
|
-
const codePrefix = computed(() => String(ACCOUNT_TYPE_PREFIX[local.type]));
|
|
175
|
-
|
|
176
|
-
// Two-way binding for the trailing 3 digits. The full code
|
|
177
|
-
// (`local.code`) remains the source of truth; the trailing slice is
|
|
178
|
-
// derived. Non-digits and overflow are stripped on input so the
|
|
179
|
-
// downstream validator only ever sees a clean 4-digit candidate.
|
|
180
|
-
const codeTrailing = computed({
|
|
181
|
-
get: () => {
|
|
182
|
-
const { code } = local;
|
|
183
|
-
if (code.startsWith(codePrefix.value)) return code.slice(codePrefix.value.length);
|
|
184
|
-
return code;
|
|
185
|
-
},
|
|
186
|
-
set: (val: string) => {
|
|
187
|
-
const cleaned = val.replace(/\D/g, "").slice(0, 3);
|
|
188
|
-
local.code = codePrefix.value + cleaned;
|
|
189
|
-
},
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
const codeError = computed<CodeValidationError | null>(() => {
|
|
193
|
-
const result = validateCodeField(local, props.existingAccounts, props.isNew);
|
|
194
|
-
if (result === "emptyCode" && !codeTouched.value) return null;
|
|
195
|
-
return result;
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
const nameError = computed<NameValidationError | null>(() => {
|
|
199
|
-
const result = validateNameField(local, props.existingAccounts, props.isNew);
|
|
200
|
-
// For NEW accounts the empty-name field is invalid from the moment
|
|
201
|
-
// the editor opens — flag it red right away to communicate the
|
|
202
|
-
// requirement. For edits, the name is non-empty on open; only flag
|
|
203
|
-
// emptyName once the user has actively cleared it (post-touch).
|
|
204
|
-
if (result === "emptyName" && !nameTouched.value && !props.isNew) return null;
|
|
205
|
-
return result;
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
const fieldErrorMessage = computed<string | null>(() => {
|
|
209
|
-
const code = codeError.value;
|
|
210
|
-
if (code !== null) return t(VALIDATION_MESSAGE_KEYS[code]);
|
|
211
|
-
const name = nameError.value;
|
|
212
|
-
if (name !== null) return t(VALIDATION_MESSAGE_KEYS[name]);
|
|
213
|
-
return null;
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// Re-sync when the parent swaps which account is being edited
|
|
217
|
-
// (e.g. user clicks Edit on a different row without first
|
|
218
|
-
// cancelling). Single watcher rather than per-field copy to keep
|
|
219
|
-
// behaviour boringly predictable.
|
|
220
|
-
watch(
|
|
221
|
-
() => props.draft,
|
|
222
|
-
(next) => {
|
|
223
|
-
local.code = next.code;
|
|
224
|
-
local.name = next.name;
|
|
225
|
-
local.type = next.type;
|
|
226
|
-
local.note = next.note;
|
|
227
|
-
codeTouched.value = false;
|
|
228
|
-
nameTouched.value = false;
|
|
229
|
-
},
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
onMounted(() => {
|
|
233
|
-
// Land the cursor in the field the user actually has to fill in:
|
|
234
|
-
// - new accounts: code is suggested and type is locked, so
|
|
235
|
-
// Name is the only non-decorative input.
|
|
236
|
-
// - edits: code is disabled, type is rarely the reason for
|
|
237
|
-
// editing — Name is still the most likely target. Keeping
|
|
238
|
-
// focus consistent across new/edit avoids surprise.
|
|
239
|
-
void nextTick(() => nameInput.value?.focus());
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
function onSubmit(): void {
|
|
243
|
-
// Surface any latent empty-required errors that were suppressed
|
|
244
|
-
// pre-touch — clicking Save is intent enough to want the red
|
|
245
|
-
// border, even if the user never typed in the field.
|
|
246
|
-
codeTouched.value = true;
|
|
247
|
-
nameTouched.value = true;
|
|
248
|
-
emit("save", { code: local.code, name: local.name, type: local.type, note: local.note });
|
|
249
|
-
}
|
|
250
|
-
</script>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- One row in the AccountsModal list. Read-only display + an
|
|
3
|
-
active checkbox (left column) and an Edit button (right) for
|
|
4
|
-
active rows. The editor itself is AccountEditor.vue, mounted
|
|
5
|
-
in place of this row by the parent when editing. -->
|
|
6
|
-
<div :class="['flex items-center gap-2 px-2 py-0.5 text-sm', inactive ? 'opacity-60' : '']" :data-testid="`accounting-accounts-row-${account.code}`">
|
|
7
|
-
<input
|
|
8
|
-
type="checkbox"
|
|
9
|
-
:checked="!inactive"
|
|
10
|
-
:title="inactive ? t('pluginAccounting.accounts.reactivate') : t('pluginAccounting.accounts.deactivate')"
|
|
11
|
-
:aria-label="inactive ? t('pluginAccounting.accounts.reactivate') : t('pluginAccounting.accounts.deactivate')"
|
|
12
|
-
class="h-4 w-4 shrink-0 cursor-pointer"
|
|
13
|
-
:data-testid="`accounting-accounts-toggle-${account.code}`"
|
|
14
|
-
@change="emit('toggleActive')"
|
|
15
|
-
/>
|
|
16
|
-
<span class="font-mono text-xs text-gray-500 w-16 shrink-0">{{ account.code }}</span>
|
|
17
|
-
<span
|
|
18
|
-
:class="['grow min-w-0 truncate', inactive ? 'line-through' : '']"
|
|
19
|
-
:data-testid="inactive ? `accounting-accounts-inactive-${account.code}` : undefined"
|
|
20
|
-
>{{ account.name }}</span
|
|
21
|
-
>
|
|
22
|
-
<span v-if="account.note" class="text-xs text-gray-400 truncate max-w-[8rem]" :title="account.note">{{ account.note }}</span>
|
|
23
|
-
<!-- Always rendered (with `invisible` when inactive) so checking
|
|
24
|
-
and unchecking the active box doesn't shift the row width. -->
|
|
25
|
-
<button
|
|
26
|
-
type="button"
|
|
27
|
-
:class="['h-8 px-2.5 rounded text-sm text-blue-600 hover:bg-blue-50', inactive ? 'invisible' : '']"
|
|
28
|
-
:data-testid="`accounting-accounts-edit-${account.code}`"
|
|
29
|
-
:disabled="inactive"
|
|
30
|
-
:aria-hidden="inactive ? 'true' : undefined"
|
|
31
|
-
:tabindex="inactive ? -1 : undefined"
|
|
32
|
-
@click="emit('edit')"
|
|
33
|
-
>
|
|
34
|
-
{{ t("pluginAccounting.accounts.edit") }}
|
|
35
|
-
</button>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script setup lang="ts">
|
|
40
|
-
import { computed } from "vue";
|
|
41
|
-
import { useI18n } from "vue-i18n";
|
|
42
|
-
import type { Account } from "../api";
|
|
43
|
-
|
|
44
|
-
const { t } = useI18n();
|
|
45
|
-
|
|
46
|
-
const props = defineProps<{ account: Account }>();
|
|
47
|
-
const emit = defineEmits<{ edit: []; toggleActive: [] }>();
|
|
48
|
-
|
|
49
|
-
const inactive = computed(() => props.account.active === false);
|
|
50
|
-
</script>
|