@kky42/pievo-server 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{LoopView-B4H9QibC.js → LoopView-d0XYkzpx.js} +3 -3
  3. package/.output/public/assets/Modal-D_od-AuP.js +1 -0
  4. package/.output/public/assets/{SignIn-SHuRRyOv.js → SignIn-CbMeIAJZ.js} +1 -1
  5. package/.output/public/assets/app-BKySt9Ta.css +2 -0
  6. package/.output/public/assets/{artifactView-DFuubXLJ.js → artifactView-DekEs5ME.js} +1 -1
  7. package/.output/public/assets/index-C4UaIr-9.js +12 -0
  8. package/.output/public/assets/{invite._token-T8oo4Qtw.js → invite._token-CnyCmLfD.js} +1 -1
  9. package/.output/public/assets/{lifecycleUi-DKkChdnU.js → lifecycleUi-DGVOf5yS.js} +1 -1
  10. package/.output/public/assets/{loopApi-BM2nj71x.js → loopApi-5s2-kCnu.js} +1 -1
  11. package/.output/public/assets/loops._loopId-DdWM2f1F.js +5 -0
  12. package/.output/public/assets/{loops._loopId_.runs._runId-_CflHV38.js → loops._loopId_.runs._runId-DTwSFHkl.js} +2 -2
  13. package/.output/public/assets/notifyFns-b_jCi5XK.js +1 -0
  14. package/.output/public/assets/{preload-helper-CKUiEq3b.js → preload-helper-ycaoAemE.js} +1 -1
  15. package/.output/public/assets/{routes-B9tgli5f.js → routes-G3WYRyPN.js} +1 -1
  16. package/.output/public/assets/{t._teamId-Bm21mngW.js → t._teamId-CGv7Oq6A.js} +1 -1
  17. package/.output/server/_libs/@base-ui/react+[...].mjs +23 -2375
  18. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  19. package/.output/server/_libs/html-react-parser+[...].mjs +1 -1
  20. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  21. package/.output/server/_libs/recharts+victory-vendor.mjs +1 -1
  22. package/.output/server/_libs/uiw__react-codemirror.mjs +1 -1
  23. package/.output/server/_ssr/CodeField-tm4rr6G3.mjs +1 -1
  24. package/.output/server/_ssr/{DashboardView-CC7htv28.mjs → DashboardView-CmDqjCiq.mjs} +45 -35
  25. package/.output/server/_ssr/{LoopPlaybook-BXH8mhiX.mjs → LoopPlaybook-BBn-xXpG.mjs} +3 -3
  26. package/.output/server/_ssr/{LoopView-DCugEbHx.mjs → LoopView-DdyJYOCY.mjs} +5 -5
  27. package/.output/server/_ssr/Modal-DpKZHLZK.mjs +1 -1
  28. package/.output/server/_ssr/{SignIn-dTndU6Hw.mjs → SignIn-RJN_0GFZ.mjs} +3 -3
  29. package/.output/server/_ssr/actionUi-CZbEixbf.mjs +1 -1
  30. package/.output/server/_ssr/{adapters-BS8XosjF.mjs → adapters-CJUhP66K.mjs} +9 -3
  31. package/.output/server/_ssr/{artifactFiles-Cagtj7J0.mjs → artifactFiles-zP43a-_v.mjs} +3 -3
  32. package/.output/server/_ssr/{artifactView-DS4O22wl.mjs → artifactView-CYV1r48i.mjs} +3 -3
  33. package/.output/server/_ssr/artifacts-CwCDal_d.mjs +2 -0
  34. package/.output/server/_ssr/{auth-DY1DuYZd.mjs → auth-D2SlCxwE.mjs} +9 -9
  35. package/.output/server/_ssr/{boot-CMHTxQpJ.mjs → boot-BHTcCXzm.mjs} +1 -1
  36. package/.output/server/_ssr/{boot-BbtG0ImW.mjs → boot-aI3l2EYT.mjs} +494 -107
  37. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-CU1Spd6z.mjs → bun-sqlite-dialect-BW9W1_Ps-B-3PhI3u.mjs} +2 -2
  38. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-DfG7tB8s.mjs → d1-sqlite-dialect-BLC8LXE6-Dm_NrETM.mjs} +2 -2
  39. package/.output/server/_ssr/db-7gZ8_zkc.mjs +2 -0
  40. package/.output/server/_ssr/{dist-BIxFFVZg.mjs → dist-DW3TO9NM.mjs} +2 -2
  41. package/.output/server/_ssr/{factory-Blq0DYfT.mjs → factory-Voe90MEY.mjs} +2 -2
  42. package/.output/server/_ssr/{invite._token-NewFt27g.mjs → invite._token-CeD9PCvh.mjs} +6 -6
  43. package/.output/server/_ssr/{invite._token-BRCo9LGB.mjs → invite._token-D80GP0-u.mjs} +4 -4
  44. package/.output/server/_ssr/invite._token-DJxGLILJ.mjs +1 -1
  45. package/.output/server/_ssr/{kysely-adapter-D3XTe64J.mjs → kysely-adapter-DSLWmYjO.mjs} +1 -1
  46. package/.output/server/_ssr/{lifecycleUi-C9lg1r3r.mjs → lifecycleUi-BhRsBvJ7.mjs} +4 -4
  47. package/.output/server/_ssr/logger-Dbz2vUU-.mjs +2 -0
  48. package/.output/server/_ssr/{loopApi-Cxe8WyOB.mjs → loopApi-BfMnXaKT.mjs} +7 -7
  49. package/.output/server/_ssr/{loopApi-BtfkZQYK.mjs → loopApi-ByX_X17-.mjs} +31 -14
  50. package/.output/server/_ssr/{loops._loopId-DhnArGdL.mjs → loops._loopId-BODmoHPu.mjs} +236 -370
  51. package/.output/server/_ssr/{loops._loopId-7NQJPB9W.mjs → loops._loopId-u8Dr2J5f.mjs} +4 -4
  52. package/.output/server/_ssr/{loops._loopId_.runs._runId-Dip5Xk-q.mjs → loops._loopId_.runs._runId-DaKJdso2.mjs} +48 -6
  53. package/.output/server/_ssr/{loops._loopId_.runs._runId-Bvuo2nki.mjs → loops._loopId_.runs._runId-kGL-CMG6.mjs} +4 -4
  54. package/.output/server/_ssr/{machineFns-Dvr5ICUy.mjs → machineFns-MMSoHs7N.mjs} +3 -3
  55. package/.output/server/_ssr/{node-sqlite-dialect-DhyOpJTX.mjs → node-sqlite-dialect-Y22MTyEv.mjs} +2 -2
  56. package/.output/server/_ssr/{notifyFns-BcMRY5kP.mjs → notifyFns-Bmqhlrkc.mjs} +3 -3
  57. package/.output/server/_ssr/{notifyFns-Q458pZmE.mjs → notifyFns-CdrijMGW.mjs} +5 -5
  58. package/.output/server/_ssr/{router-J8KZ30xw.mjs → router-CdxedJtm.mjs} +30 -30
  59. package/.output/server/_ssr/routes-Bcs4T1ox.mjs +1 -1
  60. package/.output/server/_ssr/{routes-D4am3Zff.mjs → routes-Bhay1OjL.mjs} +6 -6
  61. package/.output/server/_ssr/{routes-BoGrcf-b.mjs → routes-ROFun1nJ.mjs} +5 -5
  62. package/.output/server/_ssr/{runDiff-CpEFqo7G.mjs → runDiff-DWwt7qXb.mjs} +2 -2
  63. package/.output/server/_ssr/ssr.mjs +49 -49
  64. package/.output/server/_ssr/store-D75hcTob.mjs +2 -0
  65. package/.output/server/_ssr/{t._teamId-DR-hQK7o.mjs → t._teamId-CGba9PRq.mjs} +5 -5
  66. package/.output/server/_ssr/{t._teamId-CeUhzgzT.mjs → t._teamId-DTKU7GOp.mjs} +6 -6
  67. package/.output/server/_ssr/t._teamId-Dy_McbRt.mjs +1 -1
  68. package/.output/server/_ssr/{teamFns-BIDnsg2A.mjs → teamFns-BMDqynoT.mjs} +3 -3
  69. package/.output/server/_ssr/{teamFns-DA4ovI5g.mjs → teamFns-D4I-0dEB.mjs} +2 -2
  70. package/.output/server/_ssr/tokens-BHjz7Lvx.mjs +2 -0
  71. package/.output/server/_ssr/ui-Dej2qjuS.mjs +1 -1
  72. package/.output/server/{_tanstack-start-manifest_v-CVS6c7re.mjs → _tanstack-start-manifest_v-BwejIUux.mjs} +21 -21
  73. package/.output/server/drizzle/0009_ordinary_electro.sql +1 -0
  74. package/.output/server/drizzle/0010_workable_rage.sql +14 -0
  75. package/.output/server/drizzle/meta/0009_snapshot.json +1793 -0
  76. package/.output/server/drizzle/meta/0010_snapshot.json +1891 -0
  77. package/.output/server/drizzle/meta/_journal.json +14 -0
  78. package/.output/server/index.mjs +102 -102
  79. package/drizzle/0009_ordinary_electro.sql +1 -0
  80. package/drizzle/0010_workable_rage.sql +14 -0
  81. package/drizzle/meta/0009_snapshot.json +1793 -0
  82. package/drizzle/meta/0010_snapshot.json +1891 -0
  83. package/drizzle/meta/_journal.json +14 -0
  84. package/package.json +1 -1
  85. package/scripts/pievo-server.mjs +5 -0
  86. package/scripts/server-cli-lib.mjs +2 -0
  87. package/.output/public/assets/Modal-D33gNSgx.js +0 -1
  88. package/.output/public/assets/app-DElSo_jy.css +0 -2
  89. package/.output/public/assets/index-DfpTWRSz.js +0 -12
  90. package/.output/public/assets/loops._loopId-B19Jw7jC.js +0 -5
  91. package/.output/public/assets/notifyFns-DCubjpRy.js +0 -1
  92. package/.output/server/_ssr/artifacts-DngKyW2u.mjs +0 -2
  93. package/.output/server/_ssr/db-DWAuZq1o.mjs +0 -2
  94. package/.output/server/_ssr/logger-Dw82jNjH.mjs +0 -2
  95. package/.output/server/_ssr/store-b3JcQ08F.mjs +0 -2
  96. package/.output/server/_ssr/tokens-ytd60FUt.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../_runtime.mjs";
