zigrix 0.1.0-alpha.11 → 0.1.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/dashboard/.next/app-build-manifest.json +11 -11
  3. package/dist/dashboard/.next/app-path-routes-manifest.json +3 -3
  4. package/dist/dashboard/.next/build-manifest.json +2 -2
  5. package/dist/dashboard/.next/prerender-manifest.json +6 -6
  6. package/dist/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  7. package/dist/dashboard/.next/server/app/_not-found.html +1 -1
  8. package/dist/dashboard/.next/server/app/_not-found.rsc +1 -1
  9. package/dist/dashboard/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  10. package/dist/dashboard/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  11. package/dist/dashboard/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  12. package/dist/dashboard/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
  13. package/dist/dashboard/.next/server/app/api/overview/route_client-reference-manifest.js +1 -1
  14. package/dist/dashboard/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
  15. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  16. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/conversation/route_client-reference-manifest.js +1 -1
  17. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  18. package/dist/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  19. package/dist/dashboard/.next/server/app/login.html +1 -1
  20. package/dist/dashboard/.next/server/app/login.rsc +1 -1
  21. package/dist/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  22. package/dist/dashboard/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  23. package/dist/dashboard/.next/server/app/setup.html +1 -1
  24. package/dist/dashboard/.next/server/app/setup.rsc +1 -1
  25. package/dist/dashboard/.next/server/app-paths-manifest.json +3 -3
  26. package/dist/dashboard/.next/server/functions-config-manifest.json +3 -3
  27. package/dist/dashboard/.next/server/pages/404.html +1 -1
  28. package/dist/dashboard/.next/server/pages/500.html +1 -1
  29. package/dist/dashboard.js +47 -0
  30. package/package.json +1 -1
  31. /package/dist/dashboard/.next/static/{AzCYYgjxkCO7RQ7KmraXN → a1WrQSPpMkoKytYGP2VhM}/_buildManifest.js +0 -0
  32. /package/dist/dashboard/.next/static/{AzCYYgjxkCO7RQ7KmraXN → a1WrQSPpMkoKytYGP2VhM}/_ssgManifest.js +0 -0
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "version": 1,
3
3
  "functions": {
4
- "/api/auth/logout": {},
5
4
  "/api/auth/session": {},
6
5
  "/api/overview": {},
7
- "/api/auth/setup": {},
6
+ "/api/auth/logout": {},
8
7
  "/api/auth/login": {},
9
8
  "/api/tasks/[taskId]": {},
10
- "/api/tasks/[taskId]/cancel": {},
11
9
  "/api/tasks/[taskId]/conversation": {},
10
+ "/api/tasks/[taskId]/cancel": {},
12
11
  "/api/stream": {},
12
+ "/api/auth/setup": {},
13
13
  "/_middleware": {
14
14
  "runtime": "nodejs",
15
15
  "matchers": [
@@ -1 +1 @@
1
- <!DOCTYPE html><!--AzCYYgjxkCO7RQ7KmraXN--><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9f7ffdac282b0450.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1c485544eee88ef7.js"/><script src="/_next/static/chunks/4bd1b696-c023c6e3521b1417.js" async=""></script><script src="/_next/static/chunks/255-ebd51be49873d76c.js" async=""></script><script src="/_next/static/chunks/main-app-458501fc143f8dcb.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Zigrix Dashboard</title><meta name="description" content="Zigrix task orchestration dashboard"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><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="/_next/static/chunks/webpack-1c485544eee88ef7.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9766,[],\"\"]\n3:I[8924,[],\"\"]\n4:I[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[7150,[],\"\"]\n:HL[\"/_next/static/css/9f7ffdac282b0450.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"AzCYYgjxkCO7RQ7KmraXN\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9f7ffdac282b0450.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"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,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Zigrix Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Zigrix task orchestration dashboard\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--a1WrQSPpMkoKytYGP2VhM--><html lang="ko"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/9f7ffdac282b0450.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1c485544eee88ef7.js"/><script src="/_next/static/chunks/4bd1b696-c023c6e3521b1417.js" async=""></script><script src="/_next/static/chunks/255-ebd51be49873d76c.js" async=""></script><script src="/_next/static/chunks/main-app-458501fc143f8dcb.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Zigrix Dashboard</title><meta name="description" content="Zigrix task orchestration dashboard"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><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="/_next/static/chunks/webpack-1c485544eee88ef7.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9766,[],\"\"]\n3:I[8924,[],\"\"]\n4:I[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[7150,[],\"\"]\n:HL[\"/_next/static/css/9f7ffdac282b0450.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"a1WrQSPpMkoKytYGP2VhM\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9f7ffdac282b0450.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"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,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Zigrix Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Zigrix task orchestration dashboard\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-1c485544eee88ef7.js" defer=""></script><script src="/_next/static/chunks/framework-de98b93a850cfc71.js" defer=""></script><script src="/_next/static/chunks/main-cac4989ed66738c4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7d307437aca18ad4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js" defer=""></script><script src="/_next/static/AzCYYgjxkCO7RQ7KmraXN/_buildManifest.js" defer=""></script><script src="/_next/static/AzCYYgjxkCO7RQ7KmraXN/_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":"AzCYYgjxkCO7RQ7KmraXN","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-1c485544eee88ef7.js" defer=""></script><script src="/_next/static/chunks/framework-de98b93a850cfc71.js" defer=""></script><script src="/_next/static/chunks/main-cac4989ed66738c4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7d307437aca18ad4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js" defer=""></script><script src="/_next/static/a1WrQSPpMkoKytYGP2VhM/_buildManifest.js" defer=""></script><script src="/_next/static/a1WrQSPpMkoKytYGP2VhM/_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":"a1WrQSPpMkoKytYGP2VhM","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
package/dist/dashboard.js CHANGED
@@ -3,6 +3,7 @@ import * as fs from 'node:fs';
3
3
  import * as net from 'node:net';
4
4
  import * as path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
+ import { detectOpenClawHome } from './onboard.js';
6
7
  /** Default port for zigrix dashboard */
7
8
  export const DASHBOARD_DEFAULT_PORT = 3838;
8
9
  /**
@@ -38,6 +39,49 @@ export function isPortBusy(port) {
38
39
  server.listen(port, '127.0.0.1');
39
40
  });
40
41
  }
42
+ /**
43
+ * Read openclaw.json and extract gateway connection env vars.
44
+ * Only sets vars that are not already present in process.env,
45
+ * so explicit user overrides are always respected.
46
+ */
47
+ function resolveGatewayEnv() {
48
+ const env = {};
49
+ try {
50
+ const openclawHome = detectOpenClawHome();
51
+ const configPath = path.join(openclawHome, 'openclaw.json');
52
+ if (!fs.existsSync(configPath))
53
+ return env;
54
+ const raw = JSON.parse(fs.readFileSync(configPath, 'utf8'));
55
+ const gateway = raw?.gateway;
56
+ if (!gateway)
57
+ return env;
58
+ // OPENCLAW_GATEWAY_URL — derive from gateway.port (loopback assumed)
59
+ if (!process.env.OPENCLAW_GATEWAY_URL && !process.env.ORCH_GATEWAY_URL) {
60
+ const port = Number(gateway.port);
61
+ if (port > 0) {
62
+ env.OPENCLAW_GATEWAY_URL = `http://localhost:${port}`;
63
+ }
64
+ }
65
+ // OPENCLAW_GATEWAY_TOKEN — from gateway.auth.token
66
+ if (!process.env.OPENCLAW_GATEWAY_TOKEN && !process.env.ORCH_GATEWAY_TOKEN) {
67
+ const token = gateway.auth?.token;
68
+ if (typeof token === 'string' && token.length > 0) {
69
+ env.OPENCLAW_GATEWAY_TOKEN = token;
70
+ }
71
+ }
72
+ // OPENCLAW_AGENTS_DIR — agents runtime directory
73
+ if (!process.env.OPENCLAW_AGENTS_DIR) {
74
+ const agentsDir = path.join(openclawHome, 'agents');
75
+ if (fs.existsSync(agentsDir)) {
76
+ env.OPENCLAW_AGENTS_DIR = agentsDir;
77
+ }
78
+ }
79
+ }
80
+ catch {
81
+ // Non-fatal: dashboard will work without gateway features
82
+ }
83
+ return env;
84
+ }
41
85
  /**
42
86
  * Main entry point for `zigrix dashboard`.
43
87
  *
@@ -65,6 +109,8 @@ export async function runDashboard(options = {}) {
65
109
  throw new Error(`Port ${port} is already in use. ` +
66
110
  `Stop the conflicting process or specify a different port with --port.`);
67
111
  }
112
+ // --- Resolve OpenClaw gateway env from openclaw.json ---
113
+ const gatewayEnv = resolveGatewayEnv();
68
114
  // --- Launch pre-built Next.js standalone server ---
69
115
  console.log(`🚀 Starting zigrix dashboard on http://localhost:${port}`);
70
116
  const child = spawn(process.execPath, [serverScript], {
@@ -72,6 +118,7 @@ export async function runDashboard(options = {}) {
72
118
  stdio: 'inherit',
73
119
  env: {
74
120
  ...process.env,
121
+ ...gatewayEnv,
75
122
  PORT: String(port),
76
123
  HOSTNAME: '0.0.0.0',
77
124
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigrix",
3
- "version": "0.1.0-alpha.11",
3
+ "version": "0.1.0-alpha.12",
4
4
  "type": "module",
5
5
  "description": "Multi-project parallel task orchestration CLI for agent-assisted development",
6
6
  "license": "Apache-2.0",