@kky42/pievo-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/assets/CodeField-dOzyFQNH.js +34 -0
  3. package/.output/public/assets/LoopView-B4H9QibC.js +55 -0
  4. package/.output/public/assets/Modal-D33gNSgx.js +1 -0
  5. package/.output/public/assets/SignIn-SHuRRyOv.js +1 -0
  6. package/.output/public/assets/actionUi-ChGGALzg.js +1 -0
  7. package/.output/public/assets/app-DElSo_jy.css +2 -0
  8. package/.output/public/assets/artifactView-DFuubXLJ.js +66 -0
  9. package/.output/public/assets/index-DfpTWRSz.js +12 -0
  10. package/.output/public/assets/invite._token-DJtd-XE2.js +1 -0
  11. package/.output/public/assets/invite._token-T8oo4Qtw.js +1 -0
  12. package/.output/public/assets/jsx-runtime-BseJUIpC.js +1 -0
  13. package/.output/public/assets/lifecycleUi-DKkChdnU.js +1 -0
  14. package/.output/public/assets/loopApi-BM2nj71x.js +3 -0
  15. package/.output/public/assets/loops._loopId-B19Jw7jC.js +5 -0
  16. package/.output/public/assets/loops._loopId_.runs._runId-_CflHV38.js +3 -0
  17. package/.output/public/assets/notifyFns-DCubjpRy.js +1 -0
  18. package/.output/public/assets/preload-helper-CKUiEq3b.js +3 -0
  19. package/.output/public/assets/routes-B9tgli5f.js +1 -0
  20. package/.output/public/assets/routes-CTtlM_qt.js +1 -0
  21. package/.output/public/assets/t._teamId-Bm21mngW.js +1 -0
  22. package/.output/public/assets/t._teamId-gR7BVKkR.js +1 -0
  23. package/.output/public/assets/ui-Dp88qUWh.js +1 -0
  24. package/.output/public/assets/useRouter-DsjH8G0p.js +1 -0
  25. package/.output/public/favicon.svg +12 -0
  26. package/.output/public/fonts/GeistPixel-Square.woff2 +0 -0
  27. package/.output/server/_chunks/ssr-renderer.mjs +26 -0
  28. package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +419 -0
  29. package/.output/server/_libs/@aws-sdk/checksums+[...].mjs +10732 -0
  30. package/.output/server/_libs/@aws-sdk/client-s3+[...].mjs +9475 -0
  31. package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +137 -0
  32. package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +440 -0
  33. package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +62 -0
  34. package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +818 -0
  35. package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +59 -0
  36. package/.output/server/_libs/@base-ui/react+[...].mjs +11125 -0
  37. package/.output/server/_libs/@codemirror/autocomplete+[...].mjs +19713 -0
  38. package/.output/server/_libs/@codemirror/lang-css+[...].mjs +2636 -0
  39. package/.output/server/_libs/@codemirror/lang-html+[...].mjs +2247 -0
  40. package/.output/server/_libs/@codemirror/lang-json+[...].mjs +79 -0
  41. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1736 -0
  42. package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +342 -0
  43. package/.output/server/_libs/@tanstack/react-router+[...].mjs +14300 -0
  44. package/.output/server/_libs/@uiw/codemirror-extensions-basic-setup+[...].mjs +76 -0
  45. package/.output/server/_libs/atomic-sleep.mjs +27 -0
  46. package/.output/server/_libs/aws-crypto__crc32c.mjs +314 -0
  47. package/.output/server/_libs/aws-sdk__nested-clients.mjs +2671 -0
  48. package/.output/server/_libs/babel__runtime.mjs +30 -0
  49. package/.output/server/_libs/clsx.mjs +16 -0
  50. package/.output/server/_libs/codemirror__commands.mjs +1725 -0
  51. package/.output/server/_libs/codemirror__lint.mjs +565 -0
  52. package/.output/server/_libs/codemirror__search.mjs +1138 -0
  53. package/.output/server/_libs/codemirror__theme-one-dark.mjs +161 -0
  54. package/.output/server/_libs/colorette.mjs +129 -0
  55. package/.output/server/_libs/croner.mjs +735 -0
  56. package/.output/server/_libs/d3-array.mjs +231 -0
  57. package/.output/server/_libs/d3-color.mjs +330 -0
  58. package/.output/server/_libs/d3-format.mjs +252 -0
  59. package/.output/server/_libs/d3-interpolate.mjs +163 -0
  60. package/.output/server/_libs/d3-path.mjs +77 -0
  61. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  62. package/.output/server/_libs/d3-shape.mjs +689 -0
  63. package/.output/server/_libs/dateformat.mjs +341 -0
  64. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  65. package/.output/server/_libs/diff.mjs +732 -0
  66. package/.output/server/_libs/dom-serializer+[...].mjs +708 -0
  67. package/.output/server/_libs/domhandler.mjs +461 -0
  68. package/.output/server/_libs/dompurify.mjs +2111 -0
  69. package/.output/server/_libs/domutils.mjs +868 -0
  70. package/.output/server/_libs/drizzle-orm+postgres.mjs +7689 -0
  71. package/.output/server/_libs/electric-sql__pglite.mjs +14674 -0
  72. package/.output/server/_libs/end-of-stream+once+wrappy.mjs +145 -0
  73. package/.output/server/_libs/es-toolkit.mjs +1737 -0
  74. package/.output/server/_libs/eventemitter3.mjs +236 -0
  75. package/.output/server/_libs/fast-copy.mjs +285 -0
  76. package/.output/server/_libs/fast-safe-stringify.mjs +172 -0
  77. package/.output/server/_libs/h3+rou3+srvx.mjs +1201 -0
  78. package/.output/server/_libs/html-dom-parser+htmlparser2.mjs +1560 -0
  79. package/.output/server/_libs/html-react-parser+[...].mjs +1360 -0
  80. package/.output/server/_libs/initdb.wasm +0 -0
  81. package/.output/server/_libs/marked.mjs +1548 -0
  82. package/.output/server/_libs/on-exit-leak-free.mjs +80 -0
  83. package/.output/server/_libs/pglite.data +37667 -8
  84. package/.output/server/_libs/pglite.wasm +0 -0
  85. package/.output/server/_libs/pino+[...].mjs +3196 -0
  86. package/.output/server/_libs/pino-abstract-transport+split2.mjs +194 -0
  87. package/.output/server/_libs/pino-pretty+[...].mjs +1623 -0
  88. package/.output/server/_libs/pinojs__redact.mjs +280 -0
  89. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  90. package/.output/server/_libs/recharts+victory-vendor.mjs +15875 -0
  91. package/.output/server/_libs/tanstack__history.mjs +342 -0
  92. package/.output/server/_libs/ufo.mjs +64 -0
  93. package/.output/server/_libs/uiw__codemirror-themes.mjs +32 -0
  94. package/.output/server/_libs/uiw__react-codemirror.mjs +354 -0
  95. package/.output/server/_runtime.mjs +37 -0
  96. package/.output/server/_ssr/CodeField-tm4rr6G3.mjs +143 -0
  97. package/.output/server/_ssr/DashboardView-CC7htv28.mjs +2795 -0
  98. package/.output/server/_ssr/LoopPlaybook-BXH8mhiX.mjs +2105 -0
  99. package/.output/server/_ssr/LoopView-DCugEbHx.mjs +1106 -0
  100. package/.output/server/_ssr/Modal-DpKZHLZK.mjs +49 -0
  101. package/.output/server/_ssr/SignIn-dTndU6Hw.mjs +67 -0
  102. package/.output/server/_ssr/actionUi-CZbEixbf.mjs +119 -0
  103. package/.output/server/_ssr/adapters-BS8XosjF.mjs +130 -0
  104. package/.output/server/_ssr/artifactFiles-Cagtj7J0.mjs +61 -0
  105. package/.output/server/_ssr/artifactKind-BW0isV8L.mjs +37 -0
  106. package/.output/server/_ssr/artifactView-DS4O22wl.mjs +304 -0
  107. package/.output/server/_ssr/artifacts-DngKyW2u.mjs +2 -0
  108. package/.output/server/_ssr/auth-DY1DuYZd.mjs +38429 -0
  109. package/.output/server/_ssr/boot-BbtG0ImW.mjs +9010 -0
  110. package/.output/server/_ssr/boot-CMHTxQpJ.mjs +2 -0
  111. package/.output/server/_ssr/bun-sqlite-dialect-BW9W1_Ps-CU1Spd6z.mjs +162 -0
  112. package/.output/server/_ssr/core-RrmWoKne.mjs +5 -0
  113. package/.output/server/_ssr/createServerRpc-BD8Xn_0_.mjs +12 -0
  114. package/.output/server/_ssr/d1-sqlite-dialect-BLC8LXE6-DfG7tB8s.mjs +112 -0
  115. package/.output/server/_ssr/db-DWAuZq1o.mjs +2 -0
  116. package/.output/server/_ssr/dist-BIxFFVZg.mjs +342 -0
  117. package/.output/server/_ssr/empty-plugin-adapters-DKUlnwwl.mjs +5 -0
  118. package/.output/server/_ssr/factory-Blq0DYfT.mjs +6903 -0
  119. package/.output/server/_ssr/invite._token-BRCo9LGB.mjs +36 -0
  120. package/.output/server/_ssr/invite._token-DJxGLILJ.mjs +28 -0
  121. package/.output/server/_ssr/invite._token-NewFt27g.mjs +92 -0
  122. package/.output/server/_ssr/kysely-adapter-D3XTe64J.mjs +2 -0
  123. package/.output/server/_ssr/kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs +19 -0
  124. package/.output/server/_ssr/lifecycleUi-C9lg1r3r.mjs +38 -0
  125. package/.output/server/_ssr/logger-Dw82jNjH.mjs +2 -0
  126. package/.output/server/_ssr/loopApi-BtfkZQYK.mjs +532 -0
  127. package/.output/server/_ssr/loopApi-Cxe8WyOB.mjs +105 -0
  128. package/.output/server/_ssr/loops._loopId-7NQJPB9W.mjs +30 -0
  129. package/.output/server/_ssr/loops._loopId-DhnArGdL.mjs +1635 -0
  130. package/.output/server/_ssr/loops._loopId_.runs._runId-Bvuo2nki.mjs +29 -0
  131. package/.output/server/_ssr/loops._loopId_.runs._runId-Dip5Xk-q.mjs +674 -0
  132. package/.output/server/_ssr/machineFns-Dvr5ICUy.mjs +266 -0
  133. package/.output/server/_ssr/node-sqlite-dialect-DhyOpJTX.mjs +162 -0
  134. package/.output/server/_ssr/notifyFns-BcMRY5kP.mjs +118 -0
  135. package/.output/server/_ssr/notifyFns-Q458pZmE.mjs +580 -0
  136. package/.output/server/_ssr/router-J8KZ30xw.mjs +678 -0
  137. package/.output/server/_ssr/routes-Bcs4T1ox.mjs +28 -0
  138. package/.output/server/_ssr/routes-BoGrcf-b.mjs +43 -0
  139. package/.output/server/_ssr/routes-D4am3Zff.mjs +28 -0
  140. package/.output/server/_ssr/runDiff-CpEFqo7G.mjs +113 -0
  141. package/.output/server/_ssr/ssr.mjs +5837 -0
  142. package/.output/server/_ssr/start-4ifArtKx.mjs +4 -0
  143. package/.output/server/_ssr/store-b3JcQ08F.mjs +2 -0
  144. package/.output/server/_ssr/t._teamId-CeUhzgzT.mjs +32 -0
  145. package/.output/server/_ssr/t._teamId-DR-hQK7o.mjs +47 -0
  146. package/.output/server/_ssr/t._teamId-Dy_McbRt.mjs +31 -0
  147. package/.output/server/_ssr/teamCookie-B7hLOIie.mjs +10 -0
  148. package/.output/server/_ssr/teamFns-BIDnsg2A.mjs +473 -0
  149. package/.output/server/_ssr/teamFns-DA4ovI5g.mjs +33 -0
  150. package/.output/server/_ssr/tokens-ytd60FUt.mjs +2 -0
  151. package/.output/server/_ssr/ui-Dej2qjuS.mjs +267 -0
  152. package/.output/server/_tanstack-start-manifest_v-CVS6c7re.mjs +95 -0
  153. package/.output/server/drizzle/0000_round_marauders.sql +193 -0
  154. package/.output/server/drizzle/0001_naive_silver_fox.sql +25 -0
  155. package/.output/server/drizzle/0002_funny_sage.sql +12 -0
  156. package/.output/server/drizzle/0003_optimal_slapstick.sql +102 -0
  157. package/.output/server/drizzle/0004_remove_grok_agent.sql +5 -0
  158. package/.output/server/drizzle/0005_heavy_gauntlet.sql +8 -0
  159. package/.output/server/drizzle/0006_tranquil_sharon_carter.sql +1 -0
  160. package/.output/server/drizzle/0007_faulty_starbolt.sql +30 -0
  161. package/.output/server/drizzle/0008_durable_lifecycle_evidence.sql +15 -0
  162. package/.output/server/drizzle/meta/0000_snapshot.json +1333 -0
  163. package/.output/server/drizzle/meta/0001_snapshot.json +1498 -0
  164. package/.output/server/drizzle/meta/0002_snapshot.json +1576 -0
  165. package/.output/server/drizzle/meta/0003_snapshot.json +1666 -0
  166. package/.output/server/drizzle/meta/0005_snapshot.json +1666 -0
  167. package/.output/server/drizzle/meta/0006_snapshot.json +1672 -0
  168. package/.output/server/drizzle/meta/0007_snapshot.json +1787 -0
  169. package/.output/server/drizzle/meta/_journal.json +69 -0
  170. package/.output/server/index.mjs +464 -0
  171. package/.output/server/node_modules/tslib/modules/index.js +70 -0
  172. package/.output/server/node_modules/tslib/modules/package.json +3 -0
  173. package/.output/server/node_modules/tslib/package.json +47 -0
  174. package/.output/server/node_modules/tslib/tslib.js +484 -0
  175. package/.output/server/package.json +9 -0
  176. package/LICENSE +21 -0
  177. package/drizzle/0000_round_marauders.sql +193 -0
  178. package/drizzle/0001_naive_silver_fox.sql +25 -0
  179. package/drizzle/0002_funny_sage.sql +12 -0
  180. package/drizzle/0003_optimal_slapstick.sql +102 -0
  181. package/drizzle/0004_remove_grok_agent.sql +5 -0
  182. package/drizzle/0005_heavy_gauntlet.sql +8 -0
  183. package/drizzle/0006_tranquil_sharon_carter.sql +1 -0
  184. package/drizzle/0007_faulty_starbolt.sql +30 -0
  185. package/drizzle/0008_durable_lifecycle_evidence.sql +15 -0
  186. package/drizzle/meta/0000_snapshot.json +1333 -0
  187. package/drizzle/meta/0001_snapshot.json +1498 -0
  188. package/drizzle/meta/0002_snapshot.json +1576 -0
  189. package/drizzle/meta/0003_snapshot.json +1666 -0
  190. package/drizzle/meta/0005_snapshot.json +1666 -0
  191. package/drizzle/meta/0006_snapshot.json +1672 -0
  192. package/drizzle/meta/0007_snapshot.json +1787 -0
  193. package/drizzle/meta/_journal.json +69 -0
  194. package/package.json +84 -0
  195. package/scripts/pievo-server.mjs +390 -0
  196. package/scripts/prestart.mjs +66 -0
  197. package/scripts/server-cli-lib.mjs +451 -0