2
- import { C as require_jsx_runtime, S as require_react, b as require_react_dom, x as require_with_selector } from "../@base-ui/react+[...].mjs";
2
+ import { g as require_jsx_runtime, h as require_react, m as require_with_selector, p as require_react_dom } from "../@base-ui/react+[...].mjs";
3
3
  import { n as parseHref } from "../tanstack__history.mjs";
4
4
  import { PassThrough, Readable } from "node:stream";
5
5
  import { ReadableStream as ReadableStream$1 } from "node:stream/web";
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, o as __toESM, t as __commonJSMin } from "../_runtime.mjs";
2
- import { S as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { h as require_react } from "./@base-ui/react+[...].mjs";
3
3
  import { t as require_lib$2 } from "./html-dom-parser+htmlparser2.mjs";
4
4
  import { n as dist_exports, r as init_dist } from "./domhandler.mjs";
5
5
  //#region ../../node_modules/.pnpm/react-property@2.0.2/node_modules/react-property/lib/possibleStandardNamesOptimized.js
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM, t as __commonJSMin } from "../_runtime.mjs";
2
- import { S as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { h as require_react } from "./@base-ui/react+[...].mjs";
3
3
  //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js
4
4
  /**
5
5
  * @license React
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM, r as __exportAll } from "../_runtime.mjs";
2
- import { S as require_react, b as require_react_dom, x as require_with_selector } from "./@base-ui/react+[...].mjs";
2
+ import { h as require_react, m as require_with_selector, p as require_react_dom } from "./@base-ui/react+[...].mjs";
3
3
  import { a as createSlice, c as current, i as createListenerMiddleware, l as combineReducers, n as configureStore, o as prepareAutoBatched, r as createAction, s as castDraft, t as autoBatchEnhancer, u as createSelector } from "./@reduxjs/toolkit+[...].mjs";
4
4
  import { t as clsx } from "./clsx.mjs";
5
5
  import { _ as bumpX, a as none_default$1, b as line_default, c as stepBefore, d as monotoneX, f as monotoneY, g as basis_default, h as basisClosed_default, i as stack_default, l as step_default, m as basisOpen_default, n as silhouette_default, o as none_default, p as linearClosed_default, r as expand_default, s as stepAfter, t as wiggle_default, u as natural_default, v as bumpY, x as linear_default, y as area_default } from "./d3-shape.mjs";
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { C as require_jsx_runtime, S as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { g as require_jsx_runtime, h as require_react } from "./@base-ui/react+[...].mjs";
3
3
  import { n as require_extends, t as require_objectWithoutPropertiesLoose } from "./babel__runtime.mjs";
4
4
  import { K as EditorView, _t as EditorState, ft as Annotation, it as keymap, ot as placeholder, xt as StateEffect } from "./@codemirror/autocomplete+[...].mjs";
5
5
  import { i as indentWithTab } from "./codemirror__commands.mjs";
@@ -1,4 +1,4 @@
1
- import { C as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
1
+ import { g as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
2
  import { K as EditorView, P as tags } from "../_libs/@codemirror/autocomplete+[...].mjs";
3
3
  import { t as ReactCodeMirror } from "../_libs/uiw__react-codemirror.mjs";
4
4
  import { t as createTheme } from "../_libs/uiw__codemirror-themes.mjs";
@@ -1,15 +1,15 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { C as require_jsx_runtime, S as require_react, c as TooltipProvider } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { g as require_jsx_runtime, h as require_react, t as TooltipProvider } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { A as selectCls, C as labelCls, E as rel, N as useHydrated, S as isCompleted, _ as fmt, b as inputCls, c as btnDanger, f as btnSm, h as dotLabel, l as btnPrimary, o as btn, p as cronText, r as Pill, t as ErrorBanner, u as btnPrimaryPill, w as lastRunOf, x as isClosed } from "./ui-Dej2qjuS.mjs";
4
4
  import { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
5
- import { _ as loadOlderRuns, h as listMyTeams, m as listJobs, n as claimStatus, u as getConfig, v as mintClaim } from "./loopApi-Cxe8WyOB.mjs";
5
+ import { _ as mintClaim, g as loadOlderRuns, l as getConfig, m as listMyTeams, n as claimStatus, p as listJobs } from "./loopApi-BfMnXaKT.mjs";
6
6
  import { n as ModalHead, r as ModalSection, t as Modal } from "./Modal-DpKZHLZK.mjs";
7
- import { i as PievoLogo, n as GitHubIcon, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-BXH8mhiX.mjs";
7
+ import { i as PievoLogo, n as GitHubIcon, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-BBn-xXpG.mjs";
8
8
  import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
9
- import { a as getTeamDetail, d as revokeTeamInvite, f as setTeamMemberRole, i as deleteTeam, l as removeTeamMember, n as createTeam, o as leaveTeam, r as createTeamInvite, s as listManagedTeams, t as addTeamMember, u as renameTeam } from "./teamFns-DA4ovI5g.mjs";
10
- import { r as deriveLoopLifecycle } from "./lifecycleUi-C9lg1r3r.mjs";
11
- import { a as listChannels, c as testChannel, i as deleteChannel, n as Timeline, o as listMachines, r as createChannel, s as mergeRuns, t as MachinesModal } from "./notifyFns-Q458pZmE.mjs";
12
- //#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-CC7htv28.js
9
+ import { a as getTeamDetail, d as revokeTeamInvite, f as setTeamMemberRole, i as deleteTeam, l as removeTeamMember, n as createTeam, o as leaveTeam, r as createTeamInvite, s as listManagedTeams, t as addTeamMember, u as renameTeam } from "./teamFns-D4I-0dEB.mjs";
10
+ import { r as deriveLoopLifecycle } from "./lifecycleUi-BhRsBvJ7.mjs";
11
+ import { a as listChannels, c as testChannel, i as deleteChannel, n as Timeline, o as listMachines, r as createChannel, s as mergeRuns, t as MachinesModal } from "./notifyFns-CdrijMGW.mjs";
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-CmDqjCiq.js
13
13
  var import_react = /* @__PURE__ */ __toESM(require_react());
14
14
  var import_jsx_runtime = require_jsx_runtime();
15
15
  function LoopCard({ job, onOpen, onPickRun }) {
@@ -21,6 +21,8 @@ function LoopCard({ job, onOpen, onPickRun }) {
21
21
  const hydrated = useHydrated();
22
22
  const [older, setOlder] = (0, import_react.useState)([]);
23
23
  const runs = (0, import_react.useMemo)(() => older.length ? mergeRuns(job.runs ?? [], older) : job.runs ?? [], [job.runs, older]);
24
+ const newestRun = runs.at(-1);
25
+ const latestIncidentRun = newestRun?.reportIncident ? newestRun : void 0;
24
26
  const loadMore = async () => {
25
27
  const oldest = runs[0];
26
28
  if (!oldest) return 0;
@@ -34,7 +36,7 @@ function LoopCard({ job, onOpen, onPickRun }) {
34
36
  };
35
37
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
36
38
  onClick: () => onOpen(job.id),
37
- className: `mb-[18px] cursor-pointer rounded-card border border-hairline bg-surface px-[26px] pb-5 pt-[22px] shadow-card transition-colors hover:border-wire ${en ? "" : "opacity-60"}`,
39
+ className: `mb-[18px] cursor-pointer rounded-card border border-hairline bg-surface px-[26px] pb-5 pt-[22px] shadow-card transition-colors hover:border-wire ${en || latestIncidentRun?.reportIncident || job.pauseCause?.kind === "failure-streak" ? "" : "opacity-60"}`,
38
40
  style: { animation: "fadeIn .25s cubic-bezier(0.25,0.1,0.25,1) both" },
39
41
  children: [
40
42
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
@@ -53,7 +55,7 @@ function LoopCard({ job, onOpen, onPickRun }) {
53
55
  tone: "running",
54
56
  dot: "pulse",
55
57
  children: "Stopping"
56
- }) : lifecycle === "paused-finishing" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: "Paused · current run finishing" }) : lifecycle === "deleting" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: "Deleting" }) : job.running ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
58
+ }) : lifecycle === "paused-finishing" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: job.pauseCause?.kind === "owner" ? "Paused by owner · current run finishing" : "Paused · current run finishing" }) : lifecycle === "deleting" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: "Deleting" }) : job.running ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
57
59
  tone: "running",
