@kky42/pievo-server 2.4.14 → 3.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 (90) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{actionUi-5PtES4q0.js → actionUi-BZrLpgHT.js} +1 -1
  3. package/.output/public/assets/app-DXLuQNb9.css +2 -0
  4. package/.output/public/assets/index-Di_wpAtL.js +10 -0
  5. package/.output/public/assets/loops._loopId-X3ClNPMY.js +67 -0
  6. package/.output/public/assets/loops._loopId_.runs._runId-ByU2BSyF.js +3 -0
  7. package/.output/public/assets/preload-helper-hRTYB_ju.js +3 -0
  8. package/.output/public/assets/{routes-Dm_3J2aV.js → routes-BIOJZsig.js} +1 -1
  9. package/.output/public/assets/routes-K8D5uBiV.js +1 -0
  10. package/.output/server/_chunks/ssr-renderer.mjs +1 -1
  11. package/.output/server/_libs/{drizzle-orm+postgres.mjs → drizzle-orm.mjs} +93 -2218
  12. package/.output/server/_ssr/{MachinesModal-BaEtzycr.mjs → MachinesModal-CmVMec6B.mjs} +46 -46
  13. package/.output/server/_ssr/{actionUi-5HOCZnom.mjs → actionUi-DE-Pb2tv.mjs} +1 -2
  14. package/.output/server/_ssr/{artifactFiles-DO43wwXA.mjs → artifactFiles-Di1xDKvX.mjs} +5 -8
  15. package/.output/server/_ssr/{artifactKind-DwDr8IYc.mjs → artifactKind-DqpmtxDU.mjs} +3 -9
  16. package/.output/server/_ssr/{boot-C472kLwY.mjs → boot-CYRi-wez.mjs} +2152 -351
  17. package/.output/server/_ssr/lifecycleUi-BsbUsi5K.mjs +106 -0
  18. package/.output/server/_ssr/{loopApi-DT751TJA.mjs → loopApi-Bez1rHV0.mjs} +50 -66
  19. package/.output/server/_ssr/{loopProjection-qaD2I48a.mjs → loopProjection-esCjyZJg.mjs} +4 -23
  20. package/.output/server/_ssr/{loops._loopId-CXgw2Rz1.mjs → loops._loopId-KUezNY69.mjs} +8 -23
  21. package/.output/server/_ssr/{loops._loopId_.runs._runId-Dk94Z0Jq.mjs → loops._loopId_.runs._runId-BFP9oMrp.mjs} +2 -7
  22. package/.output/server/_ssr/{loops._loopId_.runs._runId-SASSqOfy.mjs → loops._loopId_.runs._runId-DOkUEesG.mjs} +18 -33
  23. package/.output/server/_ssr/{machineFns-BSrIgn3f.mjs → machineFns-CniGcY8s.mjs} +13 -50
  24. package/.output/server/_ssr/networkAccess-CIlK3ION.mjs +30 -0
  25. package/.output/server/_ssr/router-BFIH2UAE.mjs +362 -0
  26. package/.output/server/_ssr/routes-BSVBANI3.mjs +12 -0
  27. package/.output/server/_ssr/{routes-Cr-9yDEH.mjs → routes-DnE7XDe_.mjs} +91 -50
  28. package/.output/server/_ssr/{routes-DRBS4Zi4.mjs → routes-ngpX7h8D.mjs} +2 -4
  29. package/.output/server/_ssr/ssr.mjs +25 -34
  30. package/.output/server/_ssr/start-B5_9Z5W-.mjs +35 -0
  31. package/.output/server/{_tanstack-start-manifest_v-DxLIQ0cc.mjs → _tanstack-start-manifest_v-DnwAupbZ.mjs} +8 -13
  32. package/.output/server/drizzle/0000_baseline.sql +6 -97
  33. package/.output/server/drizzle/meta/_journal.json +2 -23
  34. package/.output/server/index.mjs +45 -52
  35. package/drizzle/0000_baseline.sql +6 -97
  36. package/drizzle/meta/_journal.json +2 -23
  37. package/package.json +4 -8
  38. package/scripts/pievo-server.mjs +49 -47
  39. package/scripts/server-cli-lib.mjs +21 -12
  40. package/scripts/server-network.mjs +139 -0
  41. package/.output/public/assets/SignIn-CIFwnZtF.js +0 -1
  42. package/.output/public/assets/app-DvHMhs7S.css +0 -2
  43. package/.output/public/assets/index-CRX2pu0W.js +0 -10
  44. package/.output/public/assets/loops._loopId-BsuV-Rmf.js +0 -67
  45. package/.output/public/assets/loops._loopId_.runs._runId-DpK_fzmZ.js +0 -3
  46. package/.output/public/assets/preload-helper-sAZOZb3G.js +0 -5
  47. package/.output/public/assets/routes-DxF_s3cD.js +0 -1
  48. package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +0 -419
  49. package/.output/server/_libs/@aws-sdk/checksums+[...].mjs +0 -10732
  50. package/.output/server/_libs/@aws-sdk/client-s3+[...].mjs +0 -9475
  51. package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +0 -137
  52. package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +0 -440
  53. package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +0 -62
  54. package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +0 -818
  55. package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +0 -59
  56. package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +0 -342
  57. package/.output/server/_libs/aws-crypto__crc32c.mjs +0 -314
  58. package/.output/server/_libs/aws-sdk__nested-clients.mjs +0 -2671
  59. package/.output/server/_ssr/SignIn-sHQaBQJC.mjs +0 -53
  60. package/.output/server/_ssr/artifacts-Cd7Qx3Qp.mjs +0 -2
  61. package/.output/server/_ssr/auth-0AamrwHo.mjs +0 -38355
  62. package/.output/server/_ssr/auth-client-lSMb_Idt.mjs +0 -1070
  63. package/.output/server/_ssr/bun-sqlite-dialect-BW9W1_Ps-DLIXocA0.mjs +0 -162
  64. package/.output/server/_ssr/core-RrmWoKne.mjs +0 -5
  65. package/.output/server/_ssr/d1-sqlite-dialect-BLC8LXE6-BoFMIPr_.mjs +0 -112
  66. package/.output/server/_ssr/db-BzvMQ2kx.mjs +0 -2
  67. package/.output/server/_ssr/dist-ClzqkwxD.mjs +0 -342
  68. package/.output/server/_ssr/factory-ixUjZqJn.mjs +0 -6903
  69. package/.output/server/_ssr/kysely-adapter-DkZbmKgV.mjs +0 -2
  70. package/.output/server/_ssr/kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs +0 -19
  71. package/.output/server/_ssr/logger-DDjsYB2X.mjs +0 -2
  72. package/.output/server/_ssr/loopTags-CXx5UdGf.mjs +0 -3356
  73. package/.output/server/_ssr/node-sqlite-dialect-BbUqnnYv.mjs +0 -162
  74. package/.output/server/_ssr/router-BlLlhfJe.mjs +0 -543
  75. package/.output/server/_ssr/routes-DTBltabU.mjs +0 -27
  76. package/.output/server/_ssr/start-4ifArtKx.mjs +0 -4
  77. package/.output/server/_ssr/store-vDZ9INSa.mjs +0 -2
  78. package/.output/server/_ssr/tokens-BHiCElYD.mjs +0 -2
  79. package/.output/server/drizzle/0001_add_pi_agent.sql +0 -9
  80. package/.output/server/drizzle/0002_remove_teams.sql +0 -15
  81. package/.output/server/drizzle/0003_add_loop_tags.sql +0 -5
  82. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  83. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  84. package/.output/server/node_modules/tslib/package.json +0 -47
  85. package/.output/server/node_modules/tslib/tslib.js +0 -484
  86. package/.output/server/package.json +0 -9
  87. package/drizzle/0001_add_pi_agent.sql +0 -9
  88. package/drizzle/0002_remove_teams.sql +0 -15
  89. package/drizzle/0003_add_loop_tags.sql +0 -5
  90. package/scripts/prestart.mjs +0 -66
