@kky42/pievo-server 2.4.1 → 2.4.4

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 (82) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/MachinesModal-Ci18Bitd.js +1 -0
  3. package/.output/public/assets/{SignIn-BdkKWOSs.js → SignIn-Czy-XJou.js} +1 -1
  4. package/.output/public/assets/{actionUi-BYBeYy7U.js → actionUi-DGJmNwsD.js} +1 -1
  5. package/.output/public/assets/app-CuZ0I3Mb.css +2 -0
  6. package/.output/public/assets/index-gJavUZIA.js +10 -0
  7. package/.output/public/assets/{invite._token-ZnVQqqq4.js → invite._token-BQUbjPMM.js} +1 -1
  8. package/.output/public/assets/invite._token-BUYUsIBj.js +1 -0
  9. package/.output/public/assets/lifecycleUi-C0DaC6NM.js +1 -0
  10. package/.output/public/assets/loops._loopId-BkEPvT1q.js +67 -0
  11. package/.output/public/assets/{loops._loopId_.runs._runId-CA0-q1y5.js → loops._loopId_.runs._runId-SM4sD1xB.js} +2 -2
  12. package/.output/public/assets/{preload-helper-CUIO87nJ.js → preload-helper-D1jXs0sN.js} +3 -3
  13. package/.output/public/assets/routes-4mIvs8LG.js +1 -0
  14. package/.output/public/assets/routes-B0svLfFq.js +1 -0
  15. package/.output/public/assets/t._teamId-BLO_bz6b.js +1 -0
  16. package/.output/public/assets/t._teamId-D-wGh4mo.js +1 -0
  17. package/.output/public/assets/{ui-DGOT8AoZ.js → ui-DGHTxOhC.js} +1 -1
  18. package/.output/server/_ssr/{DashboardView-D_hKsCsv.mjs → DashboardView-DqZLADCp.mjs} +70 -333
  19. package/.output/server/_ssr/{MachinesModal-DZ_9ErAU.mjs → MachinesModal-BsCfGuwp.mjs} +142 -9
  20. package/.output/server/_ssr/{SignIn-DjSrg0nO.mjs → SignIn-ffgDY0yf.mjs} +3 -3
  21. package/.output/server/_ssr/{SocialLinks-BTjsnVOm.mjs → SocialLinks-Bt7huqfS.mjs} +7 -13
  22. package/.output/server/_ssr/{actionUi-D15R8L7R.mjs → actionUi-DD7Cd7Le.mjs} +2 -2
  23. package/.output/server/_ssr/{artifactFiles-CV3OXxRD.mjs → artifactFiles-DHBXTtZn.mjs} +3 -3
  24. package/.output/server/_ssr/{artifactKind-ByzVa7fg.mjs → artifactKind-CwQ_Ddj6.mjs} +3 -3
  25. package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
  26. package/.output/server/_ssr/{auth-CPCDf6Wr.mjs → auth-C0zoZCGe.mjs} +9 -9
  27. package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
  28. package/.output/server/_ssr/{boot-BbWxaF-z.mjs → boot-sNlIkoLe.mjs} +66 -129
  29. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-8MIh9jN1.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
  30. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CcMQ01_d.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
  31. package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
  32. package/.output/server/_ssr/{dist-AxCsRawm.mjs → dist-B3SxDOpW.mjs} +2 -2
  33. package/.output/server/_ssr/{factory-S7MaMVC2.mjs → factory-Dv3Zopis.mjs} +2 -2
  34. package/.output/server/_ssr/{invite._token-B1UgMbNQ.mjs → invite._token-AvtAuDKv.mjs} +4 -12
  35. package/.output/server/_ssr/{invite._token-BliJIGk4.mjs → invite._token-CHR5K84a.mjs} +6 -14
  36. package/.output/server/_ssr/{invite._token-D296YVGd.mjs → invite._token-tw3mgvEo.mjs} +8 -16
  37. package/.output/server/_ssr/{kysely-adapter-DUdpqcCJ.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
  38. package/.output/server/_ssr/lifecycleUi-DOr6Af13.mjs +51 -0
  39. package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
  40. package/.output/server/_ssr/{loopApi-Dy8ztANM.mjs → loopApi-7YHXDl5g.mjs} +14 -61
  41. package/.output/server/_ssr/{loopProjection-BZ1_IYCr.mjs → loopProjection-eZvVobW7.mjs} +30 -5
  42. package/.output/server/_ssr/{loops._loopId-CKsAnxMl.mjs → loops._loopId-TEIcuqZU.mjs} +84 -112
  43. package/.output/server/_ssr/{loops._loopId_.runs._runId-a_SyY8rX.mjs → loops._loopId_.runs._runId-B4jXeonc.mjs} +3 -3
  44. package/.output/server/_ssr/{loops._loopId_.runs._runId-DG405pQs.mjs → loops._loopId_.runs._runId-BVQKe8xT.mjs} +6 -6
  45. package/.output/server/_ssr/{machineFns-BSaE7K88.mjs → machineFns-ByMsgG12.mjs} +3 -3
  46. package/.output/server/_ssr/{node-sqlite-dialect-rWwVyt2J.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
  47. package/.output/server/_ssr/{router-lMkobh5r.mjs → router-DyhWcIzt.mjs} +65 -118
  48. package/.output/server/_ssr/{routes-DNCZrs8z.mjs → routes-BWLQNDn5.mjs} +2 -2
  49. package/.output/server/_ssr/{routes-ufPbrGHs.mjs → routes-Cz49hLy6.mjs} +5 -5
  50. package/.output/server/_ssr/{routes-CRHc9cLG.mjs → routes-DqIGr7p0.mjs} +5 -5
  51. package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
  52. package/.output/server/_ssr/ssr.mjs +39 -47
  53. package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
  54. package/.output/server/_ssr/{t._teamId-BoBoYEHL.mjs → t._teamId-COoQSQtH.mjs} +5 -5
  55. package/.output/server/_ssr/{t._teamId-DcWOYjPf.mjs → t._teamId-Dms0PTMu.mjs} +2 -2
  56. package/.output/server/_ssr/{t._teamId-QD2nN0wn.mjs → t._teamId-xFPYdSPu.mjs} +5 -5
  57. package/.output/server/_ssr/{teamFns-BsmconJ1.mjs → teamFns-H438WnZC.mjs} +12 -30
  58. package/.output/server/_ssr/{teamFns-DcoVuWyH.mjs → teamFns-gilVwh7z.mjs} +2 -2
  59. package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
  60. package/.output/server/_ssr/{ui-DmFKW2H_.mjs → ui-dMEI4sHj.mjs} +13 -9
  61. package/.output/server/_tanstack-start-manifest_v-UkU-Jq6w.mjs +86 -0
  62. package/.output/server/index.mjs +84 -84
  63. package/package.json +1 -2
  64. package/.output/public/assets/MachinesModal-CEddj7la.js +0 -1
  65. package/.output/public/assets/app-BAgHQVvr.css +0 -2
  66. package/.output/public/assets/index-BZLqD3JI.js +0 -12
  67. package/.output/public/assets/invite._token-BCLgmTO7.js +0 -1
  68. package/.output/public/assets/lifecycleUi-C7dwHtbw.js +0 -1
  69. package/.output/public/assets/loops._loopId-X8PSlgdB.js +0 -67
  70. package/.output/public/assets/routes-BjKcDy6D.js +0 -1
  71. package/.output/public/assets/routes-bfMcArTT.js +0 -1
  72. package/.output/public/assets/t._teamId-B75J8h0x.js +0 -1
  73. package/.output/public/assets/t._teamId-D7WVPMDr.js +0 -1
  74. package/.output/server/_ssr/artifacts-BhQvaGjF.mjs +0 -2
  75. package/.output/server/_ssr/boot-COHf8Gv3.mjs +0 -2
  76. package/.output/server/_ssr/db-dw61xIt1.mjs +0 -2
  77. package/.output/server/_ssr/lifecycleUi-Dad3hvhm.mjs +0 -37
  78. package/.output/server/_ssr/logger-DdUWuMdh.mjs +0 -2
  79. package/.output/server/_ssr/runDiff-CrZzjokj.mjs +0 -2
  80. package/.output/server/_ssr/store-CirPHuib.mjs +0 -2
  81. package/.output/server/_ssr/tokens-XngoyCU8.mjs +0 -2
  82. package/.output/server/_tanstack-start-manifest_v-Xd5bMpJe.mjs +0 -87
@@ -1,11 +1,11 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { et as isOutdated, xt as machinePresence } from "./boot-BbWxaF-z.mjs";
2
+ import { St as machinePresence, tt as isOutdated } from "./boot-sNlIkoLe.mjs";
3
3
  import { a as DialogClose, c as TooltipPopup, d as TooltipTrigger, f as TooltipRoot, g as require_react, h as require_jsx_runtime, i as DialogPopup, l as TooltipPositioner, n as DialogRoot, o as DialogBackdrop, r as DialogPortal, t as DialogTitle, u as TooltipPortal } from "../_libs/@base-ui/react+[...].mjs";
4
- import { C as runPulseAnim, O as until, S as rel, T as sectionHeadCls, a as btn, b as labelCls, f as dotColor, g as fmt, h as dur, k as useHydrated, m as dotOpacity, o as btnDanger, p as dotLabel, s as btnPrimary, t as ErrorBanner, y as inputCls } from "./ui-DmFKW2H_.mjs";
4
+ import { C as scheduleText, D as until, O as useHydrated, _ as inputCls, a as btn, b as rel, d as dotLabel, f as dotOpacity, m as fmt, o as btnDanger, p as dur, r as Pill, s as btnPrimary, t as ErrorBanner, u as dotColor, v as labelCls, w as sectionHeadCls, x as runPulseAnim, y as lastRunOf } from "./ui-dMEI4sHj.mjs";
5
5
  import { n as createServerFn } from "./ssr.mjs";
6
- import { f as getConfig, s as createSsrRpc } from "./SocialLinks-BTjsnVOm.mjs";
7
- import { n as daemonStopSupport } from "./lifecycleUi-Dad3hvhm.mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/MachinesModal-DZ_9ErAU.js
6
+ import { d as getConfig, o as createSsrRpc } from "./SocialLinks-Bt7huqfS.mjs";
7
+ import { i as lifecyclePresentation, n as daemonStopSupport } from "./lifecycleUi-DOr6Af13.mjs";
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/MachinesModal-BsCfGuwp.js
9
9
  var import_react = /* @__PURE__ */ __toESM(require_react());
10
10
  var import_jsx_runtime = require_jsx_runtime();
11
11
  /**
@@ -73,6 +73,66 @@ function mergeRuns(primary, secondary) {
73
73
  out.sort((a, b) => a.ts < b.ts ? -1 : a.ts > b.ts ? 1 : 0);
74
74
  return out;
75
75
  }
76
+ function LoopMeta({ schedule, nextRun, enabled, machine, workdir, model, reasoningEffort }) {
77
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
78
+ className: "min-w-0 text-right text-meta text-secondary",
79
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
80
+ className: "flex flex-wrap items-center justify-end gap-x-2.5 gap-y-1",
81
+ children: [
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
83
+ title: schedule.mode === "cron" ? schedule.cron : void 0,
84
+ children: scheduleText(schedule)
85
+ }),
86
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
87
+ className: "text-wire",
88
+ children: "·"
89
+ }),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["next ", fmt(nextRun)] }),
91
+ nextRun && enabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
92
+ className: "text-disabled",
93
+ children: [
94
+ "(",
95
+ until(nextRun),
96
+ ")"
97
+ ]
98
+ }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
100
+ className: "text-wire",
101
+ children: "·"
102
+ }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
104
+ className: "inline-flex items-center gap-1.5",
105
+ title: `${machine.name || "machine"} · ${machine.presence}`,
106
+ children: [
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
108
+ className: `size-1.5 rounded-full ${machine.presence === "online" ? "bg-rubik-green" : machine.presence === "asleep" ? "bg-rubik-yellow" : "bg-disabled"}`,
109
+ "aria-hidden": "true"
110
+ }),
111
+ machine.name || "machine",
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
113
+ className: "sr-only",
114
+ children: [
115
+ "(",
116
+ machine.presence,
117
+ ")"
118
+ ]
119
+ })
120
+ ]
121
+ })
122
+ ]
123
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
124
+ className: "mt-1 truncate",
125
+ title: workdir,
126
+ children: [
127
+ workdir,
128
+ " · Model: ",
129
+ model || "default",
130
+ " · Reasoning: ",
131
+ reasoningEffort || "default"
132
+ ]
133
+ })]
134
+ });
135
+ }
76
136
  var PAGE = 16;
77
137
  var RAD = "rounded-[4px]";
78
138
  var SEG = `h-5 w-[18px] shrink-0 ${RAD}`;
@@ -197,9 +257,82 @@ function Timeline({ loop, runs, total, onLoadMore, onPickRun }) {
197
257
  ]
198
258
  });
199
259
  }
200
- /** Shared modal shell — Base UI Dialog handles focus trap, Esc, scroll lock.
201
- * Content-height, optically centered — sized for the small form/compose dialogs
202
- * (the old `detail`/`wide` variants died with the modal-era loop/run views). */
260
+ var AGENT_LABEL = {
261
+ "claude-code": "Claude Code",
262
+ codex: "Codex"
263
+ };
264
+ var titleCls = "rounded-sm text-left text-[17px] font-semibold tracking-[-0.01em] text-display outline-none";
265
+ /** The shared loop summary shown on both the dashboard and loop detail page. */
266
+ function LoopOverview({ loop, runs, onLoadMore, onPickRun, onOpen, extraPill }) {
267
+ const last = lastRunOf({
268
+ ...loop,
269
+ runs
270
+ });
271
+ const lifecycle = lifecyclePresentation(loop);
272
+ const hydrated = useHydrated();
273
+ const newestRun = runs.at(-1);
274
+ const latestIncidentRun = newestRun?.reportIncident ? newestRun : void 0;
275
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
277
+ className: "mb-6 flex flex-wrap items-center gap-3",
278
+ children: [
279
+ onOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
280
+ type: "button",
281
+ onClick: (event) => {
282
+ event.stopPropagation();
283
+ onOpen();
284
+ },
285
+ className: `${titleCls} cursor-pointer focus-visible:ring-2 focus-visible:ring-interactive focus-visible:ring-offset-4 focus-visible:ring-offset-surface`,
286
+ children: loop.name
287
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
288
+ className: titleCls,
289
+ children: loop.name
290
+ }),
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
292
+ tone: lifecycle.tone,
293
+ children: lifecycle.label
294
+ }),
295
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
296
+ tone: "outline",
297
+ children: AGENT_LABEL[loop.agent]
298
+ }),
299
+ extraPill,
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
301
+ className: "ml-auto min-w-0",
302
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoopMeta, {
303
+ schedule: loop.schedule,
304
+ nextRun: loop.nextRun,
305
+ enabled: loop.enabled,
306
+ machine: loop.machine,
307
+ workdir: loop.workdir,
308
+ model: loop.model,
309
+ reasoningEffort: loop.reasoningEffort
310
+ })
311
+ })
312
+ ]
313
+ }),
314
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timeline, {
315
+ loop,
316
+ runs,
317
+ total: loop.runCount,
318
+ onLoadMore,
319
+ onPickRun
320
+ }),
321
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
322
+ className: "mt-[18px] flex items-center gap-2 text-meta text-secondary",
323
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [loop.runCount, " runs"] }), last && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
324
+ "· last ",
325
+ dotLabel(last),
326
+ hydrated && ` · ${rel(last.ts)}`
327
+ ] })]
328
+ }),
329
+ latestIncidentRun?.reportIncident && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
330
+ className: "mt-1.5 text-meta text-secondary",
331
+ children: latestIncidentRun.phase === "error" ? "Last run failed · Terminal report rejected" : "Last run telemetry warning · Terminal report rejected"
332
+ })
333
+ ] });
334
+ }
335
+ /** Shared modal shell — Base UI Dialog handles focus trap, Esc, and scroll lock. */
203
336
  function Modal({ open, onClose, children, wide = false }) {
204
337
  const pos = `-translate-y-1/2 max-h-[calc(100dvh-4rem)] ${wide ? "top-1/2 max-w-[62rem]" : "top-[46%] max-w-160"}`;
205
338
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, {
@@ -588,4 +721,4 @@ function MachinesModal({ open, onClose, teamId }) {
588
721
  });
589
722
  }
