visual-living-plan 0.1.0 → 2.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +213 -0
- package/README.md +155 -28
- package/dist/AuthScreen.d.ts +9 -0
- package/dist/AuthScreen.js +7 -0
- package/dist/DesktopModeSwitch.d.ts +13 -0
- package/dist/DesktopModeSwitch.js +14 -0
- package/dist/OAuthMark.d.ts +6 -0
- package/dist/OAuthMark.js +8 -0
- package/dist/accountInitials.d.ts +5 -0
- package/dist/accountInitials.js +20 -0
- package/dist/accountLinking.d.ts +26 -0
- package/dist/accountLinking.js +46 -0
- package/dist/agentEvents.d.ts +31 -0
- package/dist/agentEvents.js +260 -0
- package/dist/agentPresence.d.ts +42 -0
- package/dist/agentPresence.js +69 -0
- package/dist/agentSkills.d.ts +35 -0
- package/dist/agentSkills.js +89 -0
- package/dist/agentStream.d.ts +35 -0
- package/dist/agentStream.js +133 -0
- package/dist/appearanceDom.d.ts +13 -0
- package/dist/appearanceDom.js +24 -0
- package/dist/appearanceSettings.d.ts +29 -0
- package/dist/appearanceSettings.js +293 -0
- package/dist/assets.d.ts +14 -0
- package/dist/assets.js +72 -0
- package/dist/authSearch.d.ts +11 -0
- package/dist/authSearch.js +30 -0
- package/dist/changelog.d.ts +11 -0
- package/dist/changelog.js +63 -0
- package/dist/changelogParse.d.ts +53 -0
- package/dist/changelogParse.js +226 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1684 -0
- package/dist/cliLauncher.d.ts +40 -0
- package/dist/cliLauncher.js +170 -0
- package/dist/cliToken.d.ts +11 -0
- package/dist/cliToken.js +15 -0
- package/dist/client/.vite/manifest.json +1780 -0
- package/dist/client/assets/BarChart-DtV3dIq4.js +1 -0
- package/dist/client/assets/BlockEditor-BklSUBjk.js +168 -0
- package/dist/client/assets/BlockEditor-K5h6xc4_.css +1 -0
- package/dist/client/assets/CodeBlock-BbI08MlQ.js +1 -0
- package/dist/client/assets/CodeBlock-BxRMnldw.js +175 -0
- package/dist/client/assets/LineChart-CQYMEbD6.js +1 -0
- package/dist/client/assets/Mermaid-Ciu9eIoG.js +1 -0
- package/dist/client/assets/Mermaid-jPWLXX7e.js +1 -0
- package/dist/client/assets/Popover-DbE4vUPG.js +1 -0
- package/dist/client/assets/ReactFlowExecutionCanvas-BhVs-adc.js +7 -0
- package/dist/client/assets/ReactFlowExecutionCanvas-DLioOiRN.css +1 -0
- package/dist/client/assets/StatusIcon-C_-Lm9b4.js +1 -0
- package/dist/client/assets/Workflow-C92OpLyf.js +1 -0
- package/dist/client/assets/agentPresence-D8asHrTp.js +1 -0
- package/dist/client/assets/andromeeda-DW8vo71h.js +1 -0
- package/dist/client/assets/andromeeda-vGVdxbeo.js +1 -0
- package/dist/client/assets/arrow-up-CEVVOXD5.js +1 -0
- package/dist/client/assets/arrow-up-down-BSjnQK2I.js +1 -0
- package/dist/client/assets/aurora-x-CDeNXAV0.js +1 -0
- package/dist/client/assets/aurora-x-rMvKqtYI.js +1 -0
- package/dist/client/assets/ayu-dark-CwczpL8O.js +1 -0
- package/dist/client/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/dist/client/assets/ayu-light-C3h-C4tm.js +1 -0
- package/dist/client/assets/ayu-light-DSh22xiD.js +1 -0
- package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/dist/client/assets/ayu-mirage-JE6hAyHG.js +1 -0
- package/dist/client/assets/browserStore-BDGKYoJj.js +435 -0
- package/dist/client/assets/button-BI07wqbi.css +1 -0
- package/dist/client/assets/button-DJWAGApe.js +1 -0
- package/dist/client/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
- package/dist/client/assets/catppuccin-frappe-pyXErRRU.js +1 -0
- package/dist/client/assets/catppuccin-latte-BILSUICr.js +1 -0
- package/dist/client/assets/catppuccin-latte-CtsyrtPq.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-Ck60ZZQE.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
- package/dist/client/assets/catppuccin-mocha-C_2G67cS.js +1 -0
- package/dist/client/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
- package/dist/client/assets/ccount-nzzEXTrh.js +1 -0
- package/dist/client/assets/chartRows-CNjjLsAH.js +2 -0
- package/dist/client/assets/circle-x-BLGxA3gi.js +1 -0
- package/dist/client/assets/client-BsE_buVT.js +9 -0
- package/dist/client/assets/constants-CmGPilXJ.js +1 -0
- package/dist/client/assets/dark-plus-CHgc6GYj.js +1 -0
- package/dist/client/assets/dark-plus-Cs2F2srj.js +1 -0
- package/dist/client/assets/default-5FplaXL4.js +7 -0
- package/dist/client/assets/diffsTheme-PJJTu2Rq.js +1 -0
- package/dist/client/assets/dracula-BHWKrbxM.js +1 -0
- package/dist/client/assets/dracula-Cf1PG3MT.js +1 -0
- package/dist/client/assets/dracula-soft-5eyTD99u.js +1 -0
- package/dist/client/assets/dracula-soft-DXuNm1Kq.js +1 -0
- package/dist/client/assets/editSource-DQfw4nRm.js +1 -0
- package/dist/client/assets/editSource-U5AoD-Wo.js +14 -0
- package/dist/client/assets/engine-CLTPZlti.js +1 -0
- package/dist/client/assets/engine-DUyaiAMV.js +2 -0
- package/dist/client/assets/everforest-dark-CjdfwUBe.js +1 -0
- package/dist/client/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/dist/client/assets/everforest-light-CfVwwCBP.js +1 -0
- package/dist/client/assets/everforest-light-Df2xbC6M.js +1 -0
- package/dist/client/assets/forgetDocuments-CIUBitCs.js +1 -0
- package/dist/client/assets/formatCSSVariablePrefix-KRh9vnZf.js +1 -0
- package/dist/client/assets/github-dark-BL6HSl_n.js +1 -0
- package/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
- package/dist/client/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/dist/client/assets/github-dark-default-zacuWV-M.js +1 -0
- package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/dist/client/assets/github-dark-dimmed-Mc0P9idi.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-IMKX2AVF.js +1 -0
- package/dist/client/assets/github-light-EUqPIrTm.js +1 -0
- package/dist/client/assets/github-light-default-BXViO-2h.js +1 -0
- package/dist/client/assets/github-light-default-DVlCqP3X.js +1 -0
- package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/dist/client/assets/github-light-high-contrast-Dj6zTyWR.js +1 -0
- package/dist/client/assets/github-light-mYhEBkPo.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-QTgQQZn-.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-9d5YdCTx.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-XCkqeBhR.js +1 -0
- package/dist/client/assets/gruvbox-light-hard--5-nXqNp.js +1 -0
- package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-COA1PZW2.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-CIJpzjAO.js +1 -0
- package/dist/client/assets/hastToHtml-Dj8rXue9.js +11 -0
- package/dist/client/assets/highlight-cB-PkhyE.js +1 -0
- package/dist/client/assets/highlights-LLBF1DTm.js +1 -0
- package/dist/client/assets/horizon-Ba2cwkSy.js +1 -0
- package/dist/client/assets/horizon-CE9ld1lL.js +1 -0
- package/dist/client/assets/horizon-bright-DSNQnXHK.js +1 -0
- package/dist/client/assets/horizon-bright-DaEDgBmR.js +1 -0
- package/dist/client/assets/houston-B6x0XVpU.js +1 -0
- package/dist/client/assets/houston-CsvMBhTu.js +1 -0
- package/dist/client/assets/jsx-runtime-DKj5X9O4.js +1 -0
- package/dist/client/assets/kanagawa-dragon-Bozd7klA.js +1 -0
- package/dist/client/assets/kanagawa-dragon-DhTFvBMT.js +1 -0
- package/dist/client/assets/kanagawa-lotus--m8sdOxn.js +1 -0
- package/dist/client/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
- package/dist/client/assets/kanagawa-wave-BML5mF2J.js +1 -0
- package/dist/client/assets/kanagawa-wave-D-tTv4k2.js +1 -0
- package/dist/client/assets/laserwave-C_8bwKvT.js +1 -0
- package/dist/client/assets/laserwave-HSLx0L75.js +1 -0
- package/dist/client/assets/lib-COgu-QLX.js +33 -0
- package/dist/client/assets/lib-CdRiGVUZ.js +1 -0
- package/dist/client/assets/light-plus-CUjWrTSi.js +1 -0
- package/dist/client/assets/light-plus-DVQuIRkW.js +1 -0
- package/dist/client/assets/loader-CjL04K29.js +1 -0
- package/dist/client/assets/main-BGMX_GnZ.js +2 -0
- package/dist/client/assets/main-BTko4EvJ.css +1 -0
- package/dist/client/assets/material-theme-Bm3Qr25_.js +1 -0
- package/dist/client/assets/material-theme-CnthUGfg.js +1 -0
- package/dist/client/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/dist/client/assets/material-theme-darker-DUi03Qre.js +1 -0
- package/dist/client/assets/material-theme-lighter-D2-qr5Vw.js +1 -0
- package/dist/client/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/dist/client/assets/material-theme-ocean-CWR-LogA.js +1 -0
- package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/dist/client/assets/material-theme-palenight-Cnv8m1ra.js +1 -0
- package/dist/client/assets/mdxEntries-BNTMP8ct.css +1 -0
- package/dist/client/assets/mdxEntries-L-V7bB6i.js +1 -0
- package/dist/client/assets/mermaid-Bjhs-krb.js +1 -0
- package/dist/client/assets/mermaid-Di4j-zgD.js +146 -0
- package/dist/client/assets/min-dark-BSWPekZh.js +1 -0
- package/dist/client/assets/min-dark-EXoM-6Xo.js +1 -0
- package/dist/client/assets/min-light-DDpmG2fV.js +1 -0
- package/dist/client/assets/min-light-DVOTDhnA.js +1 -0
- package/dist/client/assets/monokai-BscAjiQZ.js +1 -0
- package/dist/client/assets/monokai-DkggTbGy.js +1 -0
- package/dist/client/assets/mountChrome-BVWpsDCy.js +122 -0
- package/dist/client/assets/mountChrome-DhTDH3YM.css +1 -0
- package/dist/client/assets/night-owl-Bdcs0PMi.js +1 -0
- package/dist/client/assets/night-owl-DhmEMT88.js +1 -0
- package/dist/client/assets/night-owl-light-RoU30LE0.js +1 -0
- package/dist/client/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/dist/client/assets/noShiki-DB8hQ_W3.js +1 -0
- package/dist/client/assets/noShiki-GTG3tT8x.js +1 -0
- package/dist/client/assets/nord-Cb4Vim4T.js +1 -0
- package/dist/client/assets/nord-u7hMircQ.js +1 -0
- package/dist/client/assets/offlineSync-Cv3FVIlJ.js +1 -0
- package/dist/client/assets/one-dark-pro-08PdtLzi.js +1 -0
- package/dist/client/assets/one-dark-pro-C6YyR8OD.js +1 -0
- package/dist/client/assets/one-light-D7Lr4KcI.js +1 -0
- package/dist/client/assets/one-light-DgvUEtgI.js +1 -0
- package/dist/client/assets/opfs-worker-DuTOCgWR.js +5919 -0
- package/dist/client/assets/pierre-dark-B2jZWvHG.js +1 -0
- package/dist/client/assets/pierre-dark-CpLgRqie.js +1 -0
- package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
- package/dist/client/assets/pierre-dark-protanopia-deuteranopia-CebgQdRf.js +1 -0
- package/dist/client/assets/pierre-dark-soft-DdE7dyP3.js +1 -0
- package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +1 -0
- package/dist/client/assets/pierre-dark-tritanopia-CXimiT7X.js +1 -0
- package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
- package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
- package/dist/client/assets/pierre-dark-vibrant-DzBsxHvQ.js +1 -0
- package/dist/client/assets/pierre-light-CoaEpmwp.js +1 -0
- package/dist/client/assets/pierre-light-Vf__O3ev.js +1 -0
- package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
- package/dist/client/assets/pierre-light-protanopia-deuteranopia-BUtWcCQC.js +1 -0
- package/dist/client/assets/pierre-light-soft-C3QCXKvN.js +1 -0
- package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +1 -0
- package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
- package/dist/client/assets/pierre-light-tritanopia-CKLy6XvA.js +1 -0
- package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
- package/dist/client/assets/pierre-light-vibrant-DDuTEIhH.js +1 -0
- package/dist/client/assets/planEditButton-CbWGczbi.js +45 -0
- package/dist/client/assets/planEvents-cuzv9ELr.js +1 -0
- package/dist/client/assets/planMdx-Db1ze_nN.js +110 -0
- package/dist/client/assets/plastic-B8mE6BxX.js +1 -0
- package/dist/client/assets/plastic-DQwYfKfQ.js +1 -0
- package/dist/client/assets/poimandres-DRFjx7u4.js +1 -0
- package/dist/client/assets/poimandres-DUFjrgxT.js +1 -0
- package/dist/client/assets/preload-helper-Dx0-lKy1.js +1 -0
- package/dist/client/assets/queryClient-Bs5tSUJh.js +1 -0
- package/dist/client/assets/react-dom-DpzJPrWF.js +1 -0
- package/dist/client/assets/rebaseDraft-B2--cj1c.js +19 -0
- package/dist/client/assets/red-BJvdDEUx.js +1 -0
- package/dist/client/assets/red-CYlAq2b0.js +1 -0
- package/dist/client/assets/register-hZEIk3A9.css +1 -0
- package/dist/client/assets/register-htm5s8o9.js +1 -0
- package/dist/client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/dist/client/assets/rose-pine-BSqRqUae.js +1 -0
- package/dist/client/assets/rose-pine-aMsaMD1D.js +1 -0
- package/dist/client/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
- package/dist/client/assets/rose-pine-dawn-U6TBE82u.js +1 -0
- package/dist/client/assets/rose-pine-moon-CAU7u1h4.js +1 -0
- package/dist/client/assets/rose-pine-moon-DO-qXg-I.js +1 -0
- package/dist/client/assets/routeEdges-B2z8v0di.js +24 -0
- package/dist/client/assets/selector-CDsXW7SO.css +1 -0
- package/dist/client/assets/selector-tlBGWtQl.js +1 -0
- package/dist/client/assets/settingsChrome-NGUDtEIp.js +1 -0
- package/dist/client/assets/shiki-BOXJeUHI.js +2 -0
- package/dist/client/assets/slack-dark-CMu0smFa.js +1 -0
- package/dist/client/assets/slack-dark-DnToyrRv.js +1 -0
- package/dist/client/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/dist/client/assets/slack-ochin-BBne7cjw.js +1 -0
- package/dist/client/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/dist/client/assets/snazzy-light-CV8HUEmk.js +1 -0
- package/dist/client/assets/solarized-dark-CmYmhSgI.js +1 -0
- package/dist/client/assets/solarized-dark-b97czJOk.js +1 -0
- package/dist/client/assets/solarized-light-CjLLwxRp.js +1 -0
- package/dist/client/assets/solarized-light-DFPxpIYQ.js +1 -0
- package/dist/client/assets/stampPlanParts-DVXYCykw.js +15 -0
- package/dist/client/assets/stampPlanParts-ctZzxWdw.css +1 -0
- package/dist/client/assets/stream-tokenizer-C3n8hi1h.js +4 -0
- package/dist/client/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/dist/client/assets/synthwave-84-wQeDKbzQ.js +1 -0
- package/dist/client/assets/textChildren-ZDSs1dod.js +1 -0
- package/dist/client/assets/themes-CdTJhjZf.js +2 -0
- package/dist/client/assets/tokyo-night-D4ZgDiA7.js +1 -0
- package/dist/client/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/dist/client/assets/triangle-alert-C9Sgr3jF.js +1 -0
- package/dist/client/assets/unwrapDefault-ByDmBtHB.js +1 -0
- package/dist/client/assets/utils-C9Glzetk.js +2 -0
- package/dist/client/assets/versionView-zkSROPw7.js +1 -0
- package/dist/client/assets/vesper-DdrHHSXu.js +1 -0
- package/dist/client/assets/vesper-sUHevyKv.js +1 -0
- package/dist/client/assets/vitesse-black-CfklMpOb.js +1 -0
- package/dist/client/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/dist/client/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/dist/client/assets/vitesse-dark-CJkzwmKT.js +1 -0
- package/dist/client/assets/vitesse-light-BxMp8E1Y.js +1 -0
- package/dist/client/assets/vitesse-light-VbXTXTou.js +1 -0
- package/dist/client/assets/wa-sqlite-Ba70bhIr.wasm +0 -0
- package/dist/client/assets/warmPlans-CYFrLwcX.js +1 -0
- package/dist/client/assets/with-selector-HIcjK0_d.js +1 -0
- package/dist/client/assets/workflowSource-LMsRuqF_.js +3 -0
- package/dist/client/favicon.png +0 -0
- package/dist/client/icons/apple-touch-icon-180x180.png +0 -0
- package/dist/client/icons/favicon.ico +0 -0
- package/dist/client/icons/maskable-icon-192x192.png +0 -0
- package/dist/client/icons/maskable-icon-512x512.png +0 -0
- package/dist/client/icons/pwa-16x16.png +0 -0
- package/dist/client/icons/pwa-192x192.png +0 -0
- package/dist/client/icons/pwa-32x32.png +0 -0
- package/dist/client/icons/pwa-512x512.png +0 -0
- package/dist/client/icons/pwa-64x64.png +0 -0
- package/dist/clientLog.d.ts +5 -0
- package/dist/clientLog.js +64 -0
- package/dist/cloudClient.d.ts +38 -0
- package/dist/cloudClient.js +185 -0
- package/dist/cloudCommand.d.ts +23 -0
- package/dist/cloudCommand.js +159 -0
- package/dist/cloudFrontmatter.d.ts +4 -0
- package/dist/cloudFrontmatter.js +30 -0
- package/dist/cloudStore.d.ts +28 -0
- package/dist/cloudStore.js +70 -0
- package/dist/cloudWatch.d.ts +12 -0
- package/dist/cloudWatch.js +103 -0
- package/dist/commentReply.d.ts +25 -0
- package/dist/commentReply.js +17 -0
- package/dist/configHome.d.ts +34 -0
- package/dist/configHome.js +136 -0
- package/dist/dashboard.d.ts +67 -0
- package/dist/dashboard.js +86 -0
- package/dist/dashboardClientScript.d.ts +2 -0
- package/dist/dashboardClientScript.js +1006 -0
- package/dist/dashboardDocument.d.ts +13 -0
- package/dist/dashboardDocument.js +40 -0
- package/dist/dashboardFormat.d.ts +98 -0
- package/dist/dashboardFormat.js +199 -0
- package/dist/dashboardLoading.d.ts +19 -0
- package/dist/dashboardLoading.js +94 -0
- package/dist/dashboardOverview.d.ts +28 -0
- package/dist/dashboardOverview.js +333 -0
- package/dist/dashboardPage.d.ts +2 -0
- package/dist/dashboardPage.js +11 -0
- package/dist/dashboardParts.d.ts +4 -0
- package/dist/dashboardParts.js +367 -0
- package/dist/dashboardSearchView.d.ts +38 -0
- package/dist/dashboardSearchView.js +255 -0
- package/dist/desktopApp.d.ts +23 -0
- package/dist/desktopApp.js +110 -0
- package/dist/desktopBridge.d.ts +21 -0
- package/dist/desktopBridge.js +78 -0
- package/dist/desktopCommand.d.ts +61 -0
- package/dist/desktopCommand.js +172 -0
- package/dist/desktopConfig.d.ts +54 -0
- package/dist/desktopConfig.js +164 -0
- package/dist/desktopNotices.d.ts +105 -0
- package/dist/desktopNotices.js +427 -0
- package/dist/diff.d.ts +2 -0
- package/dist/diff.js +46 -0
- package/dist/diffsTheme.d.ts +51 -0
- package/dist/diffsTheme.js +86 -0
- package/dist/diffsThemeCatalog.d.ts +3 -0
- package/dist/diffsThemeCatalog.js +78 -0
- package/dist/elkRuntime.node.d.ts +7 -0
- package/dist/elkRuntime.node.js +63 -0
- package/dist/execution.d.ts +78 -0
- package/dist/execution.js +139 -0
- package/dist/expectedWorkflow.d.ts +11 -0
- package/dist/expectedWorkflow.js +99 -0
- package/dist/favicon.d.ts +4 -0
- package/dist/favicon.js +40 -0
- package/dist/favicon.png +0 -0
- package/dist/faviconBase64.d.ts +1 -0
- package/dist/faviconBase64.js +1 -0
- package/dist/fileVersion.d.ts +8 -0
- package/dist/fileVersion.js +20 -0
- package/dist/formatBytes.d.ts +2 -0
- package/dist/formatBytes.js +13 -0
- package/dist/gitStatus.d.ts +12 -0
- package/dist/gitStatus.js +88 -0
- package/dist/hostToolbar.d.ts +38 -0
- package/dist/hostToolbar.js +249 -0
- package/dist/http.d.ts +8 -0
- package/dist/http.js +38 -0
- package/dist/httpServer.d.ts +13 -0
- package/dist/httpServer.js +40 -0
- package/dist/icons/apple-touch-icon-180x180.png +0 -0
- package/dist/icons/favicon.ico +0 -0
- package/dist/icons/maskable-icon-192x192.png +0 -0
- package/dist/icons/maskable-icon-512x512.png +0 -0
- package/dist/icons/pwa-16x16.png +0 -0
- package/dist/icons/pwa-192x192.png +0 -0
- package/dist/icons/pwa-32x32.png +0 -0
- package/dist/icons/pwa-512x512.png +0 -0
- package/dist/icons/pwa-64x64.png +0 -0
- package/dist/lanAccess.d.ts +31 -0
- package/dist/lanAccess.js +110 -0
- package/dist/lanAddress.d.ts +24 -0
- package/dist/lanAddress.js +174 -0
- package/dist/lanCommand.d.ts +25 -0
- package/dist/lanCommand.js +159 -0
- package/dist/lanConfig.d.ts +40 -0
- package/dist/lanConfig.js +130 -0
- package/dist/lanFirewall.d.ts +17 -0
- package/dist/lanFirewall.js +221 -0
- package/dist/layoutGraph.d.ts +13 -0
- package/dist/layoutGraph.js +55 -0
- package/dist/localName.d.ts +9 -0
- package/dist/localName.js +28 -0
- package/dist/lockBanner.d.ts +2 -0
- package/dist/lockBanner.js +2 -0
- package/dist/mdnsPacket.d.ts +44 -0
- package/dist/mdnsPacket.js +384 -0
- package/dist/mdnsPublish.d.ts +12 -0
- package/dist/mdnsPublish.js +290 -0
- package/dist/offlineSync.d.ts +249 -0
- package/dist/offlineSync.js +477 -0
- package/dist/openUrl.d.ts +40 -0
- package/dist/openUrl.js +147 -0
- package/dist/openedPages.d.ts +14 -0
- package/dist/openedPages.js +48 -0
- package/dist/pageEditPull.d.ts +9 -0
- package/dist/pageEditPull.js +29 -0
- package/dist/pageRoutes.d.ts +3 -0
- package/dist/pageRoutes.js +34 -0
- package/dist/parse.d.ts +7 -0
- package/dist/parse.js +100 -0
- package/dist/pid.d.ts +2 -0
- package/dist/pid.js +13 -0
- package/dist/planArchive.d.ts +4 -0
- package/dist/planArchive.js +28 -0
- package/dist/planEntries.d.ts +12 -0
- package/dist/planEntries.js +117 -0
- package/dist/planHost.d.ts +31 -0
- package/dist/planHost.js +286 -0
- package/dist/planId.d.ts +2 -0
- package/dist/planId.js +6 -0
- package/dist/planMdx/blockEdit.d.ts +41 -0
- package/dist/planMdx/blockEdit.js +60 -0
- package/dist/planMdx/cellPart.d.ts +14 -0
- package/dist/planMdx/cellPart.js +26 -0
- package/dist/planMdx/compilePlanMdx.d.ts +3 -0
- package/dist/planMdx/compilePlanMdx.js +22 -0
- package/dist/planMdx/editSource.d.ts +39 -0
- package/dist/planMdx/editSource.js +327 -0
- package/dist/planMdx/frontmatter.d.ts +5 -0
- package/dist/planMdx/frontmatter.js +15 -0
- package/dist/planMdx/markdown.d.ts +6 -0
- package/dist/planMdx/markdown.js +470 -0
- package/dist/planMdx/outline.d.ts +8 -0
- package/dist/planMdx/outline.js +548 -0
- package/dist/planMdx/payload.d.ts +4 -0
- package/dist/planMdx/payload.js +18 -0
- package/dist/planMdx/rebaseDraft.d.ts +54 -0
- package/dist/planMdx/rebaseDraft.js +675 -0
- package/dist/planMdx/recmaPlanComponents.d.ts +18 -0
- package/dist/planMdx/recmaPlanComponents.js +52 -0
- package/dist/planMdx/remarkBlockRanges.d.ts +104 -0
- package/dist/planMdx/remarkBlockRanges.js +275 -0
- package/dist/planMdx/remarkCodeMeta.d.ts +16 -0
- package/dist/planMdx/remarkCodeMeta.js +25 -0
- package/dist/planMdx/remarkGfmTable.d.ts +5 -0
- package/dist/planMdx/remarkGfmTable.js +15 -0
- package/dist/planMdx/remarkGfmTaskList.d.ts +5 -0
- package/dist/planMdx/remarkGfmTaskList.js +15 -0
- package/dist/planMdx/remarkMermaid.d.ts +16 -0
- package/dist/planMdx/remarkMermaid.js +56 -0
- package/dist/planMdx/source.d.ts +11 -0
- package/dist/planMdx/source.js +131 -0
- package/dist/planMdx/titleEdit.d.ts +35 -0
- package/dist/planMdx/titleEdit.js +112 -0
- package/dist/planPage.css +2125 -0
- package/dist/planProgress.d.ts +17 -0
- package/dist/planProgress.js +78 -0
- package/dist/planReady.d.ts +8 -0
- package/dist/planReady.js +20 -0
- package/dist/planRefNavigation.d.ts +4 -0
- package/dist/planRefNavigation.js +8 -0
- package/dist/planRoutes.d.ts +12 -0
- package/dist/planRoutes.js +141 -0
- package/dist/planSearch.d.ts +166 -0
- package/dist/planSearch.js +462 -0
- package/dist/planSession.d.ts +130 -0
- package/dist/planSession.js +1182 -0
- package/dist/planSnapshots.d.ts +34 -0
- package/dist/planSnapshots.js +113 -0
- package/dist/planStatus.d.ts +26 -0
- package/dist/planStatus.js +46 -0
- package/dist/planStepHeading.d.ts +16 -0
- package/dist/planStepHeading.js +34 -0
- package/dist/planTarget.d.ts +16 -0
- package/dist/planTarget.js +92 -0
- package/dist/planToc.d.ts +24 -0
- package/dist/planToc.js +258 -0
- package/dist/planVersionMenu.d.ts +12 -0
- package/dist/planVersionMenu.js +23 -0
- package/dist/processRecord.d.ts +108 -0
- package/dist/processRecord.js +68 -0
- package/dist/processesPanel.d.ts +7 -0
- package/dist/processesPanel.js +636 -0
- package/dist/pwaIconFile.d.ts +2 -0
- package/dist/pwaIconFile.js +42 -0
- package/dist/pwaIcons.d.ts +28 -0
- package/dist/pwaIcons.js +46 -0
- package/dist/registerServiceWorker.d.ts +25 -0
- package/dist/registerServiceWorker.js +26 -0
- package/dist/registryClient.d.ts +94 -0
- package/dist/registryClient.js +490 -0
- package/dist/registryConstants.d.ts +9 -0
- package/dist/registryConstants.js +9 -0
- package/dist/registryLock.d.ts +19 -0
- package/dist/registryLock.js +48 -0
- package/dist/registryPage.d.ts +2 -0
- package/dist/registryPage.js +284 -0
- package/dist/registryService.d.ts +21 -0
- package/dist/registryService.js +562 -0
- package/dist/registryStore.d.ts +63 -0
- package/dist/registryStore.js +398 -0
- package/dist/releaseNotes.d.ts +35 -0
- package/dist/releaseNotes.js +62 -0
- package/dist/render.d.ts +50 -0
- package/dist/render.js +1506 -0
- package/dist/requestGuard.d.ts +21 -0
- package/dist/requestGuard.js +42 -0
- package/dist/reviewRound.d.ts +12 -0
- package/dist/reviewRound.js +19 -0
- package/dist/runFollow.d.ts +28 -0
- package/dist/runFollow.js +33 -0
- package/dist/searchMatch.d.ts +35 -0
- package/dist/searchMatch.js +270 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.js +114 -0
- package/dist/serviceLog.d.ts +56 -0
- package/dist/serviceLog.js +481 -0
- package/dist/shellCache.d.ts +69 -0
- package/dist/shellCache.js +289 -0
- package/dist/shellWorker.js +322 -0
- package/dist/shellWorkerResponse.d.ts +4 -0
- package/dist/shellWorkerResponse.js +15 -0
- package/dist/startServer.d.ts +2 -0
- package/dist/startServer.js +2 -0
- package/dist/store/meta.d.ts +53 -0
- package/dist/store/meta.js +140 -0
- package/dist/store/migrate.d.ts +3 -0
- package/dist/store/migrate.js +408 -0
- package/dist/store/rows.d.ts +4 -0
- package/dist/store/rows.js +100 -0
- package/dist/store/schema.d.ts +5 -0
- package/dist/store/schema.js +5 -0
- package/dist/store/sqlite.d.ts +19 -0
- package/dist/store/sqlite.js +57 -0
- package/dist/store/tables.d.ts +1892 -0
- package/dist/store/tables.js +136 -0
- package/dist/theme.d.ts +174 -0
- package/dist/theme.js +444 -0
- package/dist/themeBootstrap.d.ts +2 -0
- package/dist/themeBootstrap.js +11 -0
- package/dist/tui/DashboardApp.d.ts +19 -0
- package/dist/tui/DashboardApp.js +237 -0
- package/dist/tui/PaletteProvider.d.ts +12 -0
- package/dist/tui/PaletteProvider.js +36 -0
- package/dist/tui/PlanActions.d.ts +7 -0
- package/dist/tui/PlanActions.js +9 -0
- package/dist/tui/PlanCard.d.ts +13 -0
- package/dist/tui/PlanCard.js +31 -0
- package/dist/tui/PlanRow.d.ts +13 -0
- package/dist/tui/PlanRow.js +31 -0
- package/dist/tui/PlanTable.d.ts +13 -0
- package/dist/tui/PlanTable.js +24 -0
- package/dist/tui/ProcessCard.d.ts +9 -0
- package/dist/tui/ProcessCard.js +24 -0
- package/dist/tui/ProcessList.d.ts +9 -0
- package/dist/tui/ProcessList.js +12 -0
- package/dist/tui/SegmentButton.d.ts +7 -0
- package/dist/tui/SegmentButton.js +18 -0
- package/dist/tui/StatCard.d.ts +6 -0
- package/dist/tui/StatCard.js +17 -0
- package/dist/tui/dashboardView.d.ts +45 -0
- package/dist/tui/dashboardView.js +192 -0
- package/dist/tui/openExternal.d.ts +2 -0
- package/dist/tui/openExternal.js +5 -0
- package/dist/tui/palette.d.ts +27 -0
- package/dist/tui/palette.js +66 -0
- package/dist/tui/planColumns.d.ts +38 -0
- package/dist/tui/planColumns.js +14 -0
- package/dist/tui/readDashboard.d.ts +3 -0
- package/dist/tui/readDashboard.js +15 -0
- package/dist/tui/readProcesses.d.ts +3 -0
- package/dist/tui/readProcesses.js +23 -0
- package/dist/tui/registryView.d.ts +11 -0
- package/dist/tui/registryView.js +56 -0
- package/dist/tui/runTui.d.ts +21 -0
- package/dist/tui/runTui.js +86 -0
- package/dist/tui/systemTheme.d.ts +28 -0
- package/dist/tui/systemTheme.js +141 -0
- package/dist/types.d.ts +191 -0
- package/dist/types.js +0 -0
- package/dist/webManifest.d.ts +39 -0
- package/dist/webManifest.js +48 -0
- package/dist/workflow.d.ts +8 -0
- package/dist/workflow.js +42 -0
- package/dist/workflowLayoutShared.d.ts +25 -0
- package/dist/workflowLayoutShared.js +33 -0
- package/dist/workflowSource.d.ts +31 -0
- package/dist/workflowSource.js +90 -0
- package/docs/changelogs/changelog-2026-10-27.md +203 -0
- package/docs/changelogs/changelog-2026-10-28.md +181 -0
- package/docs/changelogs/changelog-2026-10-29.md +349 -0
- package/docs/changelogs/changelog-2026-10-30.md +303 -0
- package/docs/changelogs/changelog-2026-10-31.md +129 -0
- package/docs/changelogs/changelog-2026-11-01.md +155 -0
- package/docs/changelogs/changelog-2026-11-02.md +195 -0
- package/docs/changelogs/changelog-2026-11-03.md +209 -0
- package/docs/changelogs/changelog-2026-11-04.md +243 -0
- package/docs/changelogs/changelog-2026-11-05.md +172 -0
- package/docs/changelogs/changelog-2026-11-06.md +123 -0
- package/docs/changelogs/changelog-2026-11-07.md +138 -0
- package/docs/changelogs/changelog-2026-11-08.md +47 -0
- package/docs/changelogs/changelog-2026-11-10.md +219 -0
- package/docs/changelogs/changelog-2026-11-11.md +205 -0
- package/docs/changelogs/changelog-2026-11-12.md +44 -0
- package/docs/changelogs/changelog-2026-11-13.md +48 -0
- package/docs/changelogs/changelog-2026-11-14.md +116 -0
- package/docs/changelogs/changelog-2026-11-15.md +31 -0
- package/docs/changelogs/changelog-2026-11-16.md +41 -0
- package/docs/changelogs/changelog-2026-11-17.md +25 -0
- package/docs/changelogs/changelog-2026-11-18.md +71 -0
- package/docs/changelogs/changelog-2026-11-19.md +19 -0
- package/examples/cloud-showcase.plan.md +181 -0
- package/examples/component-showcase.plan.md +378 -0
- package/examples/component-tour.plan.md +168 -0
- package/examples/data-table.plan.md +917 -0
- package/examples/execution-graph.json +15 -5
- package/examples/form-controls.plan.md +51 -0
- package/examples/live-plan.config.json +5 -0
- package/examples/rate-limit.plan.md +110 -78
- package/examples/submission-delivery-runbook.md +122 -0
- package/examples/submission-delivery.plan.md +107 -0
- package/examples/tables.plan.md +61 -0
- package/package.json +86 -15
- package/skills/live-plan/SKILL.md +381 -0
- package/skills/live-plan/primitives.md +738 -0
- package/skills/living-plan/SKILL.md +0 -71
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ExecutionState } from './execution';
|
|
2
|
+
import type { CompletionState } from './processRecord';
|
|
3
|
+
import type { PlanDocument } from './types';
|
|
4
|
+
export type PlanProgress = {
|
|
5
|
+
phaseTotal: number;
|
|
6
|
+
phaseDone: number;
|
|
7
|
+
interactionTotal: number;
|
|
8
|
+
interactionDone: number;
|
|
9
|
+
completionRatio: number;
|
|
10
|
+
completionState: CompletionState;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Completion counts phases and interactions. A done phase or an answered interaction is one unit, and an active phase
|
|
14
|
+
* is half a unit. While a live run is pushed, a step linked to a phase moves that phase forward, and a step linked to
|
|
15
|
+
* no phase or interaction counts as its own unit.
|
|
16
|
+
*/
|
|
17
|
+
export declare function measurePlan(plan: PlanDocument, answered: Iterable<string>, execution?: ExecutionState): PlanProgress;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { furthestStatus, mergePlannedExecution } from './execution';
|
|
2
|
+
import { planEntries } from './planEntries';
|
|
3
|
+
// Not ./workflow: its layout needs ELK, which a Worker cannot load. Progress needs no positions.
|
|
4
|
+
import { buildExpectedGraph } from './expectedWorkflow';
|
|
5
|
+
/** How much of one unit of work a status is worth. An active step is half done. */
|
|
6
|
+
const STATUS_WEIGHT = {
|
|
7
|
+
pending: 0,
|
|
8
|
+
active: 0.5,
|
|
9
|
+
blocked: 0,
|
|
10
|
+
failed: 0,
|
|
11
|
+
done: 1,
|
|
12
|
+
};
|
|
13
|
+
/** The further along of two statuses, so a run never moves a phase backwards. */
|
|
14
|
+
function furthest(left, right) {
|
|
15
|
+
return furthestStatus(left, right) ?? left;
|
|
16
|
+
}
|
|
17
|
+
/** Steps of the live run, with each step's plan block resolved through the plan's workflow. */
|
|
18
|
+
function liveSteps(plan, execution) {
|
|
19
|
+
const live = execution?.graph?.nodes;
|
|
20
|
+
if (!live || live.length === 0)
|
|
21
|
+
return [];
|
|
22
|
+
const liveIds = new Set(live.map((node) => node.id));
|
|
23
|
+
const merged = mergePlannedExecution(buildExpectedGraph(plan), execution?.graph);
|
|
24
|
+
return (merged?.nodes ?? []).filter((node) => liveIds.has(node.id));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Completion counts phases and interactions. A done phase or an answered interaction is one unit, and an active phase
|
|
28
|
+
* is half a unit. While a live run is pushed, a step linked to a phase moves that phase forward, and a step linked to
|
|
29
|
+
* no phase or interaction counts as its own unit.
|
|
30
|
+
*/
|
|
31
|
+
export function measurePlan(plan, answered, execution) {
|
|
32
|
+
const phases = planEntries(plan).filter((entry) => entry.type === 'phase');
|
|
33
|
+
const phaseIds = new Set(phases.flatMap((phase) => (phase.id ? [phase.id] : [])));
|
|
34
|
+
const interactionIds = new Set(plan.interactionIds);
|
|
35
|
+
const runStatus = new Map();
|
|
36
|
+
const looseSteps = [];
|
|
37
|
+
for (const step of liveSteps(plan, execution)) {
|
|
38
|
+
const ref = step.planRef ?? step.id;
|
|
39
|
+
if (phaseIds.has(ref)) {
|
|
40
|
+
const status = step.status ?? 'pending';
|
|
41
|
+
runStatus.set(ref, furthest(runStatus.get(ref) ?? 'pending', status));
|
|
42
|
+
}
|
|
43
|
+
else if (!interactionIds.has(ref)) {
|
|
44
|
+
looseSteps.push(step.status ?? 'pending');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const statuses = phases.map((phase) => furthest(phase.status ?? 'pending', phase.id ? runStatus.get(phase.id) : undefined));
|
|
48
|
+
const phaseTotal = phases.length;
|
|
49
|
+
const phaseDone = statuses.filter((status) => status === 'done').length;
|
|
50
|
+
const phaseActive = [...statuses, ...looseSteps].some((status) => status === 'active' || status === 'blocked');
|
|
51
|
+
const answeredIds = new Set(answered);
|
|
52
|
+
const interactionTotal = plan.interactionIds.length;
|
|
53
|
+
const interactionDone = plan.interactionIds.filter((id) => answeredIds.has(id)).length;
|
|
54
|
+
const total = phaseTotal + interactionTotal + looseSteps.length;
|
|
55
|
+
const done = statuses.reduce((sum, status) => sum + STATUS_WEIGHT[status], 0) +
|
|
56
|
+
interactionDone +
|
|
57
|
+
looseSteps.reduce((sum, status) => sum + STATUS_WEIGHT[status], 0);
|
|
58
|
+
const finished = total > 0 && done >= total;
|
|
59
|
+
// Only a finished plan reads 100%. Anything started reads at least 1%.
|
|
60
|
+
const completionRatio = total === 0 ? 0 : finished ? 100 : Math.min(99, Math.max(done > 0 ? 1 : 0, Math.round((done / total) * 100)));
|
|
61
|
+
let completionState;
|
|
62
|
+
if (total === 0 || (done === 0 && !phaseActive))
|
|
63
|
+
completionState = 'idle';
|
|
64
|
+
else if (finished)
|
|
65
|
+
completionState = 'complete';
|
|
66
|
+
else if (phaseActive)
|
|
67
|
+
completionState = 'in_progress';
|
|
68
|
+
else
|
|
69
|
+
completionState = 'partial';
|
|
70
|
+
return {
|
|
71
|
+
phaseTotal,
|
|
72
|
+
phaseDone,
|
|
73
|
+
interactionTotal,
|
|
74
|
+
interactionDone,
|
|
75
|
+
completionRatio,
|
|
76
|
+
completionState,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why this plan source should not reach the page yet, or undefined when it can.
|
|
3
|
+
*
|
|
4
|
+
* An agent edit can land half written, or leave a tag open. The page compiles the plan as MDX
|
|
5
|
+
* the same way, so a source that fails here would replace the plan with an error. The watchers
|
|
6
|
+
* keep the last good source until the file is fixed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function planNotReadyReason(source: string): Promise<string | undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { compilePlanMdx } from './planMdx/compilePlanMdx';
|
|
2
|
+
import { planSourceToMdx } from './planMdx/source';
|
|
3
|
+
/**
|
|
4
|
+
* Why this plan source should not reach the page yet, or undefined when it can.
|
|
5
|
+
*
|
|
6
|
+
* An agent edit can land half written, or leave a tag open. The page compiles the plan as MDX
|
|
7
|
+
* the same way, so a source that fails here would replace the plan with an error. The watchers
|
|
8
|
+
* keep the last good source until the file is fixed.
|
|
9
|
+
*/
|
|
10
|
+
export async function planNotReadyReason(source) {
|
|
11
|
+
if (!source.trim())
|
|
12
|
+
return 'The plan file is empty.';
|
|
13
|
+
try {
|
|
14
|
+
await compilePlanMdx(planSourceToMdx(source));
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
return error instanceof Error && error.message ? error.message : 'The plan does not compile.';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Hash for the plan section a workflow node or in-plan reference points at. */
|
|
2
|
+
export function planRefHash(ref) {
|
|
3
|
+
return `#${encodeURIComponent(`plan-${ref}`)}`;
|
|
4
|
+
}
|
|
5
|
+
/** Hash for the workflow diagram step a plan phase points at. */
|
|
6
|
+
export function workflowStepHash(ref) {
|
|
7
|
+
return `#workflow/${encodeURIComponent(ref)}`;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PlanSession } from './planSession';
|
|
2
|
+
export type PlanRouteOptions = {
|
|
3
|
+
hosted: boolean;
|
|
4
|
+
resolve: (id: string | undefined) => PlanSession | undefined;
|
|
5
|
+
/** Hosted agent streams require the plan token or the service token. */
|
|
6
|
+
authorizeAgent?: (request: Request, session: PlanSession) => boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Elysia's route generics make a shared plugin painful to type, so this registers
|
|
10
|
+
* the plan handlers on the app instance the caller already created.
|
|
11
|
+
*/
|
|
12
|
+
export declare function registerPlanRoutes(app: any, options: PlanRouteOptions): any;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { faviconResponse } from './favicon';
|
|
2
|
+
import { readShellWorkerSource, shellWorkerResponse } from './shellWorkerResponse';
|
|
3
|
+
import { pwaIconResponse } from './pwaIconFile';
|
|
4
|
+
import { WEB_MANIFEST_PATH, webManifestResponse } from './webManifest';
|
|
5
|
+
import { HttpError, jsonBody } from './http';
|
|
6
|
+
import { acceptClientLog, readLogs } from './serviceLog';
|
|
7
|
+
import { readClientAsset } from './planSession';
|
|
8
|
+
const ID_PATTERN = /^[A-Za-z0-9_-]{8,80}$/;
|
|
9
|
+
/**
|
|
10
|
+
* Elysia's route generics make a shared plugin painful to type, so this registers
|
|
11
|
+
* the plan handlers on the app instance the caller already created.
|
|
12
|
+
*/
|
|
13
|
+
export function registerPlanRoutes(app, options) {
|
|
14
|
+
const sessionFor = (id) => {
|
|
15
|
+
if (options.hosted) {
|
|
16
|
+
if (!id || !ID_PATTERN.test(id))
|
|
17
|
+
throw new HttpError(404, 'Not found');
|
|
18
|
+
const session = options.resolve(id);
|
|
19
|
+
if (!session)
|
|
20
|
+
throw new HttpError(404, 'Plan not found');
|
|
21
|
+
return session;
|
|
22
|
+
}
|
|
23
|
+
const session = options.resolve(undefined);
|
|
24
|
+
if (!session)
|
|
25
|
+
throw new HttpError(404, 'Plan not found');
|
|
26
|
+
return session;
|
|
27
|
+
};
|
|
28
|
+
const route = (suffix) => (options.hosted ? `/plans/:id${suffix}` : suffix);
|
|
29
|
+
const idOf = (context) => context.params?.id;
|
|
30
|
+
async function clientAsset(context, session) {
|
|
31
|
+
if (session)
|
|
32
|
+
session.touch();
|
|
33
|
+
const response = await readClientAsset(String(context.params?.['*'] ?? ''));
|
|
34
|
+
if (!response) {
|
|
35
|
+
context.set.status = 404;
|
|
36
|
+
return { error: 'Asset not found' };
|
|
37
|
+
}
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
if (options.hosted) {
|
|
41
|
+
app.get('/plans/:id', ({ params }) => {
|
|
42
|
+
if (!params.id || !ID_PATTERN.test(params.id))
|
|
43
|
+
throw new HttpError(404, 'Not found');
|
|
44
|
+
return new Response(null, {
|
|
45
|
+
status: 302,
|
|
46
|
+
headers: { location: `/plans/${params.id}/` },
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async function legacyAsset(context, session) {
|
|
51
|
+
if (session)
|
|
52
|
+
session.touch();
|
|
53
|
+
const response = await readClientAsset(`assets/${String(context.params?.['*'] ?? '')}`);
|
|
54
|
+
if (!response) {
|
|
55
|
+
context.set.status = 404;
|
|
56
|
+
return { error: 'Asset not found' };
|
|
57
|
+
}
|
|
58
|
+
return response;
|
|
59
|
+
}
|
|
60
|
+
// Absolute /assets/* URLs from Vite modulepreload (base "/") hit the origin root
|
|
61
|
+
// even when the plan page lives under /plans/:id/.
|
|
62
|
+
app.get('/assets/*', (context) => {
|
|
63
|
+
const session = options.hosted ? undefined : sessionFor(undefined);
|
|
64
|
+
return legacyAsset(context, session);
|
|
65
|
+
});
|
|
66
|
+
if (options.hosted) {
|
|
67
|
+
app.get(route('/assets/*'), (context) => {
|
|
68
|
+
const session = sessionFor(idOf(context));
|
|
69
|
+
return legacyAsset(context, session);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
app.get('/favicon.png', () => faviconResponse());
|
|
73
|
+
app.get('/favicon.ico', () => pwaIconResponse('/favicon.ico'));
|
|
74
|
+
app.get('/icons/:name', ({ params }) => pwaIconResponse(`/icons/${params.name ?? ''}`));
|
|
75
|
+
app.get('/sw.js', () => shellWorkerResponse(readShellWorkerSource()));
|
|
76
|
+
app.get(WEB_MANIFEST_PATH, () => webManifestResponse());
|
|
77
|
+
return app
|
|
78
|
+
.get(route('/client/*'), (context) => {
|
|
79
|
+
const session = sessionFor(options.hosted ? idOf(context) : undefined);
|
|
80
|
+
return clientAsset(context, session);
|
|
81
|
+
})
|
|
82
|
+
.get(options.hosted ? '/plans/:id/' : '/', (context) => sessionFor(idOf(context)).page())
|
|
83
|
+
.get(route('/api/plan'), (context) => sessionFor(idOf(context)).planPayload())
|
|
84
|
+
.get(route('/api/plan-mdx'), (context) => sessionFor(idOf(context)).planMdxPayload())
|
|
85
|
+
.get(route('/api/search'), (context) => sessionFor(idOf(context)).search(new URL(context.request.url)))
|
|
86
|
+
.get(route('/api/snapshot'), (context) => sessionFor(idOf(context)).offlineSnapshot())
|
|
87
|
+
.put(route('/api/plan-mdx/source'), (context) => sessionFor(idOf(context)).saveMdxSource(jsonBody(context.body, true)))
|
|
88
|
+
.post(route('/api/plan-mdx/restore'), (context) => {
|
|
89
|
+
const body = jsonBody(context.body, true);
|
|
90
|
+
if (typeof body.snapshotId !== 'string' || !body.snapshotId) {
|
|
91
|
+
throw new HttpError(400, 'snapshotId is required');
|
|
92
|
+
}
|
|
93
|
+
return sessionFor(idOf(context)).restoreMdxSnapshot(body.snapshotId);
|
|
94
|
+
})
|
|
95
|
+
.get(route('/api/theme'), (context) => sessionFor(idOf(context)).themeView())
|
|
96
|
+
.put(route('/api/theme'), (context) => sessionFor(idOf(context)).updateTheme(context.body))
|
|
97
|
+
.get(route('/api/execution'), (context) => sessionFor(idOf(context)).executionPayload())
|
|
98
|
+
.put(route('/api/execution'), (context) => sessionFor(idOf(context)).updateExecution(context.body))
|
|
99
|
+
.post(route('/api/execution/start'), (context) => sessionFor(idOf(context)).startExecution(context.body))
|
|
100
|
+
.post(route('/api/execution/push'), (context) => sessionFor(idOf(context)).pushExecution(context.body))
|
|
101
|
+
.post(route('/api/execution/stop'), (context) => sessionFor(idOf(context)).stopExecution(context.body))
|
|
102
|
+
.get(route('/api/events'), (context) => sessionFor(idOf(context)).browserEvents(context.request))
|
|
103
|
+
.get(route('/api/agent-events'), (context) => {
|
|
104
|
+
const session = sessionFor(idOf(context));
|
|
105
|
+
if (options.authorizeAgent && !options.authorizeAgent(context.request, session)) {
|
|
106
|
+
throw new HttpError(401, 'Unauthorized');
|
|
107
|
+
}
|
|
108
|
+
return session.agentEvents(context.request);
|
|
109
|
+
})
|
|
110
|
+
.post(route('/api/agent-events/ack'), (context) => {
|
|
111
|
+
const session = sessionFor(idOf(context));
|
|
112
|
+
if (options.authorizeAgent && !options.authorizeAgent(context.request, session)) {
|
|
113
|
+
throw new HttpError(401, 'Unauthorized');
|
|
114
|
+
}
|
|
115
|
+
return session.acknowledgeEvents(context.body);
|
|
116
|
+
})
|
|
117
|
+
.post(route('/api/interactions/:interactionId'), (context) => {
|
|
118
|
+
const interactionId = context.params?.interactionId ?? '';
|
|
119
|
+
return sessionFor(idOf(context)).submitInteraction(interactionId, context.body, context.request);
|
|
120
|
+
})
|
|
121
|
+
.post(route('/api/comments'), (context) => sessionFor(idOf(context)).submitComment(context.body, context.request))
|
|
122
|
+
.post(route('/api/comments/:commentId/address'), (context) => sessionFor(idOf(context)).addressComment(context.params?.commentId ?? '', context.body, context.request))
|
|
123
|
+
.post(route('/api/comments/:commentId/reply'), (context) => sessionFor(idOf(context)).replyToComment(context.params?.commentId ?? '', context.body, context.request))
|
|
124
|
+
.post(route('/api/comments/:commentId/addressing'), (context) => sessionFor(idOf(context)).markAddressing(context.params?.commentId ?? '', context.request))
|
|
125
|
+
.post(route('/api/review'), (context) => sessionFor(idOf(context)).submitReview(context.body, context.request))
|
|
126
|
+
.post(route('/api/mode'), (context) => sessionFor(idOf(context)).updateMode(context.body, context.request))
|
|
127
|
+
.get(route('/api/logs'), async (context) => {
|
|
128
|
+
const session = sessionFor(idOf(context));
|
|
129
|
+
session.touch();
|
|
130
|
+
const result = await readLogs(context.request, session.id);
|
|
131
|
+
context.set.status = result.status;
|
|
132
|
+
return result.body;
|
|
133
|
+
})
|
|
134
|
+
.post(route('/api/logs'), async (context) => {
|
|
135
|
+
const session = sessionFor(idOf(context));
|
|
136
|
+
session.touch();
|
|
137
|
+
const result = await acceptClientLog(jsonBody(context.body, true), session.id);
|
|
138
|
+
context.set.status = result.status;
|
|
139
|
+
return result.body;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { type Matcher } from './searchMatch';
|
|
2
|
+
import type { PlanBlock } from './types';
|
|
3
|
+
/** Most terms one query may hold. */
|
|
4
|
+
export declare const SEARCH_TERM_LIMIT = 10;
|
|
5
|
+
/** Longest query text accepted. */
|
|
6
|
+
export declare const SEARCH_QUERY_LIMIT = 200;
|
|
7
|
+
/** Most hits one response carries, across every version searched. */
|
|
8
|
+
export declare const SEARCH_HIT_LIMIT = 200;
|
|
9
|
+
/** Most plans one dashboard search reads, newest first. */
|
|
10
|
+
export declare const DASHBOARD_PLAN_LIMIT = 100;
|
|
11
|
+
/** Most saved versions per plan a dashboard search reads with `version=all`. */
|
|
12
|
+
export declare const DASHBOARD_VERSIONS_PER_PLAN = 10;
|
|
13
|
+
export type SearchMatch = 'all' | 'any';
|
|
14
|
+
/** `live` is the plan as it is now. A number is one saved version. `all` is the live plan and every saved version. */
|
|
15
|
+
export type SearchVersion = 'live' | 'all' | number;
|
|
16
|
+
export type SearchHit = {
|
|
17
|
+
blockId?: string;
|
|
18
|
+
type: PlanBlock['type'] | 'line';
|
|
19
|
+
title?: string;
|
|
20
|
+
line: number;
|
|
21
|
+
snippet: string;
|
|
22
|
+
matched: string[];
|
|
23
|
+
/** Fuzzy search only: how close the block came, 0 to 1, averaged over the matched terms. */
|
|
24
|
+
score?: number;
|
|
25
|
+
/** Fuzzy search only: `[start, end)` offsets in `snippet` to highlight. */
|
|
26
|
+
ranges?: Array<[number, number]>;
|
|
27
|
+
};
|
|
28
|
+
export type SearchVersionResult = {
|
|
29
|
+
seq: number | 'live';
|
|
30
|
+
title: string;
|
|
31
|
+
createdAt: number | null;
|
|
32
|
+
live: boolean;
|
|
33
|
+
parsed: boolean;
|
|
34
|
+
hits: SearchHit[];
|
|
35
|
+
};
|
|
36
|
+
export type SearchResponse = {
|
|
37
|
+
planId: string;
|
|
38
|
+
query: string;
|
|
39
|
+
terms: string[];
|
|
40
|
+
match: SearchMatch;
|
|
41
|
+
/** True when terms also matched word starts, typos, and words run together. */
|
|
42
|
+
fuzzy: boolean;
|
|
43
|
+
version: SearchVersion;
|
|
44
|
+
truncated: boolean;
|
|
45
|
+
versions: SearchVersionResult[];
|
|
46
|
+
};
|
|
47
|
+
export type SearchDocument = {
|
|
48
|
+
seq: number | 'live';
|
|
49
|
+
title: string;
|
|
50
|
+
source: string;
|
|
51
|
+
createdAt: number | null;
|
|
52
|
+
};
|
|
53
|
+
export declare class SearchRequestError extends Error {
|
|
54
|
+
readonly status: number;
|
|
55
|
+
constructor(status: number, message: string);
|
|
56
|
+
}
|
|
57
|
+
/** Split a query into lowercase terms. A `"double quoted phrase"` stays one term. */
|
|
58
|
+
export declare function parseSearchQuery(input: string): string[];
|
|
59
|
+
/** Read the `version` parameter. Missing means live. */
|
|
60
|
+
export declare function parseSearchVersion(value: string | null | undefined): SearchVersion;
|
|
61
|
+
export declare function parseSearchMatch(value: string | null | undefined): SearchMatch;
|
|
62
|
+
/** Read the `fuzzy` parameter. Missing means exact matching. */
|
|
63
|
+
export declare function parseSearchFuzzy(value: string | null | undefined): boolean;
|
|
64
|
+
/** Read `q`, `version`, `match`, and `fuzzy` from a search URL. */
|
|
65
|
+
export declare function searchParams(url: URL): {
|
|
66
|
+
query: string;
|
|
67
|
+
terms: string[];
|
|
68
|
+
version: SearchVersion;
|
|
69
|
+
match: SearchMatch;
|
|
70
|
+
fuzzy: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type SearchOptions = {
|
|
73
|
+
/** Also match word starts, typos, and words run together. Off by default. */
|
|
74
|
+
fuzzy?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Terms found elsewhere in the plan, such as its title. With `match: 'all'` a block that
|
|
77
|
+
* holds the other terms is a hit. A block still needs one term of its own.
|
|
78
|
+
*/
|
|
79
|
+
covered?: string[];
|
|
80
|
+
/** Reuse one matcher across documents so word scores are worked out once. */
|
|
81
|
+
matcher?: Matcher;
|
|
82
|
+
};
|
|
83
|
+
/** Search one plan document block by block. A document that no longer parses is searched line by line. */
|
|
84
|
+
export declare function searchPlanSource(source: string, terms: string[], match?: SearchMatch, options?: SearchOptions): {
|
|
85
|
+
parsed: boolean;
|
|
86
|
+
hits: SearchHit[];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Search the documents a request selected. A saved version whose source is the live source
|
|
90
|
+
* is folded into the live result, so the same text is not listed twice.
|
|
91
|
+
*/
|
|
92
|
+
export declare function searchPlanDocuments(input: {
|
|
93
|
+
planId: string;
|
|
94
|
+
query: string;
|
|
95
|
+
terms: string[];
|
|
96
|
+
match: SearchMatch;
|
|
97
|
+
fuzzy?: boolean;
|
|
98
|
+
version: SearchVersion;
|
|
99
|
+
live: SearchDocument | null;
|
|
100
|
+
saved: SearchDocument[];
|
|
101
|
+
}): SearchResponse;
|
|
102
|
+
/** One listed plan for a dashboard search, with its documents newest first. The first is the live one. */
|
|
103
|
+
export type DashboardSearchSource = {
|
|
104
|
+
planId: string;
|
|
105
|
+
title: string;
|
|
106
|
+
/** What the dashboard links for this plan, or null when it has no page to open. */
|
|
107
|
+
url: string | null;
|
|
108
|
+
/** Page for a saved version, when the host has one. */
|
|
109
|
+
versionUrl?: (seq: number) => string | null;
|
|
110
|
+
documents: Array<{
|
|
111
|
+
seq: number;
|
|
112
|
+
title: string;
|
|
113
|
+
source: string;
|
|
114
|
+
createdAt: number | null;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
export type DashboardSearchVersion = SearchVersionResult & {
|
|
118
|
+
url: string | null;
|
|
119
|
+
};
|
|
120
|
+
export type DashboardSearchPlan = {
|
|
121
|
+
planId: string;
|
|
122
|
+
title: string;
|
|
123
|
+
url: string | null;
|
|
124
|
+
/** Where the plan title opens: its page while it runs, else its newest saved version where the host has one. */
|
|
125
|
+
openUrl?: string | null;
|
|
126
|
+
/** Terms found in the plan title. A title that holds every term (or one, with `match: 'any'`) lists the plan on its own. */
|
|
127
|
+
titleMatched?: string[];
|
|
128
|
+
/** Fuzzy search only: `[start, end)` offsets in `title` to highlight. */
|
|
129
|
+
titleRanges?: Array<[number, number]>;
|
|
130
|
+
versions: DashboardSearchVersion[];
|
|
131
|
+
};
|
|
132
|
+
export type DashboardSearchResponse = {
|
|
133
|
+
query: string;
|
|
134
|
+
terms: string[];
|
|
135
|
+
match: SearchMatch;
|
|
136
|
+
fuzzy: boolean;
|
|
137
|
+
version: 'live' | 'all';
|
|
138
|
+
truncated: boolean;
|
|
139
|
+
searchedPlans: number;
|
|
140
|
+
plans: DashboardSearchPlan[];
|
|
141
|
+
};
|
|
142
|
+
/** Read `q`, `version`, `match`, and `fuzzy` for a dashboard search. A version number only applies to one plan. */
|
|
143
|
+
export declare function dashboardSearchParams(url: URL): {
|
|
144
|
+
query: string;
|
|
145
|
+
terms: string[];
|
|
146
|
+
version: 'live' | 'all';
|
|
147
|
+
match: SearchMatch;
|
|
148
|
+
fuzzy: boolean;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Search every plan a dashboard lists, by title and by content. Only each plan's live document
|
|
152
|
+
* is read unless `version` is `all`. Plans with the most matched terms come first, then plans
|
|
153
|
+
* whose title matched, then the closest matches, then the dashboard's order.
|
|
154
|
+
*/
|
|
155
|
+
export declare function searchPlans(input: {
|
|
156
|
+
query: string;
|
|
157
|
+
terms: string[];
|
|
158
|
+
match: SearchMatch;
|
|
159
|
+
fuzzy?: boolean;
|
|
160
|
+
version: 'live' | 'all';
|
|
161
|
+
plans: DashboardSearchSource[];
|
|
162
|
+
}): DashboardSearchResponse;
|
|
163
|
+
/** Text listing for the CLI: one heading per version, one line per hit. */
|
|
164
|
+
export declare function formatSearchResponse(result: SearchResponse): string;
|
|
165
|
+
/** What a reader sees on a source line: tag names, attribute names, and fence markers removed, visible attribute values kept. */
|
|
166
|
+
export declare function visibleText(line: string): string;
|