@@ -1,10 +1,10 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
2
  import { g as require_react, h as require_jsx_runtime, s as TooltipProvider } from "../_libs/@base-ui/react+[...].mjs";
3
- import { c as createFileRoute, d as useNavigate, f as useRouter, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
4
- import { O as useSession, _ as listLoops, a as PievoLogo, f as getAuthState, i as OpenModeWarning, n as GITHUB_URL, p as getConfig, r as GitHubIcon, v as loadOlderRuns, w as signOut, y as mintConnectKey } from "./auth-client-lSMb_Idt.mjs";
5
- import { f as btnSm, y as focusRing } from "./actionUi-5HOCZnom.mjs";
6
- import { c as mergeRuns, i as ModalHead, n as MachinesModal, o as daemonConnectCommand, r as Modal, s as listMachines, t as LoopOverview } from "./MachinesModal-BaEtzycr.mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-Cr-9yDEH.js
3
+ import { c as createFileRoute, d as useNavigate, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
4
+ import { c as getConfig, f as listLoops, m as mintConnectKey, p as loadOlderRuns } from "./lifecycleUi-BsbUsi5K.mjs";
5
+ import { f as btnSm, y as focusRing } from "./actionUi-DE-Pb2tv.mjs";
6
+ import { c as listMachines, i as ModalHead, l as mergeRuns, n as MachinesModal, o as connectServerUrl, r as Modal, s as daemonConnectCommand, t as LoopOverview } from "./MachinesModal-CmVMec6B.mjs";
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-DnE7XDe_.js
8
8
  var import_react = /* @__PURE__ */ __toESM(require_react());
9
9
  var import_jsx_runtime = require_jsx_runtime();
10
10
  function LoopCard({ loop, onOpen, onPickRun }) {
@@ -81,7 +81,7 @@ function ComposeModal({ open, onClose }) {
81
81
  const [error, setError] = (0, import_react.useState)(null);
82
82
  const [configError, setConfigError] = (0, import_react.useState)(false);
83
83
  const origin = typeof window !== "undefined" ? window.location.origin : "";
84
- const command = token && config ? daemonConnectCommand(origin, token, config.pievoCli, config.customCli) : "";
84
+ const command = token && config ? daemonConnectCommand(connectServerUrl(origin, config.publicUrl), token, config.pievoCli, config.customCli) : "";
85
85
  (0, import_react.useEffect)(() => {
86
86
  if (!open) return;
87
87
  setToken(null);
@@ -99,9 +99,7 @@ function ComposeModal({ open, onClose }) {
99
99
  if (active) setConfigError(true);
100
100
  });
101
101
  mintConnectKey().then((result) => {
102
- if (!active) return;
103
- if ("token" in result) setToken(result.token);
104
- else setError(result.error);
102
+ if (active) setToken(result.token);
105
103
  }).catch(() => {
106
104
  if (active) setError("could not mint a connect key");
107
105
  });
@@ -206,6 +204,85 @@ function Step({ number, title, continued = false, children }) {
206
204
  })]
207
205
  });
208
206
  }