590
723
  //#endregion
591
- export { Timeline as a, ModalSection as i, Modal as n, listMachines as o, ModalHead as r, mergeRuns as s, MachinesModal as t };
724
+ export { ModalSection as a, listMachines as c, ModalHead as i, mergeRuns as l, MachinesModal as n, Timeline as o, Modal as r, daemonConnectCommand as s, LoopOverview as t };
@@ -1,7 +1,7 @@
1
1
  import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
- import { s as btnPrimary } from "./ui-DmFKW2H_.mjs";
3
- import { C as signIn, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL } from "./SocialLinks-BTjsnVOm.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-DjSrg0nO.js
2
+ import { s as btnPrimary } from "./ui-dMEI4sHj.mjs";
3
+ import { S as signIn, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL } from "./SocialLinks-Bt7huqfS.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-ffgDY0yf.js
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
6
  /**
7
7
  * Sign-in CTA — shown by the auth gate when a GitHub OAuth app is configured and
@@ -1,8 +1,8 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { E as defu, I as getBaseURL, Wt as toKebabCase, b as createFetch, h as capitalizeFirstLetter, it as isSafeUrlScheme } from "./boot-BbWxaF-z.mjs";
2
+ import { D as defu, Gt as toKebabCase, L as getBaseURL, at as isSafeUrlScheme, g as capitalizeFirstLetter, x as createFetch } from "./boot-sNlIkoLe.mjs";
3
3
  import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
4
  import { n as createServerFn, r as getServerFnById, t as TSS_SERVER_FUNCTION } from "./ssr.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/SocialLinks-BTjsnVOm.js
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/SocialLinks-Bt7huqfS.js
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react());
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  var createSsrRpc = (functionId) => {
@@ -57,7 +57,8 @@ var canViewTeam = createServerFn({ method: "GET" }).validator((teamId) => teamId
57
57
  /** GET — the caller's default dashboard team as an id: the last-used cookie,
58
58
  * validated, else the personal team. Backs the `/` → `/t/<id>` redirect. */