58
60
  dot: "pulse",
59
61
  children: "Running"
@@ -72,21 +74,33 @@ function LoopCard({ job, onOpen, onPickRun }) {
72
74
  title: job.goal ?? void 0,
73
75
  children: "Goal"
74
76
  }),
75
- !completed && lifecycle === "paused" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: "Paused" }),
77
+ !completed && lifecycle === "paused" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: job.pauseCause?.kind === "failure-streak" ? "Paused automatically" : job.pauseCause?.kind === "owner" ? "Paused by owner" : "Paused" }),
76
78
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
77
- className: "ml-auto whitespace-nowrap text-meta text-secondary",
78
- children: [
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
80
- className: "text-primary",
81
- title: job.cron,
82
- children: job.scheduleMode === "continuous" ? `continuous · ${job.continuousDelayMinutes}m` : cronText(job.cron)
83
- }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
85
- className: "mx-2.5 text-wire",
86
- children: "·"
87
- }),
88
- job.kind
89
- ]
79
+ className: "ml-auto min-w-0 text-right text-meta text-secondary",
80
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
81
+ className: "whitespace-nowrap",
82
+ children: [
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
84
+ className: "text-primary",
85
+ title: job.cron,
86
+ children: job.scheduleMode === "continuous" ? `continuous · ${job.continuousDelayMinutes}m` : cronText(job.cron)
87
+ }),
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
89
+ className: "mx-2.5 text-wire",
90
+ children: "·"
91
+ }),
92
+ job.kind
93
+ ]
94
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
95
+ className: "mt-1 truncate text-caption text-disabled",
96
+ title: `Model: ${job.model || "default"} · Reasoning: ${job.reasoningEffort || "default"}`,
97
+ children: [
98
+ "Model: ",
99
+ job.model || "default",
100
+ " · Reasoning: ",
101
+ job.reasoningEffort || "default"
102
+ ]
103
+ })]
90
104
  })