207
+ /**
208
+ * Shared Pievo mark geometry: eight durable steps form a cycle and the
209
+ * interactive-blue runner marks the next scheduled pass.
210
+ *
211
+ * Variants are props on one geometry (styles in app.css):
212
+ * - `plate` - dark tile behind the steps (favicon / app-icon contexts);
213
+ * without it the steps inherit currentColor (inline contexts).
214
+ * - `trail` - two fading steps behind the runner, so a static rendering
215
+ * still reads as motion (print / social cards).
216
+ * - `animated` - the runner advances around the cycle; reduced-motion users
217
+ * see the canonical static first frame.
218
+ */
219
+ var RING = [
220
+ [9, 9],
221
+ [37, 9],
222
+ [65, 9],
223
+ [65, 37],
224
+ [65, 65],
225
+ [37, 65],
226
+ [9, 65],
227
+ [9, 37]
228
+ ];
229
+ function RingLogo({ size = 24, plate = false, trail = false, animated = false }) {
230
+ const cellClass = (i) => {
231
+ const parts = ["ring-cell", `rc${i}`];
232
+ if (i === 0) parts.push("ring-runner");
233
+ else if (trail && i === 7) parts.push("ring-trail-1");
234
+ else if (trail && i === 6) parts.push("ring-trail-2");
235
+ return parts.join(" ");
236
+ };
237
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
238
+ width: size,
239
+ height: size,
240
+ viewBox: "0 0 96 96",
241
+ role: "img",
242
+ "aria-label": "Pievo",
243
+ className: [
244
+ "ring-logo",
245
+ plate && "ring-logo-plate",
246
+ animated && "ring-logo-animated"
247
+ ].filter(Boolean).join(" "),
248
+ children: [plate && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
249
+ width: "96",
250
+ height: "96",
251
+ rx: "15",
252
+ fill: "#0b0b0b"
253
+ }), RING.map(([x, y], i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
254
+ x,
255
+ y,
256
+ width: 22,
257
+ height: 22,
258
+ rx: 6,
259
+ className: cellClass(i)
260
+ }, i))]
261
+ });
262
+ }
263
+ /**
264
+ * Pievo's primary product mark: one scheduled pass moving around a durable ring.
265
+ * It reuses the same geometry as the favicon and README asset; animation is a
266
+ * progressive enhancement and parks on the canonical first frame when reduced
267
+ * motion is requested.
268
+ */
269
+ function PievoLogo({ size = 56 }) {
270
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RingLogo, {
271
+ size,
272
+ plate: true,
273
+ animated: true
274
+ });
275
+ }
276
+ var GITHUB_URL = "https://github.com/kky42/pievo";
277
+ function GitHubIcon({ className }) {
278
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
279
+ viewBox: "0 0 24 24",
280
+ fill: "currentColor",
281
+ "aria-hidden": true,
282
+ className,
283
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.19 1.76 1.19 1.03 1.75 2.69 1.25 3.34.95.1-.74.4-1.25.72-1.54-2.55-.29-5.24-1.28-5.24-5.68 0-1.26.45-2.28 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.83 1.19 3.09 0 4.41-2.69 5.38-5.25 5.67.41.35.77 1.05.77 2.12 0 1.53-.01 2.76-.01 3.14 0 .3.2.66.8.55A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z" })
284
+ });
285
+ }
209
286
  function loopFilterKey(filter) {
210
287
  return filter.kind === "tag" ? `tag:${filter.tag}` : filter.kind;
211
288
  }
@@ -260,8 +337,6 @@ function filterLoops(loops, filter) {
260
337
  case "tag": return loops.filter((loop) => loop.tags.includes(filter.tag));
261
338
  }
262
339
  }
263
- /** Loops and machines change between polls. Authorization is derived server-side
264
- * from the current session; clients do not send tenant identifiers. */
265
340
  async function fetchLiveData() {
266
341
  const [loops, machines] = await Promise.all([listLoops(), listMachines()]);
267
342
  return {
@@ -269,27 +344,14 @@ async function fetchLiveData() {
269
344
  machines
270
345
  };
271
346
  }
272
- function DashboardView({ initial, mode }) {
347
+ function DashboardView({ initial }) {
273
348
  const [live, setLive] = (0, import_react.useState)(null);
274
349
  const { loops, machines } = live ?? initial;
275
350
  const online = machines.filter((m) => m.online).length;
276
351
  const navigate = useNavigate();
277
- const router = useRouter();
278
- const { data: session } = useSession();
279
- const [signingOut, setSigningOut] = (0, import_react.useState)(false);
280
352
  const [composeOpen, setComposeOpen] = (0, import_react.useState)(false);
281
353
  const [machinesOpen, setMachinesOpen] = (0, import_react.useState)(false);
282
354
  const [filter, setFilter] = (0, import_react.useState)({ kind: "all" });
283
- async function logout() {
284
- setSigningOut(true);
285
- try {
286
- await signOut();
287
- await navigate({ to: "/" });
288
- await router.invalidate();
289
- } finally {
290
- setSigningOut(false);
291
- }
292
- }
293
355
  const refetch = (0, import_react.useCallback)(async () => {
294
356
  try {
295
357
  setLive(await fetchLiveData());
@@ -340,7 +402,7 @@ function DashboardView({ initial, mode }) {
340
402
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PievoLogo, { size: 30 })
341
403
  }),
342
404
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
343
- className: `shrink-0 text-[18px] font-semibold tracking-[-0.015em] text-display ${mode === "auth" ? "hidden sm:inline" : ""}`,
405
+ className: "shrink-0 text-[18px] font-semibold tracking-[-0.015em] text-display",
344
406
  children: "Pievo"
345
407
  }),
346
408
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1" }),
@@ -353,19 +415,6 @@ function DashboardView({ initial, mode }) {
353
415
  className: `${headerIconBtn} hidden sm:inline-flex`,
354
416
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitHubIcon, { className: "size-[17px]" })
355
417
  }),
356
- mode === "auth" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
357
- className: "flex shrink-0 items-center gap-2",
358
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
359
- className: "hidden max-w-48 truncate text-label text-secondary md:inline",
360
- title: session?.user.email ?? session?.user.name ?? "Account",
361
- children: session?.user.email ?? session?.user.name ?? "Account"
362
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
363
- onClick: () => void logout(),
364
- disabled: signingOut,
365
- className: headerBtn,
366
- children: signingOut ? "Signing out…" : "Sign out"
367
- })]
368
- }),
369
418
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
370
419
  onClick: () => setMachinesOpen(true),