59
59
  var getDefaultTeam = createServerFn({ method: "GET" }).handler(createSsrRpc("dc0ec955d0d53a150a3e9a4673f98f3509cfb4bd411c512079ae4e94c561b70c"));
60
- /** GET — the signed-in user's loops as compact summaries (newest first).
60
+ /** GET — the signed-in user's loops as compact summaries (most recently run first;
61
+ * never-run loops remain newest-created first).
61
62
  * Gate on ⇒ only the given/active team's loops; open mode ⇒ the full shared list.
62
63
  * An explicit `teamId` (the `/t/<id>` route) scopes this request independent of
63
64
  * the cookie, so different tabs on /t/A and /t/B list different teams at once. */
@@ -87,20 +88,13 @@ var stopLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(
87
88
  * Stop, so retire its execution authority and remove server data immediately.
88
89
  * Local files are never touched by either path. */
89
90
  var deleteLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("5e0d6b55f5629faac2f55a68661eeb82668b2be752192b16264ffb5cd1e6fabe"));
90
- createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("199e1c98d1946048b76a18a86c6d252d87776e70fefa62e4af66089244acb9de"));
91
91
  var runLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("08565e35f6a3dd06ef25401de0343976c47f7ae319d3baed6320b56dd3718311"));
92
92
  /** Dedicated Stop-run operation. Pending work cancels immediately; running work
93
93
  * records intent and stays Running until the daemon reports its actual result. */
