@repo-os/repoos 0.5.45

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 (362) hide show
  1. package/LICENSE.md +110 -0
  2. package/README.md +272 -0
  3. package/dist/.build-info.json +4 -0
  4. package/dist/.build-stamp.json +3 -0
  5. package/dist/cli/colors.d.ts +13 -0
  6. package/dist/cli/colors.js +37 -0
  7. package/dist/cli/index.d.ts +2 -0
  8. package/dist/cli/index.js +221 -0
  9. package/dist/commands/check.d.ts +170 -0
  10. package/dist/commands/check.js +1227 -0
  11. package/dist/commands/docs.d.ts +2 -0
  12. package/dist/commands/docs.js +70 -0
  13. package/dist/commands/gc.d.ts +1 -0
  14. package/dist/commands/gc.js +57 -0
  15. package/dist/commands/init.d.ts +9 -0
  16. package/dist/commands/init.js +699 -0
  17. package/dist/commands/screenshots.d.ts +7 -0
  18. package/dist/commands/screenshots.js +77 -0
  19. package/dist/commands/serve.d.ts +55 -0
  20. package/dist/commands/serve.js +204 -0
  21. package/dist/commands/status.d.ts +140 -0
  22. package/dist/commands/status.js +569 -0
  23. package/dist/commands/stop.d.ts +1 -0
  24. package/dist/commands/stop.js +59 -0
  25. package/dist/commands/tasks.d.ts +47 -0
  26. package/dist/commands/tasks.js +334 -0
  27. package/dist/commands/tunnel.d.ts +1 -0
  28. package/dist/commands/tunnel.js +1271 -0
  29. package/dist/commands/ui-harness.d.ts +53 -0
  30. package/dist/commands/ui-harness.js +62 -0
  31. package/dist/commands/ui-smoke.d.ts +6 -0
  32. package/dist/commands/ui-smoke.js +220 -0
  33. package/dist/commands/upgrade.d.ts +15 -0
  34. package/dist/commands/upgrade.js +188 -0
  35. package/dist/core/auth-store.d.ts +81 -0
  36. package/dist/core/auth-store.js +530 -0
  37. package/dist/core/auth.d.ts +75 -0
  38. package/dist/core/auth.js +124 -0
  39. package/dist/core/bootstrap.d.ts +41 -0
  40. package/dist/core/bootstrap.js +236 -0
  41. package/dist/core/build.d.ts +92 -0
  42. package/dist/core/build.js +249 -0
  43. package/dist/core/canary.d.ts +10 -0
  44. package/dist/core/canary.js +14 -0
  45. package/dist/core/check-failure-summary.d.ts +10 -0
  46. package/dist/core/check-failure-summary.js +34 -0
  47. package/dist/core/config.d.ts +160 -0
  48. package/dist/core/config.js +1288 -0
  49. package/dist/core/context-pack.d.ts +74 -0
  50. package/dist/core/context-pack.js +778 -0
  51. package/dist/core/db.d.ts +236 -0
  52. package/dist/core/db.js +747 -0
  53. package/dist/core/detect.d.ts +69 -0
  54. package/dist/core/detect.js +251 -0
  55. package/dist/core/docs.d.ts +76 -0
  56. package/dist/core/docs.js +225 -0
  57. package/dist/core/frontmatter.d.ts +29 -0
  58. package/dist/core/frontmatter.js +215 -0
  59. package/dist/core/git.d.ts +505 -0
  60. package/dist/core/git.js +1453 -0
  61. package/dist/core/indexer.d.ts +33 -0
  62. package/dist/core/indexer.js +282 -0
  63. package/dist/core/input.d.ts +66 -0
  64. package/dist/core/input.js +222 -0
  65. package/dist/core/logger.d.ts +70 -0
  66. package/dist/core/logger.js +138 -0
  67. package/dist/core/models.d.ts +45 -0
  68. package/dist/core/models.js +291 -0
  69. package/dist/core/net-probe.d.ts +4 -0
  70. package/dist/core/net-probe.js +20 -0
  71. package/dist/core/providers/deepinfra.d.ts +23 -0
  72. package/dist/core/providers/deepinfra.js +44 -0
  73. package/dist/core/providers/index.d.ts +24 -0
  74. package/dist/core/providers/index.js +59 -0
  75. package/dist/core/providers/openrouter.d.ts +28 -0
  76. package/dist/core/providers/openrouter.js +82 -0
  77. package/dist/core/providers/spend.d.ts +86 -0
  78. package/dist/core/providers/spend.js +286 -0
  79. package/dist/core/providers/types.d.ts +56 -0
  80. package/dist/core/providers/types.js +39 -0
  81. package/dist/core/repoos.d.ts +59 -0
  82. package/dist/core/repoos.js +221 -0
  83. package/dist/core/runtime.d.ts +35 -0
  84. package/dist/core/runtime.js +167 -0
  85. package/dist/core/skills-registry.d.ts +39 -0
  86. package/dist/core/skills-registry.js +148 -0
  87. package/dist/core/skills-registry.test.d.ts +1 -0
  88. package/dist/core/skills-registry.test.js +52 -0
  89. package/dist/core/sysmem.d.ts +7 -0
  90. package/dist/core/sysmem.js +55 -0
  91. package/dist/core/tailscale.d.ts +2 -0
  92. package/dist/core/tailscale.js +19 -0
  93. package/dist/core/task.d.ts +53 -0
  94. package/dist/core/task.js +310 -0
  95. package/dist/core/toml-line.d.ts +20 -0
  96. package/dist/core/toml-line.js +52 -0
  97. package/dist/core/toml-validate.d.ts +44 -0
  98. package/dist/core/toml-validate.js +335 -0
  99. package/dist/core/tunnel-assistant.d.ts +30 -0
  100. package/dist/core/tunnel-assistant.js +65 -0
  101. package/dist/core/tunnel-registry.d.ts +96 -0
  102. package/dist/core/tunnel-registry.js +267 -0
  103. package/dist/core/tunnel-registry.test.d.ts +1 -0
  104. package/dist/core/tunnel-registry.test.js +309 -0
  105. package/dist/core/tunnel.d.ts +103 -0
  106. package/dist/core/tunnel.js +320 -0
  107. package/dist/core/types.d.ts +811 -0
  108. package/dist/core/types.js +27 -0
  109. package/dist/core/worktree-gc.d.ts +57 -0
  110. package/dist/core/worktree-gc.js +194 -0
  111. package/dist/server/__tests__/integration-job.test.d.ts +1 -0
  112. package/dist/server/__tests__/integration-job.test.js +129 -0
  113. package/dist/server/agents.d.ts +1020 -0
  114. package/dist/server/agents.js +4070 -0
  115. package/dist/server/attachments.d.ts +51 -0
  116. package/dist/server/attachments.js +130 -0
  117. package/dist/server/auto-engineering.d.ts +45 -0
  118. package/dist/server/auto-engineering.js +275 -0
  119. package/dist/server/branchless-release.d.ts +22 -0
  120. package/dist/server/branchless-release.js +67 -0
  121. package/dist/server/built-in-agents.d.ts +305 -0
  122. package/dist/server/built-in-agents.js +1838 -0
  123. package/dist/server/cto-monitor.d.ts +35 -0
  124. package/dist/server/cto-monitor.js +281 -0
  125. package/dist/server/cto.d.ts +125 -0
  126. package/dist/server/cto.js +590 -0
  127. package/dist/server/deployments.d.ts +119 -0
  128. package/dist/server/deployments.js +325 -0
  129. package/dist/server/diff-snapshot.d.ts +20 -0
  130. package/dist/server/diff-snapshot.js +73 -0
  131. package/dist/server/done.d.ts +160 -0
  132. package/dist/server/done.js +488 -0
  133. package/dist/server/freeform.d.ts +55 -0
  134. package/dist/server/freeform.js +179 -0
  135. package/dist/server/handoff.d.ts +99 -0
  136. package/dist/server/handoff.js +575 -0
  137. package/dist/server/hetzner.d.ts +45 -0
  138. package/dist/server/hetzner.js +117 -0
  139. package/dist/server/icons.d.ts +8 -0
  140. package/dist/server/icons.js +195 -0
  141. package/dist/server/integration-job.d.ts +75 -0
  142. package/dist/server/integration-job.js +144 -0
  143. package/dist/server/integration-orchestrator.d.ts +211 -0
  144. package/dist/server/integration-orchestrator.js +1299 -0
  145. package/dist/server/integration-status.d.ts +48 -0
  146. package/dist/server/integration-status.js +71 -0
  147. package/dist/server/live-index.d.ts +295 -0
  148. package/dist/server/live-index.js +452 -0
  149. package/dist/server/model-test.d.ts +20 -0
  150. package/dist/server/model-test.js +100 -0
  151. package/dist/server/ntfy.d.ts +57 -0
  152. package/dist/server/ntfy.js +112 -0
  153. package/dist/server/pm-attachments.d.ts +35 -0
  154. package/dist/server/pm-attachments.js +181 -0
  155. package/dist/server/pm-runs.d.ts +58 -0
  156. package/dist/server/pm-runs.js +80 -0
  157. package/dist/server/preview.d.ts +174 -0
  158. package/dist/server/preview.js +641 -0
  159. package/dist/server/release.d.ts +88 -0
  160. package/dist/server/release.js +449 -0
  161. package/dist/server/reload.d.ts +194 -0
  162. package/dist/server/reload.js +586 -0
  163. package/dist/server/remote-validation.d.ts +132 -0
  164. package/dist/server/remote-validation.js +478 -0
  165. package/dist/server/repo-lock.d.ts +36 -0
  166. package/dist/server/repo-lock.js +141 -0
  167. package/dist/server/review-guard.d.ts +14 -0
  168. package/dist/server/review-guard.js +159 -0
  169. package/dist/server/review.d.ts +243 -0
  170. package/dist/server/review.js +1211 -0
  171. package/dist/server/routes/agents.d.ts +6 -0
  172. package/dist/server/routes/agents.js +28 -0
  173. package/dist/server/routes/auth.d.ts +60 -0
  174. package/dist/server/routes/auth.js +755 -0
  175. package/dist/server/routes/config.d.ts +20 -0
  176. package/dist/server/routes/config.js +347 -0
  177. package/dist/server/routes/debugger.d.ts +33 -0
  178. package/dist/server/routes/debugger.js +360 -0
  179. package/dist/server/routes/deployments.d.ts +3 -0
  180. package/dist/server/routes/deployments.js +16 -0
  181. package/dist/server/routes/docs.d.ts +8 -0
  182. package/dist/server/routes/docs.js +135 -0
  183. package/dist/server/routes/helpers.d.ts +21 -0
  184. package/dist/server/routes/helpers.js +171 -0
  185. package/dist/server/routes/index.d.ts +19 -0
  186. package/dist/server/routes/index.js +18 -0
  187. package/dist/server/routes/info.d.ts +17 -0
  188. package/dist/server/routes/info.js +177 -0
  189. package/dist/server/routes/inputs.d.ts +7 -0
  190. package/dist/server/routes/inputs.js +125 -0
  191. package/dist/server/routes/model-providers.d.ts +27 -0
  192. package/dist/server/routes/model-providers.js +94 -0
  193. package/dist/server/routes/models.d.ts +3 -0
  194. package/dist/server/routes/models.js +36 -0
  195. package/dist/server/routes/notify.d.ts +2 -0
  196. package/dist/server/routes/notify.js +17 -0
  197. package/dist/server/routes/playground.d.ts +29 -0
  198. package/dist/server/routes/playground.js +81 -0
  199. package/dist/server/routes/release.d.ts +20 -0
  200. package/dist/server/routes/release.js +86 -0
  201. package/dist/server/routes/router.d.ts +12 -0
  202. package/dist/server/routes/router.js +32 -0
  203. package/dist/server/routes/skill-registry.d.ts +5 -0
  204. package/dist/server/routes/skill-registry.js +51 -0
  205. package/dist/server/routes/tasks.d.ts +58 -0
  206. package/dist/server/routes/tasks.js +1442 -0
  207. package/dist/server/routes/transcribe.d.ts +2 -0
  208. package/dist/server/routes/transcribe.js +124 -0
  209. package/dist/server/routes/types.d.ts +68 -0
  210. package/dist/server/routes/types.js +1 -0
  211. package/dist/server/routes/ui.d.ts +5 -0
  212. package/dist/server/routes/ui.js +81 -0
  213. package/dist/server/routes/utils.d.ts +3 -0
  214. package/dist/server/routes/utils.js +23 -0
  215. package/dist/server/serve-reaper.d.ts +135 -0
  216. package/dist/server/serve-reaper.js +491 -0
  217. package/dist/server/server.d.ts +49 -0
  218. package/dist/server/server.js +2171 -0
  219. package/dist/server/supervisor.d.ts +89 -0
  220. package/dist/server/supervisor.js +231 -0
  221. package/dist/server/system.d.ts +198 -0
  222. package/dist/server/system.js +480 -0
  223. package/dist/server/task-check.d.ts +45 -0
  224. package/dist/server/task-check.js +71 -0
  225. package/dist/server/task-transitions.d.ts +51 -0
  226. package/dist/server/task-transitions.js +78 -0
  227. package/dist/server/task-watchdog.d.ts +158 -0
  228. package/dist/server/task-watchdog.js +681 -0
  229. package/dist/server/test-run.d.ts +28 -0
  230. package/dist/server/test-run.js +81 -0
  231. package/dist/server/watcher.d.ts +21 -0
  232. package/dist/server/watcher.js +194 -0
  233. package/dist/server/write.d.ts +94 -0
  234. package/dist/server/write.js +345 -0
  235. package/dist/ui/assets/AgentsView-CF4wRvHh.css +1 -0
  236. package/dist/ui/assets/AgentsView-D-myL-kA.js +1 -0
  237. package/dist/ui/assets/ContextView-D3TC-RSp.css +1 -0
  238. package/dist/ui/assets/ContextView-DsOqAdyE.js +4 -0
  239. package/dist/ui/assets/DashboardView-BOhsIJqO.js +1 -0
  240. package/dist/ui/assets/DashboardView-Ck9o0RP2.css +1 -0
  241. package/dist/ui/assets/DeploymentsView--iIUVfEH.css +1 -0
  242. package/dist/ui/assets/DeploymentsView-DXu_FYR2.js +1 -0
  243. package/dist/ui/assets/InputsView-24HVbVPk.js +1 -0
  244. package/dist/ui/assets/InputsView-BLb7GHtx.css +1 -0
  245. package/dist/ui/assets/LoginView-6QlGg6cx.css +1 -0
  246. package/dist/ui/assets/LoginView-BqupI0Lt.js +1 -0
  247. package/dist/ui/assets/ReleasesView-BEG1A0YH.css +1 -0
  248. package/dist/ui/assets/ReleasesView-CAgMuxpe.js +3 -0
  249. package/dist/ui/assets/SettingsView-CA-NYSMK.css +1 -0
  250. package/dist/ui/assets/SettingsView-O3iZSnjg.js +3 -0
  251. package/dist/ui/assets/WorkView-D8Tl6qwy.js +1 -0
  252. package/dist/ui/assets/WorkView-DMYL2s3W.css +1 -0
  253. package/dist/ui/assets/abnfDiagram-VCTEODGH-J5lkSnEE.js +1 -0
  254. package/dist/ui/assets/arc-BHZnmhhM.js +1 -0
  255. package/dist/ui/assets/architecture-7GRP2DOG-pLdFt-xS.js +1 -0
  256. package/dist/ui/assets/architectureDiagram-5GKGNRK7-C3k89uKX.js +36 -0
  257. package/dist/ui/assets/array-BifhSqXX.js +1 -0
  258. package/dist/ui/assets/blockDiagram-I7D4REHJ-AWNoBzop.js +129 -0
  259. package/dist/ui/assets/button-lbikqSph.js +1 -0
  260. package/dist/ui/assets/c4Diagram-7LVT6UL2-DKG1D5gd.js +38 -0
  261. package/dist/ui/assets/channel-gA4qBv3A.js +1 -0
  262. package/dist/ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  263. package/dist/ui/assets/chunk-4HAMMTFA-D1YR8lF_.js +62 -0
  264. package/dist/ui/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  265. package/dist/ui/assets/chunk-75Z2AOVW-5GuBxfsL.js +2 -0
  266. package/dist/ui/assets/chunk-DU6HZSFF-DfdNNqwa.js +127 -0
  267. package/dist/ui/assets/chunk-F27PBJKO-BPZzinQ4.js +1 -0
  268. package/dist/ui/assets/chunk-FOHPRMQF-l2z4K2jD.js +161 -0
  269. package/dist/ui/assets/chunk-GMAD6QVW-DGWvSKj5.js +72 -0
  270. package/dist/ui/assets/chunk-GVQU2GXP-D6Aw75wJ.js +1 -0
  271. package/dist/ui/assets/chunk-IMKFNOWR-B8mMBKCW.js +231 -0
  272. package/dist/ui/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  273. package/dist/ui/assets/chunk-L3NEJ4N5-D5OJuXYE.js +1 -0
  274. package/dist/ui/assets/chunk-OSK3NFVY-B7r9w2UW.js +10 -0
  275. package/dist/ui/assets/chunk-P2QGCYS3-C74X4AQX.js +1 -0
  276. package/dist/ui/assets/chunk-POPQ4Y6H-C5_u1gUS.js +1 -0
  277. package/dist/ui/assets/chunk-PWAF6VOD-DfoTLtxn.js +1 -0
  278. package/dist/ui/assets/chunk-SHT3W25Y-D40m2eqz.js +168 -0
  279. package/dist/ui/assets/chunk-SVP7TREG-euxi0Kap.js +88 -0
  280. package/dist/ui/assets/chunk-TICWLB2K-fkdxngzN.js +206 -0
  281. package/dist/ui/assets/chunk-XXDRQBXY-DFBUG-OT.js +1 -0
  282. package/dist/ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  283. package/dist/ui/assets/classDiagram-ZZMXUADV-BzW8bq2P.js +1 -0
  284. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-BzW8bq2P.js +1 -0
  285. package/dist/ui/assets/cose-bilkent-JH36ORCC-BTcgMon1.js +1 -0
  286. package/dist/ui/assets/cynefin-OW5HDTMX-B5m_COsS.js +1 -0
  287. package/dist/ui/assets/cynefinDiagram-5FMLGOSQ-C-AG6CGe.js +62 -0
  288. package/dist/ui/assets/cytoscape.esm-FBntH-9t.js +321 -0
  289. package/dist/ui/assets/dagre-GXQ25YYZ-DDfDnp8L.js +4 -0
  290. package/dist/ui/assets/dagre-PrKaheQc.js +1 -0
  291. package/dist/ui/assets/defaultLocale-BFoDCU3G.js +1 -0
  292. package/dist/ui/assets/diagram-S7CK7UJ4-DjQZAlEY.js +30 -0
  293. package/dist/ui/assets/diagram-UQ7AKVKN-DAZ9yp1B.js +41 -0
  294. package/dist/ui/assets/diagram-VSXAHHWV-BWepUKJD.js +3 -0
  295. package/dist/ui/assets/diagram-VX7I27RA-EcV1J81b.js +24 -0
  296. package/dist/ui/assets/diagram-Z3DM3KII-Dbz7XU_K.js +24 -0
  297. package/dist/ui/assets/dist-DTg6UBE_.js +1 -0
  298. package/dist/ui/assets/ebnfDiagram-PWID7BFC-BUyQw8Mm.js +1 -0
  299. package/dist/ui/assets/erDiagram-RLTQ6QDP-WVf8ukKt.js +99 -0
  300. package/dist/ui/assets/eventmodeling-NTZA5JFV-DHqyLOAn.js +1 -0
  301. package/dist/ui/assets/flowDiagram-HODETNUW-CYk_ze5K.js +1 -0
  302. package/dist/ui/assets/ganttDiagram-EL5Y4UJY-rB4MZuB-.js +292 -0
  303. package/dist/ui/assets/gitGraph-4MIJSDKK-BOTWM8dY.js +1 -0
  304. package/dist/ui/assets/gitGraphDiagram-WWUBYQGX-eYscuhtP.js +106 -0
  305. package/dist/ui/assets/graphlib-DS17s2tU.js +1 -0
  306. package/dist/ui/assets/index-BACBfnga.css +1 -0
  307. package/dist/ui/assets/index-BOQ-ust6.js +26 -0
  308. package/dist/ui/assets/info-A6RAGUB7-_67wOORe.js +1 -0
  309. package/dist/ui/assets/infoDiagram-27XIBGKW-XVXbddTA.js +2 -0
  310. package/dist/ui/assets/init-C-OQMol4.js +1 -0
  311. package/dist/ui/assets/ishikawaDiagram-5VMMS53U-ClLNiEru.js +70 -0
  312. package/dist/ui/assets/journeyDiagram-3NMN7TZE-NRawjR6i.js +139 -0
  313. package/dist/ui/assets/kanban-definition-UXKFOSKX-BgSzBfIx.js +89 -0
  314. package/dist/ui/assets/katex-DolUETbr.js +257 -0
  315. package/dist/ui/assets/line-KAyfuul4.js +1 -0
  316. package/dist/ui/assets/linear-cCCPOpu7.js +1 -0
  317. package/dist/ui/assets/mermaid-parser.core-CgXZk1iN.js +7 -0
  318. package/dist/ui/assets/mermaid.core-BUUkChHW.js +44 -0
  319. package/dist/ui/assets/mindmap-definition-YA3MSWOX-Cpn7vW4r.js +96 -0
  320. package/dist/ui/assets/ordinal-BDEzSJ7C.js +1 -0
  321. package/dist/ui/assets/packet-AYTQ26CC-0lZwM-d6.js +1 -0
  322. package/dist/ui/assets/path-COt_16Va.js +1 -0
  323. package/dist/ui/assets/pegDiagram-XKGWAZYB-impy0inn.js +1 -0
  324. package/dist/ui/assets/pie-WAS4IAKB-CqfdGHYg.js +1 -0
  325. package/dist/ui/assets/pieDiagram-E7YTZNPT-CxjL4I1h.js +39 -0
  326. package/dist/ui/assets/quadrantDiagram-AXDQQJYC-Cjd1QMIe.js +7 -0
  327. package/dist/ui/assets/radar-RG4KPBEZ-CRkQIwiv.js +1 -0
  328. package/dist/ui/assets/railroad-74A4TZTK-i67XSWTB.js +1 -0
  329. package/dist/ui/assets/railroad-abnf-HS5TGJTU-Cv9m5aS3.js +1 -0
  330. package/dist/ui/assets/railroad-ebnf-LZEXJU2U-C5ZIn-Jh.js +1 -0
  331. package/dist/ui/assets/railroad-peg-WCYAUIDC-CGra9Oq-.js +1 -0
  332. package/dist/ui/assets/railroadDiagram-O6MQD6OU-_pK0qyaY.js +1 -0
  333. package/dist/ui/assets/releases-B0WNV-SY.js +1 -0
  334. package/dist/ui/assets/repoos-cto-square.webp +0 -0
  335. package/dist/ui/assets/repoos-helpful-pm-square.webp +0 -0
  336. package/dist/ui/assets/repoos-orchestrator-square.webp +0 -0
  337. package/dist/ui/assets/repoos-performance-agent-square.webp +0 -0
  338. package/dist/ui/assets/repoos-ross-from-friends-square.webp +0 -0
  339. package/dist/ui/assets/repoos-tech-debt-agent-square.webp +0 -0
  340. package/dist/ui/assets/requirementDiagram-BXWQKSXE-CRrFX-yw.js +84 -0
  341. package/dist/ui/assets/rough.esm-By172zw-.js +1 -0
  342. package/dist/ui/assets/sankeyDiagram-P5KCCOFB-X_xFRj9E.js +40 -0
  343. package/dist/ui/assets/sequenceDiagram-WJ2MYXX4-Byb49lKf.js +162 -0
  344. package/dist/ui/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  345. package/dist/ui/assets/src-BH-TyZbA.js +1 -0
  346. package/dist/ui/assets/stateDiagram-D77RDMKH-CzaPrqYF.js +1 -0
  347. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BCXckz7K.js +1 -0
  348. package/dist/ui/assets/swimlanes-42K2YHIH-Cx_1lnqr.js +1 -0
  349. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-54qsKi6A.js +8 -0
  350. package/dist/ui/assets/timeline-definition-24CTP7MA-B1IbZPQ-.js +120 -0
  351. package/dist/ui/assets/treeView-Q6P3EWNA-DFWhVE3d.js +1 -0
  352. package/dist/ui/assets/treemap-WGGIJYW6-BmbYPThn.js +1 -0
  353. package/dist/ui/assets/vendor-ui-DPm7zLxi.js +3 -0
  354. package/dist/ui/assets/vendor-vue-CobgyEJp.js +1 -0
  355. package/dist/ui/assets/vennDiagram-4TSXK5OY-Ae2AtRpt.js +34 -0
  356. package/dist/ui/assets/wardley-WFR3VGLG-BtD4X4tL.js +1 -0
  357. package/dist/ui/assets/wardleyDiagram-VM6X3IG4-B3YN2fTd.js +78 -0
  358. package/dist/ui/assets/xychartDiagram-S5SC5T6Z-CIzJfMKA.js +7 -0
  359. package/dist/ui/favicon.svg +11 -0
  360. package/dist/ui/index.html +49 -0
  361. package/dist/ui/sw.js +48 -0
  362. package/package.json +91 -0
