@baochunli/flakes 0.0.5 → 0.0.6

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 (126) hide show
  1. package/dist/node_modules/@flakes/auth/package.json +1 -1
  2. package/dist/node_modules/@flakes/console/.output/nitro.json +1 -1
  3. package/dist/node_modules/@flakes/console/.output/public/assets/{DocumentationPage-CNPk8RVl.js → DocumentationPage-CGIcMKwf.js} +1 -1
  4. package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-ByTl4Kyy.js +1 -0
  5. package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-5MmbVpaE.js +3 -0
  6. package/dist/node_modules/@flakes/console/.output/public/assets/{RunsPage-CJbycrqM.js → RunsPage-fbDKP9kM.js} +1 -1
  7. package/dist/node_modules/@flakes/console/.output/public/assets/{SandboxesLens-BoLM52PY.js → SandboxesLens-DPG87mUE.js} +1 -1
  8. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-DIpzR_Ef.js +1 -0
  9. package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-mCgSqfv0.js +1 -0
  10. package/dist/node_modules/@flakes/console/.output/public/assets/_-CM2hE2sZ.js +1 -0
  11. package/dist/node_modules/@flakes/console/.output/public/assets/_runId-3ZZOAqUK.js +2 -0
  12. package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-cy4RxW8Y.js +2 -0
  13. package/dist/node_modules/@flakes/console/.output/public/assets/{account-BoRurhrq.js → account-BWoGGXJw.js} +1 -1
  14. package/dist/node_modules/@flakes/console/.output/public/assets/{account-forms-D4eVqOhW.js → account-forms-Dq70JDyg.js} +1 -1
  15. package/dist/node_modules/@flakes/console/.output/public/assets/{auth-layout-DBnq_eif.js → auth-layout-BFusNq3W.js} +1 -1
  16. package/dist/node_modules/@flakes/console/.output/public/assets/{bits-BOMPEHvv.js → bits-CTGNpp-v.js} +1 -1
  17. package/dist/node_modules/@flakes/console/.output/public/assets/device-BajR3eSF.js +1 -0
  18. package/dist/node_modules/@flakes/console/.output/public/assets/documentation-6ao_Ux6x.js +1 -0
  19. package/dist/node_modules/@flakes/console/.output/public/assets/{forgot-password-BSQ4TWpA.js → forgot-password-DOKn8_7P.js} +1 -1
  20. package/dist/node_modules/@flakes/console/.output/public/assets/main-DVO9gWzi.js +1215 -0
  21. package/dist/node_modules/@flakes/console/.output/public/assets/{otp-verification-CussJQT1.js → otp-verification-qolVtiom.js} +2 -2
  22. package/dist/node_modules/@flakes/console/.output/public/assets/projects-n5LSsNi3.js +2 -0
  23. package/dist/node_modules/@flakes/console/.output/public/assets/{reset-password-DwWhVkEh.js → reset-password-D-OlZeHQ.js} +1 -1
  24. package/dist/node_modules/@flakes/console/.output/public/assets/runs-BB9ogobQ.js +2 -0
  25. package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-BIimz5FI.js +2 -0
  26. package/dist/node_modules/@flakes/console/.output/public/assets/{security-MjM55vIw.js → security-DdQNcp6k.js} +1 -1
  27. package/dist/node_modules/@flakes/console/.output/public/assets/{signin-KbA1cD6o.js → signin-BoZiVxyq.js} +1 -1
  28. package/dist/node_modules/@flakes/console/.output/public/assets/{signin-form-CBF-d8iK.js → signin-form-tTBWDjhi.js} +1 -1
  29. package/dist/node_modules/@flakes/console/.output/public/assets/{signup-CbHsThKr.js → signup-CBSszmUC.js} +1 -1
  30. package/dist/node_modules/@flakes/console/.output/public/assets/styles-B8OXOvkO.css +2 -0
  31. package/dist/node_modules/@flakes/console/.output/server/{_-BULJ6utw.mjs → _-BGsKgsbF.mjs} +3 -3
  32. package/dist/node_modules/@flakes/console/.output/server/{_-_ST9QYWn.mjs → _-DtPMXzt0.mjs} +3 -3
  33. package/dist/node_modules/@flakes/console/.output/server/_chunks/ProjectsPage.mjs +1 -2
  34. package/dist/node_modules/@flakes/console/.output/server/_chunks/RunPage.mjs +1 -2
  35. package/dist/node_modules/@flakes/console/.output/server/_chunks/RunsPage.mjs +1 -2
  36. package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesLens.mjs +1 -1
  37. package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesPage.mjs +253 -18
  38. package/dist/node_modules/@flakes/console/.output/server/_chunks/TranscriptPage.mjs +1 -2
  39. package/dist/node_modules/@flakes/console/.output/server/_chunks/bits.mjs +1 -1
  40. package/dist/node_modules/@flakes/console/.output/server/_chunks/button.mjs +461 -3
  41. package/dist/node_modules/@flakes/console/.output/server/_chunks/card.mjs +1 -1
  42. package/dist/node_modules/@flakes/console/.output/server/_chunks/router.mjs +3 -4
  43. package/dist/node_modules/@flakes/console/.output/server/_chunks/table.mjs +1 -1
  44. package/dist/node_modules/@flakes/console/.output/server/{_runId-WZmbo654.mjs → _runId-P1u-vfcm.mjs} +2 -2
  45. package/dist/node_modules/@flakes/console/.output/server/{_runId-CmYWNL8A.mjs → _runId-vO4tlCOP.mjs} +3 -3
  46. package/dist/node_modules/@flakes/console/.output/server/_ssr/{App-CUx8Ftit.mjs → App-C-XaVKoO.mjs} +2 -2
  47. package/dist/node_modules/@flakes/console/.output/server/_ssr/{DocumentationPage-0I9oWWJT.mjs → DocumentationPage-BR2KosFz.mjs} +2 -2
  48. package/dist/node_modules/@flakes/console/.output/server/_ssr/{ProjectsPage-CGj9V2Of.mjs → ProjectsPage-BUrep1wl.mjs} +2 -2
  49. package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunPage-B2vhVaj6.mjs → RunPage-BHs-v0LU.mjs} +2 -2
  50. package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunsPage-BifKogQE.mjs → RunsPage-iTNYVwL0.mjs} +2 -2
  51. package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-C1Z6dVce.mjs +423 -0
  52. package/dist/node_modules/@flakes/console/.output/server/_ssr/{TranscriptPage-deSxVZaQ.mjs → TranscriptPage-BcomoTls.mjs} +2 -2
  53. package/dist/node_modules/@flakes/console/.output/server/_ssr/{account-D5y9vkAc.mjs → account-Cp0s_IQK.mjs} +2 -2
  54. package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-C91gfyy0.mjs → documentation-BnxmM-Yo.mjs} +2 -2
  55. package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-C69e9_eF.mjs → documentation-Cgyr3VKK.mjs} +3 -3
  56. package/dist/node_modules/@flakes/console/.output/server/_ssr/{hooks-DrgN35zn.mjs → hooks-CsVtQ1m-.mjs} +117 -51
  57. package/dist/node_modules/@flakes/console/.output/server/_ssr/{projects-lJ2tIIPj.mjs → projects-R9sxR_t4.mjs} +1 -1
  58. package/dist/node_modules/@flakes/console/.output/server/_ssr/{router-DHxFQ03L.mjs → router-CobdI6gO.mjs} +12 -12
  59. package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-dnPfp9dt.mjs → runs-D8MHe3QU.mjs} +2 -2
  60. package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-BWxEGKO_.mjs → runs-mTxbc_pm.mjs} +3 -3
  61. package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-v28LJQM3.mjs → sandboxes-B2z_9JyU.mjs} +2 -2
  62. package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-hxFINxDS.mjs → sandboxes-r0y6Ihg6.mjs} +3 -3
  63. package/dist/node_modules/@flakes/console/.output/server/_ssr/ssr.mjs +2 -2
  64. package/dist/node_modules/@flakes/console/.output/server/{_tanstack-start-manifest_v-DfwuEzTr.mjs → _tanstack-start-manifest_v-DpAwCFK9.mjs} +32 -33
  65. package/dist/node_modules/@flakes/console/.output/server/{_taskId-CBo95z-s.mjs → _taskId-Cz9xwj5L.mjs} +2 -2
  66. package/dist/node_modules/@flakes/console/.output/server/{_taskId-Sil3-PKh.mjs → _taskId-wQsG2CQj.mjs} +3 -3
  67. package/dist/node_modules/@flakes/console/package.json +1 -1
  68. package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts +1 -1
  69. package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts.map +1 -1
  70. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js +48 -3
  71. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js.map +1 -1
  72. package/dist/node_modules/@flakes/control-plane/package.json +1 -1
  73. package/dist/node_modules/@flakes/core/package.json +1 -1
  74. package/dist/node_modules/@flakes/harness-agent/package.json +1 -1
  75. package/dist/node_modules/@flakes/harness-sdk/package.json +1 -1
  76. package/dist/node_modules/@flakes/pi-agent/package.json +1 -1
  77. package/dist/node_modules/@flakes/protocol/package.json +1 -1
  78. package/dist/node_modules/@flakes/sandbox-runtime/package.json +1 -1
  79. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts +9 -1
  80. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts.map +1 -1
  81. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js +407 -6
  82. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js.map +1 -1
  83. package/dist/node_modules/@flakes/store/dist/mappers.d.ts.map +1 -1
  84. package/dist/node_modules/@flakes/store/dist/mappers.js +1 -0
  85. package/dist/node_modules/@flakes/store/dist/mappers.js.map +1 -1
  86. package/dist/node_modules/@flakes/store/dist/types.d.ts +30 -1
  87. package/dist/node_modules/@flakes/store/dist/types.d.ts.map +1 -1
  88. package/dist/node_modules/@flakes/store/package.json +1 -1
  89. package/package.json +1 -1
  90. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts +0 -10
  91. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts.map +0 -1
  92. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js +0 -16
  93. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js.map +0 -1
  94. package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-CKPR1nnu.js +0 -1
  95. package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BdugbnA3.js +0 -3
  96. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-6KHjMeaR.js +0 -1
  97. package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CHSq0_qN.js +0 -1
  98. package/dist/node_modules/@flakes/console/.output/public/assets/_-CD1Voz9h.js +0 -1
  99. package/dist/node_modules/@flakes/console/.output/public/assets/_runId-_0VPmGYe.js +0 -2
  100. package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CPAKAp4X.js +0 -2
  101. package/dist/node_modules/@flakes/console/.output/public/assets/device-FqII-S41.js +0 -1
  102. package/dist/node_modules/@flakes/console/.output/public/assets/dist-BEfdrJTS.js +0 -1
  103. package/dist/node_modules/@flakes/console/.output/public/assets/documentation-2C3ncAuV.js +0 -1
  104. package/dist/node_modules/@flakes/console/.output/public/assets/main-LpSDdT-S.js +0 -1215
  105. package/dist/node_modules/@flakes/console/.output/public/assets/projects-CLgKBrCe.js +0 -2
  106. package/dist/node_modules/@flakes/console/.output/public/assets/runs-CFYk2iRh.js +0 -2
  107. package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-mGsOcVFL.js +0 -2
  108. package/dist/node_modules/@flakes/console/.output/public/assets/styles-DtA2wbW8.css +0 -2
  109. package/dist/node_modules/@flakes/console/.output/server/_chunks/utils.mjs +0 -393
  110. package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-DGji_OdB.mjs +0 -187
  111. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts +0 -71
  112. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts.map +0 -1
  113. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js +0 -243
  114. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js.map +0 -1
  115. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts +0 -3
  116. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts.map +0 -1
  117. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js +0 -153
  118. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js.map +0 -1
  119. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts +0 -19
  120. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts.map +0 -1
  121. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js +0 -46
  122. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js.map +0 -1
  123. package/dist/node_modules/@flakes/store/dist/sqlite.d.ts +0 -4
  124. package/dist/node_modules/@flakes/store/dist/sqlite.d.ts.map +0 -1
  125. package/dist/node_modules/@flakes/store/dist/sqlite.js +0 -34
  126. package/dist/node_modules/@flakes/store/dist/sqlite.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