94
94
  var stopRun = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("6850ba403da9dec5aff45794eb52636ca540ddec2d9e59f5c75ccbb852bfeacb"));
95
- /**
96
- * Mint a fresh claim token for a New-loop dialog. It's shown in the paste
97
- * snippet and used by Claude Code as (a) this machine's device token if the
98
- * machine is new, and (b) the loop's `claim` so the dialog can correlate the
99
- * created loop. No machine row is created here — the daemon self-registers.
100
- */
95
+ /** Mint the key shown in the New-loop daemon connection command. It may enroll
96
+ * a new machine and remains valid as an optional team-bound create claim. */
101
97
  var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(createSsrRpc("4646f52fb09b83c9c9cef34836f3c9d03416423c879d9e5ceffcafd9a71ecba6"));
102
- /** Poll a claim while the New-loop dialog waits for Claude Code to create the loop. */
103
- var claimStatus = createServerFn({ method: "GET" }).validator((token) => token).handler(createSsrRpc("4b0db7d6c8f25383a3526598cb0c1881db6cf413e451e9478687c05666461347"));
104
98
  var PROTO_POLLUTION_PATTERNS = {
105
99
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
106
100
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -1048,4 +1042,4 @@ function GitHubIcon({ className }) {
1048
1042
  });
1049
1043
  }