@@ -0,0 +1,103 @@
1
+ /** A single published app: hostname → local service, guarded by an email allowlist. */
2
+ export interface TunnelApp {
3
+ /** Public hostname, e.g. `dashboard.repoos.org`. */
4
+ hostname: string;
5
+ /** Local origin, e.g. `http://localhost:3000`. */
6
+ service: string;
7
+ /** Email allowlist enforced by a Cloudflare Access policy in front of the app. Always empty when noAccess is true. */
8
+ access: string[];
9
+ /**
10
+ * Created with `--no-access`: no Cloudflare Access policy exists for this
11
+ * app at all — it's fully public at Cloudflare's edge, relying solely on
12
+ * RepoOS's own native auth. Only ever set at creation time.
13
+ */
14
+ noAccess?: boolean;
15
+ }
16
+ /** The persisted `[tunnel]` state. Non-secret — never holds tokens or tunnel secrets. */
17
+ export interface TunnelConfig {
18
+ provider: "cloudflare";
19
+ /** UI opt-in only; disabling never deletes configuration or stops cloudflared. */
20
+ enabled: boolean;
21
+ /** Machine-local tunnel name (one tunnel per machine). */
22
+ name: string;
23
+ /** Base domain used to infer hostnames, e.g. `repoos.org`. */
24
+ domain: string;
25
+ /** The cloudflared tunnel UUID. */
26
+ tunnelId: string;
27
+ /** App name → app routing. */
28
+ apps: Record<string, TunnelApp>;
29
+ }
30
+ export declare const DEFAULT_TUNNEL_NAME = "repoos-local";
31
+ /** Name of the single Access policy RepoOS manages per app. */
32
+ export declare const ACCESS_POLICY_NAME = "repoos allowlist";
33
+ export declare function emptyTunnelConfig(): TunnelConfig;
34
+ export declare function parseToml(text: string): Record<string, unknown>;
35
+ /** Parse the `[tunnel]` block out of a full repoos.toml document. */
36
+ export declare function parseTunnelSection(text: string): TunnelConfig;
37
+ export declare function tomlQuote(s: string): string;
38
+ /** Serialize a TunnelConfig back into a `[tunnel]` TOML block. */
39
+ export declare function serializeTunnelSection(cfg: TunnelConfig): string;
40
+ /**
41
+ * Replace the `[tunnel]` block (including its `[tunnel.apps.*]` subsections)
42
+ * in a full repoos.toml document, preserving every other line verbatim.
43
+ * Appends the block when no `[tunnel]` section exists yet.
44
+ */
45
+ export declare function upsertTunnelSection(text: string, cfg: TunnelConfig): string;
46
+ /** Read the `[tunnel]` state out of this repo's repoos.toml. */
47
+ export declare function readTunnelConfig(root: string): TunnelConfig;
48
+ /** Persist the `[tunnel]` state to this repo's repoos.toml (line-preserving). */
49
+ export declare function writeTunnelConfig(root: string, cfg: TunnelConfig): void;
50
+ /** Infer `<name>.<base-domain>` when `--domain` is omitted. */
51
+ export declare function inferHostname(name: string, domain: string): string;
52
+ /**
53
+ * A hostname "deeper than one label under the base domain" (e.g.
54
+ * `dashboard.app.repoos.org` under `repoos.org`) routes fine, but the zone's
55
+ * SSL/certificate coverage must include it. Returns a warning or null.
56
+ */
57
+ export declare function hostnameWarning(hostname: string, baseDomain: string): string | null;
58
+ /** App names become `[tunnel.apps.<name>]` TOML keys — keep them filesystem-safe. */
59
+ export declare function isValidAppName(name: string): boolean;
60
+ /**
61
+ * Shape check for a base domain like `repoos.org` — requires at least one dot
62
+ * and a plausible TLD, so a plain word (an app name typed into the wrong
63
+ * prompt, e.g. "celleris") is rejected rather than silently stored and only
64
+ * surfacing later as a confusing "deeper than one label" hostname warning.
65
+ */
66
+ export declare function isValidBaseDomain(domain: string): boolean;
67
+ /** Basic email shape check for `--allow` / `allow` / `deny` args. */
68
+ export declare function isValidEmail(email: string): boolean;
69
+ /** Split a comma-separated email list, trim, dedupe, preserve order. */
70
+ export declare function parseEmailList(raw: string | undefined): string[];
71
+ /** Add an email to an allowlist (no-ops when already present). */
72
+ export declare function addEmail(access: string[], email: string): string[];
73
+ /** Remove an email from an allowlist (no-ops when absent). */
74
+ export declare function removeEmail(access: string[], email: string): string[];
75
+ /**
76
+ * The `cloudflared` ingress config derived from RepoOS state: one rule per
77
+ * configured app plus a trailing `http_status:404` catch-all. cloudflared
78
+ * requires the catch-all as the final rule.
79
+ */
80
+ /**
81
+ * Rewrite a `http://localhost:<port>` origin service to `http://127.0.0.1:<port>`.
82
+ *
83
+ * `repoos serve` binds `0.0.0.0` whenever Tailscale is detected, which on Linux
84
+ * means IPv4 only. On a dual-stack host `localhost` resolves to `::1` first, so
85
+ * cloudflared dials `[::1]:<port>` and gets connection-refused while the origin
86
+ * is up and reachable on `127.0.0.1`. Apps stored before this normalization
87
+ * (their `service` still literal `localhost`) are fixed here at render time, so
88
+ * no stored file has to be rewritten. Any other host is left untouched.
89
+ */
90
+ export declare function ipv4LoopbackService(service: string): string;
91
+ export declare function renderCloudflaredConfig(cfg: TunnelConfig, credentialsFile: string): string;
92
+ /**
93
+ * The Access application payload for a published hostname. RepoOS only manages
94
+ * self-hosted (origin-proxied) applications for this MVP.
95
+ */
96
+ export declare function buildAccessAppBody(hostname: string): Record<string, unknown>;
97
+ /**
98
+ * The single Access policy body for an app's allowlist: an `allow` policy whose
99
+ * Include list is exactly the configured emails (OR'd). An empty list matches
100
+ * nothing → everyone is denied, which is the safe default — there is no way to
101
+ * end up with a publicly reachable app through the normal `create` flow.
102
+ */
103
+ export declare function buildAccessPolicyBody(emails: string[]): Record<string, unknown>;
@@ -0,0 +1,320 @@
1
+ /**
2
+ * Cloudflare Tunnel publishing state — pure logic, zero I/O beyond the
3
+ * `[tunnel]` section of `repoos.toml`.
4
+ *
5
+ * RepoOS's own config is the source of truth. `cloudflared`'s ingress YAML and
6
+ * Cloudflare Access policies are DERIVED from this state on every mutation —
7
+ * they are never hand-maintained separately.
8
+ *
9
+ * One machine runs ONE Cloudflare Tunnel with many hostname → local service
10
+ * ingress routes (never one tunnel per app), and every app is protected by an
11
+ * Access policy restricted to its explicit email allowlist.
12
+ */
13
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
14
+ import { join } from "node:path";
15
+ import { stripTomlComment, unquoteTomlString } from "./toml-line.js";
16
+ export const DEFAULT_TUNNEL_NAME = "repoos-local";
17
+ /** Name of the single Access policy RepoOS manages per app. */
18
+ export const ACCESS_POLICY_NAME = "repoos allowlist";
19
+ export function emptyTunnelConfig() {
20
+ return {
21
+ provider: "cloudflare",
22
+ enabled: false,
23
+ name: DEFAULT_TUNNEL_NAME,
24
+ domain: "",
25
+ tunnelId: "",
26
+ apps: {},
27
+ };
28
+ }
29
+ // ── Minimal nested-TOML reader ──────────────────────────────────────────────
30
+ // Understands exactly the shape RepoOS writes: `[section]`, `[a.b.c]`
31
+ // subsections, and flat `key = value` lines with strings / numbers / booleans /
32
+ // inline arrays. Other constructs are ignored rather than mis-parsed, so a
33
+ // hand-edited file with unknown sections survives the round-trip untouched.
34
+ function parseTomlValue(s) {
35
+ if (s.startsWith("[") && s.endsWith("]")) {
36
+ return s
37
+ .slice(1, -1)
38
+ .split(",")
39
+ .map((x) => unquoteTomlString(x.trim()))
40
+ .filter(Boolean);
41
+ }
42
+ if (/^-?\d+$/.test(s))
43
+ return Number(s);
44
+ if (s === "true")
45
+ return true;
46
+ if (s === "false")
47
+ return false;
48
+ return unquoteTomlString(s);
49
+ }
50
+ export function parseToml(text) {
51
+ const out = {};
52
+ let section = [];
53
+ for (const rawLine of text.replace(/\r\n/g, "\n").split("\n")) {
54
+ const line = stripTomlComment(rawLine).trim();
55
+ if (!line)
56
+ continue;
57
+ const arrSec = line.match(/^\[\[([^\]]+)\]\]$/);
58
+ if (arrSec) {
59
+ section = [];
60
+ continue;
61
+ }
62
+ const sec = line.match(/^\[([^\]]+)\]$/);
63
+ if (sec) {
64
+ section = sec[1].split(".");
65
+ continue;
66
+ }
67
+ const kv = line.match(/^([A-Za-z0-9_.-]+)\s*=\s*(.+)$/);
68
+ if (!kv)
69
+ continue;
70
+ const path = [...section, kv[1]];
71
+ let node = out;
72
+ for (let i = 0; i < path.length - 1; i++) {
73
+ const key = path[i];
74
+ const cur = (node[key] ?? {});
75
+ if (typeof cur !== "object" || cur === null)
76
+ break;
77
+ node[key] = cur;
78
+ node = cur;
79
+ }
80
+ node[path[path.length - 1]] = parseTomlValue(kv[2].trim());
81
+ }
82
+ return out;
83
+ }
84
+ /** Parse the `[tunnel]` block out of a full repoos.toml document. */
85
+ export function parseTunnelSection(text) {
86
+ const root = parseToml(text);
87
+ const t = (root.tunnel ?? {});
88
+ const rawApps = (t.apps ?? {});
89
+ const apps = {};
90
+ for (const [name, a] of Object.entries(rawApps)) {
91
+ if (typeof a !== "object" || a === null)
92
+ continue;
93
+ apps[name] = {
94
+ hostname: String(a.hostname ?? ""),
95
+ service: String(a.service ?? ""),
96
+ access: Array.isArray(a.access) ? a.access.map(String) : [],
97
+ ...(a.noAccess === true ? { noAccess: true } : {}),
98
+ };
99
+ }
100
+ const cfg = emptyTunnelConfig();
101
+ if (typeof t.enabled === "boolean")
102
+ cfg.enabled = t.enabled;
103
+ if (typeof t.name === "string" && t.name)
104
+ cfg.name = t.name;
105
+ if (typeof t.domain === "string")
106
+ cfg.domain = t.domain;
107
+ if (typeof t.tunnel_id === "string")
108
+ cfg.tunnelId = t.tunnel_id;
109
+ cfg.apps = apps;
110
+ return cfg;
111
+ }
112
+ export function tomlQuote(s) {
113
+ return JSON.stringify(s);
114
+ }
115
+ /** Serialize a TunnelConfig back into a `[tunnel]` TOML block. */
116
+ export function serializeTunnelSection(cfg) {
117
+ const lines = [];
118
+ lines.push("[tunnel]");
119
+ lines.push(`provider = ${tomlQuote("cloudflare")}`);
120
+ lines.push(`enabled = ${cfg.enabled ? "true" : "false"}`);
121
+ lines.push(`name = ${tomlQuote(cfg.name)}`);
122
+ if (cfg.domain)
123
+ lines.push(`domain = ${tomlQuote(cfg.domain)}`);
124
+ if (cfg.tunnelId)
125
+ lines.push(`tunnel_id = ${tomlQuote(cfg.tunnelId)}`);
126
+ for (const name of Object.keys(cfg.apps).sort()) {
127
+ const app = cfg.apps[name];
128
+ lines.push("");
129
+ lines.push(`[tunnel.apps.${name}]`);
130
+ lines.push(`hostname = ${tomlQuote(app.hostname)}`);
131
+ lines.push(`service = ${tomlQuote(app.service)}`);
132
+ lines.push(`access = [${app.access.map(tomlQuote).join(", ")}]`);
133
+ if (app.noAccess)
134
+ lines.push(`noAccess = true`);
135
+ }
136
+ return lines.join("\n");
137
+ }
138
+ /**
139
+ * Replace the `[tunnel]` block (including its `[tunnel.apps.*]` subsections)
140
+ * in a full repoos.toml document, preserving every other line verbatim.
141
+ * Appends the block when no `[tunnel]` section exists yet.
142
+ */
143
+ export function upsertTunnelSection(text, cfg) {
144
+ const lines = text.replace(/\r\n/g, "\n").split("\n");
145
+ const isTunnelHeader = (s) => s === "[tunnel]" || s.startsWith("[tunnel.") || s.startsWith("[tunnel[");
146
+ const kept = [];
147
+ let i = 0;
148
+ let replaced = false;
149
+ while (i < lines.length) {
150
+ const stripped = stripTomlComment(lines[i]).trim();
151
+ if (!replaced && isTunnelHeader(stripped)) {
152
+ i++;
153
+ while (i < lines.length) {
154
+ const s = stripTomlComment(lines[i]).trim();
155
+ const isHeader = /^\[\[?[^\]]+\]\]?$/.test(s);
156
+ if (isHeader && !isTunnelHeader(s))
157
+ break;
158
+ i++;
159
+ }
160
+ if (kept.length && kept[kept.length - 1].trim() !== "")
161
+ kept.push("");
162
+ kept.push(serializeTunnelSection(cfg));
163
+ if (i < lines.length && lines[i].trim() !== "")
164
+ kept.push("");
165
+ replaced = true;
166
+ continue;
167
+ }
168
+ kept.push(lines[i]);
169
+ i++;
170
+ }
171
+ if (!replaced) {
172
+ if (kept.length && kept[kept.length - 1].trim() !== "")
173
+ kept.push("");
174
+ kept.push(serializeTunnelSection(cfg));
175
+ }
176
+ return (kept
177
+ .join("\n")
178
+ .replace(/\n{3,}/g, "\n\n")
179
+ .trimEnd() + "\n");
180
+ }
181
+ /** Read the `[tunnel]` state out of this repo's repoos.toml. */
182
+ export function readTunnelConfig(root) {
183
+ const path = join(root, "repoos.toml");
184
+ const text = existsSync(path) ? readFileSync(path, "utf8") : "";
185
+ return parseTunnelSection(text);
186
+ }
187
+ /** Persist the `[tunnel]` state to this repo's repoos.toml (line-preserving). */
188
+ export function writeTunnelConfig(root, cfg) {
189
+ const path = join(root, "repoos.toml");
190
+ const text = existsSync(path) ? readFileSync(path, "utf8") : "";
191
+ writeFileSync(path, upsertTunnelSection(text, cfg), "utf8");
192
+ }
193
+ /** Infer `<name>.<base-domain>` when `--domain` is omitted. */
194
+ export function inferHostname(name, domain) {
195
+ return `${name}.${domain}`;
196
+ }
197
+ /**
198
+ * A hostname "deeper than one label under the base domain" (e.g.
199
+ * `dashboard.app.repoos.org` under `repoos.org`) routes fine, but the zone's
200
+ * SSL/certificate coverage must include it. Returns a warning or null.
201
+ */
202
+ export function hostnameWarning(hostname, baseDomain) {
203
+ if (!baseDomain)
204
+ return null;
205
+ const h = hostname.split(".").filter(Boolean);
206
+ const d = baseDomain.split(".").filter(Boolean);
207
+ if (h.length > d.length + 1) {
208
+ return (`${hostname} is deeper than one label under ${baseDomain} — make sure your ` +
209
+ `Cloudflare SSL/TLS certificate configuration covers it (the CNAME only routes DNS).`);
210
+ }
211
+ return null;
212
+ }
213
+ /** App names become `[tunnel.apps.<name>]` TOML keys — keep them filesystem-safe. */
214
+ export function isValidAppName(name) {
215
+ return /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(name);
216
+ }
217
+ /**
218
+ * Shape check for a base domain like `repoos.org` — requires at least one dot
219
+ * and a plausible TLD, so a plain word (an app name typed into the wrong
220
+ * prompt, e.g. "celleris") is rejected rather than silently stored and only
221
+ * surfacing later as a confusing "deeper than one label" hostname warning.
222
+ */
223
+ export function isValidBaseDomain(domain) {
224
+ return /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/.test(domain.toLowerCase());
225
+ }
226
+ /** Basic email shape check for `--allow` / `allow` / `deny` args. */
227
+ export function isValidEmail(email) {
228
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
229
+ }
230
+ /** Split a comma-separated email list, trim, dedupe, preserve order. */
231
+ export function parseEmailList(raw) {
232
+ if (!raw)
233
+ return [];
234
+ const seen = new Set();
235
+ const out = [];
236
+ for (const part of raw.split(",")) {
237
+ const email = part.trim();
238
+ if (!email || seen.has(email))
239
+ continue;
240
+ seen.add(email);
241
+ out.push(email);
242
+ }
243
+ return out;
244
+ }
245
+ /** Add an email to an allowlist (no-ops when already present). */
246
+ export function addEmail(access, email) {
247
+ if (access.includes(email))
248
+ return access;
249
+ return [...access, email];
250
+ }
251
+ /** Remove an email from an allowlist (no-ops when absent). */
252
+ export function removeEmail(access, email) {
253
+ return access.filter((e) => e !== email);
254
+ }
255
+ /**
256
+ * The `cloudflared` ingress config derived from RepoOS state: one rule per
257
+ * configured app plus a trailing `http_status:404` catch-all. cloudflared
258
+ * requires the catch-all as the final rule.
259
+ */
260
+ /**
261
+ * Rewrite a `http://localhost:<port>` origin service to `http://127.0.0.1:<port>`.
262
+ *
263
+ * `repoos serve` binds `0.0.0.0` whenever Tailscale is detected, which on Linux
264
+ * means IPv4 only. On a dual-stack host `localhost` resolves to `::1` first, so
265
+ * cloudflared dials `[::1]:<port>` and gets connection-refused while the origin
266
+ * is up and reachable on `127.0.0.1`. Apps stored before this normalization
267
+ * (their `service` still literal `localhost`) are fixed here at render time, so
268
+ * no stored file has to be rewritten. Any other host is left untouched.
269
+ */
270
+ export function ipv4LoopbackService(service) {
271
+ return service.replace(/^(https?:\/\/)localhost(:|\/|$)/i, "$1127.0.0.1$2");
272
+ }
273
+ export function renderCloudflaredConfig(cfg, credentialsFile) {
274
+ const lines = [];
275
+ lines.push("# Generated by repoos tunnel — the machine registry (~/.config/repoos/tunnel-apps.toml) is", "# the source of truth for what's ingress-routed; each repo's repoos.toml [tunnel] owns its", "# own apps within it. See docs/tunnel-registry.md.");
276
+ lines.push(`tunnel: ${cfg.tunnelId}`);
277
+ lines.push(`credentials-file: ${credentialsFile}`);
278
+ lines.push("");
279
+ lines.push("ingress:");
280
+ const apps = Object.values(cfg.apps).sort((a, b) => a.hostname.localeCompare(b.hostname));
281
+ for (const app of apps) {
282
+ lines.push(` - hostname: ${app.hostname}`);
283
+ lines.push(` service: ${ipv4LoopbackService(app.service)}`);
284
+ }
285
+ lines.push(" - service: http_status:404");
286
+ return lines.join("\n") + "\n";
287
+ }
288
+ /**
289
+ * The Access application payload for a published hostname. RepoOS only manages
290
+ * self-hosted (origin-proxied) applications for this MVP.
291
+ */
292
+ export function buildAccessAppBody(hostname) {
293
+ return {
294
+ name: hostname,
295
+ domain: hostname,
296
+ type: "self_hosted",
297
+ session_duration: "24h",
298
+ // auto_redirect_to_identity requires allowed_idps to name exactly one
299
+ // identity provider, which RepoOS never configures — Cloudflare's API
300
+ // rejects the app outright when it's true without that. Omitting it just
301
+ // shows the standard identity-provider picker instead of auto-redirecting.
302
+ };
303
+ }
304
+ /**
305
+ * The single Access policy body for an app's allowlist: an `allow` policy whose
306
+ * Include list is exactly the configured emails (OR'd). An empty list matches
307
+ * nothing → everyone is denied, which is the safe default — there is no way to
308
+ * end up with a publicly reachable app through the normal `create` flow.
309
+ */
310
+ export function buildAccessPolicyBody(emails) {
311
+ return {
312
+ name: ACCESS_POLICY_NAME,
313
+ decision: "allow",
314
+ precedence: 10000,
315
+ session_duration: "24h",
316
+ include: emails.map((email) => ({ email: { email } })),
317
+ exclude: [],
318
+ require: [],
319
+ };
320
+ }