@madarco/agentbox 0.23.1 → 0.23.3
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 +19 -0
- package/dist/{_cloud-attach-HGP3MQEG.js → _cloud-attach-BQRWX3J2.js} +4 -4
- package/dist/{chunk-QVWGQJV6.js → chunk-GGRZ3GZO.js} +2 -2
- package/dist/{chunk-L5SOSNQI.js → chunk-I6ZRWTPR.js} +26 -4
- package/dist/chunk-I6ZRWTPR.js.map +1 -0
- package/dist/{chunk-QGL734YX.js → chunk-LA4JMS27.js} +11 -3
- package/dist/{chunk-QGL734YX.js.map → chunk-LA4JMS27.js.map} +1 -1
- package/dist/{chunk-CKC3CP7Y.js → chunk-LK2JT2OO.js} +19 -7
- package/dist/{chunk-CKC3CP7Y.js.map → chunk-LK2JT2OO.js.map} +1 -1
- package/dist/{chunk-Q626V2YX.js → chunk-LSQXT5WZ.js} +2 -2
- package/dist/{chunk-4AV2L2KY.js → chunk-QEQFZLYR.js} +8 -8
- package/dist/{chunk-ERMU7RMK.js → chunk-SFA57TGX.js} +4 -4
- package/dist/{chunk-JXDSSSXS.js → chunk-W3FQPFP7.js} +3 -3
- package/dist/{dist-Z3GSHEFO.js → dist-CUKBKS3N.js} +5 -5
- package/dist/{dist-X3O3HEYD.js → dist-FXQFTT75.js} +5 -5
- package/dist/{dist-W5476E2U.js → dist-QO4CTLAX.js} +5 -5
- package/dist/{dist-GEHCZJCS.js → dist-V235KVEX.js} +5 -5
- package/dist/{dist-JFUUDAI3.js → dist-Z2NEVV55.js} +5 -3
- package/dist/index.js +22 -39
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-LW2PKTEQ-5YMKG7UN.js → prepared-state-BUO75YLZ-CDTISC2C.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/_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/[root-of-the-server]__0keu6we._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.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/{1py5tlz57h7ra.js → 44o5lj23__y1m.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-JQFB2CNA.js → chunk-2Z74R6ZT.js} +10 -2
- package/runtime/hub/apps/hub/{chunk-6HD4PARX.js → chunk-AR7CEZ2G.js} +25 -3
- package/runtime/hub/apps/hub/{chunk-K6RA5GJI.js → chunk-H22XP3NY.js} +18 -6
- package/runtime/hub/apps/hub/{dist-OUNL2TCW.js → dist-LNHEG5P4.js} +3 -3
- package/runtime/hub/apps/hub/{dist-7GNKBKFV.js → dist-LZNRLUYY.js} +3 -3
- package/runtime/hub/apps/hub/{dist-JWVTVHBT.js → dist-Q6G66Z57.js} +3 -3
- package/runtime/hub/apps/hub/{dist-L2MMBH7P.js → dist-SD4G36EP.js} +3 -3
- package/runtime/hub/apps/hub/{dist-3HR4RIPE.js → dist-VV6Z2CQX.js} +4 -2
- package/runtime/hub/apps/hub/{prepared-state-LW2PKTEQ-7BCXARGA.js → prepared-state-BUO75YLZ-CAXQS5Y3.js} +1 -1
- package/runtime/hub/apps/hub/server.js +23 -10
- package/dist/chunk-L5SOSNQI.js.map +0 -1
- /package/dist/{_cloud-attach-HGP3MQEG.js.map → _cloud-attach-BQRWX3J2.js.map} +0 -0
- /package/dist/{chunk-QVWGQJV6.js.map → chunk-GGRZ3GZO.js.map} +0 -0
- /package/dist/{chunk-Q626V2YX.js.map → chunk-LSQXT5WZ.js.map} +0 -0
- /package/dist/{chunk-4AV2L2KY.js.map → chunk-QEQFZLYR.js.map} +0 -0
- /package/dist/{chunk-ERMU7RMK.js.map → chunk-SFA57TGX.js.map} +0 -0
- /package/dist/{chunk-JXDSSSXS.js.map → chunk-W3FQPFP7.js.map} +0 -0
- /package/dist/{dist-JFUUDAI3.js.map → dist-CUKBKS3N.js.map} +0 -0
- /package/dist/{dist-X3O3HEYD.js.map → dist-FXQFTT75.js.map} +0 -0
- /package/dist/{dist-W5476E2U.js.map → dist-QO4CTLAX.js.map} +0 -0
- /package/dist/{dist-GEHCZJCS.js.map → dist-V235KVEX.js.map} +0 -0
- /package/dist/{dist-Z3GSHEFO.js.map → dist-Z2NEVV55.js.map} +0 -0
- /package/dist/{prepared-state-LW2PKTEQ-5YMKG7UN.js.map → prepared-state-BUO75YLZ-CDTISC2C.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{mcWRLSGubwKk9p3RFz2-Q → 12hWAUQ9O9G3VS4vxKuav}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{mcWRLSGubwKk9p3RFz2-Q → 12hWAUQ9O9G3VS4vxKuav}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{mcWRLSGubwKk9p3RFz2-Q → 12hWAUQ9O9G3VS4vxKuav}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},p={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var c in p)s(a,c,{get:p[c],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function l(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...s]=l(e),{domain:n,expires:o,httponly:i,maxage:a,path:p,samesite:c,secure:d,partitioned:u,priority:y}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,b,f={name:t,value:decodeURIComponent(r),domain:n,...o&&{expires:new Date(o)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:p,...c&&{sameSite:h.includes(g=(g=c).toLowerCase())?g:void 0},...d&&{secure:!0},...y&&{priority:m.includes(b=(b=y).toLowerCase())?b:void 0},...u&&{partitioned:!0}};let e={};for(let t in f)f[t]&&(e[t]=f[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))i.call(e,a)||void 0===a||s(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(s({},"__esModule",{value:!0}),a);var h=["strict","lax","none"],m=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of l(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,o,i=[],a=0;function p(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,o=!1;p();)if(","===(r=e.charAt(a))){for(s=a,a+=1,p(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=n,i.push(e.substring(t,s)),t=a):a=s+1}else a+=1;(!o||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},48806,e=>{"use strict";let t={description:"Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}};e.s(["buildOpenApi",0,function(){return{openapi:"3.1.0",info:{title:"AgentBox Hub API",version:"1.0.0",description:'Launch and manage AgentBox sandboxes ("boxes") programmatically. Every endpoint except /health, /openapi.json and /docs requires an Authorization: Bearer <hub token> header (the token the hub prints on boot, also at ~/.agentbox/hub/token). Errors always return { error: { code, message, details? } }.'},servers:[{url:"/api/v1"}],security:[{bearerAuth:[]}],tags:[{name:"System",description:"Liveness and API version."},{name:"Boxes",description:"Create, inspect, and run lifecycle actions on boxes."},{name:"Box git",description:"Git state and operations on a box's branch."},{name:"Box services",description:"A box's agentbox.yaml service/task/port status."},{name:"Projects",description:"Register folders as projects and list their branches."},{name:"Providers",description:"Sandbox providers: status, credentials, base-image bake."},{name:"Approvals",description:"Pending host-action approvals."},{name:"Jobs",description:"Async create/bake job status and log streams."}],paths:{"/health":{get:{tags:["System"],summary:"Get liveness + API version",security:[],responses:{200:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/Health"}}}}}}},"/boxes":{get:{tags:["Boxes"],summary:"List boxes",responses:{200:{description:"Boxes",content:{"application/json":{schema:{type:"object",properties:{boxes:{type:"array",items:{$ref:"#/components/schemas/Box"}}},required:["boxes"]}}}},401:t}},post:{tags:["Boxes"],summary:"Create a box",description:'Async — returns a job id. agent "none" just creates the box without starting an agent (prompt ignored). provider defaults to docker; a cloud provider must be configured on the host (see GET /providers).',requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBox"}}}},responses:{202:{description:"Accepted — build job enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}":{get:{tags:["Boxes"],summary:"Get one box",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Box",content:{"application/json":{schema:{$ref:"#/components/schemas/Box"}}}},401:t,404:t}}},"/boxes/{id}/{action}":{post:{tags:["Boxes"],summary:"Run a lifecycle action",description:"One of start | pause | resume | stop | destroy. start brings a stopped box back up (resumes if paused, no-op if already running); it does not restart the agent session — that happens on the next attach.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"action",in:"path",required:!0,schema:{type:"string",enum:["start","pause","resume","stop","destroy"]}}],responses:{200:{description:"Done",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/git":{get:{tags:["Box git"],summary:"Get the box's live git summary",description:"The worktree's current branch, dirty, ahead/behind.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Git info",content:{"application/json":{schema:{$ref:"#/components/schemas/GitInfo"}}}},401:t,404:t,503:t}}},"/boxes/{id}/git/{op}":{post:{tags:["Box git"],summary:"Run a git op on the box branch",description:"checkout {branch}; branch {name, from?} (create+switch a new agentbox/* branch); pull {remote?, ffOnly?}; push {remote?, force?}; push-host {as?, force?} (land in the host repo only, publishes nothing).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"op",in:"path",required:!0,schema:{type:"string",enum:["checkout","branch","pull","push","push-host"]}}],requestBody:{required:!1,content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpBody"}}}},responses:{200:{description:"Done (git stdout/stderr)",content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpResult"}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/branches":{get:{tags:["Box git"],summary:"List the box project's branches",description:"Local + remote branches and the current HEAD, for the box git-panel branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}/services":{get:{tags:["Box services"],summary:"Get the box's service/task/port status",description:"From the box's agentbox.yaml — live, or the persisted snapshot when the box isn't running.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Services",content:{"application/json":{schema:{$ref:"#/components/schemas/Services"}}}},401:t,503:t}}},"/boxes/{id}/services/restart":{post:{tags:["Box services"],summary:"Restart services",description:"Restart one service (body {name}) or every service (empty body).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{name:{type:"string"}}}}}},responses:{200:{description:"Restarted",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/open":{post:{tags:["Box services"],summary:"Open the box in a host app",description:"Launch the box in a host GUI app (Codex, VS Code/Cursor, cmux, Herdr, iTerm2) by re-shelling `agentbox open --in <app>`. Only works on a localhost hub running on macOS; a remote hub / non-macOS host refuses. An app must be installed and provider-eligible (e.g. Codex is Hetzner-only) — see GET /open-targets.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{app:{type:"string",enum:["codex","herdr","cmux","vscode","iterm2"]}},required:["app"]}}}},responses:{200:{description:"Launched",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/open-targets":{get:{tags:["Box services"],summary:"Which host apps this hub can open a box in",description:'Reports whether the hub can launch host GUI apps (`supported` — true only on a localhost hub on macOS) and, if so, which of Codex/Herdr/cmux/VS Code/iTerm2 are installed plus their provider eligibility. Backs the box detail page "Apps" launchers.',responses:{200:{description:"Open targets",content:{"application/json":{schema:{type:"object",properties:{supported:{type:"boolean"},targets:{type:["object","null"],additionalProperties:{type:"object",properties:{available:{type:"boolean"},providers:{type:"array",items:{type:"string"}}},required:["available"]}}},required:["supported","targets"]}}}},401:t}}},"/projects":{get:{tags:["Projects"],summary:"List registered projects",responses:{200:{description:"Projects",content:{"application/json":{schema:{type:"object",properties:{projects:{type:"array",items:{$ref:"#/components/schemas/Project"}}},required:["projects"]}}}},401:t}},post:{tags:["Projects"],summary:"Register a folder as a project",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{path:{type:"string",description:"Absolute path to the folder."}},required:["path"]}}}},responses:{200:{description:"Registered",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/projects/{id}":{delete:{tags:["Projects"],summary:"Unregister an empty project",description:"Folder/files on disk are untouched.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Removed",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},401:t,404:t,409:t,503:t}}},"/projects/{id}/branches":{get:{tags:["Projects"],summary:"List a project's branches",description:"Local + remote branches and the current HEAD, for the create-box base-branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/providers":{get:{tags:["Providers"],summary:"List sandbox providers",description:"With credential + baked status on this host.",responses:{200:{description:"Providers",content:{"application/json":{schema:{type:"object",properties:{providers:{type:"array",items:{$ref:"#/components/schemas/Provider"}}},required:["providers"]}}}},401:t}}},"/providers/{id}/credentials":{post:{tags:["Providers"],summary:"Set a provider's credentials",description:"API keys/tokens, validated then saved to secrets.env. Never echoes secret values.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",additionalProperties:{type:"string"},description:"Provider-specific fields, e.g. { apiKey } (e2b), { token } (hetzner), { apiKey } or { jwtToken, organizationId } (daytona), { token, teamId?, projectId? } (vercel)."}}}},responses:{200:{description:"Saved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/providers/{id}/prepare":{post:{tags:["Providers"],summary:"Bake a provider's base image",description:"Async — returns a job id. Progress streams over GET /jobs/{id}/logs.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{force:{type:"boolean"},claudeInstall:{type:"string",enum:["native","npm"]}}}}}},responses:{202:{description:"Bake enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,409:t,503:t}}},"/approvals":{get:{tags:["Approvals"],summary:"List pending host-action approvals",responses:{200:{description:"Approvals",content:{"application/json":{schema:{type:"object",properties:{approvals:{type:"array",items:{$ref:"#/components/schemas/Approval"}}},required:["approvals"]}}}},401:t}}},"/approvals/{id}/answer":{post:{tags:["Approvals"],summary:"Answer a pending approval",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{answer:{type:"string",enum:["y","n"]}},required:["answer"]}}}},responses:{200:{description:"Resolved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,503:t}}},"/jobs/{id}":{get:{tags:["Jobs"],summary:"Get a create job status",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Job",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},401:t,404:t}}},"/jobs/{id}/logs":{get:{tags:["Jobs"],summary:"Stream a create job log (SSE)",description:"text/event-stream. Emits `open`, then `log` events per line, then a terminal `end` event with the final status.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"SSE stream",content:{"text/event-stream":{}}},401:t,404:t,503:t}}}},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",description:"The hub token (Authorization: Bearer <token>)."}},schemas:{Health:{type:"object",properties:{ok:{const:!0},apiVersion:{type:"string"},profile:{type:"string"}},required:["ok","apiVersion"]},Error:{type:"object",properties:{error:{type:"object",properties:{code:{type:"string"},message:{type:"string"},details:{}},required:["code","message"]}},required:["error"]},Box:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},repo:{type:"string"},branch:{type:"string"},task:{type:"string"},agent:{type:"string"},status:{type:"string",enum:["running","paused","stopped","creating","error"]},createdAt:{type:"number"},lastActivity:{type:"number"},host:{type:"string"},commits:{type:["number","null"]},filesTouched:{type:["number","null"]},error:{type:["string","null"]},displayName:{type:["string","null"],description:"Cosmetic user-set label (rename); null when unset"},webUrl:{type:["string","null"],description:"Host-openable web-service URL; null when absent/unreachable (e.g. paused)"},vncUrl:{type:["string","null"],description:"Host-openable VNC desktop URL; null when absent/unreachable"},state:{type:"string",enum:["running","paused","stopped","missing"],description:"Raw provider runtime state (host topology only). Absent on synthetic creating/error rows — presence distinguishes a real box whose agent errored from a failed create job."},name:{type:"string"},provider:{type:"string",description:"Raw provider id ('docker', 'daytona', …; plugin ids possible)"},projectRoot:{type:"string",description:"Absolute host path of the project. Host topology only — never emitted by the hosted plane"},projectIndex:{type:"number"},vncEnabled:{type:"boolean"},gitWorktrees:{type:"array",items:{type:"object",properties:{kind:{type:"string"},branch:{type:"string"}}}},claudeSessionTitle:{type:"string"},codexSessionTitle:{type:"string"},opencodeSessionTitle:{type:"string"},claudeActivity:{type:"string",description:"working | idle | waiting | end-plan | question | compacting | error | unknown"},codexActivity:{type:"string"}},required:["id","projectId","status","agent"]},Project:{type:"object",properties:{id:{type:"string"},name:{type:"string"},repo:{type:"string"},defaultBranch:{type:"string"},currentBranch:{type:"string",nullable:!0},needsSetup:{type:"boolean",description:"No agentbox.yaml + no default snapshot — the create form offers the setup wizard"},provider:{type:"string"},createdAt:{type:"number"}},required:["id","name"]},BranchList:{type:"object",properties:{current:{type:"string",nullable:!0,description:"The repo's current HEAD (the default base ref)"},branches:{type:"array",items:{type:"string"},description:"Local + remote-tracking branch names"}},required:["branches"]},Approval:{type:"object",properties:{id:{type:"string"},boxId:{type:"string"},message:{type:"string"},detail:{type:"string"},command:{type:"string"},cwd:{type:"string"},argv:{type:"array",items:{type:"string"}},defaultAnswer:{type:"string",enum:["y","n"]},createdAt:{type:"number"}},required:["id","boxId","message","defaultAnswer"]},Job:{type:"object",properties:{id:{type:"string"},status:{type:"string",enum:["queued","running","done","failed","cancelled"]},boxId:{type:"string"}},required:["id","status"]},CreateBox:{type:"object",properties:{projectId:{type:"string"},agent:{type:"string",enum:["claude","codex","opencode","none"]},provider:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"],default:"docker"},name:{type:"string"},prompt:{type:"string"},fromBranch:{type:"string",description:"Base ref the box's per-box branch forks from (branch / tag / SHA); default the project's HEAD"},setupWizard:{type:"boolean",description:'Seed the agent\'s first turn to generate agentbox.yaml (for projects with none). Inert for agent "none".'}},required:["projectId","agent"]},Provider:{type:"object",properties:{id:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]},label:{type:"string"},configured:{type:"boolean",description:"Base image baked (usable for create) on this host."},hasCredentials:{type:"boolean",description:"Credentials present (docker: always true). Can be true while not yet configured (baked)."},jobId:{type:"string",description:"Id of an in-flight bake (prepare) job for this provider, if any."},reason:{type:"string"}},required:["id","label","configured"]},GitOpBody:{type:"object",description:"Union of git-op fields; only those for the chosen {op} are read (extras are ignored).",properties:{branch:{type:"string",description:"checkout: branch to switch to"},name:{type:"string",description:"branch: new branch name (agentbox/ prefix added when missing)"},from:{type:"string",description:"branch: base ref to fork from (default: box's HEAD)"},remote:{type:"string",description:"push/pull: remote name (default: origin)"},force:{type:"boolean",description:"push: force the remote push; push-host: overwrite the destination branch"},ffOnly:{type:"boolean",description:"pull: pass --ff-only to the merge"},as:{type:"string",description:"push-host: destination branch name in the host repo (default: the box's branch)"}}},GitOpResult:{type:"object",properties:{ok:{const:!0},stdout:{type:"string"},stderr:{type:"string"}},required:["ok"]},GitInfo:{type:"object",properties:{ok:{type:"boolean"},branch:{type:"string"},dirty:{type:"boolean"},ahead:{type:"number"},behind:{type:"number"},error:{type:"string"}},required:["ok"]},Services:{type:"object",properties:{source:{type:"string",enum:["live","persisted","unavailable"]},services:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"},pid:{type:["number","null"]},restarts:{type:"number"},lastExitCode:{type:["number","null"]},blockedOn:{type:"array",items:{type:"string"}},command:{type:"string"}},required:["name","state"]}},tasks:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"}},required:["name","state"]}},ports:{type:"array",items:{type:"object",properties:{port:{type:"number"},service:{type:["string","null"]}},required:["port"]}},error:{type:"string"}},required:["source","services","tasks","ports"]}}}}},"docsHtml",0,function(){return`<!doctype html>
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},p={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var c in p)s(a,c,{get:p[c],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function l(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...s]=l(e),{domain:n,expires:o,httponly:i,maxage:a,path:p,samesite:c,secure:d,partitioned:u,priority:y}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,b,f={name:t,value:decodeURIComponent(r),domain:n,...o&&{expires:new Date(o)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:p,...c&&{sameSite:h.includes(g=(g=c).toLowerCase())?g:void 0},...d&&{secure:!0},...y&&{priority:m.includes(b=(b=y).toLowerCase())?b:void 0},...u&&{partitioned:!0}};let e={};for(let t in f)f[t]&&(e[t]=f[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))i.call(e,a)||void 0===a||s(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(s({},"__esModule",{value:!0}),a);var h=["strict","lax","none"],m=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of l(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,o,i=[],a=0;function p(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,o=!1;p();)if(","===(r=e.charAt(a))){for(s=a,a+=1,p(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=n,i.push(e.substring(t,s)),t=a):a=s+1}else a+=1;(!o||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},48806,e=>{"use strict";let t={description:"Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}};e.s(["buildOpenApi",0,function(){return{openapi:"3.1.0",info:{title:"AgentBox Hub API",version:"1.0.0",description:'Launch and manage AgentBox sandboxes ("boxes") programmatically. Every endpoint except /health, /openapi.json and /docs requires an Authorization: Bearer <hub token> header (the token the hub prints on boot, also at ~/.agentbox/hub/token). Errors always return { error: { code, message, details? } }.'},servers:[{url:"/api/v1"}],security:[{bearerAuth:[]}],tags:[{name:"System",description:"Liveness and API version."},{name:"Boxes",description:"Create, inspect, and run lifecycle actions on boxes."},{name:"Box git",description:"Git state and operations on a box's branch."},{name:"Box services",description:"A box's agentbox.yaml service/task/port status."},{name:"Projects",description:"Register folders as projects and list their branches."},{name:"Providers",description:"Sandbox providers: status, credentials, base-image bake."},{name:"Approvals",description:"Pending host-action approvals."},{name:"Jobs",description:"Async create/bake job status and log streams."}],paths:{"/health":{get:{tags:["System"],summary:"Get liveness + API version",security:[],responses:{200:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/Health"}}}}}}},"/boxes":{get:{tags:["Boxes"],summary:"List boxes",responses:{200:{description:"Boxes",content:{"application/json":{schema:{type:"object",properties:{boxes:{type:"array",items:{$ref:"#/components/schemas/Box"}}},required:["boxes"]}}}},401:t}},post:{tags:["Boxes"],summary:"Create a box",description:'Async — returns a job id. agent "none" just creates the box without starting an agent (prompt ignored). provider defaults to docker; a cloud provider must be configured on the host (see GET /providers).',requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBox"}}}},responses:{202:{description:"Accepted — build job enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}":{get:{tags:["Boxes"],summary:"Get one box",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Box",content:{"application/json":{schema:{$ref:"#/components/schemas/Box"}}}},401:t,404:t}}},"/boxes/{id}/{action}":{post:{tags:["Boxes"],summary:"Run a lifecycle action",description:"One of start | pause | resume | stop | destroy | screen. start brings a stopped box back up (resumes if paused, no-op if already running); it does not restart the agent session — that happens on the next attach. screen is the open-VNC prep step: it points the in-box browser at the box’s web app so the VNC desktop shows the app instead of a blank X screen — call it right before opening the box’s vncUrl.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"action",in:"path",required:!0,schema:{type:"string",enum:["start","pause","resume","stop","destroy","screen"]}}],responses:{200:{description:"Done",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/git":{get:{tags:["Box git"],summary:"Get the box's live git summary",description:"The worktree's current branch, dirty, ahead/behind.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Git info",content:{"application/json":{schema:{$ref:"#/components/schemas/GitInfo"}}}},401:t,404:t,503:t}}},"/boxes/{id}/git/{op}":{post:{tags:["Box git"],summary:"Run a git op on the box branch",description:"checkout {branch}; branch {name, from?} (create+switch a new agentbox/* branch); pull {remote?, ffOnly?}; push {remote?, force?}; push-host {as?, force?} (land in the host repo only, publishes nothing).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"op",in:"path",required:!0,schema:{type:"string",enum:["checkout","branch","pull","push","push-host"]}}],requestBody:{required:!1,content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpBody"}}}},responses:{200:{description:"Done (git stdout/stderr)",content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpResult"}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/branches":{get:{tags:["Box git"],summary:"List the box project's branches",description:"Local + remote branches and the current HEAD, for the box git-panel branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}/services":{get:{tags:["Box services"],summary:"Get the box's service/task/port status",description:"From the box's agentbox.yaml — live, or the persisted snapshot when the box isn't running.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Services",content:{"application/json":{schema:{$ref:"#/components/schemas/Services"}}}},401:t,503:t}}},"/boxes/{id}/services/restart":{post:{tags:["Box services"],summary:"Restart services",description:"Restart one service (body {name}) or every service (empty body).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{name:{type:"string"}}}}}},responses:{200:{description:"Restarted",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/open":{post:{tags:["Box services"],summary:"Open the box in a host app",description:"Launch the box in a host GUI app (Codex, VS Code/Cursor, cmux, Herdr, iTerm2) by re-shelling `agentbox open --in <app>`. Only works on a localhost hub running on macOS; a remote hub / non-macOS host refuses. An app must be installed and provider-eligible (e.g. Codex is Hetzner-only) — see GET /open-targets.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{app:{type:"string",enum:["codex","herdr","cmux","vscode","iterm2"]}},required:["app"]}}}},responses:{200:{description:"Launched",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/open-targets":{get:{tags:["Box services"],summary:"Which host apps this hub can open a box in",description:'Reports whether the hub can launch host GUI apps (`supported` — true only on a localhost hub on macOS) and, if so, which of Codex/Herdr/cmux/VS Code/iTerm2 are installed plus their provider eligibility. Backs the box detail page "Apps" launchers.',responses:{200:{description:"Open targets",content:{"application/json":{schema:{type:"object",properties:{supported:{type:"boolean"},targets:{type:["object","null"],additionalProperties:{type:"object",properties:{available:{type:"boolean"},providers:{type:"array",items:{type:"string"}}},required:["available"]}}},required:["supported","targets"]}}}},401:t}}},"/projects":{get:{tags:["Projects"],summary:"List registered projects",responses:{200:{description:"Projects",content:{"application/json":{schema:{type:"object",properties:{projects:{type:"array",items:{$ref:"#/components/schemas/Project"}}},required:["projects"]}}}},401:t}},post:{tags:["Projects"],summary:"Register a folder as a project",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{path:{type:"string",description:"Absolute path to the folder."}},required:["path"]}}}},responses:{200:{description:"Registered",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/projects/{id}":{delete:{tags:["Projects"],summary:"Unregister an empty project",description:"Folder/files on disk are untouched.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Removed",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},401:t,404:t,409:t,503:t}}},"/projects/{id}/branches":{get:{tags:["Projects"],summary:"List a project's branches",description:"Local + remote branches and the current HEAD, for the create-box base-branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/providers":{get:{tags:["Providers"],summary:"List sandbox providers",description:"With credential + baked status on this host.",responses:{200:{description:"Providers",content:{"application/json":{schema:{type:"object",properties:{providers:{type:"array",items:{$ref:"#/components/schemas/Provider"}}},required:["providers"]}}}},401:t}}},"/providers/{id}/credentials":{post:{tags:["Providers"],summary:"Set a provider's credentials",description:"API keys/tokens, validated then saved to secrets.env. Never echoes secret values.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",additionalProperties:{type:"string"},description:"Provider-specific fields, e.g. { apiKey } (e2b), { token } (hetzner), { apiKey } or { jwtToken, organizationId } (daytona), { token, teamId?, projectId? } (vercel)."}}}},responses:{200:{description:"Saved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/providers/{id}/prepare":{post:{tags:["Providers"],summary:"Bake a provider's base image",description:"Async — returns a job id. Progress streams over GET /jobs/{id}/logs.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{force:{type:"boolean"},claudeInstall:{type:"string",enum:["native","npm"]}}}}}},responses:{202:{description:"Bake enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,409:t,503:t}}},"/approvals":{get:{tags:["Approvals"],summary:"List pending host-action approvals",responses:{200:{description:"Approvals",content:{"application/json":{schema:{type:"object",properties:{approvals:{type:"array",items:{$ref:"#/components/schemas/Approval"}}},required:["approvals"]}}}},401:t}}},"/approvals/{id}/answer":{post:{tags:["Approvals"],summary:"Answer a pending approval",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{answer:{type:"string",enum:["y","n"]}},required:["answer"]}}}},responses:{200:{description:"Resolved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,503:t}}},"/jobs/{id}":{get:{tags:["Jobs"],summary:"Get a create job status",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Job",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},401:t,404:t}}},"/jobs/{id}/logs":{get:{tags:["Jobs"],summary:"Stream a create job log (SSE)",description:"text/event-stream. Emits `open`, then `log` events per line, then a terminal `end` event with the final status.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"SSE stream",content:{"text/event-stream":{}}},401:t,404:t,503:t}}}},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",description:"The hub token (Authorization: Bearer <token>)."}},schemas:{Health:{type:"object",properties:{ok:{const:!0},apiVersion:{type:"string"},profile:{type:"string"}},required:["ok","apiVersion"]},Error:{type:"object",properties:{error:{type:"object",properties:{code:{type:"string"},message:{type:"string"},details:{}},required:["code","message"]}},required:["error"]},Box:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},repo:{type:"string"},branch:{type:"string"},task:{type:"string"},agent:{type:"string"},status:{type:"string",enum:["running","paused","stopped","creating","error"]},createdAt:{type:"number"},lastActivity:{type:"number"},host:{type:"string"},commits:{type:["number","null"]},filesTouched:{type:["number","null"]},error:{type:["string","null"]},displayName:{type:["string","null"],description:"Cosmetic user-set label (rename); null when unset"},webUrl:{type:["string","null"],description:"Host-openable web-service URL; null when absent/unreachable (e.g. paused)"},vncUrl:{type:["string","null"],description:"Host-openable VNC desktop URL; null when absent/unreachable"},state:{type:"string",enum:["running","paused","stopped","missing"],description:"Raw provider runtime state (host topology only). Absent on synthetic creating/error rows — presence distinguishes a real box whose agent errored from a failed create job."},name:{type:"string"},provider:{type:"string",description:"Raw provider id ('docker', 'daytona', …; plugin ids possible)"},projectRoot:{type:"string",description:"Absolute host path of the project. Host topology only — never emitted by the hosted plane"},projectIndex:{type:"number"},vncEnabled:{type:"boolean"},gitWorktrees:{type:"array",items:{type:"object",properties:{kind:{type:"string"},branch:{type:"string"}}}},claudeSessionTitle:{type:"string"},codexSessionTitle:{type:"string"},opencodeSessionTitle:{type:"string"},claudeActivity:{type:"string",description:"working | idle | waiting | end-plan | question | compacting | error | unknown"},codexActivity:{type:"string"}},required:["id","projectId","status","agent"]},Project:{type:"object",properties:{id:{type:"string"},name:{type:"string"},repo:{type:"string"},defaultBranch:{type:"string"},currentBranch:{type:"string",nullable:!0},needsSetup:{type:"boolean",description:"No agentbox.yaml + no default snapshot — the create form offers the setup wizard"},provider:{type:"string"},createdAt:{type:"number"}},required:["id","name"]},BranchList:{type:"object",properties:{current:{type:"string",nullable:!0,description:"The repo's current HEAD (the default base ref)"},branches:{type:"array",items:{type:"string"},description:"Local + remote-tracking branch names"}},required:["branches"]},Approval:{type:"object",properties:{id:{type:"string"},boxId:{type:"string"},message:{type:"string"},detail:{type:"string"},command:{type:"string"},cwd:{type:"string"},argv:{type:"array",items:{type:"string"}},defaultAnswer:{type:"string",enum:["y","n"]},createdAt:{type:"number"}},required:["id","boxId","message","defaultAnswer"]},Job:{type:"object",properties:{id:{type:"string"},status:{type:"string",enum:["queued","running","done","failed","cancelled"]},boxId:{type:"string"}},required:["id","status"]},CreateBox:{type:"object",properties:{projectId:{type:"string"},agent:{type:"string",enum:["claude","codex","opencode","none"]},provider:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"],default:"docker"},name:{type:"string"},prompt:{type:"string"},fromBranch:{type:"string",description:"Base ref the box's per-box branch forks from (branch / tag / SHA); default the project's HEAD"},setupWizard:{type:"boolean",description:'Seed the agent\'s first turn to generate agentbox.yaml (for projects with none). Inert for agent "none".'}},required:["projectId","agent"]},Provider:{type:"object",properties:{id:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]},label:{type:"string"},configured:{type:"boolean",description:"Base image baked (usable for create) on this host."},hasCredentials:{type:"boolean",description:"Credentials present (docker: always true). Can be true while not yet configured (baked)."},jobId:{type:"string",description:"Id of an in-flight bake (prepare) job for this provider, if any."},reason:{type:"string"}},required:["id","label","configured"]},GitOpBody:{type:"object",description:"Union of git-op fields; only those for the chosen {op} are read (extras are ignored).",properties:{branch:{type:"string",description:"checkout: branch to switch to"},name:{type:"string",description:"branch: new branch name (agentbox/ prefix added when missing)"},from:{type:"string",description:"branch: base ref to fork from (default: box's HEAD)"},remote:{type:"string",description:"push/pull: remote name (default: origin)"},force:{type:"boolean",description:"push: force the remote push; push-host: overwrite the destination branch"},ffOnly:{type:"boolean",description:"pull: pass --ff-only to the merge"},as:{type:"string",description:"push-host: destination branch name in the host repo (default: the box's branch)"}}},GitOpResult:{type:"object",properties:{ok:{const:!0},stdout:{type:"string"},stderr:{type:"string"}},required:["ok"]},GitInfo:{type:"object",properties:{ok:{type:"boolean"},branch:{type:"string"},dirty:{type:"boolean"},ahead:{type:"number"},behind:{type:"number"},error:{type:"string"}},required:["ok"]},Services:{type:"object",properties:{source:{type:"string",enum:["live","persisted","unavailable"]},services:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"},pid:{type:["number","null"]},restarts:{type:"number"},lastExitCode:{type:["number","null"]},blockedOn:{type:"array",items:{type:"string"}},command:{type:"string"}},required:["name","state"]}},tasks:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"}},required:["name","state"]}},ports:{type:"array",items:{type:"object",properties:{port:{type:"number"},service:{type:["string","null"]}},required:["port"]}},error:{type:"string"}},required:["source","services","tasks","ports"]}}}}},"docsHtml",0,function(){return`<!doctype html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>AgentBox Hub API</title>
|
|
@@ -9,6 +9,6 @@ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-
|
|
|
9
9
|
<script id="api-reference" data-url="/api/v1/openapi.json"></script>
|
|
10
10
|
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
|
11
11
|
</body>
|
|
12
|
-
</html>`}])},79924,e=>{"use strict";var t=e.i(56710),r=e.i(82809),s=e.i(74001),n=e.i(73300),o=e.i(68744),i=e.i(98570),a=e.i(56147),p=e.i(32931),c=e.i(61810),d=e.i(59963),l=e.i(44491),u=e.i(74916),h=e.i(33073),m=e.i(98603),y=e.i(93317),g=e.i(93695);e.i(95533);var b=e.i(75616),f=e.i(48806);e.s(["GET",0,function(){return Response.json((0,f.buildOpenApi)())},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],59172);var v=e.i(59172);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/(dashboard)/api/v1/openapi.json/route",pathname:"/api/v1/openapi.json",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/hub/app/(dashboard)/api/v1/openapi.json/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:j,workUnitAsyncStorage:k,serverHooks:w}=x;async function A(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),x.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/(dashboard)/api/v1/openapi.json/route";f=f.replace(/\/index$/,"")||"/";let v=await x.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:j,deploymentId:k,params:w,nextConfig:A,parsedUrl:q,isDraftMode:R,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,resolvedPathname:P,clientReferenceManifest:O,serverActionsManifest:_}=v,I=(0,a.normalizeAppPath)(f),T=!!(C.dynamicRoutes[I]||C.routes[P]),$=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(T&&!R){let e=!!C.routes[P],t=C.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await $();throw new g.NoFallbackError}}let H=null;!T||x.isDev||R||(H="/index"===(H=P)?"/":H);let N=!0===x.isDev||!T,U=T&&!N;_&&O&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:O,serverActionsManifest:_});let D=e.method||"GET",L=(0,o.getTracer)(),G=L.getActiveScopeSpan(),M=!!(null==S?void 0:S.isWrappedByNextServer),z=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,A,C,z);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let F={params:w,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:N,incrementalCache:K,cacheLifeProfiles:A.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>x.onRequestError(e,t,s,n,S)},sharedContext:{buildId:j,deploymentId:k}},
|
|
12
|
+
</html>`}])},79924,e=>{"use strict";var t=e.i(56710),r=e.i(82809),s=e.i(74001),n=e.i(73300),o=e.i(68744),i=e.i(98570),a=e.i(56147),p=e.i(32931),c=e.i(61810),d=e.i(59963),l=e.i(44491),u=e.i(74916),h=e.i(33073),m=e.i(98603),y=e.i(93317),g=e.i(93695);e.i(95533);var b=e.i(75616),f=e.i(48806);e.s(["GET",0,function(){return Response.json((0,f.buildOpenApi)())},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],59172);var v=e.i(59172);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/(dashboard)/api/v1/openapi.json/route",pathname:"/api/v1/openapi.json",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/hub/app/(dashboard)/api/v1/openapi.json/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:j,workUnitAsyncStorage:k,serverHooks:w}=x;async function A(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),x.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/(dashboard)/api/v1/openapi.json/route";f=f.replace(/\/index$/,"")||"/";let v=await x.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:j,deploymentId:k,params:w,nextConfig:A,parsedUrl:q,isDraftMode:R,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,resolvedPathname:P,clientReferenceManifest:O,serverActionsManifest:_}=v,I=(0,a.normalizeAppPath)(f),T=!!(C.dynamicRoutes[I]||C.routes[P]),$=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(T&&!R){let e=!!C.routes[P],t=C.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await $();throw new g.NoFallbackError}}let H=null;!T||x.isDev||R||(H="/index"===(H=P)?"/":H);let N=!0===x.isDev||!T,U=T&&!N;_&&O&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:O,serverActionsManifest:_});let D=e.method||"GET",L=(0,o.getTracer)(),G=L.getActiveScopeSpan(),M=!!(null==S?void 0:S.isWrappedByNextServer),z=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,A,C,z);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let F={params:w,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:N,incrementalCache:K,cacheLifeProfiles:A.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>x.onRequestError(e,t,s,n,S)},sharedContext:{buildId:j,deploymentId:k}},V=new p.NodeNextRequest(e),J=new p.NodeNextResponse(t),W=c.NextRequestAdapter.fromNodeNextRequest(V,(0,c.signalFromNodeResponse)(t));try{let n,i=async e=>x.handle(W,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${D} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${D} ${f}`)}),a=async n=>{var o,a;let p=async({previousCacheEntry:r})=>{try{if(!z&&E&&B&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=F.renderOpts.fetchMetrics;let a=F.renderOpts.pendingWaitUntil;a&&s.waitUntil&&(s.waitUntil(a),a=void 0);let p=F.renderOpts.collectedTags;if(!T)return await (0,u.sendResponse)(V,J,o,F.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);p&&(t[y.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,s=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:b.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,l.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:E})},!1,S),t}},c=await x.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,responseGenerator:p,waitUntil:s.waitUntil,isMinimalMode:z});if(!T)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==b.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(a=c.value)?void 0:a.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});z||t.setHeader("x-nextjs-cache",E?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),R&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(c.value.headers);return z&&T||d.delete(y.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(V,J,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};M&&G?await a(G):(n=L.getActiveScopeSpan(),await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${f}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},a),void 0,!M))}catch(t){if(t instanceof g.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,l.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:E})},!1,S),T)throw t;return await (0,u.sendResponse)(V,J,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:k})},"routeModule",0,x,"serverHooks",0,w,"workAsyncStorage",0,j,"workUnitAsyncStorage",0,k],79924)}];
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=%5Broot-of-the-server%5D__1bqbkd5._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},p={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var c in p)s(a,c,{get:p[c],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function l(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...s]=l(e),{domain:n,expires:o,httponly:i,maxage:a,path:p,samesite:c,secure:d,partitioned:u,priority:y}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,b,f={name:t,value:decodeURIComponent(r),domain:n,...o&&{expires:new Date(o)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:p,...c&&{sameSite:h.includes(g=(g=c).toLowerCase())?g:void 0},...d&&{secure:!0},...y&&{priority:m.includes(b=(b=y).toLowerCase())?b:void 0},...u&&{partitioned:!0}};let e={};for(let t in f)f[t]&&(e[t]=f[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))i.call(e,a)||void 0===a||s(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(s({},"__esModule",{value:!0}),a);var h=["strict","lax","none"],m=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of l(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,o,i=[],a=0;function p(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,o=!1;p();)if(","===(r=e.charAt(a))){for(s=a,a+=1,p(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=n,i.push(e.substring(t,s)),t=a):a=s+1}else a+=1;(!o||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},48806,e=>{"use strict";let t={description:"Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}};e.s(["buildOpenApi",0,function(){return{openapi:"3.1.0",info:{title:"AgentBox Hub API",version:"1.0.0",description:'Launch and manage AgentBox sandboxes ("boxes") programmatically. Every endpoint except /health, /openapi.json and /docs requires an Authorization: Bearer <hub token> header (the token the hub prints on boot, also at ~/.agentbox/hub/token). Errors always return { error: { code, message, details? } }.'},servers:[{url:"/api/v1"}],security:[{bearerAuth:[]}],tags:[{name:"System",description:"Liveness and API version."},{name:"Boxes",description:"Create, inspect, and run lifecycle actions on boxes."},{name:"Box git",description:"Git state and operations on a box's branch."},{name:"Box services",description:"A box's agentbox.yaml service/task/port status."},{name:"Projects",description:"Register folders as projects and list their branches."},{name:"Providers",description:"Sandbox providers: status, credentials, base-image bake."},{name:"Approvals",description:"Pending host-action approvals."},{name:"Jobs",description:"Async create/bake job status and log streams."}],paths:{"/health":{get:{tags:["System"],summary:"Get liveness + API version",security:[],responses:{200:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/Health"}}}}}}},"/boxes":{get:{tags:["Boxes"],summary:"List boxes",responses:{200:{description:"Boxes",content:{"application/json":{schema:{type:"object",properties:{boxes:{type:"array",items:{$ref:"#/components/schemas/Box"}}},required:["boxes"]}}}},401:t}},post:{tags:["Boxes"],summary:"Create a box",description:'Async — returns a job id. agent "none" just creates the box without starting an agent (prompt ignored). provider defaults to docker; a cloud provider must be configured on the host (see GET /providers).',requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBox"}}}},responses:{202:{description:"Accepted — build job enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}":{get:{tags:["Boxes"],summary:"Get one box",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Box",content:{"application/json":{schema:{$ref:"#/components/schemas/Box"}}}},401:t,404:t}}},"/boxes/{id}/{action}":{post:{tags:["Boxes"],summary:"Run a lifecycle action",description:"One of start | pause | resume | stop | destroy. start brings a stopped box back up (resumes if paused, no-op if already running); it does not restart the agent session — that happens on the next attach.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"action",in:"path",required:!0,schema:{type:"string",enum:["start","pause","resume","stop","destroy"]}}],responses:{200:{description:"Done",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/git":{get:{tags:["Box git"],summary:"Get the box's live git summary",description:"The worktree's current branch, dirty, ahead/behind.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Git info",content:{"application/json":{schema:{$ref:"#/components/schemas/GitInfo"}}}},401:t,404:t,503:t}}},"/boxes/{id}/git/{op}":{post:{tags:["Box git"],summary:"Run a git op on the box branch",description:"checkout {branch}; branch {name, from?} (create+switch a new agentbox/* branch); pull {remote?, ffOnly?}; push {remote?, force?}; push-host {as?, force?} (land in the host repo only, publishes nothing).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"op",in:"path",required:!0,schema:{type:"string",enum:["checkout","branch","pull","push","push-host"]}}],requestBody:{required:!1,content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpBody"}}}},responses:{200:{description:"Done (git stdout/stderr)",content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpResult"}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/branches":{get:{tags:["Box git"],summary:"List the box project's branches",description:"Local + remote branches and the current HEAD, for the box git-panel branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}/services":{get:{tags:["Box services"],summary:"Get the box's service/task/port status",description:"From the box's agentbox.yaml — live, or the persisted snapshot when the box isn't running.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Services",content:{"application/json":{schema:{$ref:"#/components/schemas/Services"}}}},401:t,503:t}}},"/boxes/{id}/services/restart":{post:{tags:["Box services"],summary:"Restart services",description:"Restart one service (body {name}) or every service (empty body).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{name:{type:"string"}}}}}},responses:{200:{description:"Restarted",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/open":{post:{tags:["Box services"],summary:"Open the box in a host app",description:"Launch the box in a host GUI app (Codex, VS Code/Cursor, cmux, Herdr, iTerm2) by re-shelling `agentbox open --in <app>`. Only works on a localhost hub running on macOS; a remote hub / non-macOS host refuses. An app must be installed and provider-eligible (e.g. Codex is Hetzner-only) — see GET /open-targets.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{app:{type:"string",enum:["codex","herdr","cmux","vscode","iterm2"]}},required:["app"]}}}},responses:{200:{description:"Launched",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/open-targets":{get:{tags:["Box services"],summary:"Which host apps this hub can open a box in",description:'Reports whether the hub can launch host GUI apps (`supported` — true only on a localhost hub on macOS) and, if so, which of Codex/Herdr/cmux/VS Code/iTerm2 are installed plus their provider eligibility. Backs the box detail page "Apps" launchers.',responses:{200:{description:"Open targets",content:{"application/json":{schema:{type:"object",properties:{supported:{type:"boolean"},targets:{type:["object","null"],additionalProperties:{type:"object",properties:{available:{type:"boolean"},providers:{type:"array",items:{type:"string"}}},required:["available"]}}},required:["supported","targets"]}}}},401:t}}},"/projects":{get:{tags:["Projects"],summary:"List registered projects",responses:{200:{description:"Projects",content:{"application/json":{schema:{type:"object",properties:{projects:{type:"array",items:{$ref:"#/components/schemas/Project"}}},required:["projects"]}}}},401:t}},post:{tags:["Projects"],summary:"Register a folder as a project",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{path:{type:"string",description:"Absolute path to the folder."}},required:["path"]}}}},responses:{200:{description:"Registered",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/projects/{id}":{delete:{tags:["Projects"],summary:"Unregister an empty project",description:"Folder/files on disk are untouched.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Removed",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},401:t,404:t,409:t,503:t}}},"/projects/{id}/branches":{get:{tags:["Projects"],summary:"List a project's branches",description:"Local + remote branches and the current HEAD, for the create-box base-branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/providers":{get:{tags:["Providers"],summary:"List sandbox providers",description:"With credential + baked status on this host.",responses:{200:{description:"Providers",content:{"application/json":{schema:{type:"object",properties:{providers:{type:"array",items:{$ref:"#/components/schemas/Provider"}}},required:["providers"]}}}},401:t}}},"/providers/{id}/credentials":{post:{tags:["Providers"],summary:"Set a provider's credentials",description:"API keys/tokens, validated then saved to secrets.env. Never echoes secret values.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",additionalProperties:{type:"string"},description:"Provider-specific fields, e.g. { apiKey } (e2b), { token } (hetzner), { apiKey } or { jwtToken, organizationId } (daytona), { token, teamId?, projectId? } (vercel)."}}}},responses:{200:{description:"Saved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/providers/{id}/prepare":{post:{tags:["Providers"],summary:"Bake a provider's base image",description:"Async — returns a job id. Progress streams over GET /jobs/{id}/logs.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{force:{type:"boolean"},claudeInstall:{type:"string",enum:["native","npm"]}}}}}},responses:{202:{description:"Bake enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,409:t,503:t}}},"/approvals":{get:{tags:["Approvals"],summary:"List pending host-action approvals",responses:{200:{description:"Approvals",content:{"application/json":{schema:{type:"object",properties:{approvals:{type:"array",items:{$ref:"#/components/schemas/Approval"}}},required:["approvals"]}}}},401:t}}},"/approvals/{id}/answer":{post:{tags:["Approvals"],summary:"Answer a pending approval",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{answer:{type:"string",enum:["y","n"]}},required:["answer"]}}}},responses:{200:{description:"Resolved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,503:t}}},"/jobs/{id}":{get:{tags:["Jobs"],summary:"Get a create job status",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Job",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},401:t,404:t}}},"/jobs/{id}/logs":{get:{tags:["Jobs"],summary:"Stream a create job log (SSE)",description:"text/event-stream. Emits `open`, then `log` events per line, then a terminal `end` event with the final status.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"SSE stream",content:{"text/event-stream":{}}},401:t,404:t,503:t}}}},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",description:"The hub token (Authorization: Bearer <token>)."}},schemas:{Health:{type:"object",properties:{ok:{const:!0},apiVersion:{type:"string"},profile:{type:"string"}},required:["ok","apiVersion"]},Error:{type:"object",properties:{error:{type:"object",properties:{code:{type:"string"},message:{type:"string"},details:{}},required:["code","message"]}},required:["error"]},Box:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},repo:{type:"string"},branch:{type:"string"},task:{type:"string"},agent:{type:"string"},status:{type:"string",enum:["running","paused","stopped","creating","error"]},createdAt:{type:"number"},lastActivity:{type:"number"},host:{type:"string"},commits:{type:["number","null"]},filesTouched:{type:["number","null"]},error:{type:["string","null"]},displayName:{type:["string","null"],description:"Cosmetic user-set label (rename); null when unset"},webUrl:{type:["string","null"],description:"Host-openable web-service URL; null when absent/unreachable (e.g. paused)"},vncUrl:{type:["string","null"],description:"Host-openable VNC desktop URL; null when absent/unreachable"},state:{type:"string",enum:["running","paused","stopped","missing"],description:"Raw provider runtime state (host topology only). Absent on synthetic creating/error rows — presence distinguishes a real box whose agent errored from a failed create job."},name:{type:"string"},provider:{type:"string",description:"Raw provider id ('docker', 'daytona', …; plugin ids possible)"},projectRoot:{type:"string",description:"Absolute host path of the project. Host topology only — never emitted by the hosted plane"},projectIndex:{type:"number"},vncEnabled:{type:"boolean"},gitWorktrees:{type:"array",items:{type:"object",properties:{kind:{type:"string"},branch:{type:"string"}}}},claudeSessionTitle:{type:"string"},codexSessionTitle:{type:"string"},opencodeSessionTitle:{type:"string"},claudeActivity:{type:"string",description:"working | idle | waiting | end-plan | question | compacting | error | unknown"},codexActivity:{type:"string"}},required:["id","projectId","status","agent"]},Project:{type:"object",properties:{id:{type:"string"},name:{type:"string"},repo:{type:"string"},defaultBranch:{type:"string"},currentBranch:{type:"string",nullable:!0},needsSetup:{type:"boolean",description:"No agentbox.yaml + no default snapshot — the create form offers the setup wizard"},provider:{type:"string"},createdAt:{type:"number"}},required:["id","name"]},BranchList:{type:"object",properties:{current:{type:"string",nullable:!0,description:"The repo's current HEAD (the default base ref)"},branches:{type:"array",items:{type:"string"},description:"Local + remote-tracking branch names"}},required:["branches"]},Approval:{type:"object",properties:{id:{type:"string"},boxId:{type:"string"},message:{type:"string"},detail:{type:"string"},command:{type:"string"},cwd:{type:"string"},argv:{type:"array",items:{type:"string"}},defaultAnswer:{type:"string",enum:["y","n"]},createdAt:{type:"number"}},required:["id","boxId","message","defaultAnswer"]},Job:{type:"object",properties:{id:{type:"string"},status:{type:"string",enum:["queued","running","done","failed","cancelled"]},boxId:{type:"string"}},required:["id","status"]},CreateBox:{type:"object",properties:{projectId:{type:"string"},agent:{type:"string",enum:["claude","codex","opencode","none"]},provider:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"],default:"docker"},name:{type:"string"},prompt:{type:"string"},fromBranch:{type:"string",description:"Base ref the box's per-box branch forks from (branch / tag / SHA); default the project's HEAD"},setupWizard:{type:"boolean",description:'Seed the agent\'s first turn to generate agentbox.yaml (for projects with none). Inert for agent "none".'}},required:["projectId","agent"]},Provider:{type:"object",properties:{id:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]},label:{type:"string"},configured:{type:"boolean",description:"Base image baked (usable for create) on this host."},hasCredentials:{type:"boolean",description:"Credentials present (docker: always true). Can be true while not yet configured (baked)."},jobId:{type:"string",description:"Id of an in-flight bake (prepare) job for this provider, if any."},reason:{type:"string"}},required:["id","label","configured"]},GitOpBody:{type:"object",description:"Union of git-op fields; only those for the chosen {op} are read (extras are ignored).",properties:{branch:{type:"string",description:"checkout: branch to switch to"},name:{type:"string",description:"branch: new branch name (agentbox/ prefix added when missing)"},from:{type:"string",description:"branch: base ref to fork from (default: box's HEAD)"},remote:{type:"string",description:"push/pull: remote name (default: origin)"},force:{type:"boolean",description:"push: force the remote push; push-host: overwrite the destination branch"},ffOnly:{type:"boolean",description:"pull: pass --ff-only to the merge"},as:{type:"string",description:"push-host: destination branch name in the host repo (default: the box's branch)"}}},GitOpResult:{type:"object",properties:{ok:{const:!0},stdout:{type:"string"},stderr:{type:"string"}},required:["ok"]},GitInfo:{type:"object",properties:{ok:{type:"boolean"},branch:{type:"string"},dirty:{type:"boolean"},ahead:{type:"number"},behind:{type:"number"},error:{type:"string"}},required:["ok"]},Services:{type:"object",properties:{source:{type:"string",enum:["live","persisted","unavailable"]},services:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"},pid:{type:["number","null"]},restarts:{type:"number"},lastExitCode:{type:["number","null"]},blockedOn:{type:"array",items:{type:"string"}},command:{type:"string"}},required:["name","state"]}},tasks:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"}},required:["name","state"]}},ports:{type:"array",items:{type:"object",properties:{port:{type:"number"},service:{type:["string","null"]}},required:["port"]}},error:{type:"string"}},required:["source","services","tasks","ports"]}}}}},"docsHtml",0,function(){return`<!doctype html>
|
|
1
|
+
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},p={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>d};for(var c in p)s(a,c,{get:p[c],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function l(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...s]=l(e),{domain:n,expires:o,httponly:i,maxage:a,path:p,samesite:c,secure:d,partitioned:u,priority:y}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,b,f={name:t,value:decodeURIComponent(r),domain:n,...o&&{expires:new Date(o)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:p,...c&&{sameSite:h.includes(g=(g=c).toLowerCase())?g:void 0},...d&&{secure:!0},...y&&{priority:m.includes(b=(b=y).toLowerCase())?b:void 0},...u&&{partitioned:!0}};let e={};for(let t in f)f[t]&&(e[t]=f[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))i.call(e,a)||void 0===a||s(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(s({},"__esModule",{value:!0}),a);var h=["strict","lax","none"],m=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of l(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,o,i=[],a=0;function p(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,o=!1;p();)if(","===(r=e.charAt(a))){for(s=a,a+=1,p(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=n,i.push(e.substring(t,s)),t=a):a=s+1}else a+=1;(!o||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},48806,e=>{"use strict";let t={description:"Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}};e.s(["buildOpenApi",0,function(){return{openapi:"3.1.0",info:{title:"AgentBox Hub API",version:"1.0.0",description:'Launch and manage AgentBox sandboxes ("boxes") programmatically. Every endpoint except /health, /openapi.json and /docs requires an Authorization: Bearer <hub token> header (the token the hub prints on boot, also at ~/.agentbox/hub/token). Errors always return { error: { code, message, details? } }.'},servers:[{url:"/api/v1"}],security:[{bearerAuth:[]}],tags:[{name:"System",description:"Liveness and API version."},{name:"Boxes",description:"Create, inspect, and run lifecycle actions on boxes."},{name:"Box git",description:"Git state and operations on a box's branch."},{name:"Box services",description:"A box's agentbox.yaml service/task/port status."},{name:"Projects",description:"Register folders as projects and list their branches."},{name:"Providers",description:"Sandbox providers: status, credentials, base-image bake."},{name:"Approvals",description:"Pending host-action approvals."},{name:"Jobs",description:"Async create/bake job status and log streams."}],paths:{"/health":{get:{tags:["System"],summary:"Get liveness + API version",security:[],responses:{200:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/Health"}}}}}}},"/boxes":{get:{tags:["Boxes"],summary:"List boxes",responses:{200:{description:"Boxes",content:{"application/json":{schema:{type:"object",properties:{boxes:{type:"array",items:{$ref:"#/components/schemas/Box"}}},required:["boxes"]}}}},401:t}},post:{tags:["Boxes"],summary:"Create a box",description:'Async — returns a job id. agent "none" just creates the box without starting an agent (prompt ignored). provider defaults to docker; a cloud provider must be configured on the host (see GET /providers).',requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateBox"}}}},responses:{202:{description:"Accepted — build job enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}":{get:{tags:["Boxes"],summary:"Get one box",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Box",content:{"application/json":{schema:{$ref:"#/components/schemas/Box"}}}},401:t,404:t}}},"/boxes/{id}/{action}":{post:{tags:["Boxes"],summary:"Run a lifecycle action",description:"One of start | pause | resume | stop | destroy | screen. start brings a stopped box back up (resumes if paused, no-op if already running); it does not restart the agent session — that happens on the next attach. screen is the open-VNC prep step: it points the in-box browser at the box’s web app so the VNC desktop shows the app instead of a blank X screen — call it right before opening the box’s vncUrl.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"action",in:"path",required:!0,schema:{type:"string",enum:["start","pause","resume","stop","destroy","screen"]}}],responses:{200:{description:"Done",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/git":{get:{tags:["Box git"],summary:"Get the box's live git summary",description:"The worktree's current branch, dirty, ahead/behind.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Git info",content:{"application/json":{schema:{$ref:"#/components/schemas/GitInfo"}}}},401:t,404:t,503:t}}},"/boxes/{id}/git/{op}":{post:{tags:["Box git"],summary:"Run a git op on the box branch",description:"checkout {branch}; branch {name, from?} (create+switch a new agentbox/* branch); pull {remote?, ffOnly?}; push {remote?, force?}; push-host {as?, force?} (land in the host repo only, publishes nothing).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}},{name:"op",in:"path",required:!0,schema:{type:"string",enum:["checkout","branch","pull","push","push-host"]}}],requestBody:{required:!1,content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpBody"}}}},responses:{200:{description:"Done (git stdout/stderr)",content:{"application/json":{schema:{$ref:"#/components/schemas/GitOpResult"}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/branches":{get:{tags:["Box git"],summary:"List the box project's branches",description:"Local + remote branches and the current HEAD, for the box git-panel branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/boxes/{id}/services":{get:{tags:["Box services"],summary:"Get the box's service/task/port status",description:"From the box's agentbox.yaml — live, or the persisted snapshot when the box isn't running.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Services",content:{"application/json":{schema:{$ref:"#/components/schemas/Services"}}}},401:t,503:t}}},"/boxes/{id}/services/restart":{post:{tags:["Box services"],summary:"Restart services",description:"Restart one service (body {name}) or every service (empty body).",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{name:{type:"string"}}}}}},responses:{200:{description:"Restarted",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/boxes/{id}/open":{post:{tags:["Box services"],summary:"Open the box in a host app",description:"Launch the box in a host GUI app (Codex, VS Code/Cursor, cmux, Herdr, iTerm2) by re-shelling `agentbox open --in <app>`. Only works on a localhost hub running on macOS; a remote hub / non-macOS host refuses. An app must be installed and provider-eligible (e.g. Codex is Hetzner-only) — see GET /open-targets.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{app:{type:"string",enum:["codex","herdr","cmux","vscode","iterm2"]}},required:["app"]}}}},responses:{200:{description:"Launched",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,409:t,503:t}}},"/open-targets":{get:{tags:["Box services"],summary:"Which host apps this hub can open a box in",description:'Reports whether the hub can launch host GUI apps (`supported` — true only on a localhost hub on macOS) and, if so, which of Codex/Herdr/cmux/VS Code/iTerm2 are installed plus their provider eligibility. Backs the box detail page "Apps" launchers.',responses:{200:{description:"Open targets",content:{"application/json":{schema:{type:"object",properties:{supported:{type:"boolean"},targets:{type:["object","null"],additionalProperties:{type:"object",properties:{available:{type:"boolean"},providers:{type:"array",items:{type:"string"}}},required:["available"]}}},required:["supported","targets"]}}}},401:t}}},"/projects":{get:{tags:["Projects"],summary:"List registered projects",responses:{200:{description:"Projects",content:{"application/json":{schema:{type:"object",properties:{projects:{type:"array",items:{$ref:"#/components/schemas/Project"}}},required:["projects"]}}}},401:t}},post:{tags:["Projects"],summary:"Register a folder as a project",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{path:{type:"string",description:"Absolute path to the folder."}},required:["path"]}}}},responses:{200:{description:"Registered",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/projects/{id}":{delete:{tags:["Projects"],summary:"Unregister an empty project",description:"Folder/files on disk are untouched.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Removed",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},401:t,404:t,409:t,503:t}}},"/projects/{id}/branches":{get:{tags:["Projects"],summary:"List a project's branches",description:"Local + remote branches and the current HEAD, for the create-box base-branch picker.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Branches",content:{"application/json":{schema:{$ref:"#/components/schemas/BranchList"}}}},400:t,401:t,404:t,503:t}}},"/providers":{get:{tags:["Providers"],summary:"List sandbox providers",description:"With credential + baked status on this host.",responses:{200:{description:"Providers",content:{"application/json":{schema:{type:"object",properties:{providers:{type:"array",items:{$ref:"#/components/schemas/Provider"}}},required:["providers"]}}}},401:t}}},"/providers/{id}/credentials":{post:{tags:["Providers"],summary:"Set a provider's credentials",description:"API keys/tokens, validated then saved to secrets.env. Never echoes secret values.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",additionalProperties:{type:"string"},description:"Provider-specific fields, e.g. { apiKey } (e2b), { token } (hetzner), { apiKey } or { jwtToken, organizationId } (daytona), { token, teamId?, projectId? } (vercel)."}}}},responses:{200:{description:"Saved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,503:t}}},"/providers/{id}/prepare":{post:{tags:["Providers"],summary:"Bake a provider's base image",description:"Async — returns a job id. Progress streams over GET /jobs/{id}/logs.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]}}],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{force:{type:"boolean"},claudeInstall:{type:"string",enum:["native","npm"]}}}}}},responses:{202:{description:"Bake enqueued",content:{"application/json":{schema:{type:"object",properties:{jobId:{type:"string"}},required:["jobId"]}}}},400:t,401:t,409:t,503:t}}},"/approvals":{get:{tags:["Approvals"],summary:"List pending host-action approvals",responses:{200:{description:"Approvals",content:{"application/json":{schema:{type:"object",properties:{approvals:{type:"array",items:{$ref:"#/components/schemas/Approval"}}},required:["approvals"]}}}},401:t}}},"/approvals/{id}/answer":{post:{tags:["Approvals"],summary:"Answer a pending approval",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{answer:{type:"string",enum:["y","n"]}},required:["answer"]}}}},responses:{200:{description:"Resolved",content:{"application/json":{schema:{type:"object",properties:{ok:{const:!0}},required:["ok"]}}}},400:t,401:t,404:t,503:t}}},"/jobs/{id}":{get:{tags:["Jobs"],summary:"Get a create job status",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"Job",content:{"application/json":{schema:{$ref:"#/components/schemas/Job"}}}},401:t,404:t}}},"/jobs/{id}/logs":{get:{tags:["Jobs"],summary:"Stream a create job log (SSE)",description:"text/event-stream. Emits `open`, then `log` events per line, then a terminal `end` event with the final status.",parameters:[{name:"id",in:"path",required:!0,schema:{type:"string"}}],responses:{200:{description:"SSE stream",content:{"text/event-stream":{}}},401:t,404:t,503:t}}}},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",description:"The hub token (Authorization: Bearer <token>)."}},schemas:{Health:{type:"object",properties:{ok:{const:!0},apiVersion:{type:"string"},profile:{type:"string"}},required:["ok","apiVersion"]},Error:{type:"object",properties:{error:{type:"object",properties:{code:{type:"string"},message:{type:"string"},details:{}},required:["code","message"]}},required:["error"]},Box:{type:"object",properties:{id:{type:"string"},projectId:{type:"string"},repo:{type:"string"},branch:{type:"string"},task:{type:"string"},agent:{type:"string"},status:{type:"string",enum:["running","paused","stopped","creating","error"]},createdAt:{type:"number"},lastActivity:{type:"number"},host:{type:"string"},commits:{type:["number","null"]},filesTouched:{type:["number","null"]},error:{type:["string","null"]},displayName:{type:["string","null"],description:"Cosmetic user-set label (rename); null when unset"},webUrl:{type:["string","null"],description:"Host-openable web-service URL; null when absent/unreachable (e.g. paused)"},vncUrl:{type:["string","null"],description:"Host-openable VNC desktop URL; null when absent/unreachable"},state:{type:"string",enum:["running","paused","stopped","missing"],description:"Raw provider runtime state (host topology only). Absent on synthetic creating/error rows — presence distinguishes a real box whose agent errored from a failed create job."},name:{type:"string"},provider:{type:"string",description:"Raw provider id ('docker', 'daytona', …; plugin ids possible)"},projectRoot:{type:"string",description:"Absolute host path of the project. Host topology only — never emitted by the hosted plane"},projectIndex:{type:"number"},vncEnabled:{type:"boolean"},gitWorktrees:{type:"array",items:{type:"object",properties:{kind:{type:"string"},branch:{type:"string"}}}},claudeSessionTitle:{type:"string"},codexSessionTitle:{type:"string"},opencodeSessionTitle:{type:"string"},claudeActivity:{type:"string",description:"working | idle | waiting | end-plan | question | compacting | error | unknown"},codexActivity:{type:"string"}},required:["id","projectId","status","agent"]},Project:{type:"object",properties:{id:{type:"string"},name:{type:"string"},repo:{type:"string"},defaultBranch:{type:"string"},currentBranch:{type:"string",nullable:!0},needsSetup:{type:"boolean",description:"No agentbox.yaml + no default snapshot — the create form offers the setup wizard"},provider:{type:"string"},createdAt:{type:"number"}},required:["id","name"]},BranchList:{type:"object",properties:{current:{type:"string",nullable:!0,description:"The repo's current HEAD (the default base ref)"},branches:{type:"array",items:{type:"string"},description:"Local + remote-tracking branch names"}},required:["branches"]},Approval:{type:"object",properties:{id:{type:"string"},boxId:{type:"string"},message:{type:"string"},detail:{type:"string"},command:{type:"string"},cwd:{type:"string"},argv:{type:"array",items:{type:"string"}},defaultAnswer:{type:"string",enum:["y","n"]},createdAt:{type:"number"}},required:["id","boxId","message","defaultAnswer"]},Job:{type:"object",properties:{id:{type:"string"},status:{type:"string",enum:["queued","running","done","failed","cancelled"]},boxId:{type:"string"}},required:["id","status"]},CreateBox:{type:"object",properties:{projectId:{type:"string"},agent:{type:"string",enum:["claude","codex","opencode","none"]},provider:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"],default:"docker"},name:{type:"string"},prompt:{type:"string"},fromBranch:{type:"string",description:"Base ref the box's per-box branch forks from (branch / tag / SHA); default the project's HEAD"},setupWizard:{type:"boolean",description:'Seed the agent\'s first turn to generate agentbox.yaml (for projects with none). Inert for agent "none".'}},required:["projectId","agent"]},Provider:{type:"object",properties:{id:{type:"string",enum:["docker","daytona","hetzner","vercel","e2b"]},label:{type:"string"},configured:{type:"boolean",description:"Base image baked (usable for create) on this host."},hasCredentials:{type:"boolean",description:"Credentials present (docker: always true). Can be true while not yet configured (baked)."},jobId:{type:"string",description:"Id of an in-flight bake (prepare) job for this provider, if any."},reason:{type:"string"}},required:["id","label","configured"]},GitOpBody:{type:"object",description:"Union of git-op fields; only those for the chosen {op} are read (extras are ignored).",properties:{branch:{type:"string",description:"checkout: branch to switch to"},name:{type:"string",description:"branch: new branch name (agentbox/ prefix added when missing)"},from:{type:"string",description:"branch: base ref to fork from (default: box's HEAD)"},remote:{type:"string",description:"push/pull: remote name (default: origin)"},force:{type:"boolean",description:"push: force the remote push; push-host: overwrite the destination branch"},ffOnly:{type:"boolean",description:"pull: pass --ff-only to the merge"},as:{type:"string",description:"push-host: destination branch name in the host repo (default: the box's branch)"}}},GitOpResult:{type:"object",properties:{ok:{const:!0},stdout:{type:"string"},stderr:{type:"string"}},required:["ok"]},GitInfo:{type:"object",properties:{ok:{type:"boolean"},branch:{type:"string"},dirty:{type:"boolean"},ahead:{type:"number"},behind:{type:"number"},error:{type:"string"}},required:["ok"]},Services:{type:"object",properties:{source:{type:"string",enum:["live","persisted","unavailable"]},services:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"},pid:{type:["number","null"]},restarts:{type:"number"},lastExitCode:{type:["number","null"]},blockedOn:{type:"array",items:{type:"string"}},command:{type:"string"}},required:["name","state"]}},tasks:{type:"array",items:{type:"object",properties:{name:{type:"string"},state:{type:"string"}},required:["name","state"]}},ports:{type:"array",items:{type:"object",properties:{port:{type:"number"},service:{type:["string","null"]}},required:["port"]}},error:{type:"string"}},required:["source","services","tasks","ports"]}}}}},"docsHtml",0,function(){return`<!doctype html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>AgentBox Hub API</title>
|
|
@@ -9,6 +9,6 @@ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-
|
|
|
9
9
|
<script id="api-reference" data-url="/api/v1/openapi.json"></script>
|
|
10
10
|
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
|
11
11
|
</body>
|
|
12
|
-
</html>`}])},75050,e=>{"use strict";var t=e.i(56710),r=e.i(82809),s=e.i(74001),n=e.i(73300),o=e.i(68744),i=e.i(98570),a=e.i(56147),p=e.i(32931),c=e.i(61810),d=e.i(59963),l=e.i(44491),u=e.i(74916),h=e.i(33073),m=e.i(98603),y=e.i(93317),g=e.i(93695);e.i(95533);var b=e.i(75616),f=e.i(48806);e.s(["GET",0,function(){return new Response((0,f.docsHtml)(),{headers:{"content-type":"text/html; charset=utf-8"}})},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],83882);var v=e.i(83882);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/(dashboard)/api/v1/docs/route",pathname:"/api/v1/docs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/hub/app/(dashboard)/api/v1/docs/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:j,workUnitAsyncStorage:k,serverHooks:w}=x;async function A(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),x.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/(dashboard)/api/v1/docs/route";f=f.replace(/\/index$/,"")||"/";let v=await x.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:j,deploymentId:k,params:w,nextConfig:A,parsedUrl:q,isDraftMode:R,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,resolvedPathname:P,clientReferenceManifest:O,serverActionsManifest:_}=v,I=(0,a.normalizeAppPath)(f),T=!!(C.dynamicRoutes[I]||C.routes[P]),$=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(T&&!R){let e=!!C.routes[P],t=C.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await $();throw new g.NoFallbackError}}let H=null;!T||x.isDev||R||(H="/index"===(H=P)?"/":H);let N=!0===x.isDev||!T,U=T&&!N;_&&O&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:O,serverActionsManifest:_});let D=e.method||"GET",L=(0,o.getTracer)(),G=L.getActiveScopeSpan(),M=!!(null==S?void 0:S.isWrappedByNextServer),z=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,A,C,z);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let F={params:w,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:N,incrementalCache:K,cacheLifeProfiles:A.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>x.onRequestError(e,t,s,n,S)},sharedContext:{buildId:j,deploymentId:k}},
|
|
12
|
+
</html>`}])},75050,e=>{"use strict";var t=e.i(56710),r=e.i(82809),s=e.i(74001),n=e.i(73300),o=e.i(68744),i=e.i(98570),a=e.i(56147),p=e.i(32931),c=e.i(61810),d=e.i(59963),l=e.i(44491),u=e.i(74916),h=e.i(33073),m=e.i(98603),y=e.i(93317),g=e.i(93695);e.i(95533);var b=e.i(75616),f=e.i(48806);e.s(["GET",0,function(){return new Response((0,f.docsHtml)(),{headers:{"content-type":"text/html; charset=utf-8"}})},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],83882);var v=e.i(83882);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/(dashboard)/api/v1/docs/route",pathname:"/api/v1/docs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/hub/app/(dashboard)/api/v1/docs/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:j,workUnitAsyncStorage:k,serverHooks:w}=x;async function A(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),x.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/(dashboard)/api/v1/docs/route";f=f.replace(/\/index$/,"")||"/";let v=await x.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:j,deploymentId:k,params:w,nextConfig:A,parsedUrl:q,isDraftMode:R,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,resolvedPathname:P,clientReferenceManifest:O,serverActionsManifest:_}=v,I=(0,a.normalizeAppPath)(f),T=!!(C.dynamicRoutes[I]||C.routes[P]),$=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(T&&!R){let e=!!C.routes[P],t=C.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await $();throw new g.NoFallbackError}}let H=null;!T||x.isDev||R||(H="/index"===(H=P)?"/":H);let N=!0===x.isDev||!T,U=T&&!N;_&&O&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:O,serverActionsManifest:_});let D=e.method||"GET",L=(0,o.getTracer)(),G=L.getActiveScopeSpan(),M=!!(null==S?void 0:S.isWrappedByNextServer),z=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,A,C,z);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let F={params:w,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:N,incrementalCache:K,cacheLifeProfiles:A.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>x.onRequestError(e,t,s,n,S)},sharedContext:{buildId:j,deploymentId:k}},V=new p.NodeNextRequest(e),J=new p.NodeNextResponse(t),W=c.NextRequestAdapter.fromNodeNextRequest(V,(0,c.signalFromNodeResponse)(t));try{let n,i=async e=>x.handle(W,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${D} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${D} ${f}`)}),a=async n=>{var o,a;let p=async({previousCacheEntry:r})=>{try{if(!z&&E&&B&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=F.renderOpts.fetchMetrics;let a=F.renderOpts.pendingWaitUntil;a&&s.waitUntil&&(s.waitUntil(a),a=void 0);let p=F.renderOpts.collectedTags;if(!T)return await (0,u.sendResponse)(V,J,o,F.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);p&&(t[y.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,s=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:b.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,l.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:E})},!1,S),t}},c=await x.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:B,responseGenerator:p,waitUntil:s.waitUntil,isMinimalMode:z});if(!T)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==b.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(a=c.value)?void 0:a.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});z||t.setHeader("x-nextjs-cache",E?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),R&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(c.value.headers);return z&&T||d.delete(y.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(V,J,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};M&&G?await a(G):(n=L.getActiveScopeSpan(),await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${f}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},a),void 0,!M))}catch(t){if(t instanceof g.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,l.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:E})},!1,S),T)throw t;return await (0,u.sendResponse)(V,J,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:k})},"routeModule",0,x,"serverHooks",0,w,"workAsyncStorage",0,j,"workUnitAsyncStorage",0,k],75050)}];
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=%5Broot-of-the-server%5D__1qa4a0v._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[58099,a=>{"use strict";var b=a.i(33552),c=a.i(74455),d=a.i(17607),e=a.i(97187),f=a.i(71152),g=a.i(86834);function h({className:a,icon:c,title:d,children:e}){return(0,b.jsxs)("div",{className:(0,g.cn)("relative flex w-full items-start gap-3 rounded-xl border p-4",a),children:[c?(0,b.jsx)(c,{className:"mt-0.5 size-4 flex-none"}):null,(0,b.jsxs)("div",{className:"min-w-0",children:[d?(0,b.jsx)("div",{className:"mb-0.5 text-[13.5px] font-semibold leading-tight",children:d}):null,(0,b.jsx)("div",{className:"text-[12.5px] leading-normal",children:e})]})]})}var i=a.i(87883),j=a.i(80007),k=a.i(60401);function l({boxId:a}){let{state:c}=(0,j.useStore)(),f=c.approvals.filter(b=>b.boxId===a).sort((a,b)=>a.createdAt-b.createdAt);return 0===f.length?null:(0,b.jsxs)("div",{className:"mt-4 overflow-hidden rounded-xl border border-[var(--amber-line)] bg-[var(--amber-soft)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 border-b border-[var(--amber-line)] px-4 py-2.5",children:[(0,b.jsx)(e.Icons.shield,{className:"size-4 flex-none text-[var(--amber)]"}),(0,b.jsxs)("span",{className:"text-[13.5px] font-semibold",children:[f.length," pending approval",1===f.length?"":"s"]}),(0,b.jsx)("span",{className:"text-[12.5px] text-muted-foreground",children:"— this box is waiting on you."})]}),(0,b.jsx)("div",{className:"divide-y divide-[var(--amber-line)]",children:f.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"truncate font-mono text-[13px] text-secondary-foreground",children:a.command??a.message}),a.detail?(0,b.jsx)("div",{className:"mt-0.5 truncate text-[11.5px] text-muted-foreground",children:a.detail}):null,a.cwd?(0,b.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[#a4a9b0]",children:a.cwd}):null,(0,b.jsx)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:(0,b.jsx)(d.Ago,{ms:a.createdAt})})]}),(0,b.jsx)("div",{className:"flex-none pt-0.5",children:(0,b.jsx)(k.ApprovalActions,{id:a.id})})]},a.id))})]})}var m=a.i(50253),n=a.i(18071),o=a.i(3015);let p=[{app:"claude",label:"Claude",icon:"claude"},{app:"codex",label:"Codex",icon:"codex"},{app:"vscode",label:"VS Code",icon:"ext"},{app:"cmux",label:"cmux",icon:"terminal"},{app:"herdr",label:"Herdr",icon:"terminal"},{app:"iterm2",label:"iTerm2",icon:"terminal"},{app:"finder",label:"Finder",icon:"folder"}];function q({url:a}){let[c,d]=(0,m.useState)(!1),f=(0,m.useRef)(null);(0,m.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]);let g=(0,m.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),d(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>d(!1),1500)}catch{}},[a]);return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:g,children:[c?(0,b.jsx)(e.Icons.check,{}):(0,b.jsx)(e.Icons.copy,{}),c?"Copied":"Copy URL"]})}function r({box:a}){let{webUrl:c,vncUrl:d}=a,{eligible:f,pending:g,launch:h}=function(a){let[b,c]=(0,m.useState)(null),[d,e]=(0,m.useState)(null);(0,m.useEffect)(()=>{let a=!0;return(async()=>{try{let b=await fetch("/api/v1/open-targets",{credentials:"same-origin"});a&&c(b.ok?await b.json():null)}catch{a&&c(null)}})(),()=>{a=!1}},[]);let f=(0,m.useCallback)(async b=>{e(b);try{let c=await fetch(`/api/v1/boxes/${encodeURIComponent(a.id)}/open`,{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({app:b})});if(!c.ok){let a=await c.json().catch(()=>null);window.alert(`Open in ${b} failed: ${a?.error?.message??`HTTP ${c.status}`}`)}}catch(a){window.alert(`Open in ${b} failed: ${a instanceof Error?a.message:String(a)}`)}finally{e(null)}},[a.id]),g=b?.supported?b.targets:null;return{eligible:g?p.filter(({app:b})=>{let c=g[b];return c.available&&(!c.providers||c.providers.includes(a.provider))}):[],pending:d,launch:f}}(a);return c||d||0!==f.length?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.SectionLabel,{children:"Access"}),(0,b.jsxs)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:[c||d?(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:c?"Web":"VNC"}),(0,b.jsx)("div",{className:"mt-0.5 break-all font-mono text-[11.5px] text-muted-foreground",children:c??"Remote desktop"})]}),(0,b.jsxs)("div",{className:"flex flex-none flex-wrap gap-1.5",children:[c?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",href:c,target:"_blank",rel:"noreferrer",children:[(0,b.jsx)(e.Icons.ext,{}),"Open web"]}):null,c?(0,b.jsx)(q,{url:c}):null,d?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",href:d,target:"_blank",rel:"noreferrer",children:[(0,b.jsx)(e.Icons.ext,{}),"Open VNC"]}):null]})]}):null,f.length>0?(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:"Apps"}),(0,b.jsx)("div",{className:"mt-0.5 text-[11.5px] text-muted-foreground",children:"Open the box project from the host"})]}),(0,b.jsx)("div",{className:"flex flex-none flex-wrap justify-end gap-1.5",children:f.map(({app:a,label:c,icon:d})=>{let f=e.Icons[d];return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:null!==g,onClick:()=>void h(a),children:[(0,b.jsx)(f,{}),c]},a)})})]}):null]})]}):null}var s=a.i(24288),t=a.i(17236),u=a.i(51363);function v({k:a,v:c,mono:d,link:e}){return(0,b.jsxs)("div",{className:"grid grid-cols-[156px_1fr] items-baseline gap-4 px-4.5 p-3 max-sm:grid-cols-1 max-sm:gap-1",children:[(0,b.jsx)("div",{className:"font-mono text-xs text-muted-foreground",children:a}),(0,b.jsx)("div",{className:(0,g.cn)("min-w-0 text-[13.5px]",d?"font-mono text-[13px]":""),children:e?(0,b.jsx)(u.default,{className:"cursor-pointer text-primary",href:e,children:c}):c})]})}var w=a.i(12019),x=a.i(45515),y=a.i(85883),z=a.i(34537),A=a.i(53596),B=a.i(96664);let C=(0,B.createServerReference)("70fd109611adee18e2a11d04af4332c29e796848e9",B.callServer,void 0,B.findSourceMapURL,"gitBranchAction"),D=(0,B.createServerReference)("600e7ece96e4038f118842cef0ebcf51dadf743c9b",B.callServer,void 0,B.findSourceMapURL,"gitCheckoutAction"),E=(0,B.createServerReference)("605f4904ee0814a4a51c0445aa18e7dfbde590c7e5",B.callServer,void 0,B.findSourceMapURL,"gitPullAction"),F=(0,B.createServerReference)("60675b1179af1a57b7c4bb6e4d893805dd8f7b0b66",B.callServer,void 0,B.findSourceMapURL,"gitPushAction"),G=(0,B.createServerReference)("607692631dd5973ad6071d94f3fee9c7da56a766db",B.callServer,void 0,B.findSourceMapURL,"gitPushHostAction"),H=0;function I({toasts:a,dismiss:c}){return(0,b.jsx)("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex w-[340px] max-w-[calc(100vw-40px)] flex-col gap-2",children:a.map(a=>(0,b.jsxs)("div",{className:"anim-pop pointer-events-auto relative flex items-start gap-3 rounded-xl border border-border bg-card p-3.5 pr-9 shadow-[0_16px_40px_-18px_rgba(20,24,30,.35)]",children:[(0,b.jsx)("span",{className:(0,g.cn)("mt-0.5 grid h-6 w-6 flex-none place-items-center rounded-md border","error"===a.variant?"border-[var(--red-line)] bg-[var(--red-soft)] text-[var(--red)]":"border-[var(--green-line)] bg-accent text-primary"),children:"error"===a.variant?(0,b.jsx)(e.Icons.warn,{className:"size-3.5"}):(0,b.jsx)(e.Icons.check,{className:"size-3.5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold leading-tight",children:a.title}),a.detail?(0,b.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11.5px] leading-normal text-muted-foreground",children:a.detail}):null]}),(0,b.jsx)("button",{className:"absolute right-2.5 top-2.5 grid h-5 w-5 cursor-pointer place-items-center rounded border-0 bg-transparent text-[#a4a9b0] hover:text-foreground",onClick:()=>c(a.id),"aria-label":"Dismiss",children:(0,b.jsx)(e.Icons.x,{className:"size-3"})})]},a.id))})}function J({label:a,desc:c,children:d}){return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:a}),(0,b.jsx)("div",{className:"mt-0.5 font-mono text-[11.5px] text-muted-foreground",children:c})]}),(0,b.jsx)("div",{className:"flex flex-none flex-wrap gap-1.5",children:d})]})}function K({icon:a,disabled:c,onRun:d,children:e}){let[f,g]=(0,m.useState)(!1),h=async()=>{g(!0);try{await d()}finally{g(!1)}};return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:c||f,onClick:h,children:[f?(0,b.jsx)("span",{className:"spin",style:{width:12,height:12}}):(0,b.jsx)(a,{}),e]})}function L(a,b){let c=(a??"").trim()||(b??"").trim();return c?c.split("\n")[0]:void 0}function M({box:a}){let d=(0,c.useRouter)(),{toasts:f,push:h,dismiss:j}=function(){let[a,b]=(0,m.useState)([]),c=(0,m.useCallback)(a=>b(b=>b.filter(b=>b.id!==a)),[]);return{toasts:a,push:(0,m.useCallback)(a=>{let d=++H;b(b=>[...b,{id:d,...a}]),setTimeout(()=>c(d),4200)},[c]),dismiss:c}}(),[k,l]=(0,m.useState)(null),[o,p]=(0,m.useState)(null),q="running"!==a.status,r=(0,m.useCallback)(async()=>{try{let b=await fetch(`/api/v1/boxes/${encodeURIComponent(a.id)}/git`,{credentials:"same-origin"});l(b.ok?await b.json():null)}catch{l(null)}},[a.id]);(0,m.useEffect)(()=>{r()},[r]);let s=k?.ok&&k.branch?k.branch:a.branch||"—",t=()=>{r(),d.refresh()},u=async(a,b)=>{let c=await b();c.ok?(h({title:a,detail:L(c.stdout,c.stderr)}),t()):h({variant:"error",title:`${a} failed`,detail:c.error})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(i.Card,{className:(0,g.cn)("divide-y divide-border/60 overflow-hidden",q?"opacity-90":""),children:[q?(0,b.jsxs)("div",{className:"flex items-center gap-2.5 bg-[var(--amber-soft)] px-4.5 p-2.5 text-[12.5px] text-[var(--amber)]",children:[(0,b.jsx)(e.Icons.warn,{className:"size-3.5 flex-none"}),"Box is ",a.status," — git operations need a running box."]}):null,(0,b.jsxs)(J,{label:"Sync",desc:`origin ↔ ${s}`,children:[(0,b.jsx)(K,{icon:e.Icons.arrowL,disabled:q,onRun:()=>u("Pulled from origin",()=>E(a.id)),children:"Pull"}),(0,b.jsx)(K,{icon:e.Icons.ext,disabled:q,onRun:()=>u("Pushed to origin",()=>F(a.id)),children:"Push"}),(0,b.jsx)(K,{icon:e.Icons.host,disabled:q,onRun:()=>u("Pushed to host",()=>G(a.id)),children:"Push to host"})]}),(0,b.jsxs)(J,{label:"Branch",desc:`currently on ${s}`,children:[(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:q,onClick:()=>p("change"),children:[(0,b.jsx)(e.Icons.branch,{}),"Change branch"]}),(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:q,onClick:()=>p("new"),children:[(0,b.jsx)(e.Icons.plus,{}),"New branch"]})]})]}),"change"===o?(0,b.jsx)(P,{box:a,branch:s,onClose:()=>p(null),onDone:h,onRefresh:t}):null,"new"===o?(0,b.jsx)(Q,{box:a,onClose:()=>p(null),onDone:h,onRefresh:t}):null,(0,b.jsx)(I,{toasts:f,dismiss:j})]})}let N="__manual__";function O({boxId:a,value:c,onChange:d,id:e,headLabel:f,currentBranch:g}){let[h,i]=(0,m.useState)(null),[j,k]=(0,m.useState)(g??null),[l,n]=(0,m.useState)(!1);return((0,m.useEffect)(()=>{let b=!1;return(async()=>{try{let c=await fetch(`/api/v1/boxes/${encodeURIComponent(a)}/branches`,{credentials:"same-origin"}),d=c.ok?await c.json():null;if(b)return;d&&Array.isArray(d.branches)&&d.branches.length>0?(i(d.branches),g||"string"!=typeof d.current||k(d.current)):(i([]),n(!0))}catch{b||(i([]),n(!0))}})(),()=>{b=!0}},[a,g]),null===h)?(0,b.jsx)(A.Select,{id:e,value:"",disabled:!0,wrapperClassName:"w-full",children:(0,b.jsx)("option",{value:"",children:"Loading branches…"})}):l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y.Input,{id:e,className:"font-mono text-[13px]",autoFocus:!0,value:c,onChange:a=>d(a.target.value),placeholder:f?"HEAD":"feature-x"}),h.length>0?(0,b.jsx)("button",{type:"button",onClick:()=>{n(!1),d("")},className:"mt-1.5 cursor-pointer text-xs text-secondary-foreground underline-offset-2 hover:underline",children:"← Back to branch list"}):null]}):(0,b.jsxs)(A.Select,{id:e,value:c,wrapperClassName:"w-full",onChange:a=>{if(a.target.value===N){n(!0),d("");return}d(a.target.value)},children:[f?(0,b.jsx)("option",{value:"",children:f}):(0,b.jsx)("option",{value:"",disabled:!0,children:"Select a branch…"}),(0,b.jsx)("option",{value:N,children:"Other / type manually…"}),(0,b.jsx)("option",{disabled:!0,children:"────────────"}),h.map(a=>(0,b.jsxs)("option",{value:a,children:[a,a===j?" (current)":""]},a))]})}function P({box:a,branch:c,onClose:d,onDone:f,onRefresh:g}){let[h,i]=(0,m.useState)(""),[j,k]=(0,m.useState)(!1),[l,o]=(0,m.useState)(null),p=h.trim().length>0;return(0,b.jsxs)(x.Dialog,{onClose:d,className:"max-w-[440px]",children:[(0,b.jsxs)(x.DialogHeader,{children:[(0,b.jsx)(x.DialogIcon,{children:(0,b.jsx)(e.Icons.branch,{})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(x.DialogTitle,{children:"Change branch"}),(0,b.jsxs)(x.DialogDescription,{children:[a.id," · currently on ",c]})]})]}),(0,b.jsxs)(x.DialogBody,{children:[(0,b.jsx)(z.Label,{htmlFor:"gb-branch",children:"Branch"}),(0,b.jsx)(O,{boxId:a.id,id:"gb-branch",value:h,onChange:i,currentBranch:c}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"The branch must exist and not be checked out in another worktree."}),l?(0,b.jsx)("p",{className:"mt-2 break-words font-mono text-xs text-destructive",children:l}):null]}),(0,b.jsxs)(x.DialogFooter,{children:[(0,b.jsx)(n.Button,{variant:"outline",onClick:d,disabled:j,children:"Cancel"}),(0,b.jsxs)(n.Button,{onClick:()=>{p&&!j&&(k(!0),o(null),(async()=>{let b=await D(a.id,h.trim());b.ok?(f({title:"Branch changed",detail:L(b.stdout,b.stderr)}),d(),g()):(o(b.error),k(!1))})())},disabled:!p||j,children:[j?(0,b.jsx)("span",{className:"spin"}):(0,b.jsx)(e.Icons.check,{}),j?"Checking out…":"Change branch"]})]})]})}function Q({box:a,onClose:c,onDone:d,onRefresh:f}){let[g,h]=(0,m.useState)(""),[i,j]=(0,m.useState)(""),[k,l]=(0,m.useState)(!1),[o,p]=(0,m.useState)(null),q=g.trim().length>0,r=()=>{q&&!k&&(l(!0),p(null),(async()=>{let b=await C(a.id,g.trim(),i.trim()||void 0);b.ok?(d({title:"Branch created",detail:L(b.stdout,b.stderr)}),c(),f()):(p(b.error),l(!1))})())};return(0,b.jsxs)(x.Dialog,{onClose:c,className:"max-w-[440px]",children:[(0,b.jsxs)(x.DialogHeader,{children:[(0,b.jsx)(x.DialogIcon,{children:(0,b.jsx)(e.Icons.branch,{})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(x.DialogTitle,{children:"New branch"}),(0,b.jsxs)(x.DialogDescription,{children:[a.id," · branching in the box workspace"]})]})]}),(0,b.jsxs)(x.DialogBody,{children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)(z.Label,{htmlFor:"nb-name",children:"Name"}),(0,b.jsx)(y.Input,{id:"nb-name",className:"font-mono text-[13px]",autoFocus:!0,value:g,onChange:a=>h(a.target.value),onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"my-branch"}),(0,b.jsxs)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["An ",(0,b.jsx)("span",{className:"font-mono",children:"agentbox/"})," prefix is added when missing."]})]}),(0,b.jsxs)(z.Label,{htmlFor:"nb-from",children:["Base ref ",(0,b.jsx)("span",{className:"font-normal text-[#a4a9b0]",children:"(optional)"})]}),(0,b.jsx)(O,{boxId:a.id,id:"nb-from",value:i,onChange:j,headLabel:"Current HEAD (default)"}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Defaults to the box's current HEAD."}),o?(0,b.jsx)("p",{className:"mt-2 break-words font-mono text-xs text-destructive",children:o}):null]}),(0,b.jsxs)(x.DialogFooter,{children:[(0,b.jsx)(n.Button,{variant:"outline",onClick:c,disabled:k,children:"Cancel"}),(0,b.jsxs)(n.Button,{onClick:r,disabled:!q||k,children:[k?(0,b.jsx)("span",{className:"spin"}):(0,b.jsx)(e.Icons.plus,{}),k?"Creating…":"Create branch"]})]})]})}let R=(0,B.createServerReference)("6096ff4dd5616157cf1da6a977c271641a3ddce491",B.callServer,void 0,B.findSourceMapURL,"restartServiceAction"),S=new Set(["ready","running","done"]),T=new Set(["crashed","unhealthy","backoff","failed"]),U={up:"bg-[var(--green)]",bad:"bg-[var(--red)]",idle:"bg-[var(--amber)]"},V={up:"text-[var(--green-ink)]",bad:"text-[var(--red)]",idle:"text-[var(--amber)]"};function W({svc:a,disabled:c,onRestart:d}){var f;let h=(f=a.state,S.has(f)?"up":T.has(f)?"bad":"idle");return(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,b.jsx)("span",{className:(0,g.cn)("badge-dot",U[h]),"aria-hidden":!0}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] text-secondary-foreground",children:a.name}),(0,b.jsx)("span",{className:(0,g.cn)("font-mono text-xs",V[h]),children:a.state}),a.restarts>0?(0,b.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground",children:["↻",a.restarts]}):null,(0,b.jsx)(n.Button,{variant:"outline",size:"icon-sm",title:`Restart ${a.name}`,disabled:c,onClick:()=>d(a.name),children:(0,b.jsx)(e.Icons.refresh,{})})]})}function X({id:a,running:c}){let[d,f]=(0,m.useState)(null),[g,h]=(0,m.useState)(null),[j,k]=(0,m.useTransition)(),l=(0,m.useCallback)(async()=>{try{let b=await fetch(`/api/v1/boxes/${encodeURIComponent(a)}/services`,{credentials:"same-origin"});if(!b.ok)return void h(`status ${String(b.status)}`);f(await b.json()),h(null)}catch(a){h(a instanceof Error?a.message:String(a))}},[a]);(0,m.useEffect)(()=>{if(l(),!c)return;let a=setInterval(()=>void l(),4e3);return()=>clearInterval(a)},[l,c]);let p=b=>{k(async()=>{let c=await R(a,b);c.ok||window.alert(`Restart failed: ${c.error}`),await l()})},q=d?.services??[],r=q.length>0;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.SectionLabel,{right:r?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:!c||j,onClick:()=>p(void 0),children:[(0,b.jsx)(e.Icons.refresh,{}),"Restart all"]}):null,children:"Services"}),(0,b.jsx)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:d||g?g?(0,b.jsxs)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:["Could not load services (",g,")."]}):r?(0,b.jsxs)(b.Fragment,{children:[d?.source==="persisted"?(0,b.jsx)("div",{className:"bg-muted/30 px-4 py-1.5 font-mono text-[11px] text-muted-foreground",children:"persisted snapshot — box not running"}):null,q.map(a=>(0,b.jsx)(W,{svc:a,disabled:!c||j,onRestart:a=>p(a)},a.name))]}):(0,b.jsx)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:d?.source==="unavailable"?"No service status (box not running or no snapshot yet).":"No services declared in agentbox.yaml."}):(0,b.jsx)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:"Loading…"})})]})}var Y=a.i(82337);a.s(["default",0,function(){let{id:a}=(0,c.useParams)(),{box:g,project:k}=(0,j.useStore)(),m=g(a);if(!m)return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8",children:[(0,b.jsx)(s.BackLink,{to:"/",children:"All boxes"}),(0,b.jsx)(w.EmptyBox,{children:"This box no longer exists — it may have been destroyed."})]});let n=k(m.projectId);return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8 max-sm:px-4",children:[(0,b.jsx)(s.BackLink,{to:"/projects/"+m.projectId,children:n?n.name:"Project"}),(0,b.jsxs)("div",{className:"flex items-start gap-4 max-md:flex-col",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("h1",{className:"flex flex-wrap items-center gap-3 text-[25px] font-semibold leading-tight tracking-[-0.025em]",children:[m.task,(0,b.jsx)(f.StatusBadge,{status:m.status})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-sm text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.id})," ·"," ",(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.repo})," · ",m.host]})]}),(0,b.jsx)("div",{className:"ml-auto flex-none max-md:ml-0",children:(0,b.jsx)(t.BoxActions,{box:m,size:"lg"})})]}),m.error?(0,b.jsx)(h,{className:"mt-4 border-[var(--red-line)] bg-[var(--red-soft)] text-[var(--red)]",icon:e.Icons.warn,title:"Box errored",children:(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.error})}):null,(0,b.jsx)(l,{boxId:m.id}),(0,b.jsx)(o.SectionLabel,{children:"Overview"}),(0,b.jsxs)(Y.StatGrid,{children:[(0,b.jsx)(Y.Stat,{k:"Status",v:(0,b.jsx)(f.StatusBadge,{status:m.status})}),(0,b.jsx)(Y.Stat,{k:"Agent CLI",v:m.agent,mono:!0}),(0,b.jsx)(Y.Stat,{k:"Commits",v:m.commits??"—",icon:e.Icons.commit}),(0,b.jsx)(Y.Stat,{k:"Files touched",v:m.filesTouched??"—",icon:e.Icons.file}),(0,b.jsx)(Y.Stat,{k:"Last activity",v:(0,b.jsx)(d.Ago,{ms:m.lastActivity}),mono:!0})]}),(0,b.jsx)(r,{box:m}),(0,b.jsx)(o.SectionLabel,{children:"Git operations"}),(0,b.jsx)(M,{box:m}),(0,b.jsx)(X,{id:m.id,running:"running"===m.status}),(0,b.jsx)(o.SectionLabel,{children:"Details"}),(0,b.jsxs)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:[(0,b.jsx)(v,{k:"Box ID",v:m.id,mono:!0}),(0,b.jsx)(v,{k:"Project",v:n?n.name:"—",link:n?"/projects/"+m.projectId:null}),(0,b.jsx)(v,{k:"Repository",v:m.repo,mono:!0}),(0,b.jsx)(v,{k:"Branch",v:m.branch,mono:!0}),(0,b.jsx)(v,{k:"Host",v:m.host,mono:!0}),(0,b.jsx)(v,{k:"Created",v:new Date(m.createdAt).toLocaleString(),mono:!0})]})]})}],58099)}];
|
|
1
|
+
module.exports=[58099,a=>{"use strict";var b=a.i(33552),c=a.i(74455),d=a.i(17607),e=a.i(97187),f=a.i(71152),g=a.i(86834);function h({className:a,icon:c,title:d,children:e}){return(0,b.jsxs)("div",{className:(0,g.cn)("relative flex w-full items-start gap-3 rounded-xl border p-4",a),children:[c?(0,b.jsx)(c,{className:"mt-0.5 size-4 flex-none"}):null,(0,b.jsxs)("div",{className:"min-w-0",children:[d?(0,b.jsx)("div",{className:"mb-0.5 text-[13.5px] font-semibold leading-tight",children:d}):null,(0,b.jsx)("div",{className:"text-[12.5px] leading-normal",children:e})]})]})}var i=a.i(87883),j=a.i(80007),k=a.i(60401);function l({boxId:a}){let{state:c}=(0,j.useStore)(),f=c.approvals.filter(b=>b.boxId===a).sort((a,b)=>a.createdAt-b.createdAt);return 0===f.length?null:(0,b.jsxs)("div",{className:"mt-4 overflow-hidden rounded-xl border border-[var(--amber-line)] bg-[var(--amber-soft)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 border-b border-[var(--amber-line)] px-4 py-2.5",children:[(0,b.jsx)(e.Icons.shield,{className:"size-4 flex-none text-[var(--amber)]"}),(0,b.jsxs)("span",{className:"text-[13.5px] font-semibold",children:[f.length," pending approval",1===f.length?"":"s"]}),(0,b.jsx)("span",{className:"text-[12.5px] text-muted-foreground",children:"— this box is waiting on you."})]}),(0,b.jsx)("div",{className:"divide-y divide-[var(--amber-line)]",children:f.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"truncate font-mono text-[13px] text-secondary-foreground",children:a.command??a.message}),a.detail?(0,b.jsx)("div",{className:"mt-0.5 truncate text-[11.5px] text-muted-foreground",children:a.detail}):null,a.cwd?(0,b.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[#a4a9b0]",children:a.cwd}):null,(0,b.jsx)("div",{className:"mt-0.5 font-mono text-[11px] text-[#a4a9b0]",children:(0,b.jsx)(d.Ago,{ms:a.createdAt})})]}),(0,b.jsx)("div",{className:"flex-none pt-0.5",children:(0,b.jsx)(k.ApprovalActions,{id:a.id})})]},a.id))})]})}var m=a.i(50253),n=a.i(18071),o=a.i(3015);let p=[{app:"claude",label:"Claude",icon:"claude"},{app:"codex",label:"Codex",icon:"codex"},{app:"vscode",label:"VS Code",icon:"ext"},{app:"cmux",label:"cmux",icon:"terminal"},{app:"herdr",label:"Herdr",icon:"terminal"},{app:"iterm2",label:"iTerm2",icon:"terminal"},{app:"finder",label:"Finder",icon:"folder"}];function q({url:a}){let[c,d]=(0,m.useState)(!1),f=(0,m.useRef)(null);(0,m.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]);let g=(0,m.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),d(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>d(!1),1500)}catch{}},[a]);return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:g,children:[c?(0,b.jsx)(e.Icons.check,{}):(0,b.jsx)(e.Icons.copy,{}),c?"Copied":"Copy URL"]})}function r({box:a}){let{webUrl:c,vncUrl:d}=a,{eligible:f,pending:g,launch:h}=function(a){let[b,c]=(0,m.useState)(null),[d,e]=(0,m.useState)(null);(0,m.useEffect)(()=>{let a=!0;return(async()=>{try{let b=await fetch("/api/v1/open-targets",{credentials:"same-origin"});a&&c(b.ok?await b.json():null)}catch{a&&c(null)}})(),()=>{a=!1}},[]);let f=(0,m.useCallback)(async b=>{e(b);try{let c=await fetch(`/api/v1/boxes/${encodeURIComponent(a.id)}/open`,{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({app:b})});if(!c.ok){let a=await c.json().catch(()=>null);window.alert(`Open in ${b} failed: ${a?.error?.message??`HTTP ${c.status}`}`)}}catch(a){window.alert(`Open in ${b} failed: ${a instanceof Error?a.message:String(a)}`)}finally{e(null)}},[a.id]),g=b?.supported?b.targets:null;return{eligible:g?p.filter(({app:b})=>{let c=g[b];return c.available&&(!c.providers||c.providers.includes(a.provider))}):[],pending:d,launch:f}}(a);return c||d||0!==f.length?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.SectionLabel,{children:"Access"}),(0,b.jsxs)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:[c||d?(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:c?"Web":"VNC"}),(0,b.jsx)("div",{className:"mt-0.5 break-all font-mono text-[11.5px] text-muted-foreground",children:c??"Remote desktop"})]}),(0,b.jsxs)("div",{className:"flex flex-none flex-wrap gap-1.5",children:[c?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",href:c,target:"_blank",rel:"noreferrer",children:[(0,b.jsx)(e.Icons.ext,{}),"Open web"]}):null,c?(0,b.jsx)(q,{url:c}):null,d?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",href:d,target:"_blank",rel:"noreferrer",onClick:()=>{fetch(`/api/v1/boxes/${encodeURIComponent(a.id)}/screen`,{method:"POST",credentials:"same-origin"}).catch(()=>{})},children:[(0,b.jsx)(e.Icons.ext,{}),"Open VNC"]}):null]})]}):null,f.length>0?(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:"Apps"}),(0,b.jsx)("div",{className:"mt-0.5 text-[11.5px] text-muted-foreground",children:"Open the box project from the host"})]}),(0,b.jsx)("div",{className:"flex flex-none flex-wrap justify-end gap-1.5",children:f.map(({app:a,label:c,icon:d})=>{let f=e.Icons[d];return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:null!==g,onClick:()=>void h(a),children:[(0,b.jsx)(f,{}),c]},a)})})]}):null]})]}):null}var s=a.i(24288),t=a.i(17236),u=a.i(51363);function v({k:a,v:c,mono:d,link:e}){return(0,b.jsxs)("div",{className:"grid grid-cols-[156px_1fr] items-baseline gap-4 px-4.5 p-3 max-sm:grid-cols-1 max-sm:gap-1",children:[(0,b.jsx)("div",{className:"font-mono text-xs text-muted-foreground",children:a}),(0,b.jsx)("div",{className:(0,g.cn)("min-w-0 text-[13.5px]",d?"font-mono text-[13px]":""),children:e?(0,b.jsx)(u.default,{className:"cursor-pointer text-primary",href:e,children:c}):c})]})}var w=a.i(12019),x=a.i(45515),y=a.i(85883),z=a.i(34537),A=a.i(53596),B=a.i(96664);let C=(0,B.createServerReference)("70fd109611adee18e2a11d04af4332c29e796848e9",B.callServer,void 0,B.findSourceMapURL,"gitBranchAction"),D=(0,B.createServerReference)("600e7ece96e4038f118842cef0ebcf51dadf743c9b",B.callServer,void 0,B.findSourceMapURL,"gitCheckoutAction"),E=(0,B.createServerReference)("605f4904ee0814a4a51c0445aa18e7dfbde590c7e5",B.callServer,void 0,B.findSourceMapURL,"gitPullAction"),F=(0,B.createServerReference)("60675b1179af1a57b7c4bb6e4d893805dd8f7b0b66",B.callServer,void 0,B.findSourceMapURL,"gitPushAction"),G=(0,B.createServerReference)("607692631dd5973ad6071d94f3fee9c7da56a766db",B.callServer,void 0,B.findSourceMapURL,"gitPushHostAction"),H=0;function I({toasts:a,dismiss:c}){return(0,b.jsx)("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex w-[340px] max-w-[calc(100vw-40px)] flex-col gap-2",children:a.map(a=>(0,b.jsxs)("div",{className:"anim-pop pointer-events-auto relative flex items-start gap-3 rounded-xl border border-border bg-card p-3.5 pr-9 shadow-[0_16px_40px_-18px_rgba(20,24,30,.35)]",children:[(0,b.jsx)("span",{className:(0,g.cn)("mt-0.5 grid h-6 w-6 flex-none place-items-center rounded-md border","error"===a.variant?"border-[var(--red-line)] bg-[var(--red-soft)] text-[var(--red)]":"border-[var(--green-line)] bg-accent text-primary"),children:"error"===a.variant?(0,b.jsx)(e.Icons.warn,{className:"size-3.5"}):(0,b.jsx)(e.Icons.check,{className:"size-3.5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold leading-tight",children:a.title}),a.detail?(0,b.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11.5px] leading-normal text-muted-foreground",children:a.detail}):null]}),(0,b.jsx)("button",{className:"absolute right-2.5 top-2.5 grid h-5 w-5 cursor-pointer place-items-center rounded border-0 bg-transparent text-[#a4a9b0] hover:text-foreground",onClick:()=>c(a.id),"aria-label":"Dismiss",children:(0,b.jsx)(e.Icons.x,{className:"size-3"})})]},a.id))})}function J({label:a,desc:c,children:d}){return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4.5 p-3.5",children:[(0,b.jsxs)("div",{className:"min-w-[150px] flex-1",children:[(0,b.jsx)("div",{className:"text-[13.5px] font-medium",children:a}),(0,b.jsx)("div",{className:"mt-0.5 font-mono text-[11.5px] text-muted-foreground",children:c})]}),(0,b.jsx)("div",{className:"flex flex-none flex-wrap gap-1.5",children:d})]})}function K({icon:a,disabled:c,onRun:d,children:e}){let[f,g]=(0,m.useState)(!1),h=async()=>{g(!0);try{await d()}finally{g(!1)}};return(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:c||f,onClick:h,children:[f?(0,b.jsx)("span",{className:"spin",style:{width:12,height:12}}):(0,b.jsx)(a,{}),e]})}function L(a,b){let c=(a??"").trim()||(b??"").trim();return c?c.split("\n")[0]:void 0}function M({box:a}){let d=(0,c.useRouter)(),{toasts:f,push:h,dismiss:j}=function(){let[a,b]=(0,m.useState)([]),c=(0,m.useCallback)(a=>b(b=>b.filter(b=>b.id!==a)),[]);return{toasts:a,push:(0,m.useCallback)(a=>{let d=++H;b(b=>[...b,{id:d,...a}]),setTimeout(()=>c(d),4200)},[c]),dismiss:c}}(),[k,l]=(0,m.useState)(null),[o,p]=(0,m.useState)(null),q="running"!==a.status,r=(0,m.useCallback)(async()=>{try{let b=await fetch(`/api/v1/boxes/${encodeURIComponent(a.id)}/git`,{credentials:"same-origin"});l(b.ok?await b.json():null)}catch{l(null)}},[a.id]);(0,m.useEffect)(()=>{r()},[r]);let s=k?.ok&&k.branch?k.branch:a.branch||"—",t=()=>{r(),d.refresh()},u=async(a,b)=>{let c=await b();c.ok?(h({title:a,detail:L(c.stdout,c.stderr)}),t()):h({variant:"error",title:`${a} failed`,detail:c.error})};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(i.Card,{className:(0,g.cn)("divide-y divide-border/60 overflow-hidden",q?"opacity-90":""),children:[q?(0,b.jsxs)("div",{className:"flex items-center gap-2.5 bg-[var(--amber-soft)] px-4.5 p-2.5 text-[12.5px] text-[var(--amber)]",children:[(0,b.jsx)(e.Icons.warn,{className:"size-3.5 flex-none"}),"Box is ",a.status," — git operations need a running box."]}):null,(0,b.jsxs)(J,{label:"Sync",desc:`origin ↔ ${s}`,children:[(0,b.jsx)(K,{icon:e.Icons.arrowL,disabled:q,onRun:()=>u("Pulled from origin",()=>E(a.id)),children:"Pull"}),(0,b.jsx)(K,{icon:e.Icons.ext,disabled:q,onRun:()=>u("Pushed to origin",()=>F(a.id)),children:"Push"}),(0,b.jsx)(K,{icon:e.Icons.host,disabled:q,onRun:()=>u("Pushed to host",()=>G(a.id)),children:"Push to host"})]}),(0,b.jsxs)(J,{label:"Branch",desc:`currently on ${s}`,children:[(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:q,onClick:()=>p("change"),children:[(0,b.jsx)(e.Icons.branch,{}),"Change branch"]}),(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:q,onClick:()=>p("new"),children:[(0,b.jsx)(e.Icons.plus,{}),"New branch"]})]})]}),"change"===o?(0,b.jsx)(P,{box:a,branch:s,onClose:()=>p(null),onDone:h,onRefresh:t}):null,"new"===o?(0,b.jsx)(Q,{box:a,onClose:()=>p(null),onDone:h,onRefresh:t}):null,(0,b.jsx)(I,{toasts:f,dismiss:j})]})}let N="__manual__";function O({boxId:a,value:c,onChange:d,id:e,headLabel:f,currentBranch:g}){let[h,i]=(0,m.useState)(null),[j,k]=(0,m.useState)(g??null),[l,n]=(0,m.useState)(!1);return((0,m.useEffect)(()=>{let b=!1;return(async()=>{try{let c=await fetch(`/api/v1/boxes/${encodeURIComponent(a)}/branches`,{credentials:"same-origin"}),d=c.ok?await c.json():null;if(b)return;d&&Array.isArray(d.branches)&&d.branches.length>0?(i(d.branches),g||"string"!=typeof d.current||k(d.current)):(i([]),n(!0))}catch{b||(i([]),n(!0))}})(),()=>{b=!0}},[a,g]),null===h)?(0,b.jsx)(A.Select,{id:e,value:"",disabled:!0,wrapperClassName:"w-full",children:(0,b.jsx)("option",{value:"",children:"Loading branches…"})}):l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y.Input,{id:e,className:"font-mono text-[13px]",autoFocus:!0,value:c,onChange:a=>d(a.target.value),placeholder:f?"HEAD":"feature-x"}),h.length>0?(0,b.jsx)("button",{type:"button",onClick:()=>{n(!1),d("")},className:"mt-1.5 cursor-pointer text-xs text-secondary-foreground underline-offset-2 hover:underline",children:"← Back to branch list"}):null]}):(0,b.jsxs)(A.Select,{id:e,value:c,wrapperClassName:"w-full",onChange:a=>{if(a.target.value===N){n(!0),d("");return}d(a.target.value)},children:[f?(0,b.jsx)("option",{value:"",children:f}):(0,b.jsx)("option",{value:"",disabled:!0,children:"Select a branch…"}),(0,b.jsx)("option",{value:N,children:"Other / type manually…"}),(0,b.jsx)("option",{disabled:!0,children:"────────────"}),h.map(a=>(0,b.jsxs)("option",{value:a,children:[a,a===j?" (current)":""]},a))]})}function P({box:a,branch:c,onClose:d,onDone:f,onRefresh:g}){let[h,i]=(0,m.useState)(""),[j,k]=(0,m.useState)(!1),[l,o]=(0,m.useState)(null),p=h.trim().length>0;return(0,b.jsxs)(x.Dialog,{onClose:d,className:"max-w-[440px]",children:[(0,b.jsxs)(x.DialogHeader,{children:[(0,b.jsx)(x.DialogIcon,{children:(0,b.jsx)(e.Icons.branch,{})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(x.DialogTitle,{children:"Change branch"}),(0,b.jsxs)(x.DialogDescription,{children:[a.id," · currently on ",c]})]})]}),(0,b.jsxs)(x.DialogBody,{children:[(0,b.jsx)(z.Label,{htmlFor:"gb-branch",children:"Branch"}),(0,b.jsx)(O,{boxId:a.id,id:"gb-branch",value:h,onChange:i,currentBranch:c}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"The branch must exist and not be checked out in another worktree."}),l?(0,b.jsx)("p",{className:"mt-2 break-words font-mono text-xs text-destructive",children:l}):null]}),(0,b.jsxs)(x.DialogFooter,{children:[(0,b.jsx)(n.Button,{variant:"outline",onClick:d,disabled:j,children:"Cancel"}),(0,b.jsxs)(n.Button,{onClick:()=>{p&&!j&&(k(!0),o(null),(async()=>{let b=await D(a.id,h.trim());b.ok?(f({title:"Branch changed",detail:L(b.stdout,b.stderr)}),d(),g()):(o(b.error),k(!1))})())},disabled:!p||j,children:[j?(0,b.jsx)("span",{className:"spin"}):(0,b.jsx)(e.Icons.check,{}),j?"Checking out…":"Change branch"]})]})]})}function Q({box:a,onClose:c,onDone:d,onRefresh:f}){let[g,h]=(0,m.useState)(""),[i,j]=(0,m.useState)(""),[k,l]=(0,m.useState)(!1),[o,p]=(0,m.useState)(null),q=g.trim().length>0,r=()=>{q&&!k&&(l(!0),p(null),(async()=>{let b=await C(a.id,g.trim(),i.trim()||void 0);b.ok?(d({title:"Branch created",detail:L(b.stdout,b.stderr)}),c(),f()):(p(b.error),l(!1))})())};return(0,b.jsxs)(x.Dialog,{onClose:c,className:"max-w-[440px]",children:[(0,b.jsxs)(x.DialogHeader,{children:[(0,b.jsx)(x.DialogIcon,{children:(0,b.jsx)(e.Icons.branch,{})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(x.DialogTitle,{children:"New branch"}),(0,b.jsxs)(x.DialogDescription,{children:[a.id," · branching in the box workspace"]})]})]}),(0,b.jsxs)(x.DialogBody,{children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)(z.Label,{htmlFor:"nb-name",children:"Name"}),(0,b.jsx)(y.Input,{id:"nb-name",className:"font-mono text-[13px]",autoFocus:!0,value:g,onChange:a=>h(a.target.value),onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"my-branch"}),(0,b.jsxs)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["An ",(0,b.jsx)("span",{className:"font-mono",children:"agentbox/"})," prefix is added when missing."]})]}),(0,b.jsxs)(z.Label,{htmlFor:"nb-from",children:["Base ref ",(0,b.jsx)("span",{className:"font-normal text-[#a4a9b0]",children:"(optional)"})]}),(0,b.jsx)(O,{boxId:a.id,id:"nb-from",value:i,onChange:j,headLabel:"Current HEAD (default)"}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Defaults to the box's current HEAD."}),o?(0,b.jsx)("p",{className:"mt-2 break-words font-mono text-xs text-destructive",children:o}):null]}),(0,b.jsxs)(x.DialogFooter,{children:[(0,b.jsx)(n.Button,{variant:"outline",onClick:c,disabled:k,children:"Cancel"}),(0,b.jsxs)(n.Button,{onClick:r,disabled:!q||k,children:[k?(0,b.jsx)("span",{className:"spin"}):(0,b.jsx)(e.Icons.plus,{}),k?"Creating…":"Create branch"]})]})]})}let R=(0,B.createServerReference)("6096ff4dd5616157cf1da6a977c271641a3ddce491",B.callServer,void 0,B.findSourceMapURL,"restartServiceAction"),S=new Set(["ready","running","done"]),T=new Set(["crashed","unhealthy","backoff","failed"]),U={up:"bg-[var(--green)]",bad:"bg-[var(--red)]",idle:"bg-[var(--amber)]"},V={up:"text-[var(--green-ink)]",bad:"text-[var(--red)]",idle:"text-[var(--amber)]"};function W({svc:a,disabled:c,onRestart:d}){var f;let h=(f=a.state,S.has(f)?"up":T.has(f)?"bad":"idle");return(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,b.jsx)("span",{className:(0,g.cn)("badge-dot",U[h]),"aria-hidden":!0}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] text-secondary-foreground",children:a.name}),(0,b.jsx)("span",{className:(0,g.cn)("font-mono text-xs",V[h]),children:a.state}),a.restarts>0?(0,b.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground",children:["↻",a.restarts]}):null,(0,b.jsx)(n.Button,{variant:"outline",size:"icon-sm",title:`Restart ${a.name}`,disabled:c,onClick:()=>d(a.name),children:(0,b.jsx)(e.Icons.refresh,{})})]})}function X({id:a,running:c}){let[d,f]=(0,m.useState)(null),[g,h]=(0,m.useState)(null),[j,k]=(0,m.useTransition)(),l=(0,m.useCallback)(async()=>{try{let b=await fetch(`/api/v1/boxes/${encodeURIComponent(a)}/services`,{credentials:"same-origin"});if(!b.ok)return void h(`status ${String(b.status)}`);f(await b.json()),h(null)}catch(a){h(a instanceof Error?a.message:String(a))}},[a]);(0,m.useEffect)(()=>{if(l(),!c)return;let a=setInterval(()=>void l(),4e3);return()=>clearInterval(a)},[l,c]);let p=b=>{k(async()=>{let c=await R(a,b);c.ok||window.alert(`Restart failed: ${c.error}`),await l()})},q=d?.services??[],r=q.length>0;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o.SectionLabel,{right:r?(0,b.jsxs)(n.Button,{variant:"outline",size:"sm",disabled:!c||j,onClick:()=>p(void 0),children:[(0,b.jsx)(e.Icons.refresh,{}),"Restart all"]}):null,children:"Services"}),(0,b.jsx)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:d||g?g?(0,b.jsxs)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:["Could not load services (",g,")."]}):r?(0,b.jsxs)(b.Fragment,{children:[d?.source==="persisted"?(0,b.jsx)("div",{className:"bg-muted/30 px-4 py-1.5 font-mono text-[11px] text-muted-foreground",children:"persisted snapshot — box not running"}):null,q.map(a=>(0,b.jsx)(W,{svc:a,disabled:!c||j,onRestart:a=>p(a)},a.name))]}):(0,b.jsx)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:d?.source==="unavailable"?"No service status (box not running or no snapshot yet).":"No services declared in agentbox.yaml."}):(0,b.jsx)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:"Loading…"})})]})}var Y=a.i(82337);a.s(["default",0,function(){let{id:a}=(0,c.useParams)(),{box:g,project:k}=(0,j.useStore)(),m=g(a);if(!m)return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8",children:[(0,b.jsx)(s.BackLink,{to:"/",children:"All boxes"}),(0,b.jsx)(w.EmptyBox,{children:"This box no longer exists — it may have been destroyed."})]});let n=k(m.projectId);return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-[1080px] px-8 pb-16 pt-8 max-sm:px-4",children:[(0,b.jsx)(s.BackLink,{to:"/projects/"+m.projectId,children:n?n.name:"Project"}),(0,b.jsxs)("div",{className:"flex items-start gap-4 max-md:flex-col",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("h1",{className:"flex flex-wrap items-center gap-3 text-[25px] font-semibold leading-tight tracking-[-0.025em]",children:[m.task,(0,b.jsx)(f.StatusBadge,{status:m.status})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-sm text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.id})," ·"," ",(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.repo})," · ",m.host]})]}),(0,b.jsx)("div",{className:"ml-auto flex-none max-md:ml-0",children:(0,b.jsx)(t.BoxActions,{box:m,size:"lg"})})]}),m.error?(0,b.jsx)(h,{className:"mt-4 border-[var(--red-line)] bg-[var(--red-soft)] text-[var(--red)]",icon:e.Icons.warn,title:"Box errored",children:(0,b.jsx)("span",{className:"font-mono text-secondary-foreground",children:m.error})}):null,(0,b.jsx)(l,{boxId:m.id}),(0,b.jsx)(o.SectionLabel,{children:"Overview"}),(0,b.jsxs)(Y.StatGrid,{children:[(0,b.jsx)(Y.Stat,{k:"Status",v:(0,b.jsx)(f.StatusBadge,{status:m.status})}),(0,b.jsx)(Y.Stat,{k:"Agent CLI",v:m.agent,mono:!0}),(0,b.jsx)(Y.Stat,{k:"Commits",v:m.commits??"—",icon:e.Icons.commit}),(0,b.jsx)(Y.Stat,{k:"Files touched",v:m.filesTouched??"—",icon:e.Icons.file}),(0,b.jsx)(Y.Stat,{k:"Last activity",v:(0,b.jsx)(d.Ago,{ms:m.lastActivity}),mono:!0})]}),(0,b.jsx)(r,{box:m}),(0,b.jsx)(o.SectionLabel,{children:"Git operations"}),(0,b.jsx)(M,{box:m}),(0,b.jsx)(X,{id:m.id,running:"running"===m.status}),(0,b.jsx)(o.SectionLabel,{children:"Details"}),(0,b.jsxs)(i.Card,{className:"divide-y divide-border/60 overflow-hidden",children:[(0,b.jsx)(v,{k:"Box ID",v:m.id,mono:!0}),(0,b.jsx)(v,{k:"Project",v:n?n.name:"—",link:n?"/projects/"+m.projectId:null}),(0,b.jsx)(v,{k:"Repository",v:m.repo,mono:!0}),(0,b.jsx)(v,{k:"Branch",v:m.branch,mono:!0}),(0,b.jsx)(v,{k:"Host",v:m.host,mono:!0}),(0,b.jsx)(v,{k:"Created",v:new Date(m.createdAt).toLocaleString(),mono:!0})]})]})}],58099)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=apps_hub_app_%28dashboard%29_boxes_%5Bid%5D_page_tsx_1-j_972._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/12hWAUQ9O9G3VS4vxKuav/_buildManifest.js",
|
|
11
|
+
"static/12hWAUQ9O9G3VS4vxKuav/_ssgManifest.js",
|
|
12
|
+
"static/12hWAUQ9O9G3VS4vxKuav/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/1y49eldffr2-_.js",
|
|
@@ -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\":\"12hWAUQ9O9G3VS4vxKuav\"}\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>
|