2
- import { t as cn } from "./utils.mjs";
2
+ import { n as cn } from "./button.mjs";
3
3
  //#region src/components/ui/table.tsx
4
4
  var import_jsx_runtime = require_jsx_runtime();
5
5
  function Table({ className, ...props }) {
@@ -1,6 +1,6 @@
1
1
  import { c as lazyRouteComponent, l as createFileRoute } from "./_libs/@tanstack/react-router+[...].mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/_runId-WZmbo654.js
3
- var $$splitComponentImporter = () => import("./_runId-CmYWNL8A.mjs");
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/_runId-P1u-vfcm.js
3
+ var $$splitComponentImporter = () => import("./_runId-vO4tlCOP.mjs");
4
4
  var Route = createFileRoute("/runs/$runId")({
5
5
  validateSearch: (search) => {
6
6
  const next = {};
@@ -2,10 +2,10 @@ import { o as __toESM } from "./_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "./_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { f as useNavigate, i as useLocation, s as Outlet } from "./_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "./_libs/@floating-ui/react-dom+[...].mjs";
5
- import { t as Route } from "./_runId-WZmbo654.mjs";
6
- //#region node_modules/.nitro/vite/services/ssr/assets/_runId-CmYWNL8A.js
5
+ import { t as Route } from "./_runId-P1u-vfcm.mjs";
6
+ //#region node_modules/.nitro/vite/services/ssr/assets/_runId-vO4tlCOP.js
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
- var RunPage = (0, (/* @__PURE__ */ __toESM(require_react())).lazy)(() => import("./_ssr/RunPage-B2vhVaj6.mjs").then((module) => ({ default: module.RunPage })));
8
+ var RunPage = (0, (/* @__PURE__ */ __toESM(require_react())).lazy)(() => import("./_ssr/RunPage-BHs-v0LU.mjs").then((module) => ({ default: module.RunPage })));
9
9
  function RunRouteComponent() {
10
10
  const { runId } = Route.useParams();
11
11
  const { tab, view } = Route.useSearch();
@@ -3,7 +3,7 @@ import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].m
3
3
  import { d as Link, f as useNavigate, i as useLocation } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
5
  import { o as useQueryClient, r as useIsFetching } from "../_libs/tanstack__react-query.mjs";
6
- import { g as useRuns, o as useDeleteRun, u as useProjects } from "./hooks-DrgN35zn.mjs";
6
+ import { l as useDeleteRun, p as useProjects, y as useRuns } from "./hooks-CsVtQ1m-.mjs";
7
7
  import { t as cn } from "./utils-C_uf36nf.mjs";
8
8
  import { a as Root2, i as Portal2, n as Item2, o as Separator2, r as Label2, s as Trigger, t as Content2 } from "../_libs/@radix-ui/react-dropdown-menu+[...].mjs";
9
9
  import { t as Button } from "./button-Btfpc86G.mjs";
@@ -11,7 +11,7 @@ import { i as splitProjectsByStatus, n as projectLabelForRun, t as groupRunsByPr
11
11
  import { M as Folder, N as FolderKanban, O as ListChecks, Q as Archive, Y as BookOpen, a as UserRound, d as Server, m as Search, s as Trash2, u as ShieldCheck, w as LogOut, y as PanelLeft } from "../_libs/lucide-react.mjs";
12
12
  import { a as buildRedirectTargetFromLocation, c as isProtectedConsolePath, l as sanitizeRedirectTarget, n as FlakesMark, r as ThemeToggle, s as isAuthRoutePath, t as ConsoleBrand } from "./auth-redirect-BI2bC7qX.mjs";
13
13
  import { t as authClient } from "./auth-validation-D9jyYJqc.mjs";
14
- //#region node_modules/.nitro/vite/services/ssr/assets/App-CUx8Ftit.js
14
+ //#region node_modules/.nitro/vite/services/ssr/assets/App-C-XaVKoO.js
15
15
  var import_jsx_runtime = require_jsx_runtime();
16
16
  var import_react = /* @__PURE__ */ __toESM(require_react());
17
17
  function DropdownMenu$1({ ...props }) {
@@ -6,8 +6,8 @@ import { t as cn } from "./utils-C_uf36nf.mjs";
6
6
  import { F as FileText, G as ChevronRight, I as ExternalLink, M as Folder, Y as BookOpen } from "../_libs/lucide-react.mjs";
7
7
  import { t as Markdown } from "../_libs/react-markdown+[...].mjs";
8
8
  import { t as remarkGfm } from "../_libs/remark-gfm.mjs";
9
- import { i as documentationPathFromHref, n as documentationNavItems, o as getDocumentationPageByPath, r as documentationPages } from "./documentation-C91gfyy0.mjs";
10
- //#region node_modules/.nitro/vite/services/ssr/assets/DocumentationPage-0I9oWWJT.js
9
+ import { i as documentationPathFromHref, n as documentationNavItems, o as getDocumentationPageByPath, r as documentationPages } from "./documentation-BnxmM-Yo.mjs";
10
+ //#region node_modules/.nitro/vite/services/ssr/assets/DocumentationPage-BR2KosFz.js
11
11
  var import_jsx_runtime = require_jsx_runtime();
12
12
  var import_react = /* @__PURE__ */ __toESM(require_react());
13
13
  function DocumentationPage(props) {
@@ -2,14 +2,14 @@ import { o as __toESM } from "../_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { d as Link } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
- import { a as poolChoicesForBinding, c as useHostProjectBindings, g as useRuns, i as hostProjectWorkspacePath, l as useHosts, n as bindingValidationView, s as useHostPools, u as useProjects, w as useUpsertHostProjectBinding, y as useSetHostProjectWorkspaceRoot } from "./hooks-DrgN35zn.mjs";
5
+ import { C as useSetHostProjectWorkspaceRoot, O as useUpsertHostProjectBinding, d as useHostProjectBindings, f as useHosts, i as hostProjectWorkspacePath, n as bindingValidationView, p as useProjects, s as poolChoicesForBinding, u as useHostPools, y as useRuns } from "./hooks-CsVtQ1m-.mjs";
6
6
  import { t as cn } from "./utils-C_uf36nf.mjs";
7
7
  import { t as Button } from "./button-Btfpc86G.mjs";
8
8
  import { i as splitProjectsByStatus, r as projectMatchesRun } from "./project-navigation-DI77TL9a.mjs";
9
9
  import { a as CardTitle, i as CardHeader, n as CardContent, t as Card } from "./card-SXNbNwk5.mjs";
10
10
  import { d as useClockTick, n as Skeleton, t as Badge, u as timeAgo } from "./bits-BIFjjEu8.mjs";
11
11
  import { A as Inbox, B as Clock3, D as LoaderCircle, H as CircleDashed, M as Folder, P as FolderCog, Q as Archive, U as CircleCheck, V as CircleX, W as CircleAlert, d as Server, j as HardDrive } from "../_libs/lucide-react.mjs";
12
- //#region node_modules/.nitro/vite/services/ssr/assets/ProjectsPage-CGj9V2Of.js
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/ProjectsPage-BUrep1wl.js
13
13
  var import_jsx_runtime = require_jsx_runtime();
14
14
  var import_react = /* @__PURE__ */ __toESM(require_react());
15
15
  function ProjectsPage() {
@@ -2,7 +2,7 @@ import { o as __toESM } from "../_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { f as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { l as require_react_dom, u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
- import { d as useRun, f as useRunArtifacts, h as useRunTasks, m as useRunMetrics, o as useDeleteRun, p as useRunFileReservations, r as downloadFile, u as useProjects } from "./hooks-DrgN35zn.mjs";
5
+ import { _ as useRunMetrics, g as useRunFileReservations, h as useRunArtifacts, l as useDeleteRun, m as useRun, p as useProjects, r as downloadFile, v as useRunTasks } from "./hooks-CsVtQ1m-.mjs";
6
6
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
7
7
  import { t as cn } from "./utils-C_uf36nf.mjs";
8
8
  import { i as Trigger, n as List, r as Root2, t as Content } from "../_libs/radix-ui__react-tabs.mjs";
@@ -13,7 +13,7 @@ import { a as fmtTime, c as taskOrdinals, d as useClockTick, f as useFlash, i as
13
13
  import { D as LoaderCircle, E as Lock, F as FileText, L as Expand, R as Download, S as Maximize2, n as ZoomIn, r as X, s as Trash2, t as ZoomOut, z as Clock } from "../_libs/lucide-react.mjs";
14
14
  import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-B8aDcgVq.mjs";
15
15
  import { t as SandboxesLens } from "./SandboxesLens-Bzc8NizP.mjs";
16
- //#region node_modules/.nitro/vite/services/ssr/assets/RunPage-B2vhVaj6.js
16
+ //#region node_modules/.nitro/vite/services/ssr/assets/RunPage-BHs-v0LU.js
17
17
  var import_jsx_runtime = require_jsx_runtime();
18
18
  var import_react = /* @__PURE__ */ __toESM(require_react());
19
19
  var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom());
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
4
- import { g as useRuns, u as useProjects } from "./hooks-DrgN35zn.mjs";
4
+ import { p as useProjects, y as useRuns } from "./hooks-CsVtQ1m-.mjs";
5
5
  import { t as cn } from "./utils-C_uf36nf.mjs";
6
6
  import { t as Button } from "./button-Btfpc86G.mjs";
7
7
  import { n as projectLabelForRun } from "./project-navigation-DI77TL9a.mjs";
@@ -9,7 +9,7 @@ import { a as CardTitle, i as CardHeader, n as CardContent, r as CardDescription
9
9
  import { d as useClockTick, f as useFlash, i as StatusBar, l as taskProgress, n as Skeleton, r as StateBadge, t as Badge, u as timeAgo } from "./bits-BIFjjEu8.mjs";
10
10
  import { A as Inbox, r as X } from "../_libs/lucide-react.mjs";
11
11
  import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-B8aDcgVq.mjs";
12
- //#region node_modules/.nitro/vite/services/ssr/assets/RunsPage-BifKogQE.js
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/RunsPage-iTNYVwL0.js
13
13
  var import_jsx_runtime = require_jsx_runtime();
14
14
  var import_react = /* @__PURE__ */ __toESM(require_react());
15
15
  var stateFilters = [
@@ -0,0 +1,423 @@
1
+ import { o as __toESM } from "../_runtime.mjs";
2
+ import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
3
+ import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
4
+ import { a as managedSandboxDeleteAction, b as useSandboxFleet, c as useDeleteManagedSandbox, o as managedSandboxDeleteErrorMessage, v as useRunTasks, y as useRuns } from "./hooks-CsVtQ1m-.mjs";
5
+ import { t as cn } from "./utils-C_uf36nf.mjs";
6
+ import { t as Button } from "./button-Btfpc86G.mjs";
7
+ import { n as CardContent, t as Card } from "./card-SXNbNwk5.mjs";
8
+ import { c as taskOrdinals, d as useClockTick, n as Skeleton, r as StateBadge, u as timeAgo } from "./bits-BIFjjEu8.mjs";
9
+ import { D as LoaderCircle, I as ExternalLink, J as Boxes, X as ArrowRight, r as X, s as Trash2 } from "../_libs/lucide-react.mjs";
10
+ import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-B8aDcgVq.mjs";
11
+ import { t as SandboxesLens } from "./SandboxesLens-Bzc8NizP.mjs";
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/SandboxesPage-C1Z6dVce.js
13
+ var import_jsx_runtime = require_jsx_runtime();
14
+ var import_react = /* @__PURE__ */ __toESM(require_react());
15
+ function SandboxesPage(props) {
16
+ const runs = useRuns();
17
+ useClockTick();
18
+ const loadedRuns = (runs.data?.pages ?? []).flatMap((page) => page.runs);
19
+ const selectedRun = loadedRuns.find((run) => run.runId === props.selectedRunId) ?? loadedRuns[0];
20
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
21
+ className: "grid gap-5",
22
+ children: [
23
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
24
+ className: "text-lg font-semibold tracking-tight",
25
+ children: "Sandboxes"
26
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
27
+ className: "text-sm text-muted-foreground",
28
+ children: "Managed fleet state and sandbox placement by run."
29
+ })] }),
30
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ManagedSandboxFleet, {}),
31
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunPlacementHistory, {
32
+ runs,
33
+ loadedRuns,
34
+ selectedRun,
35
+ onSelectRun: props.onSelectRun,
36
+ onOpenRun: props.onOpenRun,
37
+ onOpenTask: props.onOpenTask
38
+ })
39
+ ]
40
+ });
41
+ }
42
+ function ManagedSandboxFleet() {
43
+ const sandboxFleet = useSandboxFleet();
44
+ const deleteSandbox = useDeleteManagedSandbox();
45
+ const [confirmingSandboxId, setConfirmingSandboxId] = (0, import_react.useState)(null);
46
+ const [pendingSandboxId, setPendingSandboxId] = (0, import_react.useState)(null);
47
+ const [feedback, setFeedback] = (0, import_react.useState)(null);
48
+ async function confirmDelete(sandbox) {
49
+ setPendingSandboxId(sandbox.sandboxId);
50
+ setFeedback(null);
51
+ try {
52
+ const result = await deleteSandbox.mutateAsync(sandbox.sandboxId);
53
+ setConfirmingSandboxId(null);
54
+ setFeedback(deleteSuccessFeedback(result));
55
+ } catch (error) {
56
+ setFeedback({
57
+ tone: "error",
58
+ sandboxId: sandbox.sandboxId,
59
+ message: managedSandboxDeleteErrorMessage(error)
60
+ });
61
+ } finally {
62
+ setPendingSandboxId(null);
63
+ }
64
+ }
65
+ const rows = sandboxFleet.data?.sandboxes ?? [];
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
67
+ className: "py-0",
68
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
69
+ className: "grid gap-3 p-4",
70
+ children: [
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
72
+ className: "flex min-w-0 flex-wrap items-center justify-between gap-2",
73
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
74
+ className: "min-w-0",
75
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
76
+ className: "console-callout",
77
+ children: "Managed fleet"
78
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
79
+ className: "mt-1 text-xs text-muted-foreground",
80
+ "data-num": true,
81
+ children: sandboxFleet.isPending ? "Loading" : `${rows.length} sandboxes`
82
+ })]
83
+ })
84
+ }),
85
+ sandboxFleet.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
86
+ className: "text-sm text-destructive",
87
+ children: ["Cannot list managed sandboxes: ", String(sandboxFleet.error)]
88
+ }) : sandboxFleet.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
89
+ className: "grid gap-2",
90
+ children: [
91
+ 0,
92
+ 1,
93
+ 2
94
+ ].map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-10 w-full" }, row))
95
+ }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
96
+ className: "rounded-md border border-dashed py-8 text-center",
97
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Boxes, { className: "mx-auto size-5 text-muted-foreground" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
98
+ className: "mt-3 text-sm font-medium",
99
+ children: "No managed sandboxes"
100
+ })]
101
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Table, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Sandbox" }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Lifecycle" }),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Liveness" }),
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Host" }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Updated" }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
108
+ className: "text-right",
109
+ children: "Delete"
110
+ })
111
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableBody, { children: rows.map((sandbox) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ManagedSandboxRow, {
112
+ sandbox,
113
+ confirming: confirmingSandboxId === sandbox.sandboxId,
114
+ pending: pendingSandboxId === sandbox.sandboxId,
115
+ disabled: deleteSandbox.isPending,
116
+ onRequestDelete: () => {
117
+ setFeedback(null);
118
+ setConfirmingSandboxId(sandbox.sandboxId);
119
+ },
120
+ onCancelDelete: () => setConfirmingSandboxId(null),
121
+ onConfirmDelete: () => void confirmDelete(sandbox)
122
+ }, sandbox.sandboxId)) })] }),
123
+ feedback ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
124
+ role: feedback.tone === "error" ? "alert" : "status",
125
+ className: cn("text-xs", feedback.tone === "error" ? "text-destructive" : "text-muted-foreground"),
126
+ children: [feedback.sandboxId ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
127
+ className: "font-mono",
128
+ "data-num": true,
129
+ children: [
130
+ feedback.sandboxId,
131
+ ":",
132
+ " "
133
+ ]
134
+ }) : null, feedback.message]
135
+ }) : null
136
+ ]
137
+ })
138
+ });
139
+ }
140
+ function ManagedSandboxRow(props) {
141
+ const action = managedSandboxDeleteAction(props.sandbox, props.pending, props.confirming);
142
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableCell, {
144
+ className: "max-w-[16rem]",
145
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
146
+ className: "truncate font-mono text-xs text-foreground",
147
+ title: props.sandbox.sandboxId,
148
+ "data-num": true,
149
+ children: props.sandbox.sandboxId
150
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
151
+ className: "mt-1 truncate font-mono text-[11px] text-muted-foreground",
152
+ title: props.sandbox.instanceId,
153
+ "data-num": true,
154
+ children: props.sandbox.instanceId
155
+ })]
156
+ }),
157
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
158
+ state: props.sandbox.status,
159
+ id: props.sandbox.sandboxId
160
+ }) }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
162
+ state: props.sandbox.sandboxStatus ?? "unknown",
163
+ id: props.sandbox.sandboxId
164
+ }) }),
165
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableCell, {
166
+ className: "max-w-[13rem]",
167
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
168
+ className: "truncate font-mono text-xs",
169
+ title: props.sandbox.hostId,
170
+ "data-num": true,
171
+ children: props.sandbox.hostId
172
+ }), props.sandbox.hostPoolId ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
173
+ className: "mt-1 truncate font-mono text-[11px] text-muted-foreground",
174
+ title: props.sandbox.hostPoolId,
175
+ "data-num": true,
176
+ children: props.sandbox.hostPoolId
177
+ }) : null]
178
+ }),
179
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
180
+ className: "font-mono text-[11px] text-muted-foreground",
181
+ title: props.sandbox.updatedAt,
182
+ "data-num": true,
183
+ children: timeAgo(props.sandbox.updatedAt)
184
+ }),
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
186
+ className: "text-right",
187
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ManagedSandboxDeleteControls, {
188
+ action,
189
+ cleanupQueued: props.sandbox.status === "deleting",
190
+ disabled: props.disabled,
191
+ sandboxId: props.sandbox.sandboxId,
192
+ onRequestDelete: props.onRequestDelete,
193
+ onCancelDelete: props.onCancelDelete,
194
+ onConfirmDelete: props.onConfirmDelete
195
+ })
196
+ })
197
+ ] });
198
+ }
199
+ function ManagedSandboxDeleteControls(props) {
200
+ if (props.action === "pending") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
201
+ size: "xs",
202
+ variant: "outline",
203
+ disabled: true,
204
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "size-3 animate-spin" }), "Deleting"]
205
+ });
206
+ if (props.action === "confirm") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
207
+ className: "flex justify-end gap-1",
208
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
209
+ type: "button",
210
+ size: "xs",
211
+ variant: "destructive",
212
+ disabled: props.disabled,
213
+ onClick: props.onConfirmDelete,
214
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2, { className: "size-3" }), "Confirm delete"]
215
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
216
+ type: "button",
217
+ size: "icon-xs",
218
+ variant: "ghost",
219
+ "aria-label": `Cancel deleting ${props.sandboxId}`,
220
+ title: "Cancel",
221
+ disabled: props.disabled,
222
+ onClick: props.onCancelDelete,
223
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { className: "size-3" })
224
+ })]
225
+ });
226
+ if (props.action === "request") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
227
+ type: "button",
228
+ size: "icon-xs",
229
+ variant: "ghost",
230
+ "aria-label": `Delete stale managed sandbox ${props.sandboxId}`,
231
+ title: "Delete stale sandbox",
232
+ disabled: props.disabled,
233
+ onClick: props.onRequestDelete,
234
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2, { className: "size-3" })
235
+ });
236
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
237
+ className: "text-xs text-muted-foreground",
238
+ children: props.cleanupQueued ? "Cleanup queued" : "—"
239
+ });
240
+ }
241
+ function deleteSuccessFeedback(result) {
242
+ if (result.status === "cleanup_queued") return {
243
+ tone: "info",
244
+ sandboxId: result.sandboxId,
245
+ message: "Cleanup queued."
246
+ };
247
+ return {
248
+ tone: "info",
249
+ sandboxId: result.sandboxId,
250
+ message: "Deleted."
251
+ };
252
+ }
253
+ function RunPlacementHistory(props) {
254
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
255
+ className: "grid gap-3",
256
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
257
+ className: "console-callout",
258
+ children: "Run placement history"
259
+ }) }), props.runs.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
260
+ className: "text-sm text-destructive",
261
+ children: ["Cannot list runs: ", String(props.runs.error)]
262
+ }) : props.runs.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingLayout, {}) : props.loadedRuns.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
263
+ className: "grid min-w-0 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]",
264
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunChooser, {
265
+ runs: props.loadedRuns,
266
+ selectedRunId: props.selectedRun?.runId,
267
+ hasMore: props.runs.hasNextPage,
268
+ loadingMore: props.runs.isFetchingNextPage,
269
+ onLoadMore: () => void props.runs.fetchNextPage(),
270
+ onSelect: props.onSelectRun
271
+ }), props.selectedRun ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedRunSandboxes, {
272
+ run: props.selectedRun,
273
+ onOpenRun: props.onOpenRun,
274
+ onOpenTask: props.onOpenTask
275
+ }) : null]
276
+ })]
277
+ });
278
+ }
279
+ function LoadingLayout() {
280
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
281
+ className: "grid gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]",
282
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
283
+ className: "gap-2 p-3",
284
+ children: [
285
+ 0,
286
+ 1,
287
+ 2
288
+ ].map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-full" }, row))
289
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
290
+ className: "p-4",
291
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-5 w-40" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "mt-4 h-32 w-full" })]
292
+ })]
293
+ });
294
+ }
295
+ function EmptyState() {
296
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
297
+ className: "rounded-lg border border-dashed py-12 text-center",
298
+ children: [
299
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Boxes, { className: "mx-auto size-5 text-muted-foreground" }),
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
301
+ className: "mt-3 console-callout",
302
+ children: "No runs yet"
303
+ }),
304
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
305
+ className: "mt-2 text-sm text-muted-foreground",
306
+ children: "Sandbox placement appears after your account has task runs."
307
+ })
308
+ ]
309
+ });
310
+ }
311
+ function RunChooser(props) {
312
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
313
+ className: "gap-2 p-2",
314
+ children: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
316
+ className: "px-2 py-1",
317
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
318
+ className: "console-callout",
319
+ children: "Recent runs"
320
+ })
321
+ }),
322
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
323
+ className: "grid gap-1",
324
+ children: props.runs.map((run) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunChoice, {
325
+ run,
326
+ selected: run.runId === props.selectedRunId,
327
+ onSelect: props.onSelect
328
+ }, run.runId))
329
+ }),
330
+ props.hasMore ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
331
+ type: "button",
332
+ disabled: props.loadingMore,
333
+ onClick: props.onLoadMore,
334
+ className: "mt-1 rounded-md px-2 py-1.5 text-left font-mono text-[11px] uppercase tracking-[0.08em] text-muted-foreground transition-colors hover:bg-secondary/60 disabled:cursor-wait disabled:opacity-60",
335
+ children: props.loadingMore ? "Loading" : "Load more"
336
+ }) : null
337
+ ]
338
+ });
339
+ }
340
+ function RunChoice(props) {
341
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
342
+ type: "button",
343
+ "aria-pressed": props.selected,
344
+ onClick: () => props.onSelect(props.run.runId),
345
+ className: cn("grid min-w-0 gap-1 rounded-md px-2 py-2 text-left transition-colors", props.selected ? "bg-secondary text-foreground" : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground"),
346
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
347
+ className: "flex min-w-0 items-center gap-2",
348
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
349
+ className: "min-w-0 flex-1 truncate text-sm font-medium",
350
+ children: props.run.name
351
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
352
+ state: props.run.state,
353
+ id: props.run.runId
354
+ })]
355
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
356
+ className: "flex min-w-0 items-center gap-2 font-mono text-[11px]",
357
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
358
+ className: "truncate",
359
+ title: props.run.runId,
360
+ children: props.run.runId
361
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
362
+ className: "shrink-0",
363
+ title: props.run.updatedAt,
364
+ "data-num": true,
365
+ children: timeAgo(props.run.updatedAt)
366
+ })]
367
+ })]
368
+ });
369
+ }
370
+ function SelectedRunSandboxes(props) {
371
+ const tasks = useRunTasks(props.run.runId);
372
+ const taskList = tasks.data?.tasks ?? [];
373
+ const ordinals = taskOrdinals(taskList);
374
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
375
+ className: "grid min-w-0 gap-3",
376
+ children: [
377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
378
+ className: "py-0",
379
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
380
+ className: "flex min-w-0 flex-wrap items-center gap-3 p-4",
381
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
382
+ className: "min-w-0 flex-1",
383
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
384
+ className: "flex min-w-0 items-center gap-2",
385
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
386
+ className: "min-w-0 truncate text-base font-semibold",
387
+ children: props.run.name
388
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
389
+ state: props.run.state,
390
+ id: props.run.runId
391
+ })]
392
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
393
+ className: "mt-1 truncate font-mono text-xs text-muted-foreground",
394
+ children: props.run.runId
395
+ })]
396
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
397
+ type: "button",
398
+ onClick: () => props.onOpenRun(props.run.runId),
399
+ className: "flex items-center gap-1.5 rounded-md border px-2.5 py-1 font-mono text-[11px] uppercase tracking-[0.08em] text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",
400
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { className: "size-3.5" }), "Open run"]
401
+ })]
402
+ })
403
+ }),
404
+ tasks.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
405
+ className: "text-sm text-destructive",
406
+ children: ["Cannot load tasks: ", String(tasks.error)]
407
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SandboxesLens, {
408
+ tasks: taskList,
409
+ ordinals,
410
+ pending: tasks.isPending,
411
+ onSelect: (taskId) => props.onOpenTask(props.run.runId, taskId)
412
+ }),
413
+ !tasks.isPending && taskList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
414
+ type: "button",
415
+ onClick: () => props.onOpenRun(props.run.runId),
416
+ className: "inline-flex w-fit items-center gap-1.5 rounded-md px-2 py-1 font-mono text-[11px] uppercase tracking-[0.08em] text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",
417
+ children: ["Open run by sandbox", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowRight, { className: "size-3.5" })]
418
+ }) : null
419
+ ]
420
+ });
421
+ }
422
+ //#endregion
423
+ export { SandboxesPage };
@@ -2,14 +2,14 @@ import { o as __toESM } from "../_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { d as Link } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
- import { C as useTaskWorkpad, S as useTaskPiSessionRaw, _ as useSaveTaskWorkpad, b as useTaskActivity, h as useRunTasks, t as ApiError, v as useSendTaskMessage, x as useTaskPiSession } from "./hooks-DrgN35zn.mjs";
5
+ import { D as useTaskWorkpad, E as useTaskPiSessionRaw, S as useSendTaskMessage, T as useTaskPiSession, t as ApiError, v as useRunTasks, w as useTaskActivity, x as useSaveTaskWorkpad } from "./hooks-CsVtQ1m-.mjs";
6
6
  import { t as cn } from "./utils-C_uf36nf.mjs";