1050
1044
  //#endregion
1051
- export { signIn as C, useSession as D, stopRun as E, runLoop as S, stopLoop as T, listMyTeams as _, canViewTeam as a, patchLoop as b, deleteLoop as c, getAuthState as d, getConfig as f, listLoops as g, getRunDiff as h, authClient as i, getArtifact as l, getLoopDetail as m, GitHubIcon as n, claimStatus as o, getDefaultTeam as p, PievoLogo as r, createSsrRpc as s, GITHUB_URL as t, getArtifacts as u, loadOlderRuns as v, startLoop as w, pauseLoop as x, mintClaim as y };
1045
+ export { startLoop as C, useSession as E, signIn as S, stopRun as T, loadOlderRuns as _, canViewTeam as a, pauseLoop as b, getArtifact as c, getConfig as d, getDefaultTeam as f, listMyTeams as g, listLoops as h, authClient as i, getArtifacts as l, getRunDiff as m, GitHubIcon as n, createSsrRpc as o, getLoopDetail as p, PievoLogo as r, deleteLoop as s, GITHUB_URL as t, getAuthState as u, mintClaim as v, stopLoop as w, runLoop as x, patchLoop as y };
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
2
  import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
- import { a as btn, o as btnDanger, s as btnPrimary } from "./ui-DmFKW2H_.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/actionUi-D15R8L7R.js
3
+ import { a as btn, o as btnDanger, s as btnPrimary } from "./ui-dMEI4sHj.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/actionUi-DD7Cd7Le.js
5
5
  var import_react = /* @__PURE__ */ __toESM(require_react());
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  /**
@@ -1,6 +1,6 @@
1
- import { F as getArtifactSync, It as safeRelPath, P as getArtifactFile, ct as listArtifacts } from "./boot-BbWxaF-z.mjs";
2
- import { t as toArtifactSummary } from "./loopProjection-BZ1_IYCr.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-CV3OXxRD.js
1
+ import { F as getArtifactFile, I as getArtifactSync, Lt as safeRelPath, lt as listArtifacts } from "./boot-sNlIkoLe.mjs";
2
+ import { n as toArtifactSummary } from "./loopProjection-eZvVobW7.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-DHBXTtZn.js
4
4
  /**
5
5
  * Server-side reads over a loop's current exact artifacts. Pure helpers
6
6
  * (no request/session context) so they're shared by the lazy server fns
@@ -1,7 +1,7 @@
1
1
  import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
2
- import { d as getAuthState, i as authClient } from "./SocialLinks-BTjsnVOm.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-ByzVa7fg.js
4
- var $$splitComponentImporter = () => import("./loops._loopId-CKsAnxMl.mjs");
2
+ import { i as authClient, u as getAuthState } from "./SocialLinks-Bt7huqfS.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-CwQ_Ddj6.js
4
+ var $$splitComponentImporter = () => import("./loops._loopId-TEIcuqZU.mjs");
5
5
  /**
6
6
  * Loop detail page — `/loops/$loopId`: a loop header and action toolbar, the
7
7
  * exact artifact Files panel, and the runs timeline. The view owns its own
@@ -0,0 +1,2 @@
1
+ import { Tt as parseArtifactSyncBody, f as SYNC_BODY_CAP, i as BLOB_CAP } from "./boot-sNlIkoLe.mjs";
2
+ export { BLOB_CAP, SYNC_BODY_CAP, parseArtifactSyncBody };
@@ -1,6 +1,6 @@
1
1
  import { C as notInArray, S as ne, _ as isNotNull, b as lt, d as and, f as eq, g as inArray, h as ilike, j as sql, l as asc, m as gte, p as gt, s as count, u as desc, v as isNull$1, w as or, x as lte, y as like } from "../_libs/drizzle-orm+postgres.mjs";
2
- import { $ as isDynamicBaseURLConfig, Ct as normalizePathname, E as defu, Ft as resolveBaseURL, G as getOrigin, I as getBaseURL, K as getProtocol, L as getBooleanEnvVar, M as env, Q as isDevelopment, T as db, Ut as teamIdForUser, V as getHost, Zt as wildcardMatch, a as BetterAuthError, at as isTeamMember, c as ENV, f as ValidationError$1, h as capitalizeFirstLetter, j as ensureTeam, m as betterFetch, n as APIError$1, nt as isProduction, o as BetterCallError, ot as isTest, r as BASE_ERROR_CODES, rt as isRequestLike, st as kAPIErrorHeaderSymbol, t as APIError, vt as loginGateEnabled, y as createDefu, z as getEnvVar } from "./boot-BbWxaF-z.mjs";
3
- import { C as withSpan, S as shouldPublishLog, _ as logger, a as __getBetterAuthGlobal, b as runWithTransaction, c as createRandomStringGenerator, d as getAuthTables, f as getBetterAuthVersion, g as initGetModelName, h as initGetFieldName, l as generateId$2, m as import_src, n as ATTR_HOOK_TYPE, o as createAdapterFactory, p as getCurrentAdapter, r as ATTR_OPERATION_ID, s as createLogger, t as ATTR_CONTEXT, u as getAsyncLocalStorage, v as queueAfterTransactionHook, x as safeJSONParse, y as runWithAdapter } from "./factory-S7MaMVC2.mjs";
2
+ import { $ as isDevelopment, B as getEnvVar, D as defu, E as db, H as getHost, It as resolveBaseURL, K as getOrigin, L as getBaseURL, M as ensureTeam, N as env, R as getBooleanEnvVar, Wt as teamIdForUser, a as BetterAuthError, b as createDefu, c as ENV, ct as kAPIErrorHeaderSymbol, en as wildcardMatch, et as isDynamicBaseURLConfig, g as capitalizeFirstLetter, h as betterFetch, it as isRequestLike, n as APIError$1, o as BetterCallError, ot as isTeamMember, p as ValidationError$1, q as getProtocol, r as BASE_ERROR_CODES, rt as isProduction, st as isTest, t as APIError, wt as normalizePathname, yt as loginGateEnabled } from "./boot-sNlIkoLe.mjs";
3
+ import { C as withSpan, S as shouldPublishLog, _ as logger, a as __getBetterAuthGlobal, b as runWithTransaction, c as createRandomStringGenerator, d as getAuthTables, f as getBetterAuthVersion, g as initGetModelName, h as initGetFieldName, l as generateId$2, m as import_src, n as ATTR_HOOK_TYPE, o as createAdapterFactory, p as getCurrentAdapter, r as ATTR_OPERATION_ID, s as createLogger, t as ATTR_CONTEXT, u as getAsyncLocalStorage, v as queueAfterTransactionHook, x as safeJSONParse, y as runWithAdapter } from "./factory-Dv3Zopis.mjs";
4
4
  import { randomBytes, scrypt } from "node:crypto";
5
5
  import fs from "node:fs";
6
6
  import path from "node:path";
@@ -1700,7 +1700,7 @@ var JOIN_TYPE_SQL = freeze({
1700
1700
  Using: "using"
1701
1701
  });
1702
1702
  //#endregion
1703
- //#region node_modules/.nitro/vite/services/ssr/assets/auth-CPCDf6Wr.js
1703
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-C0zoZCGe.js
1704
1704
  /**
1705
1705
  * @internal
1706
1706
  */