91
105
  ]
92
106
  }),
@@ -105,6 +119,10 @@ function LoopCard({ job, onOpen, onPickRun }) {
105
119
  hydrated && ` · ${rel(last.ts)}`
106
120
  ] })]
107
121
  }),
122
+ latestIncidentRun?.reportIncident && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
123
+ className: "mt-1.5 text-label text-secondary",
124
+ children: latestIncidentRun.outcome === "error" ? "Last run failed · Terminal report rejected" : "Last run telemetry warning · Terminal report rejected"
125
+ }),
108
126
  completed && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
109
127
  className: "mt-1.5 text-label text-success",
110
128
  children: [
@@ -2503,13 +2521,9 @@ async function fetchLiveData(teamId) {
2503
2521
  * team switch (a `/t/<id>` navigation) re-seeds state from the new loader data.
2504
2522
  */
2505
2523
  function DashboardView({ teamId, initial }) {
2506
- const [data, setData] = (0, import_react.useState)(() => ({
2507
- jobs: initial?.jobs ?? [],
2508
- templates: initial?.templates ?? [],
2509
- machines: initial?.machines ?? [],
2510
- teams: initial?.teams
2511
- }));
2512
- const { jobs, templates, machines, teams } = data;
2524
+ const [live, setLive] = (0, import_react.useState)(null);
2525
+ const { jobs, machines, teams } = live ?? initial;
2526
+ const templates = initial.templates;
2513
2527
  const online = machines.filter((m) => m.online).length;
2514
2528
  const navigate = useNavigate();
2515
2529
  const [compose, setCompose] = (0, import_react.useState)({
@@ -2521,11 +2535,7 @@ function DashboardView({ teamId, initial }) {
2521
2535
  const [teamsOpen, setTeamsOpen] = (0, import_react.useState)(false);
2522
2536
  const refetch = (0, import_react.useCallback)(async () => {
2523
2537
  try {
2524
- const live = await fetchLiveData(teamId);
2525
- setData((prev) => ({
2526
- ...prev,
2527
- ...live
2528
- }));
2538
+ setLive(await fetchLiveData(teamId));
2529
2539
  } catch {}
2530
2540
  }, [teamId]);
2531
2541
  const openRef = (0, import_react.useRef)(false);
@@ -1,7 +1,7 @@
1
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
- import { A as defu, H as getBaseURL, T as createFetch, Xt as toKebabCase, _ as capitalizeFirstLetter, dt as isSafeUrlScheme } from "./boot-BbtG0ImW.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/LoopPlaybook-BXH8mhiX.js
2
+ import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { A as defu, H as getBaseURL, T as createFetch, Zt as toKebabCase, _ as capitalizeFirstLetter, dt as isSafeUrlScheme } from "./boot-aI3l2EYT.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/LoopPlaybook-BBn-xXpG.js
5
5
  var import_react = /* @__PURE__ */ __toESM(require_react());
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
7
  var PROTO_POLLUTION_PATTERNS = {
@@ -1,15 +1,15 @@
1
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
- import { pt as isTaskPath } from "./boot-BbtG0ImW.mjs";
2
+ import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { pt as isTaskPath } from "./boot-aI3l2EYT.mjs";
4
4
  import { T as md, _ as fmt, j as tsShort, v as fnum } from "./ui-Dej2qjuS.mjs";
5
- import { c as getArtifacts } from "./loopApi-Cxe8WyOB.mjs";
5
+ import { s as getArtifacts } from "./loopApi-BfMnXaKT.mjs";
6
6
  import { t as artifactKind } from "./artifactKind-BW0isV8L.mjs";
7
7
  import { t as purify } from "../_libs/dompurify.mjs";
8
- import { i as isMarkdown, r as ViewerHead, t as ArtifactBody } from "./artifactView-DS4O22wl.mjs";
8
+ import { i as isMarkdown, r as ViewerHead, t as ArtifactBody } from "./artifactView-CYV1r48i.mjs";
9
9
  import { n as ModalHead, t as Modal } from "./Modal-DpKZHLZK.mjs";
10
10
  import { n as import_lib, t as esm_default } from "../_libs/html-react-parser+[...].mjs";
11
11
  import { a as Area, c as Tooltip, i as XAxis, l as ResponsiveContainer, n as LineChart, o as Line, r as YAxis, s as CartesianGrid, t as AreaChart } from "../_libs/recharts+victory-vendor.mjs";
12
- //#region node_modules/.nitro/vite/services/ssr/assets/LoopView-DCugEbHx.js
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/LoopView-DdyJYOCY.js
13
13
  var import_react = /* @__PURE__ */ __toESM(require_react());
14
14
  var import_jsx_runtime = require_jsx_runtime();
15
15
  /** Parse a `<loop-chart series="key:label:unit, ...">` attribute into StateField[]. */
@@ -1,4 +1,4 @@
1
- import { C as require_jsx_runtime, _ as DialogPopup, g as DialogPortal, h as DialogRoot, m as DialogTitle, v as DialogClose, y as DialogBackdrop } from "../_libs/@base-ui/react+[...].mjs";
1
+ import { c as DialogRoot, d as DialogClose, f as DialogBackdrop, g as require_jsx_runtime, l as DialogPortal, s as DialogTitle, u as DialogPopup } from "../_libs/@base-ui/react+[...].mjs";
2
2
  import { k as sectionHeadCls } from "./ui-Dej2qjuS.mjs";
3
3
  //#region node_modules/.nitro/vite/services/ssr/assets/Modal-DpKZHLZK.js
4
4
  var import_jsx_runtime = require_jsx_runtime();
@@ -1,8 +1,8 @@
1
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";
2
+ import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { l as btnPrimary } from "./ui-Dej2qjuS.mjs";
4
- import { i as PievoLogo, n as GitHubIcon, o as signIn, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-BXH8mhiX.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-dTndU6Hw.js
4
+ import { i as PievoLogo, n as GitHubIcon, o as signIn, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-BBn-xXpG.mjs";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-RJN_0GFZ.js
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react());
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  /**
@@ -1,5 +1,5 @@
1
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";
2
+ import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { c as btnDanger, l as btnPrimary, o as btn } from "./ui-Dej2qjuS.mjs";
4
4
  //#region node_modules/.nitro/vite/services/ssr/assets/actionUi-CZbEixbf.js
5
5
  var import_react = /* @__PURE__ */ __toESM(require_react());
@@ -1,5 +1,5 @@
1
- import { Ct as listRuns, S as countRuns, Z as getMachine, at as hasRunningRun, it as hasPendingRun, jt as machinePresence } from "./boot-BbtG0ImW.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/adapters-BS8XosjF.js
1
+ import { Ct as listRuns, S as countRuns, Z as getMachine, at as hasRunningRun, it as hasPendingRun, jt as machinePresence } from "./boot-aI3l2EYT.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/adapters-CJUhP66K.js
3
3
  /**
4
4
  * Map the new relational rows (Loop + Run) onto the shapes the UI already
5
5
  * renders (JobSummary / JobDetail / RunSummary / JobFull), so the dashboard
@@ -36,7 +36,8 @@ function toRunSummary(r) {
36
36
  error: r.error ?? null,
37
37
  state: r.state ?? null,
38
38
  control: r.control ?? null,
39
- sessionId: r.sessionId ?? null
39
+ sessionId: r.sessionId ?? null,
40
+ reportIncident: r.reportIncident ?? null
40
41
  };
41
42
  }
42
43
  /** One live artifact_files row (with its blob meta joined) → the compact UI shape
@@ -62,6 +63,8 @@ async function toJobSummary(loop) {
62
63
  scheduleMode: loop.scheduleMode,
63
64
  continuousDelayMinutes: loop.continuousDelayMinutes,
64
65
  kind: loop.workflow ? "workflow" : `exec:${loop.agent}`,
66
+ model: loop.model ?? null,
67
+ reasoningEffort: loop.reasoningEffort ?? null,
65
68
  hasUi: !!loop.ui,
66
69
  enabled: loop.enabled,
67
70
  notify: loop.notify,
@@ -74,6 +77,7 @@ async function toJobSummary(loop) {
74
77
  completedAt: loop.completedAt ?? null,
75
78
  completionReason: loop.completionReason ?? null,
76
79
  deleteRequestedAt: loop.deleteRequestedAt ?? null,
80
+ pauseCause: loop.pauseCause ?? null,
77
81
  runs,
78
82
  runCount: await countRuns(loop.id)
79
83
  };
@@ -90,6 +94,7 @@ function toJobFull(loop) {
90
94
  goal: loop.goal ?? null,
91
95
  completedAt: loop.completedAt ?? null,
92
96
  completionReason: loop.completionReason ?? null,
97
+ pauseCause: loop.pauseCause ?? null,
93
98
  taskFile: loop.taskFile ?? void 0,
94
99
  workflow: loop.workflow ?? void 0,
95
100
  stateSchema: loop.stateSchema ?? void 0,
@@ -100,6 +105,7 @@ function toJobFull(loop) {
100
105
  executor: loop.agent,
101
106
  workdir: loop.workdir ?? "",
102
107
  model: loop.model ?? void 0,
108
+ reasoningEffort: loop.reasoningEffort ?? void 0,
103
109
  allowControl: loop.allowControl
104
110
  },
105
111
  createdAt: loop.createdAt,
@@ -1,6 +1,6 @@
1
- import { B as getArtifactFile, V as getArtifactSync, Wt as safeRelPath, _t as listArtifactsWithMeta } from "./boot-BbtG0ImW.mjs";
2
- import { t as toArtifactSummary } from "./adapters-BS8XosjF.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-Cagtj7J0.js
1
+ import { B as getArtifactFile, Gt as safeRelPath, V as getArtifactSync, _t as listArtifactsWithMeta } from "./boot-aI3l2EYT.mjs";
2
+ import { t as toArtifactSummary } from "./adapters-CJUhP66K.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-zP43a-_v.js
4
4
  /**
5
5
  * Server-side reads over a loop's live-synced artifacts (Phase 2). Pure helpers
6
6
  * (no request/session context) so they're shared by the lazy server fns
@@ -1,10 +1,10 @@
1
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
- import { s as getArtifact } from "./loopApi-Cxe8WyOB.mjs";
2
+ import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { o as getArtifact } from "./loopApi-BfMnXaKT.mjs";
4
4
  import { t as artifactKind } from "./artifactKind-BW0isV8L.mjs";
5
5
  import { t as purify } from "../_libs/dompurify.mjs";
6
6
  import { t as g } from "../_libs/marked.mjs";
7
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactView-DS4O22wl.js
7
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactView-CYV1r48i.js
8
8
  var import_react = /* @__PURE__ */ __toESM(require_react());
9
9
  var import_jsx_runtime = require_jsx_runtime();
10
10
  /** Download URL for one artifact - the path is segment-encoded so a nested path
@@ -0,0 +1,2 @@
1
+ import { d as SYNC_BODY_CAP, i as BLOB_CAP } from "./boot-aI3l2EYT.mjs";
2
+ export { BLOB_CAP, SYNC_BODY_CAP };
@@ -1,6 +1,6 @@
1
1
  import { A as sql, C as or, S as notInArray, _ as isNull$1, b as lte, c as asc, d as eq, f as gt, g as isNotNull, h as inArray, l as desc, m as ilike, o as count, p as gte, u as and, v as like, x as ne, y as lt } from "../_libs/drizzle-orm+postgres.mjs";
2
- import { $ as getProtocol, A as defu, H as getBaseURL, I as ensureTeam, J as getHost, K as getEnvVar, L as env, Nt as normalizePathname, Ot as loginGateEnabled, Q as getOrigin, U as getBooleanEnvVar, Ut as resolveBaseURL, Yt as teamIdForUser, _ as capitalizeFirstLetter, a as BetterAuthError, f as ValidationError$1, gt as kAPIErrorHeaderSymbol, ht as isTest, k as db, l as ENV, lt as isProduction, m as betterFetch, mt as isTeamMember, n as APIError$1, o as BetterCallError, ot as isDevelopment, r as BASE_ERROR_CODES, st as isDynamicBaseURLConfig, t as APIError, tn as wildcardMatch, ut as isRequestLike, w as createDefu } from "./boot-BbtG0ImW.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-Blq0DYfT.mjs";
2
+ import { $ as getProtocol, A as defu, H as getBaseURL, I as ensureTeam, J as getHost, K as getEnvVar, L as env, Nt as normalizePathname, Ot as loginGateEnabled, Q as getOrigin, U as getBooleanEnvVar, Wt as resolveBaseURL, Xt as teamIdForUser, _ as capitalizeFirstLetter, a as BetterAuthError, f as ValidationError$1, gt as kAPIErrorHeaderSymbol, ht as isTest, k as db, l as ENV, lt as isProduction, m as betterFetch, mt as isTeamMember, n as APIError$1, nn as wildcardMatch, o as BetterCallError, ot as isDevelopment, r as BASE_ERROR_CODES, st as isDynamicBaseURLConfig, t as APIError, ut as isRequestLike, w as createDefu } from "./boot-aI3l2EYT.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-Voe90MEY.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-DY1DuYZd.js
1703
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-D2SlCxwE.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-CU1Spd6z.mjs");
15996
+ const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-B-3PhI3u.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-DhyOpJTX.mjs");
16012
+ const { NodeSqliteDialect } = await import("./node-sqlite-dialect-Y22MTyEv.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-DfG7tB8s.mjs");
16017
+ const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-Dm_NrETM.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-BIxFFVZg.mjs");
36529
+ const { memoryAdapter } = await import("./dist-DW3TO9NM.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-D3XTe64J.mjs");
36543
+ const { createKyselyAdapter } = await import("./kysely-adapter-DSLWmYjO.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-D3XTe64J.mjs");
36546
+ const { kyselyAdapter } = await import("./kysely-adapter-DSLWmYjO.mjs");
36547
36547
  return kyselyAdapter(kysely, {
36548
36548
  type: databaseType || "sqlite",
36549
36549
  debugLogs: opts.database && "debugLogs" in opts.database ? opts.database.debugLogs : false,
@@ -1,2 +1,2 @@
1
- import { G as getCliGateway, V as getArtifactSync, q as getGateway } from "./boot-BbtG0ImW.mjs";
1
+ import { G as getCliGateway, V as getArtifactSync, q as getGateway } from "./boot-aI3l2EYT.mjs";
2
2
  export { getArtifactSync, getCliGateway, getGateway };