371
420
  "aria-label": `${online} ${online === 1 ? "machine" : "machines"} online`,
@@ -398,7 +447,6 @@ function DashboardView({ initial, mode }) {
398
447
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", {
399
448
  className: "mx-auto max-w-[1180px] px-8 pb-24",
400
449
  children: [
401
- mode === "open" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OpenModeWarning, { className: "mt-6" }),
402
450
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
403
451
  className: "pb-2 pt-14 text-center",
404
452
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
@@ -472,18 +520,11 @@ function DashboardView({ initial, mode }) {
472
520
  }
473
521
  var headerBtn = "inline-flex shrink-0 cursor-pointer items-center rounded-full px-3 py-1.5 text-meta font-medium text-secondary transition-colors hover:bg-raised hover:text-display";
474
522
  var headerIconBtn = "shrink-0 cursor-pointer items-center rounded-full p-1.5 text-secondary transition-colors hover:bg-raised hover:text-display";
475
- var $$splitErrorComponentImporter = () => import("./routes-DRBS4Zi4.mjs");
476
- var $$splitComponentImporter = () => import("./routes-DTBltabU.mjs");
477
- /** The dashboard route. Auth mode shows sign-in before loading owner-scoped data;
478
- * open mode renders the server's shared administrative workspace. */
523
+ var $$splitErrorComponentImporter = () => import("./routes-ngpX7h8D.mjs");
524
+ var $$splitComponentImporter = () => import("./routes-BSVBANI3.mjs");
479
525
  var Route = createFileRoute("/")({
480
526
  ssr: false,
481
- loader: async () => {
482
- return {
483
- auth: await getAuthState(),
484
- initial: await fetchLiveData()
485
- };
486
- },
527
+ loader: () => fetchLiveData(),
487
528
  component: lazyRouteComponent($$splitComponentImporter, "component"),
488
529
  errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
489
530
  });
@@ -1,10 +1,8 @@
1
1
  import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
2
  import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
3
- import { i as LoadErrorCard } from "./actionUi-5HOCZnom.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-DRBS4Zi4.js
3
+ import { i as LoadErrorCard } from "./actionUi-DE-Pb2tv.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-ngpX7h8D.js
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
- /** The dashboard route. Auth mode shows sign-in before loading owner-scoped data;
7
- * open mode renders the server's shared administrative workspace. */
8
6
  /** First-load failure screen — a calm retry instead of the router's default
9
7
  * error dump. Only the initial loader can land here; the in-page poll is
10
8
  * fetch-then-set and keeps stale data on a transient blip. */
@@ -1,5 +1,4 @@
1
1
  import { r as __exportAll } from "../_runtime.mjs";
2
- import { i as __exportAll$1 } from "./factory-ixUjZqJn.mjs";
3
2
  import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
3
  import { a as RouterProvider, n as defineHandlerCallback, t as renderRouterToStream } from "../_libs/@tanstack/react-router+[...].mjs";
5
4
  import { PassThrough, Readable } from "node:stream";
@@ -11,7 +10,7 @@ var ssr_exports = /* @__PURE__ */ __exportAll({
11
10
  i: () => getServerFnById,
12
11
  n: () => createServerFn,
13
12
  r: () => TSS_SERVER_FUNCTION,
14
- t: () => server_exports
13
+ t: () => createMiddleware
15
14
  });
16
15
  require_react();
17
16
  var import_jsx_runtime = require_jsx_runtime();
@@ -597,9 +596,6 @@ function getH3Event() {
597
596
  if (!event) throw new Error(`No StartEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.`);
598
597
  return event.h3Event;
599
598
  }
600
- function getRequest() {
601
- return getH3Event().req;
602
- }
603
599
  function getResponse() {
604
600
  return getH3Event().res;
605
601
  }
@@ -3418,7 +3414,7 @@ var defaultSerovalPlugins = [
3418
3414
  * the dev styles URL for route-scoped CSS collection.
3419
3415
  */
3420
3416
  async function getStartManifest(matchedRoutes) {
3421
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DxLIQ0cc.mjs");
3417
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DnwAupbZ.mjs");
3422
3418
  const startManifest = tsrStartManifest();
3423
3419
  let routes = startManifest.routes;
3424
3420
  routes[rootRouteId];
@@ -3440,87 +3436,83 @@ async function getStartManifest(matchedRoutes) {
3440
3436
  var manifest = {
3441
3437
  "08565e35f6a3dd06ef25401de0343976c47f7ae319d3baed6320b56dd3718311": {
3442
3438
  functionName: "runLoop_createServerFn_handler",
3443
- importer: () => import("./loopApi-DT751TJA.mjs")
3439
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3444
3440
  },
3445
3441
  "08c28b892712a1b491b120b74c7dcb81761988d31ccea60216d1807b73c1182c": {
3446
3442
  functionName: "getRunDiff_createServerFn_handler",
3447
- importer: () => import("./loopApi-DT751TJA.mjs")
3443
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3448
3444
  },
3449
3445
  "169566e7637a22599b4eb32ee3775574e99677406922bbef7482a102036c33dd": {
3450
3446
  functionName: "machineStatus_createServerFn_handler",
3451
- importer: () => import("./machineFns-BSrIgn3f.mjs")
3447
+ importer: () => import("./machineFns-CniGcY8s.mjs")
3452
3448
  },
3453
3449
  "23e290b2b7483ceea6fe669024c35b12c2c4ddd76649f6fab21c958ceda02940": {
3454
3450
  functionName: "listLoops_createServerFn_handler",
3455
- importer: () => import("./loopApi-DT751TJA.mjs")
3451
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3456
3452
  },
3457
3453
  "27d7eba0b6a2257949392fdd56057275a5c5366484ae01faf3b5897a225ecd83": {
3458
3454
  functionName: "finalizeMachine_createServerFn_handler",
3459
- importer: () => import("./machineFns-BSrIgn3f.mjs")
3455
+ importer: () => import("./machineFns-CniGcY8s.mjs")
3460
3456
  },
3461
3457
  "5660ea82ea5ff2549e0ce2f8f070c54f3e9e24fee84d547601ef5d6ef49a4016": {
3462
3458
  functionName: "startLoop_createServerFn_handler",
3463
- importer: () => import("./loopApi-DT751TJA.mjs")
3459
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3464
3460
  },
3465
3461
  "5e0d6b55f5629faac2f55a68661eeb82668b2be752192b16264ffb5cd1e6fabe": {
3466
3462
  functionName: "deleteLoop_createServerFn_handler",
3467
- importer: () => import("./loopApi-DT751TJA.mjs")
3463
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3468
3464
  },
3469
3465
  "6850ba403da9dec5aff45794eb52636ca540ddec2d9e59f5c75ccbb852bfeacb": {
3470
3466
  functionName: "stopRun_createServerFn_handler",
3471
- importer: () => import("./loopApi-DT751TJA.mjs")
3467
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3472
3468
  },
3473
3469
  "85fdf73d4fee43aed762f93c5d47d33200fbff39e2d082647dc921f610d32698": {
3474
3470
  functionName: "loadOlderRuns_createServerFn_handler",
3475
- importer: () => import("./loopApi-DT751TJA.mjs")
3471
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3476
3472
  },
3477
3473
  "95b7483b333d7649e70c848319417e83c2af6a0327bbcda2d0e331f626dffe05": {
3478
3474
  functionName: "pauseLoop_createServerFn_handler",
3479
- importer: () => import("./loopApi-DT751TJA.mjs")
3475
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3480
3476
  },
3481
3477
  "9befe6b8d67ccbbd7aa9b538bde2a161a9894761c8936761a9503fda1a88c0fc": {
3482
3478
  functionName: "patchLoop_createServerFn_handler",
3483
- importer: () => import("./loopApi-DT751TJA.mjs")
3479
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3484
3480
  },
3485
3481
  "a6384dc7154d9930422d29396f5de64b3ac69c62ad3824bc4a22d745fc07b293": {
3486
3482
  functionName: "deleteMachine_createServerFn_handler",
3487
- importer: () => import("./machineFns-BSrIgn3f.mjs")
3483
+ importer: () => import("./machineFns-CniGcY8s.mjs")
3488
3484
  },
3489
3485
  "aa46310016bb8a58b273a648ffd498c87f1f450d12827e30110a3b83ba6a27d9": {
3490
3486
  functionName: "listMachines_createServerFn_handler",
3491
- importer: () => import("./machineFns-BSrIgn3f.mjs")
3487
+ importer: () => import("./machineFns-CniGcY8s.mjs")
3492
3488
  },
3493
3489
  "b050455aacc84dd2a2c9a45517826ad10f91d8f1545e87cc7015784cc7116a97": {
3494
3490
  functionName: "getLoopDetail_createServerFn_handler",
3495
- importer: () => import("./loopApi-DT751TJA.mjs")
3491
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3496
3492
  },
3497
3493
  "b18bbec3d06dfc77714e1e527dfb9172fd7575a64a6c0d6e73ba6dc658dccf0d": {
3498
3494
  functionName: "getArtifacts_createServerFn_handler",
3499
- importer: () => import("./loopApi-DT751TJA.mjs")
3500
- },
3501
- "b8119d5fe6ca1ed9f609702aa2133b5ac5337030c0bdcf92dc7eba889d6bd2e6": {
3502
- functionName: "getAuthState_createServerFn_handler",
3503
- importer: () => import("./loopApi-DT751TJA.mjs")
3495
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3504
3496
  },
3505
3497
  "cbb6a1b09b309459bbba3dc3851ae85fc468658b3cda77e22b6c6f3e28b65af4": {
3506
3498
  functionName: "getConfig_createServerFn_handler",
3507
- importer: () => import("./loopApi-DT751TJA.mjs")
3499
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3508
3500
  },
3509
3501
  "ce43dcb9366e7c8f7338a6ad28e4290b75a5ee3b13d0d2c9cb585020008f12c6": {
3510
3502
  functionName: "mintConnectKey_createServerFn_handler",
3511
- importer: () => import("./loopApi-DT751TJA.mjs")
3503
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3512
3504
  },
3513
3505
  "e233a461e4526dec3cc4cbaa891a7c3621d5967ce7f32b4fb17e9fb645857b9a": {
3514
3506
  functionName: "stopLoop_createServerFn_handler",
3515
- importer: () => import("./loopApi-DT751TJA.mjs")
3507
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3516
3508
  },
3517
3509
  "ed10d5fe79208e5e0e4e18e4a17b18d7f7db4dd16204c00c3ac90c4644668841": {
3518
3510
  functionName: "getArtifact_createServerFn_handler",
3519
- importer: () => import("./loopApi-DT751TJA.mjs")
3511
+ importer: () => import("./loopApi-Bez1rHV0.mjs")
3520
3512
  },
3521
3513
  "ed679b4e1e05e903a5d4ba4a70d9b9d883991ab22ed59b4d2d69078941818415": {
3522
3514
  functionName: "createMachine_createServerFn_handler",
3523
- importer: () => import("./machineFns-BSrIgn3f.mjs")
3515
+ importer: () => import("./machineFns-CniGcY8s.mjs")
3524
3516
  }
3525
3517
  };
3526
3518
  async function getServerFnById(id, access) {
@@ -5352,8 +5344,8 @@ var getBaseManifest = getProdBaseManifest;
5352
5344
  var createEarlyHintsForRequest = createEarlyHintsCollector;
5353
5345
  async function loadEntries() {
5354
5346
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
5355
- import("./router-BlLlhfJe.mjs"),
5356
- import("./start-4ifArtKx.mjs"),
5347
+ import("./router-BFIH2UAE.mjs"),
5348
+ import("./start-B5_9Z5W-.mjs"),
5357
5349
  import("./empty-plugin-adapters-DKUlnwwl.mjs")
5358
5350
  ]);
5359
5351
  return {
@@ -5729,7 +5721,6 @@ async function handleServerRoutes({ getRouter, request, url, executeRouter, cont
5729
5721
  }
5730
5722
  return normalizeSsrResponse(response);
5731
5723
  }
5732
- var server_exports = /* @__PURE__ */ __exportAll$1({ getRequest: () => getRequest });
5733
5724
  var fetch$1 = createStartHandler(defaultStreamHandler);
5734
5725
  function createServerEntry(entry) {
5735
5726
  return { async fetch(...args) {
@@ -5738,4 +5729,4 @@ function createServerEntry(entry) {
5738
5729
  }
5739
5730
  var server_default = createServerEntry({ fetch: fetch$1 });
5740
5731
  //#endregion
5741
- export { ssr_exports as i, createServerFn as n, getServerFnById as r, TSS_SERVER_FUNCTION as t };
5732
+ export { ssr_exports as a, getServerFnById as i, createMiddleware as n, createServerFn as r, TSS_SERVER_FUNCTION as t };
@@ -0,0 +1,35 @@
1
+ import { n as createMiddleware } from "./ssr.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/start-B5_9Z5W-.js
3
+ function dedupeSerializationAdapters(deduped, serializationAdapters) {
4
+ for (let i = 0, len = serializationAdapters.length; i < len; i++) {
5
+ const current = serializationAdapters[i];
6
+ if (!deduped.has(current)) {
7
+ deduped.add(current);
8
+ if (current.extends) dedupeSerializationAdapters(deduped, current.extends);
9
+ }
10
+ }
11
+ }
12
+ var createStart = (getOptions) => {
13
+ return {
14
+ getOptions: async () => {
15
+ const options = await getOptions();
16
+ if (options.serializationAdapters) {
17
+ const deduped = /* @__PURE__ */ new Set();
18
+ dedupeSerializationAdapters(deduped, options.serializationAdapters);
19
+ options.serializationAdapters = Array.from(deduped);
20
+ }
21
+ return options;
22
+ },
23
+ createMiddleware
24
+ };
25
+ };
26
+ /** Rejects requests from outside this machine, the LAN, and the tailnet. */
27
+ var networkAccess = createMiddleware().server(async ({ request, next }) => {
28
+ const { isTrustedPeer } = await import("./networkAccess-CIlK3ION.mjs");
29
+ const peer = request.ip;
30
+ if (!isTrustedPeer(peer)) return new Response("Pievo only accepts connections from this machine, the local network, or Tailscale.", { status: 403 });
31
+ return next();
32
+ });
33
+ var startInstance = createStart(() => ({ requestMiddleware: [networkAccess] }));
34
+ //#endregion
35
+ export { startInstance };
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-DxLIQ0cc.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-DnwAupbZ.js
2
2
  var tsrStartManifest = () => ({ routes: {
3
3
  __root__: {
4
4
  filePath: "/home/runner/work/pievo/pievo/packages/server/src/routes/__root.tsx",
@@ -8,7 +8,6 @@ var tsrStartManifest = () => ({ routes: {
8
8
  "/api/ready",
9
9
  "/loops/$loopId",
10
10
  "/machine/report",
11
- "/api/auth/$",
12
11
  "/api/machine/cli",
13
12
  "/api/machine/poll",
14
13
  "/api/machine/status",
@@ -18,34 +17,30 @@ var tsrStartManifest = () => ({ routes: {
18
17
  "/loops/$loopId_/runs/$runId"
19
18
  ],
20
19
  preloads: [
21
- "/assets/index-CRX2pu0W.js",
22
- "/assets/actionUi-5PtES4q0.js",
23
- "/assets/preload-helper-sAZOZb3G.js"
20
+ "/assets/index-Di_wpAtL.js",
21
+ "/assets/actionUi-BZrLpgHT.js",
22
+ "/assets/preload-helper-hRTYB_ju.js"
24
23
  ],
25
24
  scripts: [{ attrs: {
26
25
  type: "module",
27
26
  async: !0,
28
- src: "/assets/index-CRX2pu0W.js"
27
+ src: "/assets/index-Di_wpAtL.js"
29
28
  } }]
30
29
  },
31
30
  "/": {
32
31
  filePath: "/home/runner/work/pievo/pievo/packages/server/src/routes/index.tsx",
33
32
  children: void 0,
34
- preloads: [
35
- "/assets/routes-Dm_3J2aV.js",
36
- "/assets/routes-DxF_s3cD.js",
37
- "/assets/SignIn-CIFwnZtF.js"
38
- ]
33
+ preloads: ["/assets/routes-BIOJZsig.js", "/assets/routes-K8D5uBiV.js"]
39
34
  },
40
35
  "/loops/$loopId": {
41
36
  filePath: "/home/runner/work/pievo/pievo/packages/server/src/routes/loops.$loopId.tsx",
42
37
  children: void 0,
43
- preloads: ["/assets/loops._loopId-BsuV-Rmf.js", "/assets/SignIn-CIFwnZtF.js"]
38
+ preloads: ["/assets/loops._loopId-X3ClNPMY.js"]
44
39
  },
45
40
  "/loops/$loopId_/runs/$runId": {
46
41
  filePath: "/home/runner/work/pievo/pievo/packages/server/src/routes/loops.$loopId_.runs.$runId.tsx",
47
42
  children: void 0,
48
- preloads: ["/assets/loops._loopId_.runs._runId-DpK_fzmZ.js", "/assets/SignIn-CIFwnZtF.js"]
43
+ preloads: ["/assets/loops._loopId_.runs._runId-ByU2BSyF.js"]
49
44
  }
50
45
  } });
51
46
  //#endregion
@@ -18,17 +18,14 @@ CREATE TABLE "blobs" (
18
18
  --> statement-breakpoint
19
19
  CREATE TABLE "connect_keys" (
20
20
  "machine_id" text PRIMARY KEY NOT NULL,
21
- "user_id" text NOT NULL,
22
- "team_id" text NOT NULL,
23
21
  "minted_at" text NOT NULL
24
22
  );
25
23
  --> statement-breakpoint
26
24
  CREATE TABLE "loops" (
27
25
  "id" text PRIMARY KEY NOT NULL,
28
- "user_id" text NOT NULL,
29
- "team_id" text NOT NULL,
30
26
  "machine_id" text NOT NULL,
31
27
  "name" text NOT NULL,
28
+ "tags" text[] DEFAULT ARRAY[]::text[] NOT NULL,
32
29
  "prompt" text NOT NULL,
33
30
  "status_keep" text NOT NULL,
34
31
  "status_no_change" text NOT NULL,
@@ -51,15 +48,15 @@ CREATE TABLE "loops" (
51
48
  "last_run_index" integer DEFAULT 0 NOT NULL,
52
49
  "created_at" text NOT NULL,
53
50
  "updated_at" text NOT NULL,
54
- CONSTRAINT "loops_agent_check" CHECK ("loops"."agent" IN ('claude-code', 'codex')),
51
+ CONSTRAINT "loops_agent_check" CHECK ("loops"."agent" IN ('claude-code', 'codex', 'pi')),
52
+ CONSTRAINT "loops_tags_count_check" CHECK (cardinality("loops"."tags") <= 4),
53
+ CONSTRAINT "loops_tags_reserved_check" CHECK (NOT ("loops"."tags" && ARRAY['all loops', 'active', 'paused', 'blocked']::text[])),
55
54
  CONSTRAINT "loops_schedule_mode_check" CHECK ("loops"."schedule_mode" IN ('cron', 'continuous')),
56
55
  CONSTRAINT "loops_cron_overlap_check" CHECK ("loops"."cron_overlap" IN ('skip', 'queue-one'))
57
56
  );
58
57
  --> statement-breakpoint
59
58
  CREATE TABLE "machines" (
60
59
  "id" text PRIMARY KEY NOT NULL,
61
- "user_id" text NOT NULL,
62
- "team_id" text NOT NULL,
63
60
  "name" text NOT NULL,
64
61
  "hostname" text,
65
62
  "platform" text,
@@ -125,40 +122,12 @@ CREATE TABLE "runs" (
125
122
  "cancel_requested_at" timestamp with time zone,
126
123
  "heartbeat_at" text,
127
124
  "report_incident" jsonb,
128
- CONSTRAINT "runs_agent_check" CHECK ("runs"."agent" IS NULL OR "runs"."agent" IN ('claude-code', 'codex')),
125
+ CONSTRAINT "runs_agent_check" CHECK ("runs"."agent" IS NULL OR "runs"."agent" IN ('claude-code', 'codex', 'pi')),
129
126
  CONSTRAINT "runs_phase_check" CHECK ("runs"."phase" IN ('pending', 'running', 'done', 'error', 'canceled')),
130
127
  CONSTRAINT "runs_requested_by_check" CHECK ("runs"."requested_by" IN ('owner', 'system')),
131
128
  CONSTRAINT "runs_status_check" CHECK ("runs"."status" IS NULL OR "runs"."status" IN ('keep', 'no-change', 'block'))
132
129
  );
133
130
  --> statement-breakpoint
134
- CREATE TABLE "team_invites" (
135
- "token" text PRIMARY KEY NOT NULL,
136
- "team_id" text NOT NULL,
137
- "role" text DEFAULT 'member' NOT NULL,
138
- "invited_by_user_id" text NOT NULL,
139
- "expires_at" text NOT NULL,
140
- "redeemed_at" text,
141
- "redeemed_by_user_id" text,
142
- "created_at" text NOT NULL,
143
- CONSTRAINT "team_invites_role_check" CHECK ("team_invites"."role" IN ('owner', 'member'))
144
- );
145
- --> statement-breakpoint
146
- CREATE TABLE "team_members" (
147
- "id" text PRIMARY KEY NOT NULL,
148
- "team_id" text NOT NULL,
149
- "user_id" text NOT NULL,
150
- "role" text DEFAULT 'member' NOT NULL,
151
- "created_at" text NOT NULL,
152
- CONSTRAINT "team_members_role_check" CHECK ("team_members"."role" IN ('owner', 'member'))
153
- );
154
- --> statement-breakpoint
155
- CREATE TABLE "teams" (
156
- "id" text PRIMARY KEY NOT NULL,
157
- "name" text NOT NULL,
158
- "owner_user_id" text,
159
- "created_at" text NOT NULL
160
- );
161
- --> statement-breakpoint
162
131
  CREATE TABLE "terminal_report_incidents" (
163
132
  "id" text PRIMARY KEY NOT NULL,
164
133
  "run_id" text NOT NULL,
@@ -170,65 +139,11 @@ CREATE TABLE "terminal_report_incidents" (
170
139
  CONSTRAINT "terminal_report_incidents_disposition_check" CHECK ("terminal_report_incidents"."disposition" IN ('run-error', 'telemetry-rejected'))
171
140
  );
172
141
  --> statement-breakpoint
173
- CREATE TABLE "account" (
174
- "id" text PRIMARY KEY NOT NULL,
175
- "account_id" text NOT NULL,
176
- "provider_id" text NOT NULL,
177
- "user_id" text NOT NULL,
178
- "access_token" text,
179
- "refresh_token" text,
180
- "id_token" text,
181
- "access_token_expires_at" timestamp,
182
- "refresh_token_expires_at" timestamp,
183
- "scope" text,
184
- "password" text,
185
- "created_at" timestamp DEFAULT now() NOT NULL,
186
- "updated_at" timestamp NOT NULL
187
- );
188
- --> statement-breakpoint
189
- CREATE TABLE "session" (
190
- "id" text PRIMARY KEY NOT NULL,
191
- "expires_at" timestamp NOT NULL,
192
- "token" text NOT NULL,
193
- "created_at" timestamp DEFAULT now() NOT NULL,
194
- "updated_at" timestamp NOT NULL,
195
- "ip_address" text,
196
- "user_agent" text,
197
- "user_id" text NOT NULL,
198
- CONSTRAINT "session_token_unique" UNIQUE("token")
199
- );
200
- --> statement-breakpoint
201
- CREATE TABLE "user" (
202
- "id" text PRIMARY KEY NOT NULL,
203
- "name" text NOT NULL,
204
- "email" text NOT NULL,
205
- "email_verified" boolean DEFAULT false NOT NULL,
206
- "image" text,
207
- "created_at" timestamp DEFAULT now() NOT NULL,
208
- "updated_at" timestamp DEFAULT now() NOT NULL,
209
- CONSTRAINT "user_email_unique" UNIQUE("email")
210
- );
211
- --> statement-breakpoint
212
- CREATE TABLE "verification" (
213
- "id" text PRIMARY KEY NOT NULL,
214
- "identifier" text NOT NULL,
215
- "value" text NOT NULL,
216
- "expires_at" timestamp NOT NULL,
217
- "created_at" timestamp DEFAULT now() NOT NULL,
218
- "updated_at" timestamp DEFAULT now() NOT NULL
219
- );
220
- --> statement-breakpoint
221
- 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
222
- 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
223
142
  CREATE INDEX "artifact_files_loop_idx" ON "artifact_files" USING btree ("loop_id");--> statement-breakpoint
224
143
  CREATE UNIQUE INDEX "artifact_files_loop_path_idx" ON "artifact_files" USING btree ("loop_id","path");--> statement-breakpoint
225
144
  CREATE INDEX "artifact_files_hash_idx" ON "artifact_files" USING btree ("hash");--> statement-breakpoint
226
- CREATE INDEX "loops_user_idx" ON "loops" USING btree ("user_id");--> statement-breakpoint
227
- CREATE INDEX "loops_team_idx" ON "loops" USING btree ("team_id");--> statement-breakpoint
228
145
  CREATE INDEX "loops_machine_idx" ON "loops" USING btree ("machine_id");--> statement-breakpoint
229
146
  CREATE INDEX "delete_requested_loops" ON "loops" USING btree ("delete_requested_at") WHERE "loops"."delete_requested_at" IS NOT NULL;--> statement-breakpoint
230
- CREATE INDEX "machines_user_idx" ON "machines" USING btree ("user_id");--> statement-breakpoint
231
- CREATE INDEX "machines_team_idx" ON "machines" USING btree ("team_id");--> statement-breakpoint
232
147
  CREATE INDEX "run_leases_run_idx" ON "run_leases" USING btree ("run_id");--> statement-breakpoint
233
148
  CREATE INDEX "run_leases_loop_idx" ON "run_leases" USING btree ("loop_id");--> statement-breakpoint
234
149
  CREATE INDEX "report_receipts_created" ON "run_report_receipts" USING btree ("created_at");--> statement-breakpoint
@@ -241,11 +156,5 @@ CREATE UNIQUE INDEX "runs_loop_run_index_idx" ON "runs" USING btree ("loop_id","
241
156
  CREATE INDEX "runs_loop_terminal_history_idx" ON "runs" USING btree ("loop_id","run_index") WHERE "runs"."run_index" IS NOT NULL AND "runs"."phase" IN ('done', 'error', 'canceled');--> statement-breakpoint
242
157
  CREATE UNIQUE INDEX "runs_loop_pending_idx" ON "runs" USING btree ("loop_id") WHERE "runs"."phase" = 'pending';--> statement-breakpoint
243
158
  CREATE UNIQUE INDEX "one_running_run_per_loop" ON "runs" USING btree ("loop_id") WHERE "runs"."phase" = 'running';--> statement-breakpoint
244
- CREATE INDEX "team_invites_team_idx" ON "team_invites" USING btree ("team_id");--> statement-breakpoint
245
- CREATE INDEX "team_members_team_idx" ON "team_members" USING btree ("team_id");--> statement-breakpoint
246
- CREATE INDEX "team_members_user_idx" ON "team_members" USING btree ("user_id");--> statement-breakpoint
247
159
  CREATE INDEX "terminal_report_incidents_report_id" ON "terminal_report_incidents" USING btree ("report_id");--> statement-breakpoint
248
- CREATE INDEX "terminal_report_incidents_created" ON "terminal_report_incidents" USING btree ("created_at");--> statement-breakpoint
249
- CREATE INDEX "account_userId_idx" ON "account" USING btree ("user_id");--> statement-breakpoint
250
- CREATE INDEX "session_userId_idx" ON "session" USING btree ("user_id");--> statement-breakpoint
251
- CREATE INDEX "verification_identifier_idx" ON "verification" USING btree ("identifier");
160
+ CREATE INDEX "terminal_report_incidents_created" ON "terminal_report_incidents" USING btree ("created_at");