@@ -15993,7 +15993,7 @@ var createKyselyAdapter = async (config) => {
15993
15993
  if ("getConnection" in db) dialect = new MysqlDialect(db);
15994
15994
  if ("connect" in db) dialect = new PostgresDialect({ pool: db });
15995
15995
  if ("fileControl" in db) {
15996
- const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-8MIh9jN1.mjs");
15996
+ const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs");
15997
15997
  dialect = new BunSqliteDialect({ database: db });
15998
15998
  }
15999
15999
  if ("createSession" in db) {
@@ -16009,12 +16009,12 @@ var createKyselyAdapter = async (config) => {
16009
16009
  if (error !== null && typeof error === "object" && "code" in error && error.code !== "ERR_UNKNOWN_BUILTIN_MODULE") throw error;
16010
16010
  }
16011
16011
  if (DatabaseSync && db instanceof DatabaseSync) {
16012
- const { NodeSqliteDialect } = await import("./node-sqlite-dialect-rWwVyt2J.mjs");
16012
+ const { NodeSqliteDialect } = await import("./node-sqlite-dialect-CjNineno.mjs");
16013
16013
  dialect = new NodeSqliteDialect({ database: db });
16014
16014
  }
16015
16015
  }
16016
16016
  if ("batch" in db && "exec" in db && "prepare" in db) {
16017
- const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-CcMQ01_d.mjs");
16017
+ const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs");
16018
16018
  dialect = new D1SqliteDialect({ database: db });
16019
16019
  }
16020
16020
  return {
@@ -36526,7 +36526,7 @@ async function getBaseAdapter(options, handleDirectDatabase) {
36526
36526
  acc[key] = [];
36527
36527
  return acc;
36528
36528
  }, {});
36529
- const { memoryAdapter } = await import("./dist-AxCsRawm.mjs");
36529
+ const { memoryAdapter } = await import("./dist-B3SxDOpW.mjs");
36530
36530
  adapter = memoryAdapter(memoryDB)(options);
36531
36531
  } else if (typeof options.database === "function") adapter = options.database(options);