7
7
  import { t as Button } from "./button-Btfpc86G.mjs";
8
8
  import { a as fmtTime, c as taskOrdinals, d as useClockTick, n as Skeleton, r as StateBadge, s as taskDisplayName, t as Badge } from "./bits-BIFjjEu8.mjs";
9
9
  import { G as ChevronRight, K as ChevronLeft, Z as ArrowDown, g as Route, h as Save, p as SendHorizontal, r as X, v as Pencil, x as MessageSquarePlus } from "../_libs/lucide-react.mjs";
10
10
  import { t as Markdown } from "../_libs/react-markdown+[...].mjs";
11
11
  import { t as remarkGfm } from "../_libs/remark-gfm.mjs";
12
- //#region node_modules/.nitro/vite/services/ssr/assets/TranscriptPage-deSxVZaQ.js
12
+ //#region node_modules/.nitro/vite/services/ssr/assets/TranscriptPage-BcomoTls.js
13
13
  var import_jsx_runtime = require_jsx_runtime();
14
14
  var import_react = /* @__PURE__ */ __toESM(require_react());
15
15
  /** Renders normalized Pi transcript items from the registered Pi session file. */
@@ -3,9 +3,9 @@ import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].m
3
3
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
4
4
  import { a as CardTitle, i as CardHeader, n as CardContent, r as CardDescription, t as Card } from "./card-SXNbNwk5.mjs";
5
5
  import { n as formatAuthError, t as authClient } from "./auth-validation-D9jyYJqc.mjs";
6
- import { n as useConsoleSession } from "./App-CUx8Ftit.mjs";
6
+ import { n as useConsoleSession } from "./App-C-XaVKoO.mjs";
7
7
  import { t as AccountProfileForm } from "./account-forms-CsothyLo.mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/account-D5y9vkAc.js
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/account-Cp0s_IQK.js
9
9
  var import_jsx_runtime = require_jsx_runtime();
10
10
  var import_react = /* @__PURE__ */ __toESM(require_react());
11
11
  function AccountRoute() {