@baochunli/flakes 0.0.4 → 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.
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +76 -2
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/projects.d.ts +4 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +133 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +5 -1
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/runtime.d.ts +0 -1
- package/dist/commands/runtime.d.ts.map +1 -1
- package/dist/commands/runtime.js +2 -280
- package/dist/commands/runtime.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +0 -6
- package/dist/commands/server.js.map +1 -1
- package/dist/config-example.js +1 -1
- package/dist/config-example.js.map +1 -1
- package/dist/host-config.d.ts +1 -6
- package/dist/host-config.d.ts.map +1 -1
- package/dist/host-config.js +10 -28
- package/dist/host-config.js.map +1 -1
- package/dist/host-runner.d.ts +3 -0
- package/dist/host-runner.d.ts.map +1 -1
- package/dist/host-runner.js +18 -6
- package/dist/host-runner.js.map +1 -1
- package/dist/host-runtime.d.ts.map +1 -1
- package/dist/host-runtime.js +92 -2
- package/dist/host-runtime.js.map +1 -1
- package/dist/host-transport.js +2 -5
- package/dist/host-transport.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -28
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@flakes/auth/package.json +1 -1
- package/dist/node_modules/@flakes/console/.output/nitro.json +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-CGIcMKwf.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-ByTl4Kyy.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-5MmbVpaE.js +3 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-fbDKP9kM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-DPG87mUE.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-DIpzR_Ef.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-mCgSqfv0.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_-CM2hE2sZ.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-3ZZOAqUK.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-cy4RxW8Y.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/account-BWoGGXJw.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-Dq70JDyg.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-QzVbRzF_.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-BFusNq3W.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/bits-CTGNpp-v.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/card-37qs8AAd.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-alert-CM0SVfzc.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-CzwcEElH.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-x-C_sOQVNQ.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/device-BajR3eSF.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-6ao_Ux6x.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{external-link-BW8lpiMR.js → external-link-BWhbbPgy.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{file-text-DMdy8OfN.js → file-text-DLxLJ7P1.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password-DOKn8_7P.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/inbox-BVu38EN6.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{lib-DtfURcG3.js → lib-COfgMmRR.js} +3 -3
- package/dist/node_modules/@flakes/console/.output/public/assets/link-ll3nLBSM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{lock-D4OhqEPW.js → lock-Ck2SfQA2.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-DVO9gWzi.js +1215 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-puEkI9BI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-qolVtiom.js +20 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/projects-n5LSsNi3.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/react-B8IZ02wI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-ki7NpxV4.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/redirect-Cu9zBy04.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-D-OlZeHQ.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-BB9ogobQ.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-BIimz5FI.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{save-1uf5fQff.js → save-Bte_1tnN.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/security-DdQNcp6k.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-BoZiVxyq.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-tTBWDjhi.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/signup-CBSszmUC.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-B8OXOvkO.css +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/table-WMIs2m3R.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/tiny-invariant-CO5X59di.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/user-Bt9z7sSI.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/utils-CBxvVKOM.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/x-Bdsfqbi3.js +1 -0
- package/dist/node_modules/@flakes/console/.output/server/{_-DwPiGKLE.mjs → _-BGsKgsbF.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/{_-C-u135Pp.mjs → _-DtPMXzt0.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/ProjectsPage.mjs +588 -0
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunPage.mjs +13 -7
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunsPage.mjs +43 -13
- package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesLens.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesPage.mjs +253 -18
- package/dist/node_modules/@flakes/console/.output/server/_chunks/TranscriptPage.mjs +2 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/bits.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/button.mjs +461 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/card.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/project-navigation.mjs +79 -0
- package/dist/node_modules/@flakes/console/.output/server/_chunks/router.mjs +193 -111
- package/dist/node_modules/@flakes/console/.output/server/_chunks/table.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_libs/lucide-react.mjs +178 -1
- package/dist/node_modules/@flakes/console/.output/server/{_runId-Cag5UaYU.mjs → _runId-P1u-vfcm.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_runId-CJ5_8uS8.mjs → _runId-vO4tlCOP.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{App-CwFtUgAz.mjs → App-C-XaVKoO.mjs} +118 -64
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{DocumentationPage-CtBAQbzy.mjs → DocumentationPage-BR2KosFz.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/ProjectsPage-BUrep1wl.mjs +590 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunPage-CatpnkFy.mjs → RunPage-BHs-v0LU.mjs} +14 -7
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunsPage-BmLTih8Z.mjs → RunsPage-iTNYVwL0.mjs} +44 -13
- package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-C1Z6dVce.mjs +423 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{TranscriptPage-DaSIDCKk.mjs → TranscriptPage-BcomoTls.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{account-DzluYS58.mjs → account-Cp0s_IQK.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/account-forms-CsothyLo.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/device-CRZl7dGv.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-BnxmM-Yo.mjs +210 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-PC93pMWl.mjs → documentation-Cgyr3VKK.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{hooks-COIYuQzf.mjs → hooks-CsVtQ1m-.mjs} +178 -6
- package/dist/node_modules/@flakes/console/.output/server/_ssr/project-navigation-DI77TL9a.mjs +79 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/projects-R9sxR_t4.mjs +5 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/reset-password-SmmTixcr.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{router-elhBqT5k.mjs → router-CobdI6gO.mjs} +49 -41
- package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-D8MHe3QU.mjs +19 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-CBkO-RO8.mjs → runs-mTxbc_pm.mjs} +17 -5
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-qSX_pfUJ.mjs → sandboxes-B2z_9JyU.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-BIAgn8pu2.mjs → sandboxes-r0y6Ihg6.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/signin-form-CQDi-0A5.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/ssr.mjs +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_tanstack-start-manifest_v-CR_hZXXv.mjs → _tanstack-start-manifest_v-DpAwCFK9.mjs} +53 -46
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-BaezvY0w.mjs → _taskId-Cz9xwj5L.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-Da7kHKj9.mjs → _taskId-wQsG2CQj.mjs} +3 -3
- package/dist/node_modules/@flakes/console/package.json +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts +17 -0
- package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/client-access.js +12 -0
- package/dist/node_modules/@flakes/control-plane/dist/client-access.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts +24 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js +87 -3
- package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.js +150 -40
- package/dist/node_modules/@flakes/control-plane/dist/host-stream.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js +219 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts +3 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js +226 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js.map +1 -0
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js +93 -6
- package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js +48 -3
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js +2 -2
- package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.js +53 -21
- package/dist/node_modules/@flakes/control-plane/dist/scheduler.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/server.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/server.js +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/server.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/types.d.ts +2 -0
- package/dist/node_modules/@flakes/control-plane/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/package.json +1 -1
- package/dist/node_modules/@flakes/core/dist/config.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/config.js +6 -2
- package/dist/node_modules/@flakes/core/dist/config.js.map +1 -1
- package/dist/node_modules/@flakes/core/dist/ids.d.ts +4 -0
- package/dist/node_modules/@flakes/core/dist/ids.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/ids.js +2 -0
- package/dist/node_modules/@flakes/core/dist/ids.js.map +1 -1
- package/dist/node_modules/@flakes/core/dist/runtime.d.ts +1 -1
- package/dist/node_modules/@flakes/core/dist/schemas.d.ts +11 -0
- package/dist/node_modules/@flakes/core/dist/schemas.d.ts.map +1 -1
- package/dist/node_modules/@flakes/core/dist/schemas.js +10 -0
- package/dist/node_modules/@flakes/core/dist/schemas.js.map +1 -1
- package/dist/node_modules/@flakes/core/package.json +1 -1
- package/dist/node_modules/@flakes/harness-agent/package.json +1 -1
- package/dist/node_modules/@flakes/harness-sdk/package.json +1 -1
- package/dist/node_modules/@flakes/pi-agent/package.json +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.d.ts +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.js +1 -1
- package/dist/node_modules/@flakes/protocol/dist/index.js.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.d.ts +317 -0
- package/dist/node_modules/@flakes/protocol/dist/v1.d.ts.map +1 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.js +50 -1
- package/dist/node_modules/@flakes/protocol/dist/v1.js.map +1 -1
- package/dist/node_modules/@flakes/protocol/package.json +1 -1
- package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js +3 -6
- package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js.map +1 -1
- package/dist/node_modules/@flakes/sandbox-runtime/package.json +1 -1
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js +10 -0
- package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts +2 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js +1 -0
- package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts +2 -2
- package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/kysely-store.js +2 -2
- package/dist/node_modules/@flakes/store/dist/kysely-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts +14 -2
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js +567 -9
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.d.ts +10 -2
- package/dist/node_modules/@flakes/store/dist/mappers.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.js +46 -0
- package/dist/node_modules/@flakes/store/dist/mappers.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/projects-store.d.ts +42 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.d.ts.map +1 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.js +376 -0
- package/dist/node_modules/@flakes/store/dist/projects-store.js.map +1 -0
- package/dist/node_modules/@flakes/store/dist/runs-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/runs-store.js +7 -2
- package/dist/node_modules/@flakes/store/dist/runs-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/schema.js +72 -0
- package/dist/node_modules/@flakes/store/dist/schema.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/store-base.d.ts +14 -12
- package/dist/node_modules/@flakes/store/dist/store-base.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tables.d.ts +41 -1
- package/dist/node_modules/@flakes/store/dist/tables.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tasks-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/tasks-store.js +9 -2
- package/dist/node_modules/@flakes/store/dist/tasks-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/types.d.ts +189 -2
- package/dist/node_modules/@flakes/store/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/package.json +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-DM-ZYPgQ.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-i03UqHYF.js +0 -3
- package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-u8qbeAoV.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-BUQQWmH6.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-D8D_5kXP.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-ChoFjiPI.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_-C4ecJpHe.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-BZXYFY32.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-C28oHEU_.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/account-B4wDEC7t.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-BLo66Mqa.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-BMW8fJP5.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-DiUSgtaY.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/bits-Cv0Te4iz.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/card-DSG3_teC.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-B0gtb8OH.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/device-NrLWypMd.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/dist-BtPw3IIV.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-NRDmcDud.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password--3Mujc8s.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/link-BsixJinJ.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-KBvz0mSQ.js +0 -1055
- package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-tJ0VTv5m.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-BSXwS5bo.js +0 -20
- package/dist/node_modules/@flakes/console/.output/public/assets/react-DtOYBmep.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-DrIU40PY.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/redirect-BEm0VK76.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-C7SbNx2J.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-xD4ynllK.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-Cfr1Y2Dn.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/security-CCThSJae.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-CYeR3TaY.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-Bp22jPob.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/signup-DHhPfohX.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-8wEqfToJ.css +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/table-DptQuuuq.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/user-DK27uFod.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/utils-CEE0-YEp.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/x-fKvnmCoQ.js +0 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/utils.mjs +0 -285
- package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-Dlq0Ga24.mjs +0 -187
- package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-Bf0VPrnt.mjs +0 -210
- package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-BzfGldVd.mjs +0 -12
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
import { t as createServerFn } from "../_libs/@tanstack/start-client-core+[...].mjs";
|
|
2
|
-
import { i as useQuery, n as useMutation, o as useQueryClient, t as useInfiniteQuery } from "../_libs/tanstack__react-query.mjs";
|
|
3
|
-
import { n as clsx } from "../_libs/class-variance-authority+clsx.mjs";
|
|
4
|
-
import { t as twMerge } from "../_libs/tailwind-merge.mjs";
|
|
5
|
-
import { n as normalizeConsolePath } from "./paths.mjs";
|
|
6
|
-
//#region src/api/server-functions.ts
|
|
7
|
-
var consoleGetJson = createServerFn({ method: "GET" }).inputValidator(validatePathInput).handler(async ({ data }) => {
|
|
8
|
-
const { proxyJsonHandler } = await import("./server-runtime.mjs");
|
|
9
|
-
return proxyJsonHandler("GET", data);
|
|
10
|
-
});
|
|
11
|
-
var consoleGetText = createServerFn({ method: "GET" }).inputValidator(validatePathInput).handler(async ({ data }) => {
|
|
12
|
-
const { proxyTextHandler } = await import("./server-runtime.mjs");
|
|
13
|
-
return proxyTextHandler(data);
|
|
14
|
-
});
|
|
15
|
-
var consolePostJson = createServerFn({ method: "POST" }).inputValidator(validateJsonInput).handler(async ({ data }) => {
|
|
16
|
-
const { proxyJsonHandler } = await import("./server-runtime.mjs");
|
|
17
|
-
return proxyJsonHandler("POST", data);
|
|
18
|
-
});
|
|
19
|
-
var consolePutJson = createServerFn({ method: "POST" }).inputValidator(validateJsonInput).handler(async ({ data }) => {
|
|
20
|
-
const { proxyJsonHandler } = await import("./server-runtime.mjs");
|
|
21
|
-
return proxyJsonHandler("PUT", data);
|
|
22
|
-
});
|
|
23
|
-
var consoleDeleteJson = createServerFn({ method: "POST" }).inputValidator(validatePathInput).handler(async ({ data }) => {
|
|
24
|
-
const { proxyJsonHandler } = await import("./server-runtime.mjs");
|
|
25
|
-
return proxyJsonHandler("DELETE", data);
|
|
26
|
-
});
|
|
27
|
-
function validatePathInput(data) {
|
|
28
|
-
return { path: requireConsolePath(requireRecord(data, "path input").path) };
|
|
29
|
-
}
|
|
30
|
-
function validateJsonInput(data) {
|
|
31
|
-
const record = requireRecord(data, "json input");
|
|
32
|
-
return {
|
|
33
|
-
path: requireConsolePath(record.path),
|
|
34
|
-
...record.body === void 0 ? {} : { body: record.body }
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function requireConsolePath(value) {
|
|
38
|
-
if (typeof value !== "string" || value.length === 0) throw new Error("path must be a non-empty string");
|
|
39
|
-
return normalizeConsolePath(value);
|
|
40
|
-
}
|
|
41
|
-
function requireRecord(value, label) {
|
|
42
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error(`${label} must be an object`);
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/api/client.ts
|
|
47
|
-
/** Raised on 401/403 so views can redirect through user auth. */
|
|
48
|
-
var AuthError = class extends Error {};
|
|
49
|
-
/** Raised on 404 so views can render an explicit missing-resource state. */
|
|
50
|
-
var NotFoundError = class extends Error {};
|
|
51
|
-
/** Raised for non-auth API failures with the server-provided message. */
|
|
52
|
-
var ApiError = class extends Error {
|
|
53
|
-
status;
|
|
54
|
-
details;
|
|
55
|
-
constructor(message, status, details) {
|
|
56
|
-
super(message);
|
|
57
|
-
this.status = status;
|
|
58
|
-
this.details = details;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
/** GET through the TanStack Start server function layer. */
|
|
62
|
-
async function apiGet(path) {
|
|
63
|
-
return unwrapResult(await consoleGetJson({ data: { path } }));
|
|
64
|
-
}
|
|
65
|
-
async function apiGetText(path) {
|
|
66
|
-
return unwrapResult(await consoleGetText({ data: { path } }));
|
|
67
|
-
}
|
|
68
|
-
/** POST JSON through the TanStack Start server function layer. */
|
|
69
|
-
async function apiPost(path, body) {
|
|
70
|
-
return unwrapResult(await consolePostJson({ data: {
|
|
71
|
-
path,
|
|
72
|
-
body
|
|
73
|
-
} }));
|
|
74
|
-
}
|
|
75
|
-
/** PUT JSON through the TanStack Start server function layer. */
|
|
76
|
-
async function apiPut(path, body) {
|
|
77
|
-
return unwrapResult(await consolePutJson({ data: {
|
|
78
|
-
path,
|
|
79
|
-
body
|
|
80
|
-
} }));
|
|
81
|
-
}
|
|
82
|
-
/** DELETE through the TanStack Start server function layer. */
|
|
83
|
-
async function apiDelete(path) {
|
|
84
|
-
return unwrapResult(await consoleDeleteJson({ data: { path } }));
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Fetches a file through the TanStack Start server route and triggers a
|
|
88
|
-
* browser download. The bearer token stays server-side in the console session.
|
|
89
|
-
*/
|
|
90
|
-
async function downloadFile(path, filename) {
|
|
91
|
-
const response = await fetch(`/console/api/download?path=${encodeURIComponent(path)}`);
|
|
92
|
-
if (response.status === 401 || response.status === 403) throw new AuthError(`auth failed (${response.status})`);
|
|
93
|
-
if (!response.ok) throw await apiError(response, path);
|
|
94
|
-
const blob = await response.blob();
|
|
95
|
-
const url = URL.createObjectURL(blob);
|
|
96
|
-
const anchor = document.createElement("a");
|
|
97
|
-
anchor.href = url;
|
|
98
|
-
anchor.download = filename;
|
|
99
|
-
document.body.appendChild(anchor);
|
|
100
|
-
anchor.click();
|
|
101
|
-
anchor.remove();
|
|
102
|
-
URL.revokeObjectURL(url);
|
|
103
|
-
}
|
|
104
|
-
async function apiError(response, path) {
|
|
105
|
-
let details;
|
|
106
|
-
let message = `${path} failed (${response.status})`;
|
|
107
|
-
try {
|
|
108
|
-
details = await response.clone().json();
|
|
109
|
-
if (isRecord(details) && typeof details.message === "string") message = details.message;
|
|
110
|
-
else if (isRecord(details) && typeof details.error === "string") message = details.error;
|
|
111
|
-
} catch {
|
|
112
|
-
try {
|
|
113
|
-
const text = await response.clone().text();
|
|
114
|
-
if (text.trim().length > 0) message = text.trim();
|
|
115
|
-
} catch {}
|
|
116
|
-
}
|
|
117
|
-
return new ApiError(message, response.status, details);
|
|
118
|
-
}
|
|
119
|
-
function unwrapResult(result) {
|
|
120
|
-
if (result.ok) return result.data;
|
|
121
|
-
if (result.status === 401 || result.status === 403) throw new AuthError(result.message);
|
|
122
|
-
if (result.status === 404) throw new NotFoundError(result.message);
|
|
123
|
-
throw new ApiError(result.message, result.status, result.details);
|
|
124
|
-
}
|
|
125
|
-
function isRecord(value) {
|
|
126
|
-
return typeof value === "object" && value !== null;
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/api/hooks.ts
|
|
130
|
-
var POLL_MS = 1e3;
|
|
131
|
-
function useRuns(state) {
|
|
132
|
-
return useInfiniteQuery({
|
|
133
|
-
queryKey: ["runs", state ?? null],
|
|
134
|
-
initialPageParam: void 0,
|
|
135
|
-
queryFn: ({ pageParam }) => {
|
|
136
|
-
const params = new URLSearchParams();
|
|
137
|
-
if (state !== void 0) params.set("state", state);
|
|
138
|
-
if (pageParam !== void 0) params.set("cursor", pageParam);
|
|
139
|
-
const query = params.toString();
|
|
140
|
-
return apiGet(`/v1/runs${query ? `?${query}` : ""}`);
|
|
141
|
-
},
|
|
142
|
-
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
143
|
-
maxPages: 10,
|
|
144
|
-
refetchInterval: POLL_MS
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function useRun(runId) {
|
|
148
|
-
return useQuery({
|
|
149
|
-
queryKey: ["run", runId],
|
|
150
|
-
queryFn: () => apiGet(`/v1/runs/${encodeURIComponent(runId)}`),
|
|
151
|
-
refetchInterval: POLL_MS
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function useRunTasks(runId) {
|
|
155
|
-
return useQuery({
|
|
156
|
-
queryKey: ["run-tasks", runId],
|
|
157
|
-
queryFn: () => apiGet(`/v1/runs/${encodeURIComponent(runId)}/tasks`),
|
|
158
|
-
refetchInterval: POLL_MS
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
function useRunArtifacts(runId) {
|
|
162
|
-
return useQuery({
|
|
163
|
-
queryKey: ["run-artifacts", runId],
|
|
164
|
-
queryFn: () => apiGet(`/v1/runs/${encodeURIComponent(runId)}/artifacts`),
|
|
165
|
-
refetchInterval: POLL_MS
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
function useRunMetrics(runId) {
|
|
169
|
-
return useQuery({
|
|
170
|
-
queryKey: ["run-metrics", runId],
|
|
171
|
-
queryFn: () => apiGet(`/v1/runs/${encodeURIComponent(runId)}/metrics`),
|
|
172
|
-
refetchInterval: POLL_MS
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
function useRunFileReservations(runId) {
|
|
176
|
-
return useQuery({
|
|
177
|
-
queryKey: ["run-file-reservations", runId],
|
|
178
|
-
queryFn: () => apiGet(`/v1/runs/${encodeURIComponent(runId)}/file-reservations`),
|
|
179
|
-
refetchInterval: POLL_MS
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
function useDeleteRun() {
|
|
183
|
-
const queryClient = useQueryClient();
|
|
184
|
-
return useMutation({
|
|
185
|
-
mutationFn: (runId) => apiDelete(`/v1/runs/${encodeURIComponent(runId)}`),
|
|
186
|
-
onSuccess: async (_data, runId) => {
|
|
187
|
-
queryClient.removeQueries({ queryKey: ["run", runId] });
|
|
188
|
-
queryClient.removeQueries({ queryKey: ["run-tasks", runId] });
|
|
189
|
-
queryClient.removeQueries({ queryKey: ["run-artifacts", runId] });
|
|
190
|
-
queryClient.removeQueries({ queryKey: ["run-metrics", runId] });
|
|
191
|
-
queryClient.removeQueries({ queryKey: ["run-file-reservations", runId] });
|
|
192
|
-
await queryClient.invalidateQueries({ queryKey: ["runs"] });
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function useTaskPiSession(taskId, poll) {
|
|
197
|
-
return useQuery({
|
|
198
|
-
queryKey: ["task-pi-session", taskId],
|
|
199
|
-
enabled: taskId !== null,
|
|
200
|
-
queryFn: async () => {
|
|
201
|
-
const id = requireTaskId(taskId, "useTaskPiSession");
|
|
202
|
-
try {
|
|
203
|
-
return await apiGet(`/v1/tasks/${encodeURIComponent(id)}/pi-session`);
|
|
204
|
-
} catch (error) {
|
|
205
|
-
if (error instanceof NotFoundError) return null;
|
|
206
|
-
throw error;
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
refetchInterval: poll ? POLL_MS : false
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
function useTaskPiSessionRaw(taskId, enabled, poll) {
|
|
213
|
-
return useQuery({
|
|
214
|
-
queryKey: ["task-pi-session-raw", taskId],
|
|
215
|
-
enabled: taskId !== null && enabled,
|
|
216
|
-
queryFn: async () => {
|
|
217
|
-
const id = requireTaskId(taskId, "useTaskPiSessionRaw");
|
|
218
|
-
try {
|
|
219
|
-
return await apiGetText(`/v1/tasks/${encodeURIComponent(id)}/pi-session?format=raw`);
|
|
220
|
-
} catch (error) {
|
|
221
|
-
if (error instanceof NotFoundError) return null;
|
|
222
|
-
throw error;
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
refetchInterval: poll ? POLL_MS : false
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
function useSendTaskMessage(taskId) {
|
|
229
|
-
const queryClient = useQueryClient();
|
|
230
|
-
return useMutation({
|
|
231
|
-
mutationFn: (input) => {
|
|
232
|
-
const id = requireTaskId(taskId, "useSendTaskMessage");
|
|
233
|
-
return apiPost(`/v1/tasks/${encodeURIComponent(id)}/messages`, input);
|
|
234
|
-
},
|
|
235
|
-
onSuccess: async () => {
|
|
236
|
-
await queryClient.invalidateQueries({ queryKey: ["task-pi-session", taskId] });
|
|
237
|
-
await queryClient.invalidateQueries({ queryKey: ["task-pi-session-raw", taskId] });
|
|
238
|
-
await queryClient.invalidateQueries({ queryKey: ["task-activity", taskId] });
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
function useTaskWorkpad(taskId, poll) {
|
|
243
|
-
return useQuery({
|
|
244
|
-
queryKey: ["task-workpad", taskId],
|
|
245
|
-
enabled: taskId !== null,
|
|
246
|
-
queryFn: () => apiGet(`/v1/tasks/${encodeURIComponent(requireTaskId(taskId, "useTaskWorkpad"))}/workpad`),
|
|
247
|
-
refetchInterval: poll ? POLL_MS : false
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
function useSaveTaskWorkpad(taskId) {
|
|
251
|
-
const queryClient = useQueryClient();
|
|
252
|
-
return useMutation({
|
|
253
|
-
mutationFn: (input) => {
|
|
254
|
-
const id = requireTaskId(taskId, "useSaveTaskWorkpad");
|
|
255
|
-
return apiPut(`/v1/tasks/${encodeURIComponent(id)}/workpad`, input);
|
|
256
|
-
},
|
|
257
|
-
onSuccess: async (workpad) => {
|
|
258
|
-
queryClient.setQueryData(["task-workpad", taskId], workpad);
|
|
259
|
-
await queryClient.invalidateQueries({ queryKey: ["run-tasks", workpad.runId] });
|
|
260
|
-
await queryClient.invalidateQueries({ queryKey: ["task-activity", taskId] });
|
|
261
|
-
},
|
|
262
|
-
onSettled: async () => {
|
|
263
|
-
await queryClient.invalidateQueries({ queryKey: ["task-workpad", taskId] });
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
function useTaskActivity(taskId, poll) {
|
|
268
|
-
return useQuery({
|
|
269
|
-
queryKey: ["task-activity", taskId],
|
|
270
|
-
enabled: taskId !== null,
|
|
271
|
-
queryFn: () => apiGet(`/v1/tasks/${encodeURIComponent(requireTaskId(taskId, "useTaskActivity"))}/activity?limit=20`),
|
|
272
|
-
refetchInterval: poll ? POLL_MS : false
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
function requireTaskId(taskId, hookName) {
|
|
276
|
-
if (taskId === null) throw new Error(`${hookName} called without taskId`);
|
|
277
|
-
return taskId;
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region src/lib/utils.ts
|
|
281
|
-
function cn(...inputs) {
|
|
282
|
-
return twMerge(clsx(inputs));
|
|
283
|
-
}
|
|
284
|
-
//#endregion
|
|
285
|
-
export { useRunFileReservations as a, useRuns as c, useTaskActivity as d, useTaskPiSession as f, downloadFile as g, ApiError as h, useRunArtifacts as i, useSaveTaskWorkpad as l, useTaskWorkpad as m, useDeleteRun as n, useRunMetrics as o, useTaskPiSessionRaw as p, useRun as r, useRunTasks as s, cn as t, useSendTaskMessage as u };
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].mjs";
|
|
2
|
-
import { c as useRunTasks, l as useRuns } from "./hooks-COIYuQzf.mjs";
|
|
3
|
-
import { t as cn } from "./utils-C_uf36nf.mjs";
|
|
4
|
-
import { n as CardContent, t as Card } from "./card-SXNbNwk5.mjs";
|
|
5
|
-
import { c as taskOrdinals, d as useClockTick, n as Skeleton, r as StateBadge, u as timeAgo } from "./bits-BIFjjEu8.mjs";
|
|
6
|
-
import { t as SandboxesLens } from "./SandboxesLens-Bzc8NizP.mjs";
|
|
7
|
-
import { G as ArrowRight, N as ExternalLink, U as Boxes } from "../_libs/lucide-react.mjs";
|
|
8
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/SandboxesPage-Dlq0Ga24.js
|
|
9
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
10
|
-
function SandboxesPage(props) {
|
|
11
|
-
const runs = useRuns();
|
|
12
|
-
useClockTick();
|
|
13
|
-
const loadedRuns = (runs.data?.pages ?? []).flatMap((page) => page.runs);
|
|
14
|
-
const selectedRun = loadedRuns.find((run) => run.runId === props.selectedRunId) ?? loadedRuns[0];
|
|
15
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
16
|
-
className: "grid gap-5",
|
|
17
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
18
|
-
className: "text-lg font-semibold tracking-tight",
|
|
19
|
-
children: "Sandboxes"
|
|
20
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
21
|
-
className: "text-sm text-muted-foreground",
|
|
22
|
-
children: "Sandboxes used by your runs. This is task/session context, not global fleet capacity."
|
|
23
|
-
})] }), runs.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
24
|
-
className: "text-sm text-destructive",
|
|
25
|
-
children: ["Cannot list runs: ", String(runs.error)]
|
|
26
|
-
}) : runs.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingLayout, {}) : loadedRuns.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
27
|
-
className: "grid min-w-0 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]",
|
|
28
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunChooser, {
|
|
29
|
-
runs: loadedRuns,
|
|
30
|
-
selectedRunId: selectedRun?.runId,
|
|
31
|
-
hasMore: runs.hasNextPage,
|
|
32
|
-
loadingMore: runs.isFetchingNextPage,
|
|
33
|
-
onLoadMore: () => void runs.fetchNextPage(),
|
|
34
|
-
onSelect: props.onSelectRun
|
|
35
|
-
}), selectedRun ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedRunSandboxes, {
|
|
36
|
-
run: selectedRun,
|
|
37
|
-
onOpenRun: props.onOpenRun,
|
|
38
|
-
onOpenTask: props.onOpenTask
|
|
39
|
-
}) : null]
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function LoadingLayout() {
|
|
44
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45
|
-
className: "grid gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]",
|
|
46
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
47
|
-
className: "gap-2 p-3",
|
|
48
|
-
children: [
|
|
49
|
-
0,
|
|
50
|
-
1,
|
|
51
|
-
2
|
|
52
|
-
].map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-full" }, row))
|
|
53
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
54
|
-
className: "p-4",
|
|
55
|
-
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" })]
|
|
56
|
-
})]
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function EmptyState() {
|
|
60
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
61
|
-
className: "rounded-lg border border-dashed py-12 text-center",
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Boxes, { className: "mx-auto size-5 text-muted-foreground" }),
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
65
|
-
className: "mt-3 console-callout",
|
|
66
|
-
children: "No runs yet"
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
69
|
-
className: "mt-2 text-sm text-muted-foreground",
|
|
70
|
-
children: "Sandbox placement appears after your account has task runs."
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function RunChooser(props) {
|
|
76
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
77
|
-
className: "gap-2 p-2",
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
80
|
-
className: "px-2 py-1",
|
|
81
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
82
|
-
className: "console-callout",
|
|
83
|
-
children: "Recent runs"
|
|
84
|
-
})
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
87
|
-
className: "grid gap-1",
|
|
88
|
-
children: props.runs.map((run) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunChoice, {
|
|
89
|
-
run,
|
|
90
|
-
selected: run.runId === props.selectedRunId,
|
|
91
|
-
onSelect: props.onSelect
|
|
92
|
-
}, run.runId))
|
|
93
|
-
}),
|
|
94
|
-
props.hasMore ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
95
|
-
type: "button",
|
|
96
|
-
disabled: props.loadingMore,
|
|
97
|
-
onClick: props.onLoadMore,
|
|
98
|
-
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",
|
|
99
|
-
children: props.loadingMore ? "Loading" : "Load more"
|
|
100
|
-
}) : null
|
|
101
|
-
]
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function RunChoice(props) {
|
|
105
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
106
|
-
type: "button",
|
|
107
|
-
"aria-pressed": props.selected,
|
|
108
|
-
onClick: () => props.onSelect(props.run.runId),
|
|
109
|
-
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"),
|
|
110
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
111
|
-
className: "flex min-w-0 items-center gap-2",
|
|
112
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
113
|
-
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
114
|
-
children: props.run.name
|
|
115
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
|
|
116
|
-
state: props.run.state,
|
|
117
|
-
id: props.run.runId
|
|
118
|
-
})]
|
|
119
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
120
|
-
className: "flex min-w-0 items-center gap-2 font-mono text-[11px]",
|
|
121
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
122
|
-
className: "truncate",
|
|
123
|
-
title: props.run.runId,
|
|
124
|
-
children: props.run.runId
|
|
125
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
126
|
-
className: "shrink-0",
|
|
127
|
-
title: props.run.updatedAt,
|
|
128
|
-
"data-num": true,
|
|
129
|
-
children: timeAgo(props.run.updatedAt)
|
|
130
|
-
})]
|
|
131
|
-
})]
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function SelectedRunSandboxes(props) {
|
|
135
|
-
const tasks = useRunTasks(props.run.runId);
|
|
136
|
-
const taskList = tasks.data?.tasks ?? [];
|
|
137
|
-
const ordinals = taskOrdinals(taskList);
|
|
138
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
139
|
-
className: "grid min-w-0 gap-3",
|
|
140
|
-
children: [
|
|
141
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
142
|
-
className: "py-0",
|
|
143
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
144
|
-
className: "flex min-w-0 flex-wrap items-center gap-3 p-4",
|
|
145
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
146
|
-
className: "min-w-0 flex-1",
|
|
147
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
148
|
-
className: "flex min-w-0 items-center gap-2",
|
|
149
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
150
|
-
className: "min-w-0 truncate text-base font-semibold",
|
|
151
|
-
children: props.run.name
|
|
152
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StateBadge, {
|
|
153
|
-
state: props.run.state,
|
|
154
|
-
id: props.run.runId
|
|
155
|
-
})]
|
|
156
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
157
|
-
className: "mt-1 truncate font-mono text-xs text-muted-foreground",
|
|
158
|
-
children: props.run.runId
|
|
159
|
-
})]
|
|
160
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
161
|
-
type: "button",
|
|
162
|
-
onClick: () => props.onOpenRun(props.run.runId),
|
|
163
|
-
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",
|
|
164
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { className: "size-3.5" }), "Open run"]
|
|
165
|
-
})]
|
|
166
|
-
})
|
|
167
|
-
}),
|
|
168
|
-
tasks.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
169
|
-
className: "text-sm text-destructive",
|
|
170
|
-
children: ["Cannot load tasks: ", String(tasks.error)]
|
|
171
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SandboxesLens, {
|
|
172
|
-
tasks: taskList,
|
|
173
|
-
ordinals,
|
|
174
|
-
pending: tasks.isPending,
|
|
175
|
-
onSelect: (taskId) => props.onOpenTask(props.run.runId, taskId)
|
|
176
|
-
}),
|
|
177
|
-
!tasks.isPending && taskList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
178
|
-
type: "button",
|
|
179
|
-
onClick: () => props.onOpenRun(props.run.runId),
|
|
180
|
-
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",
|
|
181
|
-
children: ["Open run by sandbox", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowRight, { className: "size-3.5" })]
|
|
182
|
-
}) : null
|
|
183
|
-
]
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
//#endregion
|
|
187
|
-
export { SandboxesPage };
|