@kky42/pievo-server 2.4.1 → 2.4.2

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 (77) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/MachinesModal-CSbnrUER.js +1 -0
  3. package/.output/public/assets/{SignIn-BdkKWOSs.js → SignIn-0Tjqs-Ma.js} +1 -1
  4. package/.output/public/assets/{actionUi-BYBeYy7U.js → actionUi-DpwGIGpw.js} +1 -1
  5. package/.output/public/assets/app-CaZpuwOS.css +2 -0
  6. package/.output/public/assets/index-CaS_SmDq.js +10 -0
  7. package/.output/public/assets/invite._token-Btg_0aLp.js +1 -0
  8. package/.output/public/assets/{invite._token-ZnVQqqq4.js → invite._token-KMD2JAgE.js} +1 -1
  9. package/.output/public/assets/loops._loopId-D5usF3DO.js +67 -0
  10. package/.output/public/assets/{loops._loopId_.runs._runId-CA0-q1y5.js → loops._loopId_.runs._runId-DRCgXaCq.js} +2 -2
  11. package/.output/public/assets/{preload-helper-CUIO87nJ.js → preload-helper-DsxECZIS.js} +3 -3
  12. package/.output/public/assets/routes-CtFgwdgW.js +1 -0
  13. package/.output/public/assets/routes-LDbnnQ3f.js +1 -0
  14. package/.output/public/assets/t._teamId-D41xcbsF.js +1 -0
  15. package/.output/public/assets/t._teamId-DUena1pV.js +1 -0
  16. package/.output/public/assets/{ui-DGOT8AoZ.js → ui-Do4gqMyP.js} +1 -1
  17. package/.output/server/_ssr/{DashboardView-D_hKsCsv.mjs → DashboardView-C2LdV6J0.mjs} +61 -245
  18. package/.output/server/_ssr/{MachinesModal-DZ_9ErAU.mjs → MachinesModal-BjkcVjjx.mjs} +6 -8
  19. package/.output/server/_ssr/{SignIn-DjSrg0nO.mjs → SignIn-DEGrvJvb.mjs} +3 -3
  20. package/.output/server/_ssr/{SocialLinks-BTjsnVOm.mjs → SocialLinks-Cm4H8pUJ.mjs} +5 -12
  21. package/.output/server/_ssr/{actionUi-D15R8L7R.mjs → actionUi-DJBWuNwr.mjs} +2 -2
  22. package/.output/server/_ssr/{artifactFiles-CV3OXxRD.mjs → artifactFiles-DtpRidFZ.mjs} +3 -3
  23. package/.output/server/_ssr/{artifactKind-ByzVa7fg.mjs → artifactKind-FBYbgSuf.mjs} +3 -3
  24. package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
  25. package/.output/server/_ssr/{auth-CPCDf6Wr.mjs → auth-C0zoZCGe.mjs} +9 -9
  26. package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
  27. package/.output/server/_ssr/{boot-BbWxaF-z.mjs → boot-sNlIkoLe.mjs} +66 -129
  28. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-8MIh9jN1.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
  29. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CcMQ01_d.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
  30. package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
  31. package/.output/server/_ssr/{dist-AxCsRawm.mjs → dist-B3SxDOpW.mjs} +2 -2
  32. package/.output/server/_ssr/{factory-S7MaMVC2.mjs → factory-Dv3Zopis.mjs} +2 -2
  33. package/.output/server/_ssr/{invite._token-B1UgMbNQ.mjs → invite._token-CJ6-H-s3.mjs} +4 -12
  34. package/.output/server/_ssr/{invite._token-D296YVGd.mjs → invite._token-dLKDJKVs.mjs} +8 -16
  35. package/.output/server/_ssr/{invite._token-BliJIGk4.mjs → invite._token-l1SjouDz.mjs} +6 -14
  36. package/.output/server/_ssr/{kysely-adapter-DUdpqcCJ.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
  37. package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
  38. package/.output/server/_ssr/{loopApi-Dy8ztANM.mjs → loopApi-BKyFB4KM.mjs} +12 -59
  39. package/.output/server/_ssr/{loopProjection-BZ1_IYCr.mjs → loopProjection-B8a829ij.mjs} +2 -2
  40. package/.output/server/_ssr/{loops._loopId-CKsAnxMl.mjs → loops._loopId-DS16Phmq.mjs} +31 -15
  41. package/.output/server/_ssr/{loops._loopId_.runs._runId-DG405pQs.mjs → loops._loopId_.runs._runId-BEJI6iK5.mjs} +6 -6
  42. package/.output/server/_ssr/{loops._loopId_.runs._runId-a_SyY8rX.mjs → loops._loopId_.runs._runId-CduETLqH.mjs} +3 -3
  43. package/.output/server/_ssr/{machineFns-BSaE7K88.mjs → machineFns-ByMsgG12.mjs} +3 -3
  44. package/.output/server/_ssr/{node-sqlite-dialect-rWwVyt2J.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
  45. package/.output/server/_ssr/{router-lMkobh5r.mjs → router-CXyrnvx-.mjs} +65 -118
  46. package/.output/server/_ssr/{routes-CRHc9cLG.mjs → routes-BulNEUEE.mjs} +5 -5
  47. package/.output/server/_ssr/{routes-DNCZrs8z.mjs → routes-DD94baie.mjs} +2 -2
  48. package/.output/server/_ssr/{routes-ufPbrGHs.mjs → routes-Wjexi35W.mjs} +5 -5
  49. package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
  50. package/.output/server/_ssr/ssr.mjs +39 -47
  51. package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
  52. package/.output/server/_ssr/{t._teamId-QD2nN0wn.mjs → t._teamId-1CreIlPV.mjs} +5 -5
  53. package/.output/server/_ssr/{t._teamId-DcWOYjPf.mjs → t._teamId-Bd6-zZsy.mjs} +2 -2
  54. package/.output/server/_ssr/{t._teamId-BoBoYEHL.mjs → t._teamId-COuMKQ4r.mjs} +5 -5
  55. package/.output/server/_ssr/{teamFns-BsmconJ1.mjs → teamFns-H438WnZC.mjs} +12 -30
  56. package/.output/server/_ssr/{teamFns-DcoVuWyH.mjs → teamFns-j2JKjorZ.mjs} +2 -2
  57. package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
  58. package/.output/server/_ssr/{ui-DmFKW2H_.mjs → ui-D5KWstlb.mjs} +3 -4
  59. package/.output/server/{_tanstack-start-manifest_v-Xd5bMpJe.mjs → _tanstack-start-manifest_v-3H7yBKLz.mjs} +24 -26
  60. package/.output/server/index.mjs +81 -81
  61. package/package.json +1 -2
  62. package/.output/public/assets/MachinesModal-CEddj7la.js +0 -1
  63. package/.output/public/assets/app-BAgHQVvr.css +0 -2
  64. package/.output/public/assets/index-BZLqD3JI.js +0 -12
  65. package/.output/public/assets/invite._token-BCLgmTO7.js +0 -1
  66. package/.output/public/assets/loops._loopId-X8PSlgdB.js +0 -67
  67. package/.output/public/assets/routes-BjKcDy6D.js +0 -1
  68. package/.output/public/assets/routes-bfMcArTT.js +0 -1
  69. package/.output/public/assets/t._teamId-B75J8h0x.js +0 -1
  70. package/.output/public/assets/t._teamId-D7WVPMDr.js +0 -1
  71. package/.output/server/_ssr/artifacts-BhQvaGjF.mjs +0 -2
  72. package/.output/server/_ssr/boot-COHf8Gv3.mjs +0 -2
  73. package/.output/server/_ssr/db-dw61xIt1.mjs +0 -2
  74. package/.output/server/_ssr/logger-DdUWuMdh.mjs +0 -2
  75. package/.output/server/_ssr/runDiff-CrZzjokj.mjs +0 -2
  76. package/.output/server/_ssr/store-CirPHuib.mjs +0 -2
  77. package/.output/server/_ssr/tokens-XngoyCU8.mjs +0 -2
@@ -1,9 +1,9 @@
1
- import { A as ensureServer, Bt as startLoop$1, Gt as tryDeleteLoop, Ht as stopLoop$1, J as getTeam, Kt as updateLoop, N as forceDeleteLoop$1, Nt as requestDeleteLoop, Pt as requestRunCancel, Tt as pauseLoop$1, U as getLoop, W as getMachine, Xt as validateLoopEdit, Y as getTeamMember, Z as hasRunningRun, gt as listTeamsForUser, lt as listLoops$1, mt as listRunsBefore, q as getRun, xt as machinePresence } from "./boot-BbWxaF-z.mjs";
2
- import { i as toRunSummaries, n as toLoopDetail, r as toLoopSummary } from "./loopProjection-BZ1_IYCr.mjs";
3
- import { canAccessLoop, requestScope } from "./auth-CPCDf6Wr.mjs";
1
+ import { $t as validateLoopEdit, Et as pauseLoop$1, Ft as requestRunCancel, G as getMachine, J as getRun, Kt as tryDeleteLoop, P as forceDeleteLoop, Pt as requestDeleteLoop, Q as hasRunningRun, St as machinePresence, Ut as stopLoop$1, Vt as startLoop$1, W as getLoop, X as getTeamMember, Y as getTeam, _t as listTeamsForUser, ht as listRunsBefore, j as ensureServer, qt as updateLoop, ut as listLoops$1 } from "./boot-sNlIkoLe.mjs";
2
+ import { i as toRunSummaries, n as toLoopDetail, r as toLoopSummary } from "./loopProjection-B8a829ij.mjs";
3
+ import { canAccessLoop, requestScope } from "./auth-C0zoZCGe.mjs";
4
4
  import { n as createServerFn } from "./ssr.mjs";
5
5
  import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
6
- //#region node_modules/.nitro/vite/services/ssr/assets/loopApi-Dy8ztANM.js
6
+ //#region node_modules/.nitro/vite/services/ssr/assets/loopApi-BKyFB4KM.js
7
7
  /**
8
8
  * Server functions backing the dashboard. They run server-side (createServerFn
9
9
  * → RPC) and call the IN-PROCESS scheduler + store directly — the scheduler
@@ -40,7 +40,7 @@ var getAuthState_createServerFn_handler = createServerRpc({
40
40
  filename: "src/server/loopApi.ts"
41
41
  }, (opts) => getAuthState.__executeServer(opts));
42
42
  var getAuthState = createServerFn({ method: "GET" }).handler(getAuthState_createServerFn_handler, async () => {
43
- const { authEnabled } = await import("./auth-CPCDf6Wr.mjs");
43
+ const { authEnabled } = await import("./auth-C0zoZCGe.mjs");
44
44
  return { enabled: authEnabled };
45
45
  });
46
46
  var getConfig_createServerFn_handler = createServerRpc({
@@ -150,7 +150,7 @@ var getArtifacts_createServerFn_handler = createServerRpc({
150
150
  var getArtifacts = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifacts_createServerFn_handler, async ({ data }) => {
151
151
  await backend();
152
152
  if (!await ownedLoop(data.loopId)) return [];
153
- const { listLoopArtifacts } = await import("./artifactFiles-CV3OXxRD.mjs");
153
+ const { listLoopArtifacts } = await import("./artifactFiles-DtpRidFZ.mjs");
154
154
  return listLoopArtifacts(data.loopId);
155
155
  });
156
156
  var getArtifact_createServerFn_handler = createServerRpc({
@@ -161,7 +161,7 @@ var getArtifact_createServerFn_handler = createServerRpc({
161
161
  var getArtifact = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifact_createServerFn_handler, async ({ data }) => {
162
162
  await backend();
163
163
  if (!await ownedLoop(data.loopId)) return { error: "file not found" };
164
- const { readLoopArtifact } = await import("./artifactFiles-CV3OXxRD.mjs");
164
+ const { readLoopArtifact } = await import("./artifactFiles-DtpRidFZ.mjs");
165
165
  return readLoopArtifact(data.loopId, data.path);
166
166
  });
167
167
  var getRunDiff_createServerFn_handler = createServerRpc({
@@ -180,7 +180,7 @@ var getRunDiff = createServerFn({ method: "GET" }).validator((d) => d).handler(g
180
180
  hasSnapshot: false,
181
181
  files: []
182
182
  };
183
- const { computeRunDiff } = await import("./runDiff-CrZzjokj.mjs");
183
+ const { computeRunDiff } = await import("./runDiff-Ba8Lg1vg.mjs");
184
184
  return computeRunDiff(data.runId);
185
185
  });
186
186
  var patchLoop_createServerFn_handler = createServerRpc({
@@ -267,8 +267,8 @@ var deleteLoop = createServerFn({ method: "POST" }).validator((id) => id).handle
267
267
  scheduler.removeLoop(id);
268
268
  if (!await requestDeleteLoop(id)) return { error: "not found" };
269
269
  if (unreachable && mayRetireAuthority) {
270
- if (!await forceDeleteLoop$1(id)) return { error: "delete failed; server data was not deleted" };
271
- const { logger } = await import("./logger-DdUWuMdh.mjs");
270
+ if (!await forceDeleteLoop(id)) return { error: "delete failed; server data was not deleted" };
271
+ const { logger } = await import("./logger-B8m8F1Qu.mjs");
272
272
  logger.child({ mod: "loop-lifecycle" }).warn({
273
273
  action: "unreachable-delete",
274
274
  loopId: id,
@@ -287,39 +287,6 @@ var deleteLoop = createServerFn({ method: "POST" }).validator((id) => id).handle
287
287
  waiting: !deleted
288
288
  };
289
289
  });
290
- var FORCE_DELETE_CONFIRMATION = "delete-server-data-anyway";
291
- /** Destructive uncertainty escape hatch. Team owners only; the explicit marker
292
- * is the server-side half of the Dashboard's second confirmation. */
293
- var forceDeleteLoop_createServerFn_handler = createServerRpc({
294
- id: "199e1c98d1946048b76a18a86c6d252d87776e70fefa62e4af66089244acb9de",
295
- name: "forceDeleteLoop",
296
- filename: "src/server/loopApi.ts"
297
- }, (opts) => forceDeleteLoop.__executeServer(opts));
298
- var forceDeleteLoop = createServerFn({ method: "POST" }).validator((d) => d).handler(forceDeleteLoop_createServerFn_handler, async ({ data }) => {
299
- const { scheduler } = await backend();
300
- const owned = await ownedLoop(data.id);
301
- if (!owned) return { error: "not found" };
302
- if (!owned.loop.deleteRequestedAt) return { error: "delete must be requested first" };
303
- if (data.confirmation !== FORCE_DELETE_CONFIRMATION) return { error: "force delete confirmation required" };
304
- if (owned.enforce) {
305
- if (!owned.loop.teamId) return { error: "only a team owner can force delete this loop" };
306
- const actor = (await requestScope()).userId;
307
- if (!actor || (await getTeamMember(owned.loop.teamId, actor))?.role !== "owner") return { error: "only a team owner can force delete this loop" };
308
- }
309
- scheduler.removeLoop(data.id);
310
- if (!await forceDeleteLoop$1(data.id)) return { error: "force delete failed; server data was not deleted" };
311
- const { logger } = await import("./logger-DdUWuMdh.mjs");
312
- logger.child({ mod: "loop-lifecycle" }).warn({
313
- action: "force-delete",
314
- loopId: data.id,
315
- actorUserId: (await requestScope()).userId,
316
- machineId: owned.loop.machineId
317
- }, "force-delete: destructive server authority removal");
318
- return {
319
- ok: true,
320
- deleted: true
321
- };
322
- });
323
290
  var runLoop_createServerFn_handler = createServerRpc({
324
291
  id: "08565e35f6a3dd06ef25401de0343976c47f7ae319d3baed6320b56dd3718311",
325
292
  name: "runLoop",
@@ -361,7 +328,7 @@ var mintClaim_createServerFn_handler = createServerRpc({
361
328
  }, (opts) => mintClaim.__executeServer(opts));
362
329
  var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(mintClaim_createServerFn_handler, async ({ data: teamId }) => {
363
330
  await backend();
364
- const { mintDeviceToken, rememberConnectKey } = await import("./tokens-XngoyCU8.mjs");
331
+ const { mintDeviceToken, rememberConnectKey } = await import("./tokens-DgG_Syq3.mjs");
365
332
  const { userId, teamId: active } = await requestScope(teamId);
366
333
  const owner = userId ?? "shared";
367
334
  const token = mintDeviceToken();
@@ -371,19 +338,5 @@ var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId)
371
338
  });
372
339
  return { token };
373
340
  });
374
- var claimStatus_createServerFn_handler = createServerRpc({
375
- id: "4b0db7d6c8f25383a3526598cb0c1881db6cf413e451e9478687c05666461347",
376
- name: "claimStatus",
377
- filename: "src/server/loopApi.ts"
378
- }, (opts) => claimStatus.__executeServer(opts));
379
- var claimStatus = createServerFn({ method: "GET" }).validator((token) => token).handler(claimStatus_createServerFn_handler, async ({ data: token }) => {
380
- const r = (await backend()).gateway.claimStatus(token);
381
- return r ? {
382
- done: true,
383
- id: r.loopId,
384
- name: r.name,
385
- agent: r.agent
386
- } : { done: false };
387
- });
388
341
  //#endregion
389
- export { canViewTeam_createServerFn_handler, claimStatus_createServerFn_handler, deleteLoop_createServerFn_handler, forceDeleteLoop_createServerFn_handler, getArtifact_createServerFn_handler, getArtifacts_createServerFn_handler, getAuthState_createServerFn_handler, getConfig_createServerFn_handler, getDefaultTeam_createServerFn_handler, getLoopDetail_createServerFn_handler, getRunDiff_createServerFn_handler, listLoops_createServerFn_handler, listMyTeams_createServerFn_handler, loadOlderRuns_createServerFn_handler, mintClaim_createServerFn_handler, patchLoop_createServerFn_handler, pauseLoop_createServerFn_handler, runLoop_createServerFn_handler, startLoop_createServerFn_handler, stopLoop_createServerFn_handler, stopRun_createServerFn_handler };
342
+ export { canViewTeam_createServerFn_handler, deleteLoop_createServerFn_handler, getArtifact_createServerFn_handler, getArtifacts_createServerFn_handler, getAuthState_createServerFn_handler, getConfig_createServerFn_handler, getDefaultTeam_createServerFn_handler, getLoopDetail_createServerFn_handler, getRunDiff_createServerFn_handler, listLoops_createServerFn_handler, listMyTeams_createServerFn_handler, loadOlderRuns_createServerFn_handler, mintClaim_createServerFn_handler, patchLoop_createServerFn_handler, pauseLoop_createServerFn_handler, runLoop_createServerFn_handler, startLoop_createServerFn_handler, stopLoop_createServerFn_handler, stopRun_createServerFn_handler };
@@ -1,5 +1,5 @@
1
- import { Lt as scheduleFromLoop, Ot as reconciliationStatesForRuns, Vt as statusDefinitionsFromLoop, W as getMachine, X as hasPendingRun, Z as hasRunningRun, pt as listRuns, u as MIN_DAEMON_VERSION, v as countRuns, w as daemonNeedsUpdate, xt as machinePresence } from "./boot-BbWxaF-z.mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/loopProjection-BZ1_IYCr.js
1
+ import { G as getMachine, Ht as statusDefinitionsFromLoop, Q as hasRunningRun, Rt as scheduleFromLoop, St as machinePresence, T as daemonNeedsUpdate, Z as hasPendingRun, kt as reconciliationStatesForRuns, mt as listRuns, u as MIN_DAEMON_VERSION, y as countRuns } from "./boot-sNlIkoLe.mjs";
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/loopProjection-B8a829ij.js
3
3
  /** Canonical client projections for persisted loops and runs. */
4
4
  var SUMMARY_RUNS = 18;
5
5
  function nextRun(loop) {
@@ -1,29 +1,27 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { s as CODING_AGENTS } from "./boot-BbWxaF-z.mjs";
2
+ import { s as CODING_AGENTS } from "./boot-sNlIkoLe.mjs";
3
3
  import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
- import { D as tsShort, E as selectCls, O as until, S as rel, T as sectionHeadCls, a as btn, b as labelCls, f as dotColor, g as fmt, h as dur, l as btnQuiet, n as Loading, o as btnDanger, p as dotLabel, r as Pill, s as btnPrimary, t as ErrorBanner, v as humanBytes, w as runPulseStyle, y as inputCls } from "./ui-DmFKW2H_.mjs";
5
- import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-D15R8L7R.mjs";
4
+ import { C as runPulseStyle, D as until, E as tsShort, T as selectCls, _ as humanBytes, a as btn, c as btnQuiet, d as dotColor, f as dotLabel, h as fmt, m as dur, n as Loading, o as btnDanger, r as Pill, s as btnPrimary, t as ErrorBanner, v as inputCls, w as sectionHeadCls, x as rel, y as labelCls } from "./ui-D5KWstlb.mjs";
5
+ import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-DJBWuNwr.mjs";
6
6
  import { d as useNavigate, u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
7
- import { D as useSession, S as runLoop, T as stopLoop, b as patchLoop, c as deleteLoop, l as getArtifact, m as getLoopDetail, u as getArtifacts, v as loadOlderRuns, w as startLoop, x as pauseLoop } from "./SocialLinks-BTjsnVOm.mjs";
7
+ import { C as startLoop, E as useSession, _ as loadOlderRuns, b as pauseLoop, c as getArtifact, l as getArtifacts, p as getLoopDetail, s as deleteLoop, w as stopLoop, x as runLoop, y as patchLoop } from "./SocialLinks-Cm4H8pUJ.mjs";
8
8
  import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
9
- import { t as SignIn } from "./SignIn-DjSrg0nO.mjs";
9
+ import { t as SignIn } from "./SignIn-DEGrvJvb.mjs";
10
10
  import { i as lifecycleDisplay, n as daemonStopSupport, r as deriveLoopLifecycle, t as DAEMON_UPGRADE_REQUIRED } from "./lifecycleUi-Dad3hvhm.mjs";
11
- import { a as Timeline, s as mergeRuns, t as MachinesModal } from "./MachinesModal-DZ_9ErAU.mjs";
12
- import { n as artifactKind, t as Route } from "./artifactKind-ByzVa7fg.mjs";
11
+ import { a as Timeline, c as mergeRuns, t as MachinesModal } from "./MachinesModal-BjkcVjjx.mjs";
12
+ import { n as artifactKind, t as Route } from "./artifactKind-FBYbgSuf.mjs";
13
13
  import { t as purify } from "../_libs/dompurify.mjs";
14
14
  import { t as g } from "../_libs/marked.mjs";
15
- //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-CKsAnxMl.js
15
+ //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-DS16Phmq.js
16
16
  var import_react = /* @__PURE__ */ __toESM(require_react());
17
17
  var import_jsx_runtime = require_jsx_runtime();
18
- /** Download URL for one artifact - the path is segment-encoded so a nested path
19
- * (`data/raw.json`) round-trips and can't be mistaken for extra route segments. */
18
+ /** Download URL for one artifact. Each path segment is encoded independently so
19
+ * nested artifact paths continue to match the catch-all route. */
20
20
  function downloadHref(loopId, path) {
21
- const enc = path.split("/").map(encodeURIComponent).join("/");
22
- return `/api/artifact/${encodeURIComponent(loopId)}/${enc}`;
21
+ const encodedPath = path.split("/").map(encodeURIComponent).join("/");
22
+ return `/api/artifact/${encodeURIComponent(loopId)}/${encodedPath}`;
23
23
  }
24
- /** Inline render URL for an image artifact - the same bytes as `downloadHref`
25
- * but served with the real image content-type + `inline` disposition (see the
26
- * route). Used as an <img> src; never for a document the browser navigates to. */
24
+ /** Hardened inline image URL for the same artifact bytes. */
27
25
  function inlineHref(loopId, path) {
28
26
  return `${downloadHref(loopId, path)}?view=inline`;
29
27
  }
@@ -90,6 +88,24 @@ function MarkdownView({ content }) {
90
88
  dangerouslySetInnerHTML: { __html: (0, import_react.useMemo)(() => renderMarkdown(content), [content]) }
91
89
  });
92
90
  }
91
+ /**
92
+ * Shared pieces of the artifact content viewer. The Files panel uses this one
93
+ * dispatch so binary/oversize copy and type-appropriate rendering cannot drift.
94
+ *
95
+ * Display types (see `lib/artifactKind`):
96
+ * - HTML → a STRICT sandboxed iframe (`sandbox="allow-scripts"`, deliberately
97
+ * NO `allow-same-origin`): user-machine-synced markup renders richly
98
+ * but in an opaque origin, so its scripts can't read the app's
99
+ * cookies/session or reach `parent` - stored-XSS is contained by
100
+ * design. A Preview/Source toggle exposes the raw markup too.
101
+ * - image → an <img> pointed at the hardened inline route (`inlineHref`); the
102
+ * bytes are NEVER inlined into the app DOM (SVG is scriptable, so it
103
+ * rides as an image, which does not execute embedded scripts).
104
+ * - markdown → the shared markdown pipeline (Preview) with a raw Source toggle.
105
+ * - text → monospace source.
106
+ * Everything keeps a Download fallback; an oversize (metadata-only) artifact has
107
+ * no synced bytes to render, so it says so rather than showing an empty pane.
108
+ */
93
109
  /** A small monospace caption strip above a file's content (path · meta [· action]). */
94
110
  function ViewerHead({ path, meta, action }) {
95
111
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
@@ -1,12 +1,12 @@
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 { T as sectionHeadCls, _ as fnum, a as btn, g as fmt, h as dur, i as StatusPill, n as Loading, o as btnDanger, r as Pill, v as humanBytes, w as runPulseStyle } from "./ui-DmFKW2H_.mjs";
4
- import { r as LoadErrorCard } from "./actionUi-D15R8L7R.mjs";
3
+ import { C as runPulseStyle, _ as humanBytes, a as btn, g as fnum, h as fmt, i as StatusPill, m as dur, n as Loading, o as btnDanger, r as Pill, w as sectionHeadCls } from "./ui-D5KWstlb.mjs";
4
+ import { r as LoadErrorCard } from "./actionUi-DJBWuNwr.mjs";
5
5
  import { u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
6
- import { D as useSession, E as stopRun, h as getRunDiff, m as getLoopDetail, v as loadOlderRuns } from "./SocialLinks-BTjsnVOm.mjs";
7
- import { t as SignIn } from "./SignIn-DjSrg0nO.mjs";
8
- import { t as Route } from "./loops._loopId_.runs._runId-a_SyY8rX.mjs";
9
- //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-DG405pQs.js
6
+ import { E as useSession, T as stopRun, _ as loadOlderRuns, m as getRunDiff, p as getLoopDetail } from "./SocialLinks-Cm4H8pUJ.mjs";
7
+ import { t as SignIn } from "./SignIn-DEGrvJvb.mjs";
8
+ import { t as Route } from "./loops._loopId_.runs._runId-CduETLqH.mjs";
9
+ //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-BEJI6iK5.js
10
10
  var import_react = /* @__PURE__ */ __toESM(require_react());
11
11
  var import_jsx_runtime = require_jsx_runtime();
12
12
  /**
@@ -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/loops._loopId_.runs._runId-a_SyY8rX.js
4
- var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-DG405pQs.mjs");
2
+ import { i as authClient, u as getAuthState } from "./SocialLinks-Cm4H8pUJ.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-CduETLqH.js
4
+ var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-BEJI6iK5.mjs");
5
5
  /**
6
6
  * Run detail PAGE — `/loops/$loopId/runs/$runId`. A standalone page (the trailing
7
7
  * `_` on the `$loopId` segment opts it out of the loop page's component so the run
@@ -1,8 +1,8 @@
1
- import { A as ensureServer, At as rememberConnectKey, O as deleteMachine$1, S as createMachine$1, St as mintDeviceToken, W as getMachine, bt as machineIdFromToken, dt as listMachinesForTeam, qt as updateMachine, u as MIN_DAEMON_VERSION, ut as listMachines$1, w as daemonNeedsUpdate, yt as loopsForMachine, zt as sha256 } from "./boot-BbWxaF-z.mjs";
2
- import { requestScope } from "./auth-CPCDf6Wr.mjs";
1
+ import { Bt as sha256, C as createMachine$1, Ct as mintDeviceToken, G as getMachine, Jt as updateMachine, T as daemonNeedsUpdate, bt as loopsForMachine, dt as listMachines$1, ft as listMachinesForTeam, j as ensureServer, jt as rememberConnectKey, k as deleteMachine$1, u as MIN_DAEMON_VERSION, xt as machineIdFromToken } from "./boot-sNlIkoLe.mjs";
2
+ import { requestScope } from "./auth-C0zoZCGe.mjs";
3
3
  import { n as createServerFn } from "./ssr.mjs";
4
4
  import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
5
- //#region node_modules/.nitro/vite/services/ssr/assets/machineFns-BSaE7K88.js
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/machineFns-ByMsgG12.js
6
6
  /**
7
7
  * Whether a machine is visible/actionable in the request scope. Mirrors
8
8
  * listMachines: open mode sees everything; otherwise the requester must own the
@@ -1,6 +1,6 @@
1
- import { n as DefaultQueryCompiler, o as CompiledQuery, s as sql$1 } from "./auth-CPCDf6Wr.mjs";
1
+ import { n as DefaultQueryCompiler, o as CompiledQuery, s as sql$1 } from "./auth-C0zoZCGe.mjs";
2
2
  import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/node-sqlite-dialect-rWwVyt2J.js
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/node-sqlite-dialect-CjNineno.js
4
4
  var NodeSqliteAdapter = class {
5
5
  get supportsCreateIfNotExists() {
6
6
  return true;