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.
Files changed (608) hide show
  1. package/DESIGN.md +213 -0
  2. package/README.md +155 -28
  3. package/dist/AuthScreen.d.ts +9 -0
  4. package/dist/AuthScreen.js +7 -0
  5. package/dist/DesktopModeSwitch.d.ts +13 -0
  6. package/dist/DesktopModeSwitch.js +14 -0
  7. package/dist/OAuthMark.d.ts +6 -0
  8. package/dist/OAuthMark.js +8 -0
  9. package/dist/accountInitials.d.ts +5 -0
  10. package/dist/accountInitials.js +20 -0
  11. package/dist/accountLinking.d.ts +26 -0
  12. package/dist/accountLinking.js +46 -0
  13. package/dist/agentEvents.d.ts +31 -0
  14. package/dist/agentEvents.js +260 -0
  15. package/dist/agentPresence.d.ts +42 -0
  16. package/dist/agentPresence.js +69 -0
  17. package/dist/agentSkills.d.ts +35 -0
  18. package/dist/agentSkills.js +89 -0
  19. package/dist/agentStream.d.ts +35 -0
  20. package/dist/agentStream.js +133 -0
  21. package/dist/appearanceDom.d.ts +13 -0
  22. package/dist/appearanceDom.js +24 -0
  23. package/dist/appearanceSettings.d.ts +29 -0
  24. package/dist/appearanceSettings.js +293 -0
  25. package/dist/assets.d.ts +14 -0
  26. package/dist/assets.js +72 -0
  27. package/dist/authSearch.d.ts +11 -0
  28. package/dist/authSearch.js +30 -0
  29. package/dist/changelog.d.ts +11 -0
  30. package/dist/changelog.js +63 -0
  31. package/dist/changelogParse.d.ts +53 -0
  32. package/dist/changelogParse.js +226 -0
  33. package/dist/cli.d.ts +2 -0
  34. package/dist/cli.js +1684 -0
  35. package/dist/cliLauncher.d.ts +40 -0
  36. package/dist/cliLauncher.js +170 -0
  37. package/dist/cliToken.d.ts +11 -0
  38. package/dist/cliToken.js +15 -0
  39. package/dist/client/.vite/manifest.json +1780 -0
  40. package/dist/client/assets/BarChart-DtV3dIq4.js +1 -0
  41. package/dist/client/assets/BlockEditor-BklSUBjk.js +168 -0
  42. package/dist/client/assets/BlockEditor-K5h6xc4_.css +1 -0
  43. package/dist/client/assets/CodeBlock-BbI08MlQ.js +1 -0
  44. package/dist/client/assets/CodeBlock-BxRMnldw.js +175 -0
  45. package/dist/client/assets/LineChart-CQYMEbD6.js +1 -0
  46. package/dist/client/assets/Mermaid-Ciu9eIoG.js +1 -0
  47. package/dist/client/assets/Mermaid-jPWLXX7e.js +1 -0
  48. package/dist/client/assets/Popover-DbE4vUPG.js +1 -0
  49. package/dist/client/assets/ReactFlowExecutionCanvas-BhVs-adc.js +7 -0
  50. package/dist/client/assets/ReactFlowExecutionCanvas-DLioOiRN.css +1 -0
  51. package/dist/client/assets/StatusIcon-C_-Lm9b4.js +1 -0
  52. package/dist/client/assets/Workflow-C92OpLyf.js +1 -0
  53. package/dist/client/assets/agentPresence-D8asHrTp.js +1 -0
  54. package/dist/client/assets/andromeeda-DW8vo71h.js +1 -0
  55. package/dist/client/assets/andromeeda-vGVdxbeo.js +1 -0
  56. package/dist/client/assets/arrow-up-CEVVOXD5.js +1 -0
  57. package/dist/client/assets/arrow-up-down-BSjnQK2I.js +1 -0
  58. package/dist/client/assets/aurora-x-CDeNXAV0.js +1 -0
  59. package/dist/client/assets/aurora-x-rMvKqtYI.js +1 -0
  60. package/dist/client/assets/ayu-dark-CwczpL8O.js +1 -0
  61. package/dist/client/assets/ayu-dark-DluEY0Gj.js +1 -0
  62. package/dist/client/assets/ayu-light-C3h-C4tm.js +1 -0
  63. package/dist/client/assets/ayu-light-DSh22xiD.js +1 -0
  64. package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +1 -0
  65. package/dist/client/assets/ayu-mirage-JE6hAyHG.js +1 -0
  66. package/dist/client/assets/browserStore-BDGKYoJj.js +435 -0
  67. package/dist/client/assets/button-BI07wqbi.css +1 -0
  68. package/dist/client/assets/button-DJWAGApe.js +1 -0
  69. package/dist/client/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
  70. package/dist/client/assets/catppuccin-frappe-pyXErRRU.js +1 -0
  71. package/dist/client/assets/catppuccin-latte-BILSUICr.js +1 -0
  72. package/dist/client/assets/catppuccin-latte-CtsyrtPq.js +1 -0
  73. package/dist/client/assets/catppuccin-macchiato-Ck60ZZQE.js +1 -0
  74. package/dist/client/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
  75. package/dist/client/assets/catppuccin-mocha-C_2G67cS.js +1 -0
  76. package/dist/client/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
  77. package/dist/client/assets/ccount-nzzEXTrh.js +1 -0
  78. package/dist/client/assets/chartRows-CNjjLsAH.js +2 -0
  79. package/dist/client/assets/circle-x-BLGxA3gi.js +1 -0
  80. package/dist/client/assets/client-BsE_buVT.js +9 -0
  81. package/dist/client/assets/constants-CmGPilXJ.js +1 -0
  82. package/dist/client/assets/dark-plus-CHgc6GYj.js +1 -0
  83. package/dist/client/assets/dark-plus-Cs2F2srj.js +1 -0
  84. package/dist/client/assets/default-5FplaXL4.js +7 -0
  85. package/dist/client/assets/diffsTheme-PJJTu2Rq.js +1 -0
  86. package/dist/client/assets/dracula-BHWKrbxM.js +1 -0
  87. package/dist/client/assets/dracula-Cf1PG3MT.js +1 -0
  88. package/dist/client/assets/dracula-soft-5eyTD99u.js +1 -0
  89. package/dist/client/assets/dracula-soft-DXuNm1Kq.js +1 -0
  90. package/dist/client/assets/editSource-DQfw4nRm.js +1 -0
  91. package/dist/client/assets/editSource-U5AoD-Wo.js +14 -0
  92. package/dist/client/assets/engine-CLTPZlti.js +1 -0
  93. package/dist/client/assets/engine-DUyaiAMV.js +2 -0
  94. package/dist/client/assets/everforest-dark-CjdfwUBe.js +1 -0
  95. package/dist/client/assets/everforest-dark-sB-x3p7T.js +1 -0
  96. package/dist/client/assets/everforest-light-CfVwwCBP.js +1 -0
  97. package/dist/client/assets/everforest-light-Df2xbC6M.js +1 -0
  98. package/dist/client/assets/forgetDocuments-CIUBitCs.js +1 -0
  99. package/dist/client/assets/formatCSSVariablePrefix-KRh9vnZf.js +1 -0
  100. package/dist/client/assets/github-dark-BL6HSl_n.js +1 -0
  101. package/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  102. package/dist/client/assets/github-dark-default-DXG-b-1a.js +1 -0
  103. package/dist/client/assets/github-dark-default-zacuWV-M.js +1 -0
  104. package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
  105. package/dist/client/assets/github-dark-dimmed-Mc0P9idi.js +1 -0
  106. package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
  107. package/dist/client/assets/github-dark-high-contrast-IMKX2AVF.js +1 -0
  108. package/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  109. package/dist/client/assets/github-light-default-BXViO-2h.js +1 -0
  110. package/dist/client/assets/github-light-default-DVlCqP3X.js +1 -0
  111. package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +1 -0
  112. package/dist/client/assets/github-light-high-contrast-Dj6zTyWR.js +1 -0
  113. package/dist/client/assets/github-light-mYhEBkPo.js +1 -0
  114. package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
  115. package/dist/client/assets/gruvbox-dark-hard-QTgQQZn-.js +1 -0
  116. package/dist/client/assets/gruvbox-dark-medium-9d5YdCTx.js +1 -0
  117. package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
  118. package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  119. package/dist/client/assets/gruvbox-dark-soft-XCkqeBhR.js +1 -0
  120. package/dist/client/assets/gruvbox-light-hard--5-nXqNp.js +1 -0
  121. package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
  122. package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
  123. package/dist/client/assets/gruvbox-light-medium-COA1PZW2.js +1 -0
  124. package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
  125. package/dist/client/assets/gruvbox-light-soft-CIJpzjAO.js +1 -0
  126. package/dist/client/assets/hastToHtml-Dj8rXue9.js +11 -0
  127. package/dist/client/assets/highlight-cB-PkhyE.js +1 -0
  128. package/dist/client/assets/highlights-LLBF1DTm.js +1 -0
  129. package/dist/client/assets/horizon-Ba2cwkSy.js +1 -0
  130. package/dist/client/assets/horizon-CE9ld1lL.js +1 -0
  131. package/dist/client/assets/horizon-bright-DSNQnXHK.js +1 -0
  132. package/dist/client/assets/horizon-bright-DaEDgBmR.js +1 -0
  133. package/dist/client/assets/houston-B6x0XVpU.js +1 -0
  134. package/dist/client/assets/houston-CsvMBhTu.js +1 -0
  135. package/dist/client/assets/jsx-runtime-DKj5X9O4.js +1 -0
  136. package/dist/client/assets/kanagawa-dragon-Bozd7klA.js +1 -0
  137. package/dist/client/assets/kanagawa-dragon-DhTFvBMT.js +1 -0
  138. package/dist/client/assets/kanagawa-lotus--m8sdOxn.js +1 -0
  139. package/dist/client/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
  140. package/dist/client/assets/kanagawa-wave-BML5mF2J.js +1 -0
  141. package/dist/client/assets/kanagawa-wave-D-tTv4k2.js +1 -0
  142. package/dist/client/assets/laserwave-C_8bwKvT.js +1 -0
  143. package/dist/client/assets/laserwave-HSLx0L75.js +1 -0
  144. package/dist/client/assets/lib-COgu-QLX.js +33 -0
  145. package/dist/client/assets/lib-CdRiGVUZ.js +1 -0
  146. package/dist/client/assets/light-plus-CUjWrTSi.js +1 -0
  147. package/dist/client/assets/light-plus-DVQuIRkW.js +1 -0
  148. package/dist/client/assets/loader-CjL04K29.js +1 -0
  149. package/dist/client/assets/main-BGMX_GnZ.js +2 -0
  150. package/dist/client/assets/main-BTko4EvJ.css +1 -0
  151. package/dist/client/assets/material-theme-Bm3Qr25_.js +1 -0
  152. package/dist/client/assets/material-theme-CnthUGfg.js +1 -0
  153. package/dist/client/assets/material-theme-darker-2IIEA8gg.js +1 -0
  154. package/dist/client/assets/material-theme-darker-DUi03Qre.js +1 -0
  155. package/dist/client/assets/material-theme-lighter-D2-qr5Vw.js +1 -0
  156. package/dist/client/assets/material-theme-lighter-uhdI0v04.js +1 -0
  157. package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +1 -0
  158. package/dist/client/assets/material-theme-ocean-CWR-LogA.js +1 -0
  159. package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +1 -0
  160. package/dist/client/assets/material-theme-palenight-Cnv8m1ra.js +1 -0
  161. package/dist/client/assets/mdxEntries-BNTMP8ct.css +1 -0
  162. package/dist/client/assets/mdxEntries-L-V7bB6i.js +1 -0
  163. package/dist/client/assets/mermaid-Bjhs-krb.js +1 -0
  164. package/dist/client/assets/mermaid-Di4j-zgD.js +146 -0
  165. package/dist/client/assets/min-dark-BSWPekZh.js +1 -0
  166. package/dist/client/assets/min-dark-EXoM-6Xo.js +1 -0
  167. package/dist/client/assets/min-light-DDpmG2fV.js +1 -0
  168. package/dist/client/assets/min-light-DVOTDhnA.js +1 -0
  169. package/dist/client/assets/monokai-BscAjiQZ.js +1 -0
  170. package/dist/client/assets/monokai-DkggTbGy.js +1 -0
  171. package/dist/client/assets/mountChrome-BVWpsDCy.js +122 -0
  172. package/dist/client/assets/mountChrome-DhTDH3YM.css +1 -0
  173. package/dist/client/assets/night-owl-Bdcs0PMi.js +1 -0
  174. package/dist/client/assets/night-owl-DhmEMT88.js +1 -0
  175. package/dist/client/assets/night-owl-light-RoU30LE0.js +1 -0
  176. package/dist/client/assets/night-owl-light-eJ-hLW7d.js +1 -0
  177. package/dist/client/assets/noShiki-DB8hQ_W3.js +1 -0
  178. package/dist/client/assets/noShiki-GTG3tT8x.js +1 -0
  179. package/dist/client/assets/nord-Cb4Vim4T.js +1 -0
  180. package/dist/client/assets/nord-u7hMircQ.js +1 -0
  181. package/dist/client/assets/offlineSync-Cv3FVIlJ.js +1 -0
  182. package/dist/client/assets/one-dark-pro-08PdtLzi.js +1 -0
  183. package/dist/client/assets/one-dark-pro-C6YyR8OD.js +1 -0
  184. package/dist/client/assets/one-light-D7Lr4KcI.js +1 -0
  185. package/dist/client/assets/one-light-DgvUEtgI.js +1 -0
  186. package/dist/client/assets/opfs-worker-DuTOCgWR.js +5919 -0
  187. package/dist/client/assets/pierre-dark-B2jZWvHG.js +1 -0
  188. package/dist/client/assets/pierre-dark-CpLgRqie.js +1 -0
  189. package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
  190. package/dist/client/assets/pierre-dark-protanopia-deuteranopia-CebgQdRf.js +1 -0
  191. package/dist/client/assets/pierre-dark-soft-DdE7dyP3.js +1 -0
  192. package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +1 -0
  193. package/dist/client/assets/pierre-dark-tritanopia-CXimiT7X.js +1 -0
  194. package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
  195. package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
  196. package/dist/client/assets/pierre-dark-vibrant-DzBsxHvQ.js +1 -0
  197. package/dist/client/assets/pierre-light-CoaEpmwp.js +1 -0
  198. package/dist/client/assets/pierre-light-Vf__O3ev.js +1 -0
  199. package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
  200. package/dist/client/assets/pierre-light-protanopia-deuteranopia-BUtWcCQC.js +1 -0
  201. package/dist/client/assets/pierre-light-soft-C3QCXKvN.js +1 -0
  202. package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +1 -0
  203. package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
  204. package/dist/client/assets/pierre-light-tritanopia-CKLy6XvA.js +1 -0
  205. package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
  206. package/dist/client/assets/pierre-light-vibrant-DDuTEIhH.js +1 -0
  207. package/dist/client/assets/planEditButton-CbWGczbi.js +45 -0
  208. package/dist/client/assets/planEvents-cuzv9ELr.js +1 -0
  209. package/dist/client/assets/planMdx-Db1ze_nN.js +110 -0
  210. package/dist/client/assets/plastic-B8mE6BxX.js +1 -0
  211. package/dist/client/assets/plastic-DQwYfKfQ.js +1 -0
  212. package/dist/client/assets/poimandres-DRFjx7u4.js +1 -0
  213. package/dist/client/assets/poimandres-DUFjrgxT.js +1 -0
  214. package/dist/client/assets/preload-helper-Dx0-lKy1.js +1 -0
  215. package/dist/client/assets/queryClient-Bs5tSUJh.js +1 -0
  216. package/dist/client/assets/react-dom-DpzJPrWF.js +1 -0
  217. package/dist/client/assets/rebaseDraft-B2--cj1c.js +19 -0
  218. package/dist/client/assets/red-BJvdDEUx.js +1 -0
  219. package/dist/client/assets/red-CYlAq2b0.js +1 -0
  220. package/dist/client/assets/register-hZEIk3A9.css +1 -0
  221. package/dist/client/assets/register-htm5s8o9.js +1 -0
  222. package/dist/client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  223. package/dist/client/assets/rose-pine-BSqRqUae.js +1 -0
  224. package/dist/client/assets/rose-pine-aMsaMD1D.js +1 -0
  225. package/dist/client/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
  226. package/dist/client/assets/rose-pine-dawn-U6TBE82u.js +1 -0
  227. package/dist/client/assets/rose-pine-moon-CAU7u1h4.js +1 -0
  228. package/dist/client/assets/rose-pine-moon-DO-qXg-I.js +1 -0
  229. package/dist/client/assets/routeEdges-B2z8v0di.js +24 -0
  230. package/dist/client/assets/selector-CDsXW7SO.css +1 -0
  231. package/dist/client/assets/selector-tlBGWtQl.js +1 -0
  232. package/dist/client/assets/settingsChrome-NGUDtEIp.js +1 -0
  233. package/dist/client/assets/shiki-BOXJeUHI.js +2 -0
  234. package/dist/client/assets/slack-dark-CMu0smFa.js +1 -0
  235. package/dist/client/assets/slack-dark-DnToyrRv.js +1 -0
  236. package/dist/client/assets/slack-ochin-B2OO5cIa.js +1 -0
  237. package/dist/client/assets/slack-ochin-BBne7cjw.js +1 -0
  238. package/dist/client/assets/snazzy-light-4G7pJPwS.js +1 -0
  239. package/dist/client/assets/snazzy-light-CV8HUEmk.js +1 -0
  240. package/dist/client/assets/solarized-dark-CmYmhSgI.js +1 -0
  241. package/dist/client/assets/solarized-dark-b97czJOk.js +1 -0
  242. package/dist/client/assets/solarized-light-CjLLwxRp.js +1 -0
  243. package/dist/client/assets/solarized-light-DFPxpIYQ.js +1 -0
  244. package/dist/client/assets/stampPlanParts-DVXYCykw.js +15 -0
  245. package/dist/client/assets/stampPlanParts-ctZzxWdw.css +1 -0
  246. package/dist/client/assets/stream-tokenizer-C3n8hi1h.js +4 -0
  247. package/dist/client/assets/synthwave-84-nFMaYfgc.js +1 -0
  248. package/dist/client/assets/synthwave-84-wQeDKbzQ.js +1 -0
  249. package/dist/client/assets/textChildren-ZDSs1dod.js +1 -0
  250. package/dist/client/assets/themes-CdTJhjZf.js +2 -0
  251. package/dist/client/assets/tokyo-night-D4ZgDiA7.js +1 -0
  252. package/dist/client/assets/tokyo-night-oM2G3aXe.js +1 -0
  253. package/dist/client/assets/triangle-alert-C9Sgr3jF.js +1 -0
  254. package/dist/client/assets/unwrapDefault-ByDmBtHB.js +1 -0
  255. package/dist/client/assets/utils-C9Glzetk.js +2 -0
  256. package/dist/client/assets/versionView-zkSROPw7.js +1 -0
  257. package/dist/client/assets/vesper-DdrHHSXu.js +1 -0
  258. package/dist/client/assets/vesper-sUHevyKv.js +1 -0
  259. package/dist/client/assets/vitesse-black-CfklMpOb.js +1 -0
  260. package/dist/client/assets/vitesse-black-fwtXNY1n.js +1 -0
  261. package/dist/client/assets/vitesse-dark-BZCL-v6S.js +1 -0
  262. package/dist/client/assets/vitesse-dark-CJkzwmKT.js +1 -0
  263. package/dist/client/assets/vitesse-light-BxMp8E1Y.js +1 -0
  264. package/dist/client/assets/vitesse-light-VbXTXTou.js +1 -0
  265. package/dist/client/assets/wa-sqlite-Ba70bhIr.wasm +0 -0
  266. package/dist/client/assets/warmPlans-CYFrLwcX.js +1 -0
  267. package/dist/client/assets/with-selector-HIcjK0_d.js +1 -0
  268. package/dist/client/assets/workflowSource-LMsRuqF_.js +3 -0
  269. package/dist/client/favicon.png +0 -0
  270. package/dist/client/icons/apple-touch-icon-180x180.png +0 -0
  271. package/dist/client/icons/favicon.ico +0 -0
  272. package/dist/client/icons/maskable-icon-192x192.png +0 -0
  273. package/dist/client/icons/maskable-icon-512x512.png +0 -0
  274. package/dist/client/icons/pwa-16x16.png +0 -0
  275. package/dist/client/icons/pwa-192x192.png +0 -0
  276. package/dist/client/icons/pwa-32x32.png +0 -0
  277. package/dist/client/icons/pwa-512x512.png +0 -0
  278. package/dist/client/icons/pwa-64x64.png +0 -0
  279. package/dist/clientLog.d.ts +5 -0
  280. package/dist/clientLog.js +64 -0
  281. package/dist/cloudClient.d.ts +38 -0
  282. package/dist/cloudClient.js +185 -0
  283. package/dist/cloudCommand.d.ts +23 -0
  284. package/dist/cloudCommand.js +159 -0
  285. package/dist/cloudFrontmatter.d.ts +4 -0
  286. package/dist/cloudFrontmatter.js +30 -0
  287. package/dist/cloudStore.d.ts +28 -0
  288. package/dist/cloudStore.js +70 -0
  289. package/dist/cloudWatch.d.ts +12 -0
  290. package/dist/cloudWatch.js +103 -0
  291. package/dist/commentReply.d.ts +25 -0
  292. package/dist/commentReply.js +17 -0
  293. package/dist/configHome.d.ts +34 -0
  294. package/dist/configHome.js +136 -0
  295. package/dist/dashboard.d.ts +67 -0
  296. package/dist/dashboard.js +86 -0
  297. package/dist/dashboardClientScript.d.ts +2 -0
  298. package/dist/dashboardClientScript.js +1006 -0
  299. package/dist/dashboardDocument.d.ts +13 -0
  300. package/dist/dashboardDocument.js +40 -0
  301. package/dist/dashboardFormat.d.ts +98 -0
  302. package/dist/dashboardFormat.js +199 -0
  303. package/dist/dashboardLoading.d.ts +19 -0
  304. package/dist/dashboardLoading.js +94 -0
  305. package/dist/dashboardOverview.d.ts +28 -0
  306. package/dist/dashboardOverview.js +333 -0
  307. package/dist/dashboardPage.d.ts +2 -0
  308. package/dist/dashboardPage.js +11 -0
  309. package/dist/dashboardParts.d.ts +4 -0
  310. package/dist/dashboardParts.js +367 -0
  311. package/dist/dashboardSearchView.d.ts +38 -0
  312. package/dist/dashboardSearchView.js +255 -0
  313. package/dist/desktopApp.d.ts +23 -0
  314. package/dist/desktopApp.js +110 -0
  315. package/dist/desktopBridge.d.ts +21 -0
  316. package/dist/desktopBridge.js +78 -0
  317. package/dist/desktopCommand.d.ts +61 -0
  318. package/dist/desktopCommand.js +172 -0
  319. package/dist/desktopConfig.d.ts +54 -0
  320. package/dist/desktopConfig.js +164 -0
  321. package/dist/desktopNotices.d.ts +105 -0
  322. package/dist/desktopNotices.js +427 -0
  323. package/dist/diff.d.ts +2 -0
  324. package/dist/diff.js +46 -0
  325. package/dist/diffsTheme.d.ts +51 -0
  326. package/dist/diffsTheme.js +86 -0
  327. package/dist/diffsThemeCatalog.d.ts +3 -0
  328. package/dist/diffsThemeCatalog.js +78 -0
  329. package/dist/elkRuntime.node.d.ts +7 -0
  330. package/dist/elkRuntime.node.js +63 -0
  331. package/dist/execution.d.ts +78 -0
  332. package/dist/execution.js +139 -0
  333. package/dist/expectedWorkflow.d.ts +11 -0
  334. package/dist/expectedWorkflow.js +99 -0
  335. package/dist/favicon.d.ts +4 -0
  336. package/dist/favicon.js +40 -0
  337. package/dist/favicon.png +0 -0
  338. package/dist/faviconBase64.d.ts +1 -0
  339. package/dist/faviconBase64.js +1 -0
  340. package/dist/fileVersion.d.ts +8 -0
  341. package/dist/fileVersion.js +20 -0
  342. package/dist/formatBytes.d.ts +2 -0
  343. package/dist/formatBytes.js +13 -0
  344. package/dist/gitStatus.d.ts +12 -0
  345. package/dist/gitStatus.js +88 -0
  346. package/dist/hostToolbar.d.ts +38 -0
  347. package/dist/hostToolbar.js +249 -0
  348. package/dist/http.d.ts +8 -0
  349. package/dist/http.js +38 -0
  350. package/dist/httpServer.d.ts +13 -0
  351. package/dist/httpServer.js +40 -0
  352. package/dist/icons/apple-touch-icon-180x180.png +0 -0
  353. package/dist/icons/favicon.ico +0 -0
  354. package/dist/icons/maskable-icon-192x192.png +0 -0
  355. package/dist/icons/maskable-icon-512x512.png +0 -0
  356. package/dist/icons/pwa-16x16.png +0 -0
  357. package/dist/icons/pwa-192x192.png +0 -0
  358. package/dist/icons/pwa-32x32.png +0 -0
  359. package/dist/icons/pwa-512x512.png +0 -0
  360. package/dist/icons/pwa-64x64.png +0 -0
  361. package/dist/lanAccess.d.ts +31 -0
  362. package/dist/lanAccess.js +110 -0
  363. package/dist/lanAddress.d.ts +24 -0
  364. package/dist/lanAddress.js +174 -0
  365. package/dist/lanCommand.d.ts +25 -0
  366. package/dist/lanCommand.js +159 -0
  367. package/dist/lanConfig.d.ts +40 -0
  368. package/dist/lanConfig.js +130 -0
  369. package/dist/lanFirewall.d.ts +17 -0
  370. package/dist/lanFirewall.js +221 -0
  371. package/dist/layoutGraph.d.ts +13 -0
  372. package/dist/layoutGraph.js +55 -0
  373. package/dist/localName.d.ts +9 -0
  374. package/dist/localName.js +28 -0
  375. package/dist/lockBanner.d.ts +2 -0
  376. package/dist/lockBanner.js +2 -0
  377. package/dist/mdnsPacket.d.ts +44 -0
  378. package/dist/mdnsPacket.js +384 -0
  379. package/dist/mdnsPublish.d.ts +12 -0
  380. package/dist/mdnsPublish.js +290 -0
  381. package/dist/offlineSync.d.ts +249 -0
  382. package/dist/offlineSync.js +477 -0
  383. package/dist/openUrl.d.ts +40 -0
  384. package/dist/openUrl.js +147 -0
  385. package/dist/openedPages.d.ts +14 -0
  386. package/dist/openedPages.js +48 -0
  387. package/dist/pageEditPull.d.ts +9 -0
  388. package/dist/pageEditPull.js +29 -0
  389. package/dist/pageRoutes.d.ts +3 -0
  390. package/dist/pageRoutes.js +34 -0
  391. package/dist/parse.d.ts +7 -0
  392. package/dist/parse.js +100 -0
  393. package/dist/pid.d.ts +2 -0
  394. package/dist/pid.js +13 -0
  395. package/dist/planArchive.d.ts +4 -0
  396. package/dist/planArchive.js +28 -0
  397. package/dist/planEntries.d.ts +12 -0
  398. package/dist/planEntries.js +117 -0
  399. package/dist/planHost.d.ts +31 -0
  400. package/dist/planHost.js +286 -0
  401. package/dist/planId.d.ts +2 -0
  402. package/dist/planId.js +6 -0
  403. package/dist/planMdx/blockEdit.d.ts +41 -0
  404. package/dist/planMdx/blockEdit.js +60 -0
  405. package/dist/planMdx/cellPart.d.ts +14 -0
  406. package/dist/planMdx/cellPart.js +26 -0
  407. package/dist/planMdx/compilePlanMdx.d.ts +3 -0
  408. package/dist/planMdx/compilePlanMdx.js +22 -0
  409. package/dist/planMdx/editSource.d.ts +39 -0
  410. package/dist/planMdx/editSource.js +327 -0
  411. package/dist/planMdx/frontmatter.d.ts +5 -0
  412. package/dist/planMdx/frontmatter.js +15 -0
  413. package/dist/planMdx/markdown.d.ts +6 -0
  414. package/dist/planMdx/markdown.js +470 -0
  415. package/dist/planMdx/outline.d.ts +8 -0
  416. package/dist/planMdx/outline.js +548 -0
  417. package/dist/planMdx/payload.d.ts +4 -0
  418. package/dist/planMdx/payload.js +18 -0
  419. package/dist/planMdx/rebaseDraft.d.ts +54 -0
  420. package/dist/planMdx/rebaseDraft.js +675 -0
  421. package/dist/planMdx/recmaPlanComponents.d.ts +18 -0
  422. package/dist/planMdx/recmaPlanComponents.js +52 -0
  423. package/dist/planMdx/remarkBlockRanges.d.ts +104 -0
  424. package/dist/planMdx/remarkBlockRanges.js +275 -0
  425. package/dist/planMdx/remarkCodeMeta.d.ts +16 -0
  426. package/dist/planMdx/remarkCodeMeta.js +25 -0
  427. package/dist/planMdx/remarkGfmTable.d.ts +5 -0
  428. package/dist/planMdx/remarkGfmTable.js +15 -0
  429. package/dist/planMdx/remarkGfmTaskList.d.ts +5 -0
  430. package/dist/planMdx/remarkGfmTaskList.js +15 -0
  431. package/dist/planMdx/remarkMermaid.d.ts +16 -0
  432. package/dist/planMdx/remarkMermaid.js +56 -0
  433. package/dist/planMdx/source.d.ts +11 -0
  434. package/dist/planMdx/source.js +131 -0
  435. package/dist/planMdx/titleEdit.d.ts +35 -0
  436. package/dist/planMdx/titleEdit.js +112 -0
  437. package/dist/planPage.css +2125 -0
  438. package/dist/planProgress.d.ts +17 -0
  439. package/dist/planProgress.js +78 -0
  440. package/dist/planReady.d.ts +8 -0
  441. package/dist/planReady.js +20 -0
  442. package/dist/planRefNavigation.d.ts +4 -0
  443. package/dist/planRefNavigation.js +8 -0
  444. package/dist/planRoutes.d.ts +12 -0
  445. package/dist/planRoutes.js +141 -0
  446. package/dist/planSearch.d.ts +166 -0
  447. package/dist/planSearch.js +462 -0
  448. package/dist/planSession.d.ts +130 -0
  449. package/dist/planSession.js +1182 -0
  450. package/dist/planSnapshots.d.ts +34 -0
  451. package/dist/planSnapshots.js +113 -0
  452. package/dist/planStatus.d.ts +26 -0
  453. package/dist/planStatus.js +46 -0
  454. package/dist/planStepHeading.d.ts +16 -0
  455. package/dist/planStepHeading.js +34 -0
  456. package/dist/planTarget.d.ts +16 -0
  457. package/dist/planTarget.js +92 -0
  458. package/dist/planToc.d.ts +24 -0
  459. package/dist/planToc.js +258 -0
  460. package/dist/planVersionMenu.d.ts +12 -0
  461. package/dist/planVersionMenu.js +23 -0
  462. package/dist/processRecord.d.ts +108 -0
  463. package/dist/processRecord.js +68 -0
  464. package/dist/processesPanel.d.ts +7 -0
  465. package/dist/processesPanel.js +636 -0
  466. package/dist/pwaIconFile.d.ts +2 -0
  467. package/dist/pwaIconFile.js +42 -0
  468. package/dist/pwaIcons.d.ts +28 -0
  469. package/dist/pwaIcons.js +46 -0
  470. package/dist/registerServiceWorker.d.ts +25 -0
  471. package/dist/registerServiceWorker.js +26 -0
  472. package/dist/registryClient.d.ts +94 -0
  473. package/dist/registryClient.js +490 -0
  474. package/dist/registryConstants.d.ts +9 -0
  475. package/dist/registryConstants.js +9 -0
  476. package/dist/registryLock.d.ts +19 -0
  477. package/dist/registryLock.js +48 -0
  478. package/dist/registryPage.d.ts +2 -0
  479. package/dist/registryPage.js +284 -0
  480. package/dist/registryService.d.ts +21 -0
  481. package/dist/registryService.js +562 -0
  482. package/dist/registryStore.d.ts +63 -0
  483. package/dist/registryStore.js +398 -0
  484. package/dist/releaseNotes.d.ts +35 -0
  485. package/dist/releaseNotes.js +62 -0
  486. package/dist/render.d.ts +50 -0
  487. package/dist/render.js +1506 -0
  488. package/dist/requestGuard.d.ts +21 -0
  489. package/dist/requestGuard.js +42 -0
  490. package/dist/reviewRound.d.ts +12 -0
  491. package/dist/reviewRound.js +19 -0
  492. package/dist/runFollow.d.ts +28 -0
  493. package/dist/runFollow.js +33 -0
  494. package/dist/searchMatch.d.ts +35 -0
  495. package/dist/searchMatch.js +270 -0
  496. package/dist/server.d.ts +24 -0
  497. package/dist/server.js +114 -0
  498. package/dist/serviceLog.d.ts +56 -0
  499. package/dist/serviceLog.js +481 -0
  500. package/dist/shellCache.d.ts +69 -0
  501. package/dist/shellCache.js +289 -0
  502. package/dist/shellWorker.js +322 -0
  503. package/dist/shellWorkerResponse.d.ts +4 -0
  504. package/dist/shellWorkerResponse.js +15 -0
  505. package/dist/startServer.d.ts +2 -0
  506. package/dist/startServer.js +2 -0
  507. package/dist/store/meta.d.ts +53 -0
  508. package/dist/store/meta.js +140 -0
  509. package/dist/store/migrate.d.ts +3 -0
  510. package/dist/store/migrate.js +408 -0
  511. package/dist/store/rows.d.ts +4 -0
  512. package/dist/store/rows.js +100 -0
  513. package/dist/store/schema.d.ts +5 -0
  514. package/dist/store/schema.js +5 -0
  515. package/dist/store/sqlite.d.ts +19 -0
  516. package/dist/store/sqlite.js +57 -0
  517. package/dist/store/tables.d.ts +1892 -0
  518. package/dist/store/tables.js +136 -0
  519. package/dist/theme.d.ts +174 -0
  520. package/dist/theme.js +444 -0
  521. package/dist/themeBootstrap.d.ts +2 -0
  522. package/dist/themeBootstrap.js +11 -0
  523. package/dist/tui/DashboardApp.d.ts +19 -0
  524. package/dist/tui/DashboardApp.js +237 -0
  525. package/dist/tui/PaletteProvider.d.ts +12 -0
  526. package/dist/tui/PaletteProvider.js +36 -0
  527. package/dist/tui/PlanActions.d.ts +7 -0
  528. package/dist/tui/PlanActions.js +9 -0
  529. package/dist/tui/PlanCard.d.ts +13 -0
  530. package/dist/tui/PlanCard.js +31 -0
  531. package/dist/tui/PlanRow.d.ts +13 -0
  532. package/dist/tui/PlanRow.js +31 -0
  533. package/dist/tui/PlanTable.d.ts +13 -0
  534. package/dist/tui/PlanTable.js +24 -0
  535. package/dist/tui/ProcessCard.d.ts +9 -0
  536. package/dist/tui/ProcessCard.js +24 -0
  537. package/dist/tui/ProcessList.d.ts +9 -0
  538. package/dist/tui/ProcessList.js +12 -0
  539. package/dist/tui/SegmentButton.d.ts +7 -0
  540. package/dist/tui/SegmentButton.js +18 -0
  541. package/dist/tui/StatCard.d.ts +6 -0
  542. package/dist/tui/StatCard.js +17 -0
  543. package/dist/tui/dashboardView.d.ts +45 -0
  544. package/dist/tui/dashboardView.js +192 -0
  545. package/dist/tui/openExternal.d.ts +2 -0
  546. package/dist/tui/openExternal.js +5 -0
  547. package/dist/tui/palette.d.ts +27 -0
  548. package/dist/tui/palette.js +66 -0
  549. package/dist/tui/planColumns.d.ts +38 -0
  550. package/dist/tui/planColumns.js +14 -0
  551. package/dist/tui/readDashboard.d.ts +3 -0
  552. package/dist/tui/readDashboard.js +15 -0
  553. package/dist/tui/readProcesses.d.ts +3 -0
  554. package/dist/tui/readProcesses.js +23 -0
  555. package/dist/tui/registryView.d.ts +11 -0
  556. package/dist/tui/registryView.js +56 -0
  557. package/dist/tui/runTui.d.ts +21 -0
  558. package/dist/tui/runTui.js +86 -0
  559. package/dist/tui/systemTheme.d.ts +28 -0
  560. package/dist/tui/systemTheme.js +141 -0
  561. package/dist/types.d.ts +191 -0
  562. package/dist/types.js +0 -0
  563. package/dist/webManifest.d.ts +39 -0
  564. package/dist/webManifest.js +48 -0
  565. package/dist/workflow.d.ts +8 -0
  566. package/dist/workflow.js +42 -0
  567. package/dist/workflowLayoutShared.d.ts +25 -0
  568. package/dist/workflowLayoutShared.js +33 -0
  569. package/dist/workflowSource.d.ts +31 -0
  570. package/dist/workflowSource.js +90 -0
  571. package/docs/changelogs/changelog-2026-10-27.md +203 -0
  572. package/docs/changelogs/changelog-2026-10-28.md +181 -0
  573. package/docs/changelogs/changelog-2026-10-29.md +349 -0
  574. package/docs/changelogs/changelog-2026-10-30.md +303 -0
  575. package/docs/changelogs/changelog-2026-10-31.md +129 -0
  576. package/docs/changelogs/changelog-2026-11-01.md +155 -0
  577. package/docs/changelogs/changelog-2026-11-02.md +195 -0
  578. package/docs/changelogs/changelog-2026-11-03.md +209 -0
  579. package/docs/changelogs/changelog-2026-11-04.md +243 -0
  580. package/docs/changelogs/changelog-2026-11-05.md +172 -0
  581. package/docs/changelogs/changelog-2026-11-06.md +123 -0
  582. package/docs/changelogs/changelog-2026-11-07.md +138 -0
  583. package/docs/changelogs/changelog-2026-11-08.md +47 -0
  584. package/docs/changelogs/changelog-2026-11-10.md +219 -0
  585. package/docs/changelogs/changelog-2026-11-11.md +205 -0
  586. package/docs/changelogs/changelog-2026-11-12.md +44 -0
  587. package/docs/changelogs/changelog-2026-11-13.md +48 -0
  588. package/docs/changelogs/changelog-2026-11-14.md +116 -0
  589. package/docs/changelogs/changelog-2026-11-15.md +31 -0
  590. package/docs/changelogs/changelog-2026-11-16.md +41 -0
  591. package/docs/changelogs/changelog-2026-11-17.md +25 -0
  592. package/docs/changelogs/changelog-2026-11-18.md +71 -0
  593. package/docs/changelogs/changelog-2026-11-19.md +19 -0
  594. package/examples/cloud-showcase.plan.md +181 -0
  595. package/examples/component-showcase.plan.md +378 -0
  596. package/examples/component-tour.plan.md +168 -0
  597. package/examples/data-table.plan.md +917 -0
  598. package/examples/execution-graph.json +15 -5
  599. package/examples/form-controls.plan.md +51 -0
  600. package/examples/live-plan.config.json +5 -0
  601. package/examples/rate-limit.plan.md +110 -78
  602. package/examples/submission-delivery-runbook.md +122 -0
  603. package/examples/submission-delivery.plan.md +107 -0
  604. package/examples/tables.plan.md +61 -0
  605. package/package.json +86 -15
  606. package/skills/live-plan/SKILL.md +381 -0
  607. package/skills/live-plan/primitives.md +738 -0
  608. package/skills/living-plan/SKILL.md +0 -71
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Stop other websites from driving the plan service through the person's browser.
3
+ *
4
+ * - A loopback peer must name this machine in Host. A DNS-rebound page connects to
5
+ * 127.0.0.1 but still sends its own hostname, so it is refused here.
6
+ * - A write that carries an Origin must come from the same host. Browsers send Origin
7
+ * on every cross-site POST, including plain-text ones that skip the CORS preflight.
8
+ * The CLI sends no Origin, so it is unaffected.
9
+ */
10
+ export declare function guardRequest(input: {
11
+ method: string;
12
+ host: string | null;
13
+ origin: string | null;
14
+ peer: string;
15
+ bindHost: string;
16
+ }): {
17
+ action: 'allow';
18
+ } | {
19
+ action: 'deny';
20
+ reason: string;
21
+ };
@@ -0,0 +1,42 @@
1
+ import { isLoopbackHost } from './localName';
2
+ import { MDNS_HOST } from './mdnsPacket';
3
+ const SAFE_METHODS = new Set(['GET', 'HEAD', 'OPTIONS']);
4
+ /** Hostname from a Host header value, without the port or IPv6 brackets. */
5
+ function hostName(host) {
6
+ const value = host.trim().toLowerCase();
7
+ if (value.startsWith('['))
8
+ return value.slice(1, value.indexOf(']'));
9
+ const colon = value.lastIndexOf(':');
10
+ return colon === -1 ? value : value.slice(0, colon);
11
+ }
12
+ /**
13
+ * Stop other websites from driving the plan service through the person's browser.
14
+ *
15
+ * - A loopback peer must name this machine in Host. A DNS-rebound page connects to
16
+ * 127.0.0.1 but still sends its own hostname, so it is refused here.
17
+ * - A write that carries an Origin must come from the same host. Browsers send Origin
18
+ * on every cross-site POST, including plain-text ones that skip the CORS preflight.
19
+ * The CLI sends no Origin, so it is unaffected.
20
+ */
21
+ export function guardRequest(input) {
22
+ if (isLoopbackHost(input.peer)) {
23
+ const name = input.host ? hostName(input.host) : '';
24
+ const bindName = hostName(input.bindHost);
25
+ const known = isLoopbackHost(name) || name === MDNS_HOST || (name !== '' && name === bindName);
26
+ if (!known)
27
+ return { action: 'deny', reason: 'Unknown host' };
28
+ }
29
+ if (!SAFE_METHODS.has(input.method.toUpperCase()) && input.origin !== null) {
30
+ let originHost = '';
31
+ try {
32
+ originHost = new URL(input.origin).host.toLowerCase();
33
+ }
34
+ catch {
35
+ originHost = '';
36
+ }
37
+ if (!originHost || originHost !== (input.host ?? '').trim().toLowerCase()) {
38
+ return { action: 'deny', reason: 'Cross-site request' };
39
+ }
40
+ }
41
+ return { action: 'allow' };
42
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared by the local session and the hosted plan: how a review round starts.
3
+ *
4
+ * Entering review clears the previous verdict so the person can give a new one. A verdict the agent
5
+ * has not received yet is the exception. It is kept, so a `review` started again after a drop prints
6
+ * it, and `mode review` is refused until `events` delivers it.
7
+ */
8
+ /** Refusal for `mode review` while the person's last verdict is still waiting for the agent. */
9
+ export declare const UNREAD_VERDICT = "The person already sent a review verdict that no agent has received. Run `live-plan events --url <plan-url>` to read it, then switch mode again.";
10
+ export declare const INVALID_ITERATION = "iteration must be a whole number of 1 or more";
11
+ /** A review round number from a request body. `undefined` keeps the round. `'invalid'` is a bad value. */
12
+ export declare function readIteration(value: unknown): number | undefined | 'invalid';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared by the local session and the hosted plan: how a review round starts.
3
+ *
4
+ * Entering review clears the previous verdict so the person can give a new one. A verdict the agent
5
+ * has not received yet is the exception. It is kept, so a `review` started again after a drop prints
6
+ * it, and `mode review` is refused until `events` delivers it.
7
+ */
8
+ /** Refusal for `mode review` while the person's last verdict is still waiting for the agent. */
9
+ export const UNREAD_VERDICT = 'The person already sent a review verdict that no agent has received. Run `live-plan events --url <plan-url>` to read it, then switch mode again.';
10
+ export const INVALID_ITERATION = 'iteration must be a whole number of 1 or more';
11
+ /** A review round number from a request body. `undefined` keeps the round. `'invalid'` is a bad value. */
12
+ export function readIteration(value) {
13
+ if (value === undefined || value === null)
14
+ return undefined;
15
+ const number = typeof value === 'string' && value.trim() !== '' ? Number(value) : value;
16
+ if (typeof number !== 'number' || !Number.isInteger(number) || number < 1)
17
+ return 'invalid';
18
+ return number;
19
+ }
@@ -0,0 +1,28 @@
1
+ import type { ExecutionState } from './execution';
2
+ import type { InteractionResponse } from './types';
3
+ /**
4
+ * After the person approves, the run follows the plan file, so the agent does not have to call
5
+ * `execution start` and `execution stop`.
6
+ *
7
+ * - Approval (a review verdict of approve, or an approve gate answered yes) arms it. The approval
8
+ * itself starts nothing: the agent has not read it yet, and the person may still be answering.
9
+ * - While armed and stopped, an edit to the plan file that leaves a workflow step past pending
10
+ * starts the run (`mayStart`). The page shows Executing.
11
+ * - While running, every step done or a step failed ends it. The page shows Completed or Stopped.
12
+ * It stays armed, so a step set back to active starts the run again.
13
+ * - An explicit `execution stop` turns it off until the next approval. `execution start` and `push`
14
+ * still work and leave it as it is.
15
+ *
16
+ * Ending a run whose steps are all done or failed happens whatever started it, so a forgotten
17
+ * `execution stop` no longer leaves the page on Executing.
18
+ */
19
+ export declare function nextRunState(view: ExecutionState, options?: {
20
+ mayStart?: boolean;
21
+ }): {
22
+ active: boolean;
23
+ } | null;
24
+ /** The approval that arms the run: an approve verdict, or an approve gate answered yes. */
25
+ export declare function approvesRun(input: {
26
+ decision?: string;
27
+ response?: InteractionResponse | null;
28
+ }): boolean;
@@ -0,0 +1,33 @@
1
+ import { workState } from './planStatus';
2
+ /**
3
+ * After the person approves, the run follows the plan file, so the agent does not have to call
4
+ * `execution start` and `execution stop`.
5
+ *
6
+ * - Approval (a review verdict of approve, or an approve gate answered yes) arms it. The approval
7
+ * itself starts nothing: the agent has not read it yet, and the person may still be answering.
8
+ * - While armed and stopped, an edit to the plan file that leaves a workflow step past pending
9
+ * starts the run (`mayStart`). The page shows Executing.
10
+ * - While running, every step done or a step failed ends it. The page shows Completed or Stopped.
11
+ * It stays armed, so a step set back to active starts the run again.
12
+ * - An explicit `execution stop` turns it off until the next approval. `execution start` and `push`
13
+ * still work and leave it as it is.
14
+ *
15
+ * Ending a run whose steps are all done or failed happens whatever started it, so a forgotten
16
+ * `execution stop` no longer leaves the page on Executing.
17
+ */
18
+ export function nextRunState(view, options = {}) {
19
+ // A pushed graph without a node list is logged by the session and does not count here.
20
+ const graph = Array.isArray(view.graph?.nodes) ? view.graph : undefined;
21
+ const work = workState({ planned: view.planned, graph });
22
+ if (view.active)
23
+ return work === 'completed' || work === 'failed' ? { active: false } : null;
24
+ if (options.mayStart && view.follow === 'armed' && work === 'started')
25
+ return { active: true };
26
+ return null;
27
+ }
28
+ /** The approval that arms the run: an approve verdict, or an approve gate answered yes. */
29
+ export function approvesRun(input) {
30
+ if (input.decision === 'approve')
31
+ return true;
32
+ return input.response?.kind === 'approve' && input.response.approved === true;
33
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Term matching for plan search. Exact matching is a substring test, the same as before
3
+ * fuzzy search existed. Fuzzy matching also accepts a word that starts with the term,
4
+ * a word one or two typos away from it, and words run together ("ratelimit").
5
+ * Pure, no I/O, so the local service and the Worker share it.
6
+ */
7
+ /** Where a term was found in one text, as offsets into that text. */
8
+ export type TermSpot = {
9
+ start: number;
10
+ end: number;
11
+ };
12
+ export type Matcher = {
13
+ readonly fuzzy: boolean;
14
+ /** How well a lowercase term matches somewhere in the text: 0 for no match, 1 for an exact word. */
15
+ score(text: string, term: string): number;
16
+ /** The earliest place the term matches in the text, or null. */
17
+ locate(text: string, term: string): TermSpot | null;
18
+ /** Every range in the text that matches one of the terms, sorted and merged, for highlighting. */
19
+ ranges(text: string, terms: string[]): Array<[number, number]>;
20
+ };
21
+ export declare function createMatcher(fuzzy: boolean): Matcher;
22
+ /**
23
+ * How well a query word matches one text word, both lowercase. 0 is no match.
24
+ * Words up to three letters match exactly or as a word start only. Longer words allow
25
+ * one typo, and words of eight letters or more allow two. A swap of two neighbouring
26
+ * letters is one typo. The first letter has to match, or be swapped with the second.
27
+ */
28
+ export declare function scoreWord(term: string, word: string): number;
29
+ /** Typos a query word may have: none up to three letters, one up to seven, two from eight. */
30
+ export declare function typoBudget(term: string): number;
31
+ /**
32
+ * Optimal string alignment distance (Levenshtein plus swapped neighbours), stopping once
33
+ * it is past `max`. Returns `max + 1` for anything further.
34
+ */
35
+ export declare function editDistance(a: string, b: string, max: number): number;
@@ -0,0 +1,270 @@
1
+ /**
2
+ * Term matching for plan search. Exact matching is a substring test, the same as before
3
+ * fuzzy search existed. Fuzzy matching also accepts a word that starts with the term,
4
+ * a word one or two typos away from it, and words run together ("ratelimit").
5
+ * Pure, no I/O, so the local service and the Worker share it.
6
+ */
7
+ /** Score of an exact match that is a whole word. */
8
+ const WHOLE_WORD = 1;
9
+ /** Score of an exact match at the start of a word. */
10
+ const WORD_START = 0.9;
11
+ /** Score of an exact match inside a word. */
12
+ const INSIDE_WORD = 0.8;
13
+ /** Words run together, such as "ratelimit" for "rate limiting". */
14
+ const JOINED_WORDS = 0.75;
15
+ /** One typo away from a whole word. Each further typo costs FURTHER_TYPO. */
16
+ const TYPO = 0.7;
17
+ /** One typo away from the start of a word. */
18
+ const TYPO_START = 0.6;
19
+ const FURTHER_TYPO = 0.15;
20
+ /** A phrase found word by word across punctuation, as a share of its words' scores. */
21
+ const PHRASE_WORDS = 0.95;
22
+ /** Most distinct words one matcher remembers scores for, per term. */
23
+ const CACHE_LIMIT = 20_000;
24
+ const WORD = /[\p{L}\p{N}_]+/gu;
25
+ export function createMatcher(fuzzy) {
26
+ const cache = new Map();
27
+ function wordScore(term, word) {
28
+ let known = cache.get(term);
29
+ if (!known) {
30
+ known = new Map();
31
+ cache.set(term, known);
32
+ }
33
+ const hit = known.get(word);
34
+ if (hit !== undefined)
35
+ return hit;
36
+ if (known.size >= CACHE_LIMIT)
37
+ known.clear();
38
+ const value = scoreWord(term, word);
39
+ known.set(word, value);
40
+ return value;
41
+ }
42
+ /** Best fuzzy score for the term over the text's words, and where the first good word is. */
43
+ function fuzzyFind(lower, term) {
44
+ const parts = term.match(WORD);
45
+ if (!parts || parts.length === 0)
46
+ return { score: 0, spot: null };
47
+ const words = wordsOf(lower);
48
+ let best = 0;
49
+ let spot = null;
50
+ for (let index = 0; index < words.length; index += 1) {
51
+ let value = 0;
52
+ let end = index;
53
+ if (parts.length === 1) {
54
+ value = wordScore(parts[0], words[index].text);
55
+ if (value < JOINED_WORDS && parts[0].length >= 5) {
56
+ const joined = joinedScore(parts[0], words, index);
57
+ if (joined.score > value) {
58
+ value = joined.score;
59
+ end = joined.end;
60
+ }
61
+ }
62
+ }
63
+ else if (index + parts.length <= words.length) {
64
+ // A phrase matches consecutive words, each one on its own.
65
+ let total = 0;
66
+ for (let part = 0; part < parts.length; part += 1) {
67
+ const one = wordScore(parts[part], words[index + part].text);
68
+ if (one === 0) {
69
+ total = 0;
70
+ break;
71
+ }
72
+ total += one;
73
+ }
74
+ // Just under an exact phrase, so "Fail open" ranks above "fail-open".
75
+ value = (total / parts.length) * PHRASE_WORDS;
76
+ end = index + parts.length - 1;
77
+ }
78
+ if (value <= 0)
79
+ continue;
80
+ if (!spot)
81
+ spot = { start: words[index].start, end: words[end].end };
82
+ if (value > best)
83
+ best = value;
84
+ }
85
+ return { score: best, spot };
86
+ }
87
+ function exactScore(lower, term) {
88
+ if (!fuzzy)
89
+ return lower.includes(term) ? WHOLE_WORD : 0;
90
+ let best = 0;
91
+ let at = lower.indexOf(term);
92
+ while (at !== -1 && best < WHOLE_WORD) {
93
+ const before = at === 0 || !isWordChar(lower[at - 1]);
94
+ const after = at + term.length >= lower.length || !isWordChar(lower[at + term.length]);
95
+ const value = before && after ? WHOLE_WORD : before ? WORD_START : INSIDE_WORD;
96
+ if (value > best)
97
+ best = value;
98
+ at = lower.indexOf(term, at + 1);
99
+ }
100
+ return best;
101
+ }
102
+ return {
103
+ fuzzy,
104
+ score(text, term) {
105
+ if (!term)
106
+ return 0;
107
+ const lower = text.toLowerCase();
108
+ const exact = exactScore(lower, term);
109
+ // No fuzzy match scores above an exact one.
110
+ if (exact > 0 || !fuzzy)
111
+ return exact;
112
+ return fuzzyFind(lower, term).score;
113
+ },
114
+ locate(text, term) {
115
+ if (!term)
116
+ return null;
117
+ const lower = text.toLowerCase();
118
+ const at = lower.indexOf(term);
119
+ if (at !== -1)
120
+ return { start: at, end: at + term.length };
121
+ if (!fuzzy)
122
+ return null;
123
+ return fuzzyFind(lower, term).spot;
124
+ },
125
+ ranges(text, terms) {
126
+ const lower = text.toLowerCase();
127
+ const found = [];
128
+ for (const term of terms) {
129
+ if (!term)
130
+ continue;
131
+ for (let at = lower.indexOf(term); at !== -1; at = lower.indexOf(term, at + term.length)) {
132
+ found.push([at, at + term.length]);
133
+ }
134
+ if (!fuzzy)
135
+ continue;
136
+ const parts = term.match(WORD);
137
+ if (!parts || parts.length === 0)
138
+ continue;
139
+ const words = wordsOf(lower);
140
+ for (let index = 0; index + parts.length <= words.length; index += 1) {
141
+ if (parts.length === 1) {
142
+ if (wordScore(parts[0], words[index].text) > 0)
143
+ found.push([words[index].start, words[index].end]);
144
+ else if (parts[0].length >= 5) {
145
+ const joined = joinedScore(parts[0], words, index);
146
+ if (joined.score > 0)
147
+ found.push([words[index].start, words[joined.end].end]);
148
+ }
149
+ continue;
150
+ }
151
+ if (parts.every((part, offset) => wordScore(part, words[index + offset].text) > 0)) {
152
+ found.push([words[index].start, words[index + parts.length - 1].end]);
153
+ }
154
+ }
155
+ }
156
+ return merged(found);
157
+ },
158
+ };
159
+ }
160
+ /**
161
+ * How well a query word matches one text word, both lowercase. 0 is no match.
162
+ * Words up to three letters match exactly or as a word start only. Longer words allow
163
+ * one typo, and words of eight letters or more allow two. A swap of two neighbouring
164
+ * letters is one typo. The first letter has to match, or be swapped with the second.
165
+ */
166
+ export function scoreWord(term, word) {
167
+ if (!term || !word)
168
+ return 0;
169
+ if (word === term)
170
+ return WHOLE_WORD;
171
+ if (word.startsWith(term))
172
+ return WORD_START;
173
+ if (term.length >= 3 && word.includes(term))
174
+ return INSIDE_WORD;
175
+ const allowed = typoBudget(term);
176
+ if (allowed === 0)
177
+ return 0;
178
+ const first = word[0] === term[0] || (word[0] === term[1] && word[1] === term[0]);
179
+ if (!first)
180
+ return 0;
181
+ const whole = editDistance(term, word, allowed);
182
+ if (whole <= allowed)
183
+ return TYPO - FURTHER_TYPO * (whole - 1);
184
+ if (word.length > term.length) {
185
+ let start = allowed + 1;
186
+ for (let length = term.length - 1; length <= term.length + 1; length += 1) {
187
+ if (length < 1 || length >= word.length)
188
+ continue;
189
+ start = Math.min(start, editDistance(term, word.slice(0, length), allowed));
190
+ }
191
+ if (start <= allowed)
192
+ return TYPO_START - FURTHER_TYPO * (start - 1);
193
+ }
194
+ return 0;
195
+ }
196
+ /** Typos a query word may have: none up to three letters, one up to seven, two from eight. */
197
+ export function typoBudget(term) {
198
+ if (term.length >= 8)
199
+ return 2;
200
+ if (term.length >= 4)
201
+ return 1;
202
+ return 0;
203
+ }
204
+ /**
205
+ * Optimal string alignment distance (Levenshtein plus swapped neighbours), stopping once
206
+ * it is past `max`. Returns `max + 1` for anything further.
207
+ */
208
+ export function editDistance(a, b, max) {
209
+ if (a === b)
210
+ return 0;
211
+ if (Math.abs(a.length - b.length) > max)
212
+ return max + 1;
213
+ let before = [];
214
+ let previous = Array.from({ length: b.length + 1 }, (_, index) => index);
215
+ for (let i = 1; i <= a.length; i += 1) {
216
+ const current = [i];
217
+ let lowest = i;
218
+ for (let j = 1; j <= b.length; j += 1) {
219
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
220
+ let value = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + cost);
221
+ if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1])
222
+ value = Math.min(value, before[j - 2] + 1);
223
+ current[j] = value;
224
+ if (value < lowest)
225
+ lowest = value;
226
+ }
227
+ if (lowest > max)
228
+ return max + 1;
229
+ before = previous;
230
+ previous = current;
231
+ }
232
+ return Math.min(previous[b.length], max + 1);
233
+ }
234
+ /** "ratelimit" against "rate limiting": two or three words read as one. */
235
+ function joinedScore(term, words, index) {
236
+ let text = words[index].text;
237
+ if (!term.startsWith(text) || text.length >= term.length)
238
+ return { score: 0, end: index };
239
+ for (let next = index + 1; next < words.length && next <= index + 2; next += 1) {
240
+ text += words[next].text;
241
+ if (text.startsWith(term))
242
+ return { score: JOINED_WORDS, end: next };
243
+ if (!term.startsWith(text))
244
+ break;
245
+ }
246
+ return { score: 0, end: index };
247
+ }
248
+ function wordsOf(lower) {
249
+ const words = [];
250
+ for (const match of lower.matchAll(WORD)) {
251
+ const start = match.index ?? 0;
252
+ words.push({ text: match[0], start, end: start + match[0].length });
253
+ }
254
+ return words;
255
+ }
256
+ function isWordChar(char) {
257
+ return /[\p{L}\p{N}_]/u.test(char);
258
+ }
259
+ function merged(ranges) {
260
+ const sorted = [...ranges].sort((a, b) => a[0] - b[0] || b[1] - a[1]);
261
+ const out = [];
262
+ for (const range of sorted) {
263
+ const last = out[out.length - 1];
264
+ if (last && range[0] <= last[1])
265
+ last[1] = Math.max(last[1], range[1]);
266
+ else
267
+ out.push([range[0], range[1]]);
268
+ }
269
+ return out;
270
+ }
@@ -0,0 +1,24 @@
1
+ import { type PlanSession } from './planSession';
2
+ import type { PlanMode } from './processRecord';
3
+ import type { InteractionResponse, ReviewResult } from './types';
4
+ export type LivingPlanServer = {
5
+ port: number;
6
+ url: string;
7
+ close: () => Promise<void>;
8
+ waitForInteraction: (id: string, timeoutMs?: number) => Promise<InteractionResponse>;
9
+ waitForReview: (timeoutMs?: number) => Promise<ReviewResult>;
10
+ getState: () => ReturnType<PlanSession['getState']>;
11
+ };
12
+ export declare function startLivingPlanServer(options: {
13
+ planPath: string;
14
+ mode: PlanMode;
15
+ port?: number;
16
+ iteration?: number;
17
+ host?: string;
18
+ /** Shared registry this page proxies so the plans panel stays same-origin. */
19
+ registry?: {
20
+ url: string;
21
+ selfId: string;
22
+ };
23
+ configPath?: string;
24
+ }): Promise<LivingPlanServer>;
package/dist/server.js ADDED
@@ -0,0 +1,114 @@
1
+ import { randomBytes } from 'node:crypto';
2
+ import { Elysia } from 'elysia';
3
+ import { HttpError } from './http';
4
+ import { bindElysia } from './httpServer';
5
+ import { installServiceLogCapture, recordUnexpectedError } from './serviceLog';
6
+ import { formatHttpOrigin } from './localName';
7
+ import { currentPeer } from './lanAccess';
8
+ import { registerPlanRoutes } from './planRoutes';
9
+ import { guardRequest } from './requestGuard';
10
+ import { openPlanSession } from './planSession';
11
+ export async function startLivingPlanServer(options) {
12
+ installServiceLogCapture();
13
+ const host = options.host ?? '127.0.0.1';
14
+ const selfId = options.registry?.selfId ?? randomBytes(16).toString('hex');
15
+ const session = await openPlanSession({
16
+ id: selfId,
17
+ token: randomBytes(24).toString('hex'),
18
+ planPath: options.planPath,
19
+ mode: options.mode,
20
+ iteration: options.iteration,
21
+ configPath: options.configPath,
22
+ cwd: process.cwd(),
23
+ basePath: '',
24
+ // A private page links to the shared dashboard when it has one.
25
+ dashboardHref: options.registry ? new URL('/dashboard', options.registry.url).href : null,
26
+ selfId,
27
+ });
28
+ async function processList() {
29
+ if (!options.registry) {
30
+ return { status: 'disabled', selfId: null, registryUrl: null, processes: [] };
31
+ }
32
+ try {
33
+ const response = await fetch(new URL('/api/processes', options.registry.url), {
34
+ signal: AbortSignal.timeout(1_500),
35
+ });
36
+ if (!response.ok) {
37
+ return {
38
+ status: 'offline',
39
+ selfId: options.registry.selfId,
40
+ registryUrl: options.registry.url,
41
+ processes: [],
42
+ };
43
+ }
44
+ const payload = (await response.json());
45
+ return {
46
+ status: 'ok',
47
+ selfId: options.registry.selfId,
48
+ registryUrl: options.registry.url,
49
+ processes: Array.isArray(payload.processes) ? payload.processes : [],
50
+ };
51
+ }
52
+ catch {
53
+ return {
54
+ status: 'offline',
55
+ selfId: options.registry.selfId,
56
+ registryUrl: options.registry.url,
57
+ processes: [],
58
+ };
59
+ }
60
+ }
61
+ const app = registerPlanRoutes(new Elysia({ strictPath: true })
62
+ .onBeforeHandle(({ request, set }) => {
63
+ set.headers['cache-control'] = 'no-store';
64
+ const guard = guardRequest({
65
+ method: request.method,
66
+ host: request.headers.get('host'),
67
+ origin: request.headers.get('origin'),
68
+ peer: currentPeer(),
69
+ bindHost: host,
70
+ });
71
+ if (guard.action === 'deny') {
72
+ set.status = 403;
73
+ return { error: guard.reason };
74
+ }
75
+ })
76
+ .onError(({ code, error, set, request }) => {
77
+ if (error instanceof HttpError) {
78
+ set.status = error.status;
79
+ if (error.status >= 500)
80
+ recordUnexpectedError(error, request);
81
+ return { error: error.message };
82
+ }
83
+ if (code === 'NOT_FOUND') {
84
+ set.status = 404;
85
+ return { error: 'Not found' };
86
+ }
87
+ set.status = 500;
88
+ recordUnexpectedError(error, request);
89
+ return { error: error instanceof Error ? error.message : 'Unknown error' };
90
+ })
91
+ .get('/api/processes', () => processList()), {
92
+ hosted: false,
93
+ resolve: () => session,
94
+ });
95
+ const bound = bindElysia(app, host, options.port ?? 0);
96
+ const url = formatHttpOrigin(host, bound.port);
97
+ return {
98
+ port: bound.port,
99
+ url,
100
+ async close() {
101
+ await session.close();
102
+ await bound.stop();
103
+ },
104
+ waitForInteraction(id, timeoutMs) {
105
+ return session.waitForInteraction(id, timeoutMs);
106
+ },
107
+ waitForReview(timeoutMs) {
108
+ return session.waitForReview(timeoutMs);
109
+ },
110
+ getState() {
111
+ return session.getState();
112
+ },
113
+ };
114
+ }
@@ -0,0 +1,56 @@
1
+ export type LogLevel = 'error' | 'warn' | 'log';
2
+ export type ServiceLogEntry = {
3
+ id: string;
4
+ level: LogLevel;
5
+ message: string;
6
+ detail?: string;
7
+ source: string;
8
+ planId?: string;
9
+ at: number;
10
+ /** Present when an older reader counted duplicates. New lines are one event each. */
11
+ repeat: number;
12
+ };
13
+ /** Directory that holds the log files. Tests set `LIVE_PLAN_LOG_HOME`. */
14
+ export declare function appLogHome(): string;
15
+ /** Local calendar day, matching the daily file name winston writes. */
16
+ export declare function localLogDay(now?: Date): string;
17
+ export declare function isLogDay(value: string): boolean;
18
+ /** Wait for every write in flight. A write that failed has already been reported to its caller. */
19
+ export declare function flushAppLogs(): Promise<void>;
20
+ /**
21
+ * Append one diagnostic line.
22
+ * Plan events go to the daily registry file and to `plans/<planId>.log`.
23
+ * Everything else goes to the daily file only.
24
+ */
25
+ export declare function recordLog(input: {
26
+ level: LogLevel;
27
+ message: string;
28
+ detail?: string;
29
+ source?: string;
30
+ planId?: string;
31
+ echo?: boolean;
32
+ }): Promise<ServiceLogEntry>;
33
+ export declare function clearLogs(): Promise<void>;
34
+ /** Copy `console.error`, `console.warn`, and `console.log` into the service log. */
35
+ export declare function installServiceLogCapture(): void;
36
+ export declare function acceptClientLog(body: unknown, planId?: string, options?: {
37
+ echo?: boolean;
38
+ }): Promise<{
39
+ status: number;
40
+ body: unknown;
41
+ }>;
42
+ export declare function listLogs(options?: {
43
+ level?: LogLevel;
44
+ planId?: string;
45
+ includeUnscoped?: boolean;
46
+ limit?: number;
47
+ day?: string;
48
+ }): Promise<ServiceLogEntry[]>;
49
+ export declare function readLogs(request: Request, planId?: string): Promise<{
50
+ status: number;
51
+ body: unknown;
52
+ }>;
53
+ export declare function planIdFromRequest(request: Request | undefined): string | undefined;
54
+ /** Record a failure the route handler turned into HTTP 500. Validation responses stay quiet. */
55
+ export declare function recordUnexpectedError(error: unknown, request?: Request): void;
56
+ export declare function formatServiceLogLines(logs: ServiceLogEntry[]): string;