@@ -0,0 +1,267 @@
1
+ import { o as __toESM } from "../_runtime.mjs";
2
+ import { C as require_jsx_runtime, S as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/ui-Dej2qjuS.js
4
+ var import_react = /* @__PURE__ */ __toESM(require_react());
5
+ var import_jsx_runtime = require_jsx_runtime();
6
+ var fmt = (t) => t ? new Date(t).toLocaleString() : "—";
7
+ var rel = (t) => {
8
+ if (!t) return "";
9
+ const s = Math.round((Date.now() - Date.parse(t)) / 1e3);
10
+ if (s < 60) return `${s}s ago`;
11
+ const m = Math.round(s / 60);
12
+ if (m < 60) return `${m}m ago`;
13
+ const h = Math.round(m / 60);
14
+ if (h < 24) return `${h}h ago`;
15
+ return `${Math.round(h / 24)}d ago`;
16
+ };
17
+ var DOW = [
18
+ "Sun",
19
+ "Mon",
20
+ "Tue",
21
+ "Wed",
22
+ "Thu",
23
+ "Fri",
24
+ "Sat"
25
+ ];
26
+ /**
27
+ * Humanize common crontab patterns ("m h dom mon dow") into a readable phrase —
28
+ * "every 3h", "every 15m", "hourly :07", "daily 07:00", "Mon 09:00". Anything
29
+ * outside these common shapes falls back to the raw expression (shown verbatim,
30
+ * with the literal cron always available on hover at the call site).
31
+ */
32
+ function cronText(cron) {
33
+ const p = (cron || "").trim().split(/\s+/);
34
+ if (p.length !== 5) return cron;
35
+ const [mi, ho, dom, mon, dow] = p;
36
+ const dateWild = dom === "*" && mon === "*";
37
+ const everyH = ho.match(/^\*\/(\d+)$/);
38
+ if (everyH && dateWild && dow === "*") return `every ${everyH[1]}h`;
39
+ const everyM = mi.match(/^\*\/(\d+)$/);
40
+ if (everyM && ho === "*" && dateWild && dow === "*") return `every ${everyM[1]}m`;
41
+ if (ho === "*" && /^\d+$/.test(mi) && dateWild && dow === "*") return `hourly :${mi.padStart(2, "0")}`;
42
+ if (/^\d+$/.test(mi) && /^\d+$/.test(ho) && dateWild) {
43
+ const hhmm = `${ho.padStart(2, "0")}:${mi.padStart(2, "0")}`;
44
+ if (dow === "*") return `daily ${hhmm}`;
45
+ if (/^[0-6]$/.test(dow)) return `${DOW[Number(dow)]} ${hhmm}`;
46
+ }
47
+ return cron;
48
+ }
49
+ /** Compact time-until-future: "due" / "in 50m" / "in 2h" / "in 3d". */
50
+ var until = (t) => {
51
+ if (!t) return "";
52
+ const s = Math.round((Date.parse(t) - Date.now()) / 1e3);
53
+ if (s <= 0) return "due";
54
+ const m = Math.round(s / 60);
55
+ if (m < 60) return `in ${m}m`;
56
+ const h = Math.round(m / 60);
57
+ if (h < 24) return `in ${h}h`;
58
+ return `in ${Math.round(h / 24)}d`;
59
+ };
60
+ var md = (t) => {
61
+ const d = new Date(t);
62
+ return `${d.getMonth() + 1}/${d.getDate()}`;
63
+ };
64
+ /** Compact run-log timestamp: "MM/DD HH:mm" (24h, zero-padded, local). */
65
+ var tsShort = (t) => {
66
+ if (!t) return "—";
67
+ const d = new Date(t);
68
+ const p = (n) => String(n).padStart(2, "0");
69
+ return `${p(d.getMonth() + 1)}/${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
70
+ };
71
+ var fnum = (n) => Math.abs(n) >= 1e3 ? `${Math.round(n / 100) / 10}k` : `${Math.round(n * 100) / 100}`;
72
+ /** Duration in ms → "Ns" (empty for null/0). */
73
+ var dur = (ms) => ms ? `${Math.round(ms / 1e3)}s` : "";
74
+ /** Magnitude-formatted byte count — "240 B", "1.8 KB", "3.4 MB" (1024 thresholds). */
75
+ function humanBytes(n) {
76
+ const abs = Math.abs(n);
77
+ if (abs < 1024) return `${abs} B`;
78
+ if (abs < 1024 * 1024) return `${(abs / 1024).toFixed(1)} KB`;
79
+ return `${(abs / (1024 * 1024)).toFixed(1)} MB`;
80
+ }
81
+ /**
82
+ * status key → color + label. Colors are CSS theme vars (Nothing semantic
83
+ * palette, light/dark aware) — mostly monochrome, with green/amber/red reserved
84
+ * for meaning. Mirrored by the --color-run-* tokens used in Tailwind classes.
85
+ */
86
+ var ST = {
87
+ "nothing-new": {
88
+ c: "var(--color-secondary)",
89
+ label: "No update"
90
+ },
91
+ new: {
92
+ c: "var(--color-display)",
93
+ label: "New"
94
+ },
95
+ resolved: {
96
+ c: "var(--color-success)",
97
+ label: "Resolved"
98
+ },
99
+ error: {
100
+ c: "var(--color-accent)",
101
+ label: "Error"
102
+ },
103
+ silent: {
104
+ c: "var(--color-disabled)",
105
+ label: "Silent"
106
+ },
107
+ evolve: {
108
+ c: "var(--color-interactive)",
109
+ label: "Evolved"
110
+ }
111
+ };
112
+ var lookup = (k) => k ? ST[k] : void 0;
113
+ /**
114
+ * Human labels for the *delivery outcome* of a run that carries no richer status.
115
+ * These describe how a run finished — `direct`/`agent` mean a report reached the
116
+ * user (verbatim vs relayed), `exec` means a normal run completed. We show the
117
+ * user-facing meaning, not the internal enum, so "DIRECT" never leaks into the UI.
118
+ */
119
+ var OUTCOME_LABEL = {
120
+ direct: "Reported",
121
+ agent: "Reported",
122
+ exec: "Ran"
123
+ };
124
+ /** Safety net for any unmapped status/outcome string — Title-case, never raw. */
125
+ var titleCase = (s) => s ? s.charAt(0).toUpperCase() + s.slice(1).replace(/-/g, " ") : s;
126
+ function dotColor(r) {
127
+ if (r.queued) return ST.silent.c;
128
+ if (r.running) return r.role === "evolve" ? ST.evolve.c : ST.new.c;
129
+ if (r.canceled) return ST.silent.c;
130
+ if (r.outcome === "error") return ST.error.c;
131
+ if (r.outcome === "evolve") return ST.evolve.c;
132
+ if (r.outcome === "silent") return ST.silent.c;
133
+ return (lookup(r.status) ?? ST["nothing-new"]).c;
134
+ }
135
+ function dotLabel(r) {
136
+ if (r.queued) return "Queued";
137
+ if (r.running) {
138
+ if (r.cancelRequested) return "Stopping…";
139
+ return r.role === "evolve" ? "Evolving…" : "Running…";
140
+ }
141
+ if (r.canceled && r.error === "stopped by user") return "Canceled";
142
+ if (r.outcome === "skipped") return "Skipped";
143
+ if (r.canceled) return "Canceled";
144
+ if (r.cancelRequested && r.outcome === "error") return "Failed while stopping";
145
+ if (r.cancelRequested && r.outcome !== "silent" && r.outcome !== "evolve") return "Succeeded while stopping";
146
+ if (r.outcome === "error") return ST.error.label;
147
+ if (r.outcome === "evolve") return ST.evolve.label;
148
+ if (r.outcome === "silent") return ST.silent.label;
149
+ return lookup(r.status)?.label ?? OUTCOME_LABEL[r.outcome] ?? titleCase(r.outcome);
150
+ }
151
+ var lastRunOf = (j) => {
152
+ const a = j.runs ?? [];
153
+ return a.length ? a[a.length - 1] : null;
154
+ };
155
+ /**
156
+ * Completed = the loop reached its goal and was stamped terminal (`completedAt`
157
+ * set by `pievo finish`). This is now an explicit loop state, NOT the old
158
+ * disabled+resolved heuristic — a merely paused loop (no completedAt) stays in
159
+ * the active section with a "Paused" badge.
160
+ */
161
+ function isCompleted(j) {
162
+ return j.completedAt != null;
163
+ }
164
+ /**
165
+ * A CLOSED loop is one carrying a goal (setpoint). "Active closed" = closed but
166
+ * not yet completed — the state that surfaces the quiet "Goal" chip + goal line.
167
+ */
168
+ function isClosed(j) {
169
+ return j.goal != null && j.goal !== "";
170
+ }
171
+ var noopSubscribe = () => () => {};
172
+ var useHydrated = () => (0, import_react.useSyncExternalStore)(noopSubscribe, () => true, () => false);
173
+ var focusRing = "focus-visible:outline-none focus-visible:shadow-focus";
174
+ var btnBase = `inline-flex cursor-pointer items-center gap-1.5 rounded-control px-4 py-2 text-body font-medium transition-colors duration-150 disabled:cursor-default disabled:opacity-40 ${focusRing}`;
175
+ var btn = `${btnBase} border border-wire bg-surface text-primary hover:bg-raised`;
176
+ var btnPrimary = `${btnBase} border border-display bg-display text-paper hover:opacity-85`;
177
+ var btnDanger = `${btnBase} border border-transparent bg-rubik-red text-white hover:opacity-85`;
178
+ var btnCost = `${btnBase} border border-display bg-transparent text-display hover:bg-[color:var(--color-display)]/8`;
179
+ var btnSm = `inline-flex shrink-0 cursor-pointer items-center gap-1 rounded-full border border-wire bg-surface px-3 py-1 text-label font-medium text-primary transition-colors duration-150 hover:bg-raised disabled:cursor-default disabled:opacity-40 ${focusRing}`;
180
+ var btnPrimaryPill = `inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border border-display bg-display px-4 py-2 text-body font-medium text-paper transition-colors duration-150 hover:opacity-85 disabled:cursor-default disabled:opacity-40 ${focusRing}`;
181
+ var btnQuiet = "inline-flex cursor-pointer items-center gap-1.5 border-none bg-transparent p-0 text-meta font-medium text-secondary transition-colors hover:text-display";
182
+ /** Section divider heading ink - shared by ModalSection and the page panels. */
183
+ var sectionHeadCls = "text-label font-semibold text-secondary";
184
+ /** Field labels: sentence case, quiet weight - hierarchy from color, not caps. */
185
+ var labelCls = "mb-1.5 mt-3 block text-label font-medium text-secondary";
186
+ var inputCls = `w-full rounded-control border border-wire bg-surface px-3 py-2.5 text-sm text-primary outline-none transition-shadow focus:border-transparent focus:shadow-focus`;
187
+ /** Field-sized <select>: the input token + the `.lp-select` caret/padding. */
188
+ var selectCls = `${inputCls} lp-select cursor-pointer`;
189
+ /**
190
+ * The live "running" pulse — a display-ink fill breathing via the `runPulse`
191
+ * keyframe (app.css). Shared so the in-flight timeline block and the Running
192
+ * badge stay in lockstep. Spread into a `style` prop.
193
+ */
194
+ /** Just the breathing animation — spread onto any element to pulse it in its own color. */
195
+ var runPulseAnim = { animation: "runPulse 1.1s ease-in-out infinite" };
196
+ /** The live "running" signal light - the Rubik yellow, breathing. */
197
+ var runPulseStyle = {
198
+ background: "var(--color-rubik-yellow)",
199
+ ...runPulseAnim
200
+ };
201
+ /** The shared inline error banner - red signal dot + message + a dismiss link.
202
+ * One source so the four call sites (modals + detail view) stay in lockstep. */
203
+ function ErrorBanner({ message, onDismiss, className = "mb-2" }) {
204
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
205
+ className: `flex items-start gap-2 text-body text-accent ${className}`,
206
+ children: [
207
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
208
+ className: "mt-[5px] size-2 shrink-0 rounded-full bg-rubik-red",
209
+ "aria-hidden": true
210
+ }),
211
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: message }),
212
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
213
+ type: "button",
214
+ onClick: onDismiss,
215
+ className: "ml-auto shrink-0 cursor-pointer border-none bg-transparent p-0 text-label text-secondary transition-colors hover:text-display",
216
+ children: "Dismiss"
217
+ })
218
+ ]
219
+ });
220
+ }
221
+ /** A read-only mono code block (task file / control dump). */
222
+ function Pre({ children }) {
223
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
224
+ className: "max-h-[300px] overflow-auto whitespace-pre-wrap rounded-control border border-hairline bg-raised px-4 py-3.5 font-mono text-meta leading-relaxed text-secondary",
225
+ children
226
+ });
227
+ }
228
+ /** Shared semantic chip tones. */
229
+ var PILL_TONES = {
230
+ neutral: "bg-raised text-secondary",
231
+ ink: "bg-raised text-primary",
232
+ outline: "border border-hairline text-secondary",
233
+ running: "bg-running-soft text-running",
234
+ success: "bg-success-soft text-success",
235
+ accent: "bg-accent-soft text-accent",
236
+ warn: "bg-warn-soft text-warn"
237
+ };
238
+ function Pill({ tone = "neutral", dot, title, children }) {
239
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
240
+ title,
241
+ className: `inline-flex h-[22px] items-center gap-1.5 rounded-full px-2.5 text-caption font-medium ${PILL_TONES[tone]}`,
242
+ children: [dot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
243
+ className: "size-1.5 rounded-full",
244
+ style: dot === "pulse" ? runPulseStyle : { background: "var(--color-rubik-green)" }
245
+ }), children]
246
+ });
247
+ }
248
+ /** The shared quiet loading placeholder. */
249
+ function Loading({ className = "" }) {
250
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
251
+ className: `text-body text-disabled ${className}`,
252
+ children: "Loading…"
253
+ });
254
+ }
255
+ /** A run's status as a colored dot + label. `colorText` also tints the label. */
256
+ function StatusPill({ run, colorText }) {
257
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
258
+ className: "inline-flex items-center gap-1.5 font-medium",
259
+ style: colorText ? { color: dotColor(run) } : void 0,
260
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
261
+ className: "size-2 rounded-full",
262
+ style: { background: dotColor(run) }
263
+ }), dotLabel(run)]
264
+ });
265
+ }
266
+ //#endregion
267
+ export { selectCls as A, labelCls as C, runPulseAnim as D, rel as E, until as M, useHydrated as N, runPulseStyle as O, isCompleted as S, md as T, fmt as _, StatusPill as a, inputCls as b, btnDanger as c, btnQuiet as d, btnSm as f, dur as g, dotLabel as h, Pre as i, tsShort as j, sectionHeadCls as k, btnPrimary as l, dotColor as m, Loading as n, btn as o, cronText as p, Pill as r, btnCost as s, ErrorBanner as t, btnPrimaryPill as u, fnum as v, lastRunOf as w, isClosed as x, humanBytes as y };
@@ -0,0 +1,95 @@
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-CVS6c7re.js
2
+ var tsrStartManifest = () => ({ routes: {
3
+ __root__: {
4
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/__root.tsx",
5
+ children: [
6
+ "/",
7
+ "/agent-api/loop",
8
+ "/api/bootstrap",
9
+ "/api/health",
10
+ "/api/ready",
11
+ "/invite/$token",
12
+ "/loops/$loopId",
13
+ "/machine/report",
14
+ "/t/$teamId",
15
+ "/api/auth/$",
16
+ "/api/machine/cli",
17
+ "/api/machine/log",
18
+ "/api/machine/loop",
19
+ "/api/machine/poll",
20
+ "/api/machine/status",
21
+ "/api/machine/sync",
22
+ "/api/artifact/$loopId/$",
23
+ "/api/machine/blob/$hash",
24
+ "/api/skill/references/$",
25
+ "/loops/$loopId_/runs/$runId"
26
+ ],
27
+ preloads: [
28
+ "/assets/index-DfpTWRSz.js",
29
+ "/assets/jsx-runtime-BseJUIpC.js",
30
+ "/assets/preload-helper-CKUiEq3b.js",
31
+ "/assets/Modal-D33gNSgx.js",
32
+ "/assets/notifyFns-DCubjpRy.js",
33
+ "/assets/useRouter-DsjH8G0p.js",
34
+ "/assets/loopApi-BM2nj71x.js",
35
+ "/assets/ui-Dp88qUWh.js",
36
+ "/assets/lifecycleUi-DKkChdnU.js"
37
+ ],
38
+ scripts: [{ attrs: {
39
+ type: "module",
40
+ async: !0,
41
+ src: "/assets/index-DfpTWRSz.js"
42
+ } }]
43
+ },
44
+ "/": {
45
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/index.tsx",
46
+ children: void 0,
47
+ preloads: [
48
+ "/assets/routes-B9tgli5f.js",
49
+ "/assets/SignIn-SHuRRyOv.js",
50
+ "/assets/routes-CTtlM_qt.js",
51
+ "/assets/actionUi-ChGGALzg.js"
52
+ ]
53
+ },
54
+ "/invite/$token": {
55
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/invite.$token.tsx",
56
+ children: void 0,
57
+ preloads: [
58
+ "/assets/invite._token-DJtd-XE2.js",
59
+ "/assets/actionUi-ChGGALzg.js",
60
+ "/assets/invite._token-T8oo4Qtw.js",
61
+ "/assets/SignIn-SHuRRyOv.js"
62
+ ]
63
+ },
64
+ "/loops/$loopId": {
65
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/loops.$loopId.tsx",
66
+ children: void 0,
67
+ preloads: [
68
+ "/assets/loops._loopId-B19Jw7jC.js",
69
+ "/assets/artifactView-DFuubXLJ.js",
70
+ "/assets/SignIn-SHuRRyOv.js",
71
+ "/assets/actionUi-ChGGALzg.js"
72
+ ]
73
+ },
74
+ "/t/$teamId": {
75
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/t.$teamId.tsx",
76
+ children: void 0,
77
+ preloads: [
78
+ "/assets/t._teamId-Bm21mngW.js",
79
+ "/assets/SignIn-SHuRRyOv.js",
80
+ "/assets/t._teamId-gR7BVKkR.js",
81
+ "/assets/actionUi-ChGGALzg.js"
82
+ ]
83
+ },
84
+ "/loops/$loopId_/runs/$runId": {
85
+ filePath: "/Users/kky/dev/evo/packages/server/src/routes/loops.$loopId_.runs.$runId.tsx",
86
+ children: void 0,
87
+ preloads: [
88
+ "/assets/loops._loopId_.runs._runId-_CflHV38.js",
89
+ "/assets/SignIn-SHuRRyOv.js",
90
+ "/assets/actionUi-ChGGALzg.js"
91
+ ]
92
+ }
93
+ } });
94
+ //#endregion
95
+ export { tsrStartManifest };
@@ -0,0 +1,193 @@
1
+ CREATE TABLE "artifact_files" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "loop_id" text NOT NULL,
4
+ "path" text NOT NULL,
5
+ "hash" text,
6
+ "size" integer,
7
+ "binary" boolean DEFAULT false NOT NULL,
8
+ "oversize" boolean DEFAULT false NOT NULL,
9
+ "deleted" boolean DEFAULT false NOT NULL,
10
+ "updated_at" text NOT NULL,
11
+ "last_run_id" text
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE TABLE "blobs" (
15
+ "hash" text PRIMARY KEY NOT NULL,
16
+ "size" integer NOT NULL,
17
+ "binary" boolean DEFAULT false NOT NULL,
18
+ "meta" jsonb,
19
+ "created_at" text NOT NULL
20
+ );
21
+ --> statement-breakpoint
22
+ CREATE TABLE "loops" (
23
+ "id" text PRIMARY KEY NOT NULL,
24
+ "user_id" text NOT NULL,
25
+ "team_id" text,
26
+ "channel_id" text,
27
+ "machine_id" text NOT NULL,
28
+ "name" text,
29
+ "cron" text NOT NULL,
30
+ "timezone" text,
31
+ "workdir" text,
32
+ "task_file" text,
33
+ "task_file_content" text,
34
+ "task_file_synced_at" text,
35
+ "workflow" text,
36
+ "ui" text,
37
+ "state_schema" jsonb,
38
+ "notify" text DEFAULT 'auto' NOT NULL,
39
+ "allow_control" boolean DEFAULT true NOT NULL,
40
+ "goal" text,
41
+ "completed_at" text,
42
+ "completion_reason" text,
43
+ "model" text,
44
+ "agent" text DEFAULT 'claude-code' NOT NULL,
45
+ "enabled" boolean DEFAULT true NOT NULL,
46
+ "next_run_at" text,
47
+ "state" jsonb,
48
+ "evolved_run_count" integer,
49
+ "evolve_due" boolean,
50
+ "edit_request" text,
51
+ "created_at" text NOT NULL,
52
+ "updated_at" text NOT NULL
53
+ );
54
+ --> statement-breakpoint
55
+ CREATE TABLE "machines" (
56
+ "id" text PRIMARY KEY NOT NULL,
57
+ "user_id" text NOT NULL,
58
+ "team_id" text,
59
+ "name" text NOT NULL,
60
+ "hostname" text,
61
+ "platform" text,
62
+ "arch" text,
63
+ "daemon_version" text,
64
+ "token_hash" text NOT NULL,
65
+ "token" text,
66
+ "roots" jsonb,
67
+ "last_seen" text,
68
+ "online" boolean DEFAULT false NOT NULL,
69
+ "created_at" text NOT NULL
70
+ );
71
+ --> statement-breakpoint
72
+ CREATE TABLE "notification_channels" (
73
+ "id" text PRIMARY KEY NOT NULL,
74
+ "team_id" text NOT NULL,
75
+ "type" text NOT NULL,
76
+ "name" text NOT NULL,
77
+ "config" jsonb NOT NULL,
78
+ "created_at" text NOT NULL
79
+ );
80
+ --> statement-breakpoint
81
+ CREATE TABLE "run_snapshots" (
82
+ "run_id" text PRIMARY KEY NOT NULL,
83
+ "loop_id" text NOT NULL,
84
+ "manifest" jsonb NOT NULL,
85
+ "created_at" text NOT NULL
86
+ );
87
+ --> statement-breakpoint
88
+ CREATE TABLE "runs" (
89
+ "id" text PRIMARY KEY NOT NULL,
90
+ "loop_id" text NOT NULL,
91
+ "user_id" text NOT NULL,
92
+ "machine_id" text NOT NULL,
93
+ "phase" text NOT NULL,
94
+ "role" text NOT NULL,
95
+ "ts" text NOT NULL,
96
+ "outcome" text,
97
+ "status" text,
98
+ "message" text,
99
+ "duration_ms" integer,
100
+ "error" text,
101
+ "state" jsonb,
102
+ "control" jsonb,
103
+ "session_id" text,
104
+ "cost_usd" double precision,
105
+ "usage" jsonb,
106
+ "artifacts" jsonb,
107
+ "transcript" jsonb,
108
+ "progress" jsonb
109
+ );
110
+ --> statement-breakpoint
111
+ CREATE TABLE "team_members" (
112
+ "id" text PRIMARY KEY NOT NULL,
113
+ "team_id" text NOT NULL,
114
+ "user_id" text NOT NULL,
115
+ "role" text DEFAULT 'member' NOT NULL,
116
+ "created_at" text NOT NULL
117
+ );
118
+ --> statement-breakpoint
119
+ CREATE TABLE "teams" (
120
+ "id" text PRIMARY KEY NOT NULL,
121
+ "name" text NOT NULL,
122
+ "owner_user_id" text,
123
+ "created_at" text NOT NULL
124
+ );
125
+ --> statement-breakpoint
126
+ CREATE TABLE "account" (
127
+ "id" text PRIMARY KEY NOT NULL,
128
+ "account_id" text NOT NULL,
129
+ "provider_id" text NOT NULL,
130
+ "user_id" text NOT NULL,
131
+ "access_token" text,
132
+ "refresh_token" text,
133
+ "id_token" text,
134
+ "access_token_expires_at" timestamp,
135
+ "refresh_token_expires_at" timestamp,
136
+ "scope" text,
137
+ "password" text,
138
+ "created_at" timestamp DEFAULT now() NOT NULL,
139
+ "updated_at" timestamp NOT NULL
140
+ );
141
+ --> statement-breakpoint
142
+ CREATE TABLE "session" (
143
+ "id" text PRIMARY KEY NOT NULL,
144
+ "expires_at" timestamp NOT NULL,
145
+ "token" text NOT NULL,
146
+ "created_at" timestamp DEFAULT now() NOT NULL,
147
+ "updated_at" timestamp NOT NULL,
148
+ "ip_address" text,
149
+ "user_agent" text,
150
+ "user_id" text NOT NULL,
151
+ CONSTRAINT "session_token_unique" UNIQUE("token")
152
+ );
153
+ --> statement-breakpoint
154
+ CREATE TABLE "user" (
155
+ "id" text PRIMARY KEY NOT NULL,
156
+ "name" text NOT NULL,
157
+ "email" text NOT NULL,
158
+ "email_verified" boolean DEFAULT false NOT NULL,
159
+ "image" text,
160
+ "created_at" timestamp DEFAULT now() NOT NULL,
161
+ "updated_at" timestamp DEFAULT now() NOT NULL,
162
+ CONSTRAINT "user_email_unique" UNIQUE("email")
163
+ );
164
+ --> statement-breakpoint
165
+ CREATE TABLE "verification" (
166
+ "id" text PRIMARY KEY NOT NULL,
167
+ "identifier" text NOT NULL,
168
+ "value" text NOT NULL,
169
+ "expires_at" timestamp NOT NULL,
170
+ "created_at" timestamp DEFAULT now() NOT NULL,
171
+ "updated_at" timestamp DEFAULT now() NOT NULL
172
+ );
173
+ --> statement-breakpoint
174
+ ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
175
+ ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
176
+ CREATE INDEX "artifact_files_loop_idx" ON "artifact_files" USING btree ("loop_id");--> statement-breakpoint
177
+ CREATE UNIQUE INDEX "artifact_files_loop_path_idx" ON "artifact_files" USING btree ("loop_id","path");--> statement-breakpoint
178
+ CREATE INDEX "artifact_files_hash_idx" ON "artifact_files" USING btree ("hash");--> statement-breakpoint
179
+ CREATE INDEX "loops_user_idx" ON "loops" USING btree ("user_id");--> statement-breakpoint
180
+ CREATE INDEX "loops_team_idx" ON "loops" USING btree ("team_id");--> statement-breakpoint
181
+ CREATE INDEX "loops_machine_idx" ON "loops" USING btree ("machine_id");--> statement-breakpoint
182
+ CREATE INDEX "machines_user_idx" ON "machines" USING btree ("user_id");--> statement-breakpoint
183
+ CREATE INDEX "machines_team_idx" ON "machines" USING btree ("team_id");--> statement-breakpoint
184
+ CREATE INDEX "notification_channels_team_idx" ON "notification_channels" USING btree ("team_id");--> statement-breakpoint
185
+ CREATE INDEX "run_snapshots_loop_idx" ON "run_snapshots" USING btree ("loop_id");--> statement-breakpoint
186
+ CREATE INDEX "runs_loop_idx" ON "runs" USING btree ("loop_id");--> statement-breakpoint
187
+ CREATE INDEX "runs_phase_idx" ON "runs" USING btree ("phase");--> statement-breakpoint
188
+ CREATE INDEX "runs_loop_ts_idx" ON "runs" USING btree ("loop_id","ts");--> statement-breakpoint
189
+ CREATE INDEX "team_members_team_idx" ON "team_members" USING btree ("team_id");--> statement-breakpoint
190
+ CREATE INDEX "team_members_user_idx" ON "team_members" USING btree ("user_id");--> statement-breakpoint
191
+ CREATE INDEX "account_userId_idx" ON "account" USING btree ("user_id");--> statement-breakpoint
192
+ CREATE INDEX "session_userId_idx" ON "session" USING btree ("user_id");--> statement-breakpoint
193
+ CREATE INDEX "verification_identifier_idx" ON "verification" USING btree ("identifier");
@@ -0,0 +1,25 @@
1
+ CREATE TABLE "connect_keys" (
2
+ "machine_id" text PRIMARY KEY NOT NULL,
3
+ "user_id" text NOT NULL,
4
+ "team_id" text,
5
+ "minted_at" text NOT NULL
6
+ );
7
+ --> statement-breakpoint
8
+ CREATE TABLE "run_leases" (
9
+ "token_hash" text PRIMARY KEY NOT NULL,
10
+ "run_id" text NOT NULL,
11
+ "loop_id" text NOT NULL,
12
+ "machine_id" text NOT NULL,
13
+ "role" text NOT NULL,
14
+ "allow_control" boolean DEFAULT false NOT NULL,
15
+ "can_set_ui" boolean DEFAULT false NOT NULL,
16
+ "can_set_schema" boolean DEFAULT false NOT NULL,
17
+ "can_set_workflow" boolean DEFAULT false NOT NULL,
18
+ "can_finish" boolean DEFAULT false NOT NULL,
19
+ "state" text DEFAULT 'active' NOT NULL,
20
+ "expires_at" text,
21
+ "created_at" text NOT NULL
22
+ );
23
+ --> statement-breakpoint
24
+ CREATE INDEX "run_leases_run_idx" ON "run_leases" USING btree ("run_id");--> statement-breakpoint
25
+ CREATE INDEX "run_leases_loop_idx" ON "run_leases" USING btree ("loop_id");
@@ -0,0 +1,12 @@
1
+ CREATE TABLE "team_invites" (
2
+ "token" text PRIMARY KEY NOT NULL,
3
+ "team_id" text NOT NULL,
4
+ "role" text DEFAULT 'member' NOT NULL,
5
+ "invited_by_user_id" text NOT NULL,
6
+ "expires_at" text NOT NULL,
7
+ "redeemed_at" text,
8
+ "redeemed_by_user_id" text,
9
+ "created_at" text NOT NULL
10
+ );
11
+ --> statement-breakpoint
12
+ CREATE INDEX "team_invites_team_idx" ON "team_invites" USING btree ("team_id");