36532
36532
  else adapter = await handleDirectDatabase(options);
@@ -36540,10 +36540,10 @@ async function getBaseAdapter(options, handleDirectDatabase) {
36540
36540
  }
36541
36541
  async function getAdapter(options) {
36542
36542
  return getBaseAdapter(options, async (opts) => {
36543
- const { createKyselyAdapter } = await import("./kysely-adapter-DUdpqcCJ.mjs");
36543
+ const { createKyselyAdapter } = await import("./kysely-adapter-nL7WKSgw.mjs");
36544
36544
  const { kysely, databaseType, transaction } = await createKyselyAdapter(opts);
36545
36545
  if (!kysely) throw new BetterAuthError("Failed to initialize database adapter");
36546
- const { kyselyAdapter } = await import("./kysely-adapter-DUdpqcCJ.mjs");
36546
+ const { kyselyAdapter } = await import("./kysely-adapter-nL7WKSgw.mjs");
36547
36547
  return kyselyAdapter(kysely, {
36548
36548
  type: databaseType || "sqlite",
36549
36549
  debugLogs: opts.database && "debugLogs" in opts.database ? opts.database.debugLogs : false,
@@ -0,0 +1,2 @@
1
+ import { I as getArtifactSync, V as getGateway, z as getCliGateway } from "./boot-sNlIkoLe.mjs";
2
+ export { getArtifactSync, getCliGateway, getGateway };