@madarco/agentbox 0.23.4 → 0.23.5
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/CHANGELOG.md +18 -0
- package/dist/{_cloud-attach-BQRWX3J2.js → _cloud-attach-D4OQO5AJ.js} +4 -4
- package/dist/{chunk-W3FQPFP7.js → chunk-6KOQRSHH.js} +3 -3
- package/dist/{chunk-SFA57TGX.js → chunk-DADOEMXP.js} +4 -4
- package/dist/{chunk-QEQFZLYR.js → chunk-FX32NZD4.js} +8 -8
- package/dist/{chunk-LA4JMS27.js → chunk-JNY5GPIM.js} +2 -2
- package/dist/{chunk-LK2JT2OO.js → chunk-JYEZ6Q5M.js} +10 -4
- package/dist/{chunk-LK2JT2OO.js.map → chunk-JYEZ6Q5M.js.map} +1 -1
- package/dist/{chunk-GGRZ3GZO.js → chunk-KY32JO6J.js} +2 -2
- package/dist/{chunk-LSQXT5WZ.js → chunk-KZWJMNLP.js} +2 -2
- package/dist/{chunk-I6ZRWTPR.js → chunk-YRTM3KNT.js} +3 -3
- package/dist/{dist-V235KVEX.js → dist-564EDHFF.js} +5 -5
- package/dist/{dist-Z2NEVV55.js → dist-CAT2TN75.js} +3 -3
- package/dist/{dist-FXQFTT75.js → dist-EAR4BLL2.js} +5 -5
- package/dist/{dist-QO4CTLAX.js → dist-O5Y4X4C5.js} +5 -5
- package/dist/{dist-CUKBKS3N.js → dist-UDQMBWYW.js} +5 -5
- package/dist/index.js +13 -13
- package/dist/{prepared-state-BUO75YLZ-CDTISC2C.js → prepared-state-BUO75YLZ-PW64VQMT.js} +2 -2
- package/package.json +1 -1
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_06f2faq._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/.next/static/chunks/1c5w3kqosumog.js +1 -0
- package/runtime/hub/apps/hub/.next/static/chunks/1o3ot_9-8jgzc.js +1 -0
- package/runtime/hub/apps/hub/.next/static/chunks/3uq9hf-roasav.js +1 -0
- package/runtime/hub/apps/hub/{chunk-2Z74R6ZT.js → chunk-7M6FXZIO.js} +2 -1
- package/runtime/hub/apps/hub/{chunk-H22XP3NY.js → chunk-FSEPYTQ6.js} +9 -3
- package/runtime/hub/apps/hub/{chunk-AR7CEZ2G.js → chunk-Z7ZAL24C.js} +2 -2
- package/runtime/hub/apps/hub/{dist-LZNRLUYY.js → dist-EKQHCXWE.js} +3 -3
- package/runtime/hub/apps/hub/{dist-VV6Z2CQX.js → dist-GGWYKXJE.js} +2 -2
- package/runtime/hub/apps/hub/{dist-LNHEG5P4.js → dist-JGZ55OIJ.js} +3 -3
- package/runtime/hub/apps/hub/{dist-SD4G36EP.js → dist-QIXUPGPP.js} +3 -3
- package/runtime/hub/apps/hub/{dist-Q6G66Z57.js → dist-V4TJ44MT.js} +3 -3
- package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-CAXQS5Y3.js → prepared-state-BUO75YLZ-UICXTY25.js} +1 -1
- package/runtime/hub/apps/hub/server.js +30 -13
- package/runtime/hub/apps/hub/.next/static/chunks/20hq7-0depjid.js +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/3p86ecqhr_7yy.js +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/3qof5hg87qf5n.js +0 -1
- /package/dist/{_cloud-attach-BQRWX3J2.js.map → _cloud-attach-D4OQO5AJ.js.map} +0 -0
- /package/dist/{chunk-W3FQPFP7.js.map → chunk-6KOQRSHH.js.map} +0 -0
- /package/dist/{chunk-SFA57TGX.js.map → chunk-DADOEMXP.js.map} +0 -0
- /package/dist/{chunk-QEQFZLYR.js.map → chunk-FX32NZD4.js.map} +0 -0
- /package/dist/{chunk-LA4JMS27.js.map → chunk-JNY5GPIM.js.map} +0 -0
- /package/dist/{chunk-GGRZ3GZO.js.map → chunk-KY32JO6J.js.map} +0 -0
- /package/dist/{chunk-LSQXT5WZ.js.map → chunk-KZWJMNLP.js.map} +0 -0
- /package/dist/{chunk-I6ZRWTPR.js.map → chunk-YRTM3KNT.js.map} +0 -0
- /package/dist/{dist-V235KVEX.js.map → dist-564EDHFF.js.map} +0 -0
- /package/dist/{dist-CUKBKS3N.js.map → dist-CAT2TN75.js.map} +0 -0
- /package/dist/{dist-FXQFTT75.js.map → dist-EAR4BLL2.js.map} +0 -0
- /package/dist/{dist-QO4CTLAX.js.map → dist-O5Y4X4C5.js.map} +0 -0
- /package/dist/{dist-Z2NEVV55.js.map → dist-UDQMBWYW.js.map} +0 -0
- /package/dist/{prepared-state-BUO75YLZ-CDTISC2C.js.map → prepared-state-BUO75YLZ-PW64VQMT.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{eVq-z4zld_8DGQudbYogV → lOi70Di6lcnEBsUUHKrQ5}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{eVq-z4zld_8DGQudbYogV → lOi70Di6lcnEBsUUHKrQ5}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{eVq-z4zld_8DGQudbYogV → lOi70Di6lcnEBsUUHKrQ5}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/1y49eldffr2-_.js"/><script src="/_next/static/chunks/2w65a9zig6ya7.js" async=""></script><script src="/_next/static/chunks/3x8k7so-uoat8.js" async=""></script><script src="/_next/static/chunks/0ptag81psa0nj.js" async=""></script><script src="/_next/static/chunks/turbopack-2x4_cva4cco3h.js" async=""></script><script src="/_next/static/chunks/2x7nfpuaaba_a.js" async=""></script><script src="/_next/static/chunks/3c49t4evjq8hf.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/1y49eldffr2-_.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[20699,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\"]\n3:I[92242,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\"]\n4:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"ViewportBoundary\"]\na:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"MetadataBoundary\"]\nc:I[17506,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/1y49eldffr2-_.js"/><script src="/_next/static/chunks/2w65a9zig6ya7.js" async=""></script><script src="/_next/static/chunks/3x8k7so-uoat8.js" async=""></script><script src="/_next/static/chunks/0ptag81psa0nj.js" async=""></script><script src="/_next/static/chunks/turbopack-2x4_cva4cco3h.js" async=""></script><script src="/_next/static/chunks/2x7nfpuaaba_a.js" async=""></script><script src="/_next/static/chunks/3c49t4evjq8hf.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/1y49eldffr2-_.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[20699,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\"]\n3:I[92242,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\"]\n4:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"ViewportBoundary\"]\na:I[43645,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"MetadataBoundary\"]\nc:I[17506,[\"/_next/static/chunks/2x7nfpuaaba_a.js\",\"/_next/static/chunks/3c49t4evjq8hf.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"lOi70Di6lcnEBsUUHKrQ5\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88451,e=>{"use strict";var t=e.i(1262),r=e.i(45971),s=e.i(54129),n=e.i(44344),a=e.i(69377),o=e.i(9383);let l=(0,o.createServerReference)("60ff5520393ac26282f15f58e0b073a0c45b3ba7e5",o.callServer,void 0,o.findSourceMapURL,"answerApprovalAction");e.s(["ApprovalActions",0,function({id:e}){let o=(0,r.useRouter)(),[i,c]=(0,s.useTransition)(),d=t=>{c(async()=>{let r=await l(e,t);r.ok||window.alert(`Failed: ${r.error}`),o.refresh()})};return(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,t.jsxs)(a.Button,{variant:"outline",size:"sm",disabled:i,className:"hover:border-[var(--red-line)] hover:bg-[var(--red-soft)] hover:text-[var(--red)]",onClick:()=>d("n"),children:[(0,t.jsx)(n.Icons.x,{}),"Deny"]}),(0,t.jsxs)(a.Button,{size:"sm",disabled:i,onClick:()=>d("y"),children:[(0,t.jsx)(n.Icons.check,{}),"Approve"]})]})}],88451)},95141,e=>{"use strict";var t=e.i(1262),r=e.i(54129),s=e.i(65232),n=e.i(44344);e.s(["Dialog",0,function({onClose:e,className:a,children:o}){return(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e]),(0,t.jsx)("div",{className:"anim-fade fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-[rgba(20,24,30,.42)] p-6 backdrop-blur-[2px]",onClick:e,children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true",className:(0,s.cn)("anim-pop relative m-auto w-full max-w-[500px] rounded-2xl border border-border bg-card shadow-[0_40px_80px_-30px_rgba(20,24,30,.5)]",a),onClick:e=>e.stopPropagation(),children:[o,(0,t.jsx)("button",{className:"absolute right-4 top-4 grid h-7 w-7 cursor-pointer place-items-center rounded-md border-0 bg-transparent text-[#a4a9b0] transition-colors hover:bg-secondary hover:text-foreground",onClick:e,"aria-label":"Close",children:(0,t.jsx)(n.Icons.x,{style:{width:15,height:15}})})]})})},"DialogBody",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,s.cn)("px-5 py-4",e),...r})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,s.cn)("mt-1 font-mono text-xs text-muted-foreground",e),...r})},"DialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,s.cn)("flex justify-end gap-2.5 rounded-b-2xl border-t border-border/70 bg-background px-5 py-3.5",e),...r})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,s.cn)("flex items-start gap-3 border-b border-border/70 px-5 pb-4 pt-5",e),...r})},"DialogIcon",0,function({children:e}){return(0,t.jsx)("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-lg border border-[var(--green-line)] bg-accent text-primary [&_svg]:size-[17px]",children:e})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,s.cn)("text-base font-semibold leading-tight tracking-tight",e),...r})}])},86892,30544,e=>{"use strict";var t=e.i(1262),r=e.i(64595);let s={running:{label:"running",badgeClass:"badge-run"},paused:{label:"paused",badgeClass:"badge-pause"},stopped:{label:"stopped",badgeClass:"badge-stop"},creating:{label:"creating",badgeClass:"badge-create"},error:{label:"error",badgeClass:"badge-err"}};e.s(["StatusBadge",0,function({status:e}){let n=s[e]??s.stopped;return(0,t.jsxs)(r.Badge,{className:n.badgeClass,children:[(0,t.jsx)("span",{className:"badge-dot"}),n.label]})}],86892);var n=e.i(45971),a=e.i(54129),o=e.i(65232),l=e.i(69377),i=e.i(44344),c=e.i(9383);let d=(0,c.createServerReference)("40f10bede8a5e7505d5875574f7e6fc4a06e8e2cb7",c.callServer,void 0,c.findSourceMapURL,"destroyBoxAction"),u=(0,c.createServerReference)("40ea16199b5abb2d3c1d4cecdd25aac1e3c41f074c",c.callServer,void 0,c.findSourceMapURL,"pauseBoxAction"),x=(0,c.createServerReference)("6096bb2a65e369cd77e8b1dc6cd900a5f1e67287bb",c.callServer,void 0,c.findSourceMapURL,"renameBoxAction"),m=(0,c.createServerReference)("4071308a0e1675de302803bb969800c52d79f11e13",c.callServer,void 0,c.findSourceMapURL,"resumeBoxAction"),p=(0,c.createServerReference)("40e545c7dd69b4a1d410deb9c94101099961d3af7a",c.callServer,void 0,c.findSourceMapURL,"stopBoxAction");e.s(["BoxActions",0,function({box:e,size:r}){let s=(0,n.useRouter)(),[c,b]=(0,a.useTransition)(),h="running"===e.status,f="paused"===e.status,g="stopped"===e.status,j=e.id.startsWith("job:"),v="lg"===r,N=v?"sm":"icon-sm",S=(t,r,n)=>{t.stopPropagation(),(!n||window.confirm(n))&&b(async()=>{let t=await r(e.id);t.ok||window.alert(`Action failed: ${t.error}`),s.refresh()})};return j?(0,t.jsx)("div",{className:(0,o.cn)("flex gap-1.5",v?"":"justify-end"),children:(0,t.jsxs)(l.Button,{variant:"destructive",size:N,title:"Dismiss",disabled:c||"error"!==e.status,onClick:t=>S(t,d,`Dismiss failed box ${e.id}? This clears the failed create.`),children:[(0,t.jsx)(i.Icons.trash,{}),v?"Dismiss":null]})}):(0,t.jsxs)("div",{className:(0,o.cn)("flex gap-1.5",v?"":"justify-end"),children:[f?(0,t.jsxs)(l.Button,{variant:v?"default":"outline",size:N,title:"Resume",disabled:c,className:v?"":"hover:border-[var(--green)] hover:bg-accent hover:text-[var(--green-ink)]",onClick:e=>S(e,m),children:[(0,t.jsx)(i.Icons.play,{}),v?"Resume":null]}):(0,t.jsxs)(l.Button,{variant:"outline",size:N,disabled:c||!h,title:"Pause",className:v?"":"hover:border-[var(--amber)] hover:bg-[var(--amber-soft)] hover:text-[var(--amber)]",onClick:e=>S(e,u),children:[(0,t.jsx)(i.Icons.pause,{}),v?"Pause":null]}),(0,t.jsxs)(l.Button,{variant:"outline",size:N,disabled:c||g,title:"Stop",onClick:e=>S(e,p),children:[(0,t.jsx)(i.Icons.stop,{}),v?"Stop":null]}),(0,t.jsxs)(l.Button,{variant:"outline",size:N,disabled:c,title:"Rename",onClick:t=>{t.stopPropagation();let r=window.prompt("Rename box (label only — leave blank to reset)",e.displayName??e.task);null!==r&&b(async()=>{let t=await x(e.id,r.trim());t.ok||window.alert(`Rename failed: ${t.error}`),s.refresh()})},children:[(0,t.jsx)(i.Icons.pencil,{}),v?"Rename":null]}),(0,t.jsxs)(l.Button,{variant:"destructive",size:N,title:"Destroy",disabled:c,onClick:t=>S(t,d,`Destroy box ${e.id}? Its workspace volume is discarded. This cannot be undone.`),children:[(0,t.jsx)(i.Icons.trash,{}),v?"Destroy":null]})]})}],30544)},49604,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Select",0,function({wrapperClassName:e,className:s,children:n,...a}){return(0,t.jsxs)("span",{className:(0,r.cn)("relative inline-flex",e),children:[(0,t.jsx)("select",{className:(0,r.cn)("h-9 w-full cursor-pointer appearance-none rounded-lg border border-input bg-card py-1 pl-3 pr-9 text-[13px] shadow-sm focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",s),...a,children:n}),(0,t.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:(0,t.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}])},8536,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Card",0,function({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("rounded-xl border border-border bg-card text-card-foreground",e),...s})},"CardContent",0,function({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("p-5 pt-0",e),...s})},"CardDescription",0,function({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("text-[12.5px] text-muted-foreground",e),...s})},"CardHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1 p-5",e),...s})},"CardTitle",0,function({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("text-[15px] font-semibold leading-none tracking-tight",e),...s})}])},3060,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Input",0,function({className:e,...s}){return(0,t.jsx)("input",{className:(0,r.cn)("flex h-10 w-full rounded-lg border border-input bg-card px-3 py-1 text-sm shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...s})}])},86184,e=>{"use strict";var t=e.i(1262),r=e.i(54129),s=e.i(69377),n=e.i(3060);function a({jobId:e,login:o}){let[l,i]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[u,x]=(0,r.useState)(null),m="exchanging"===o.phase,p=async()=>{let t=l.trim();if(t&&!c){d(!0),x(null);try{let r=await fetch(`/api/v1/jobs/${encodeURIComponent(e)}/login-code`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({code:t})});if(!r.ok){let e=await r.json().catch(()=>null);x(e?.error?.message??`request failed (${r.status})`);return}i("")}catch(e){x(e instanceof Error?e.message:String(e))}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 p-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-amber-200",children:"Claude login required"}),(0,t.jsx)("p",{className:"text-xs text-amber-100/80",children:"Your saved Claude login is expired. Open the sign-in page, approve access, then paste the code Claude shows you."}),o.url?(0,t.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",className:"w-fit rounded-md bg-amber-500/20 px-2.5 py-1 text-xs font-medium text-amber-100 underline decoration-amber-400/50 underline-offset-2 hover:bg-amber-500/30",children:"Open Claude sign-in ↗"}):(0,t.jsx)("span",{className:"text-xs text-amber-100/60",children:"waiting for the sign-in link…"}),(0,t.jsxs)("div",{className:"mt-1 flex gap-2",children:[(0,t.jsx)(n.Input,{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&p()},placeholder:"Paste approval code",disabled:m,className:"flex-1 font-mono text-xs"}),(0,t.jsx)(s.Button,{type:"button",onClick:()=>void p(),disabled:!l.trim()||c||m,children:m?"Verifying…":c?"Submitting…":"Submit"})]}),o.lastError?(0,t.jsx)("p",{className:"text-xs text-amber-300",children:o.lastError}):null,"error"===o.phase&&o.error?(0,t.jsx)("p",{className:"text-xs text-red-400",children:o.error}):null,u?(0,t.jsx)("p",{className:"text-xs text-red-400",children:u}):null]})}e.s(["JobLogStream",0,function({jobId:e,endpoint:s,onDone:n,onStatus:o,onLogin:l}){let[i,c]=(0,r.useState)([]),[d,u]=(0,r.useState)(null),x=(0,r.useRef)(null),m=(0,r.useRef)(n);m.current=n;let p=(0,r.useRef)(o);p.current=o;let b=(0,r.useRef)(l);return b.current=l,(0,r.useEffect)(()=>{p.current?.("streaming");let t=new EventSource(s??`/api/jobs/${encodeURIComponent(e)}/logs`);return t.addEventListener("log",e=>{let t=JSON.parse(e.data);c(e=>[...e,t])}),t.addEventListener("login",e=>{let t=JSON.parse(e.data);u(t),b.current?.(t)}),t.addEventListener("end",e=>{let r=JSON.parse(e.data);p.current?.(r.status),m.current?.(r.status),t.close()}),()=>t.close()},[e,s]),(0,r.useEffect)(()=>{let e=x.current;e&&(e.scrollTop=e.scrollHeight)},[i]),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d&&"done"!==d.phase?(0,t.jsx)(a,{jobId:e,login:d}):null,(0,t.jsx)("pre",{ref:x,className:"max-h-[440px] min-h-[220px] overflow-auto whitespace-pre rounded-lg bg-[#16181c] p-3 font-mono text-[11.5px] leading-relaxed text-[#d6d9de]",children:0===i.length?"starting…":i.join("\n")})]})}])},33789,1485,e=>{"use strict";var t=e.i(1262),r=e.i(54129);e.s(["Ago",0,function({ms:e}){let[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>n(!0),[]),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:s?function(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return t+"s ago";let r=Math.floor(t/60);if(r<60)return r+"m ago";let s=Math.floor(r/60);return s<24?s+"h ago":Math.floor(s/24)+"d ago"}(e):new Date(e).toLocaleDateString()})}],33789),e.s(["SectionLabel",0,function({children:e,right:r}){return(0,t.jsxs)("div",{className:"mb-3 mt-8 flex items-center gap-2.5 font-mono text-[11px] uppercase tracking-[.1em] text-[#a4a9b0]",children:[e,(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),r??null]})}],1485)},9383,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={callServer:function(){return a.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(57855),o=e.r(61414),l=e.r(97615)},31758,e=>{"use strict";var t=e.i(1262),r=e.i(44344);e.s(["EmptyBox",0,function({children:e}){return(0,t.jsxs)("div",{className:"rounded-xl border border-dashed border-border bg-card px-5 py-9 text-center text-[13.5px] text-muted-foreground",children:[(0,t.jsx)("div",{className:"mx-auto mb-3 grid h-10 w-10 place-items-center rounded-lg border border-border text-[#a4a9b0]",children:(0,t.jsx)(r.Icons.box,{className:"size-5"})}),e]})}])},23878,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Table",0,function({className:e,...s}){return(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...s})},"TableBody",0,function({className:e,...s}){return(0,t.jsx)("tbody",{className:(0,r.cn)("[&_tr:last-child]:border-0",e),...s})},"TableCell",0,function({className:e,...s}){return(0,t.jsx)("td",{className:(0,r.cn)("px-4 py-3 align-middle",e),...s})},"TableHead",0,function({className:e,...s}){return(0,t.jsx)("th",{className:(0,r.cn)("h-9 px-4 text-left align-middle font-mono text-[10.5px] font-normal uppercase tracking-[.08em] text-muted-foreground/90",e),...s})},"TableHeader",0,function({className:e,...s}){return(0,t.jsx)("thead",{className:(0,r.cn)("bg-background [&_tr]:border-b [&_tr]:border-border",e),...s})},"TableRow",0,function({className:e,...s}){return(0,t.jsx)("tr",{className:(0,r.cn)("border-b border-border/60 transition-colors hover:bg-[#fcfcfb] data-[state=selected]:bg-accent",e),...s})}])},22983,93268,66818,e=>{"use strict";var t=e.i(1262),r=e.i(45971),s=e.i(33789),n=e.i(44344),a=e.i(86892),o=e.i(8536),l=e.i(23878),i=e.i(30544);e.s(["BoxTable",0,function({boxes:e}){let c=(0,r.useRouter)();return(0,t.jsx)(o.Card,{className:"overflow-hidden",children:(0,t.jsxs)(l.Table,{children:[(0,t.jsx)(l.TableHeader,{children:(0,t.jsxs)(l.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(l.TableHead,{className:"w-[38%]",children:"Task"}),(0,t.jsx)(l.TableHead,{className:"w-[27%] max-md:hidden",children:"Branch"}),(0,t.jsx)(l.TableHead,{className:"max-md:hidden",children:"Status"}),(0,t.jsx)(l.TableHead,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(l.TableBody,{children:e.map(e=>(0,t.jsxs)(l.TableRow,{className:"cursor-pointer",onClick:()=>c.push("/boxes/"+e.id),children:[(0,t.jsxs)(l.TableCell,{children:[(0,t.jsx)("div",{className:"truncate text-[13.5px] font-medium",children:e.task}),(0,t.jsxs)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:[e.id," · ",e.host]})]}),(0,t.jsxs)(l.TableCell,{className:"max-md:hidden",children:[(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1.5 font-mono text-xs text-secondary-foreground",children:[(0,t.jsx)(n.Icons.branch,{className:"size-3 flex-none text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:e.branch})]}),(0,t.jsxs)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:[e.agent," · ",(0,t.jsx)(s.Ago,{ms:e.lastActivity})]})]}),(0,t.jsx)(l.TableCell,{className:"max-md:hidden",children:(0,t.jsx)(a.StatusBadge,{status:e.status})}),(0,t.jsx)(l.TableCell,{className:"text-right",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(i.BoxActions,{box:e})})]},e.id))})]})})}],22983);var c=e.i(54129),d=e.i(64595),u=e.i(69377),x=e.i(95141),m=e.i(3060),p=e.i(49604),b=e.i(65232);function h({className:e,...r}){return(0,t.jsx)("textarea",{className:(0,b.cn)("flex min-h-[76px] w-full resize-y rounded-lg border border-input bg-card px-3 py-2 text-sm leading-normal shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...r})}var f=e.i(9383);let g=(0,f.createServerReference)("4070192706087364b8c7d220576a6f3e4d3e5c532b",f.callServer,void 0,f.findSourceMapURL,"createBoxAction"),j=(0,f.createServerReference)("40386bdce4d894a318a969412fa1299d2704ccdfb3",f.callServer,void 0,f.findSourceMapURL,"listBranchesAction");var v=e.i(96621),N=e.i(86184);let S=[{id:"docker",label:"Docker (local)",configured:!0}];function y({project:e,projects:s,onClose:a}){let o=(0,r.useRouter)(),{state:l}=(0,v.useStore)(),i=l.providers.length?l.providers:S,[d,f]=(0,c.useTransition)(),[C,B]=(0,c.useState)(e?.id??s[0]?.id??""),[R,I]=(0,c.useState)("claude"),[D,T]=(0,c.useState)("docker"),[A,L]=(0,c.useState)(""),[z,P]=(0,c.useState)(""),[E,U]=(0,c.useState)(""),[M,H]=(0,c.useState)(null),[O,F]=(0,c.useState)(!1),[$,_]=(0,c.useState)(!1),[J,K]=(0,c.useState)(null),[W,q]=(0,c.useState)(null),[V,Y]=(0,c.useState)("streaming"),[G,Q]=(0,c.useState)(null),[X,Z]=(0,c.useState)(null),[ee,et]=(0,c.useState)(!1),[er,es]=(0,c.useState)(null);(0,c.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/v1/providers?freshness=1",{credentials:"same-origin"});if(!t.ok)return;let r=await t.json();if(e)return;let s={};for(let e of r.providers??[])s[e.id]={baseStatus:e.baseStatus,baseStaleReason:e.baseStaleReason,jobId:e.jobId};es(s)}catch{}})(),()=>{e=!0}},[]);let en=s.find(e=>e.id===C)??e,ea=D??"docker",eo=i.find(e=>e.id===ea),el=er?.[ea],ei=!!el&&(!!el.jobId||"unprepared"===el.baseStatus||"stale"===el.baseStatus);(0,c.useEffect)(()=>{if(!C||W)return;F(en?.needsSetup??!1),T("docker");let e=!1;return H(null),U(en?.currentBranch??""),j(C).then(t=>{if(e||!t.ok){e||t.ok||H([]);return}H(t.branches),t.current&&t.branches.includes(t.current)&&U(t.current)}),()=>{e=!0}},[C,W]);let ec=()=>{K(null);let e=el?.jobId;e?Z(e):f(async()=>{try{let e=await fetch(`/api/v1/providers/${encodeURIComponent(ea)}/prepare`,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({})}),t=await e.json().catch(()=>null);if(!e.ok||!t?.jobId)return void K(t?.error?.message??`base image build request failed (${e.status})`);Z(t.jobId)}catch(e){K(e instanceof Error?e.message:String(e))}})},ed=()=>{K(null),f(async()=>{let e=await g({projectId:C,agent:R,provider:D,name:A.trim()||void 0,prompt:"none"===R?void 0:z.trim()||void 0,fromBranch:E.trim()&&E.trim()!==en?.currentBranch?E.trim():void 0,setupWizard:"none"!==R&&O});e.ok?(q(e.jobId),o.refresh()):K(e.error)})};return(0,t.jsxs)(x.Dialog,{onClose:a,className:W||X?"max-w-[900px]":"max-w-[560px]",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogIcon,{children:(0,t.jsx)(n.Icons.box,{})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.DialogTitle,{children:!W&&X?"Building base image":"Create box"}),(0,t.jsx)(x.DialogDescription,{children:en?en.name:"Start a box in a project"})]}),W||X?(0,t.jsx)("div",{className:"ml-auto mr-8 flex-none pt-0.5",children:(0,t.jsx)(w,{status:V,loginPhase:G})}):null]}),(0,t.jsx)(x.DialogBody,{className:"flex flex-col gap-4",children:W?(0,t.jsx)(N.JobLogStream,{jobId:W,onStatus:Y,onDone:()=>o.refresh(),onLogin:e=>Q(e?.phase??null)}):X?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"font-mono text-xs text-muted-foreground",children:["Building the ",eo?.label??ea," base image — one-time, can take several minutes. The box is created automatically when it finishes."]}),(0,t.jsx)(N.JobLogStream,{jobId:X,onStatus:Y,onDone:e=>{"done"===e?ed():K(`base image build ${e}`)}}),J?(0,t.jsx)("div",{className:"font-mono text-xs text-destructive",children:J}):null]}):(0,t.jsxs)(t.Fragment,{children:[e?null:(0,t.jsx)(k,{label:"Project",children:(0,t.jsxs)(p.Select,{value:C,onChange:e=>B(e.target.value),children:[0===s.length?(0,t.jsx)("option",{value:"",children:"No projects — add one first"}):null,s.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),(0,t.jsx)(k,{label:"Provider",children:(0,t.jsx)(p.Select,{value:D,onChange:e=>T(e.target.value),children:i.map(e=>(0,t.jsxs)("option",{value:e.id,disabled:!e.configured,title:e.reason,children:[e.label,e.configured?"":" — not configured"]},e.id))})}),ei?(0,t.jsx)("p",{className:"-mt-2 font-mono text-xs text-amber-600 dark:text-amber-400",title:el?.baseStaleReason,children:el?.jobId?"A base-image build is already running — the box will be created when it finishes.":el?.baseStatus==="unprepared"?"First use of this provider: the base image will be downloaded or built first (can take 5–10 minutes).":"The base image is out of date and will be rebuilt first (can take 5–10 minutes)."}):null,(0,t.jsx)(k,{label:"Agent",children:(0,t.jsxs)(p.Select,{value:R,onChange:e=>I(e.target.value),children:[(0,t.jsx)("option",{value:"claude",children:"Claude"}),(0,t.jsx)("option",{value:"codex",children:"Codex"}),(0,t.jsx)("option",{value:"opencode",children:"OpenCode"}),(0,t.jsx)("option",{value:"none",children:"Empty — just create the box"})]})}),(0,t.jsx)(k,{label:"Name (optional)",children:(0,t.jsx)(m.Input,{value:A,onChange:e=>L(e.target.value),placeholder:"auto"})}),en?.needsSetup&&"none"!==R?(0,t.jsxs)("label",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:O,onChange:e=>F(e.target.checked),className:"mt-0.5 h-4 w-4 flex-none accent-primary"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-secondary-foreground",children:"Run setup wizard"}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"This project has no agentbox.yaml — the agent explores the repo and proposes one on its first turn."})]})]}):null,"none"===R?(0,t.jsxs)("p",{className:"font-mono text-xs text-muted-foreground",children:["The box is created and left running with no agent — attach later from a terminal or SSH (",(0,t.jsx)("span",{className:"text-secondary-foreground",children:"agentbox shell"}),")."]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>_(e=>!e),className:"flex cursor-pointer items-center gap-1.5 self-start text-xs font-medium text-secondary-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(n.Icons.chevR,{className:(0,b.cn)("size-3.5 transition-transform",$&&"rotate-90")}),"Advanced"]}),$?(0,t.jsxs)(t.Fragment,{children:[null===M?(0,t.jsx)(k,{label:"Base branch",children:(0,t.jsx)(p.Select,{value:"",disabled:!0,children:(0,t.jsx)("option",{value:"",children:"Loading branches…"})})}):M.length>0?(0,t.jsx)(k,{label:"Base branch",children:(0,t.jsxs)(p.Select,{value:E,onChange:e=>U(e.target.value),children:[en?.currentBranch&&!M.includes(en.currentBranch)?(0,t.jsxs)("option",{value:"",children:[en.currentBranch," (current)"]}):null,M.map(e=>(0,t.jsxs)("option",{value:e,children:[e,e===en?.currentBranch?" (current)":""]},e))]})}):null,"none"!==R?(0,t.jsx)(k,{label:"Initial prompt (optional)",children:(0,t.jsx)(h,{value:z,onChange:e=>P(e.target.value),rows:3,placeholder:"Leave empty to just start the agent — attach later from a terminal or SSH."})}):null]}):null]}),J?(0,t.jsx)("div",{className:"font-mono text-xs text-destructive",children:J}):null]})}),(0,t.jsx)(x.DialogFooter,{children:W||X?(0,t.jsxs)(t.Fragment,{children:["streaming"===V?(0,t.jsx)("span",{className:"mr-auto self-center font-mono text-xs text-muted-foreground",children:W?"The box + agent start in the background — you can close this.":"Keep this open — the box is created when the build finishes."}):null,(0,t.jsx)(u.Button,{onClick:a,children:"Close"})]}):ee?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"mr-auto self-center font-mono text-xs text-muted-foreground",title:el?.baseStaleReason,children:["The ",eo?.label??ea," base image is out of date."]}),(0,t.jsx)(u.Button,{variant:"outline",onClick:()=>et(!1),disabled:d,children:"Cancel"}),(0,t.jsx)(u.Button,{variant:"outline",onClick:()=>{et(!1),ed()},disabled:d,children:"Use existing image"}),(0,t.jsx)(u.Button,{onClick:()=>{et(!1),ec()},disabled:d,children:"Rebuild & create"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Button,{variant:"outline",onClick:a,disabled:d,children:"Cancel"}),(0,t.jsx)(u.Button,{onClick:()=>{(K(null),C)?ei?"docker"===ea||el?.baseStatus!=="stale"||el.jobId?ec():et(!0):ed():K("pick a project")},disabled:d||!C,children:d?"Starting…":"Create box"})]})})]})}function w({status:e,loginPhase:r}){return"done"===e?(0,t.jsxs)(d.Badge,{className:"badge-run",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Done"]}):"failed"===e||"error"===e||"cancelled"===e?(0,t.jsxs)(d.Badge,{className:"badge-err",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Failed"]}):"error"===r?(0,t.jsxs)(d.Badge,{className:"badge-err",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Login failed"]}):"awaiting-code"===r||"starting"===r||"exchanging"===r?(0,t.jsxs)(d.Badge,{className:"badge-create",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Login required"]}):(0,t.jsxs)(d.Badge,{className:"badge-create",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Working…"]})}function k({label:e,children:r}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-secondary-foreground",children:e}),r]})}e.s(["CreateBoxButton",0,function({project:e,projects:r,variant:s,size:a,className:o}){let[l,i]=(0,c.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.Button,{variant:s,size:a,className:o,onClick:()=>i(!0),children:[(0,t.jsx)(n.Icons.plus,{}),"Create box"]}),l?(0,t.jsx)(y,{project:e,projects:r??(e?[e]:[]),onClose:()=>i(!1)}):null]})}],93268);let C=(0,f.createServerReference)("40c7856bd78dddab224344045df78d51620e411335",f.callServer,void 0,f.findSourceMapURL,"removeProjectAction");e.s(["DeleteProjectButton",0,function({project:e,size:s,className:a,redirectHome:o}){let l=(0,r.useRouter)(),[i,d]=(0,c.useTransition)();return(0,t.jsxs)(u.Button,{variant:"destructive",size:s,className:a,title:"Delete project",disabled:i,onClick:t=>{t.stopPropagation(),t.preventDefault(),window.confirm(`Remove project "${e.name}" from the hub? Its folder and files are NOT deleted — this only unregisters it (and any hub-set project settings). This cannot be undone.`)&&d(async()=>{let t=await C(e.id);t.ok?o?l.push("/"):l.refresh():window.alert(`Delete failed: ${t.error}`)})},children:[(0,t.jsx)(n.Icons.trash,{}),"Delete"]})}],66818)},87340,e=>{"use strict";var t=e.i(1262),r=e.i(51096),s=e.i(44344),n=e.i(96621),a=e.i(88451);function o(){let{state:e,box:o}=(0,n.useStore)();if(0===e.approvals.length)return null;let l=[...e.approvals].sort((e,t)=>e.createdAt-t.createdAt),i=l[0],c=o(i.boxId);return(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-3 rounded-xl border border-[var(--amber-line)] bg-[var(--amber-soft)] p-4",children:[(0,t.jsx)(s.Icons.shield,{className:"mt-0.5 size-4 flex-none text-[var(--amber)]"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[c?(0,t.jsx)(r.default,{className:"text-[13.5px] font-semibold hover:text-[var(--green-ink)]",href:"/boxes/"+c.id,children:c.task}):(0,t.jsx)("span",{className:"text-[13.5px] font-semibold",children:i.boxId}),(0,t.jsx)("span",{className:"truncate font-mono text-[12.5px] text-secondary-foreground",children:i.command??i.message})]}),i.detail?(0,t.jsx)("div",{className:"mt-0.5 truncate text-[11.5px] text-muted-foreground",children:i.detail}):null,i.cwd?(0,t.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[#a4a9b0]",children:i.cwd}):null]}),(0,t.jsxs)("div",{className:"flex flex-none items-center gap-3",children:[l.length>1?(0,t.jsxs)("div",{className:"hidden items-center gap-2 sm:flex",children:[(0,t.jsxs)("span",{className:"font-mono text-[11.5px] text-[var(--amber)]",children:[l.length," pending"]}),(0,t.jsx)(r.default,{className:"font-mono text-[11.5px] text-muted-foreground hover:text-[var(--green-ink)]",href:"/approvals",children:"View all"})]}):null,(0,t.jsx)(a.ApprovalActions,{id:i.id})]})]})}var l=e.i(45971),i=e.i(54129),c=e.i(69377),d=e.i(95141),u=e.i(3060),x=e.i(9383);let m=(0,x.createServerReference)("4087bb6da1f4834ca146bcc8cb7c69295dbeda0bdc",x.callServer,void 0,x.findSourceMapURL,"addProjectAction"),p=(0,x.createServerReference)("40942714d29a270a6816a39cd419b4f09f50fc19b1",x.callServer,void 0,x.findSourceMapURL,"browseDirAction");function b(){let[e,r]=(0,i.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.Button,{onClick:()=>r(!0),children:[(0,t.jsx)(s.Icons.plus,{}),"New project"]}),e?(0,t.jsx)(h,{onClose:()=>r(!1)}):null]})}function h({onClose:e}){let r=(0,l.useRouter)(),[n,a]=(0,i.useTransition)(),[o,x]=(0,i.useState)(""),[b,f]=(0,i.useState)(null),[g,j]=(0,i.useState)([]),[v,N]=(0,i.useState)(!0),[S,y]=(0,i.useState)(null),w=(0,i.useCallback)(async e=>{N(!0),y(null);let t=await p(e);if(!t.ok){y(t.error),N(!1);return}x(t.path),f(t.parent),j(t.entries),N(!1)},[]);return(0,i.useEffect)(()=>{w()},[w]),(0,t.jsxs)(d.Dialog,{onClose:e,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsx)(d.DialogIcon,{children:(0,t.jsx)(s.Icons.folder,{})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.DialogTitle,{children:"Add project"}),(0,t.jsx)(d.DialogDescription,{children:"Pick a folder on this machine"})]})]}),(0,t.jsxs)(d.DialogBody,{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"outline",className:"flex-none px-2.5",onClick:()=>void w(b??void 0),disabled:!b||v,title:"Up one level","aria-label":"Up one level",children:(0,t.jsx)(s.Icons.arrowUp,{})}),(0,t.jsx)(u.Input,{value:o,onChange:e=>x(e.target.value),placeholder:"/Users/you/Projects/my-app",className:"font-mono text-xs",onKeyDown:e=>{"Enter"===e.key&&w(o)}})]}),(0,t.jsx)("div",{className:"h-56 overflow-y-auto rounded-lg border border-border bg-background",children:v?(0,t.jsx)("div",{className:"px-3 py-2.5 font-mono text-xs text-muted-foreground",children:"Loading…"}):0===g.length?(0,t.jsx)("div",{className:"px-3 py-2.5 font-mono text-xs text-muted-foreground",children:"No subfolders here"}):g.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>void w(e.path),className:"flex w-full cursor-pointer items-center gap-2 border-0 border-b border-border/60 bg-transparent px-3 py-2 text-left text-[13px] transition-colors last:border-b-0 hover:bg-secondary",children:[(0,t.jsx)(s.Icons.folder,{className:"size-4 flex-none text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:e.name}),e.isProject?(0,t.jsx)("span",{className:"ml-auto flex-none rounded border border-[var(--green-line)] bg-accent px-1.5 py-px font-mono text-[10px] uppercase tracking-wide text-primary",children:"project"}):(0,t.jsx)(s.Icons.chevR,{className:"ml-auto size-3.5 flex-none text-[#a4a9b0]"})]},e.path))}),S?(0,t.jsx)("div",{className:"font-mono text-xs text-destructive",children:S}):null]}),(0,t.jsxs)(d.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:e,disabled:n,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:()=>{y(null);let t=o.trim();t?a(async()=>{let s=await m(t);s.ok?(r.refresh(),e()):y(s.error)}):y("choose a folder")},disabled:n||v,children:n?"Adding…":"Add this folder"})]})]})}var f=e.i(22983),g=e.i(93268),j=e.i(66818),v=e.i(31758),N=e.i(1485);e.s(["default",0,function(){let{state:e,boxesFor:a}=(0,n.useStore)(),l=e.projects.map(e=>({p:e,boxes:a(e.id)})).sort((e,t)=>(e.boxes.length>0?0:1)-(t.boxes.length>0?0:1)),i=e.boxes.filter(e=>"running"===e.status).length;return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8 max-sm:px-4",children:[(0,t.jsx)(o,{}),(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-[25px] font-semibold leading-tight tracking-[-0.025em]",children:"Boxes"}),(0,t.jsxs)("div",{className:"mt-1.5 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono text-secondary-foreground",children:i})," running across"," ",(0,t.jsx)("span",{className:"font-mono text-secondary-foreground",children:e.projects.length})," ","project",1===e.projects.length?"":"s"," on this machine."]})]}),(0,t.jsx)("div",{className:"ml-auto flex flex-none gap-2",children:(0,t.jsx)(b,{})})]}),(0,t.jsx)(N.SectionLabel,{children:"Projects"}),0===l.length?(0,t.jsxs)(v.EmptyBox,{children:[(0,t.jsx)("div",{children:"No projects on this machine yet."}),(0,t.jsx)("div",{className:"mt-1.5 font-mono text-xs text-muted-foreground",children:"Add one with “New project”, or run `agentbox create` in a folder."})]}):null,l.map(({p:e,boxes:n})=>(0,t.jsxs)("div",{className:"mb-7",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-1 pb-3",children:[(0,t.jsxs)(r.default,{className:"flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-[15px] font-semibold tracking-[-0.01em] text-foreground hover:text-[var(--green-ink)]",href:"/projects/"+e.id,children:[(0,t.jsx)("span",{className:"grid h-[22px] w-[22px] flex-none place-items-center rounded-md border border-[var(--green-line)] bg-accent text-primary",children:(0,t.jsx)(s.Icons.folder,{className:"size-[13px]"})}),e.name]}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:e.repo}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{className:"font-mono text-[11.5px] text-[#a4a9b0]",children:[n.length," box",1===n.length?"":"es"]}),(0,t.jsx)(g.CreateBoxButton,{project:e,variant:"outline",size:"sm",className:"font-mono text-xs"}),0===n.length?(0,t.jsx)(j.DeleteProjectButton,{project:e,size:"sm",className:"font-mono text-xs"}):null]}),n.length?(0,t.jsx)(f.BoxTable,{boxes:n}):(0,t.jsx)(v.EmptyBox,{children:(0,t.jsxs)("div",{children:["No boxes in ",(0,t.jsx)("b",{className:"font-semibold text-secondary-foreground",children:e.name})," yet."]})})]},e.id))]})}],87340)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33789,1485,e=>{"use strict";var r=e.i(1262),t=e.i(54129);e.s(["Ago",0,function({ms:e}){let[n,s]=(0,t.useState)(!1);return(0,t.useEffect)(()=>s(!0),[]),(0,r.jsx)("span",{suppressHydrationWarning:!0,children:n?function(e){let r=Math.floor((Date.now()-e)/1e3);if(r<60)return r+"s ago";let t=Math.floor(r/60);if(t<60)return t+"m ago";let n=Math.floor(t/60);return n<24?n+"h ago":Math.floor(n/24)+"d ago"}(e):new Date(e).toLocaleDateString()})}],33789),e.s(["SectionLabel",0,function({children:e,right:t}){return(0,r.jsxs)("div",{className:"mb-3 mt-8 flex items-center gap-2.5 font-mono text-[11px] uppercase tracking-[.1em] text-[#a4a9b0]",children:[e,(0,r.jsx)("span",{className:"h-px flex-1 bg-border"}),t??null]})}],1485)},9383,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var s in n)Object.defineProperty(t,s,{enumerable:!0,get:n[s]});let a=e.r(57855),i=e.r(61414),o=e.r(97615)},31758,e=>{"use strict";var r=e.i(1262),t=e.i(44344);e.s(["EmptyBox",0,function({children:e}){return(0,r.jsxs)("div",{className:"rounded-xl border border-dashed border-border bg-card px-5 py-9 text-center text-[13.5px] text-muted-foreground",children:[(0,r.jsx)("div",{className:"mx-auto mb-3 grid h-10 w-10 place-items-center rounded-lg border border-border text-[#a4a9b0]",children:(0,r.jsx)(t.Icons.box,{className:"size-5"})}),e]})}])},88451,e=>{"use strict";var r=e.i(1262),t=e.i(45971),n=e.i(54129),s=e.i(44344),a=e.i(69377),i=e.i(9383);let o=(0,i.createServerReference)("60ff5520393ac26282f15f58e0b073a0c45b3ba7e5",i.callServer,void 0,i.findSourceMapURL,"answerApprovalAction");e.s(["ApprovalActions",0,function({id:e}){let i=(0,t.useRouter)(),[c,l]=(0,n.useTransition)(),d=r=>{l(async()=>{let t=await o(e,r);t.ok||window.alert(`Failed: ${t.error}`),i.refresh()})};return(0,r.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,r.jsxs)(a.Button,{variant:"outline",size:"sm",disabled:c,className:"hover:border-[var(--red-line)] hover:bg-[var(--red-soft)] hover:text-[var(--red)]",onClick:()=>d("n"),children:[(0,r.jsx)(s.Icons.x,{}),"Deny"]}),(0,r.jsxs)(a.Button,{size:"sm",disabled:c,onClick:()=>d("y"),children:[(0,r.jsx)(s.Icons.check,{}),"Approve"]})]})}],88451)},16200,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Label",0,function({className:e,...n}){return(0,r.jsx)("label",{className:(0,t.cn)("mb-2 block text-[13px] font-medium leading-none",e),...n})}])},8536,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Card",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("rounded-xl border border-border bg-card text-card-foreground",e),...n})},"CardContent",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("p-5 pt-0",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("text-[12.5px] text-muted-foreground",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("flex flex-col space-y-1 p-5",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("text-[15px] font-semibold leading-none tracking-tight",e),...n})}])},3060,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Input",0,function({className:e,...n}){return(0,r.jsx)("input",{className:(0,t.cn)("flex h-10 w-full rounded-lg border border-input bg-card px-3 py-1 text-sm shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...n})}])},86892,30544,e=>{"use strict";var r=e.i(1262),t=e.i(64595);let n={running:{label:"running",badgeClass:"badge-run"},paused:{label:"paused",badgeClass:"badge-pause"},stopped:{label:"stopped",badgeClass:"badge-stop"},creating:{label:"creating",badgeClass:"badge-create"},error:{label:"error",badgeClass:"badge-err"}};e.s(["StatusBadge",0,function({status:e}){let s=n[e]??n.stopped;return(0,r.jsxs)(t.Badge,{className:s.badgeClass,children:[(0,r.jsx)("span",{className:"badge-dot"}),s.label]})}],86892);var s=e.i(45971),a=e.i(54129),i=e.i(65232),o=e.i(69377),c=e.i(44344),l=e.i(9383);let d=(0,l.createServerReference)("40f10bede8a5e7505d5875574f7e6fc4a06e8e2cb7",l.callServer,void 0,l.findSourceMapURL,"destroyBoxAction"),u=(0,l.createServerReference)("40ea16199b5abb2d3c1d4cecdd25aac1e3c41f074c",l.callServer,void 0,l.findSourceMapURL,"pauseBoxAction"),x=(0,l.createServerReference)("6096bb2a65e369cd77e8b1dc6cd900a5f1e67287bb",l.callServer,void 0,l.findSourceMapURL,"renameBoxAction"),b=(0,l.createServerReference)("4071308a0e1675de302803bb969800c52d79f11e13",l.callServer,void 0,l.findSourceMapURL,"resumeBoxAction"),p=(0,l.createServerReference)("40e545c7dd69b4a1d410deb9c94101099961d3af7a",l.callServer,void 0,l.findSourceMapURL,"stopBoxAction");e.s(["BoxActions",0,function({box:e,size:t}){let n=(0,s.useRouter)(),[l,f]=(0,a.useTransition)(),m="running"===e.status,v="paused"===e.status,g="stopped"===e.status,h=e.id.startsWith("job:"),j="lg"===t,y=j?"sm":"icon-sm",N=(r,t,s)=>{r.stopPropagation(),(!s||window.confirm(s))&&f(async()=>{let r=await t(e.id);r.ok||window.alert(`Action failed: ${r.error}`),n.refresh()})};return h?(0,r.jsx)("div",{className:(0,i.cn)("flex gap-1.5",j?"":"justify-end"),children:(0,r.jsxs)(o.Button,{variant:"destructive",size:y,title:"Dismiss",disabled:l||"error"!==e.status,onClick:r=>N(r,d,`Dismiss failed box ${e.id}? This clears the failed create.`),children:[(0,r.jsx)(c.Icons.trash,{}),j?"Dismiss":null]})}):(0,r.jsxs)("div",{className:(0,i.cn)("flex gap-1.5",j?"":"justify-end"),children:[v?(0,r.jsxs)(o.Button,{variant:j?"default":"outline",size:y,title:"Resume",disabled:l,className:j?"":"hover:border-[var(--green)] hover:bg-accent hover:text-[var(--green-ink)]",onClick:e=>N(e,b),children:[(0,r.jsx)(c.Icons.play,{}),j?"Resume":null]}):(0,r.jsxs)(o.Button,{variant:"outline",size:y,disabled:l||!m,title:"Pause",className:j?"":"hover:border-[var(--amber)] hover:bg-[var(--amber-soft)] hover:text-[var(--amber)]",onClick:e=>N(e,u),children:[(0,r.jsx)(c.Icons.pause,{}),j?"Pause":null]}),(0,r.jsxs)(o.Button,{variant:"outline",size:y,disabled:l||g,title:"Stop",onClick:e=>N(e,p),children:[(0,r.jsx)(c.Icons.stop,{}),j?"Stop":null]}),(0,r.jsxs)(o.Button,{variant:"outline",size:y,disabled:l,title:"Rename",onClick:r=>{r.stopPropagation();let t=window.prompt("Rename box (label only — leave blank to reset)",e.displayName??e.task);null!==t&&f(async()=>{let r=await x(e.id,t.trim());r.ok||window.alert(`Rename failed: ${r.error}`),n.refresh()})},children:[(0,r.jsx)(c.Icons.pencil,{}),j?"Rename":null]}),(0,r.jsxs)(o.Button,{variant:"destructive",size:y,title:"Destroy",disabled:l,onClick:r=>N(r,d,`Destroy box ${e.id}? Its workspace volume is discarded. This cannot be undone.`),children:[(0,r.jsx)(c.Icons.trash,{}),j?"Destroy":null]})]})}],30544)},95141,e=>{"use strict";var r=e.i(1262),t=e.i(54129),n=e.i(65232),s=e.i(44344);e.s(["Dialog",0,function({onClose:e,className:a,children:i}){return(0,t.useEffect)(()=>{let r=r=>{"Escape"===r.key&&e()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e]),(0,r.jsx)("div",{className:"anim-fade fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-[rgba(20,24,30,.42)] p-6 backdrop-blur-[2px]",onClick:e,children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true",className:(0,n.cn)("anim-pop relative m-auto w-full max-w-[500px] rounded-2xl border border-border bg-card shadow-[0_40px_80px_-30px_rgba(20,24,30,.5)]",a),onClick:e=>e.stopPropagation(),children:[i,(0,r.jsx)("button",{className:"absolute right-4 top-4 grid h-7 w-7 cursor-pointer place-items-center rounded-md border-0 bg-transparent text-[#a4a9b0] transition-colors hover:bg-secondary hover:text-foreground",onClick:e,"aria-label":"Close",children:(0,r.jsx)(s.Icons.x,{style:{width:15,height:15}})})]})})},"DialogBody",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("px-5 py-4",e),...t})},"DialogDescription",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("mt-1 font-mono text-xs text-muted-foreground",e),...t})},"DialogFooter",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("flex justify-end gap-2.5 rounded-b-2xl border-t border-border/70 bg-background px-5 py-3.5",e),...t})},"DialogHeader",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("flex items-start gap-3 border-b border-border/70 px-5 pb-4 pt-5",e),...t})},"DialogIcon",0,function({children:e}){return(0,r.jsx)("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-lg border border-[var(--green-line)] bg-accent text-primary [&_svg]:size-[17px]",children:e})},"DialogTitle",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("text-base font-semibold leading-tight tracking-tight",e),...t})}])},49604,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Select",0,function({wrapperClassName:e,className:n,children:s,...a}){return(0,r.jsxs)("span",{className:(0,t.cn)("relative inline-flex",e),children:[(0,r.jsx)("select",{className:(0,t.cn)("h-9 w-full cursor-pointer appearance-none rounded-lg border border-input bg-card py-1 pl-3 pr-9 text-[13px] shadow-sm focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",n),...a,children:s}),(0,r.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:(0,r.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}])},80922,35594,e=>{"use strict";var r=e.i(1262),t=e.i(51096),n=e.i(44344);e.s(["BackLink",0,function({to:e,children:s}){return(0,r.jsxs)(t.default,{className:"mb-3.5 inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-mono text-xs text-muted-foreground hover:text-primary",href:e,children:[(0,r.jsx)(n.Icons.arrowL,{className:"size-[13px]"}),s]})}],80922);var s=e.i(65232),a=e.i(8536);e.s(["Stat",0,function({k:e,v:t,mono:n,icon:a}){return(0,r.jsxs)("div",{className:"px-4.5 p-4",children:[(0,r.jsx)("div",{className:"mb-1.5 font-mono text-[10.5px] uppercase tracking-[.06em] text-[#a4a9b0]",children:e}),(0,r.jsxs)("div",{className:(0,s.cn)("flex items-center gap-2 font-semibold tracking-[-0.01em]",n?"font-mono text-sm font-medium":"text-base"),children:[a?(0,r.jsx)(a,{className:"size-[15px] text-muted-foreground"}):null,t]})]})},"StatGrid",0,function({children:e}){return(0,r.jsx)(a.Card,{className:"grid grid-cols-[repeat(auto-fit,minmax(140px,1fr))] divide-x divide-border/60 overflow-hidden",children:e})}],35594)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86892,30544,e=>{"use strict";var t=e.i(1262),r=e.i(64595);let a={running:{label:"running",badgeClass:"badge-run"},paused:{label:"paused",badgeClass:"badge-pause"},stopped:{label:"stopped",badgeClass:"badge-stop"},creating:{label:"creating",badgeClass:"badge-create"},error:{label:"error",badgeClass:"badge-err"}};e.s(["StatusBadge",0,function({status:e}){let s=a[e]??a.stopped;return(0,t.jsxs)(r.Badge,{className:s.badgeClass,children:[(0,t.jsx)("span",{className:"badge-dot"}),s.label]})}],86892);var s=e.i(45971),n=e.i(54129),o=e.i(65232),i=e.i(69377),l=e.i(44344),c=e.i(9383);let d=(0,c.createServerReference)("40f10bede8a5e7505d5875574f7e6fc4a06e8e2cb7",c.callServer,void 0,c.findSourceMapURL,"destroyBoxAction"),u=(0,c.createServerReference)("40ea16199b5abb2d3c1d4cecdd25aac1e3c41f074c",c.callServer,void 0,c.findSourceMapURL,"pauseBoxAction"),x=(0,c.createServerReference)("6096bb2a65e369cd77e8b1dc6cd900a5f1e67287bb",c.callServer,void 0,c.findSourceMapURL,"renameBoxAction"),m=(0,c.createServerReference)("4071308a0e1675de302803bb969800c52d79f11e13",c.callServer,void 0,c.findSourceMapURL,"resumeBoxAction"),b=(0,c.createServerReference)("40e545c7dd69b4a1d410deb9c94101099961d3af7a",c.callServer,void 0,c.findSourceMapURL,"stopBoxAction");e.s(["BoxActions",0,function({box:e,size:r}){let a=(0,s.useRouter)(),[c,p]=(0,n.useTransition)(),h="running"===e.status,f="paused"===e.status,g="stopped"===e.status,j=e.id.startsWith("job:"),v="lg"===r,N=v?"sm":"icon-sm",S=(t,r,s)=>{t.stopPropagation(),(!s||window.confirm(s))&&p(async()=>{let t=await r(e.id);t.ok||window.alert(`Action failed: ${t.error}`),a.refresh()})};return j?(0,t.jsx)("div",{className:(0,o.cn)("flex gap-1.5",v?"":"justify-end"),children:(0,t.jsxs)(i.Button,{variant:"destructive",size:N,title:"Dismiss",disabled:c||"error"!==e.status,onClick:t=>S(t,d,`Dismiss failed box ${e.id}? This clears the failed create.`),children:[(0,t.jsx)(l.Icons.trash,{}),v?"Dismiss":null]})}):(0,t.jsxs)("div",{className:(0,o.cn)("flex gap-1.5",v?"":"justify-end"),children:[f?(0,t.jsxs)(i.Button,{variant:v?"default":"outline",size:N,title:"Resume",disabled:c,className:v?"":"hover:border-[var(--green)] hover:bg-accent hover:text-[var(--green-ink)]",onClick:e=>S(e,m),children:[(0,t.jsx)(l.Icons.play,{}),v?"Resume":null]}):(0,t.jsxs)(i.Button,{variant:"outline",size:N,disabled:c||!h,title:"Pause",className:v?"":"hover:border-[var(--amber)] hover:bg-[var(--amber-soft)] hover:text-[var(--amber)]",onClick:e=>S(e,u),children:[(0,t.jsx)(l.Icons.pause,{}),v?"Pause":null]}),(0,t.jsxs)(i.Button,{variant:"outline",size:N,disabled:c||g,title:"Stop",onClick:e=>S(e,b),children:[(0,t.jsx)(l.Icons.stop,{}),v?"Stop":null]}),(0,t.jsxs)(i.Button,{variant:"outline",size:N,disabled:c,title:"Rename",onClick:t=>{t.stopPropagation();let r=window.prompt("Rename box (label only — leave blank to reset)",e.displayName??e.task);null!==r&&p(async()=>{let t=await x(e.id,r.trim());t.ok||window.alert(`Rename failed: ${t.error}`),a.refresh()})},children:[(0,t.jsx)(l.Icons.pencil,{}),v?"Rename":null]}),(0,t.jsxs)(i.Button,{variant:"destructive",size:N,title:"Destroy",disabled:c,onClick:t=>S(t,d,`Destroy box ${e.id}? Its workspace volume is discarded. This cannot be undone.`),children:[(0,t.jsx)(l.Icons.trash,{}),v?"Destroy":null]})]})}],30544)},95141,e=>{"use strict";var t=e.i(1262),r=e.i(54129),a=e.i(65232),s=e.i(44344);e.s(["Dialog",0,function({onClose:e,className:n,children:o}){return(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e]),(0,t.jsx)("div",{className:"anim-fade fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-[rgba(20,24,30,.42)] p-6 backdrop-blur-[2px]",onClick:e,children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true",className:(0,a.cn)("anim-pop relative m-auto w-full max-w-[500px] rounded-2xl border border-border bg-card shadow-[0_40px_80px_-30px_rgba(20,24,30,.5)]",n),onClick:e=>e.stopPropagation(),children:[o,(0,t.jsx)("button",{className:"absolute right-4 top-4 grid h-7 w-7 cursor-pointer place-items-center rounded-md border-0 bg-transparent text-[#a4a9b0] transition-colors hover:bg-secondary hover:text-foreground",onClick:e,"aria-label":"Close",children:(0,t.jsx)(s.Icons.x,{style:{width:15,height:15}})})]})})},"DialogBody",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("px-5 py-4",e),...r})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("mt-1 font-mono text-xs text-muted-foreground",e),...r})},"DialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("flex justify-end gap-2.5 rounded-b-2xl border-t border-border/70 bg-background px-5 py-3.5",e),...r})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("flex items-start gap-3 border-b border-border/70 px-5 pb-4 pt-5",e),...r})},"DialogIcon",0,function({children:e}){return(0,t.jsx)("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-lg border border-[var(--green-line)] bg-accent text-primary [&_svg]:size-[17px]",children:e})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("text-base font-semibold leading-tight tracking-tight",e),...r})}])},49604,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Select",0,function({wrapperClassName:e,className:a,children:s,...n}){return(0,t.jsxs)("span",{className:(0,r.cn)("relative inline-flex",e),children:[(0,t.jsx)("select",{className:(0,r.cn)("h-9 w-full cursor-pointer appearance-none rounded-lg border border-input bg-card py-1 pl-3 pr-9 text-[13px] shadow-sm focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",a),...n,children:s}),(0,t.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:(0,t.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}])},80922,35594,e=>{"use strict";var t=e.i(1262),r=e.i(51096),a=e.i(44344);e.s(["BackLink",0,function({to:e,children:s}){return(0,t.jsxs)(r.default,{className:"mb-3.5 inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-mono text-xs text-muted-foreground hover:text-primary",href:e,children:[(0,t.jsx)(a.Icons.arrowL,{className:"size-[13px]"}),s]})}],80922);var s=e.i(65232),n=e.i(8536);e.s(["Stat",0,function({k:e,v:r,mono:a,icon:n}){return(0,t.jsxs)("div",{className:"px-4.5 p-4",children:[(0,t.jsx)("div",{className:"mb-1.5 font-mono text-[10.5px] uppercase tracking-[.06em] text-[#a4a9b0]",children:e}),(0,t.jsxs)("div",{className:(0,s.cn)("flex items-center gap-2 font-semibold tracking-[-0.01em]",a?"font-mono text-sm font-medium":"text-base"),children:[n?(0,t.jsx)(n,{className:"size-[15px] text-muted-foreground"}):null,r]})]})},"StatGrid",0,function({children:e}){return(0,t.jsx)(n.Card,{className:"grid grid-cols-[repeat(auto-fit,minmax(140px,1fr))] divide-x divide-border/60 overflow-hidden",children:e})}],35594)},8536,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Card",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("rounded-xl border border-border bg-card text-card-foreground",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("p-5 pt-0",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("text-[12.5px] text-muted-foreground",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1 p-5",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("text-[15px] font-semibold leading-none tracking-tight",e),...a})}])},3060,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Input",0,function({className:e,...a}){return(0,t.jsx)("input",{className:(0,r.cn)("flex h-10 w-full rounded-lg border border-input bg-card px-3 py-1 text-sm shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...a})}])},86184,e=>{"use strict";var t=e.i(1262),r=e.i(54129),a=e.i(69377),s=e.i(3060);function n({jobId:e,login:o}){let[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[u,x]=(0,r.useState)(null),m="exchanging"===o.phase,b=async()=>{let t=i.trim();if(t&&!c){d(!0),x(null);try{let r=await fetch(`/api/v1/jobs/${encodeURIComponent(e)}/login-code`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({code:t})});if(!r.ok){let e=await r.json().catch(()=>null);x(e?.error?.message??`request failed (${r.status})`);return}l("")}catch(e){x(e instanceof Error?e.message:String(e))}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 p-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-amber-200",children:"Claude login required"}),(0,t.jsx)("p",{className:"text-xs text-amber-100/80",children:"Your saved Claude login is expired. Open the sign-in page, approve access, then paste the code Claude shows you."}),o.url?(0,t.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",className:"w-fit rounded-md bg-amber-500/20 px-2.5 py-1 text-xs font-medium text-amber-100 underline decoration-amber-400/50 underline-offset-2 hover:bg-amber-500/30",children:"Open Claude sign-in ↗"}):(0,t.jsx)("span",{className:"text-xs text-amber-100/60",children:"waiting for the sign-in link…"}),(0,t.jsxs)("div",{className:"mt-1 flex gap-2",children:[(0,t.jsx)(s.Input,{value:i,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"Paste approval code",disabled:m,className:"flex-1 font-mono text-xs"}),(0,t.jsx)(a.Button,{type:"button",onClick:()=>void b(),disabled:!i.trim()||c||m,children:m?"Verifying…":c?"Submitting…":"Submit"})]}),o.lastError?(0,t.jsx)("p",{className:"text-xs text-amber-300",children:o.lastError}):null,"error"===o.phase&&o.error?(0,t.jsx)("p",{className:"text-xs text-red-400",children:o.error}):null,u?(0,t.jsx)("p",{className:"text-xs text-red-400",children:u}):null]})}e.s(["JobLogStream",0,function({jobId:e,endpoint:a,onDone:s,onStatus:o,onLogin:i}){let[l,c]=(0,r.useState)([]),[d,u]=(0,r.useState)(null),x=(0,r.useRef)(null),m=(0,r.useRef)(s);m.current=s;let b=(0,r.useRef)(o);b.current=o;let p=(0,r.useRef)(i);return p.current=i,(0,r.useEffect)(()=>{b.current?.("streaming");let t=new EventSource(a??`/api/jobs/${encodeURIComponent(e)}/logs`);return t.addEventListener("log",e=>{let t=JSON.parse(e.data);c(e=>[...e,t])}),t.addEventListener("login",e=>{let t=JSON.parse(e.data);u(t),p.current?.(t)}),t.addEventListener("end",e=>{let r=JSON.parse(e.data);b.current?.(r.status),m.current?.(r.status),t.close()}),()=>t.close()},[e,a]),(0,r.useEffect)(()=>{let e=x.current;e&&(e.scrollTop=e.scrollHeight)},[l]),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d&&"done"!==d.phase?(0,t.jsx)(n,{jobId:e,login:d}):null,(0,t.jsx)("pre",{ref:x,className:"max-h-[440px] min-h-[220px] overflow-auto whitespace-pre rounded-lg bg-[#16181c] p-3 font-mono text-[11.5px] leading-relaxed text-[#d6d9de]",children:0===l.length?"starting…":l.join("\n")})]})}])},33789,1485,e=>{"use strict";var t=e.i(1262),r=e.i(54129);e.s(["Ago",0,function({ms:e}){let[a,s]=(0,r.useState)(!1);return(0,r.useEffect)(()=>s(!0),[]),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:a?function(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return t+"s ago";let r=Math.floor(t/60);if(r<60)return r+"m ago";let a=Math.floor(r/60);return a<24?a+"h ago":Math.floor(a/24)+"d ago"}(e):new Date(e).toLocaleDateString()})}],33789),e.s(["SectionLabel",0,function({children:e,right:r}){return(0,t.jsxs)("div",{className:"mb-3 mt-8 flex items-center gap-2.5 font-mono text-[11px] uppercase tracking-[.1em] text-[#a4a9b0]",children:[e,(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),r??null]})}],1485)},9383,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=e.r(57855),o=e.r(61414),i=e.r(97615)},31758,e=>{"use strict";var t=e.i(1262),r=e.i(44344);e.s(["EmptyBox",0,function({children:e}){return(0,t.jsxs)("div",{className:"rounded-xl border border-dashed border-border bg-card px-5 py-9 text-center text-[13.5px] text-muted-foreground",children:[(0,t.jsx)("div",{className:"mx-auto mb-3 grid h-10 w-10 place-items-center rounded-lg border border-border text-[#a4a9b0]",children:(0,t.jsx)(r.Icons.box,{className:"size-5"})}),e]})}])},23878,e=>{"use strict";var t=e.i(1262),r=e.i(65232);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{className:(0,r.cn)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{className:(0,r.cn)("px-4 py-3 align-middle",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{className:(0,r.cn)("h-9 px-4 text-left align-middle font-mono text-[10.5px] font-normal uppercase tracking-[.08em] text-muted-foreground/90",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{className:(0,r.cn)("bg-background [&_tr]:border-b [&_tr]:border-border",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{className:(0,r.cn)("border-b border-border/60 transition-colors hover:bg-[#fcfcfb] data-[state=selected]:bg-accent",e),...a})}])},22983,93268,66818,e=>{"use strict";var t=e.i(1262),r=e.i(45971),a=e.i(33789),s=e.i(44344),n=e.i(86892),o=e.i(8536),i=e.i(23878),l=e.i(30544);e.s(["BoxTable",0,function({boxes:e}){let c=(0,r.useRouter)();return(0,t.jsx)(o.Card,{className:"overflow-hidden",children:(0,t.jsxs)(i.Table,{children:[(0,t.jsx)(i.TableHeader,{children:(0,t.jsxs)(i.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(i.TableHead,{className:"w-[38%]",children:"Task"}),(0,t.jsx)(i.TableHead,{className:"w-[27%] max-md:hidden",children:"Branch"}),(0,t.jsx)(i.TableHead,{className:"max-md:hidden",children:"Status"}),(0,t.jsx)(i.TableHead,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(i.TableBody,{children:e.map(e=>(0,t.jsxs)(i.TableRow,{className:"cursor-pointer",onClick:()=>c.push("/boxes/"+e.id),children:[(0,t.jsxs)(i.TableCell,{children:[(0,t.jsx)("div",{className:"truncate text-[13.5px] font-medium",children:e.task}),(0,t.jsxs)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:[e.id," · ",e.host]})]}),(0,t.jsxs)(i.TableCell,{className:"max-md:hidden",children:[(0,t.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1.5 font-mono text-xs text-secondary-foreground",children:[(0,t.jsx)(s.Icons.branch,{className:"size-3 flex-none text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:e.branch})]}),(0,t.jsxs)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:[e.agent," · ",(0,t.jsx)(a.Ago,{ms:e.lastActivity})]})]}),(0,t.jsx)(i.TableCell,{className:"max-md:hidden",children:(0,t.jsx)(n.StatusBadge,{status:e.status})}),(0,t.jsx)(i.TableCell,{className:"text-right",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(l.BoxActions,{box:e})})]},e.id))})]})})}],22983);var c=e.i(54129),d=e.i(64595),u=e.i(69377),x=e.i(95141),m=e.i(3060),b=e.i(49604),p=e.i(65232);function h({className:e,...r}){return(0,t.jsx)("textarea",{className:(0,p.cn)("flex min-h-[76px] w-full resize-y rounded-lg border border-input bg-card px-3 py-2 text-sm leading-normal shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...r})}var f=e.i(9383);let g=(0,f.createServerReference)("4070192706087364b8c7d220576a6f3e4d3e5c532b",f.callServer,void 0,f.findSourceMapURL,"createBoxAction"),j=(0,f.createServerReference)("40386bdce4d894a318a969412fa1299d2704ccdfb3",f.callServer,void 0,f.findSourceMapURL,"listBranchesAction");var v=e.i(96621),N=e.i(86184);let S=[{id:"docker",label:"Docker (local)",configured:!0}];function y({project:e,projects:a,onClose:n}){let o=(0,r.useRouter)(),{state:i}=(0,v.useStore)(),l=i.providers.length?i.providers:S,[d,f]=(0,c.useTransition)(),[C,B]=(0,c.useState)(e?.id??a[0]?.id??""),[R,T]=(0,c.useState)("claude"),[I,D]=(0,c.useState)("docker"),[L,A]=(0,c.useState)(""),[P,E]=(0,c.useState)(""),[z,U]=(0,c.useState)(""),[H,M]=(0,c.useState)(null),[O,$]=(0,c.useState)(!1),[F,_]=(0,c.useState)(!1),[J,W]=(0,c.useState)(null),[q,K]=(0,c.useState)(null),[G,V]=(0,c.useState)("streaming"),[Y,Q]=(0,c.useState)(null),[X,Z]=(0,c.useState)(null),[ee,et]=(0,c.useState)(!1),[er,ea]=(0,c.useState)(null);(0,c.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/v1/providers?freshness=1",{credentials:"same-origin"});if(!t.ok)return;let r=await t.json();if(e)return;let a={};for(let e of r.providers??[])a[e.id]={baseStatus:e.baseStatus,baseStaleReason:e.baseStaleReason,jobId:e.jobId};ea(a)}catch{}})(),()=>{e=!0}},[]);let es=a.find(e=>e.id===C)??e,en=I??"docker",eo=l.find(e=>e.id===en),ei=er?.[en],el=!!ei&&(!!ei.jobId||"unprepared"===ei.baseStatus||"stale"===ei.baseStatus);(0,c.useEffect)(()=>{if(!C||q)return;$(es?.needsSetup??!1),D("docker");let e=!1;return M(null),U(es?.currentBranch??""),j(C).then(t=>{if(e||!t.ok){e||t.ok||M([]);return}M(t.branches),t.current&&t.branches.includes(t.current)&&U(t.current)}),()=>{e=!0}},[C,q]);let ec=()=>{W(null);let e=ei?.jobId;e?Z(e):f(async()=>{try{let e=await fetch(`/api/v1/providers/${encodeURIComponent(en)}/prepare`,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({})}),t=await e.json().catch(()=>null);if(!e.ok||!t?.jobId)return void W(t?.error?.message??`base image build request failed (${e.status})`);Z(t.jobId)}catch(e){W(e instanceof Error?e.message:String(e))}})},ed=()=>{W(null),f(async()=>{let e=await g({projectId:C,agent:R,provider:I,name:L.trim()||void 0,prompt:"none"===R?void 0:P.trim()||void 0,fromBranch:z.trim()&&z.trim()!==es?.currentBranch?z.trim():void 0,setupWizard:"none"!==R&&O});e.ok?(K(e.jobId),o.refresh()):W(e.error)})};return(0,t.jsxs)(x.Dialog,{onClose:n,className:q||X?"max-w-[900px]":"max-w-[560px]",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogIcon,{children:(0,t.jsx)(s.Icons.box,{})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.DialogTitle,{children:!q&&X?"Building base image":"Create box"}),(0,t.jsx)(x.DialogDescription,{children:es?es.name:"Start a box in a project"})]}),q||X?(0,t.jsx)("div",{className:"ml-auto mr-8 flex-none pt-0.5",children:(0,t.jsx)(w,{status:G,loginPhase:Y})}):null]}),(0,t.jsx)(x.DialogBody,{className:"flex flex-col gap-4",children:q?(0,t.jsx)(N.JobLogStream,{jobId:q,onStatus:V,onDone:()=>o.refresh(),onLogin:e=>Q(e?.phase??null)}):X?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"font-mono text-xs text-muted-foreground",children:["Building the ",eo?.label??en," base image — one-time, can take several minutes. The box is created automatically when it finishes."]}),(0,t.jsx)(N.JobLogStream,{jobId:X,onStatus:V,onDone:e=>{"done"===e?ed():W(`base image build ${e}`)}}),J?(0,t.jsx)("div",{className:"font-mono text-xs text-destructive",children:J}):null]}):(0,t.jsxs)(t.Fragment,{children:[e?null:(0,t.jsx)(k,{label:"Project",children:(0,t.jsxs)(b.Select,{value:C,onChange:e=>B(e.target.value),children:[0===a.length?(0,t.jsx)("option",{value:"",children:"No projects — add one first"}):null,a.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})}),(0,t.jsx)(k,{label:"Provider",children:(0,t.jsx)(b.Select,{value:I,onChange:e=>D(e.target.value),children:l.map(e=>(0,t.jsxs)("option",{value:e.id,disabled:!e.configured,title:e.reason,children:[e.label,e.configured?"":" — not configured"]},e.id))})}),el?(0,t.jsx)("p",{className:"-mt-2 font-mono text-xs text-amber-600 dark:text-amber-400",title:ei?.baseStaleReason,children:ei?.jobId?"A base-image build is already running — the box will be created when it finishes.":ei?.baseStatus==="unprepared"?"First use of this provider: the base image will be downloaded or built first (can take 5–10 minutes).":"The base image is out of date and will be rebuilt first (can take 5–10 minutes)."}):null,(0,t.jsx)(k,{label:"Agent",children:(0,t.jsxs)(b.Select,{value:R,onChange:e=>T(e.target.value),children:[(0,t.jsx)("option",{value:"claude",children:"Claude"}),(0,t.jsx)("option",{value:"codex",children:"Codex"}),(0,t.jsx)("option",{value:"opencode",children:"OpenCode"}),(0,t.jsx)("option",{value:"none",children:"Empty — just create the box"})]})}),(0,t.jsx)(k,{label:"Name (optional)",children:(0,t.jsx)(m.Input,{value:L,onChange:e=>A(e.target.value),placeholder:"auto"})}),es?.needsSetup&&"none"!==R?(0,t.jsxs)("label",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:O,onChange:e=>$(e.target.checked),className:"mt-0.5 h-4 w-4 flex-none accent-primary"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-secondary-foreground",children:"Run setup wizard"}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"This project has no agentbox.yaml — the agent explores the repo and proposes one on its first turn."})]})]}):null,"none"===R?(0,t.jsxs)("p",{className:"font-mono text-xs text-muted-foreground",children:["The box is created and left running with no agent — attach later from a terminal or SSH (",(0,t.jsx)("span",{className:"text-secondary-foreground",children:"agentbox shell"}),")."]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>_(e=>!e),className:"flex cursor-pointer items-center gap-1.5 self-start text-xs font-medium text-secondary-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(s.Icons.chevR,{className:(0,p.cn)("size-3.5 transition-transform",F&&"rotate-90")}),"Advanced"]}),F?(0,t.jsxs)(t.Fragment,{children:[null===H?(0,t.jsx)(k,{label:"Base branch",children:(0,t.jsx)(b.Select,{value:"",disabled:!0,children:(0,t.jsx)("option",{value:"",children:"Loading branches…"})})}):H.length>0?(0,t.jsx)(k,{label:"Base branch",children:(0,t.jsxs)(b.Select,{value:z,onChange:e=>U(e.target.value),children:[es?.currentBranch&&!H.includes(es.currentBranch)?(0,t.jsxs)("option",{value:"",children:[es.currentBranch," (current)"]}):null,H.map(e=>(0,t.jsxs)("option",{value:e,children:[e,e===es?.currentBranch?" (current)":""]},e))]})}):null,"none"!==R?(0,t.jsx)(k,{label:"Initial prompt (optional)",children:(0,t.jsx)(h,{value:P,onChange:e=>E(e.target.value),rows:3,placeholder:"Leave empty to just start the agent — attach later from a terminal or SSH."})}):null]}):null]}),J?(0,t.jsx)("div",{className:"font-mono text-xs text-destructive",children:J}):null]})}),(0,t.jsx)(x.DialogFooter,{children:q||X?(0,t.jsxs)(t.Fragment,{children:["streaming"===G?(0,t.jsx)("span",{className:"mr-auto self-center font-mono text-xs text-muted-foreground",children:q?"The box + agent start in the background — you can close this.":"Keep this open — the box is created when the build finishes."}):null,(0,t.jsx)(u.Button,{onClick:n,children:"Close"})]}):ee?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"mr-auto self-center font-mono text-xs text-muted-foreground",title:ei?.baseStaleReason,children:["The ",eo?.label??en," base image is out of date."]}),(0,t.jsx)(u.Button,{variant:"outline",onClick:()=>et(!1),disabled:d,children:"Cancel"}),(0,t.jsx)(u.Button,{variant:"outline",onClick:()=>{et(!1),ed()},disabled:d,children:"Use existing image"}),(0,t.jsx)(u.Button,{onClick:()=>{et(!1),ec()},disabled:d,children:"Rebuild & create"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Button,{variant:"outline",onClick:n,disabled:d,children:"Cancel"}),(0,t.jsx)(u.Button,{onClick:()=>{(W(null),C)?el?"docker"===en||ei?.baseStatus!=="stale"||ei.jobId?ec():et(!0):ed():W("pick a project")},disabled:d||!C,children:d?"Starting…":"Create box"})]})})]})}function w({status:e,loginPhase:r}){return"done"===e?(0,t.jsxs)(d.Badge,{className:"badge-run",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Done"]}):"failed"===e||"error"===e||"cancelled"===e?(0,t.jsxs)(d.Badge,{className:"badge-err",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Failed"]}):"error"===r?(0,t.jsxs)(d.Badge,{className:"badge-err",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Login failed"]}):"awaiting-code"===r||"starting"===r||"exchanging"===r?(0,t.jsxs)(d.Badge,{className:"badge-create",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Login required"]}):(0,t.jsxs)(d.Badge,{className:"badge-create",children:[(0,t.jsx)("span",{className:"badge-dot"}),"Working…"]})}function k({label:e,children:r}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-secondary-foreground",children:e}),r]})}e.s(["CreateBoxButton",0,function({project:e,projects:r,variant:a,size:n,className:o}){let[i,l]=(0,c.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.Button,{variant:a,size:n,className:o,onClick:()=>l(!0),children:[(0,t.jsx)(s.Icons.plus,{}),"Create box"]}),i?(0,t.jsx)(y,{project:e,projects:r??(e?[e]:[]),onClose:()=>l(!1)}):null]})}],93268);let C=(0,f.createServerReference)("40c7856bd78dddab224344045df78d51620e411335",f.callServer,void 0,f.findSourceMapURL,"removeProjectAction");e.s(["DeleteProjectButton",0,function({project:e,size:a,className:n,redirectHome:o}){let i=(0,r.useRouter)(),[l,d]=(0,c.useTransition)();return(0,t.jsxs)(u.Button,{variant:"destructive",size:a,className:n,title:"Delete project",disabled:l,onClick:t=>{t.stopPropagation(),t.preventDefault(),window.confirm(`Remove project "${e.name}" from the hub? Its folder and files are NOT deleted — this only unregisters it (and any hub-set project settings). This cannot be undone.`)&&d(async()=>{let t=await C(e.id);t.ok?o?i.push("/"):i.refresh():window.alert(`Delete failed: ${t.error}`)})},children:[(0,t.jsx)(s.Icons.trash,{}),"Delete"]})}],66818)},86691,e=>{"use strict";var t=e.i(1262),r=e.i(45971),a=e.i(33789),s=e.i(44344),n=e.i(96621),o=e.i(80922),i=e.i(22983),l=e.i(93268),c=e.i(66818),d=e.i(31758),u=e.i(1485),x=e.i(35594);e.s(["default",0,function(){let{id:e}=(0,r.useParams)(),{project:m,boxesFor:b}=(0,n.useStore)(),p=m(e);if(!p)return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8",children:[(0,t.jsx)(o.BackLink,{to:"/",children:"Dashboard"}),(0,t.jsx)(d.EmptyBox,{children:"Project not found."})]});let h=b(e),f=h.filter(e=>"running"===e.status).length;return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8 max-sm:px-4",children:[(0,t.jsx)(o.BackLink,{to:"/",children:"All projects"}),(0,t.jsxs)("div",{className:"flex items-start gap-4 max-md:flex-col",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("h1",{className:"flex items-center gap-3 text-[25px] font-semibold leading-tight tracking-[-0.025em]",children:[(0,t.jsx)("span",{className:"grid h-[26px] w-[26px] flex-none place-items-center rounded-md border border-[var(--green-line)] bg-accent text-primary",children:(0,t.jsx)(s.Icons.folder,{className:"size-[15px]"})}),p.name]}),(0,t.jsxs)("div",{className:"mt-1.5 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono text-secondary-foreground",children:p.repo})," · ",p.provider]})]}),(0,t.jsxs)("div",{className:"ml-auto flex flex-none gap-2 max-md:ml-0",children:[(0,t.jsx)(l.CreateBoxButton,{project:p}),0===h.length?(0,t.jsx)(c.DeleteProjectButton,{project:p,redirectHome:!0}):null]})]}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsxs)(x.StatGrid,{children:[(0,t.jsx)(x.Stat,{k:"Boxes",v:h.length,icon:s.Icons.box}),(0,t.jsx)(x.Stat,{k:"Running",v:f,icon:s.Icons.activity}),(0,t.jsx)(x.Stat,{k:"Provider",v:p.provider,mono:!0}),(0,t.jsx)(x.Stat,{k:"Created",v:(0,t.jsx)(a.Ago,{ms:p.createdAt}),mono:!0})]})}),(0,t.jsx)(u.SectionLabel,{children:"Boxes"}),h.length?(0,t.jsx)(i.BoxTable,{boxes:h}):(0,t.jsx)(d.EmptyBox,{children:(0,t.jsx)("div",{children:"No boxes yet."})})]})}])}]);
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
syncAgentboxSshConfig,
|
|
66
66
|
trustWorkspace,
|
|
67
67
|
upstreamRef
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
69
69
|
import {
|
|
70
70
|
execa
|
|
71
71
|
} from "./chunk-EFW34I43.js";
|
|
@@ -12582,6 +12582,7 @@ export {
|
|
|
12582
12582
|
enqueueQueueJob,
|
|
12583
12583
|
enqueuePrepareJob,
|
|
12584
12584
|
readJob,
|
|
12585
|
+
deleteJob,
|
|
12585
12586
|
loadQueue,
|
|
12586
12587
|
writeQueueLoginCode,
|
|
12587
12588
|
startRelayDaemon,
|
|
@@ -2813,6 +2813,7 @@ async function findBrokenSymlinks(root) {
|
|
|
2813
2813
|
async function mkStageDir(prefix) {
|
|
2814
2814
|
return mkdtemp4(join14(tmpdir4(), `agentbox-${prefix}-stage-`));
|
|
2815
2815
|
}
|
|
2816
|
+
var STAGE_WRITABLE_CHMOD = "--chmod=Du+rwx,Fu+rw";
|
|
2816
2817
|
function emptyResult(warnings = []) {
|
|
2817
2818
|
return { tarballPath: null, cleanup: async () => {
|
|
2818
2819
|
}, warnings };
|
|
@@ -2921,6 +2922,7 @@ async function stageClaudeStaticForUpload(opts = {}) {
|
|
|
2921
2922
|
];
|
|
2922
2923
|
await execa("rsync", [
|
|
2923
2924
|
"-a",
|
|
2925
|
+
STAGE_WRITABLE_CHMOD,
|
|
2924
2926
|
"--copy-unsafe-links",
|
|
2925
2927
|
...excludes,
|
|
2926
2928
|
`${hostClaude}/`,
|
|
@@ -2992,6 +2994,7 @@ async function stageCodexStaticForUpload(opts = {}) {
|
|
|
2992
2994
|
const codexBroken = await findBrokenSymlinks(hostCodex);
|
|
2993
2995
|
await execa("rsync", [
|
|
2994
2996
|
"-a",
|
|
2997
|
+
STAGE_WRITABLE_CHMOD,
|
|
2995
2998
|
"-L",
|
|
2996
2999
|
...codexBroken.map((r) => `--exclude=/${r}`),
|
|
2997
3000
|
...CODEX_STATIC_EXCLUDES.map((p) => `--exclude=${p}`),
|
|
@@ -3021,6 +3024,7 @@ async function stageAgentsStaticForUpload(opts = {}) {
|
|
|
3021
3024
|
const broken = await findBrokenSymlinks(hostAgents);
|
|
3022
3025
|
await execa("rsync", [
|
|
3023
3026
|
"-a",
|
|
3027
|
+
STAGE_WRITABLE_CHMOD,
|
|
3024
3028
|
"-L",
|
|
3025
3029
|
...broken.map((r) => `--exclude=/${r}`),
|
|
3026
3030
|
`${hostAgents}/`,
|
|
@@ -3063,6 +3067,7 @@ async function stageOpencodeStaticForUpload(opts = {}) {
|
|
|
3063
3067
|
const dataBroken = await findBrokenSymlinks(hostData);
|
|
3064
3068
|
await execa("rsync", [
|
|
3065
3069
|
"-a",
|
|
3070
|
+
STAGE_WRITABLE_CHMOD,
|
|
3066
3071
|
"-L",
|
|
3067
3072
|
...dataBroken.map((r) => `--exclude=/${r}`),
|
|
3068
3073
|
...OPENCODE_DATA_EXCLUDES.map((p) => `--exclude=${p}`),
|
|
@@ -3075,6 +3080,7 @@ async function stageOpencodeStaticForUpload(opts = {}) {
|
|
|
3075
3080
|
const cfgBroken = await findBrokenSymlinks(hostConfig);
|
|
3076
3081
|
await execa("rsync", [
|
|
3077
3082
|
"-a",
|
|
3083
|
+
STAGE_WRITABLE_CHMOD,
|
|
3078
3084
|
"-L",
|
|
3079
3085
|
...cfgBroken.map((r) => `--exclude=/${r}`),
|
|
3080
3086
|
`${hostConfig}/`,
|
|
@@ -3350,7 +3356,7 @@ async function buildImage(opts = {}) {
|
|
|
3350
3356
|
return ref;
|
|
3351
3357
|
}
|
|
3352
3358
|
async function pullOrBuild(ref, fingerprint, opts = {}) {
|
|
3353
|
-
const { writePreparedDockerState: writePreparedDockerState2 } = await import("./prepared-state-BUO75YLZ-
|
|
3359
|
+
const { writePreparedDockerState: writePreparedDockerState2 } = await import("./prepared-state-BUO75YLZ-UICXTY25.js");
|
|
3354
3360
|
const registry = opts.registry ?? BOX_IMAGE_REGISTRY;
|
|
3355
3361
|
const allowPull = opts.allowPull !== false;
|
|
3356
3362
|
if (allowPull && registry && fingerprint) {
|
|
@@ -3377,7 +3383,7 @@ async function pullOrBuild(ref, fingerprint, opts = {}) {
|
|
|
3377
3383
|
return { source: "built" };
|
|
3378
3384
|
}
|
|
3379
3385
|
async function ensureImage(ref = DEFAULT_BOX_IMAGE, opts = {}) {
|
|
3380
|
-
const { computeDockerContextFingerprint: computeDockerContextFingerprint2, readPreparedDockerState: readPreparedDockerState2, preparedMatches: preparedMatches2 } = await import("./prepared-state-BUO75YLZ-
|
|
3386
|
+
const { computeDockerContextFingerprint: computeDockerContextFingerprint2, readPreparedDockerState: readPreparedDockerState2, preparedMatches: preparedMatches2 } = await import("./prepared-state-BUO75YLZ-UICXTY25.js");
|
|
3381
3387
|
const claudeInstall = opts.claudeInstall ?? await resolveClaudeInstallMode();
|
|
3382
3388
|
const rawFingerprint = await computeDockerContextFingerprint2({
|
|
3383
3389
|
contextDir: opts.contextDir
|
|
@@ -3427,7 +3433,7 @@ function classifyDockerBaseFreshness(input) {
|
|
|
3427
3433
|
return { state: "fresh" };
|
|
3428
3434
|
}
|
|
3429
3435
|
async function evaluateDockerBaseFreshness(opts = {}) {
|
|
3430
|
-
const { computeDockerContextFingerprint: computeDockerContextFingerprint2, readPreparedDockerState: readPreparedDockerState2 } = await import("./prepared-state-BUO75YLZ-
|
|
3436
|
+
const { computeDockerContextFingerprint: computeDockerContextFingerprint2, readPreparedDockerState: readPreparedDockerState2 } = await import("./prepared-state-BUO75YLZ-UICXTY25.js");
|
|
3431
3437
|
const ref = opts.ref ?? DEFAULT_BOX_IMAGE;
|
|
3432
3438
|
const imagePresent = await imageExists(ref);
|
|
3433
3439
|
if (!imagePresent) return { state: "unprepared" };
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
readBoxStatus,
|
|
23
23
|
registerBoxWithRelay,
|
|
24
24
|
syncClaudeCredentials
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-7M6FXZIO.js";
|
|
26
26
|
import {
|
|
27
27
|
BOX_DYNAMIC_SYNC_MANIFEST,
|
|
28
28
|
BOX_HOME,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
stageOpencodeCredentialsForUpload,
|
|
62
62
|
stageOpencodeStateForUpload,
|
|
63
63
|
stageOpencodeStaticForUpload
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
65
65
|
import {
|
|
66
66
|
execa
|
|
67
67
|
} from "./chunk-EFW34I43.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
} from "./chunk-OF242BLD.js";
|
|
13
13
|
import {
|
|
14
14
|
createCloudProvider
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z7ZAL24C.js";
|
|
16
16
|
import {
|
|
17
17
|
detectPortless,
|
|
18
18
|
portlessDoctorRow
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7M6FXZIO.js";
|
|
20
20
|
import "./chunk-3LAHFDJF.js";
|
|
21
21
|
import {
|
|
22
22
|
UserFacingError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
stageOpencodeStaticForUpload,
|
|
35
35
|
writeManagedSecrets,
|
|
36
36
|
writePreparedStateRaw
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
38
38
|
import {
|
|
39
39
|
execa
|
|
40
40
|
} from "./chunk-EFW34I43.js";
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
vscodeServerVolumeName,
|
|
224
224
|
waitForTmuxPaneContent,
|
|
225
225
|
warmUpClaudeCredentials
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-7M6FXZIO.js";
|
|
227
227
|
import "./chunk-3LAHFDJF.js";
|
|
228
228
|
import {
|
|
229
229
|
AmbiguousBoxError,
|
|
@@ -272,7 +272,7 @@ import {
|
|
|
272
272
|
stageDynamicSyncTarball,
|
|
273
273
|
tagImage,
|
|
274
274
|
writePreparedDockerState
|
|
275
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
276
276
|
import "./chunk-EFW34I43.js";
|
|
277
277
|
import "./chunk-EXQCBM5Q.js";
|
|
278
278
|
import "./chunk-TZFWAJVB.js";
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
renderInnerCommand,
|
|
22
22
|
resolveCloudCheckpoint,
|
|
23
23
|
writeCloudCheckpointManifest
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-Z7ZAL24C.js";
|
|
25
|
+
import "./chunk-7M6FXZIO.js";
|
|
26
26
|
import "./chunk-3LAHFDJF.js";
|
|
27
27
|
import {
|
|
28
28
|
UserFacingError,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
stageOpencodeStaticForUpload,
|
|
40
40
|
writeManagedSecrets,
|
|
41
41
|
writePreparedStateRaw
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
43
43
|
import {
|
|
44
44
|
execa
|
|
45
45
|
} from "./chunk-EFW34I43.js";
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from "./chunk-OF242BLD.js";
|
|
14
14
|
import {
|
|
15
15
|
createCloudProvider
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-Z7ZAL24C.js";
|
|
17
|
+
import "./chunk-7M6FXZIO.js";
|
|
18
18
|
import "./chunk-3LAHFDJF.js";
|
|
19
19
|
import {
|
|
20
20
|
DOCKER_CONTEXT_FILE_MAP,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
stageAllAgentStatic,
|
|
29
29
|
writeManagedSecrets,
|
|
30
30
|
writePreparedStateRaw
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
32
32
|
import "./chunk-EFW34I43.js";
|
|
33
33
|
import "./chunk-EXQCBM5Q.js";
|
|
34
34
|
import "./chunk-TZFWAJVB.js";
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
renderInnerCommand,
|
|
19
19
|
resolveCloudCheckpoint,
|
|
20
20
|
writeCloudCheckpointManifest
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-Z7ZAL24C.js";
|
|
22
|
+
import "./chunk-7M6FXZIO.js";
|
|
23
23
|
import "./chunk-3LAHFDJF.js";
|
|
24
24
|
import {
|
|
25
25
|
UserFacingError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
stageAllAgentStatic,
|
|
35
35
|
writeManagedSecrets,
|
|
36
36
|
writePreparedStateRaw
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
38
38
|
import "./chunk-EFW34I43.js";
|
|
39
39
|
import "./chunk-EXQCBM5Q.js";
|
|
40
40
|
import "./chunk-TZFWAJVB.js";
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
baseFreshnessFromFingerprints,
|
|
7
7
|
currentCloudBaseFingerprint,
|
|
8
8
|
openWebAppOnVncScreen
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z7ZAL24C.js";
|
|
10
10
|
import {
|
|
11
|
+
deleteJob,
|
|
11
12
|
enqueuePrepareJob,
|
|
12
13
|
enqueueQueueJob,
|
|
13
14
|
ensureBoxBrowserShowingApp,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
readJob,
|
|
20
21
|
startRelayDaemon,
|
|
21
22
|
writeQueueLoginCode
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7M6FXZIO.js";
|
|
23
24
|
import "./chunk-3LAHFDJF.js";
|
|
24
25
|
import {
|
|
25
26
|
BOX_WORKSPACE,
|
|
@@ -38,7 +39,7 @@ import {
|
|
|
38
39
|
secretsEnvPath,
|
|
39
40
|
setBoxDisplayName,
|
|
40
41
|
syncAgentboxSshConfig
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FSEPYTQ6.js";
|
|
42
43
|
import "./chunk-EFW34I43.js";
|
|
43
44
|
import {
|
|
44
45
|
PROVIDER_NAMES,
|
|
@@ -69,11 +70,11 @@ import { promisify } from "node:util";
|
|
|
69
70
|
var execFileAsync = promisify(execFile);
|
|
70
71
|
var DISPLAY_NAME_MAX = 60;
|
|
71
72
|
var IMPORTERS = {
|
|
72
|
-
docker: () => import("./dist-
|
|
73
|
-
daytona: () => import("./dist-
|
|
74
|
-
hetzner: () => import("./dist-
|
|
75
|
-
vercel: () => import("./dist-
|
|
76
|
-
e2b: () => import("./dist-
|
|
73
|
+
docker: () => import("./dist-GGWYKXJE.js"),
|
|
74
|
+
daytona: () => import("./dist-QIXUPGPP.js"),
|
|
75
|
+
hetzner: () => import("./dist-EKQHCXWE.js"),
|
|
76
|
+
vercel: () => import("./dist-JGZ55OIJ.js"),
|
|
77
|
+
e2b: () => import("./dist-V4TJ44MT.js")
|
|
77
78
|
};
|
|
78
79
|
var prepareEnqueueChain = /* @__PURE__ */ new Map();
|
|
79
80
|
async function providerForBox(box) {
|
|
@@ -339,7 +340,7 @@ var freshnessCache = /* @__PURE__ */ new Map();
|
|
|
339
340
|
async function providerBaseFreshness(id, claudeInstall) {
|
|
340
341
|
if (id === "docker") {
|
|
341
342
|
try {
|
|
342
|
-
const { evaluateDockerBaseFreshness } = await import("./dist-
|
|
343
|
+
const { evaluateDockerBaseFreshness } = await import("./dist-GGWYKXJE.js");
|
|
343
344
|
return await evaluateDockerBaseFreshness({ claudeInstall });
|
|
344
345
|
} catch {
|
|
345
346
|
return { state: "unknown" };
|
|
@@ -675,11 +676,27 @@ function createHubBackend(handle) {
|
|
|
675
676
|
}
|
|
676
677
|
}
|
|
677
678
|
}),
|
|
678
|
-
destroy
|
|
679
|
-
|
|
680
|
-
|
|
679
|
+
async destroy(id) {
|
|
680
|
+
if (id.startsWith("job:")) {
|
|
681
|
+
try {
|
|
682
|
+
const jobId = id.slice("job:".length);
|
|
683
|
+
const job = await readJob(jobId);
|
|
684
|
+
if (!job) return { ok: true };
|
|
685
|
+
if (job.status !== "failed" && job.status !== "cancelled" && job.status !== "done") {
|
|
686
|
+
return { ok: false, error: "box is still being created; dismiss is not available yet" };
|
|
687
|
+
}
|
|
688
|
+
await deleteJob(jobId);
|
|
689
|
+
return { ok: true };
|
|
690
|
+
} catch (err) {
|
|
691
|
+
return { ok: false, error: errMsg(err) };
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return runLifecycle(id, async (box, provider) => {
|
|
695
|
+
await provider.destroy(box);
|
|
696
|
+
await syncAgentboxSshConfig().catch(() => {
|
|
697
|
+
});
|
|
681
698
|
});
|
|
682
|
-
}
|
|
699
|
+
},
|
|
683
700
|
async rename(id, displayName) {
|
|
684
701
|
try {
|
|
685
702
|
if (displayName.trim().length > DISPLAY_NAME_MAX) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33789,1485,e=>{"use strict";var r=e.i(1262),t=e.i(54129);e.s(["Ago",0,function({ms:e}){let[n,a]=(0,t.useState)(!1);return(0,t.useEffect)(()=>a(!0),[]),(0,r.jsx)("span",{suppressHydrationWarning:!0,children:n?function(e){let r=Math.floor((Date.now()-e)/1e3);if(r<60)return r+"s ago";let t=Math.floor(r/60);if(t<60)return t+"m ago";let n=Math.floor(t/60);return n<24?n+"h ago":Math.floor(n/24)+"d ago"}(e):new Date(e).toLocaleDateString()})}],33789),e.s(["SectionLabel",0,function({children:e,right:t}){return(0,r.jsxs)("div",{className:"mb-3 mt-8 flex items-center gap-2.5 font-mono text-[11px] uppercase tracking-[.1em] text-[#a4a9b0]",children:[e,(0,r.jsx)("span",{className:"h-px flex-1 bg-border"}),t??null]})}],1485)},9383,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var a in n)Object.defineProperty(t,a,{enumerable:!0,get:n[a]});let s=e.r(57855),o=e.r(61414),i=e.r(97615)},31758,e=>{"use strict";var r=e.i(1262),t=e.i(44344);e.s(["EmptyBox",0,function({children:e}){return(0,r.jsxs)("div",{className:"rounded-xl border border-dashed border-border bg-card px-5 py-9 text-center text-[13.5px] text-muted-foreground",children:[(0,r.jsx)("div",{className:"mx-auto mb-3 grid h-10 w-10 place-items-center rounded-lg border border-border text-[#a4a9b0]",children:(0,r.jsx)(t.Icons.box,{className:"size-5"})}),e]})}])},88451,e=>{"use strict";var r=e.i(1262),t=e.i(45971),n=e.i(54129),a=e.i(44344),s=e.i(69377),o=e.i(9383);let i=(0,o.createServerReference)("60ff5520393ac26282f15f58e0b073a0c45b3ba7e5",o.callServer,void 0,o.findSourceMapURL,"answerApprovalAction");e.s(["ApprovalActions",0,function({id:e}){let o=(0,t.useRouter)(),[c,l]=(0,n.useTransition)(),d=r=>{l(async()=>{let t=await i(e,r);t.ok||window.alert(`Failed: ${t.error}`),o.refresh()})};return(0,r.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,r.jsxs)(s.Button,{variant:"outline",size:"sm",disabled:c,className:"hover:border-[var(--red-line)] hover:bg-[var(--red-soft)] hover:text-[var(--red)]",onClick:()=>d("n"),children:[(0,r.jsx)(a.Icons.x,{}),"Deny"]}),(0,r.jsxs)(s.Button,{size:"sm",disabled:c,onClick:()=>d("y"),children:[(0,r.jsx)(a.Icons.check,{}),"Approve"]})]})}],88451)},16200,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Label",0,function({className:e,...n}){return(0,r.jsx)("label",{className:(0,t.cn)("mb-2 block text-[13px] font-medium leading-none",e),...n})}])},8536,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Card",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("rounded-xl border border-border bg-card text-card-foreground",e),...n})},"CardContent",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("p-5 pt-0",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("text-[12.5px] text-muted-foreground",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("flex flex-col space-y-1 p-5",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,r.jsx)("div",{className:(0,t.cn)("text-[15px] font-semibold leading-none tracking-tight",e),...n})}])},3060,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Input",0,function({className:e,...n}){return(0,r.jsx)("input",{className:(0,t.cn)("flex h-10 w-full rounded-lg border border-input bg-card px-3 py-1 text-sm shadow-sm transition-[border-color,box-shadow] placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",e),...n})}])},86892,30544,e=>{"use strict";var r=e.i(1262),t=e.i(64595);let n={running:{label:"running",badgeClass:"badge-run"},paused:{label:"paused",badgeClass:"badge-pause"},stopped:{label:"stopped",badgeClass:"badge-stop"},creating:{label:"creating",badgeClass:"badge-create"},error:{label:"error",badgeClass:"badge-err"}};e.s(["StatusBadge",0,function({status:e}){let a=n[e]??n.stopped;return(0,r.jsxs)(t.Badge,{className:a.badgeClass,children:[(0,r.jsx)("span",{className:"badge-dot"}),a.label]})}],86892);var a=e.i(45971),s=e.i(54129),o=e.i(65232),i=e.i(69377),c=e.i(44344),l=e.i(9383);let d=(0,l.createServerReference)("40f10bede8a5e7505d5875574f7e6fc4a06e8e2cb7",l.callServer,void 0,l.findSourceMapURL,"destroyBoxAction"),u=(0,l.createServerReference)("40ea16199b5abb2d3c1d4cecdd25aac1e3c41f074c",l.callServer,void 0,l.findSourceMapURL,"pauseBoxAction"),x=(0,l.createServerReference)("6096bb2a65e369cd77e8b1dc6cd900a5f1e67287bb",l.callServer,void 0,l.findSourceMapURL,"renameBoxAction"),b=(0,l.createServerReference)("4071308a0e1675de302803bb969800c52d79f11e13",l.callServer,void 0,l.findSourceMapURL,"resumeBoxAction"),p=(0,l.createServerReference)("40e545c7dd69b4a1d410deb9c94101099961d3af7a",l.callServer,void 0,l.findSourceMapURL,"stopBoxAction");e.s(["BoxActions",0,function({box:e,size:t}){let n=(0,a.useRouter)(),[l,f]=(0,s.useTransition)(),m="running"===e.status,v="paused"===e.status,g="stopped"===e.status,h="lg"===t,j=h?"sm":"icon-sm",y=(r,t,a)=>{r.stopPropagation(),(!a||window.confirm(a))&&f(async()=>{let r=await t(e.id);r.ok||window.alert(`Action failed: ${r.error}`),n.refresh()})};return(0,r.jsxs)("div",{className:(0,o.cn)("flex gap-1.5",h?"":"justify-end"),children:[v?(0,r.jsxs)(i.Button,{variant:h?"default":"outline",size:j,title:"Resume",disabled:l,className:h?"":"hover:border-[var(--green)] hover:bg-accent hover:text-[var(--green-ink)]",onClick:e=>y(e,b),children:[(0,r.jsx)(c.Icons.play,{}),h?"Resume":null]}):(0,r.jsxs)(i.Button,{variant:"outline",size:j,disabled:l||!m,title:"Pause",className:h?"":"hover:border-[var(--amber)] hover:bg-[var(--amber-soft)] hover:text-[var(--amber)]",onClick:e=>y(e,u),children:[(0,r.jsx)(c.Icons.pause,{}),h?"Pause":null]}),(0,r.jsxs)(i.Button,{variant:"outline",size:j,disabled:l||g,title:"Stop",onClick:e=>y(e,p),children:[(0,r.jsx)(c.Icons.stop,{}),h?"Stop":null]}),(0,r.jsxs)(i.Button,{variant:"outline",size:j,disabled:l,title:"Rename",onClick:r=>{r.stopPropagation();let t=window.prompt("Rename box (label only — leave blank to reset)",e.displayName??e.task);null!==t&&f(async()=>{let r=await x(e.id,t.trim());r.ok||window.alert(`Rename failed: ${r.error}`),n.refresh()})},children:[(0,r.jsx)(c.Icons.pencil,{}),h?"Rename":null]}),(0,r.jsxs)(i.Button,{variant:"destructive",size:j,title:"Destroy",disabled:l,onClick:r=>y(r,d,`Destroy box ${e.id}? Its workspace volume is discarded. This cannot be undone.`),children:[(0,r.jsx)(c.Icons.trash,{}),h?"Destroy":null]})]})}],30544)},95141,e=>{"use strict";var r=e.i(1262),t=e.i(54129),n=e.i(65232),a=e.i(44344);e.s(["Dialog",0,function({onClose:e,className:s,children:o}){return(0,t.useEffect)(()=>{let r=r=>{"Escape"===r.key&&e()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e]),(0,r.jsx)("div",{className:"anim-fade fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-[rgba(20,24,30,.42)] p-6 backdrop-blur-[2px]",onClick:e,children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true",className:(0,n.cn)("anim-pop relative m-auto w-full max-w-[500px] rounded-2xl border border-border bg-card shadow-[0_40px_80px_-30px_rgba(20,24,30,.5)]",s),onClick:e=>e.stopPropagation(),children:[o,(0,r.jsx)("button",{className:"absolute right-4 top-4 grid h-7 w-7 cursor-pointer place-items-center rounded-md border-0 bg-transparent text-[#a4a9b0] transition-colors hover:bg-secondary hover:text-foreground",onClick:e,"aria-label":"Close",children:(0,r.jsx)(a.Icons.x,{style:{width:15,height:15}})})]})})},"DialogBody",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("px-5 py-4",e),...t})},"DialogDescription",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("mt-1 font-mono text-xs text-muted-foreground",e),...t})},"DialogFooter",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("flex justify-end gap-2.5 rounded-b-2xl border-t border-border/70 bg-background px-5 py-3.5",e),...t})},"DialogHeader",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("flex items-start gap-3 border-b border-border/70 px-5 pb-4 pt-5",e),...t})},"DialogIcon",0,function({children:e}){return(0,r.jsx)("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-lg border border-[var(--green-line)] bg-accent text-primary [&_svg]:size-[17px]",children:e})},"DialogTitle",0,function({className:e,...t}){return(0,r.jsx)("div",{className:(0,n.cn)("text-base font-semibold leading-tight tracking-tight",e),...t})}])},49604,e=>{"use strict";var r=e.i(1262),t=e.i(65232);e.s(["Select",0,function({wrapperClassName:e,className:n,children:a,...s}){return(0,r.jsxs)("span",{className:(0,t.cn)("relative inline-flex",e),children:[(0,r.jsx)("select",{className:(0,t.cn)("h-9 w-full cursor-pointer appearance-none rounded-lg border border-input bg-card py-1 pl-3 pr-9 text-[13px] shadow-sm focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15",n),...s,children:a}),(0,r.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:(0,r.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}])},80922,35594,e=>{"use strict";var r=e.i(1262),t=e.i(51096),n=e.i(44344);e.s(["BackLink",0,function({to:e,children:a}){return(0,r.jsxs)(t.default,{className:"mb-3.5 inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-mono text-xs text-muted-foreground hover:text-primary",href:e,children:[(0,r.jsx)(n.Icons.arrowL,{className:"size-[13px]"}),a]})}],80922);var a=e.i(65232),s=e.i(8536);e.s(["Stat",0,function({k:e,v:t,mono:n,icon:s}){return(0,r.jsxs)("div",{className:"px-4.5 p-4",children:[(0,r.jsx)("div",{className:"mb-1.5 font-mono text-[10.5px] uppercase tracking-[.06em] text-[#a4a9b0]",children:e}),(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-2 font-semibold tracking-[-0.01em]",n?"font-mono text-sm font-medium":"text-base"),children:[s?(0,r.jsx)(s,{className:"size-[15px] text-muted-foreground"}):null,t]})]})},"StatGrid",0,function({children:e}){return(0,r.jsx)(s.Card,{className:"grid grid-cols-[repeat(auto-fit,minmax(140px,1fr))] divide-x divide-border/60 overflow-hidden",children:e})}],35594)}]);
|