agentroam-runtime-win32-x64 0.2.0-preview.22 → 0.2.0-preview.23

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/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "packageVersion": "0.2.0-preview.22",
2
+ "packageVersion": "0.2.0-preview.23",
3
3
  "target": "windows-amd64",
4
4
  "schemaVersion": 2,
5
5
  "minimumNodeVersion": "22.22.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentroam-runtime-win32-x64",
3
- "version": "0.2.0-preview.22",
3
+ "version": "0.2.0-preview.23",
4
4
  "description": "AgentRoam server runtime for Windows x64",
5
5
  "license": "MIT",
6
6
  "os": [
@@ -1 +1 @@
1
- aWNdihGfcWU3x-pPuMP1I
1
+ ZqeC5NkIDDyPiS-mzOs28
@@ -1 +1 @@
1
- {"/_not-found/page":"/_not-found","/api/auth/verify/route":"/api/auth/verify","/api/mcp/connect/route":"/api/mcp/connect","/api/mcp/disconnect/route":"/api/mcp/disconnect","/api/memory/[key]/route":"/api/memory/[key]","/api/memory/route":"/api/memory","/api/projects/[id]/route":"/api/projects/[id]","/api/plugins/load/route":"/api/plugins/load","/api/mcp/servers/route":"/api/mcp/servers","/api/projects/check/route":"/api/projects/check","/api/projects/directories/route":"/api/projects/directories","/api/projects/route":"/api/projects","/api/projects/roots/route":"/api/projects/roots","/api/remote-tools/register/route":"/api/remote-tools/register","/api/tools/route":"/api/tools","/api/skills/route":"/api/skills","/api/web-auth/logout/route":"/api/web-auth/logout","/api/web-auth/setup/route":"/api/web-auth/setup","/api/web-auth/login/route":"/api/web-auth/login","/api/web-console/history/route":"/api/web-console/history","/api/web-auth/revoke-all/route":"/api/web-auth/revoke-all","/api/web-console/preferences/route":"/api/web-console/preferences","/api/agent-workspaces/route":"/api/agent-workspaces","/api/agent/answer/route":"/api/agent/answer","/api/agent/abort/route":"/api/agent/abort","/api/agent/harness/status/route":"/api/agent/harness/status","/api/agent/model/route":"/api/agent/model","/api/agent/runtime-health/route":"/api/agent/runtime-health","/api/agent/steer/route":"/api/agent/steer","/api/agent-workspaces/[workspaceId]/sessions/route":"/api/agent-workspaces/[workspaceId]/sessions","/api/agent/models/route":"/api/agent/models","/api/business/route":"/api/business","/api/sessions/[id]/fork/route":"/api/sessions/[id]/fork","/api/sessions/[id]/handoff/route":"/api/sessions/[id]/handoff","/api/agent/run/route":"/api/agent/run","/api/sessions/[id]/query-index/route":"/api/sessions/[id]/query-index","/api/sessions/[id]/changes/route":"/api/sessions/[id]/changes","/api/sessions/[id]/release/route":"/api/sessions/[id]/release","/api/settings/route":"/api/settings","/api/sessions/[id]/goals/route":"/api/sessions/[id]/goals","/api/update/check/route":"/api/update/check","/api/agent/stream/route":"/api/agent/stream","/api/update/status/route":"/api/update/status","/api/update/install/route":"/api/update/install","/api/web-console/bootstrap/route":"/api/web-console/bootstrap","/api/sessions/[id]/route":"/api/sessions/[id]","/api/sessions/route":"/api/sessions","/api/sessions/[id]/tool-result/route":"/api/sessions/[id]/tool-result","/web/page":"/web","/api/web-auth/status/route":"/api/web-auth/status","/api/web-console/device-state/route":"/api/web-console/device-state"}
1
+ {"/_not-found/page":"/_not-found","/api/auth/verify/route":"/api/auth/verify","/api/mcp/disconnect/route":"/api/mcp/disconnect","/api/mcp/connect/route":"/api/mcp/connect","/api/memory/[key]/route":"/api/memory/[key]","/api/mcp/servers/route":"/api/mcp/servers","/api/memory/route":"/api/memory","/api/projects/[id]/route":"/api/projects/[id]","/api/plugins/load/route":"/api/plugins/load","/api/projects/check/route":"/api/projects/check","/api/projects/roots/route":"/api/projects/roots","/api/projects/directories/route":"/api/projects/directories","/api/projects/route":"/api/projects","/api/remote-tools/register/route":"/api/remote-tools/register","/api/skills/route":"/api/skills","/api/tools/route":"/api/tools","/api/web-auth/login/route":"/api/web-auth/login","/api/web-auth/revoke-all/route":"/api/web-auth/revoke-all","/api/web-auth/setup/route":"/api/web-auth/setup","/api/web-console/history/route":"/api/web-console/history","/api/web-console/preferences/route":"/api/web-console/preferences","/api/web-auth/logout/route":"/api/web-auth/logout","/web/page":"/web","/api/agent-workspaces/route":"/api/agent-workspaces","/api/agent-workspaces/[workspaceId]/sessions/route":"/api/agent-workspaces/[workspaceId]/sessions","/api/agent/abort/route":"/api/agent/abort","/api/agent/answer/route":"/api/agent/answer","/api/agent/model/route":"/api/agent/model","/api/agent/harness/status/route":"/api/agent/harness/status","/api/agent/models/route":"/api/agent/models","/api/agent/runtime-health/route":"/api/agent/runtime-health","/api/agent/steer/route":"/api/agent/steer","/api/agent/run/route":"/api/agent/run","/api/business/route":"/api/business","/api/sessions/[id]/fork/route":"/api/sessions/[id]/fork","/api/sessions/[id]/changes/route":"/api/sessions/[id]/changes","/api/agent/stream/route":"/api/agent/stream","/api/sessions/[id]/goals/route":"/api/sessions/[id]/goals","/api/sessions/[id]/release/route":"/api/sessions/[id]/release","/api/sessions/[id]/route":"/api/sessions/[id]","/api/sessions/[id]/handoff/route":"/api/sessions/[id]/handoff","/api/sessions/[id]/query-index/route":"/api/sessions/[id]/query-index","/api/sessions/route":"/api/sessions","/api/sessions/[id]/tool-result/route":"/api/sessions/[id]/tool-result","/api/settings/route":"/api/settings","/api/update/status/route":"/api/update/status","/api/update/check/route":"/api/update/check","/api/update/install/route":"/api/update/install","/api/web-console/bootstrap/route":"/api/web-console/bootstrap","/api/web-auth/status/route":"/api/web-auth/status","/api/web-console/device-state/route":"/api/web-console/device-state"}
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/aWNdihGfcWU3x-pPuMP1I/_buildManifest.js",
9
- "static/aWNdihGfcWU3x-pPuMP1I/_ssgManifest.js"
8
+ "static/ZqeC5NkIDDyPiS-mzOs28/_buildManifest.js",
9
+ "static/ZqeC5NkIDDyPiS-mzOs28/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [
12
12
  "static/chunks/webpack-daf53832c67c6b20.js",
@@ -1 +1 @@
1
- {"version":4,"routes":{"/api/mcp/servers":{"initialHeaders":{"content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/mcp/layout,_N_T_/api/mcp/servers/layout,_N_T_/api/mcp/servers/route,_N_T_/api/mcp/servers"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/mcp/servers","dataRoute":null},"/api/projects/roots":{"initialHeaders":{"cache-control":"no-store","content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/projects/layout,_N_T_/api/projects/roots/layout,_N_T_/api/projects/roots/route,_N_T_/api/projects/roots"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/projects/roots","dataRoute":null},"/api/tools":{"initialHeaders":{"content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/tools/layout,_N_T_/api/tools/route,_N_T_/api/tools"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/tools","dataRoute":null},"/web":{"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/web","dataRoute":"/web.rsc"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"6cad3158a6b432bc30d8a5b8988f589a","previewModeSigningKey":"a6c0579c39f75e642637b790dcdc607b040e38c758e7754e08aa06ef7a197c9d","previewModeEncryptionKey":"b5bb336fa134226b259d012a2c9438c39211a84b5519bcec9c4f6c4fbb466416"}}
1
+ {"version":4,"routes":{"/api/projects/roots":{"initialHeaders":{"cache-control":"no-store","content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/projects/layout,_N_T_/api/projects/roots/layout,_N_T_/api/projects/roots/route,_N_T_/api/projects/roots"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/projects/roots","dataRoute":null},"/api/mcp/servers":{"initialHeaders":{"content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/mcp/layout,_N_T_/api/mcp/servers/layout,_N_T_/api/mcp/servers/route,_N_T_/api/mcp/servers"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/mcp/servers","dataRoute":null},"/api/tools":{"initialHeaders":{"content-type":"application/json","x-next-cache-tags":"_N_T_/layout,_N_T_/api/layout,_N_T_/api/tools/layout,_N_T_/api/tools/route,_N_T_/api/tools"},"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/api/tools","dataRoute":null},"/web":{"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/web","dataRoute":"/web.rsc"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"0e735367c5d3d054ba8dfda642fe53a8","previewModeSigningKey":"502219f40dd396eb9bbf4df9f6a5c63a1125dc13ac6611271e2e6fb08ea0d99a","previewModeEncryptionKey":"36a6fcc9b4e2a019c122b7bd3131496933f680a0a230dba6c5c1b43ca7c77130"}}
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[1338,[],\"\"]\n4:I[1573,[],\"\"]\na:I[6554,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"aWNdihGfcWU3x-pPuMP1I\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[1338,[],\"\"]\n4:I[1573,[],\"\"]\na:I[6554,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"ZqeC5NkIDDyPiS-mzOs28\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
@@ -4,6 +4,6 @@
4
4
  5:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"}
5
5
  6:{"display":"inline-block"}
6
6
  7:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0}
7
- 0:["aWNdihGfcWU3x-pPuMP1I",[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["/_not-found",{"children":["__PAGE__",{},[["$L1",[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null],null],null]},[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","html",null,{"lang":"en","children":["$","body",null,{"children":[["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$4","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$5","children":"404"}],["$","div",null,{"style":"$6","children":["$","h2",null,{"style":"$7","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],["$","script",null,{"src":"/pwa/install.js","defer":true}]]}]}]],null],null],["$L8",["$","meta",null,{"name":"robots","content":"noindex"}]]]]]
7
+ 0:["ZqeC5NkIDDyPiS-mzOs28",[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["/_not-found",{"children":["__PAGE__",{},[["$L1",[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null],null],null]},[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","html",null,{"lang":"en","children":["$","body",null,{"children":[["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$4","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$5","children":"404"}],["$","div",null,{"style":"$6","children":["$","h2",null,{"style":"$7","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],["$","script",null,{"src":"/pwa/install.js","defer":true}]]}]}]],null],null],["$L8",["$","meta",null,{"name":"robots","content":"noindex"}]]]]]
8
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"AgentRoam"}],["$","meta","3",{"name":"description","content":"General-purpose AI agent API server"}],["$","link","4",{"rel":"manifest","href":"/manifest.webmanifest","crossOrigin":"use-credentials"}],["$","meta","5",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"AgentRoam"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/pwa/icon-192.png"}],["$","link","9",{"rel":"apple-touch-icon","href":"/pwa/icon-192.png"}]]
9
9
  1:null
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=2616,e.ids=[2616],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},2728:e=>{e.exports=import("@anthropic-ai/claude-agent-sdk")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},3636:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>d,requestAsyncStorage:()=>l,routeModule:()=>u,serverHooks:()=>p,staticGenerationAsyncStorage:()=>h});var n=r(7786),i=r(5042),a=r(2184),o=r(1321),c=e([o]);o=(c.then?(await c)():c)[0];let u=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/run/route",pathname:"/api/agent/run",filename:"route",bundlePath:"app/api/agent/run/route"},resolvedPagePath:"/Users/caoqu/team-agent/customer-agent/packages/server/app/api/agent/run/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:l,staticGenerationAsyncStorage:h,serverHooks:p}=u,g="/api/agent/run/route";function d(){return(0,a.patchFetch)({serverHooks:p,staticGenerationAsyncStorage:h})}s()}catch(e){s(e)}})},1321:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{POST:()=>u});var n=r(1890),i=r(132),a=r(4537),o=r(2083),c=r(1770),d=e([o]);async function u(e){try{let t=await e.json();if(!t.input)return n.NextResponse.json({error:"input is required"},{status:400});if(void 0!==t.agentIds&&(!Array.isArray(t.agentIds)||t.agentIds.length>20||t.agentIds.some(e=>"string"!=typeof e||!e.trim())))return n.NextResponse.json({error:"agentIds must contain at most 20 non-empty IDs"},{status:400});if(t.sessionId&&(0,o.V_)(t.sessionId)){let e=t.sessionId,r=(0,o.NL)(),s=await r.startRun(e,t.input,t.images,"web",{...t.nativeModel?.id?{model:t.nativeModel}:{},...t.nativeReasoningEffort?{reasoningEffort:t.nativeReasoningEffort}:{}});a.agentHost.resetExternalStream(e),a.agentHost.publishExternal(e,{type:"run_admitted",_nativeRunId:s.runId,_nativeSequence:s.snapshotRevision});let c=null,d=!1;return r.subscribe(e,0,({event:t})=>{a.agentHost.publishExternal(e,t),("done"===t.type||"error"===t.type)&&(d=!0,c?.())}).then(e=>{c=e,d&&e()}).catch(t=>{let r=t instanceof i.n?t.code:void 0;a.agentHost.publishExternal(e,{type:"error",message:t instanceof Error?t.message:"Native run subscription failed",...r?{code:r}:{}})}),n.NextResponse.json({sessionId:e,streamUrl:`/api/agent/stream?sessionId=${e}`,runId:s.runId,snapshotRevision:s.snapshotRevision})}let r=t.sessionId??crypto.randomUUID(),s=a.agentHost.getSessionStore(),d=await s.get(r);if(!d){let e=new Date().toISOString();d=await s.create({id:r,projectId:"",title:`Chat ${e}`,status:"idle",messages:[],events:[],created:e,updated:e,metadata:{}})}let u=(0,c.vJ)(t),l=a.agentHost.startRun(t.input,r,t.images,{...t.model?{model:t.model}:{},...t.reasoningEffort?{reasoningEffort:t.reasoningEffort}:{},...void 0===t.maxIterations?{}:{maxIterations:u.maxIterations},...void 0===t.maxTokens?{}:{maxTokens:u.maxTokens},...t.agentIds?{agentIds:t.agentIds}:{}});return l.completion.catch(e=>{console.error("Agent run error:",e)}),n.NextResponse.json({sessionId:d.id,streamUrl:`/api/agent/stream?sessionId=${d.id}`,runId:l.runId})}catch(o){let e=o instanceof i.n?o.code:void 0,t=o instanceof a.A?o.code:void 0,r=e??t,s="SESSION_OCCUPIED"===r||"SESSION_ALREADY_RUNNING"===r;return n.NextResponse.json({error:o instanceof Error?o.message:"Internal error",...r?{code:r}:{}},{status:s?409:500})}}o=(d.then?(await d)():d)[0],s()}catch(e){s(e)}})},1770:(e,t,r)=>{function s(e,t,r,s){return"number"==typeof e&&Number.isFinite(e)?Math.min(s,Math.max(r,Math.trunc(e))):t}function n(e){return{maxIterations:s(e.maxIterations,10,1,50),maxTokens:s(e.maxTokens,1e5,8e3,2e6)}}r.d(t,{vJ:()=>n})},1436:(e,t,r)=>{r.d(t,{N:()=>l});var s=r(1322),n=r(7561),i=r(9411);class a{constructor(e){this._acquired=!1,this.lockPath=e.replace(/scheduled_tasks\.json$/,".scheduler.lock")}get acquired(){return this._acquired}tryAcquire(){if(this._acquired)return!0;if((0,n.existsSync)(this.lockPath))try{let e=parseInt((0,n.readFileSync)(this.lockPath,"utf-8").trim(),10);if(!isNaN(e)&&e!==process.pid)try{return process.kill(e,0),!1}catch{}}catch{}try{let e=(0,i.dirname)(this.lockPath);return(0,n.existsSync)(e)||(0,n.mkdirSync)(e,{recursive:!0}),(0,n.writeFileSync)(this.lockPath,String(process.pid),"utf-8"),this._acquired=!0,!0}catch{return!1}}release(){if(this._acquired){try{(0,n.unlinkSync)(this.lockPath)}catch{}this._acquired=!1}}}class o{constructor(e,t,r){this.cronTasks=e,this.onFire=t,this.onTasksChanged=r,this.timer=null,this.watcher=null,this.started=!1,this.lock=new a(e.getFilePath())}start(){if(!this.started){if(!this.lock.tryAcquire()){console.warn("[CronScheduler] Another process holds the scheduler lock — skipping start.");return}this.started=!0,this.timer=setInterval(()=>{this.tick()},1e3),this.startFileWatcher(),console.log(`[CronScheduler] Started (PID=${process.pid})`)}}stop(){this.started&&(this.started=!1,this.timer&&(clearInterval(this.timer),this.timer=null),this.watcher&&(this.watcher.close(),this.watcher=null),this.lock.release(),console.log("[CronScheduler] Stopped."))}startFileWatcher(){let e=this.cronTasks.getFilePath(),t=(0,i.dirname)(e);if(!(0,n.existsSync)(t))try{(0,n.mkdirSync)(t,{recursive:!0})}catch{}try{this.watcher=(0,n.watch)(t,{persistent:!1},(e,t)=>{"scheduled_tasks.json"===t&&this.onTasksChanged(this.cronTasks.load())})}catch(e){console.warn("[CronScheduler] Could not start file watcher:",e)}}async tick(){let e=Date.now(),t=this.cronTasks.load(),r=!1;for(let n of t)n.enabled&&n.nextFireAt&&!(n.nextFireAt>e)&&(this.onFire(n),n.recurring?this.cronTasks.update(n.id,{nextFireAt:(0,s.Ilu)(n.cron,e),lastFiredAt:e}):this.cronTasks.delete(n.id),r=!0);r&&this.onTasksChanged(this.cronTasks.load())}}var c=r(785);class d{constructor(){this.tasks=new s.vo4((0,c.kO)()),this.scheduler=new o(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(4537).then(r.bind(r,4537)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(4537),r.e(732)]).then(r.bind(r,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await s().enqueue(n,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let u=globalThis;function l(){return u.__sharedCronService??=new d}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,4621,2083,4537],()=>r(3636));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=2616,e.ids=[2616],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},2728:e=>{e.exports=import("@anthropic-ai/claude-agent-sdk")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},3636:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>d,requestAsyncStorage:()=>l,routeModule:()=>u,serverHooks:()=>p,staticGenerationAsyncStorage:()=>h});var n=r(7786),i=r(5042),a=r(2184),o=r(7720),c=e([o]);o=(c.then?(await c)():c)[0];let u=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/run/route",pathname:"/api/agent/run",filename:"route",bundlePath:"app/api/agent/run/route"},resolvedPagePath:"/Users/caoqu/team-agent/customer-agent/packages/server/app/api/agent/run/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:l,staticGenerationAsyncStorage:h,serverHooks:p}=u,g="/api/agent/run/route";function d(){return(0,a.patchFetch)({serverHooks:p,staticGenerationAsyncStorage:h})}s()}catch(e){s(e)}})},7720:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{POST:()=>u});var n=r(1890),i=r(132),a=r(4537),o=r(2083),c=r(1770),d=e([o]);async function u(e){try{let t=await e.json();if(!t.input)return n.NextResponse.json({error:"input is required"},{status:400});if(void 0!==t.agentIds&&(!Array.isArray(t.agentIds)||t.agentIds.length>20||t.agentIds.some(e=>"string"!=typeof e||!e.trim())))return n.NextResponse.json({error:"agentIds must contain at most 20 non-empty IDs"},{status:400});if(t.sessionId&&(0,o.V_)(t.sessionId)){let e=t.sessionId,r=(0,o.NL)(),s=await r.startRun(e,t.input,t.images,"web",{...t.nativeModel?.id?{model:t.nativeModel}:{},...t.nativeReasoningEffort?{reasoningEffort:t.nativeReasoningEffort}:{}});a.agentHost.resetExternalStream(e),a.agentHost.publishExternal(e,{type:"run_admitted",_nativeRunId:s.runId,_nativeSequence:s.snapshotRevision});let c=null,d=!1;return r.subscribe(e,0,({event:t})=>{a.agentHost.publishExternal(e,t),("done"===t.type||"error"===t.type)&&(d=!0,c?.())}).then(e=>{c=e,d&&e()}).catch(t=>{let r=t instanceof i.n?t.code:void 0;a.agentHost.publishExternal(e,{type:"error",message:t instanceof Error?t.message:"Native run subscription failed",...r?{code:r}:{}})}),n.NextResponse.json({sessionId:e,streamUrl:`/api/agent/stream?sessionId=${e}`,runId:s.runId,snapshotRevision:s.snapshotRevision})}let r=t.sessionId??crypto.randomUUID(),s=a.agentHost.getSessionStore(),d=await s.get(r);if(!d){let e=new Date().toISOString();d=await s.create({id:r,projectId:"",title:`Chat ${e}`,status:"idle",messages:[],events:[],created:e,updated:e,metadata:{}})}let u=(0,c.vJ)(t),l=a.agentHost.startRun(t.input,r,t.images,{...t.model?{model:t.model}:{},...t.reasoningEffort?{reasoningEffort:t.reasoningEffort}:{},...void 0===t.maxIterations?{}:{maxIterations:u.maxIterations},...void 0===t.maxTokens?{}:{maxTokens:u.maxTokens},...t.agentIds?{agentIds:t.agentIds}:{}});return l.completion.catch(e=>{console.error("Agent run error:",e)}),n.NextResponse.json({sessionId:d.id,streamUrl:`/api/agent/stream?sessionId=${d.id}`,runId:l.runId})}catch(o){let e=o instanceof i.n?o.code:void 0,t=o instanceof a.A?o.code:void 0,r=e??t,s="SESSION_OCCUPIED"===r||"SESSION_ALREADY_RUNNING"===r;return n.NextResponse.json({error:o instanceof Error?o.message:"Internal error",...r?{code:r}:{}},{status:s?409:500})}}o=(d.then?(await d)():d)[0],s()}catch(e){s(e)}})},1770:(e,t,r)=>{function s(e,t,r,s){return"number"==typeof e&&Number.isFinite(e)?Math.min(s,Math.max(r,Math.trunc(e))):t}function n(e){return{maxIterations:s(e.maxIterations,10,1,50),maxTokens:s(e.maxTokens,1e5,8e3,2e6)}}r.d(t,{vJ:()=>n})},1436:(e,t,r)=>{r.d(t,{N:()=>l});var s=r(1322),n=r(7561),i=r(9411);class a{constructor(e){this._acquired=!1,this.lockPath=e.replace(/scheduled_tasks\.json$/,".scheduler.lock")}get acquired(){return this._acquired}tryAcquire(){if(this._acquired)return!0;if((0,n.existsSync)(this.lockPath))try{let e=parseInt((0,n.readFileSync)(this.lockPath,"utf-8").trim(),10);if(!isNaN(e)&&e!==process.pid)try{return process.kill(e,0),!1}catch{}}catch{}try{let e=(0,i.dirname)(this.lockPath);return(0,n.existsSync)(e)||(0,n.mkdirSync)(e,{recursive:!0}),(0,n.writeFileSync)(this.lockPath,String(process.pid),"utf-8"),this._acquired=!0,!0}catch{return!1}}release(){if(this._acquired){try{(0,n.unlinkSync)(this.lockPath)}catch{}this._acquired=!1}}}class o{constructor(e,t,r){this.cronTasks=e,this.onFire=t,this.onTasksChanged=r,this.timer=null,this.watcher=null,this.started=!1,this.lock=new a(e.getFilePath())}start(){if(!this.started){if(!this.lock.tryAcquire()){console.warn("[CronScheduler] Another process holds the scheduler lock — skipping start.");return}this.started=!0,this.timer=setInterval(()=>{this.tick()},1e3),this.startFileWatcher(),console.log(`[CronScheduler] Started (PID=${process.pid})`)}}stop(){this.started&&(this.started=!1,this.timer&&(clearInterval(this.timer),this.timer=null),this.watcher&&(this.watcher.close(),this.watcher=null),this.lock.release(),console.log("[CronScheduler] Stopped."))}startFileWatcher(){let e=this.cronTasks.getFilePath(),t=(0,i.dirname)(e);if(!(0,n.existsSync)(t))try{(0,n.mkdirSync)(t,{recursive:!0})}catch{}try{this.watcher=(0,n.watch)(t,{persistent:!1},(e,t)=>{"scheduled_tasks.json"===t&&this.onTasksChanged(this.cronTasks.load())})}catch(e){console.warn("[CronScheduler] Could not start file watcher:",e)}}async tick(){let e=Date.now(),t=this.cronTasks.load(),r=!1;for(let n of t)n.enabled&&n.nextFireAt&&!(n.nextFireAt>e)&&(this.onFire(n),n.recurring?this.cronTasks.update(n.id,{nextFireAt:(0,s.Ilu)(n.cron,e),lastFiredAt:e}):this.cronTasks.delete(n.id),r=!0);r&&this.onTasksChanged(this.cronTasks.load())}}var c=r(785);class d{constructor(){this.tasks=new s.vo4((0,c.kO)()),this.scheduler=new o(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(4537).then(r.bind(r,4537)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(4537),r.e(732)]).then(r.bind(r,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await s().enqueue(n,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let u=globalThis;function l(){return u.__sharedCronService??=new d}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,4621,2083,4537],()=>r(3636));module.exports=s})();
@@ -1,4 +1,4 @@
1
- (()=>{var e={};e.id=3541,e.ids=[3541],e.modules={2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},8664:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>o.a,__next_app__:()=>u,originalPathname:()=>p,pages:()=>c,routeModule:()=>b,tree:()=>d}),r(6742),r(489),r(4972),r(3028);var a=r(1772),n=r(5042),i=r(5663),o=r.n(i),s=r(4812),l={};for(let e in s)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>s[e]);r.d(t,l);let d=["",{children:["web",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,6742)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/web/page.tsx"]}]},{error:[()=>Promise.resolve().then(r.bind(r,489)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/web/error.tsx"]}]},{layout:[()=>Promise.resolve().then(r.bind(r,4972)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,3028,23)),"next/dist/client/components/not-found-error"]}],c=["/Users/caoqu/team-agent/customer-agent/packages/server/app/web/page.tsx"],p="/web/page",u={require:r,loadChunk:()=>Promise.resolve()},b=new a.AppPageRouteModule({definition:{kind:n.x.APP_PAGE,page:"/web/page",pathname:"/web",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},8490:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,1782,23)),Promise.resolve().then(r.t.bind(r,8949,23)),Promise.resolve().then(r.t.bind(r,6569,23)),Promise.resolve().then(r.t.bind(r,8718,23)),Promise.resolve().then(r.t.bind(r,7415,23)),Promise.resolve().then(r.t.bind(r,8781,23))},8589:(e,t,r)=>{Promise.resolve().then(r.bind(r,8383))},3703:(e,t,r)=>{Promise.resolve().then(r.bind(r,7919))},2027:()=>{},6476:()=>{},1166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let a=r(7094);r(3517),r(5921);let n=a._(r(4079));function i(e,t){var r;let a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};"function"==typeof e&&(a.loader=e);let i={...a,...t};return(0,n.default)({...i,modules:null==(r=i.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=r(93);function n(e){let{reason:t,children:r}=e;throw new a.BailoutToCSRError(t)}},4079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let a=r(3517),n=r(5921),i=r(1803),o=r(5259);function s(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},d=function(e){let t={...l,...e},r=(0,n.lazy)(()=>t.loader().then(s)),d=t.loading;function c(e){let s=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,l=t.ssr?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.PreloadCss,{moduleIds:t.modules}),(0,a.jsx)(r,{...e})]}):(0,a.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(n.Suspense,{fallback:s,children:l})}return c.displayName="LoadableComponent",c}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return i}});let a=r(3517),n=r(4580);function i(e){let{moduleIds:t}=e,r=(0,n.getExpectedRequestStore)("next/dynamic css"),i=[];if(r.reactLoadableManifest&&t){let e=r.reactLoadableManifest;for(let r of t){if(!e[r])continue;let t=e[r].files.filter(e=>e.endsWith(".css"));i.push(...t)}}return 0===i.length?null:(0,a.jsx)(a.Fragment,{children:i.map(e=>(0,a.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:r.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},4684:(e,t,r)=>{"use strict";r(6476);var a=r(5921),n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(a),i="undefined"!=typeof process&&process.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,s=void 0===n?i:n;l(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",l("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;l(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){return l(o(e),"`insertRule` accepts only strings"),"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++},t.replaceRule=function(e,t){this._optimizeForSpeed;var r=this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}return e},t.deleteRule=function(e){this._serverSheet.deleteRule(e)},t.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},t.cssRules=function(){return this._serverSheet.cssRules},t.makeStyleTag=function(e,t,r){t&&l(o(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var n=document.head||document.getElementsByTagName("head")[0];return r?n.insertBefore(a,r):n.appendChild(a),a},function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},c={};function p(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return c[a]||(c[a]="jsx-"+d(e+"-"+r)),c[a]}function u(e,t){var r=e+(t=t.replace(/\/style/gi,"\\/style"));return c[r]||(c[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),c[r]}var b=a.createContext(null);b.displayName="StyleSheetContext",n.default.useInsertionEffect||n.default.useLayoutEffect;var f=void 0;function m(e){var t=f||a.useContext(b);return t&&t.add(e),null}m.dynamic=function(e){return e.map(function(e){return p(e[0],e[1])}).join(" ")},t.style=m},7314:(e,t,r)=>{"use strict";e.exports=r(4684).style},8383:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var a=r(3517);function n({reset:e}){return(0,a.jsxs)("main",{role:"alert",style:{padding:32,fontFamily:"system-ui",lineHeight:1.8},children:[a.jsx("h1",{children:"页面加载失败"}),a.jsx("p",{children:"请重试;如果仍无法打开,请检查网络,并确认电脑上的 AgentRoam 正在运行。"}),a.jsx("button",{type:"button",onClick:e,children:"重试"})," ",a.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"刷新页面"})]})}},7919:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});var a=r(3517),n=r(1166),i=r.n(n),o=r(5921);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=(0,o.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:s,...c},p)=>(0,o.createElement)("svg",{ref:p,...d,width:t,height:t,stroke:e,strokeWidth:a?24*Number(r)/Number(t):r,className:l("lucide",n),...c},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(i)?i:[i]])),p=(e,t)=>{let r=(0,o.forwardRef)(({className:r,...a},n)=>(0,o.createElement)(c,{ref:n,iconNode:t,className:l(`lucide-${s(e)}`,r),...a}));return r.displayName=`${e}`,r},u=p("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),b=p("MonitorUp",[["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}],["path",{d:"M12 13V7",key:"h0r20n"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]),f=p("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),m=p("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),x=p("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),g=p("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),h=p("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),y={background:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",borderColor:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",color:"var(--ui-primary-text)"};function v(){let[e,t]=(0,o.useState)(!1),[r,n]=(0,o.useState)(!1),i=(0,o.useRef)(null);return(0,a.jsxs)(a.Fragment,{children:[e&&a.jsx("button",{type:"button",className:"file-drawer-toggle pwa-install-button",style:y,title:"添加到主屏幕","aria-label":"添加到主屏幕",onClick:()=>window.dispatchEvent(new Event("agentroam:pwa-install")),children:(0,a.jsxs)("span",{style:{position:"relative",display:"flex"},children:[a.jsx(g,{size:17,"aria-hidden":"true"}),a.jsx(h,{size:9,strokeWidth:3,"aria-hidden":"true",style:{position:"absolute",right:-4,bottom:-2}})]})}),r&&(0,a.jsxs)("dialog",{ref:i,onClose:()=>n(!1),"aria-labelledby":"pwa-install-title",style:{maxWidth:340,width:"calc(100% - 40px)",margin:"auto",padding:24,borderRadius:16,border:"1px solid var(--ui-tabbar-border)",background:"var(--ui-root-bg)",color:"var(--ui-text)",whiteSpace:"normal",font:"14px/1.8 system-ui"},children:[a.jsx("h2",{id:"pwa-install-title",style:{margin:"0 0 12px",fontSize:18},children:"添加到主屏幕"}),a.jsx("p",{children:"iPhone / iPad:在 Safari 点击分享按钮,选择“添加到主屏幕”,再点“添加”。"}),a.jsx("p",{children:"Android:打开浏览器菜单,选择“安装应用”或“添加到主屏幕”。"}),a.jsx("p",{style:{color:"var(--ui-muted-text)"},children:"浏览器需要你确认,网页无法自动添加。从主屏幕打开后,如提示未配对,请重新扫码。"}),a.jsx("button",{type:"button",style:{...y,width:"100%",padding:"10px 14px",borderStyle:"solid",borderWidth:1,borderRadius:8,cursor:"pointer"},onClick:()=>i.current?.close(),children:"知道了"})]})]})}let w=["codex","claude agents","opencode","agent-tui"],k={watcherFrame:4,producerFrame:5};var j=r(7314),z=r.n(j);let S=p("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);function C({children:e}){let t=function(){let[e,t]=(0,o.useState)("loading"),[r,a]=(0,o.useState)(null),[n]=(0,o.useState)("same-origin"),[i,s]=(0,o.useState)(null),l=(0,o.useCallback)(async()=>{t("loading"),s(null);try{let e=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if(401===e.status||423===e.status){window.location.reload();return}if(!e.ok)throw Error(`HTTP ${e.status}`);let r=await e.json();a(r.user),t("authenticated")}catch{s("无法连接远程控制台"),t("needsLogin")}},[]),d=(0,o.useCallback)(async()=>{let e=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if((401===e.status||423===e.status)&&window.location.reload(),!e.ok)throw Error("bootstrap failed");let r=await e.json();return a(r.user),t("authenticated"),r.wsNonce},[]),c=(0,o.useCallback)(async()=>(window.location.reload(),!1),[]);return{status:e,user:r,error:i,csrfToken:n,setup:c,login:c,logout:(0,o.useCallback)(async()=>{let e=await fetch("/api/pairing/logout",{method:"POST",credentials:"same-origin"});e.ok||401===e.status||423===e.status?window.location.reload():s("退出失败,请重试")},[]),refresh:l,getWsNonce:d}}(),[r,n]=(0,o.useState)(()=>Date.now()),[i,s]=(0,o.useState)(()=>Date.now());if("authenticated"===t.status)return a.jsx(a.Fragment,{children:e(t)});let l=!t.error;return(0,a.jsxs)("main",{className:`jsx-3fdfcb7d409f1983 remote-gate${l?" is-connecting":" is-error"}`,children:[a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-grid"}),a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-stream remote-stream-left"}),a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-stream remote-stream-right"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-content",children:[(0,a.jsxs)("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-scene",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-beam"}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-one"}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-two"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-device",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-device-back"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-screen",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-screen-scan"}),a.jsx(S,{size:44,strokeWidth:1.25})]}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-device-stand"})]})]}),(0,a.jsxs)("div",{role:l?"status":"alert","aria-label":l?"正在连接远程控制台":t.error||void 0,className:"jsx-3fdfcb7d409f1983 remote-status",children:[a.jsx(S,{size:20,strokeWidth:1.8,"aria-hidden":"true"}),a.jsx("span",{className:"jsx-3fdfcb7d409f1983",children:t.error||"远程连接中"}),l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-elapsed",children:["\xb7 已持续 ",Math.max(0,Math.floor((i-r)/1e3))," 秒"]})]})]}),a.jsx(z(),{id:"3fdfcb7d409f1983",children:'.remote-gate.jsx-3fdfcb7d409f1983{position:relative;min-height:100dvh;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;overflow:hidden;background:-webkit-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-webkit-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:-moz-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-moz-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:-o-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-o-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:linear-gradient(118deg,rgba(45,112,124,.2),transparent 31%),linear-gradient(248deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);backdrop-filter:blur(8px)saturate(1.12);-webkit-backdrop-filter:blur(8px)saturate(1.12);color:#e8e8ee;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.remote-gate.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;inset:0;pointer-events:none;background-image:-webkit-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-webkit-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:-moz-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-moz-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:-o-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-o-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),linear-gradient(90deg,rgba(102,166,255,.045)1px,transparent 1px);-webkit-background-size:56px 56px;-moz-background-size:56px 56px;-o-background-size:56px 56px;background-size:56px 56px;-webkit-mask-image:-webkit-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-webkit-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-moz-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-o-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 5%,#000 48%,transparent 100%);opacity:.82}.remote-grid.jsx-3fdfcb7d409f1983{position:absolute;left:-22%;right:-22%;bottom:-28%;height:70%;-webkit-transform:perspective(440px)rotatex(64deg);-moz-transform:perspective(440px)rotatex(64deg);transform:perspective(440px)rotatex(64deg);-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;-ms-transform-origin:center bottom;-o-transform-origin:center bottom;transform-origin:center bottom;background-image:-webkit-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-webkit-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:-moz-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-moz-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:-o-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-o-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),linear-gradient(90deg,rgba(101,165,255,.14)1px,transparent 1px);-webkit-background-size:46px 46px;-moz-background-size:46px 46px;-o-background-size:46px 46px;background-size:46px 46px;-webkit-mask-image:-webkit-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-webkit-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-moz-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-o-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:linear-gradient(to bottom,transparent 4%,#000 60%,transparent 96%);opacity:.72}.remote-stream.jsx-3fdfcb7d409f1983{position:absolute;top:-12%;width:1px;height:124%;background:-webkit-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:-moz-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:-o-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:linear-gradient(to bottom,transparent,rgba(96,222,196,.5),transparent 72%);opacity:.55;-webkit-transform:rotate(18deg);-moz-transform:rotate(18deg);-ms-transform:rotate(18deg);-o-transform:rotate(18deg);transform:rotate(18deg);-webkit-transform-origin:top;-moz-transform-origin:top;-ms-transform-origin:top;-o-transform-origin:top;transform-origin:top}.remote-stream.jsx-3fdfcb7d409f1983::after{content:"";position:absolute;left:-2px;top:24%;width:5px;height:54px;background:-webkit-linear-gradient(top,transparent,#8cf3dd,transparent);background:-moz-linear-gradient(top,transparent,#8cf3dd,transparent);background:-o-linear-gradient(top,transparent,#8cf3dd,transparent);background:linear-gradient(to bottom,transparent,#8cf3dd,transparent);-webkit-filter:blur(1px);filter:blur(1px);-webkit-animation:streamFlow 2.6s linear infinite;-moz-animation:streamFlow 2.6s linear infinite;-o-animation:streamFlow 2.6s linear infinite;animation:streamFlow 2.6s linear infinite}.remote-stream-left.jsx-3fdfcb7d409f1983{left:16%}.remote-stream-right.jsx-3fdfcb7d409f1983{right:18%;-webkit-transform:rotate(-15deg);-moz-transform:rotate(-15deg);-ms-transform:rotate(-15deg);-o-transform:rotate(-15deg);transform:rotate(-15deg)}.remote-stream-right.jsx-3fdfcb7d409f1983::after{-webkit-animation-delay:-1.3s;-moz-animation-delay:-1.3s;-o-animation-delay:-1.3s;animation-delay:-1.3s}.remote-content.jsx-3fdfcb7d409f1983{position:relative;z-index:1;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.remote-scene.jsx-3fdfcb7d409f1983{position:relative;width:220px;height:154px;-webkit-perspective:520px;-moz-perspective:520px;perspective:520px;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;transform-style:preserve-3d}.remote-beam.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:50%;width:184px;height:2px;-webkit-transform:translate(-50%,-50%)rotatex(68deg);-moz-transform:translate(-50%,-50%)rotatex(68deg);-ms-transform:translate(-50%,-50%)rotatex(68deg);-o-transform:translate(-50%,-50%)rotatex(68deg);transform:translate(-50%,-50%)rotatex(68deg);background:-webkit-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:-moz-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:-o-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:linear-gradient(90deg,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);-webkit-box-shadow:0 0 16px rgba(105,222,205,.5);-moz-box-shadow:0 0 16px rgba(105,222,205,.5);box-shadow:0 0 16px rgba(105,222,205,.5);-webkit-animation:beamConnect 1.8s ease-in-out infinite;-moz-animation:beamConnect 1.8s ease-in-out infinite;-o-animation:beamConnect 1.8s ease-in-out infinite;animation:beamConnect 1.8s ease-in-out infinite}.remote-pulse.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:47%;width:132px;height:86px;border:1px solid rgba(112,231,207,.42);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-ms-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);opacity:0;-webkit-animation:signalPulse 2.4s ease-out infinite;-moz-animation:signalPulse 2.4s ease-out infinite;-o-animation:signalPulse 2.4s ease-out infinite;animation:signalPulse 2.4s ease-out infinite}.remote-pulse-two.jsx-3fdfcb7d409f1983{-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;-o-animation-delay:1.2s;animation-delay:1.2s}.remote-device.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:50%;width:136px;height:108px;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-ms-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-webkit-animation:deviceFloat 3.2s ease-in-out infinite;-moz-animation:deviceFloat 3.2s ease-in-out infinite;-o-animation:deviceFloat 3.2s ease-in-out infinite;animation:deviceFloat 3.2s ease-in-out infinite}.remote-device-back.jsx-3fdfcb7d409f1983{position:absolute;inset:3px 2px 17px 7px;border:1px solid rgba(118,177,255,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background:rgba(14,18,27,.68);-webkit-transform:translatez(-12px)translate(7px,6px);-moz-transform:translatez(-12px)translate(7px,6px);-ms-transform:translatez(-12px)translate(7px,6px);-o-transform:translatez(-12px)translate(7px,6px);transform:translatez(-12px)translate(7px,6px)}.remote-screen.jsx-3fdfcb7d409f1983{position:absolute;inset:0 0 18px;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;overflow:hidden;border:1px solid rgba(132,232,215,.58);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background:rgba(10,15,22,.76);color:#9bf4e3;-webkit-box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);-moz-box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);-webkit-transform:translatez(8px);-moz-transform:translatez(8px);-ms-transform:translatez(8px);-o-transform:translatez(8px);transform:translatez(8px)}.remote-screen.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;inset:7px;border:1px solid rgba(116,174,255,.13);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.remote-screen-scan.jsx-3fdfcb7d409f1983{position:absolute;left:9px;right:9px;height:1px;background:#8cf3dd;-webkit-box-shadow:0 0 8px rgba(140,243,221,.85);-moz-box-shadow:0 0 8px rgba(140,243,221,.85);box-shadow:0 0 8px rgba(140,243,221,.85);-webkit-animation:screenScan 2s ease-in-out infinite;-moz-animation:screenScan 2s ease-in-out infinite;-o-animation:screenScan 2s ease-in-out infinite;animation:screenScan 2s ease-in-out infinite}.remote-device-stand.jsx-3fdfcb7d409f1983{position:absolute;left:50%;bottom:4px;width:44px;height:14px;border-bottom:2px solid rgba(147,183,202,.55);-webkit-transform:translatex(-50%)translatez(4px)skewx(-14deg);-moz-transform:translatex(-50%)translatez(4px)skewx(-14deg);-ms-transform:translatex(-50%)translatez(4px)skewx(-14deg);-o-transform:translatex(-50%)translatez(4px)skewx(-14deg);transform:translatex(-50%)translatez(4px)skewx(-14deg)}.remote-device-stand.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;left:50%;top:-5px;width:2px;height:9px;background:rgba(147,183,202,.55)}.remote-status.jsx-3fdfcb7d409f1983{min-height:24px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;color:#cbd2dc;font-size:13px;line-height:20px;text-shadow:0 1px 10px rgba(0,0,0,.45)}.remote-elapsed.jsx-3fdfcb7d409f1983{color:#9ca6b6;font-size:12px}.is-error.jsx-3fdfcb7d409f1983 .remote-screen.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-status.jsx-3fdfcb7d409f1983{color:#e2a5a5;border-color:rgba(226,165,165,.4)}.is-error.jsx-3fdfcb7d409f1983 .remote-screen-scan.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-beam.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-pulse.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-stream.jsx-3fdfcb7d409f1983::after,.is-error.jsx-3fdfcb7d409f1983 .remote-device.jsx-3fdfcb7d409f1983{-webkit-animation:none;-moz-animation:none;-o-animation:none;animation:none}@-webkit-keyframes deviceFloat{0%,100%{-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-webkit-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-moz-keyframes deviceFloat{0%,100%{-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-moz-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-o-keyframes deviceFloat{0%,100%{-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-o-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@keyframes deviceFloat{0%,100%{-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-webkit-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);-moz-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);-o-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-webkit-keyframes signalPulse{0%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-moz-keyframes signalPulse{0%{opacity:0;-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-o-keyframes signalPulse{0%{opacity:0;-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@keyframes signalPulse{0%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-webkit-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-moz-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-o-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-webkit-keyframes beamConnect{0%,100%{opacity:.24;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-moz-keyframes beamConnect{0%,100%{opacity:.24;-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-o-keyframes beamConnect{0%,100%{opacity:.24;-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@keyframes beamConnect{0%,100%{opacity:.24;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-webkit-keyframes streamFlow{from{-webkit-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-webkit-transform:translatey(460px);transform:translatey(460px);opacity:0}}@-moz-keyframes streamFlow{from{-moz-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-moz-transform:translatey(460px);transform:translatey(460px);opacity:0}}@-o-keyframes streamFlow{from{-o-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-o-transform:translatey(460px);transform:translatey(460px);opacity:0}}@keyframes streamFlow{from{-webkit-transform:translatey(-90px);-moz-transform:translatey(-90px);-o-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-webkit-transform:translatey(460px);-moz-transform:translatey(460px);-o-transform:translatey(460px);transform:translatey(460px);opacity:0}}@media(prefers-reduced-motion:reduce){.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983,.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983::before,.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983::after{-webkit-animation:none!important;-moz-animation:none!important;-o-animation:none!important;animation:none!important}}'})]})}let P=p("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),N=p("TextCursorInput",[["path",{d:"M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1",key:"18xjzo"}],["path",{d:"M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5",key:"fj48gi"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M9 7v10",key:"1vc8ob"}]]),R=p("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),T=p("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),_=p("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),M=p("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),F=p("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function E(e,t,r){let a=e.findIndex(e=>e.id===t),n=e.findIndex(e=>e.id===r);if(a<0||n<0||a===n)return[...e];let i=[...e],[o]=i.splice(a,1);return i.splice(n,0,o),i}function I(e,t="function"==typeof crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("")){return{id:t,command:e.trim()}}function D({commands:e,onChange:t,onExecute:r}){let[n,i]=(0,o.useState)(null),[s,l]=(0,o.useState)(""),[d,c]=(0,o.useState)(null),p=(0,o.useRef)(null),u=()=>{if(!n)return;let r=n.value.trim();return r?r.length>1e3?l("命令最多 1000 个字符"):/[\r\n\0]/.test(r)?l("命令只能包含一行"):void(n.id?t(e.map(e=>e.id===n.id?{...e,command:r}:e)):t([...e,I(r)]),i(null),l("")):l("命令不能为空")},b=(e,t)=>{e.preventDefault(),e.stopPropagation(),p.current=t,c(t),e.currentTarget.setPointerCapture(e.pointerId)},f=r=>{if(!p.current)return;let a=document.elementFromPoint(r.clientX,r.clientY)?.closest("[data-pinned-id]"),n=a?.dataset.pinnedId;n&&n!==p.current&&t(E(e,p.current,n))},m=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),p.current=null,c(null)},x=(r,a)=>{if("ArrowUp"!==r.key&&"ArrowDown"!==r.key)return;r.preventDefault();let n=e.findIndex(e=>e.id===a),i=e[n+("ArrowUp"===r.key?-1:1)];i&&t(E(e,a,i.id))};return(0,a.jsxs)("section",{className:"pinned-commands","aria-labelledby":"pinned-command-title",children:[(0,a.jsxs)("div",{className:"pinned-command-head",children:[a.jsx("span",{id:"pinned-command-title",children:"置顶命令"}),a.jsx("button",{className:"history-icon-button",onClick:()=>{i({id:null,value:""}),l("")},"aria-label":"新增置顶命令",title:"新增置顶命令",children:a.jsx(h,{size:14,"aria-hidden":"true"})})]}),e.map(o=>n?.id===o.id?a.jsx(L,{editor:n,error:s,onChange:e=>{i({...n,value:e}),l("")},onSave:u,onCancel:()=>{i(null),l("")}},o.id):(0,a.jsxs)("div",{className:`pinned-command-row${d===o.id?" pinned-command-dragging":""}`,"data-pinned-id":o.id,role:"button",tabIndex:0,onClick:()=>r(o.command),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r(o.command))},children:[a.jsx("button",{className:"pinned-command-grip",onPointerDown:e=>b(e,o.id),onPointerMove:f,onPointerUp:m,onPointerCancel:m,onKeyDown:e=>x(e,o.id),onClick:e=>e.stopPropagation(),"aria-label":`调整 ${o.command} 的顺序`,title:"拖动排序,或按上下方向键",children:a.jsx(_,{size:14,"aria-hidden":"true"})}),a.jsx("code",{children:o.command}),(0,a.jsxs)("div",{className:"pinned-command-actions",onClick:e=>e.stopPropagation(),children:[a.jsx("button",{className:"history-icon-button",onClick:()=>{i({id:o.id,value:o.command}),l("")},"aria-label":`编辑 ${o.command}`,title:"编辑",children:a.jsx(M,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>t(e.filter(e=>e.id!==o.id)),"aria-label":`删除 ${o.command}`,title:"删除",children:a.jsx(T,{size:12,"aria-hidden":"true"})})]})]},o.id)),n?.id===null&&a.jsx(L,{editor:n,error:s,onChange:e=>{i({...n,value:e}),l("")},onSave:u,onCancel:()=>{i(null),l("")}})]})}function L({editor:e,error:t,onChange:r,onSave:n,onCancel:i}){return(0,a.jsxs)("div",{className:"pinned-command-editor",children:[a.jsx("input",{autoFocus:!0,value:e.value,maxLength:1e3,onChange:e=>r(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n(),"Escape"===e.key&&i()},"aria-label":e.id?"编辑置顶命令":"新增置顶命令"}),a.jsx("button",{className:"history-icon-button",onClick:n,"aria-label":"保存命令",title:"保存",children:a.jsx(F,{size:13,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",onClick:i,"aria-label":"取消编辑",title:"取消",children:a.jsx(x,{size:13,"aria-hidden":"true"})}),t&&a.jsx("small",{role:"alert",children:t})]})}async function A(e){let t="undefined"==typeof navigator?void 0:navigator.clipboard;if("function"==typeof t?.writeText&&("undefined"==typeof isSecureContext||isSecureContext))try{return await t.writeText(e),!0}catch{}return function(e){if("undefined"==typeof document||!document.body||"function"!=typeof document.execCommand)return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),Object.assign(t.style,{position:"fixed",top:"0",left:"-9999px",width:"1px",height:"1px",fontSize:"16px",opacity:"0",pointerEvents:"none"}),document.body.appendChild(t);try{return t.focus(),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch{return!1}finally{t.remove()}}(e)}function O({csrfToken:e,terminalId:t,pinnedCommands:r,onPinnedCommandsChange:n,onFill:i,onExecute:s}){let[l,d]=(0,o.useState)([]),[c,p]=(0,o.useState)(""),[b,f]=(0,o.useState)(""),m=(0,o.useCallback)(async()=>{let e=new URLSearchParams({q:c,limit:"200"}),t=await fetch(`/api/web-console/history?${e}`,{credentials:"same-origin"});t.ok&&d((await t.json()).history)},[c]),x=async t=>{await fetch("/api/web-console/history",{method:"DELETE",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e},body:JSON.stringify({id:t})}),m()},g=e=>{t&&i(e)},h=(0,o.useCallback)(e=>{"[REDACTED]"===e||r.some(t=>t.command===e)||n([...r,I(e)])},[n,r]),y=async e=>{f(await A(e)?"已复制命令":"复制失败,请长按命令手动复制")};return(0,a.jsxs)("div",{className:"history-panel",children:[a.jsx(D,{commands:r,onChange:n,onExecute:s}),(0,a.jsxs)("div",{className:"history-search",children:[a.jsx("input",{value:c,onChange:e=>p(e.target.value),placeholder:"搜索命令"}),a.jsx("button",{className:"history-icon-button",onClick:m,"aria-label":"刷新历史",title:"刷新历史",children:a.jsx(u,{size:13,"aria-hidden":"true"})})]}),b&&a.jsx("div",{className:"terminal-clipboard-notice",role:"status",children:b}),l.map(e=>(0,a.jsxs)("div",{className:`history-item${t?"":" history-item-disabled"}`,role:"button",tabIndex:t?0:-1,onClick:()=>g(e.command),onKeyDown:r=>{r.target===r.currentTarget&&("Enter"===r.key||" "===r.key)&&t&&(r.preventDefault(),g(e.command))},children:[a.jsx("code",{children:e.command}),(0,a.jsxs)("small",{children:[e.cwd," \xb7 ",new Date(e.executedAt).toLocaleString()]}),(0,a.jsxs)("div",{className:"history-item-actions",onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[a.jsx("button",{className:"history-icon-button",onClick:()=>void y(e.command),"aria-label":"复制命令",title:"复制",children:a.jsx(P,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",disabled:!t,onClick:()=>g(e.command),"aria-label":"填入命令",title:"填入",children:a.jsx(N,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",disabled:"[REDACTED]"===e.command||r.some(t=>t.command===e.command),onClick:()=>h(e.command),"aria-label":"置顶命令",title:"置顶",children:a.jsx(R,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>x(e.id),"aria-label":"删除历史",title:"删除",children:a.jsx(T,{size:12,"aria-hidden":"true"})})]})]},e.id)),!l.length&&a.jsx("div",{className:"history-empty",children:"暂无 Shell 命令历史"}),!t&&!!l.length&&a.jsx("div",{className:"history-empty",children:"请先打开一个终端页签"})]})}var $=r(5878);let U=[{id:"pearl",label:"珍珠白",swatch:"#f5f6fa",preview:["#f5f6fa","#4f6ef7"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#f5f6fa","--ui-text":"#111827","--ui-tabbar-bg":"#eef0f6","--ui-tabbar-border":"#dfe3ee","--ui-tab-bg":"#e6e9f4","--ui-tab-text":"#5b6472","--ui-tab-active-bg":"#ffffff","--ui-tab-active-text":"#111827","--ui-tab-accent":"#4f6ef7","--ui-connection-bg":"#eef0f6","--ui-connection-text":"#9ca3af","--ui-tree-bg":"#fbfcfe","--ui-tree-border":"#e5e8f0","--ui-term-col-bg":"#f5f6fa","--ui-fab-bg":"#ffffff","--ui-fab-border":"#d8dcea","--ui-muted-surface":"#eef0f6","--ui-muted-border":"#d8dcea","--ui-muted-text":"#6b7280","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#111827","--ui-panel-input-border":"#d8dcea","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#111827","--ui-history-item-text":"#1f2937","--ui-history-meta":"#9ca3af","--ui-success":"#059669","--ui-error":"#dc2626"},termHostBg:"#ffffff",keybar:{bg:"#eef0f6",border:"#dfe3ee",keyBg:"#ffffff",keyBorder:"#d8dcea",keyText:"#4b5563",accent:"#4f6ef7",accentText:"#ffffff",drag:"#a5b4fc"},xterm:{background:"#ffffff",foreground:"#1f2937",cursor:"#4f6ef7",selectionBackground:"#c7d2fe",black:"#24292e",red:"#d73a49",green:"#22863a",yellow:"#b08800",blue:"#005cc5",magenta:"#6f42c1",cyan:"#1b7c83",white:"#6a737d",brightBlack:"#959da5",brightWhite:"#fafbfc"}},{id:"scifi",label:"科幻霓虹",swatch:"#050a14",preview:["#050a14","#22d3ee"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#050a14","--ui-text":"#e2f3ff","--ui-tabbar-bg":"#0a1220","--ui-tabbar-border":"#10263c","--ui-tab-bg":"#0d1626","--ui-tab-text":"#5c7893","--ui-tab-active-bg":"#122036","--ui-tab-active-text":"#e2f3ff","--ui-tab-accent":"#22d3ee","--ui-connection-bg":"#0a1220","--ui-connection-text":"#5c7893","--ui-tree-bg":"#0d1626","--ui-tree-border":"#10263c","--ui-term-col-bg":"#050a14","--ui-fab-bg":"#122036","--ui-fab-border":"#155e75","--ui-muted-surface":"#0d1626","--ui-muted-border":"#164e63","--ui-muted-text":"#9fb8d0","--ui-panel-input-bg":"#0a1220","--ui-panel-input-text":"#e2f3ff","--ui-panel-input-border":"#164e63","--ui-drawer-tab-text":"#5c7893","--ui-drawer-tab-active":"#e2f3ff","--ui-history-item-text":"#d5ecfb","--ui-history-meta":"#5c7893","--ui-success":"#34d399","--ui-error":"#fb7185"},termHostBg:"#0a1220",keybar:{bg:"#0a1220",border:"#10263c",keyBg:"#0d1626",keyBorder:"#164e63",keyText:"#9fb8d0",accent:"#22d3ee",accentText:"#04121a",drag:"#155e75"},xterm:{background:"#0a1220",foreground:"#e2f3ff",cursor:"#22d3ee",selectionBackground:"#164e63",black:"#0d1626",red:"#fb7185",green:"#34d399",yellow:"#fbbf24",blue:"#38bdf8",magenta:"#e879f9",cyan:"#22d3ee",white:"#e2f3ff",brightBlack:"#5c7893",brightWhite:"#ffffff"}},{id:"noir",label:"暗夜黑",swatch:"#0f1115",preview:["#0f1115","#a78bfa"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#0f1115","--ui-text":"#eceff4","--ui-tabbar-bg":"#14171d","--ui-tabbar-border":"#232833","--ui-tab-bg":"#191d24","--ui-tab-text":"#6b7280","--ui-tab-active-bg":"#1f242d","--ui-tab-active-text":"#eceff4","--ui-tab-accent":"#a78bfa","--ui-connection-bg":"#14171d","--ui-connection-text":"#6b7280","--ui-tree-bg":"#191d24","--ui-tree-border":"#232833","--ui-term-col-bg":"#0f1115","--ui-fab-bg":"#1f242d","--ui-fab-border":"#2a3040","--ui-muted-surface":"#191d24","--ui-muted-border":"#2a3040","--ui-muted-text":"#aab2bf","--ui-panel-input-bg":"#14171d","--ui-panel-input-text":"#eceff4","--ui-panel-input-border":"#2a3040","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#eceff4","--ui-history-item-text":"#d7dce4","--ui-history-meta":"#6b7280","--ui-success":"#4ade80","--ui-error":"#f87171"},termHostBg:"#14171d",keybar:{bg:"#14171d",border:"#232833",keyBg:"#191d24",keyBorder:"#2a3040",keyText:"#aab2bf",accent:"#a78bfa",accentText:"#0f1115",drag:"#4b4470"},xterm:{background:"#14171d",foreground:"#eceff4",cursor:"#a78bfa",selectionBackground:"#3b3654",black:"#191d24",red:"#f87171",green:"#4ade80",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#67e8f9",white:"#eceff4",brightBlack:"#6b7280",brightWhite:"#ffffff"}}],W="pearl",B=Object.fromEntries(U.map(e=>[e.id,e])),H={dark:"noir",black:"noir",gray:"noir",blue:"noir",red:"noir",yellow:"noir",green:"noir",white:"pearl"};function q({username:e,themeId:t,onThemeChange:r,accent:n,accentText:i}){let[s,l]=(0,o.useState)(!1),d=(0,o.useRef)(null),c=(0,o.useRef)(null),p=(0,o.useRef)(null),[u,b]=(0,o.useState)(null),[f,m]=(0,o.useState)(null),x=(e.trim()[0]??"?").toUpperCase();return(0,a.jsxs)("div",{ref:d,className:"theme-picker",children:[a.jsx("button",{ref:c,type:"button",className:"theme-avatar","aria-label":`换肤(${e})`,title:e,"aria-expanded":s,onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.preventDefault(),e.stopPropagation(),l(e=>!e)},style:{border:`1px solid ${n}`,background:n,color:i},children:x}),s&&u&&f&&(0,$.createPortal)((0,a.jsxs)("div",{ref:p,className:"theme-popover",role:"dialog","aria-label":"选择皮肤",style:{position:"fixed",top:u.top,left:u.left,zIndex:200,width:176,padding:8,borderRadius:10,border:"1px solid var(--ui-tabbar-border, #282b36)",background:"var(--ui-tab-active-bg, #262b38)",boxShadow:"0 10px 28px rgba(0,0,0,.45)"},children:[a.jsx("div",{style:{fontSize:10,color:"var(--ui-connection-text, #777b8c)",margin:"2px 4px 6px",letterSpacing:.5},children:"皮肤"}),a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:2},children:U.map(e=>{let n=e.id===t;return(0,a.jsxs)("button",{type:"button",className:"theme-popover-item","aria-label":e.label,"aria-pressed":n,onPointerDown:e=>e.stopPropagation(),onClick:()=>{r(e.id),l(!1)},style:{background:n?"color-mix(in srgb, var(--ui-tab-accent, #7aa2f7) 14%, transparent)":"transparent"},children:[a.jsx("span",{style:{width:18,height:18,borderRadius:5,flexShrink:0,background:`linear-gradient(135deg, ${e.preview[0]} 55%, ${e.preview[1]} 55%)`,boxShadow:"inset 0 0 0 1px rgba(128,128,160,.25)"}}),a.jsx("span",{style:{flex:1,textAlign:"left",fontSize:12,fontWeight:n?600:400,color:n?"var(--ui-tab-active-text, #edf0f7)":"var(--ui-tab-text, #8f93a4)"},children:e.label}),n&&a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ui-tab-accent, #7aa2f7)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"m5 12 4 4L19 6"})})]},e.id)})})]}),f)]})}let V=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./TerminalPane"]},ssr:!1}),G=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./FileTree"]},ssr:!1}),X=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./FilePreview"]},ssr:!1}),J=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./AiHubPane"]},ssr:!1});function K(){return a.jsx(C,{children:e=>a.jsx(Q,{auth:e})})}let Y={id:"webapp-agent",title:"智能助手",kind:"webapp"},Z={id:"ai-hub",title:"AI Hub",kind:"aihub"};function Q({auth:e}){let t=(0,o.useRef)(null),r=(0,o.useRef)(()=>{}),{state:n,epoch:i,rpc:s,onEvent:l,onTerminalData:d,onTerminalReset:c,sendTerminalInput:p}=function(e,t,r){let[a,n]=(0,o.useState)({connected:!1,error:null}),[i,s]=(0,o.useState)(0),l=(0,o.useRef)(null),d=(0,o.useRef)(0),c=(0,o.useRef)(new Map),p=(0,o.useRef)([]),u=(0,o.useRef)(0),b=(0,o.useRef)(new Map),f=(0,o.useRef)(new Map),m=(0,o.useRef)(new Map),x=(0,o.useRef)(1e3),g=(0,o.useRef)(!1),h=(0,o.useRef)(null),y=(0,o.useRef)(e),v=(0,o.useRef)(t),w=(0,o.useRef)(r);y.current=e,v.current=t,w.current=r;let k=(0,o.useCallback)((e,t)=>{let r=b.current.get(e);return r||b.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),j=(0,o.useCallback)((e,t)=>{let r=f.current.get(e);return r||f.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),z=(0,o.useCallback)((e,t)=>{let r=m.current.get(e);return r||m.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),S=(0,o.useCallback)((e,t)=>{let r=l.current;if(!r||r.readyState!==WebSocket.OPEN)return!1;let a=new TextEncoder().encode(t),n=new Uint8Array(6+a.byteLength),i=new DataView(n.buffer);return n[0]=1,n[1]=1,i.setUint32(2,e),n.set(a,6),r.send(n),!0},[]),C=(0,o.useCallback)(e=>{let t=l.current;t?.readyState===WebSocket.OPEN?t.send(e):p.current.push(e)},[]),P=(0,o.useCallback)((e,t={},r=15e3)=>new Promise((a,n)=>{let i=++u.current,o=setTimeout(()=>{c.current.delete(i),n(Error(`${e} timeout`))},r);c.current.set(i,{resolve:a,reject:n,timer:o}),C(JSON.stringify({type:e,_req:i,...t}))}),[C]),N=(0,o.useCallback)(async()=>{let e,t;g.current=!1;let r=++d.current;h.current&&(clearInterval(h.current),h.current=null);let a=l.current;if(a){a.onopen=a.onmessage=a.onerror=a.onclose=null;try{a.close()}catch{}}try{e=await v.current()}catch{r===d.current&&w.current();return}if(r===d.current&&!g.current){try{t=new WebSocket(`${"https:"===location.protocol?"wss:":"ws:"}//${location.host}/ws?nonce=${encodeURIComponent(e)}`)}catch(e){n({connected:!1,error:String(e)});return}t.binaryType="arraybuffer",l.current=t,t.onopen=()=>{if(r!==d.current||l.current!==t)return;for(let e of(x.current=1e3,n({connected:!0,error:null}),s(e=>e+1),p.current.splice(0)))t.send(e);let e=Date.now();h.current=setInterval(()=>{if(l.current!==t||t.readyState!==WebSocket.OPEN){clearInterval(h.current),h.current=null;return}if(Date.now()-e>25e3){try{t.close()}catch{}return}try{t.send(JSON.stringify({type:"ping"}))}catch{}},1e4);let a=()=>{e=Date.now()};t.addEventListener("message",a),t.addEventListener("close",()=>t.removeEventListener("message",a),{once:!0})},t.onmessage=e=>{let a;if(r===d.current&&l.current===t){if("string"!=typeof e.data){let t=new Uint8Array(e.data);if(t.byteLength>=6&&1===t[0]&&(2===t[1]||6===t[1])){let e=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(2);f.current.get(e)?.forEach(e=>e(t.subarray(6),6===t[1]))}else if(t.byteLength>=6&&1===t[0]&&3===t[1]){let e=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(2);m.current.get(e)?.forEach(e=>e())}else y.current(t);return}try{a=JSON.parse(e.data)}catch{return}if("error"===a.type&&null!=a.id){let e=c.current.get(a.id);if(e){c.current.delete(a.id),clearTimeout(e.timer);let t=Object.assign(Error(a.error||"gateway error"),{code:a.code});e.reject(t)}return}if(null!=a.id&&"string"==typeof a.type&&a.type.endsWith(":result")){let e=c.current.get(a.id);e&&(c.current.delete(a.id),clearTimeout(e.timer),e.resolve(a));return}b.current.get(a.type)?.forEach(e=>e(a))}},t.onclose=e=>{if(r!==d.current||l.current!==t)return;if(h.current&&(clearInterval(h.current),h.current=null),l.current=null,n({connected:!1,error:null}),4001===e.code||4003===e.code){w.current();return}if(g.current)return;let a=x.current;x.current=Math.min(2*a,8e3),setTimeout(()=>{g.current||r!==d.current||N()},a)},t.onerror=()=>{}}},[]);return{state:a,epoch:i,rpc:P,onEvent:k,onTerminalData:j,onTerminalReset:z,sendTerminalInput:S,reconnect:N}}((0,o.useCallback)(e=>{let a=function(e){let t=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength<10||1!==t[0]||t[1]!==k.watcherFrame&&t[1]!==k.producerFrame)return null;let r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{type:t[1],channelId:r.getUint32(2,!1),sequence:r.getUint32(6,!1),payload:t.subarray(10)}}(e);if(!a||a.type!==k.watcherFrame)return;r.current(a.channelId,a.sequence);let n=a.payload.slice().buffer;t.current?.contentWindow?.postMessage({type:"agent-web-shell:browser-frame:v1",channelId:a.channelId,sequence:a.sequence,data:n},window.location.origin,[n])},[]),e.getWsNonce,e.refresh);r.current=(e,t)=>{s("browser:frame-ack",{channelId:e,sequence:t}).catch(()=>void 0)};let[g,h]=(0,o.useState)([{...Y}]),[y,j]=(0,o.useState)(Y.id),[z,S]=(0,o.useState)({});(0,o.useRef)(!1),(0,o.useRef)(null);let C=(0,o.useRef)(new Map),P=(0,o.useRef)(new Map),N=(0,o.useCallback)((e,t)=>{C.current.set(e,t);let r=window.setTimeout(()=>{if(C.current.get(e)!==t)return;let r=P.current.get(e);r&&(P.current.delete(e),t(r,!0))},180);return()=>{window.clearTimeout(r),C.current.get(e)===t&&C.current.delete(e)}},[]),R=(0,o.useCallback)(e=>{if(!y||g.find(e=>e.id===y)?.kind==="webapp")return;let t=C.current.get(y);t?t(e):s("term:input",{id:y,data:`\x15${e}`}).catch(()=>{}),L(!1)},[y,s,g]),[T,_]=(0,o.useState)(!1),[M,F]=(0,o.useState)({}),[E,I]=(0,o.useState)(null),[D,L]=(0,o.useState)(!1),[A,$]=(0,o.useState)("files"),[U,K]=(0,o.useState)(null),[Q,er]=(0,o.useState)(!0),[ea,en]=(0,o.useState)(null),[ei,eo]=(0,o.useState)(!1),[es,el]=(0,o.useState)([]),[ed,ec]=(0,o.useState)(w.map((e,t)=>({id:`default-${t+1}`,command:e}))),[ep,eu]=(0,o.useState)(W),[eb,ef]=(0,o.useState)(!1),[em,ex]=(0,o.useState)(!1),eg=function(e){if(e&&e in B)return B[e];let t=e?H[e]:void 0;return t?B[t]:B[W]}(ep),eh=(0,o.useRef)(null),[ey,ev]=(0,o.useState)(0),[ew,ek]=(0,o.useState)(!1),ej=(0,o.useRef)(null),ez=(0,o.useRef)(null),eS=(0,o.useCallback)(e=>{t.current?.contentWindow?.postMessage({type:"agent-web-shell:skin:v1",skin:e},window.location.origin)},[]);(0,o.useRef)(0);let eC=y?z[y]??null:null;(0,o.useCallback)(t=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e.csrfToken},body:JSON.stringify(t)}).catch(()=>{})},[e.csrfToken]),(0,o.useCallback)(t=>{e.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e.csrfToken},body:JSON.stringify(t)}).catch(()=>{})},[e.csrfToken]);let eP=(0,o.useCallback)(e=>{I(e),L(!1)},[]),eN=(0,o.useCallback)(()=>{if(g.length>=8)return;let e=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;h(t=>t.length>=8?t:[...t,{id:e,title:`Terminal ${t.length+1}`}]),j(e)},[g.length]),eR=(0,o.useCallback)(e=>{let t=g.find(e=>e.id===y);if(t&&"webapp"!==t.kind){let r=C.current.get(t.id);r?r(e,!0):P.current.set(t.id,e),L(!1);return}let r=g.length>=8?g.find(e=>"webapp"!==e.kind):null,a=r?.id??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;r?P.current.set(a,e):h(t=>[...t,{id:a,title:`Terminal ${t.length+1}`,initialCommand:e}]),j(a),L(!1)},[y,g]),eT=e=>{if(e===Y.id)return;let t=g.find(t=>t.id===e)?.kind;("aihub"===t||window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(h(t=>{let r=t.filter(t=>t.id!==e);return y===e&&j(r[0]?.id??null),r}),"aihub"!==t&&s("term:kill",{id:e}).catch(()=>{}))},e_=(0,o.useCallback)(()=>{h(e=>{let t=e.find(e=>"aihub"===e.kind);return t?(j(t.id),e):(j(Z.id),[...e,{...Z}])})},[]),eM=(0,o.useCallback)(()=>{j(Y.id),t.current?.contentWindow?.postMessage({type:"agent-web-shell:open-browser-live:v1"},window.location.origin)},[]),eF=(0,o.useCallback)(e=>{if(!y||g.length<2)return;let t=(g.findIndex(e=>e.id===y)+e+g.length)%g.length;j(g[t].id)},[y,g]),eE=Math.max(0,g.findIndex(e=>e.id===y)),eI=g[eE]?.kind==="webapp"?eg.cssVars["--ui-term-col-bg"]:eg.termHostBg,eD={...et.root,...eg.cssVars,"--ui-active-content-bg":eI,"--ui-terminal-bg":eg.termHostBg,"--ui-primary-text":eg.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},eL=(0,o.useCallback)(()=>{eh.current=null,ev(0),ek(!1)},[]),eA=(0,o.useCallback)(e=>{Math.abs(e)>=64&&g.length>1&&eF(e<0?1:-1),eL()},[g.length,eF,eL]),eO=e=>e instanceof Element&&!!e.closest(".terminal-screen");return(0,o.useCallback)((e="smooth")=>{let t=ez.current;if(!t||!y)return;let r=t.querySelector(`[data-terminal-id="${y}"]`);if(!r)return;if(r===t.querySelector("[data-terminal-id]")){t&&(t.scrollLeft=0);return}let a=t.querySelector(".terminal-connection"),n=a?.offsetWidth??0,i=r.offsetLeft,o=i+r.offsetWidth,s=t.scrollLeft,l=s+t.clientWidth-n;i<s+8?t.scrollTo({left:Math.max(0,i-8),behavior:e}):o>l-8&&t.scrollTo({left:o-t.clientWidth+n+8,behavior:e})},[y]),(0,a.jsxs)("div",{className:"web-root",style:eD,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ee}}),(0,a.jsxs)("div",{className:"terminal-tabs",ref:ez,children:[g.map(e=>(0,a.jsxs)("div",{"data-terminal-id":e.id,draggable:!0,className:`terminal-tab ${e.id===y?"active":""}`,onDragStart:()=>{ej.current=e.id},onDragOver:e=>e.preventDefault(),onDrop:t=>{t.preventDefault();let r=ej.current;ej.current=null,r&&r!==e.id&&h(t=>{let a=t.findIndex(e=>e.id===r),n=t.findIndex(t=>t.id===e.id);if(a<0||n<0)return t;let i=[...t],[o]=i.splice(a,1);return i.splice(n,0,o),s("term:reorder",{ids:i.map(e=>e.id).filter(e=>e!==Y.id)}).catch(()=>{}),i})},onClick:()=>j(e.id),onDoubleClick:()=>{if("webapp"===e.kind||"aihub"===e.kind)return;let t=window.prompt("页签名称",e.title)?.trim();t&&s("term:rename",{id:e.id,title:t}).then(()=>h(r=>r.map(r=>r.id===e.id?{...r,title:t}:r))).catch(()=>{})},children:[a.jsx("span",{children:e.title}),"webapp"!==e.kind&&a.jsx("button",{tabIndex:-1,onClick:t=>{t.stopPropagation(),eT(e.id)},children:"\xd7"})]},e.id)),a.jsx("button",{className:"terminal-add",disabled:g.length>=8,onClick:eN,children:"+"}),(0,a.jsxs)("div",{className:"terminal-connection",children:[a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>window.location.reload(),children:a.jsx(u,{size:17,"aria-hidden":"true"})}),a.jsx(v,{}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 \xb7 浏览器直播",onClick:eM,children:a.jsx(b,{size:17,"aria-hidden":"true"})}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub \xb7 多模型对比",onClick:e_,children:a.jsx(f,{size:17,"aria-hidden":"true"})}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":D?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":D,onClick:()=>L(e=>!e),children:a.jsx(m,{size:17,"aria-hidden":"true"})}),(0,a.jsxs)("div",{className:"theme-avatar-with-status",children:[a.jsx(q,{username:e.user?.username??"?",themeId:ep,onThemeChange:eu,accent:eg.keybar.accent,accentText:eg.keybar.accentText}),a.jsx("span",{className:"theme-avatar-status","data-connected":n.connected,"aria-label":n.connected?"已连接":"未连接"})]})]})]}),(0,a.jsxs)("main",{className:`workspace ${D?"show-tree":""} ${E?"has-preview":""}`,style:et.workspace,children:[a.jsx("section",{className:"term-col",style:et.termCol,onPointerDownCapture:e=>{"touch"===e.pointerType&&eO(e.target)&&(eL(),eh.current={x:e.clientX,y:e.clientY,axis:"pending",pointerId:e.pointerId})},onPointerMoveCapture:e=>{let t=eh.current;if(!t||e.pointerId!==t.pointerId||"touch"!==e.pointerType)return;let r=e.clientX-t.x,a=e.clientY-t.y;if("pending"===t.axis){if(8>=Math.max(Math.abs(r),Math.abs(a)))return;if(Math.abs(a)>=1.2*Math.abs(r)){eh.current=null;return}t.axis="horizontal",ek(!0);let e=r=>{window.removeEventListener("pointerup",e),window.removeEventListener("pointercancel",e),eh.current===t&&eL()};window.addEventListener("pointerup",e),window.addEventListener("pointercancel",e)}"horizontal"===t.axis&&(e.preventDefault(),ev(r))},onPointerUpCapture:e=>{let t=eh.current;if(!t||e.pointerId!==t.pointerId)return;let r=e.clientX-t.x;"horizontal"===t.axis&&Math.abs(r)>=64?eA(r):eL()},onPointerCancelCapture:eL,children:a.jsx("div",{className:"terminal-track",style:{transform:`translate3d(calc(${-(100*eE)}% + ${ey}px),0,0)`,transition:ew?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:g.map(e=>a.jsx("div",{className:"terminal-slide",style:{position:"relative"},children:"webapp"===e.kind?(0,a.jsxs)(a.Fragment,{children:[a.jsx("iframe",{ref:t,className:"webapp-frame",src:"/app/",title:e.title,onLoad:()=>eS(ep)}),(0,a.jsxs)("div",{className:`webapp-boot${em?" is-ready":""}`,role:"status","aria-live":"polite","aria-hidden":em,children:[(0,a.jsxs)("div",{className:"webapp-boot-mark","aria-hidden":"true",children:[a.jsx("span",{className:"webapp-boot-orbit"}),a.jsx("span",{className:"webapp-boot-diamond"}),a.jsx("span",{className:"webapp-boot-core"})]}),a.jsx("strong",{children:"AgentRoam"}),a.jsx("span",{children:"正在唤醒工作区"})]})]}):"aihub"===e.kind?a.jsx(J,{visible:e.id===y,rpc:s}):a.jsx(V,{terminalId:e.id,title:e.title,initialCommand:e.initialCommand,visible:e.id===y,state:n,rpc:s,onEvent:l,onTerminalData:d,onTerminalReset:c,sendTerminalInput:p,keyOrder:es,keybarHidden:ei,onKeyOrderChange:el,onKeybarHiddenChange:eo,terminalTheme:eg,initialScrollLine:M[e.id]??null,onScrollLineChange:t=>F(r=>r[e.id]===t?r:{...r,[e.id]:t}),onRegisterFill:t=>N(e.id,t),onCwdChange:t=>t&&S(r=>({...r,[e.id]:t}))})},e.id))})}),D&&a.jsx("div",{className:"drawer-mask",onClick:()=>L(!1)}),(0,a.jsxs)("aside",{className:`tree-col ${D?"tree-col-open":""}`,style:et.treeCol,children:[(0,a.jsxs)("div",{className:"tree-head",style:et.treeHead,children:[a.jsx("button",{className:"files"===A?"drawer-tab-active":"",onClick:()=>$("files"),children:"文件"}),a.jsx("button",{className:"history"===A?"drawer-tab-active":"",onClick:()=>$("history"),children:"历史"}),a.jsx("span",{className:"tree-cwd",style:et.treeCwd,children:eC??""}),a.jsx("button",{style:{...et.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>L(!1),"aria-label":"close drawer",children:a.jsx(x,{size:15,"aria-hidden":"true"})})]}),"files"===A?a.jsx(G,{ready:i>0,followCwd:!0,cwd:eC,rpc:s,onEvent:l,onOpenFile:eP,selectedPath:E,initialRoot:U,initialFollow:Q,revealRequest:ea,onTreeStateChange:(e,t)=>{K(e),er(t)}}):a.jsx(O,{csrfToken:e.csrfToken,terminalId:g.find(e=>e.id===y)?.kind==="webapp"?null:y,pinnedCommands:ed,onPinnedCommandsChange:ec,onFill:R,onExecute:eR}),(0,a.jsxs)("div",{style:et.treeFoot,children:[a.jsx("span",{style:et.treeFootDot}),a.jsx("span",{children:"实时同步"})]})]}),E&&a.jsx("section",{className:"preview-col",style:et.previewCol,children:a.jsx(X,{path:E,rpc:s,onClose:()=>I(null)})})]})]})}let ee=`
1
+ (()=>{var e={};e.id=3541,e.ids=[3541],e.modules={2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},8664:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>o.a,__next_app__:()=>u,originalPathname:()=>p,pages:()=>c,routeModule:()=>b,tree:()=>d}),r(6742),r(489),r(4972),r(3028);var a=r(1772),n=r(5042),i=r(5663),o=r.n(i),s=r(4812),l={};for(let e in s)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>s[e]);r.d(t,l);let d=["",{children:["web",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,6742)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/web/page.tsx"]}]},{error:[()=>Promise.resolve().then(r.bind(r,489)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/web/error.tsx"]}]},{layout:[()=>Promise.resolve().then(r.bind(r,4972)),"/Users/caoqu/team-agent/customer-agent/packages/server/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,3028,23)),"next/dist/client/components/not-found-error"]}],c=["/Users/caoqu/team-agent/customer-agent/packages/server/app/web/page.tsx"],p="/web/page",u={require:r,loadChunk:()=>Promise.resolve()},b=new a.AppPageRouteModule({definition:{kind:n.x.APP_PAGE,page:"/web/page",pathname:"/web",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},8490:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,1782,23)),Promise.resolve().then(r.t.bind(r,8949,23)),Promise.resolve().then(r.t.bind(r,6569,23)),Promise.resolve().then(r.t.bind(r,8718,23)),Promise.resolve().then(r.t.bind(r,7415,23)),Promise.resolve().then(r.t.bind(r,8781,23))},8589:(e,t,r)=>{Promise.resolve().then(r.bind(r,8383))},3703:(e,t,r)=>{Promise.resolve().then(r.bind(r,7919))},2027:()=>{},6476:()=>{},1166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let a=r(7094);r(3517),r(5921);let n=a._(r(4079));function i(e,t){var r;let a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};"function"==typeof e&&(a.loader=e);let i={...a,...t};return(0,n.default)({...i,modules:null==(r=i.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=r(93);function n(e){let{reason:t,children:r}=e;throw new a.BailoutToCSRError(t)}},4079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let a=r(3517),n=r(5921),i=r(1803),o=r(5259);function s(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},d=function(e){let t={...l,...e},r=(0,n.lazy)(()=>t.loader().then(s)),d=t.loading;function c(e){let s=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,l=t.ssr?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.PreloadCss,{moduleIds:t.modules}),(0,a.jsx)(r,{...e})]}):(0,a.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(n.Suspense,{fallback:s,children:l})}return c.displayName="LoadableComponent",c}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return i}});let a=r(3517),n=r(4580);function i(e){let{moduleIds:t}=e,r=(0,n.getExpectedRequestStore)("next/dynamic css"),i=[];if(r.reactLoadableManifest&&t){let e=r.reactLoadableManifest;for(let r of t){if(!e[r])continue;let t=e[r].files.filter(e=>e.endsWith(".css"));i.push(...t)}}return 0===i.length?null:(0,a.jsx)(a.Fragment,{children:i.map(e=>(0,a.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:r.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},4684:(e,t,r)=>{"use strict";r(6476);var a=r(5921),n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(a),i="undefined"!=typeof process&&process.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,s=void 0===n?i:n;l(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",l("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;l(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){return l(o(e),"`insertRule` accepts only strings"),"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++},t.replaceRule=function(e,t){this._optimizeForSpeed;var r=this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}return e},t.deleteRule=function(e){this._serverSheet.deleteRule(e)},t.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},t.cssRules=function(){return this._serverSheet.cssRules},t.makeStyleTag=function(e,t,r){t&&l(o(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var n=document.head||document.getElementsByTagName("head")[0];return r?n.insertBefore(a,r):n.appendChild(a),a},function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},c={};function p(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return c[a]||(c[a]="jsx-"+d(e+"-"+r)),c[a]}function u(e,t){var r=e+(t=t.replace(/\/style/gi,"\\/style"));return c[r]||(c[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),c[r]}var b=a.createContext(null);b.displayName="StyleSheetContext",n.default.useInsertionEffect||n.default.useLayoutEffect;var f=void 0;function m(e){var t=f||a.useContext(b);return t&&t.add(e),null}m.dynamic=function(e){return e.map(function(e){return p(e[0],e[1])}).join(" ")},t.style=m},1321:(e,t,r)=>{"use strict";e.exports=r(4684).style},8383:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var a=r(3517);function n({reset:e}){return(0,a.jsxs)("main",{role:"alert",style:{padding:32,fontFamily:"system-ui",lineHeight:1.8},children:[a.jsx("h1",{children:"页面加载失败"}),a.jsx("p",{children:"请重试;如果仍无法打开,请检查网络,并确认电脑上的 AgentRoam 正在运行。"}),a.jsx("button",{type:"button",onClick:e,children:"重试"})," ",a.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"刷新页面"})]})}},7919:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});var a=r(3517),n=r(1166),i=r.n(n),o=r(5921);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=(0,o.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:s,...c},p)=>(0,o.createElement)("svg",{ref:p,...d,width:t,height:t,stroke:e,strokeWidth:a?24*Number(r)/Number(t):r,className:l("lucide",n),...c},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(i)?i:[i]])),p=(e,t)=>{let r=(0,o.forwardRef)(({className:r,...a},n)=>(0,o.createElement)(c,{ref:n,iconNode:t,className:l(`lucide-${s(e)}`,r),...a}));return r.displayName=`${e}`,r},u=p("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),b=p("MonitorUp",[["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}],["path",{d:"M12 13V7",key:"h0r20n"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]),f=p("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),m=p("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),x=p("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),g=p("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),h=p("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),y={background:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",borderColor:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",color:"var(--ui-primary-text)"};function v(){let[e,t]=(0,o.useState)(!1),[r,n]=(0,o.useState)(!1),i=(0,o.useRef)(null);return(0,a.jsxs)(a.Fragment,{children:[e&&a.jsx("button",{type:"button",className:"file-drawer-toggle pwa-install-button",style:y,title:"添加到主屏幕","aria-label":"添加到主屏幕",onClick:()=>window.dispatchEvent(new Event("agentroam:pwa-install")),children:(0,a.jsxs)("span",{style:{position:"relative",display:"flex"},children:[a.jsx(g,{size:17,"aria-hidden":"true"}),a.jsx(h,{size:9,strokeWidth:3,"aria-hidden":"true",style:{position:"absolute",right:-4,bottom:-2}})]})}),r&&(0,a.jsxs)("dialog",{ref:i,onClose:()=>n(!1),"aria-labelledby":"pwa-install-title",style:{maxWidth:340,width:"calc(100% - 40px)",margin:"auto",padding:24,borderRadius:16,border:"1px solid var(--ui-tabbar-border)",background:"var(--ui-root-bg)",color:"var(--ui-text)",whiteSpace:"normal",font:"14px/1.8 system-ui"},children:[a.jsx("h2",{id:"pwa-install-title",style:{margin:"0 0 12px",fontSize:18},children:"添加到主屏幕"}),a.jsx("p",{children:"iPhone / iPad:在 Safari 点击分享按钮,选择“添加到主屏幕”,再点“添加”。"}),a.jsx("p",{children:"Android:打开浏览器菜单,选择“安装应用”或“添加到主屏幕”。"}),a.jsx("p",{style:{color:"var(--ui-muted-text)"},children:"浏览器需要你确认,网页无法自动添加。从主屏幕打开后,如提示未配对,请重新扫码。"}),a.jsx("button",{type:"button",style:{...y,width:"100%",padding:"10px 14px",borderStyle:"solid",borderWidth:1,borderRadius:8,cursor:"pointer"},onClick:()=>i.current?.close(),children:"知道了"})]})]})}let w=["codex","claude agents","opencode","agent-tui"],k={watcherFrame:4,producerFrame:5};var j=r(1321),z=r.n(j);let S=p("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);function C({children:e}){let t=function(){let[e,t]=(0,o.useState)("loading"),[r,a]=(0,o.useState)(null),[n]=(0,o.useState)("same-origin"),[i,s]=(0,o.useState)(null),l=(0,o.useCallback)(async()=>{t("loading"),s(null);try{let e=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if(401===e.status||423===e.status){window.location.reload();return}if(!e.ok)throw Error(`HTTP ${e.status}`);let r=await e.json();a(r.user),t("authenticated")}catch{s("无法连接远程控制台"),t("needsLogin")}},[]),d=(0,o.useCallback)(async()=>{let e=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if((401===e.status||423===e.status)&&window.location.reload(),!e.ok)throw Error("bootstrap failed");let r=await e.json();return a(r.user),t("authenticated"),r.wsNonce},[]),c=(0,o.useCallback)(async()=>(window.location.reload(),!1),[]);return{status:e,user:r,error:i,csrfToken:n,setup:c,login:c,logout:(0,o.useCallback)(async()=>{let e=await fetch("/api/pairing/logout",{method:"POST",credentials:"same-origin"});e.ok||401===e.status||423===e.status?window.location.reload():s("退出失败,请重试")},[]),refresh:l,getWsNonce:d}}(),[r,n]=(0,o.useState)(()=>Date.now()),[i,s]=(0,o.useState)(()=>Date.now());if("authenticated"===t.status)return a.jsx(a.Fragment,{children:e(t)});let l=!t.error;return(0,a.jsxs)("main",{className:`jsx-3fdfcb7d409f1983 remote-gate${l?" is-connecting":" is-error"}`,children:[a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-grid"}),a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-stream remote-stream-left"}),a.jsx("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-stream remote-stream-right"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-content",children:[(0,a.jsxs)("div",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-scene",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-beam"}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-one"}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-two"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-device",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-device-back"}),(0,a.jsxs)("div",{className:"jsx-3fdfcb7d409f1983 remote-screen",children:[a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-screen-scan"}),a.jsx(S,{size:44,strokeWidth:1.25})]}),a.jsx("div",{className:"jsx-3fdfcb7d409f1983 remote-device-stand"})]})]}),(0,a.jsxs)("div",{role:l?"status":"alert","aria-label":l?"正在连接远程控制台":t.error||void 0,className:"jsx-3fdfcb7d409f1983 remote-status",children:[a.jsx(S,{size:20,strokeWidth:1.8,"aria-hidden":"true"}),a.jsx("span",{className:"jsx-3fdfcb7d409f1983",children:t.error||"远程连接中"}),l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"jsx-3fdfcb7d409f1983 remote-elapsed",children:["\xb7 已持续 ",Math.max(0,Math.floor((i-r)/1e3))," 秒"]})]})]}),a.jsx(z(),{id:"3fdfcb7d409f1983",children:'.remote-gate.jsx-3fdfcb7d409f1983{position:relative;min-height:100dvh;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;overflow:hidden;background:-webkit-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-webkit-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:-moz-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-moz-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:-o-linear-gradient(332deg,rgba(45,112,124,.2),transparent 31%),-o-linear-gradient(202deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);background:linear-gradient(118deg,rgba(45,112,124,.2),transparent 31%),linear-gradient(248deg,rgba(48,112,87,.17),transparent 34%),rgba(7,10,14,.92);backdrop-filter:blur(8px)saturate(1.12);-webkit-backdrop-filter:blur(8px)saturate(1.12);color:#e8e8ee;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.remote-gate.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;inset:0;pointer-events:none;background-image:-webkit-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-webkit-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:-moz-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-moz-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:-o-linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),-o-linear-gradient(left,rgba(102,166,255,.045)1px,transparent 1px);background-image:linear-gradient(rgba(91,220,194,.045)1px,transparent 1px),linear-gradient(90deg,rgba(102,166,255,.045)1px,transparent 1px);-webkit-background-size:56px 56px;-moz-background-size:56px 56px;-o-background-size:56px 56px;background-size:56px 56px;-webkit-mask-image:-webkit-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-webkit-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-moz-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:-o-linear-gradient(top,transparent 5%,#000 48%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 5%,#000 48%,transparent 100%);opacity:.82}.remote-grid.jsx-3fdfcb7d409f1983{position:absolute;left:-22%;right:-22%;bottom:-28%;height:70%;-webkit-transform:perspective(440px)rotatex(64deg);-moz-transform:perspective(440px)rotatex(64deg);transform:perspective(440px)rotatex(64deg);-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;-ms-transform-origin:center bottom;-o-transform-origin:center bottom;transform-origin:center bottom;background-image:-webkit-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-webkit-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:-moz-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-moz-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:-o-linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),-o-linear-gradient(left,rgba(101,165,255,.14)1px,transparent 1px);background-image:linear-gradient(rgba(95,220,196,.16)1px,transparent 1px),linear-gradient(90deg,rgba(101,165,255,.14)1px,transparent 1px);-webkit-background-size:46px 46px;-moz-background-size:46px 46px;-o-background-size:46px 46px;background-size:46px 46px;-webkit-mask-image:-webkit-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-webkit-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-moz-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:-o-linear-gradient(top,transparent 4%,#000 60%,transparent 96%);mask-image:linear-gradient(to bottom,transparent 4%,#000 60%,transparent 96%);opacity:.72}.remote-stream.jsx-3fdfcb7d409f1983{position:absolute;top:-12%;width:1px;height:124%;background:-webkit-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:-moz-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:-o-linear-gradient(top,transparent,rgba(96,222,196,.5),transparent 72%);background:linear-gradient(to bottom,transparent,rgba(96,222,196,.5),transparent 72%);opacity:.55;-webkit-transform:rotate(18deg);-moz-transform:rotate(18deg);-ms-transform:rotate(18deg);-o-transform:rotate(18deg);transform:rotate(18deg);-webkit-transform-origin:top;-moz-transform-origin:top;-ms-transform-origin:top;-o-transform-origin:top;transform-origin:top}.remote-stream.jsx-3fdfcb7d409f1983::after{content:"";position:absolute;left:-2px;top:24%;width:5px;height:54px;background:-webkit-linear-gradient(top,transparent,#8cf3dd,transparent);background:-moz-linear-gradient(top,transparent,#8cf3dd,transparent);background:-o-linear-gradient(top,transparent,#8cf3dd,transparent);background:linear-gradient(to bottom,transparent,#8cf3dd,transparent);-webkit-filter:blur(1px);filter:blur(1px);-webkit-animation:streamFlow 2.6s linear infinite;-moz-animation:streamFlow 2.6s linear infinite;-o-animation:streamFlow 2.6s linear infinite;animation:streamFlow 2.6s linear infinite}.remote-stream-left.jsx-3fdfcb7d409f1983{left:16%}.remote-stream-right.jsx-3fdfcb7d409f1983{right:18%;-webkit-transform:rotate(-15deg);-moz-transform:rotate(-15deg);-ms-transform:rotate(-15deg);-o-transform:rotate(-15deg);transform:rotate(-15deg)}.remote-stream-right.jsx-3fdfcb7d409f1983::after{-webkit-animation-delay:-1.3s;-moz-animation-delay:-1.3s;-o-animation-delay:-1.3s;animation-delay:-1.3s}.remote-content.jsx-3fdfcb7d409f1983{position:relative;z-index:1;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.remote-scene.jsx-3fdfcb7d409f1983{position:relative;width:220px;height:154px;-webkit-perspective:520px;-moz-perspective:520px;perspective:520px;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;transform-style:preserve-3d}.remote-beam.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:50%;width:184px;height:2px;-webkit-transform:translate(-50%,-50%)rotatex(68deg);-moz-transform:translate(-50%,-50%)rotatex(68deg);-ms-transform:translate(-50%,-50%)rotatex(68deg);-o-transform:translate(-50%,-50%)rotatex(68deg);transform:translate(-50%,-50%)rotatex(68deg);background:-webkit-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:-moz-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:-o-linear-gradient(left,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);background:linear-gradient(90deg,transparent,rgba(118,177,255,.86),#8cf3dd,transparent);-webkit-box-shadow:0 0 16px rgba(105,222,205,.5);-moz-box-shadow:0 0 16px rgba(105,222,205,.5);box-shadow:0 0 16px rgba(105,222,205,.5);-webkit-animation:beamConnect 1.8s ease-in-out infinite;-moz-animation:beamConnect 1.8s ease-in-out infinite;-o-animation:beamConnect 1.8s ease-in-out infinite;animation:beamConnect 1.8s ease-in-out infinite}.remote-pulse.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:47%;width:132px;height:86px;border:1px solid rgba(112,231,207,.42);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-ms-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-20px);opacity:0;-webkit-animation:signalPulse 2.4s ease-out infinite;-moz-animation:signalPulse 2.4s ease-out infinite;-o-animation:signalPulse 2.4s ease-out infinite;animation:signalPulse 2.4s ease-out infinite}.remote-pulse-two.jsx-3fdfcb7d409f1983{-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;-o-animation-delay:1.2s;animation-delay:1.2s}.remote-device.jsx-3fdfcb7d409f1983{position:absolute;left:50%;top:50%;width:136px;height:108px;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-ms-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg);-webkit-animation:deviceFloat 3.2s ease-in-out infinite;-moz-animation:deviceFloat 3.2s ease-in-out infinite;-o-animation:deviceFloat 3.2s ease-in-out infinite;animation:deviceFloat 3.2s ease-in-out infinite}.remote-device-back.jsx-3fdfcb7d409f1983{position:absolute;inset:3px 2px 17px 7px;border:1px solid rgba(118,177,255,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background:rgba(14,18,27,.68);-webkit-transform:translatez(-12px)translate(7px,6px);-moz-transform:translatez(-12px)translate(7px,6px);-ms-transform:translatez(-12px)translate(7px,6px);-o-transform:translatez(-12px)translate(7px,6px);transform:translatez(-12px)translate(7px,6px)}.remote-screen.jsx-3fdfcb7d409f1983{position:absolute;inset:0 0 18px;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;overflow:hidden;border:1px solid rgba(132,232,215,.58);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background:rgba(10,15,22,.76);color:#9bf4e3;-webkit-box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);-moz-box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);box-shadow:inset 0 0 24px rgba(86,205,185,.08),0 14px 34px rgba(0,0,0,.28),0 0 24px rgba(80,208,185,.14);-webkit-transform:translatez(8px);-moz-transform:translatez(8px);-ms-transform:translatez(8px);-o-transform:translatez(8px);transform:translatez(8px)}.remote-screen.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;inset:7px;border:1px solid rgba(116,174,255,.13);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.remote-screen-scan.jsx-3fdfcb7d409f1983{position:absolute;left:9px;right:9px;height:1px;background:#8cf3dd;-webkit-box-shadow:0 0 8px rgba(140,243,221,.85);-moz-box-shadow:0 0 8px rgba(140,243,221,.85);box-shadow:0 0 8px rgba(140,243,221,.85);-webkit-animation:screenScan 2s ease-in-out infinite;-moz-animation:screenScan 2s ease-in-out infinite;-o-animation:screenScan 2s ease-in-out infinite;animation:screenScan 2s ease-in-out infinite}.remote-device-stand.jsx-3fdfcb7d409f1983{position:absolute;left:50%;bottom:4px;width:44px;height:14px;border-bottom:2px solid rgba(147,183,202,.55);-webkit-transform:translatex(-50%)translatez(4px)skewx(-14deg);-moz-transform:translatex(-50%)translatez(4px)skewx(-14deg);-ms-transform:translatex(-50%)translatez(4px)skewx(-14deg);-o-transform:translatex(-50%)translatez(4px)skewx(-14deg);transform:translatex(-50%)translatez(4px)skewx(-14deg)}.remote-device-stand.jsx-3fdfcb7d409f1983::before{content:"";position:absolute;left:50%;top:-5px;width:2px;height:9px;background:rgba(147,183,202,.55)}.remote-status.jsx-3fdfcb7d409f1983{min-height:24px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;color:#cbd2dc;font-size:13px;line-height:20px;text-shadow:0 1px 10px rgba(0,0,0,.45)}.remote-elapsed.jsx-3fdfcb7d409f1983{color:#9ca6b6;font-size:12px}.is-error.jsx-3fdfcb7d409f1983 .remote-screen.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-status.jsx-3fdfcb7d409f1983{color:#e2a5a5;border-color:rgba(226,165,165,.4)}.is-error.jsx-3fdfcb7d409f1983 .remote-screen-scan.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-beam.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-pulse.jsx-3fdfcb7d409f1983,.is-error.jsx-3fdfcb7d409f1983 .remote-stream.jsx-3fdfcb7d409f1983::after,.is-error.jsx-3fdfcb7d409f1983 .remote-device.jsx-3fdfcb7d409f1983{-webkit-animation:none;-moz-animation:none;-o-animation:none;animation:none}@-webkit-keyframes deviceFloat{0%,100%{-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-webkit-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-moz-keyframes deviceFloat{0%,100%{-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-moz-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-o-keyframes deviceFloat{0%,100%{-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-o-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@keyframes deviceFloat{0%,100%{-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatey(0)}50%{-webkit-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);-moz-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);-o-transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px);transform:translate(-50%,-50%)rotatey(-8deg)rotatex(2deg)translatey(-6px)}}@-webkit-keyframes signalPulse{0%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-moz-keyframes signalPulse{0%{opacity:0;-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-o-keyframes signalPulse{0%{opacity:0;-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@keyframes signalPulse{0%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-18px)scale(.82)}28%{opacity:.58}100%{opacity:0;-webkit-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);-moz-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);-o-transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5);transform:translate(-50%,-50%)rotatey(-12deg)rotatex(4deg)translatez(-42px)scale(1.5)}}@-webkit-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-moz-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-o-keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@keyframes screenScan{0%,100%{top:18%;opacity:.24}50%{top:80%;opacity:.82}}@-webkit-keyframes beamConnect{0%,100%{opacity:.24;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-moz-keyframes beamConnect{0%,100%{opacity:.24;-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-o-keyframes beamConnect{0%,100%{opacity:.24;-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@keyframes beamConnect{0%,100%{opacity:.24;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(.7);transform:translate(-50%,-50%)rotatex(68deg)scalex(.7)}50%{opacity:.9;-webkit-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);-moz-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);-o-transform:translate(-50%,-50%)rotatex(68deg)scalex(1);transform:translate(-50%,-50%)rotatex(68deg)scalex(1)}}@-webkit-keyframes streamFlow{from{-webkit-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-webkit-transform:translatey(460px);transform:translatey(460px);opacity:0}}@-moz-keyframes streamFlow{from{-moz-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-moz-transform:translatey(460px);transform:translatey(460px);opacity:0}}@-o-keyframes streamFlow{from{-o-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-o-transform:translatey(460px);transform:translatey(460px);opacity:0}}@keyframes streamFlow{from{-webkit-transform:translatey(-90px);-moz-transform:translatey(-90px);-o-transform:translatey(-90px);transform:translatey(-90px);opacity:0}30%,70%{opacity:.9}to{-webkit-transform:translatey(460px);-moz-transform:translatey(460px);-o-transform:translatey(460px);transform:translatey(460px);opacity:0}}@media(prefers-reduced-motion:reduce){.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983,.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983::before,.remote-gate.jsx-3fdfcb7d409f1983 *.jsx-3fdfcb7d409f1983::after{-webkit-animation:none!important;-moz-animation:none!important;-o-animation:none!important;animation:none!important}}'})]})}let P=p("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),N=p("TextCursorInput",[["path",{d:"M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1",key:"18xjzo"}],["path",{d:"M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5",key:"fj48gi"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M9 7v10",key:"1vc8ob"}]]),R=p("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),T=p("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),_=p("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),M=p("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),F=p("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function E(e,t,r){let a=e.findIndex(e=>e.id===t),n=e.findIndex(e=>e.id===r);if(a<0||n<0||a===n)return[...e];let i=[...e],[o]=i.splice(a,1);return i.splice(n,0,o),i}function I(e,t="function"==typeof crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("")){return{id:t,command:e.trim()}}function D({commands:e,onChange:t,onExecute:r}){let[n,i]=(0,o.useState)(null),[s,l]=(0,o.useState)(""),[d,c]=(0,o.useState)(null),p=(0,o.useRef)(null),u=()=>{if(!n)return;let r=n.value.trim();return r?r.length>1e3?l("命令最多 1000 个字符"):/[\r\n\0]/.test(r)?l("命令只能包含一行"):void(n.id?t(e.map(e=>e.id===n.id?{...e,command:r}:e)):t([...e,I(r)]),i(null),l("")):l("命令不能为空")},b=(e,t)=>{e.preventDefault(),e.stopPropagation(),p.current=t,c(t),e.currentTarget.setPointerCapture(e.pointerId)},f=r=>{if(!p.current)return;let a=document.elementFromPoint(r.clientX,r.clientY)?.closest("[data-pinned-id]"),n=a?.dataset.pinnedId;n&&n!==p.current&&t(E(e,p.current,n))},m=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),p.current=null,c(null)},x=(r,a)=>{if("ArrowUp"!==r.key&&"ArrowDown"!==r.key)return;r.preventDefault();let n=e.findIndex(e=>e.id===a),i=e[n+("ArrowUp"===r.key?-1:1)];i&&t(E(e,a,i.id))};return(0,a.jsxs)("section",{className:"pinned-commands","aria-labelledby":"pinned-command-title",children:[(0,a.jsxs)("div",{className:"pinned-command-head",children:[a.jsx("span",{id:"pinned-command-title",children:"置顶命令"}),a.jsx("button",{className:"history-icon-button",onClick:()=>{i({id:null,value:""}),l("")},"aria-label":"新增置顶命令",title:"新增置顶命令",children:a.jsx(h,{size:14,"aria-hidden":"true"})})]}),e.map(o=>n?.id===o.id?a.jsx(L,{editor:n,error:s,onChange:e=>{i({...n,value:e}),l("")},onSave:u,onCancel:()=>{i(null),l("")}},o.id):(0,a.jsxs)("div",{className:`pinned-command-row${d===o.id?" pinned-command-dragging":""}`,"data-pinned-id":o.id,role:"button",tabIndex:0,onClick:()=>r(o.command),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r(o.command))},children:[a.jsx("button",{className:"pinned-command-grip",onPointerDown:e=>b(e,o.id),onPointerMove:f,onPointerUp:m,onPointerCancel:m,onKeyDown:e=>x(e,o.id),onClick:e=>e.stopPropagation(),"aria-label":`调整 ${o.command} 的顺序`,title:"拖动排序,或按上下方向键",children:a.jsx(_,{size:14,"aria-hidden":"true"})}),a.jsx("code",{children:o.command}),(0,a.jsxs)("div",{className:"pinned-command-actions",onClick:e=>e.stopPropagation(),children:[a.jsx("button",{className:"history-icon-button",onClick:()=>{i({id:o.id,value:o.command}),l("")},"aria-label":`编辑 ${o.command}`,title:"编辑",children:a.jsx(M,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>t(e.filter(e=>e.id!==o.id)),"aria-label":`删除 ${o.command}`,title:"删除",children:a.jsx(T,{size:12,"aria-hidden":"true"})})]})]},o.id)),n?.id===null&&a.jsx(L,{editor:n,error:s,onChange:e=>{i({...n,value:e}),l("")},onSave:u,onCancel:()=>{i(null),l("")}})]})}function L({editor:e,error:t,onChange:r,onSave:n,onCancel:i}){return(0,a.jsxs)("div",{className:"pinned-command-editor",children:[a.jsx("input",{autoFocus:!0,value:e.value,maxLength:1e3,onChange:e=>r(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n(),"Escape"===e.key&&i()},"aria-label":e.id?"编辑置顶命令":"新增置顶命令"}),a.jsx("button",{className:"history-icon-button",onClick:n,"aria-label":"保存命令",title:"保存",children:a.jsx(F,{size:13,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",onClick:i,"aria-label":"取消编辑",title:"取消",children:a.jsx(x,{size:13,"aria-hidden":"true"})}),t&&a.jsx("small",{role:"alert",children:t})]})}async function A(e){let t="undefined"==typeof navigator?void 0:navigator.clipboard;if("function"==typeof t?.writeText&&("undefined"==typeof isSecureContext||isSecureContext))try{return await t.writeText(e),!0}catch{}return function(e){if("undefined"==typeof document||!document.body||"function"!=typeof document.execCommand)return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),Object.assign(t.style,{position:"fixed",top:"0",left:"-9999px",width:"1px",height:"1px",fontSize:"16px",opacity:"0",pointerEvents:"none"}),document.body.appendChild(t);try{return t.focus(),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch{return!1}finally{t.remove()}}(e)}function O({csrfToken:e,terminalId:t,pinnedCommands:r,onPinnedCommandsChange:n,onFill:i,onExecute:s}){let[l,d]=(0,o.useState)([]),[c,p]=(0,o.useState)(""),[b,f]=(0,o.useState)(""),m=(0,o.useCallback)(async()=>{let e=new URLSearchParams({q:c,limit:"200"}),t=await fetch(`/api/web-console/history?${e}`,{credentials:"same-origin"});t.ok&&d((await t.json()).history)},[c]),x=async t=>{await fetch("/api/web-console/history",{method:"DELETE",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e},body:JSON.stringify({id:t})}),m()},g=e=>{t&&i(e)},h=(0,o.useCallback)(e=>{"[REDACTED]"===e||r.some(t=>t.command===e)||n([...r,I(e)])},[n,r]),y=async e=>{f(await A(e)?"已复制命令":"复制失败,请长按命令手动复制")};return(0,a.jsxs)("div",{className:"history-panel",children:[a.jsx(D,{commands:r,onChange:n,onExecute:s}),(0,a.jsxs)("div",{className:"history-search",children:[a.jsx("input",{value:c,onChange:e=>p(e.target.value),placeholder:"搜索命令"}),a.jsx("button",{className:"history-icon-button",onClick:m,"aria-label":"刷新历史",title:"刷新历史",children:a.jsx(u,{size:13,"aria-hidden":"true"})})]}),b&&a.jsx("div",{className:"terminal-clipboard-notice",role:"status",children:b}),l.map(e=>(0,a.jsxs)("div",{className:`history-item${t?"":" history-item-disabled"}`,role:"button",tabIndex:t?0:-1,onClick:()=>g(e.command),onKeyDown:r=>{r.target===r.currentTarget&&("Enter"===r.key||" "===r.key)&&t&&(r.preventDefault(),g(e.command))},children:[a.jsx("code",{children:e.command}),(0,a.jsxs)("small",{children:[e.cwd," \xb7 ",new Date(e.executedAt).toLocaleString()]}),(0,a.jsxs)("div",{className:"history-item-actions",onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[a.jsx("button",{className:"history-icon-button",onClick:()=>void y(e.command),"aria-label":"复制命令",title:"复制",children:a.jsx(P,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",disabled:!t,onClick:()=>g(e.command),"aria-label":"填入命令",title:"填入",children:a.jsx(N,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button",disabled:"[REDACTED]"===e.command||r.some(t=>t.command===e.command),onClick:()=>h(e.command),"aria-label":"置顶命令",title:"置顶",children:a.jsx(R,{size:12,"aria-hidden":"true"})}),a.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>x(e.id),"aria-label":"删除历史",title:"删除",children:a.jsx(T,{size:12,"aria-hidden":"true"})})]})]},e.id)),!l.length&&a.jsx("div",{className:"history-empty",children:"暂无 Shell 命令历史"}),!t&&!!l.length&&a.jsx("div",{className:"history-empty",children:"请先打开一个终端页签"})]})}var $=r(5878);let U=[{id:"pearl",label:"珍珠白",swatch:"#f5f6fa",preview:["#f5f6fa","#4f6ef7"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#f5f6fa","--ui-text":"#111827","--ui-tabbar-bg":"#eef0f6","--ui-tabbar-border":"#dfe3ee","--ui-tab-bg":"#e6e9f4","--ui-tab-text":"#5b6472","--ui-tab-active-bg":"#ffffff","--ui-tab-active-text":"#111827","--ui-tab-accent":"#4f6ef7","--ui-connection-bg":"#eef0f6","--ui-connection-text":"#9ca3af","--ui-tree-bg":"#fbfcfe","--ui-tree-border":"#e5e8f0","--ui-term-col-bg":"#f5f6fa","--ui-fab-bg":"#ffffff","--ui-fab-border":"#d8dcea","--ui-muted-surface":"#eef0f6","--ui-muted-border":"#d8dcea","--ui-muted-text":"#6b7280","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#111827","--ui-panel-input-border":"#d8dcea","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#111827","--ui-history-item-text":"#1f2937","--ui-history-meta":"#9ca3af","--ui-success":"#059669","--ui-error":"#dc2626"},termHostBg:"#ffffff",keybar:{bg:"#eef0f6",border:"#dfe3ee",keyBg:"#ffffff",keyBorder:"#d8dcea",keyText:"#4b5563",accent:"#4f6ef7",accentText:"#ffffff",drag:"#a5b4fc"},xterm:{background:"#ffffff",foreground:"#1f2937",cursor:"#4f6ef7",selectionBackground:"#c7d2fe",black:"#24292e",red:"#d73a49",green:"#22863a",yellow:"#b08800",blue:"#005cc5",magenta:"#6f42c1",cyan:"#1b7c83",white:"#6a737d",brightBlack:"#959da5",brightWhite:"#fafbfc"}},{id:"scifi",label:"科幻霓虹",swatch:"#050a14",preview:["#050a14","#22d3ee"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#050a14","--ui-text":"#e2f3ff","--ui-tabbar-bg":"#0a1220","--ui-tabbar-border":"#10263c","--ui-tab-bg":"#0d1626","--ui-tab-text":"#5c7893","--ui-tab-active-bg":"#122036","--ui-tab-active-text":"#e2f3ff","--ui-tab-accent":"#22d3ee","--ui-connection-bg":"#0a1220","--ui-connection-text":"#5c7893","--ui-tree-bg":"#0d1626","--ui-tree-border":"#10263c","--ui-term-col-bg":"#050a14","--ui-fab-bg":"#122036","--ui-fab-border":"#155e75","--ui-muted-surface":"#0d1626","--ui-muted-border":"#164e63","--ui-muted-text":"#9fb8d0","--ui-panel-input-bg":"#0a1220","--ui-panel-input-text":"#e2f3ff","--ui-panel-input-border":"#164e63","--ui-drawer-tab-text":"#5c7893","--ui-drawer-tab-active":"#e2f3ff","--ui-history-item-text":"#d5ecfb","--ui-history-meta":"#5c7893","--ui-success":"#34d399","--ui-error":"#fb7185"},termHostBg:"#0a1220",keybar:{bg:"#0a1220",border:"#10263c",keyBg:"#0d1626",keyBorder:"#164e63",keyText:"#9fb8d0",accent:"#22d3ee",accentText:"#04121a",drag:"#155e75"},xterm:{background:"#0a1220",foreground:"#e2f3ff",cursor:"#22d3ee",selectionBackground:"#164e63",black:"#0d1626",red:"#fb7185",green:"#34d399",yellow:"#fbbf24",blue:"#38bdf8",magenta:"#e879f9",cyan:"#22d3ee",white:"#e2f3ff",brightBlack:"#5c7893",brightWhite:"#ffffff"}},{id:"noir",label:"暗夜黑",swatch:"#0f1115",preview:["#0f1115","#a78bfa"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#0f1115","--ui-text":"#eceff4","--ui-tabbar-bg":"#14171d","--ui-tabbar-border":"#232833","--ui-tab-bg":"#191d24","--ui-tab-text":"#6b7280","--ui-tab-active-bg":"#1f242d","--ui-tab-active-text":"#eceff4","--ui-tab-accent":"#a78bfa","--ui-connection-bg":"#14171d","--ui-connection-text":"#6b7280","--ui-tree-bg":"#191d24","--ui-tree-border":"#232833","--ui-term-col-bg":"#0f1115","--ui-fab-bg":"#1f242d","--ui-fab-border":"#2a3040","--ui-muted-surface":"#191d24","--ui-muted-border":"#2a3040","--ui-muted-text":"#aab2bf","--ui-panel-input-bg":"#14171d","--ui-panel-input-text":"#eceff4","--ui-panel-input-border":"#2a3040","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#eceff4","--ui-history-item-text":"#d7dce4","--ui-history-meta":"#6b7280","--ui-success":"#4ade80","--ui-error":"#f87171"},termHostBg:"#14171d",keybar:{bg:"#14171d",border:"#232833",keyBg:"#191d24",keyBorder:"#2a3040",keyText:"#aab2bf",accent:"#a78bfa",accentText:"#0f1115",drag:"#4b4470"},xterm:{background:"#14171d",foreground:"#eceff4",cursor:"#a78bfa",selectionBackground:"#3b3654",black:"#191d24",red:"#f87171",green:"#4ade80",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#67e8f9",white:"#eceff4",brightBlack:"#6b7280",brightWhite:"#ffffff"}}],W="pearl",B=Object.fromEntries(U.map(e=>[e.id,e])),H={dark:"noir",black:"noir",gray:"noir",blue:"noir",red:"noir",yellow:"noir",green:"noir",white:"pearl"};function q({username:e,themeId:t,onThemeChange:r,accent:n,accentText:i}){let[s,l]=(0,o.useState)(!1),d=(0,o.useRef)(null),c=(0,o.useRef)(null),p=(0,o.useRef)(null),[u,b]=(0,o.useState)(null),[f,m]=(0,o.useState)(null),x=(e.trim()[0]??"?").toUpperCase();return(0,a.jsxs)("div",{ref:d,className:"theme-picker",children:[a.jsx("button",{ref:c,type:"button",className:"theme-avatar","aria-label":`换肤(${e})`,title:e,"aria-expanded":s,onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.preventDefault(),e.stopPropagation(),l(e=>!e)},style:{border:`1px solid ${n}`,background:n,color:i},children:x}),s&&u&&f&&(0,$.createPortal)((0,a.jsxs)("div",{ref:p,className:"theme-popover",role:"dialog","aria-label":"选择皮肤",style:{position:"fixed",top:u.top,left:u.left,zIndex:200,width:176,padding:8,borderRadius:10,border:"1px solid var(--ui-tabbar-border, #282b36)",background:"var(--ui-tab-active-bg, #262b38)",boxShadow:"0 10px 28px rgba(0,0,0,.45)"},children:[a.jsx("div",{style:{fontSize:10,color:"var(--ui-connection-text, #777b8c)",margin:"2px 4px 6px",letterSpacing:.5},children:"皮肤"}),a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:2},children:U.map(e=>{let n=e.id===t;return(0,a.jsxs)("button",{type:"button",className:"theme-popover-item","aria-label":e.label,"aria-pressed":n,onPointerDown:e=>e.stopPropagation(),onClick:()=>{r(e.id),l(!1)},style:{background:n?"color-mix(in srgb, var(--ui-tab-accent, #7aa2f7) 14%, transparent)":"transparent"},children:[a.jsx("span",{style:{width:18,height:18,borderRadius:5,flexShrink:0,background:`linear-gradient(135deg, ${e.preview[0]} 55%, ${e.preview[1]} 55%)`,boxShadow:"inset 0 0 0 1px rgba(128,128,160,.25)"}}),a.jsx("span",{style:{flex:1,textAlign:"left",fontSize:12,fontWeight:n?600:400,color:n?"var(--ui-tab-active-text, #edf0f7)":"var(--ui-tab-text, #8f93a4)"},children:e.label}),n&&a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ui-tab-accent, #7aa2f7)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"m5 12 4 4L19 6"})})]},e.id)})})]}),f)]})}let V=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./TerminalPane"]},ssr:!1}),G=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./FileTree"]},ssr:!1}),X=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./FilePreview"]},ssr:!1}),J=i()(async()=>{},{loadableGenerated:{modules:["app/web/page.tsx -> ./AiHubPane"]},ssr:!1});function K(){return a.jsx(C,{children:e=>a.jsx(Q,{auth:e})})}let Y={id:"webapp-agent",title:"智能助手",kind:"webapp"},Z={id:"ai-hub",title:"AI Hub",kind:"aihub"};function Q({auth:e}){let t=(0,o.useRef)(null),r=(0,o.useRef)(()=>{}),{state:n,epoch:i,rpc:s,onEvent:l,onTerminalData:d,onTerminalReset:c,sendTerminalInput:p}=function(e,t,r){let[a,n]=(0,o.useState)({connected:!1,error:null}),[i,s]=(0,o.useState)(0),l=(0,o.useRef)(null),d=(0,o.useRef)(0),c=(0,o.useRef)(new Map),p=(0,o.useRef)([]),u=(0,o.useRef)(0),b=(0,o.useRef)(new Map),f=(0,o.useRef)(new Map),m=(0,o.useRef)(new Map),x=(0,o.useRef)(1e3),g=(0,o.useRef)(!1),h=(0,o.useRef)(null),y=(0,o.useRef)(e),v=(0,o.useRef)(t),w=(0,o.useRef)(r);y.current=e,v.current=t,w.current=r;let k=(0,o.useCallback)((e,t)=>{let r=b.current.get(e);return r||b.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),j=(0,o.useCallback)((e,t)=>{let r=f.current.get(e);return r||f.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),z=(0,o.useCallback)((e,t)=>{let r=m.current.get(e);return r||m.current.set(e,r=new Set),r.add(t),()=>r.delete(t)},[]),S=(0,o.useCallback)((e,t)=>{let r=l.current;if(!r||r.readyState!==WebSocket.OPEN)return!1;let a=new TextEncoder().encode(t),n=new Uint8Array(6+a.byteLength),i=new DataView(n.buffer);return n[0]=1,n[1]=1,i.setUint32(2,e),n.set(a,6),r.send(n),!0},[]),C=(0,o.useCallback)(e=>{let t=l.current;t?.readyState===WebSocket.OPEN?t.send(e):p.current.push(e)},[]),P=(0,o.useCallback)((e,t={},r=15e3)=>new Promise((a,n)=>{let i=++u.current,o=setTimeout(()=>{c.current.delete(i),n(Error(`${e} timeout`))},r);c.current.set(i,{resolve:a,reject:n,timer:o}),C(JSON.stringify({type:e,_req:i,...t}))}),[C]),N=(0,o.useCallback)(async()=>{let e,t;g.current=!1;let r=++d.current;h.current&&(clearInterval(h.current),h.current=null);let a=l.current;if(a){a.onopen=a.onmessage=a.onerror=a.onclose=null;try{a.close()}catch{}}try{e=await v.current()}catch{r===d.current&&w.current();return}if(r===d.current&&!g.current){try{t=new WebSocket(`${"https:"===location.protocol?"wss:":"ws:"}//${location.host}/ws?nonce=${encodeURIComponent(e)}`)}catch(e){n({connected:!1,error:String(e)});return}t.binaryType="arraybuffer",l.current=t,t.onopen=()=>{if(r!==d.current||l.current!==t)return;for(let e of(x.current=1e3,n({connected:!0,error:null}),s(e=>e+1),p.current.splice(0)))t.send(e);let e=Date.now();h.current=setInterval(()=>{if(l.current!==t||t.readyState!==WebSocket.OPEN){clearInterval(h.current),h.current=null;return}if(Date.now()-e>25e3){try{t.close()}catch{}return}try{t.send(JSON.stringify({type:"ping"}))}catch{}},1e4);let a=()=>{e=Date.now()};t.addEventListener("message",a),t.addEventListener("close",()=>t.removeEventListener("message",a),{once:!0})},t.onmessage=e=>{let a;if(r===d.current&&l.current===t){if("string"!=typeof e.data){let t=new Uint8Array(e.data);if(t.byteLength>=6&&1===t[0]&&(2===t[1]||6===t[1])){let e=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(2);f.current.get(e)?.forEach(e=>e(t.subarray(6),6===t[1]))}else if(t.byteLength>=6&&1===t[0]&&3===t[1]){let e=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(2);m.current.get(e)?.forEach(e=>e())}else y.current(t);return}try{a=JSON.parse(e.data)}catch{return}if("error"===a.type&&null!=a.id){let e=c.current.get(a.id);if(e){c.current.delete(a.id),clearTimeout(e.timer);let t=Object.assign(Error(a.error||"gateway error"),{code:a.code});e.reject(t)}return}if(null!=a.id&&"string"==typeof a.type&&a.type.endsWith(":result")){let e=c.current.get(a.id);e&&(c.current.delete(a.id),clearTimeout(e.timer),e.resolve(a));return}b.current.get(a.type)?.forEach(e=>e(a))}},t.onclose=e=>{if(r!==d.current||l.current!==t)return;if(h.current&&(clearInterval(h.current),h.current=null),l.current=null,n({connected:!1,error:null}),4001===e.code||4003===e.code){w.current();return}if(g.current)return;let a=x.current;x.current=Math.min(2*a,8e3),setTimeout(()=>{g.current||r!==d.current||N()},a)},t.onerror=()=>{}}},[]);return{state:a,epoch:i,rpc:P,onEvent:k,onTerminalData:j,onTerminalReset:z,sendTerminalInput:S,reconnect:N}}((0,o.useCallback)(e=>{let a=function(e){let t=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength<10||1!==t[0]||t[1]!==k.watcherFrame&&t[1]!==k.producerFrame)return null;let r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{type:t[1],channelId:r.getUint32(2,!1),sequence:r.getUint32(6,!1),payload:t.subarray(10)}}(e);if(!a||a.type!==k.watcherFrame)return;r.current(a.channelId,a.sequence);let n=a.payload.slice().buffer;t.current?.contentWindow?.postMessage({type:"agent-web-shell:browser-frame:v1",channelId:a.channelId,sequence:a.sequence,data:n},window.location.origin,[n])},[]),e.getWsNonce,e.refresh);r.current=(e,t)=>{s("browser:frame-ack",{channelId:e,sequence:t}).catch(()=>void 0)};let[g,h]=(0,o.useState)([{...Y}]),[y,j]=(0,o.useState)(Y.id),[z,S]=(0,o.useState)({});(0,o.useRef)(!1),(0,o.useRef)(null);let C=(0,o.useRef)(new Map),P=(0,o.useRef)(new Map),N=(0,o.useCallback)((e,t)=>{C.current.set(e,t);let r=window.setTimeout(()=>{if(C.current.get(e)!==t)return;let r=P.current.get(e);r&&(P.current.delete(e),t(r,!0))},180);return()=>{window.clearTimeout(r),C.current.get(e)===t&&C.current.delete(e)}},[]),R=(0,o.useCallback)(e=>{if(!y||g.find(e=>e.id===y)?.kind==="webapp")return;let t=C.current.get(y);t?t(e):s("term:input",{id:y,data:`\x15${e}`}).catch(()=>{}),L(!1)},[y,s,g]),[T,_]=(0,o.useState)(!1),[M,F]=(0,o.useState)({}),[E,I]=(0,o.useState)(null),[D,L]=(0,o.useState)(!1),[A,$]=(0,o.useState)("files"),[U,K]=(0,o.useState)(null),[Q,er]=(0,o.useState)(!0),[ea,en]=(0,o.useState)(null),[ei,eo]=(0,o.useState)(!1),[es,el]=(0,o.useState)([]),[ed,ec]=(0,o.useState)(w.map((e,t)=>({id:`default-${t+1}`,command:e}))),[ep,eu]=(0,o.useState)(W),[eb,ef]=(0,o.useState)(!1),[em,ex]=(0,o.useState)(!1),eg=function(e){if(e&&e in B)return B[e];let t=e?H[e]:void 0;return t?B[t]:B[W]}(ep),eh=(0,o.useRef)(null),[ey,ev]=(0,o.useState)(0),[ew,ek]=(0,o.useState)(!1),ej=(0,o.useRef)(null),ez=(0,o.useRef)(null),eS=(0,o.useCallback)(e=>{t.current?.contentWindow?.postMessage({type:"agent-web-shell:skin:v1",skin:e},window.location.origin)},[]);(0,o.useRef)(0);let eC=y?z[y]??null:null;(0,o.useCallback)(t=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e.csrfToken},body:JSON.stringify(t)}).catch(()=>{})},[e.csrfToken]),(0,o.useCallback)(t=>{e.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":e.csrfToken},body:JSON.stringify(t)}).catch(()=>{})},[e.csrfToken]);let eP=(0,o.useCallback)(e=>{I(e),L(!1)},[]),eN=(0,o.useCallback)(()=>{if(g.length>=8)return;let e=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;h(t=>t.length>=8?t:[...t,{id:e,title:`Terminal ${t.length+1}`}]),j(e)},[g.length]),eR=(0,o.useCallback)(e=>{let t=g.find(e=>e.id===y);if(t&&"webapp"!==t.kind){let r=C.current.get(t.id);r?r(e,!0):P.current.set(t.id,e),L(!1);return}let r=g.length>=8?g.find(e=>"webapp"!==e.kind):null,a=r?.id??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;r?P.current.set(a,e):h(t=>[...t,{id:a,title:`Terminal ${t.length+1}`,initialCommand:e}]),j(a),L(!1)},[y,g]),eT=e=>{if(e===Y.id)return;let t=g.find(t=>t.id===e)?.kind;("aihub"===t||window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(h(t=>{let r=t.filter(t=>t.id!==e);return y===e&&j(r[0]?.id??null),r}),"aihub"!==t&&s("term:kill",{id:e}).catch(()=>{}))},e_=(0,o.useCallback)(()=>{h(e=>{let t=e.find(e=>"aihub"===e.kind);return t?(j(t.id),e):(j(Z.id),[...e,{...Z}])})},[]),eM=(0,o.useCallback)(()=>{j(Y.id),t.current?.contentWindow?.postMessage({type:"agent-web-shell:open-browser-live:v1"},window.location.origin)},[]),eF=(0,o.useCallback)(e=>{if(!y||g.length<2)return;let t=(g.findIndex(e=>e.id===y)+e+g.length)%g.length;j(g[t].id)},[y,g]),eE=Math.max(0,g.findIndex(e=>e.id===y)),eI=g[eE]?.kind==="webapp"?eg.cssVars["--ui-term-col-bg"]:eg.termHostBg,eD={...et.root,...eg.cssVars,"--ui-active-content-bg":eI,"--ui-terminal-bg":eg.termHostBg,"--ui-primary-text":eg.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},eL=(0,o.useCallback)(()=>{eh.current=null,ev(0),ek(!1)},[]),eA=(0,o.useCallback)(e=>{Math.abs(e)>=64&&g.length>1&&eF(e<0?1:-1),eL()},[g.length,eF,eL]),eO=e=>e instanceof Element&&!!e.closest(".terminal-screen");return(0,o.useCallback)((e="smooth")=>{let t=ez.current;if(!t||!y)return;let r=t.querySelector(`[data-terminal-id="${y}"]`);if(!r)return;if(r===t.querySelector("[data-terminal-id]")){t&&(t.scrollLeft=0);return}let a=t.querySelector(".terminal-connection"),n=a?.offsetWidth??0,i=r.offsetLeft,o=i+r.offsetWidth,s=t.scrollLeft,l=s+t.clientWidth-n;i<s+8?t.scrollTo({left:Math.max(0,i-8),behavior:e}):o>l-8&&t.scrollTo({left:o-t.clientWidth+n+8,behavior:e})},[y]),(0,a.jsxs)("div",{className:"web-root",style:eD,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ee}}),(0,a.jsxs)("div",{className:"terminal-tabs",ref:ez,children:[g.map(e=>(0,a.jsxs)("div",{"data-terminal-id":e.id,draggable:!0,className:`terminal-tab ${e.id===y?"active":""}`,onDragStart:()=>{ej.current=e.id},onDragOver:e=>e.preventDefault(),onDrop:t=>{t.preventDefault();let r=ej.current;ej.current=null,r&&r!==e.id&&h(t=>{let a=t.findIndex(e=>e.id===r),n=t.findIndex(t=>t.id===e.id);if(a<0||n<0)return t;let i=[...t],[o]=i.splice(a,1);return i.splice(n,0,o),s("term:reorder",{ids:i.map(e=>e.id).filter(e=>e!==Y.id)}).catch(()=>{}),i})},onClick:()=>j(e.id),onDoubleClick:()=>{if("webapp"===e.kind||"aihub"===e.kind)return;let t=window.prompt("页签名称",e.title)?.trim();t&&s("term:rename",{id:e.id,title:t}).then(()=>h(r=>r.map(r=>r.id===e.id?{...r,title:t}:r))).catch(()=>{})},children:[a.jsx("span",{children:e.title}),"webapp"!==e.kind&&a.jsx("button",{tabIndex:-1,onClick:t=>{t.stopPropagation(),eT(e.id)},children:"\xd7"})]},e.id)),a.jsx("button",{className:"terminal-add",disabled:g.length>=8,onClick:eN,children:"+"}),(0,a.jsxs)("div",{className:"terminal-connection",children:[a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>window.location.reload(),children:a.jsx(u,{size:17,"aria-hidden":"true"})}),a.jsx(v,{}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 \xb7 浏览器直播",onClick:eM,children:a.jsx(b,{size:17,"aria-hidden":"true"})}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub \xb7 多模型对比",onClick:e_,children:a.jsx(f,{size:17,"aria-hidden":"true"})}),a.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":D?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":D,onClick:()=>L(e=>!e),children:a.jsx(m,{size:17,"aria-hidden":"true"})}),(0,a.jsxs)("div",{className:"theme-avatar-with-status",children:[a.jsx(q,{username:e.user?.username??"?",themeId:ep,onThemeChange:eu,accent:eg.keybar.accent,accentText:eg.keybar.accentText}),a.jsx("span",{className:"theme-avatar-status","data-connected":n.connected,"aria-label":n.connected?"已连接":"未连接"})]})]})]}),(0,a.jsxs)("main",{className:`workspace ${D?"show-tree":""} ${E?"has-preview":""}`,style:et.workspace,children:[a.jsx("section",{className:"term-col",style:et.termCol,onPointerDownCapture:e=>{"touch"===e.pointerType&&eO(e.target)&&(eL(),eh.current={x:e.clientX,y:e.clientY,axis:"pending",pointerId:e.pointerId})},onPointerMoveCapture:e=>{let t=eh.current;if(!t||e.pointerId!==t.pointerId||"touch"!==e.pointerType)return;let r=e.clientX-t.x,a=e.clientY-t.y;if("pending"===t.axis){if(8>=Math.max(Math.abs(r),Math.abs(a)))return;if(Math.abs(a)>=1.2*Math.abs(r)){eh.current=null;return}t.axis="horizontal",ek(!0);let e=r=>{window.removeEventListener("pointerup",e),window.removeEventListener("pointercancel",e),eh.current===t&&eL()};window.addEventListener("pointerup",e),window.addEventListener("pointercancel",e)}"horizontal"===t.axis&&(e.preventDefault(),ev(r))},onPointerUpCapture:e=>{let t=eh.current;if(!t||e.pointerId!==t.pointerId)return;let r=e.clientX-t.x;"horizontal"===t.axis&&Math.abs(r)>=64?eA(r):eL()},onPointerCancelCapture:eL,children:a.jsx("div",{className:"terminal-track",style:{transform:`translate3d(calc(${-(100*eE)}% + ${ey}px),0,0)`,transition:ew?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:g.map(e=>a.jsx("div",{className:"terminal-slide",style:{position:"relative"},children:"webapp"===e.kind?(0,a.jsxs)(a.Fragment,{children:[a.jsx("iframe",{ref:t,className:"webapp-frame",src:"/app/",title:e.title,onLoad:()=>eS(ep)}),(0,a.jsxs)("div",{className:`webapp-boot${em?" is-ready":""}`,role:"status","aria-live":"polite","aria-hidden":em,children:[(0,a.jsxs)("div",{className:"webapp-boot-mark","aria-hidden":"true",children:[a.jsx("span",{className:"webapp-boot-orbit"}),a.jsx("span",{className:"webapp-boot-diamond"}),a.jsx("span",{className:"webapp-boot-core"})]}),a.jsx("strong",{children:"AgentRoam"}),a.jsx("span",{children:"正在唤醒工作区"})]})]}):"aihub"===e.kind?a.jsx(J,{visible:e.id===y,rpc:s}):a.jsx(V,{terminalId:e.id,title:e.title,initialCommand:e.initialCommand,visible:e.id===y,state:n,rpc:s,onEvent:l,onTerminalData:d,onTerminalReset:c,sendTerminalInput:p,keyOrder:es,keybarHidden:ei,onKeyOrderChange:el,onKeybarHiddenChange:eo,terminalTheme:eg,initialScrollLine:M[e.id]??null,onScrollLineChange:t=>F(r=>r[e.id]===t?r:{...r,[e.id]:t}),onRegisterFill:t=>N(e.id,t),onCwdChange:t=>t&&S(r=>({...r,[e.id]:t}))})},e.id))})}),D&&a.jsx("div",{className:"drawer-mask",onClick:()=>L(!1)}),(0,a.jsxs)("aside",{className:`tree-col ${D?"tree-col-open":""}`,style:et.treeCol,children:[(0,a.jsxs)("div",{className:"tree-head",style:et.treeHead,children:[a.jsx("button",{className:"files"===A?"drawer-tab-active":"",onClick:()=>$("files"),children:"文件"}),a.jsx("button",{className:"history"===A?"drawer-tab-active":"",onClick:()=>$("history"),children:"历史"}),a.jsx("span",{className:"tree-cwd",style:et.treeCwd,children:eC??""}),a.jsx("button",{style:{...et.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>L(!1),"aria-label":"close drawer",children:a.jsx(x,{size:15,"aria-hidden":"true"})})]}),"files"===A?a.jsx(G,{ready:i>0,followCwd:!0,cwd:eC,rpc:s,onEvent:l,onOpenFile:eP,selectedPath:E,initialRoot:U,initialFollow:Q,revealRequest:ea,onTreeStateChange:(e,t)=>{K(e),er(t)}}):a.jsx(O,{csrfToken:e.csrfToken,terminalId:g.find(e=>e.id===y)?.kind==="webapp"?null:y,pinnedCommands:ed,onPinnedCommandsChange:ec,onFill:R,onExecute:eR}),(0,a.jsxs)("div",{style:et.treeFoot,children:[a.jsx("span",{style:et.treeFootDot}),a.jsx("span",{children:"实时同步"})]})]}),E&&a.jsx("section",{className:"preview-col",style:et.previewCol,children:a.jsx(X,{path:E,rpc:s,onClose:()=>I(null)})})]})]})}let ee=`
2
2
  html, body { width:100%; height:100%; margin:0; overflow:hidden; background:var(--ui-root-bg, #0b0b10); overscroll-behavior:none; color:var(--ui-text, #e8e8ee); }
3
3
  * { -webkit-tap-highlight-color: transparent; }
4
4
  .terminal-tabs { display:flex; align-items:end; gap:4px; min-height:38px; padding:0 8px; overflow-x:auto; overflow-y:hidden; touch-action:pan-x; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; scroll-behavior:smooth; background:var(--ui-tabbar-bg, #12141b); border-bottom:0; scrollbar-width:none; flex-shrink:0; }
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><script src="/_next/static/chunks/184-af5bc14575fc8ebd.js" async=""></script><script src="/_next/static/chunks/app/web/page-93b87fd495171494.js" async=""></script><script src="/_next/static/chunks/app/web/error-828d278147a0619d.js" async=""></script><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><main class="jsx-3fdfcb7d409f1983 remote-gate is-connecting"><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-grid"></div><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-stream remote-stream-left"></div><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-stream remote-stream-right"></div><div class="jsx-3fdfcb7d409f1983 remote-content"><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-scene"><div class="jsx-3fdfcb7d409f1983 remote-beam"></div><div class="jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-one"></div><div class="jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-two"></div><div class="jsx-3fdfcb7d409f1983 remote-device"><div class="jsx-3fdfcb7d409f1983 remote-device-back"></div><div class="jsx-3fdfcb7d409f1983 remote-screen"><div class="jsx-3fdfcb7d409f1983 remote-screen-scan"></div><svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="jsx-3fdfcb7d409f1983 remote-device-stand"></div></div></div><div role="status" aria-label="正在连接远程控制台" class="jsx-3fdfcb7d409f1983 remote-status"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg><span class="jsx-3fdfcb7d409f1983">远程连接中</span><span aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-elapsed">· 已持续 <!-- -->0<!-- --> 秒</span></div></div></main><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[5613,[],\"ClientPageRoot\"]\n4:I[6061,[\"184\",\"static/chunks/184-af5bc14575fc8ebd.js\",\"541\",\"static/chunks/app/web/page-93b87fd495171494.js\"],\"default\",1]\n5:I[1338,[],\"\"]\n6:I[3194,[\"980\",\"static/chunks/app/web/error-828d278147a0619d.js\"],\"default\"]\n7:I[1573,[],\"\"]\n9:I[6554,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"aWNdihGfcWU3x-pPuMP1I\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"web\"],\"initialTree\":[\"\",{\"children\":[\"web\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"web\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[\"$\",\"$L3\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$4\"}],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"web\",\"children\"],\"error\":\"$6\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><script src="/_next/static/chunks/184-af5bc14575fc8ebd.js" async=""></script><script src="/_next/static/chunks/app/web/page-93b87fd495171494.js" async=""></script><script src="/_next/static/chunks/app/web/error-828d278147a0619d.js" async=""></script><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><main class="jsx-3fdfcb7d409f1983 remote-gate is-connecting"><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-grid"></div><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-stream remote-stream-left"></div><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-stream remote-stream-right"></div><div class="jsx-3fdfcb7d409f1983 remote-content"><div aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-scene"><div class="jsx-3fdfcb7d409f1983 remote-beam"></div><div class="jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-one"></div><div class="jsx-3fdfcb7d409f1983 remote-pulse remote-pulse-two"></div><div class="jsx-3fdfcb7d409f1983 remote-device"><div class="jsx-3fdfcb7d409f1983 remote-device-back"></div><div class="jsx-3fdfcb7d409f1983 remote-screen"><div class="jsx-3fdfcb7d409f1983 remote-screen-scan"></div><svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="jsx-3fdfcb7d409f1983 remote-device-stand"></div></div></div><div role="status" aria-label="正在连接远程控制台" class="jsx-3fdfcb7d409f1983 remote-status"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg><span class="jsx-3fdfcb7d409f1983">远程连接中</span><span aria-hidden="true" class="jsx-3fdfcb7d409f1983 remote-elapsed">· 已持续 <!-- -->0<!-- --> 秒</span></div></div></main><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[5613,[],\"ClientPageRoot\"]\n4:I[6061,[\"184\",\"static/chunks/184-af5bc14575fc8ebd.js\",\"541\",\"static/chunks/app/web/page-93b87fd495171494.js\"],\"default\",1]\n5:I[1338,[],\"\"]\n6:I[3194,[\"980\",\"static/chunks/app/web/error-828d278147a0619d.js\"],\"default\"]\n7:I[1573,[],\"\"]\n9:I[6554,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"ZqeC5NkIDDyPiS-mzOs28\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"web\"],\"initialTree\":[\"\",{\"children\":[\"web\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"web\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[\"$\",\"$L3\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$4\"}],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"web\",\"children\"],\"error\":\"$6\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
@@ -3,6 +3,6 @@
3
3
  4:I[1338,[],""]
4
4
  5:I[3194,["980","static/chunks/app/web/error-828d278147a0619d.js"],"default"]
5
5
  6:I[1573,[],""]
6
- 0:["aWNdihGfcWU3x-pPuMP1I",[[["",{"children":["web",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["web",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","web","children"],"error":"$5","errorStyles":[],"errorScripts":[],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","html",null,{"lang":"en","children":["$","body",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],["$","script",null,{"src":"/pwa/install.js","defer":true}]]}]}]],null],null],["$L7",null]]]]
6
+ 0:["ZqeC5NkIDDyPiS-mzOs28",[[["",{"children":["web",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["web",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","web","children"],"error":"$5","errorStyles":[],"errorScripts":[],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","html",null,{"lang":"en","children":["$","body",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],["$","script",null,{"src":"/pwa/install.js","defer":true}]]}]}]],null],null],["$L7",null]]]]
7
7
  7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"AgentRoam"}],["$","meta","3",{"name":"description","content":"General-purpose AI agent API server"}],["$","link","4",{"rel":"manifest","href":"/manifest.webmanifest","crossOrigin":"use-credentials"}],["$","meta","5",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"AgentRoam"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/pwa/icon-192.png"}],["$","link","9",{"rel":"apple-touch-icon","href":"/pwa/icon-192.png"}]]
8
8
  1:null
@@ -1,53 +1,53 @@
1
1
  {
2
2
  "/_not-found/page": "app/_not-found/page.js",
3
3
  "/api/auth/verify/route": "app/api/auth/verify/route.js",
4
- "/api/mcp/connect/route": "app/api/mcp/connect/route.js",
5
4
  "/api/mcp/disconnect/route": "app/api/mcp/disconnect/route.js",
5
+ "/api/mcp/connect/route": "app/api/mcp/connect/route.js",
6
6
  "/api/memory/[key]/route": "app/api/memory/[key]/route.js",
7
+ "/api/mcp/servers/route": "app/api/mcp/servers/route.js",
7
8
  "/api/memory/route": "app/api/memory/route.js",
8
9
  "/api/projects/[id]/route": "app/api/projects/[id]/route.js",
9
10
  "/api/plugins/load/route": "app/api/plugins/load/route.js",
10
- "/api/mcp/servers/route": "app/api/mcp/servers/route.js",
11
11
  "/api/projects/check/route": "app/api/projects/check/route.js",
12
+ "/api/projects/roots/route": "app/api/projects/roots/route.js",
12
13
  "/api/projects/directories/route": "app/api/projects/directories/route.js",
13
14
  "/api/projects/route": "app/api/projects/route.js",
14
- "/api/projects/roots/route": "app/api/projects/roots/route.js",
15
15
  "/api/remote-tools/register/route": "app/api/remote-tools/register/route.js",
16
- "/api/tools/route": "app/api/tools/route.js",
17
16
  "/api/skills/route": "app/api/skills/route.js",
18
- "/api/web-auth/logout/route": "app/api/web-auth/logout/route.js",
19
- "/api/web-auth/setup/route": "app/api/web-auth/setup/route.js",
17
+ "/api/tools/route": "app/api/tools/route.js",
20
18
  "/api/web-auth/login/route": "app/api/web-auth/login/route.js",
21
- "/api/web-console/history/route": "app/api/web-console/history/route.js",
22
19
  "/api/web-auth/revoke-all/route": "app/api/web-auth/revoke-all/route.js",
20
+ "/api/web-auth/setup/route": "app/api/web-auth/setup/route.js",
21
+ "/api/web-console/history/route": "app/api/web-console/history/route.js",
23
22
  "/api/web-console/preferences/route": "app/api/web-console/preferences/route.js",
23
+ "/api/web-auth/logout/route": "app/api/web-auth/logout/route.js",
24
+ "/web/page": "app/web/page.js",
24
25
  "/api/agent-workspaces/route": "app/api/agent-workspaces/route.js",
25
- "/api/agent/answer/route": "app/api/agent/answer/route.js",
26
+ "/api/agent-workspaces/[workspaceId]/sessions/route": "app/api/agent-workspaces/[workspaceId]/sessions/route.js",
26
27
  "/api/agent/abort/route": "app/api/agent/abort/route.js",
27
- "/api/agent/harness/status/route": "app/api/agent/harness/status/route.js",
28
+ "/api/agent/answer/route": "app/api/agent/answer/route.js",
28
29
  "/api/agent/model/route": "app/api/agent/model/route.js",
30
+ "/api/agent/harness/status/route": "app/api/agent/harness/status/route.js",
31
+ "/api/agent/models/route": "app/api/agent/models/route.js",
29
32
  "/api/agent/runtime-health/route": "app/api/agent/runtime-health/route.js",
30
33
  "/api/agent/steer/route": "app/api/agent/steer/route.js",
31
- "/api/agent-workspaces/[workspaceId]/sessions/route": "app/api/agent-workspaces/[workspaceId]/sessions/route.js",
32
- "/api/agent/models/route": "app/api/agent/models/route.js",
34
+ "/api/agent/run/route": "app/api/agent/run/route.js",
33
35
  "/api/business/route": "app/api/business/route.js",
34
36
  "/api/sessions/[id]/fork/route": "app/api/sessions/[id]/fork/route.js",
35
- "/api/sessions/[id]/handoff/route": "app/api/sessions/[id]/handoff/route.js",
36
- "/api/agent/run/route": "app/api/agent/run/route.js",
37
- "/api/sessions/[id]/query-index/route": "app/api/sessions/[id]/query-index/route.js",
38
37
  "/api/sessions/[id]/changes/route": "app/api/sessions/[id]/changes/route.js",
38
+ "/api/agent/stream/route": "app/api/agent/stream/route.js",
39
+ "/api/sessions/[id]/goals/route": "app/api/sessions/[id]/goals/route.js",
39
40
  "/api/sessions/[id]/release/route": "app/api/sessions/[id]/release/route.js",
41
+ "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
42
+ "/api/sessions/[id]/handoff/route": "app/api/sessions/[id]/handoff/route.js",
43
+ "/api/sessions/[id]/query-index/route": "app/api/sessions/[id]/query-index/route.js",
44
+ "/api/sessions/route": "app/api/sessions/route.js",
45
+ "/api/sessions/[id]/tool-result/route": "app/api/sessions/[id]/tool-result/route.js",
40
46
  "/api/settings/route": "app/api/settings/route.js",
41
- "/api/sessions/[id]/goals/route": "app/api/sessions/[id]/goals/route.js",
42
- "/api/update/check/route": "app/api/update/check/route.js",
43
- "/api/agent/stream/route": "app/api/agent/stream/route.js",
44
47
  "/api/update/status/route": "app/api/update/status/route.js",
48
+ "/api/update/check/route": "app/api/update/check/route.js",
45
49
  "/api/update/install/route": "app/api/update/install/route.js",
46
50
  "/api/web-console/bootstrap/route": "app/api/web-console/bootstrap/route.js",
47
- "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
48
- "/api/sessions/route": "app/api/sessions/route.js",
49
- "/api/sessions/[id]/tool-result/route": "app/api/sessions/[id]/tool-result/route.js",
50
- "/web/page": "app/web/page.js",
51
51
  "/api/web-auth/status/route": "app/api/web-auth/status/route.js",
52
52
  "/api/web-console/device-state/route": "app/api/web-console/device-state/route.js"
53
53
  }
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[1338,[],\"\"]\n4:I[1573,[],\"\"]\na:I[6554,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"aWNdihGfcWU3x-pPuMP1I\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><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/webpack-daf53832c67c6b20.js"/><script src="/_next/static/chunks/3cc391f0-d7ec74603652803d.js" async=""></script><script src="/_next/static/chunks/183-d2f78a21998813ba.js" async=""></script><script src="/_next/static/chunks/main-app-07d67f2d4e96ecb8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>AgentRoam</title><meta name="description" content="General-purpose AI agent API server"/><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentRoam"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><link rel="icon" href="/pwa/icon-192.png"/><link rel="apple-touch-icon" href="/pwa/icon-192.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/pwa/install.js" defer=""></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[7709,[],\"\"]\n3:I[1338,[],\"\"]\n4:I[1573,[],\"\"]\na:I[6554,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L1\",null,{\"buildId\":\"ZqeC5NkIDDyPiS-mzOs28\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"script\",null,{\"src\":\"/pwa/install.js\",\"defer\":true}]]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"AgentRoam\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"General-purpose AI agent API server\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentRoam\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/pwa/icon-192.png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"apple-touch-icon\",\"href\":\"/pwa/icon-192.png\"}]]\n2:null\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" defer=""></script><script src="/_next/static/chunks/framework-7bac12ed8564755e.js" defer=""></script><script src="/_next/static/chunks/main-e7d473ec98e152ad.js" defer=""></script><script src="/_next/static/chunks/pages/_app-389e6eb8abb0af2d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-7cee5565b5ef9bcb.js" defer=""></script><script src="/_next/static/aWNdihGfcWU3x-pPuMP1I/_buildManifest.js" defer=""></script><script src="/_next/static/aWNdihGfcWU3x-pPuMP1I/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"aWNdihGfcWU3x-pPuMP1I","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-daf53832c67c6b20.js" defer=""></script><script src="/_next/static/chunks/framework-7bac12ed8564755e.js" defer=""></script><script src="/_next/static/chunks/main-e7d473ec98e152ad.js" defer=""></script><script src="/_next/static/chunks/pages/_app-389e6eb8abb0af2d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-7cee5565b5ef9bcb.js" defer=""></script><script src="/_next/static/ZqeC5NkIDDyPiS-mzOs28/_buildManifest.js" defer=""></script><script src="/_next/static/ZqeC5NkIDDyPiS-mzOs28/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ZqeC5NkIDDyPiS-mzOs28","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"/pioJJbIOgt/fDxnrZMUcXeQM6K3rYjP+qil4B0Ramk="}
1
+ {"node":{},"edge":{},"encryptionKey":"zyCj99+aG0Bx4FfIjVqPOf7LvGXcN6Qa84YebZkuYXE="}
@@ -79,9 +79,6 @@
79
79
  "cpu": [
80
80
  "arm64"
81
81
  ],
82
- "libc": [
83
- "glibc"
84
- ],
85
82
  "license": "SEE LICENSE IN LICENSE.md",
86
83
  "optional": true,
87
84
  "os": [
@@ -95,9 +92,6 @@
95
92
  "cpu": [
96
93
  "arm64"
97
94
  ],
98
- "libc": [
99
- "musl"
100
- ],
101
95
  "license": "SEE LICENSE IN LICENSE.md",
102
96
  "optional": true,
103
97
  "os": [
@@ -111,9 +105,6 @@
111
105
  "cpu": [
112
106
  "x64"
113
107
  ],
114
- "libc": [
115
- "glibc"
116
- ],
117
108
  "license": "SEE LICENSE IN LICENSE.md",
118
109
  "optional": true,
119
110
  "os": [
@@ -127,9 +118,6 @@
127
118
  "cpu": [
128
119
  "x64"
129
120
  ],
130
- "libc": [
131
- "musl"
132
- ],
133
121
  "license": "SEE LICENSE IN LICENSE.md",
134
122
  "optional": true,
135
123
  "os": [
@@ -321,9 +309,6 @@
321
309
  "cpu": [
322
310
  "arm64"
323
311
  ],
324
- "libc": [
325
- "glibc"
326
- ],
327
312
  "license": "MIT",
328
313
  "optional": true,
329
314
  "os": [
@@ -340,9 +325,6 @@
340
325
  "cpu": [
341
326
  "arm64"
342
327
  ],
343
- "libc": [
344
- "musl"
345
- ],
346
328
  "license": "MIT",
347
329
  "optional": true,
348
330
  "os": [
@@ -359,9 +341,6 @@
359
341
  "cpu": [
360
342
  "x64"
361
343
  ],
362
- "libc": [
363
- "glibc"
364
- ],
365
344
  "license": "MIT",
366
345
  "optional": true,
367
346
  "os": [
@@ -378,9 +357,6 @@
378
357
  "cpu": [
379
358
  "x64"
380
359
  ],
381
- "libc": [
382
- "musl"
383
- ],
384
360
  "license": "MIT",
385
361
  "optional": true,
386
362
  "os": [