hive-am 1.2.2 → 1.3.0

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 (110) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/package.json +1 -1
  3. package/server/dist/context.js +62 -0
  4. package/server/dist/db/migrations.js +7 -0
  5. package/server/dist/db.js +4 -4
  6. package/server/dist/history/claude.js +8 -2
  7. package/server/dist/http/routes/agents.js +1 -1
  8. package/server/dist/http/validate.js +2 -0
  9. package/server/dist/instructions.js +4 -0
  10. package/server/dist/models.js +2 -0
  11. package/server/dist/providers/claude.js +13 -1
  12. package/server/dist/providers/opencode-server.js +59 -0
  13. package/server/dist/providers/opencode.js +4 -1
  14. package/server/dist/stats.js +15 -3
  15. package/web/.next/BUILD_ID +1 -1
  16. package/web/.next/app-build-manifest.json +70 -70
  17. package/web/.next/app-path-routes-manifest.json +7 -7
  18. package/web/.next/build-manifest.json +2 -2
  19. package/web/.next/prerender-manifest.json +49 -49
  20. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/_not-found.html +1 -1
  22. package/web/.next/server/app/_not-found.rsc +3 -3
  23. package/web/.next/server/app/agents/[id]/page.js +3 -3
  24. package/web/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  25. package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  26. package/web/.next/server/app/agents/page.js +1 -1
  27. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/agents.html +1 -1
  29. package/web/.next/server/app/agents.rsc +4 -4
  30. package/web/.next/server/app/connections/page.js +1 -1
  31. package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/connections.html +1 -1
  33. package/web/.next/server/app/connections.rsc +4 -4
  34. package/web/.next/server/app/index.html +1 -1
  35. package/web/.next/server/app/index.rsc +4 -4
  36. package/web/.next/server/app/page.js +1 -1
  37. package/web/.next/server/app/page.js.nft.json +1 -1
  38. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/relations/page.js +1 -1
  40. package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/relations.html +1 -1
  42. package/web/.next/server/app/relations.rsc +4 -4
  43. package/web/.next/server/app/resources/[id]/page.js +1 -1
  44. package/web/.next/server/app/resources/[id]/page.js.nft.json +1 -1
  45. package/web/.next/server/app/resources/[id]/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/resources/page.js +1 -1
  47. package/web/.next/server/app/resources/page.js.nft.json +1 -1
  48. package/web/.next/server/app/resources/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/resources.html +1 -1
  50. package/web/.next/server/app/resources.rsc +4 -4
  51. package/web/.next/server/app/schedules/page.js +1 -1
  52. package/web/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/schedules.html +1 -1
  54. package/web/.next/server/app/schedules.rsc +4 -4
  55. package/web/.next/server/app/sessions/page.js +1 -1
  56. package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/sessions.html +1 -1
  58. package/web/.next/server/app/sessions.rsc +4 -4
  59. package/web/.next/server/app/skills/page.js +1 -1
  60. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/skills.html +1 -1
  62. package/web/.next/server/app/skills.rsc +4 -4
  63. package/web/.next/server/app/types/page.js +1 -1
  64. package/web/.next/server/app/types/page_client-reference-manifest.js +1 -1
  65. package/web/.next/server/app/types.html +1 -1
  66. package/web/.next/server/app/types.rsc +4 -4
  67. package/web/.next/server/app-paths-manifest.json +7 -7
  68. package/web/.next/server/chunks/143.js +1 -1
  69. package/web/.next/server/chunks/274.js +1 -1
  70. package/web/.next/server/chunks/306.js +1 -1
  71. package/web/.next/server/chunks/451.js +1 -0
  72. package/web/.next/server/chunks/505.js +1 -1
  73. package/web/.next/server/chunks/612.js +1 -1
  74. package/web/.next/server/chunks/716.js +2 -2
  75. package/web/.next/server/pages/404.html +1 -1
  76. package/web/.next/server/pages/500.html +1 -1
  77. package/web/.next/server/server-reference-manifest.json +1 -1
  78. package/web/.next/static/chunks/281-d8a0dcfaa6d064e4.js +1 -0
  79. package/web/.next/static/chunks/{291-efae53ea5f7ee92d.js → 291-23f314877fa39054.js} +1 -1
  80. package/web/.next/static/chunks/304-681348099f874a30.js +1 -0
  81. package/web/.next/static/chunks/350-0fe82e622e7a670f.js +1 -0
  82. package/web/.next/static/chunks/{491-6b4e6201f5110dff.js → 491-28f093772bd460ac.js} +1 -1
  83. package/web/.next/static/chunks/517-373a80c8ba432bdc.js +1 -0
  84. package/web/.next/static/chunks/654-92a63b3c4b412666.js +1 -0
  85. package/web/.next/static/chunks/705-780e48e55b0346bd.js +1 -0
  86. package/web/.next/static/chunks/{844-fe55292e0701f436.js → 844-519177e6198ca84f.js} +1 -1
  87. package/web/.next/static/chunks/app/agents/[id]/page-c005161cec5527d8.js +1 -0
  88. package/web/.next/static/chunks/app/agents/{page-f4c4c80f955f3967.js → page-9bb8cba69776c719.js} +1 -1
  89. package/web/.next/static/chunks/app/connections/{page-0936beaf02d863c6.js → page-eb11cfb1ffeab3ca.js} +1 -1
  90. package/web/.next/static/chunks/app/{layout-99620746d028dda8.js → layout-49b46c9b5aa512a8.js} +1 -1
  91. package/web/.next/static/chunks/app/{page-a7f292117b7d76bf.js → page-da042d146caeeab6.js} +1 -1
  92. package/web/.next/static/chunks/app/relations/{page-fba25393c8688714.js → page-a44fd515a3b0525e.js} +1 -1
  93. package/web/.next/static/chunks/app/resources/[id]/{page-d110d89bb8b5fca7.js → page-bf05836f97248ca7.js} +1 -1
  94. package/web/.next/static/chunks/app/resources/{page-bbd0b450d3f3131d.js → page-800f774e5cacf4c9.js} +1 -1
  95. package/web/.next/static/chunks/app/schedules/{page-a1124397fc760413.js → page-96976fff4ee23538.js} +1 -1
  96. package/web/.next/static/chunks/app/sessions/{page-0e322811b0cde724.js → page-a7534ebd90e982d6.js} +1 -1
  97. package/web/.next/static/chunks/app/skills/{page-22ea0ef89d9f7a13.js → page-bc1acd0663f36129.js} +1 -1
  98. package/web/.next/static/chunks/app/types/{page-18c4e1db2724d41d.js → page-ebd37e220f77c1f3.js} +1 -1
  99. package/web/.next/static/css/{b7a03c62468f4263.css → d42799b7e6a0e8a2.css} +1 -1
  100. package/web/.next/trace +29 -29
  101. package/web/.next/server/chunks/555.js +0 -1
  102. package/web/.next/static/chunks/176-aeaf907a6ea5627d.js +0 -1
  103. package/web/.next/static/chunks/350-56599dc3bf06066d.js +0 -1
  104. package/web/.next/static/chunks/486-13e08542f3a1cbac.js +0 -1
  105. package/web/.next/static/chunks/517-ccaf8cc5c733cbd8.js +0 -1
  106. package/web/.next/static/chunks/705-c7e75806f77b880c.js +0 -1
  107. package/web/.next/static/chunks/839-4aefe6e71be6e1ef.js +0 -1
  108. package/web/.next/static/chunks/app/agents/[id]/page-3faf40800981a736.js +0 -1
  109. /package/web/.next/static/{7BI__-ayGDTlOrSboD_bT → aSYzbHk1M5YeS_d3SQKTZ}/_buildManifest.js +0 -0
  110. /package/web/.next/static/{7BI__-ayGDTlOrSboD_bT → aSYzbHk1M5YeS_d3SQKTZ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--7BI___ayGDTlOrSboD_bT--><html lang="en" class="__variable_23d1a5 __variable_67a390 __variable_4dc837"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/313510e2713fb214-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/33553e7595b74ccf-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="/icon.png"/><link rel="stylesheet" href="/_next/static/css/945795da867f5250.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b7a03c62468f4263.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ef515e41a83a16ac.js"/><script src="/_next/static/chunks/0937d497-114a2a3de515565e.js" async=""></script><script src="/_next/static/chunks/89-b194fcffe5120c44.js" async=""></script><script src="/_next/static/chunks/main-app-6086068e5fb5eacd.js" async=""></script><script src="/_next/static/chunks/586-f7017d585a84738d.js" async=""></script><script src="/_next/static/chunks/839-4aefe6e71be6e1ef.js" async=""></script><script src="/_next/static/chunks/app/layout-99620746d028dda8.js" async=""></script><script src="/_next/static/chunks/706-fa2be0f10ffebe6a.js" async=""></script><script src="/_next/static/chunks/486-13e08542f3a1cbac.js" async=""></script><script src="/_next/static/chunks/517-ccaf8cc5c733cbd8.js" async=""></script><script src="/_next/static/chunks/350-56599dc3bf06066d.js" async=""></script><script src="/_next/static/chunks/291-efae53ea5f7ee92d.js" async=""></script><script src="/_next/static/chunks/844-fe55292e0701f436.js" async=""></script><script src="/_next/static/chunks/app/page-a7f292117b7d76bf.js" async=""></script><meta name="next-size-adjust" content=""/><title>hive-am</title><meta name="description" content="Run a colony of coding agents across Claude Code, OpenCode and Kiro."/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.png?4b73b0b54465bf4f" type="image/png" sizes="256x256"/><link rel="apple-touch-icon" href="/apple-icon.png?cac1d6d73e6ce0be" type="image/png" sizes="180x180"/><script>(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem("hive-locale");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="shell"><nav class="rail" aria-label="Main"><div class="brand"><img src="/icon.png" width="34" height="34" alt="" aria-hidden="true" class="brand-mark"/><div>hive-am<small>agent colony manager</small></div></div><div class="lang-row" role="group" aria-label="Language"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><div class="seg"><button type="button" aria-pressed="true" lang="en" title="English" aria-label="English">EN</button><button type="button" aria-pressed="false" lang="es" title="Español" aria-label="Español">ES</button></div></div><a class="nav" aria-current="page" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hexagon"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg><span class="t">Colony</span></a><a class="nav" href="/resources"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="t">Resources</span></a><a class="nav" href="/agents"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span class="t">Agents</span><span class="count">0</span></a><a class="nav" href="/relations"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-network"><rect x="16" y="16" width="6" height="6" rx="1"></rect><rect x="2" y="16" width="6" height="6" rx="1"></rect><rect x="9" y="2" width="6" height="6" rx="1"></rect><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"></path><path d="M12 12V8"></path></svg><span class="t">Relations</span></a><a class="nav" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plug"><path d="M12 22v-5"></path><path d="M9 8V2"></path><path d="M15 8V2"></path><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"></path></svg><span class="t">Connections</span></a><a class="nav" href="/schedules"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar-clock"><path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"></path><path d="M16 2v4"></path><path d="M8 2v4"></path><path d="M3 10h5"></path><path d="M17.5 17.5 16 16.3V14"></path><circle cx="16" cy="16" r="6"></circle></svg><span class="t">Schedules</span></a><div class="nav-label">Library</div><a class="nav" href="/types"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-boxes"><path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"></path><path d="m7 16.5-4.74-2.85"></path><path d="m7 16.5 5-3"></path><path d="M7 16.5v5.17"></path><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"></path><path d="m17 16.5-5-3"></path><path d="m17 16.5 4.74-2.85"></path><path d="M17 16.5v5.17"></path><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"></path><path d="M12 8 7.26 5.15"></path><path d="m12 8 4.74-2.85"></path><path d="M12 13.5V8"></path></svg><span class="t">Agent types</span><span class="count">0</span></a><a class="nav" href="/skills"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library"><path d="m16 6 4 14"></path><path d="M12 6v14"></path><path d="M8 8v12"></path><path d="M4 4v16"></path></svg><span class="t">Skills</span><span class="count">0</span></a><div class="nav-label">History</div><a class="nav" href="/sessions"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg><span class="t">Sessions</span></a><div class="rail-foot"><button type="button" class="nav" aria-pressed="false" title="Terminal (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-terminal"><path d="m7 11 2-2-2-2"></path><path d="M11 13h4"></path><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect></svg><span class="t">Terminal</span></button><div class="conn"><i class="dot err"></i>Server offline. Retrying…</div><button type="button" class="nav" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="t">Switch theme</span></button></div></nav><main class="main"><div class="page"><div class="page-head"><div><div class="row gap-s"><h1>Colony</h1><span class="help "><button type="button" class="help-btn" aria-label="Help: how to read this map" title="Help: how to read this map" aria-haspopup="dialog" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-help"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path></svg></button></span></div><p>Every agent you run, grouped into colonies and wired to the orchestrators that direct them.</p></div><div class="cx-head-actions"><div class="menu"><button class="btn sm" aria-expanded="false" aria-haspopup="menu"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>New<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></div><div class="stats"><a class="card stat" aria-label="0 agents. Open agents" href="/agents"><b>0</b><span>agents</span></a><div class="card stat"><b>0</b><span>colonies</span></div><a class="card stat" aria-label="0 resources. Open resources" href="/resources"><b>0</b><span>resources</span></a><a class="card stat" aria-label="0 orchestrators. Open orchestrators" href="/agents"><b>0</b><span>orchestrators</span></a><a class="card stat" aria-label="0 working now. Open working now" href="/agents"><b>0</b><span>working now</span></a><a class="card stat" aria-label="0 tasks in flight. Open tasks in flight" href="#recent"><b>0</b><span>tasks in flight</span></a></div><div class="colony"><div class="comb-wrap"><div class="comb-skel" role="status" aria-label="Loading the colony"><div class="skel" style="width:220px;height:190px"></div><div class="row gap-l"><div class="skel" style="width:150px;height:130px"></div><div class="skel" style="width:150px;height:130px"></div></div></div><div class="comb-zoom" role="group" aria-label="Zoom"><button class="btn ghost icon sm" title="Zoom out" aria-label="Zoom out"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"></path></svg></button><button class="btn ghost sm zoom-pct" title="Fit the map to the panel (100%)" aria-label="Fit the map to the panel (100%)">100<!-- -->%</button><button class="btn ghost icon sm" title="Zoom in" aria-label="Zoom in"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg></button><button class="btn ghost icon sm" title="Fit the map to the panel (100%)" aria-label="Fit the map to the panel (100%)"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div><div class="comb-legend"><span class="pbadge" style="--c:var(--p-claude)"><i></i>Claude</span><span class="pbadge" style="--c:var(--p-opencode)"><i></i>OpenCode</span><span class="pbadge" style="--c:var(--p-kiro)"><i></i>Kiro</span><span class="pbadge" style="--c:var(--honey)"><i></i>Orchestrator</span></div></div></div><div class="card card-pad recent" id="recent"><div class="eyebrow recent-head">Recent delegations</div><p class="muted small m0">When an orchestrator hands a task to a worker, it shows up here.</p></div></div><!--$--><!--/$--></main></div><section class="dock" style="height:320px;display:none" aria-hidden="true" aria-label="Terminal panel"><div class="dock-grip" role="separator" aria-orientation="horizontal"></div><div class="dock-bar"><div class="dock-tabs" role="tablist" aria-label="Terminal panel"></div><button class="btn ghost icon sm" aria-label="New terminal" title="New terminal"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg></button><button class="btn ghost icon sm" aria-label="Terminal in a folder…" title="Terminal in a folder…"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></button><span class="grow"></span><button class="btn ghost icon sm" aria-label="Hide the panel" title="Hide the panel (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></button></div><div class="dock-body"><p class="gx-note">No terminals open. Press + to start one.</p></div></section><div class="toasts" data-live="true"></div><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.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[5506,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"839\",\"static/chunks/839-4aefe6e71be6e1ef.js\",\"177\",\"static/chunks/app/layout-99620746d028dda8.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[77363,[],\"ClientPageRoot\"]\n6:I[36098,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"706\",\"static/chunks/706-fa2be0f10ffebe6a.js\",\"486\",\"static/chunks/486-13e08542f3a1cbac.js\",\"839\",\"static/chunks/839-4aefe6e71be6e1ef.js\",\"517\",\"static/chunks/517-ccaf8cc5c733cbd8.js\",\"350\",\"static/chunks/350-56599dc3bf06066d.js\",\"291\",\"static/chunks/291-efae53ea5f7ee92d.js\",\"844\",\"static/chunks/844-fe55292e0701f436.js\",\"974\",\"static/chunks/app/page-a7f292117b7d76bf.js\"],\"default\"]\n9:I[40523,[],\"OutletBoundary\"]\nb:I[91962,[],\"AsyncMetadataOutlet\"]\nd:I[40523,[],\"ViewportBoundary\"]\nf:I[40523,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[89146,[],\"\"]\n:HL[\"/_next/static/media/313510e2713fb214-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/33553e7595b74ccf-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/945795da867f5250.css\",\"style\"]\n:HL[\"/_next/static/css/b7a03c62468f4263.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"7BI__-ayGDTlOrSboD_bT\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b7a03c62468f4263.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_23d1a5 __variable_67a390 __variable_4dc837\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'\u0026\u0026t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\\\"hive-locale\\\");if(l!=='en'\u0026\u0026l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"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\":{\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"13:I[13970,[],\"IconMark\"]\nc:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"hive-am\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Run a colony of coding agents across Claude Code, OpenCode and Kiro.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.png?4b73b0b54465bf4f\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.png?cac1d6d73e6ce0be\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$L13\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--aSYzbHk1M5YeS_d3SQKTZ--><html lang="en" class="__variable_23d1a5 __variable_67a390 __variable_4dc837"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/313510e2713fb214-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/33553e7595b74ccf-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="/icon.png"/><link rel="stylesheet" href="/_next/static/css/945795da867f5250.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d42799b7e6a0e8a2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ef515e41a83a16ac.js"/><script src="/_next/static/chunks/0937d497-114a2a3de515565e.js" async=""></script><script src="/_next/static/chunks/89-b194fcffe5120c44.js" async=""></script><script src="/_next/static/chunks/main-app-6086068e5fb5eacd.js" async=""></script><script src="/_next/static/chunks/586-f7017d585a84738d.js" async=""></script><script src="/_next/static/chunks/281-d8a0dcfaa6d064e4.js" async=""></script><script src="/_next/static/chunks/app/layout-49b46c9b5aa512a8.js" async=""></script><script src="/_next/static/chunks/706-fa2be0f10ffebe6a.js" async=""></script><script src="/_next/static/chunks/304-681348099f874a30.js" async=""></script><script src="/_next/static/chunks/517-373a80c8ba432bdc.js" async=""></script><script src="/_next/static/chunks/350-0fe82e622e7a670f.js" async=""></script><script src="/_next/static/chunks/291-23f314877fa39054.js" async=""></script><script src="/_next/static/chunks/844-519177e6198ca84f.js" async=""></script><script src="/_next/static/chunks/app/page-da042d146caeeab6.js" async=""></script><meta name="next-size-adjust" content=""/><title>hive-am</title><meta name="description" content="Run a colony of coding agents across Claude Code, OpenCode and Kiro."/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.png?4b73b0b54465bf4f" type="image/png" sizes="256x256"/><link rel="apple-touch-icon" href="/apple-icon.png?cac1d6d73e6ce0be" type="image/png" sizes="180x180"/><script>(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem("hive-locale");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="shell"><nav class="rail" aria-label="Main"><div class="brand"><img src="/icon.png" width="34" height="34" alt="" aria-hidden="true" class="brand-mark"/><div>hive-am<small>agent colony manager</small></div></div><div class="lang-row" role="group" aria-label="Language"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><div class="seg"><button type="button" aria-pressed="true" lang="en" title="English" aria-label="English">EN</button><button type="button" aria-pressed="false" lang="es" title="Español" aria-label="Español">ES</button></div></div><a class="nav" aria-current="page" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hexagon"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg><span class="t">Colony</span></a><a class="nav" href="/resources"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="t">Resources</span></a><a class="nav" href="/agents"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span class="t">Agents</span><span class="count">0</span></a><a class="nav" href="/relations"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-network"><rect x="16" y="16" width="6" height="6" rx="1"></rect><rect x="2" y="16" width="6" height="6" rx="1"></rect><rect x="9" y="2" width="6" height="6" rx="1"></rect><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"></path><path d="M12 12V8"></path></svg><span class="t">Relations</span></a><a class="nav" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plug"><path d="M12 22v-5"></path><path d="M9 8V2"></path><path d="M15 8V2"></path><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"></path></svg><span class="t">Connections</span></a><a class="nav" href="/schedules"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar-clock"><path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"></path><path d="M16 2v4"></path><path d="M8 2v4"></path><path d="M3 10h5"></path><path d="M17.5 17.5 16 16.3V14"></path><circle cx="16" cy="16" r="6"></circle></svg><span class="t">Schedules</span></a><div class="nav-label">Library</div><a class="nav" href="/types"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-boxes"><path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"></path><path d="m7 16.5-4.74-2.85"></path><path d="m7 16.5 5-3"></path><path d="M7 16.5v5.17"></path><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"></path><path d="m17 16.5-5-3"></path><path d="m17 16.5 4.74-2.85"></path><path d="M17 16.5v5.17"></path><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"></path><path d="M12 8 7.26 5.15"></path><path d="m12 8 4.74-2.85"></path><path d="M12 13.5V8"></path></svg><span class="t">Agent types</span><span class="count">0</span></a><a class="nav" href="/skills"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library"><path d="m16 6 4 14"></path><path d="M12 6v14"></path><path d="M8 8v12"></path><path d="M4 4v16"></path></svg><span class="t">Skills</span><span class="count">0</span></a><div class="nav-label">History</div><a class="nav" href="/sessions"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg><span class="t">Sessions</span></a><div class="rail-foot"><button type="button" class="nav" aria-pressed="false" title="Terminal (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-terminal"><path d="m7 11 2-2-2-2"></path><path d="M11 13h4"></path><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect></svg><span class="t">Terminal</span></button><div class="conn"><i class="dot err"></i>Server offline. Retrying…</div><button type="button" class="nav" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="t">Switch theme</span></button></div></nav><main class="main"><div class="page"><div class="page-head"><div><div class="row gap-s"><h1>Colony</h1><span class="help "><button type="button" class="help-btn" aria-label="Help: how to read this map" title="Help: how to read this map" aria-haspopup="dialog" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-help"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path></svg></button></span></div><p>Every agent you run, grouped into colonies and wired to the orchestrators that direct them.</p></div><div class="cx-head-actions"><div class="menu"><button class="btn sm" aria-expanded="false" aria-haspopup="menu"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>New<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></div><div class="stats"><a class="card stat" aria-label="0 agents. Open agents" href="/agents"><b>0</b><span>agents</span></a><div class="card stat"><b>0</b><span>colonies</span></div><a class="card stat" aria-label="0 resources. Open resources" href="/resources"><b>0</b><span>resources</span></a><a class="card stat" aria-label="0 orchestrators. Open orchestrators" href="/agents"><b>0</b><span>orchestrators</span></a><a class="card stat" aria-label="0 working now. Open working now" href="/agents"><b>0</b><span>working now</span></a><a class="card stat" aria-label="0 tasks in flight. Open tasks in flight" href="#recent"><b>0</b><span>tasks in flight</span></a></div><div class="colony"><div class="comb-wrap"><div class="comb-skel" role="status" aria-label="Loading the colony"><div class="skel" style="width:220px;height:190px"></div><div class="row gap-l"><div class="skel" style="width:150px;height:130px"></div><div class="skel" style="width:150px;height:130px"></div></div></div><div class="comb-zoom" role="group" aria-label="Zoom"><button class="btn ghost icon sm" title="Zoom out" aria-label="Zoom out"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"></path></svg></button><button class="btn ghost sm zoom-pct" title="Fit the map to the panel (100%)" aria-label="Fit the map to the panel (100%)">100<!-- -->%</button><button class="btn ghost icon sm" title="Zoom in" aria-label="Zoom in"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg></button><button class="btn ghost icon sm" title="Fit the map to the panel (100%)" aria-label="Fit the map to the panel (100%)"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div><div class="comb-legend"><span class="pbadge" style="--c:var(--p-claude)"><i></i>Claude</span><span class="pbadge" style="--c:var(--p-opencode)"><i></i>OpenCode</span><span class="pbadge" style="--c:var(--p-kiro)"><i></i>Kiro</span><span class="pbadge" style="--c:var(--honey)"><i></i>Orchestrator</span></div></div></div><div class="card card-pad recent" id="recent"><div class="eyebrow recent-head">Recent delegations</div><p class="muted small m0">When an orchestrator hands a task to a worker, it shows up here.</p></div></div><!--$--><!--/$--></main></div><section class="dock" style="height:320px;display:none" aria-hidden="true" aria-label="Terminal panel"><div class="dock-grip" role="separator" aria-orientation="horizontal"></div><div class="dock-bar"><div class="dock-tabs" role="tablist" aria-label="Terminal panel"></div><button class="btn ghost icon sm" aria-label="New terminal" title="New terminal"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg></button><button class="btn ghost icon sm" aria-label="Terminal in a folder…" title="Terminal in a folder…"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></button><span class="grow"></span><button class="btn ghost icon sm" aria-label="Hide the panel" title="Hide the panel (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></button></div><div class="dock-body"><p class="gx-note">No terminals open. Press + to start one.</p></div></section><div class="toasts" data-live="true"></div><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.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[5506,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"281\",\"static/chunks/281-d8a0dcfaa6d064e4.js\",\"177\",\"static/chunks/app/layout-49b46c9b5aa512a8.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[77363,[],\"ClientPageRoot\"]\n6:I[36098,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"706\",\"static/chunks/706-fa2be0f10ffebe6a.js\",\"304\",\"static/chunks/304-681348099f874a30.js\",\"281\",\"static/chunks/281-d8a0dcfaa6d064e4.js\",\"517\",\"static/chunks/517-373a80c8ba432bdc.js\",\"350\",\"static/chunks/350-0fe82e622e7a670f.js\",\"291\",\"static/chunks/291-23f314877fa39054.js\",\"844\",\"static/chunks/844-519177e6198ca84f.js\",\"974\",\"static/chunks/app/page-da042d146caeeab6.js\"],\"default\"]\n9:I[40523,[],\"OutletBoundary\"]\nb:I[91962,[],\"AsyncMetadataOutlet\"]\nd:I[40523,[],\"ViewportBoundary\"]\nf:I[40523,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[89146,[],\"\"]\n:HL[\"/_next/static/media/313510e2713fb214-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/33553e7595b74ccf-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/945795da867f5250.css\",\"style\"]\n:HL[\"/_next/static/css/d42799b7e6a0e8a2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"aSYzbHk1M5YeS_d3SQKTZ\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d42799b7e6a0e8a2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_23d1a5 __variable_67a390 __variable_4dc837\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'\u0026\u0026t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\\\"hive-locale\\\");if(l!=='en'\u0026\u0026l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"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\":{\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"13:I[13970,[],\"IconMark\"]\nc:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"hive-am\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Run a colony of coding agents across Claude Code, OpenCode and Kiro.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.png?4b73b0b54465bf4f\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.png?cac1d6d73e6ce0be\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$L13\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
@@ -1,9 +1,9 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[5506,["586","static/chunks/586-f7017d585a84738d.js","839","static/chunks/839-4aefe6e71be6e1ef.js","177","static/chunks/app/layout-99620746d028dda8.js"],"Shell"]
2
+ 2:I[5506,["586","static/chunks/586-f7017d585a84738d.js","281","static/chunks/281-d8a0dcfaa6d064e4.js","177","static/chunks/app/layout-49b46c9b5aa512a8.js"],"Shell"]
3
3
  3:I[26082,[],""]
4
4
  4:I[64304,[],""]
5
5
  5:I[77363,[],"ClientPageRoot"]
6
- 6:I[36098,["586","static/chunks/586-f7017d585a84738d.js","706","static/chunks/706-fa2be0f10ffebe6a.js","486","static/chunks/486-13e08542f3a1cbac.js","839","static/chunks/839-4aefe6e71be6e1ef.js","517","static/chunks/517-ccaf8cc5c733cbd8.js","350","static/chunks/350-56599dc3bf06066d.js","291","static/chunks/291-efae53ea5f7ee92d.js","844","static/chunks/844-fe55292e0701f436.js","974","static/chunks/app/page-a7f292117b7d76bf.js"],"default"]
6
+ 6:I[36098,["586","static/chunks/586-f7017d585a84738d.js","706","static/chunks/706-fa2be0f10ffebe6a.js","304","static/chunks/304-681348099f874a30.js","281","static/chunks/281-d8a0dcfaa6d064e4.js","517","static/chunks/517-373a80c8ba432bdc.js","350","static/chunks/350-0fe82e622e7a670f.js","291","static/chunks/291-23f314877fa39054.js","844","static/chunks/844-519177e6198ca84f.js","974","static/chunks/app/page-da042d146caeeab6.js"],"default"]
7
7
  9:I[40523,[],"OutletBoundary"]
8
8
  b:I[91962,[],"AsyncMetadataOutlet"]
9
9
  d:I[40523,[],"ViewportBoundary"]
@@ -14,8 +14,8 @@ f:I[40523,[],"MetadataBoundary"]
14
14
  :HL["/_next/static/media/33553e7595b74ccf-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
15
15
  :HL["/_next/static/media/bb3ef058b751a6ad-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
16
16
  :HL["/_next/static/css/945795da867f5250.css","style"]
17
- :HL["/_next/static/css/b7a03c62468f4263.css","style"]
18
- 0:{"P":null,"b":"7BI__-ayGDTlOrSboD_bT","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/945795da867f5250.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/b7a03c62468f4263.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_23d1a5 __variable_67a390 __variable_4dc837","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\"hive-locale\");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"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":{"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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
17
+ :HL["/_next/static/css/d42799b7e6a0e8a2.css","style"]
18
+ 0:{"P":null,"b":"aSYzbHk1M5YeS_d3SQKTZ","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/945795da867f5250.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/d42799b7e6a0e8a2.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_23d1a5 __variable_67a390 __variable_4dc837","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\"hive-locale\");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"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":{"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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
19
19
  7:{}
20
20
  8:"$0:f:0:1:2:children:1:props:children:0:props:params"
21
21
  e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -1,2 +1,2 @@
1
1
  (()=>{var a={};a.id=974,a.ids=[974],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1417:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>F.a,__next_app__:()=>L,handler:()=>N,pages:()=>K,routeModule:()=>M,tree:()=>J});var d=c(62009),e=c(51640),f=c(52679),g=c(69985),h=c(91790),i=c(81200),j=c(54530),k=c(35977),l=c(234),m=c(43472),n=c(12698),o=c(28976),p=c(54084),q=c(16307),r=c(53063),s=c(72428),t=c(261),u=c(48291),v=c(56032),w=c(26713),x=c(83370),y=c(10143),z=c(27155),A=c(77620),B=c(13428),C=c(50164),D=c(86439),E=c(2972),F=c.n(E),G=c(94672),H=c(18313),I={};for(let a in G)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(I[a]=()=>G[a]);c.d(b,I);let J={children:["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,10230)),"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,84507))).default(a),async a=>(await Promise.resolve().then(c.bind(c,23575))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,54287))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,61918)),"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,2972,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,96298,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,60075,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,79678,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,84507))).default(a),async a=>(await Promise.resolve().then(c.bind(c,23575))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,54287))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]}.children,K=["/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx"],L={require:c,loadChunk:()=>Promise.resolve()},M=new e.AppPageRouteModule({definition:{kind:f.RouteKind.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:J},distDir:".next",relativeProjectDir:""});async function N(a,b,e){var E;let I="/page";"/index"===I&&(I="/");let O=(0,i.getRequestMeta)(a,"postponed"),P=(0,i.getRequestMeta)(a,"minimalMode"),Q=await M.prepare(a,b,{srcPage:I,multiZoneDraftMode:!1});if(!Q)return b.statusCode=400,b.end("Bad Request"),null==e.waitUntil||e.waitUntil.call(e,Promise.resolve()),null;let{buildId:R,query:S,params:T,parsedUrl:U,pageIsDynamic:V,buildManifest:W,nextFontManifest:X,reactLoadableManifest:Y,serverActionsManifest:Z,clientReferenceManifest:$,subresourceIntegrityManifest:_,prerenderManifest:aa,isDraftMode:ab,resolvedPathname:ac,revalidateOnlyGenerated:ad,routerServerContext:ae,nextConfig:af,interceptionRoutePatterns:ag}=Q,ah=U.pathname||"/",ai=(0,t.normalizeAppPath)(I),{isOnDemandRevalidate:aj}=Q,ak=M.match(ah,aa),al=!!aa.routes[ac]&&(M.isDev||(0,d.isRouteCacheOwner)(ac,M.cacheOwner,aa.routes[ac])),am=!!(ak||al||aa.routes[ai]),an=a.headers["user-agent"]||"",ao=(0,w.getBotType)(an),ap=(0,r.isHtmlBotRequest)(a),aq=(0,i.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[v.NEXT_ROUTER_PREFETCH_HEADER],ar=(0,i.getRequestMeta)(a,"isRSCRequest")??(0,o.f)(a.headers[v.RSC_HEADER]),as=(0,u.getIsPossibleServerAction)(a),at=(0,n.checkIsAppPPREnabled)(af.experimental.ppr)&&(null==(E=aa.routes[ai]??aa.dynamicRoutes[ai])?void 0:E.renderingMode)==="PARTIALLY_STATIC",au=!1,av=!1,aw=at?O:void 0,ax=at&&ar&&!aq,ay=(0,i.getRequestMeta)(a,"segmentPrefetchRSCRequest"),az=!an||(0,r.shouldServeStreamingMetadata)(an,af.htmlLimitedBots);ap&&at&&(am=!1,az=!1);let aA=!0===M.isDev||!am||"string"==typeof O||ax,aB=ap&&at,aC=null;ab||!am||aA||as||aw||ax||(aC=ac);let aD=aC;!aD&&M.isDev&&(aD=ac),M.isDev||ab||!am||!ar||ax||(0,l.d)(a.headers);let aE={...G,tree:J,pages:K,GlobalError:F(),handler:N,routeModule:M,__next_app__:L};Z&&$&&(0,q.setReferenceManifestsSingleton)({page:I,clientReferenceManifest:$,serverActionsManifest:Z,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:Z})});let aF=a.method||"GET",aG=(0,h.getTracer)(),aH=aG.getActiveScopeSpan();try{let d=M.getVaryHeader(ac,ag);b.setHeader("Vary",d);let g=async(c,d)=>{let e=new m.NodeNextRequest(a),f=new m.NodeNextResponse(b);return M.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aG.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==j.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aF} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aF} ${a.url}`)})},l=async({span:d,postponed:f,fallbackRouteParams:h})=>{let j={query:S,params:T,page:ai,sharedContext:{buildId:R},serverComponentsHmrCache:(0,i.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:h,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aE,Component:(0,k.T)(aE),params:T,routeModule:M,page:I,postponed:f,shouldWaitOnAllReady:aB,serveStreamingMetadata:az,supportsDynamicResponse:"string"==typeof f||aA,buildManifest:W,nextFontManifest:X,reactLoadableManifest:Y,subresourceIntegrityManifest:_,serverActionsManifest:Z,clientReferenceManifest:$,setIsrStatus:null==ae?void 0:ae.setIsrStatus,dir:c(33873).join(process.cwd(),M.relativeProjectDir),isDraftMode:ab,isRevalidate:am&&!f&&!ax,botType:ao,isOnDemandRevalidate:aj,isPossibleServerAction:as,assetPrefix:af.assetPrefix,nextConfigOutput:af.output,crossOrigin:af.crossOrigin,trailingSlash:af.trailingSlash,previewProps:aa.preview,deploymentId:af.deploymentId,enableTainting:af.experimental.taint,htmlLimitedBots:af.htmlLimitedBots,devtoolSegmentExplorer:af.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:af.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,i.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:af.experimental.cacheLife,basePath:af.basePath,serverActions:af.experimental.serverActions,...au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:au}:{},experimental:{isRoutePPREnabled:at,expireTime:af.expireTime,staleTimes:af.experimental.staleTimes,cacheComponents:!!af.experimental.cacheComponents,clientSegmentCache:!!af.experimental.clientSegmentCache,clientParamParsing:!!af.experimental.clientParamParsing,dynamicOnHover:!!af.experimental.dynamicOnHover,inlineCss:!!af.experimental.inlineCss,authInterrupts:!!af.experimental.authInterrupts,clientTraceMetadata:af.experimental.clientTraceMetadata||[]},waitUntil:e.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>M.onRequestError(a,b,d,ae),err:(0,i.getRequestMeta)(a,"invokeError"),dev:M.isDev}},l=await g(d,j),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[A.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,am&&(null==n?void 0:n.revalidate)===0&&!M.isDev&&!at){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ac}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:x.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:d,isRevalidating:g,span:h})=>{let j,k=!1===M.isDev,m=c||b.writableEnded;if(aj&&ad&&!d&&!P)return(null==ae?void 0:ae.render404)?await ae.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ak&&(j=(0,y.parseFallbackField)(ak.fallback)),j===y.FallbackMode.PRERENDER&&(0,w.isBot)(an)&&(!at||ap)&&(j=y.FallbackMode.BLOCKING_STATIC_RENDER),(null==d?void 0:d.isStale)===-1&&(aj=!0),aj&&(j!==y.FallbackMode.NOT_FOUND||d)&&(j=y.FallbackMode.BLOCKING_STATIC_RENDER),!P&&j!==y.FallbackMode.BLOCKING_STATIC_RENDER&&aD&&!m&&!ab&&V&&(k||!al)){let b;if((k||ak)&&j===y.FallbackMode.NOT_FOUND)throw new D.NoFallbackError;if(at&&!ar){let c="string"==typeof(null==ak?void 0:ak.fallback)?ak.fallback:k?ai:null;if(b=await M.handleResponse({cacheKey:c,req:a,nextConfig:af,routeKind:f.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:aa,isRoutePPREnabled:at,responseGenerator:async()=>l({span:h,postponed:void 0,fallbackRouteParams:k||av?(0,p.u)(ai):null}),waitUntil:e.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=aj||g||!aw?void 0:aw;if(au&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:x.CachedRouteKind.PAGES,html:z.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let o=V&&at&&((0,i.getRequestMeta)(a,"renderFallbackShell")||av)?(0,p.u)(ah):null;return l({span:h,postponed:n,fallbackRouteParams:o})},o=async c=>{var d,g,h,j,k;let m,o=await M.handleResponse({cacheKey:aC,responseGenerator:a=>n({span:c,...a}),routeKind:f.RouteKind.APP_PAGE,isOnDemandRevalidate:aj,isRoutePPREnabled:at,req:a,nextConfig:af,prerenderManifest:aa,waitUntil:e.waitUntil});if(ab&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),M.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aC)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(d=o.value)?void 0:d.kind)!==x.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(h=o.value)?void 0:h.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;am&&!ax&&(!p||aq)&&(P||b.setHeader("x-nextjs-cache",aj?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(v.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(aw)m={revalidate:0,expire:void 0};else if(P&&ar&&!aq&&at)m={revalidate:0,expire:void 0};else if(!M.isDev)if(ab)m={revalidate:0,expire:void 0};else if(am){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??af.expireTime}}else m={revalidate:A.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(o.cacheControl=m,"string"==typeof ay&&(null==q?void 0:q.kind)===x.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(v.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[A.NEXT_CACHE_TAGS_HEADER];P&&am&&c&&"string"==typeof c&&b.setHeader(A.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ay);return void 0!==d?(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.fromStatic(d,v.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,i.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,i.getRequestMeta)(a,"initURL")}))return null;if(p&&aw)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(P&&am||delete a[A.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[A.NEXT_CACHE_TAGS_HEADER];if(P&&am&&s&&"string"==typeof s&&b.setHeader(A.NEXT_CACHE_TAGS_HEADER,s),!q.status||ar&&at||(b.statusCode=q.status),!P&&q.status&&H.RedirectStatusCode[q.status]&&ar&&(b.statusCode=200),p&&b.setHeader(v.NEXT_DID_POSTPONE_HEADER,"1"),ar&&!ab){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:q.html,cacheControl:ax?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.fromStatic(q.rscData,v.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl})}let t=q.html;if(!p||P||ar)return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:o.cacheControl});if(au)return t.push(new ReadableStream({start(a){a.enqueue(B.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}});let u=new TransformStream;return t.push(u.readable),l({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==x.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(u.writable)}).catch(a=>{u.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}})};if(!aH)return await aG.withPropagatedContext(a.headers,()=>aG.trace(j.BaseServerSpan.handleRequest,{spanName:`${aF} ${a.url}`,kind:h.SpanKind.SERVER,attributes:{"http.method":aF,"http.target":a.url}},o));await o(aH)}catch(b){throw b instanceof D.NoFallbackError||await M.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"render",revalidateReason:(0,g.c)({isRevalidate:am,isOnDemandRevalidate:aj})},ae),b}}},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6289:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]])},10230:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(85972).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx","default")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32309:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},33873:a=>{"use strict";a.exports=require("path")},37811:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},38550:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]])},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},44521:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},46378:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("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"}]])},48370:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},49870:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},51291:(a,b,c)=>{Promise.resolve().then(c.bind(c,80749))},55511:a=>{"use strict";a.exports=require("crypto")},57578:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},61222:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66390:(a,b,c)=>{"use strict";c.d(b,{G:()=>i});var d=c(55322),e=c(5207),f=c(60570),g=c(7371),h=c(93884);function i({agent:a,onClose:b,onDeleted:c}){let{t:i}=(0,h.s9)(),{refresh:j}=(0,f.zd)(),k=(0,e.dj)();return(0,d.jsx)(e.TM,{title:i("agent.deleteTitle",{name:a.name}),body:i("agent.deleteBody"),danger:!0,confirmLabel:i("agent.delete"),cancelLabel:i("agent.keep"),onClose:b,onConfirm:async()=>{await g.FH.del(`/agents/${a.id}`),await j(["agents","colonies"]),k(i("agent.deleted")),c?.()}})}},72836:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},79588:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Container",[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]])},80749:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>U});var d=c(55322),e=c(91705),f=c.n(e),g=c(17027),h=c(71267),i=c(67455),j=c(48881),k=c(2266),l=c(61222),m=c(29723),n=c(45762),o=c(38550),p=c(31251);let q=(0,c(51537).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var r=c(34410),s=c(60570),t=c(73269),u=c(7371),v=c(61162),w=c(5207),x=c(94547),y=c(36143),z=c(59686),A=c(13520),B=c(85748),C=c(93884);let D=v.hg,E=["cwd","permission","skills","prompt"];function F({colony:a,onClose:b}){let{t:c}=(0,C.s9)(),{agents:e,skills:f,colonies:h,refresh:i}=(0,s.q5)(),j=(0,w.dj)(),[k,l]=(0,g.useState)(()=>a?{name:a.name,color:a.color,cwd:a.cwd,permission:a.permission,system_prompt:a.system_prompt,skill_ids:a.skill_ids,skill_loads:a.skill_loads,agent_ids:a.agent_ids,inherit:a.inherit}:{name:"",color:D[h.length%D.length],cwd:"",permission:"acceptEdits",system_prompt:"",skill_ids:[],skill_loads:{},agent_ids:[],inherit:{cwd:!0,permission:!0,skills:!0,prompt:!0}}),m=(0,g.useMemo)(()=>JSON.stringify(k),[]),n=JSON.stringify(k)!==m;(0,A.h)(n);let[o,p]=(0,g.useState)(!1),q=()=>{n?p(!0):b()},[t,v]=(0,g.useState)(""),[x,y]=(0,g.useState)(!1),[E,F]=(0,g.useState)(!1),[H,I]=(0,g.useState)(!1),J=(a,b)=>l(c=>({...c,[a]:b})),K=async d=>{I(!0);try{let e={...k,name:k.name.trim(),color:k.color.toLowerCase(),inherit:d};a?await u.FH.patch(`/colonies/${a.id}`,e):await u.FH.post("/colonies",e),await i(["agents","colonies"]),j(a?c("colony.saved"):c("colony.created")),b()}catch(a){y(!1),v(a instanceof Error?a.message:c("edit.saveFailed")),I(!1)}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(w._s,{title:a?c("colony.editTitle",{name:a.name}):c("colony.newTitle"),subtitle:c("colony.subtitle"),onClose:q,footer:(0,d.jsxs)(d.Fragment,{children:[a&&(0,d.jsxs)("button",{className:"btn danger push-r",onClick:()=>F(!0),children:[(0,d.jsx)(r.A,{size:15}),c("common.delete")]}),(0,d.jsx)("button",{className:"btn ghost",onClick:q,children:c("common.cancel")}),(0,d.jsx)("button",{className:"btn primary",onClick:()=>k.name.trim()?h.some(b=>b.id!==a?.id&&b.name.toLowerCase()===k.name.trim().toLowerCase())?void v(c("colony.err.nameTaken")):/^#[0-9a-f]{6}$/i.test(k.color)?void(v(""),y(!0)):void v(c("colony.err.color")):void v(c("colony.err.name")),children:a?c("colony.save"):c("colony.create")})]}),children:[(0,d.jsx)(w.D0,{label:c("form.name"),error:t,children:(0,d.jsx)("input",{className:"input",value:k.name,onChange:a=>J("name",a.target.value),placeholder:c("colony.name.placeholder"),"data-autofocus":!0})}),(0,d.jsx)(w.D0,{label:c("colony.color"),children:(0,d.jsxs)("div",{className:"swatches",children:[D.map(a=>(0,d.jsx)("button",{type:"button",className:"swatch",style:{"--c":a},"aria-pressed":k.color.toLowerCase()===a,"aria-label":c("colony.colorOption",{color:a}),onClick:()=>J("color",a)},a)),(0,d.jsx)("label",{className:`swatch custom ${D.includes(k.color.toLowerCase())?"":"on"}`,style:{"--c":/^#[0-9a-f]{6}$/i.test(k.color)?k.color:"transparent"},title:c("colony.colorCustom"),children:(0,d.jsx)("input",{type:"color",value:/^#[0-9a-f]{6}$/i.test(k.color)?k.color:"#2f8f5b",onChange:a=>J("color",a.target.value),"aria-label":c("colony.colorCustom")})}),(0,d.jsx)("input",{className:"input hex-input mono",value:k.color,maxLength:7,spellCheck:!1,"aria-label":c("colony.colorHex"),placeholder:"#2f8f5b",onChange:a=>{let b=a.target.value.trim();J("color",b.startsWith("#")||!b?b:`#${b}`)}})]})}),(0,d.jsx)(w.dR,{value:k.cwd,onChange:a=>J("cwd",a)}),(0,d.jsx)(w.en,{value:k.permission,onChange:a=>J("permission",a)}),(0,d.jsx)(w.D0,{label:c("inherit.context"),hint:c("colony.context.hint"),children:(0,d.jsx)(z.n,{value:k.system_prompt,onChange:a=>J("system_prompt",a),placeholder:c("colony.context.placeholder"),defaultView:"write",minHeight:160})}),(0,d.jsx)(w.D0,{label:c("form.skills"),children:(0,d.jsx)(w.kV,{skills:f,value:k.skill_ids,loads:k.skill_loads,onChange:(a,b)=>l({...k,skill_ids:a,skill_loads:b})})}),(0,d.jsx)(w.D0,{label:c("colony.members"),hint:c("colony.members.hint"),children:0===e.length?(0,d.jsx)("p",{className:"hint",children:c("colony.members.empty")}):(0,d.jsx)(B.C,{value:k.agent_ids,onChange:a=>J("agent_ids",a),items:e.map(b=>{let d=b.colony_id&&b.colony_id!==a?.id?h.find(a=>a.id===b.colony_id):null;return{id:b.id,name:b.name,note:d?c("colony.currentlyIn",{name:d.name}):b.description||c(`role.${b.role}`)}})})})]}),x&&(0,d.jsx)(G,{draft:k,colony:a,members:e.filter(a=>k.agent_ids.includes(a.id)),busy:H,onBack:()=>y(!1),onConfirm:K}),o&&(0,d.jsx)(w.TM,{danger:!0,title:c("fa.unsaved.title"),body:c("fa.unsaved.body"),confirmLabel:c("fa.unsaved.discard"),cancelLabel:c("fa.unsaved.keep"),onClose:()=>p(!1),onConfirm:b}),E&&a&&(0,d.jsx)(w.TM,{title:c("colony.deleteTitle",{name:a.name}),body:c("colony.deleteBody",{count:a.agent_ids.length}),danger:!0,confirmLabel:c("colony.delete"),cancelLabel:c("colony.keep"),onClose:()=>F(!1),onConfirm:async()=>{await u.FH.del(`/colonies/${a.id}`),await i(["agents","colonies"]),j(c("colony.deleted")),b()}})]})}function G({draft:a,colony:b,members:c,busy:e,onBack:f,onConfirm:h}){let{t:i}=(0,C.s9)(),j={cwd:!!a.cwd,permission:!0,skills:a.skill_ids.length>0,prompt:!!a.system_prompt.trim()},[k,l]=(0,g.useState)(()=>({cwd:(!b||b.inherit.cwd)&&j.cwd,permission:!b||b.inherit.permission,skills:(!b||b.inherit.skills)&&j.skills,prompt:(!b||b.inherit.prompt)&&j.prompt})),m=(0,g.useMemo)(()=>k.cwd&&a.cwd&&c.filter(b=>!b.overrides.includes("cwd")&&b.effective.cwd!==a.cwd).length,[k.cwd,a.cwd,c]);return(0,d.jsxs)(w.aF,{title:i("inheritAsk.title"),onClose:f,children:[(0,d.jsx)("p",{className:"muted small m0",children:i("inheritAsk.intro")}),(0,d.jsx)("div",{className:"col gap-s",children:E.map(b=>(0,d.jsx)(w.Tl,{disabled:!j[b],checked:k[b],onChange:a=>l(c=>({...c,[b]:a})),label:(0,d.jsxs)(d.Fragment,{children:[i(`inheritAsk.field.${b}`),"cwd"===b&&a.cwd?(0,d.jsxs)("span",{className:"muted mono fw-400",children:[" \xb7 ",(0,v._1)(a.cwd)]}):null,"permission"===b?(0,d.jsxs)("span",{className:"muted fw-400",children:[" \xb7 ",(0,v.Ck)(a.permission)]}):null]}),hint:j[b]?i(`inheritAsk.hint.${b}`):i(`inheritAsk.empty.${b}`)},b))}),m?(0,d.jsx)(w.lZ,{kind:"honey",children:i("inheritAsk.folderMoves",{count:Number(m)})}):null,(0,d.jsxs)("div",{className:"row push-end",children:[(0,d.jsx)("button",{className:"btn ghost",onClick:f,children:i("common.back")}),(0,d.jsx)("button",{className:"btn primary",disabled:e,onClick:()=>h(k),children:e?i("common.saving"):b?i("colony.save"):i("colony.create")})]})]})}var H=c(15964),I=c(93674);function J({agent:a,onClose:b}){let{t:c}=(0,C.s9)(),e=(0,I.A)(a,{onSaved:b,onDeleted:b});return e.draft?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(w._s,{title:c("edit.title",{name:a.name}),subtitle:c("running"===a.status?"edit.subtitleRunning":"edit.subtitleIdle"),onClose:b,footer:e.actions({onCancel:b}),children:(0,d.jsx)(H.SU,{draft:e.draft,onChange:e.setDraft,errors:e.errors,selfId:a.id})}),e.deleteModal]}):null}var K=c(66390),L=c(24956),M=c(3936),N=c(36368),O=c(54403),P=c(93717);let Q=74*Math.sqrt(3),R=[[1,0],[1,-1],[0,-1],[-1,0],[-1,1],[0,1]],S=([a,b])=>({x:Q*(a+b/2),y:111*b}),T=(a,b,c)=>Array.from({length:6},(d,e)=>{let f=(60*e-30)*Math.PI/180;return`${(a+c*Math.cos(f)).toFixed(1)},${(b+c*Math.sin(f)).toFixed(1)}`}).join(" ");function U(){let{t:a}=(0,C.s9)(),{agents:b,colonies:c,objects:e,dispatches:z,ready:A,error:B,retry:D,refresh:E}=(0,s.q5)(),G=(0,w.dj)(),[H,I]=(0,g.useState)(null),[U,V]=(0,g.useState)(null),[W,X]=(0,g.useState)(null),[Y,Z]=(0,g.useState)(null),[$,_]=(0,g.useState)(null),[aa,ab]=(0,g.useState)(null),[ac,ad]=(0,t.ud)("hive-colony-layout",{}),[ae,af]=(0,g.useState)(null),[ag,ah]=(0,t.ud)("hive-colony-zoom",1),ai=ag>=.4&&ag<=2.5?ag:1,aj=a=>ah(Math.min(2.5,Math.max(.4,Math.round(100*a)/100))),ak=(0,g.useMemo)(()=>ae?{...ac,[ae.key]:{x:ae.x,y:ae.y}}:ac,[ac,ae]),{clusters:al,width:am,height:an}=(0,g.useMemo)(()=>(function(a,b,c,d={}){let e=a=>!!a&&b.some(b=>b.id===a),f=b.map(b=>({key:b.id,colony:b,members:a.filter(a=>a.colony_id===b.id),things:c.filter(a=>a.colony_id===b.id)}));f.push({key:"free",colony:null,members:a.filter(a=>!e(a.colony_id)),things:c.filter(a=>!e(a.colony_id))});let g=[],h=0,i=0,j=0;for(let b of f){if(!b.members.length&&!b.things.length&&!b.colony&&a.length+c.length>0)continue;let e=function(a){let b=a.filter(a=>"orchestrator"===a.role);for(let c of[...b])for(let d of c.worker_ids){let c=a.find(a=>a.id===d);c&&!b.includes(c)&&b.push(c)}for(let c of a)b.includes(c)||b.push(c);return b}(b.members),f=(function(a){let b=[[0,0]];for(let c=1;b.length<a;c++){let a=R[4][0]*c,d=R[4][1]*c;for(let e=0;e<6;e++)for(let f=0;f<c;f++)b.push([a,d]),a+=R[e][0],d+=R[e][1]}return b.slice(0,a)})(e.length+b.things.length+1).map(S),k=Math.min(...f.map(a=>a.x))-Q/2,l=Math.max(...f.map(a=>a.x))+Q/2,m=Math.min(...f.map(a=>a.y))-74,n=Math.max(...f.map(a=>a.y))+74,o=l-k+52,p=n-m+52+50,q=b.colony?d[b.key]:void 0;!q&&h>0&&h+o>880&&(h=0,i+=j+36,j=0);let r=q?q.x:h,s=q?q.y:i,t=f.map((a,c)=>{let f=e[c]??null,g=b.things[c-e.length],h=b.colony?void 0:d[(f??g)?.id??""];return{agent:f,object:g,x:h?h.x:r+(a.x-k)+26,y:h?h.y:s+(a.y-m)+26+50}});g.push({key:b.key,colony:b.colony,cells:t,x:r,y:s,w:o,h:p}),q||(h+=o+36,j=Math.max(j,p))}let k=0,l=0;for(let a of g)if(a.colony)k=Math.max(k,a.x+a.w),l=Math.max(l,a.y+a.h);else for(let b of a.cells)k=Math.max(k,b.x+Q/2+26),l=Math.max(l,b.y+74+26);return{clusters:g,width:k,height:l}})(b,c,e,ak),[b,c,e,ak]),ao=(0,g.useRef)(null),[ap,aq]=(0,g.useState)(0);(0,g.useRef)(ai).current=ai;let ar=am+80,as=an+80,at=(ap?Math.min(1,(ap-24)/ar):1)*ai,au=(0,g.useRef)(null),av=(0,g.useRef)(!1),aw=a=>{let b=au.current;if(!b)return;let c=(a.clientX-b.sx)/at,d=(a.clientY-b.sy)/at;!b.moved&&Math.hypot(c,d)*at<6||(b.moved=!0,b.last={x:Math.max(b.min.x,b.ox+c),y:Math.max(b.min.y,b.oy+d)},af({key:b.key,...b.last}))},ax=()=>{let a=au.current;au.current=null,a?.moved&&a.last&&(av.current=!0,setTimeout(()=>{av.current=!1},0),ad({...ac,[a.key]:a.last}),af(null))},ay=(a,b,c,d,e={x:0,y:0})=>{let f={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[a.key];if(!f||a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault();let g=a.shiftKey?64:16;ad({...ac,[b]:{x:Math.max(e.x,c+f[0]*g),y:Math.max(e.y,d+f[1]*g)}})},az=(a,b,c,d)=>({onPointerDown:e=>((a,b,c,d,e={x:0,y:0})=>{if(0===a.button){au.current={key:b,sx:a.clientX,sy:a.clientY,ox:c,oy:d,min:e,moved:!1};try{a.currentTarget.setPointerCapture(a.pointerId)}catch{}}})(e,a,b,c,d),onPointerMove:aw,onPointerUp:ax,onPointerCancel:ax}),aA=new Map;for(let a of al)for(let b of a.cells)b.agent&&aA.set(b.agent.id,{x:b.x+40,y:b.y+40}),b.object&&aA.set(b.object.id,{x:b.x+40,y:b.y+40});let aB=e.filter(a=>"cluster"===a.kind).flatMap(a=>a.config.members.map(b=>({from:a.id,to:b}))),aC=e.filter(a=>a.manager_id&&aA.has(a.manager_id)&&aA.has(a.id)).map(a=>({from:a.manager_id,to:a.id})),aD=a=>e.filter(b=>b.manager_id===a),[aE,aF]=(0,g.useState)(null),aG=b.find(a=>a.id===H)??null,aH=e.find(a=>a.id===H)??null,[aI,aJ]=(0,g.useState)(null),aK=U??H,aL=b.filter(a=>"orchestrator"===a.role).flatMap(a=>a.worker_ids.map(b=>({from:a.id,to:b}))),aM=new Set(aK?[aK,...[...aL,...aB,...aC].filter(a=>a.from===aK||a.to===aK).flatMap(a=>[a.from,a.to])]:[]),aN=a=>b.filter(b=>"orchestrator"===b.role&&b.worker_ids.includes(a)),aO=b.filter(a=>"running"===a.status).length,aP=e.filter(a=>"running"===a.state.status).length,aQ=b.filter(a=>"orchestrator"===a.role).length,aR=c=>b.find(a=>a.id===c)?.name??a("colony.removedAgent"),aS=z.filter(a=>"running"===a.status).length,aT=[{id:"agents",n:b.length,label:a("stat.agents",{count:b.length}),href:"/agents"},{id:"colonies",n:c.length,label:a("stat.colonies",{count:c.length})},{id:"objects",n:e.length,label:a("stat.objects",{count:e.length}),href:"/resources",title:e.length?a("obj.running",{count:aP}):void 0},{id:"queens",n:aQ,label:a("stat.orchestrators",{count:aQ}),href:"/agents"},{id:"working",n:aO,label:a("stat.working"),href:"/agents"},{id:"tasks",n:aS,label:a("stat.tasks"),href:"#recent"}],aU=aG?c.find(a=>a.id===aG.colony_id):void 0,aV=async(b,d)=>{try{await u.FH.patch(`/agents/${b.id}`,{colony_id:d||null,overrides:[]}),await E(["agents","colonies"]),G(d?a("colony.joined",{name:b.name,colony:c.find(a=>a.id===d)?.name??""}):a("colony.left",{name:b.name}))}catch(b){G(b instanceof Error?b.message:a("colony.moveFailed"),"err")}};return(0,d.jsxs)("div",{className:"page",children:[(0,d.jsxs)("div",{className:"page-head",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("h1",{children:a("nav.colony")}),(0,d.jsx)(L.B,{label:a("colony.helpLabel"),title:a("colony.howTitle"),children:a("colony.howBody")})]}),(0,d.jsx)("p",{children:a("colony.page.subtitle")})]}),(0,d.jsx)("div",{className:"cx-head-actions",children:(0,d.jsx)(x.W1,{label:a("cx.new"),icon:(0,d.jsx)(h.A,{size:14}),children:b=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(i.A,{size:15}),onClick:()=>{b(),X({})},children:a("newAgent.title")}),(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(j.A,{size:15}),onClick:()=>{b(),Z("new")},children:a("colony.newTitle")}),(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(k.A,{size:15}),onClick:()=>{b(),ab({})},children:a("obj.new")})]})})})]}),(0,d.jsx)("div",{className:"stats",children:aT.map(b=>{let c=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("b",{children:b.n}),(0,d.jsx)("span",{children:b.label})]});return b.href?(0,d.jsx)(f(),{href:b.href,className:"card stat",title:b.title,"aria-label":`${b.n} ${b.label}. ${a("cx.stat.open",{label:b.label})}`,children:c},b.id):(0,d.jsx)("div",{className:"card stat",title:b.title,children:c},b.id)})}),(0,d.jsxs)("div",{className:"colony",children:[(0,d.jsxs)("div",{className:"comb-wrap",ref:ao,children:[A?0===b.length&&0===c.length&&0===e.length?(0,d.jsx)("div",{className:"comb-empty-wrap",children:(0,d.jsx)(w.pp,{icon:(0,d.jsx)(w._h,{size:"lg",queen:!0,label:"+"}),title:a("colony.empty.title"),body:a("colony.empty.body"),action:(0,d.jsxs)("div",{className:"row",children:[(0,d.jsxs)("button",{className:"btn",onClick:()=>Z("new"),children:[(0,d.jsx)(h.A,{size:16}),a("colony.empty.createColony")]}),(0,d.jsxs)("button",{className:"btn primary",onClick:()=>X({}),children:[(0,d.jsx)(h.A,{size:16}),a("colony.empty.createAgent")]})]})})}):(0,d.jsx)("div",{className:"comb-box",style:{width:ar*at,height:as*at},children:(0,d.jsxs)("div",{className:"comb",style:{width:ar,height:as,transform:`scale(${at})`,transformOrigin:"0 0","--w":`${.9*Q}px`,"--h":`${133.20000000000002}px`},children:[(0,d.jsx)("svg",{className:"links",width:ar,height:as,children:al.filter(a=>a.colony).map(a=>{let b=a.colony.color||"var(--honey)";return(0,d.jsxs)("g",{children:[a.cells.map((a,c)=>(0,d.jsx)("polygon",{points:T(a.x+40,a.y+40,74),style:{fill:b,stroke:b},strokeWidth:44,strokeLinejoin:"round"},"o"+c)),a.cells.map((a,c)=>(0,d.jsx)("polygon",{points:T(a.x+40,a.y+40,74),style:{fill:`color-mix(in srgb, ${b} 9%, var(--surface))`,stroke:`color-mix(in srgb, ${b} 9%, var(--surface))`},strokeWidth:38,strokeLinejoin:"round"},"i"+c))]},a.key)})}),al.map(b=>(0,d.jsxs)("div",{children:[b.colony?(0,d.jsxs)("button",{className:`colony-label draggable ${ae?.key===b.key?"dragging":""}`,style:{left:b.x+b.w/2+40,top:b.y+50-10+40,"--c":b.colony.color||"var(--honey)"},...az(b.key,b.x,b.y),onKeyDown:a=>ay(a,b.key,b.x,b.y),onClick:()=>{av.current||Z(b.colony)},title:`${b.colony.cwd?a("colony.editHover",{path:(0,v._1)(b.colony.cwd)}):a("colony.editHoverShort")} \xb7 ${a("colony.dragHint")} \xb7 ${a("cx.moveHint")}`,children:[(0,d.jsx)("i",{className:"cdot"}),b.colony.name,(0,d.jsx)("small",{children:a("colony.agentCount",{count:b.cells.filter(a=>a.agent).length})}),(0,d.jsx)(j.A,{size:13,className:"muted"})]}):c.length>0&&b.cells.some(a=>a.agent)?(0,d.jsx)("span",{className:"colony-label cx-unplaced",style:{left:b.x+b.w/2+40,top:b.y+50-10+40},children:(0,d.jsx)("small",{children:a("common.noColony")})}):null,b.cells.map((c,e)=>{let f=c.agent,g={left:c.x+40,top:c.y+40},i=c.object;if(i){let{icon:e,color:f}=P.Nd[i.kind];return(0,d.jsxs)("button",{"data-sid":i.id,className:`cell fill obj st-${i.state.status} ${"running"===i.state.status?"running":""} ${aK&&!aM.has(i.id)?"dim":""} ${aK&&aM.has(i.id)&&i.id!==aK?"linked":""} ${b.colony?"":"draggable"}`,style:{...g,"--c":f},"aria-pressed":H===i.id,onMouseEnter:()=>V(i.id),onMouseLeave:()=>V(null),onFocus:()=>V(i.id),onBlur:()=>V(null),...b.colony?{}:{...az(i.id,c.x,c.y,{x:Q/2,y:74}),onKeyDown:a=>ay(a,i.id,c.x,c.y,{x:Q/2,y:74})},onClick:()=>{av.current||I(i.id===H?null:i.id)},"aria-label":`${i.name}, ${a(`obj.kind.${i.kind}`)}, ${a(`obj.status.${i.state.status}`)}`,title:i.state.detail?`${a(`obj.status.${i.state.status}`)}: ${i.state.detail}`:a(`obj.status.${i.state.status}`),children:[(0,d.jsx)("span",{className:"shape"}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)(e,{size:16}),(0,d.jsx)("b",{children:i.name}),(0,d.jsx)("small",{children:a(`obj.status.${i.state.status}`)})]}),(0,d.jsx)("span",{className:`pip o-${i.state.status}`}),i.manager_id&&(0,d.jsxs)("span",{className:"ltag top mgr",title:a("colony.managedBy",{name:aR(i.manager_id)}),children:["⚙ ",aR(i.manager_id)]})]},i.id)}return f?(0,d.jsxs)("button",{"data-sid":f.id,className:`cell fill ${"orchestrator"===f.role?"queen":""} ${"running"===f.status?"running":""} ${aK&&!aM.has(f.id)?"dim":""} ${aK&&aM.has(f.id)&&f.id!==aK?"linked":""} ${b.colony?"":"draggable"}`,onMouseEnter:()=>V(f.id),onMouseLeave:()=>V(null),onFocus:()=>V(f.id),onBlur:()=>V(null),style:{...g,"--c":v.xq[f.provider].color},"aria-pressed":H===f.id,...b.colony?{}:{...az(f.id,c.x,c.y,{x:Q/2,y:74}),onKeyDown:a=>ay(a,f.id,c.x,c.y,{x:Q/2,y:74}),title:a("cx.moveHint")},onClick:()=>{av.current||I(f.id===H?null:f.id)},"aria-label":`${f.name}, ${a(`role.${f.role}`)}, ${v.xq[f.provider].short}, ${a(`status.${f.status}`)}`,children:[(0,d.jsx)("span",{className:"shape"}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)("b",{children:f.name}),(0,d.jsx)("small",{children:v.xq[f.provider].short})]}),"idle"!==f.status&&(0,d.jsx)("span",{className:`pip ${"error"===f.status?"err":""}`}),aD(f.id).length>0&&(0,d.jsxs)("span",{className:"ltag top mgr",title:a("colony.manages",{names:aD(f.id).map(a=>a.name).join(", ")}),children:["⚙ ",1===aD(f.id).length?aD(f.id)[0].name:aD(f.id).length]}),("orchestrator"===f.role?f.worker_ids.length>0:aN(f.id).length>0)&&(0,d.jsx)("span",{className:"ltag",title:"orchestrator"===f.role?a("colony.delegatesTo",{count:f.worker_ids.length}):a("colony.connectedTo",{names:aN(f.id).map(a=>a.name).join(", ")}),children:"orchestrator"===f.role?`↓ ${f.worker_ids.length}`:`↑ ${1===aN(f.id).length?aN(f.id)[0].name:aN(f.id).length}`})]},f.id):(0,d.jsxs)("button",{className:"cell ghost",style:g,onClick:()=>X({colonyId:b.colony?.id}),"aria-label":b.colony?a("colony.addTo",{name:b.colony.name}):a("colony.addAgent"),children:[(0,d.jsx)("svg",{className:"ghost-hex",viewBox:"0 0 100 115",preserveAspectRatio:"none","aria-hidden":!0,children:(0,d.jsx)("polygon",{points:"50,2 98,29 98,86 50,113 2,86 2,29"})}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)(h.A,{size:18}),a("colony.addAgent")]})]},b.key+"g"+e)})]},b.key+"l")),(0,d.jsxs)("svg",{className:"links top",width:ar,height:as,"aria-hidden":!0,children:[aL.filter(a=>!!aK&&(a.from===aK||a.to===aK)).map(a=>{let c=aA.get(a.from),e=aA.get(a.to);if(!c||!e)return null;let f=e.x-c.x,g=e.y-c.y,h=Math.hypot(f,g)||1,i=f/h,j=g/h,k=c.x+45.88*i,l=c.y+45.88*j,m=e.x-45.88*i,n=e.y-45.88*j,o=b.find(b=>b.id===a.to)?.status==="running",p=!!aK&&(a.from===aK||a.to===aK),q=!!aK&&!p;return(0,d.jsxs)("g",{opacity:q?.18:1,children:[(0,d.jsx)("line",{x1:k,y1:l,x2:m,y2:n,stroke:"var(--surface)",strokeWidth:p?8:5,strokeLinecap:"round",opacity:.85}),(0,d.jsx)("line",{x1:k,y1:l,x2:m,y2:n,stroke:"var(--honey)",strokeWidth:p?3.5:2.2,strokeDasharray:o?"7 6":p?void 0:"1 6",strokeLinecap:"round",children:o&&(0,d.jsx)("animate",{attributeName:"stroke-dashoffset",from:"26",to:"0",dur:"0.8s",repeatCount:"indefinite"})}),(0,d.jsx)("circle",{cx:m,cy:n,r:p?5.5:4,fill:"var(--honey)",stroke:"var(--surface)",strokeWidth:2})]},a.from+a.to)}),[...aB.map(a=>({...a,kind:"cluster"})),...aC.map(a=>({...a,kind:"manager"}))].filter(a=>!!aK&&(a.from===aK||a.to===aK)).map(a=>{let b=aA.get(a.from),c=aA.get(a.to);if(!b||!c)return null;let e=c.x-b.x,f=c.y-b.y,g=Math.hypot(e,f)||1,h=e/g,i=f/g,j="cluster"===a.kind?v.Ng:"var(--link-manager)";return(0,d.jsxs)("g",{children:[(0,d.jsx)("line",{x1:b.x+45.88*h,y1:b.y+45.88*i,x2:c.x-45.88*h,y2:c.y-45.88*i,stroke:"var(--surface)",strokeWidth:8,strokeLinecap:"round",opacity:.9}),(0,d.jsx)("line",{x1:b.x+45.88*h,y1:b.y+45.88*i,x2:c.x-45.88*h,y2:c.y-45.88*i,stroke:j,strokeWidth:3,strokeDasharray:"cluster"===a.kind?"3 5":"8 5",strokeLinecap:"round"}),(0,d.jsx)("circle",{cx:c.x-45.88*h,cy:c.y-45.88*i,r:5,fill:j,stroke:"var(--surface)",strokeWidth:2})]},a.kind+a.from+a.to)})]})]})}):B?(0,d.jsx)("div",{className:"comb-skel",children:(0,d.jsx)(w.lZ,{kind:"err",children:(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("span",{className:"grow",children:[a("cx.loadFailed")," ",B]}),(0,d.jsx)("button",{className:"btn sm",onClick:()=>void D(),children:a("cx.retry")})]})})}):(0,d.jsxs)("div",{className:"comb-skel",role:"status","aria-label":a("cx.loading"),children:[(0,d.jsx)("div",{className:"skel",style:{width:220,height:190}}),(0,d.jsxs)("div",{className:"row gap-l",children:[(0,d.jsx)("div",{className:"skel",style:{width:150,height:130}}),(0,d.jsx)("div",{className:"skel",style:{width:150,height:130}})]})]}),(0,d.jsxs)("div",{className:"comb-zoom",role:"group","aria-label":a("colony.zoom"),children:[Object.keys(ac).length>0&&(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>ad({}),title:a("colony.layout.reset"),"aria-label":a("colony.layout.reset"),children:(0,d.jsx)(l.A,{size:14})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(ai/1.2),disabled:ai<=.4,title:a("colony.zoom.out"),"aria-label":a("colony.zoom.out"),children:(0,d.jsx)(m.A,{size:14})}),(0,d.jsxs)("button",{className:"btn ghost sm zoom-pct",onClick:()=>aj(1),title:a("colony.zoom.fit"),"aria-label":a("colony.zoom.fit"),children:[Math.round(100*ai),"%"]}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(1.2*ai),disabled:ai>=2.5,title:a("colony.zoom.in"),"aria-label":a("colony.zoom.in"),children:(0,d.jsx)(h.A,{size:14})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(1),title:a("colony.zoom.fit"),"aria-label":a("colony.zoom.fit"),children:(0,d.jsx)(n.A,{size:14})})]}),(0,d.jsxs)("div",{className:"comb-legend",children:[Object.keys(v.xq).map(a=>(0,d.jsxs)("span",{className:"pbadge",style:{"--c":v.xq[a].color},children:[(0,d.jsx)("i",{}),v.xq[a].short]},a)),(0,d.jsxs)("span",{className:"pbadge",style:{"--c":"var(--honey)"},children:[(0,d.jsx)("i",{}),a("role.orchestrator")]})]})]}),aH?(0,d.jsx)(N.wl,{object:aH,target:aI,onClose:()=>I(null),onCreateManager:()=>X({colonyId:aH.colony_id??void 0,manager:!0,objectId:aH.id})},aH.id):aG?(0,d.jsxs)(M.rs,{target:aI,pinned:!0,width:340,label:aG.name,onClose:()=>I(null),children:[(0,d.jsxs)("div",{className:"ap-corner row gap-s",children:[(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>_(aG.id),"aria-label":a("colony.settingsFor",{name:aG.name}),title:a("colony.agentSettings"),children:(0,d.jsx)(o.A,{size:16})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>I(null),"aria-label":a("common.close"),title:`${a("common.close")} (Esc)`,children:(0,d.jsx)(p.A,{size:16})})]}),(0,d.jsx)(M.kh,{agent:aG,hideColony:!0}),(0,d.jsxs)("div",{className:"field ap-pin-field",children:[(0,d.jsx)("label",{children:a("form.colony")}),(0,d.jsxs)("select",{className:"select",value:aU?.id??"",onChange:a=>void aV(aG,a.target.value),children:[(0,d.jsx)("option",{value:"",children:a("common.noColony")}),c.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})]}),(0,d.jsxs)("div",{className:"row ap-pin-actions",children:[(0,d.jsxs)(f(),{className:"btn primary grow",href:`/agents/${aG.id}`,children:[a("colony.openChat")," ",(0,d.jsx)(q,{size:16})]}),(0,d.jsx)("button",{className:"btn danger icon",onClick:()=>aF(aG.id),"aria-label":a("agent.delete"),title:a("agent.delete"),children:(0,d.jsx)(r.A,{size:16})})]})]},aG.id):null]}),(0,d.jsxs)("div",{className:"card card-pad recent",id:"recent",children:[(0,d.jsx)("div",{className:"eyebrow recent-head",children:a("colony.recent")}),0===z.length?(0,d.jsx)("p",{className:"muted small m0",children:a("colony.recentEmpty")}):(0,d.jsx)("div",{className:"recent-grid",children:z.slice(0,6).map(c=>(0,d.jsxs)("div",{className:"feed-item",children:[(0,d.jsx)("i",{className:`dot ${"running"===c.status?"run":"done"===c.status?"ok":"err"}`}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"feed-line",children:[b.some(a=>a.id===c.from_id)?(0,d.jsx)(f(),{href:`/agents/${c.from_id}`,"aria-label":a("cx.openAgent",{name:aR(c.from_id)}),children:aR(c.from_id)}):(0,d.jsx)("b",{children:aR(c.from_id)})," → ",b.some(a=>a.id===c.to_id)?(0,d.jsx)(f(),{href:`/agents/${c.to_id}`,"aria-label":a("cx.openAgent",{name:aR(c.to_id)}),children:aR(c.to_id)}):(0,d.jsx)("b",{children:aR(c.to_id)})]}),(0,d.jsx)("div",{className:"muted small ellipsis",children:c.task}),(0,d.jsx)("div",{className:"muted feed-when",children:(0,v.KN)(c.created_at)})]})]},c.id))})]}),aE&&b.find(a=>a.id===aE)&&(0,d.jsx)(K.G,{agent:b.find(a=>a.id===aE),onClose:()=>aF(null),onDeleted:()=>I(null)}),W&&(0,d.jsx)(y.b,{presetColonyId:W.colonyId,presetObjectId:W.objectId,manager:W.manager,onClose:()=>X(null),onCreated:a=>I(a)}),$&&b.find(a=>a.id===$)&&(0,d.jsx)(J,{agent:b.find(a=>a.id===$),onClose:()=>_(null)},$),aa&&(0,d.jsx)(O.X,{presetColonyId:aa.colonyId,onClose:()=>ab(null),onSaved:a=>I(a)}),Y&&(0,d.jsx)(F,{colony:"new"===Y?void 0:Y,onClose:()=>Z(null)})]})}},85605:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]])},85635:(a,b,c)=>{Promise.resolve().then(c.bind(c,10230))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93674:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(55322),e=c(17027),f=c(34410),g=c(5207),h=c(15964),i=c(66390),j=c(60570),k=c(13520),l=c(7371),m=c(93884);function n(a,b={}){let{t:c}=(0,m.s9)(),{agents:o,colonies:p,objects:q,refresh:r}=(0,j.q5)(),s=(0,g.dj)(),t=(0,e.useMemo)(()=>a?q.filter(b=>b.manager_id===a.id).map(a=>a.id).sort():[],[q,a?.id]),u=(0,e.useMemo)(()=>a?JSON.stringify((0,h.TN)(a,t)):"",[a,t]),[v,w]=(0,e.useState)(()=>a?(0,h.TN)(a,t):null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(!1),B=v&&a?(0,h.tf)(v,o,a.id,p):{},C=!!v&&JSON.stringify(v)!==u;(0,k.h)(C);let D=async()=>{if(v&&a){if(Object.keys(B).length)return void s(c("edit.fixFields"),"err");y(!0);try{let{type_id:d,object_ids:e,...f}=v;await l.FH.patch(`/agents/${a.id}`,f),JSON.stringify([...e].sort())!==JSON.stringify(t)&&await l.FH.put(`/agents/${a.id}/resources`,{object_ids:e}),await r(["agents","colonies","objects"]),s(c("edit.saved",{name:v.name.trim()})),b.onSaved?.()}catch(a){s(a instanceof Error?a.message:c("edit.saveFailed"),"err")}y(!1)}},E=()=>{a&&w((0,h.TN)(a,t))};return{draft:v,setDraft:w,errors:B,dirty:C,saving:x,save:D,discard:E,actions:(a={})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{className:`btn danger push-r ${a.size??""}`,onClick:()=>A(!0),children:[(0,d.jsx)(f.A,{size:a.size?14:15}),c("agent.delete")]}),a.onCancel?(0,d.jsx)("button",{className:`btn ghost ${a.size??""}`,onClick:a.onCancel,children:c("common.cancel")}):(0,d.jsx)("button",{className:`btn ghost ${a.size??""}`,disabled:!C,onClick:E,children:c("common.discard")}),(0,d.jsx)("button",{className:`btn primary ${a.size??""}`,disabled:!C||x,onClick:D,children:x?c("common.saving"):c("common.saveChanges")})]}),deleteModal:z&&a?(0,d.jsx)(i.G,{agent:a,onClose:()=>A(!1),onDeleted:b.onDeleted}):null}}},96107:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},96489:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[691,790,335,555,274,143,716,306],()=>b(b.s=1417));module.exports=c})();
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:x.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:d,isRevalidating:g,span:h})=>{let j,k=!1===M.isDev,m=c||b.writableEnded;if(aj&&ad&&!d&&!P)return(null==ae?void 0:ae.render404)?await ae.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ak&&(j=(0,y.parseFallbackField)(ak.fallback)),j===y.FallbackMode.PRERENDER&&(0,w.isBot)(an)&&(!at||ap)&&(j=y.FallbackMode.BLOCKING_STATIC_RENDER),(null==d?void 0:d.isStale)===-1&&(aj=!0),aj&&(j!==y.FallbackMode.NOT_FOUND||d)&&(j=y.FallbackMode.BLOCKING_STATIC_RENDER),!P&&j!==y.FallbackMode.BLOCKING_STATIC_RENDER&&aD&&!m&&!ab&&V&&(k||!al)){let b;if((k||ak)&&j===y.FallbackMode.NOT_FOUND)throw new D.NoFallbackError;if(at&&!ar){let c="string"==typeof(null==ak?void 0:ak.fallback)?ak.fallback:k?ai:null;if(b=await M.handleResponse({cacheKey:c,req:a,nextConfig:af,routeKind:f.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:aa,isRoutePPREnabled:at,responseGenerator:async()=>l({span:h,postponed:void 0,fallbackRouteParams:k||av?(0,p.u)(ai):null}),waitUntil:e.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=aj||g||!aw?void 0:aw;if(au&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:x.CachedRouteKind.PAGES,html:z.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let o=V&&at&&((0,i.getRequestMeta)(a,"renderFallbackShell")||av)?(0,p.u)(ah):null;return l({span:h,postponed:n,fallbackRouteParams:o})},o=async c=>{var d,g,h,j,k;let m,o=await M.handleResponse({cacheKey:aC,responseGenerator:a=>n({span:c,...a}),routeKind:f.RouteKind.APP_PAGE,isOnDemandRevalidate:aj,isRoutePPREnabled:at,req:a,nextConfig:af,prerenderManifest:aa,waitUntil:e.waitUntil});if(ab&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),M.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aC)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(d=o.value)?void 0:d.kind)!==x.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(h=o.value)?void 0:h.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;am&&!ax&&(!p||aq)&&(P||b.setHeader("x-nextjs-cache",aj?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(v.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(aw)m={revalidate:0,expire:void 0};else if(P&&ar&&!aq&&at)m={revalidate:0,expire:void 0};else if(!M.isDev)if(ab)m={revalidate:0,expire:void 0};else if(am){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??af.expireTime}}else m={revalidate:A.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(o.cacheControl=m,"string"==typeof ay&&(null==q?void 0:q.kind)===x.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(v.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[A.NEXT_CACHE_TAGS_HEADER];P&&am&&c&&"string"==typeof c&&b.setHeader(A.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ay);return void 0!==d?(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.fromStatic(d,v.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,i.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,i.getRequestMeta)(a,"initURL")}))return null;if(p&&aw)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(P&&am||delete a[A.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[A.NEXT_CACHE_TAGS_HEADER];if(P&&am&&s&&"string"==typeof s&&b.setHeader(A.NEXT_CACHE_TAGS_HEADER,s),!q.status||ar&&at||(b.statusCode=q.status),!P&&q.status&&H.RedirectStatusCode[q.status]&&ar&&(b.statusCode=200),p&&b.setHeader(v.NEXT_DID_POSTPONE_HEADER,"1"),ar&&!ab){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:q.html,cacheControl:ax?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:z.default.fromStatic(q.rscData,v.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl})}let t=q.html;if(!p||P||ar)return(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:o.cacheControl});if(au)return t.push(new ReadableStream({start(a){a.enqueue(B.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}});let u=new TransformStream;return t.push(u.readable),l({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==x.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(u.writable)}).catch(a=>{u.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,C.sendRenderResult)({req:a,res:b,generateEtags:af.generateEtags,poweredByHeader:af.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}})};if(!aH)return await aG.withPropagatedContext(a.headers,()=>aG.trace(j.BaseServerSpan.handleRequest,{spanName:`${aF} ${a.url}`,kind:h.SpanKind.SERVER,attributes:{"http.method":aF,"http.target":a.url}},o));await o(aH)}catch(b){throw b instanceof D.NoFallbackError||await M.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"render",revalidateReason:(0,g.c)({isRevalidate:am,isOnDemandRevalidate:aj})},ae),b}}},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6289:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]])},10230:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(85972).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/hugh/Documentos/projects/personal/hive-am/dist/stage/web/app/page.tsx","default")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32309:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},33873:a=>{"use strict";a.exports=require("path")},37811:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},38550:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]])},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},44521:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},46378:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("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"}]])},48370:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},49870:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},51291:(a,b,c)=>{Promise.resolve().then(c.bind(c,80749))},55511:a=>{"use strict";a.exports=require("crypto")},57578:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},61222:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66390:(a,b,c)=>{"use strict";c.d(b,{G:()=>i});var d=c(55322),e=c(81963),f=c(60570),g=c(7371),h=c(93884);function i({agent:a,onClose:b,onDeleted:c}){let{t:i}=(0,h.s9)(),{refresh:j}=(0,f.zd)(),k=(0,e.dj)();return(0,d.jsx)(e.TM,{title:i("agent.deleteTitle",{name:a.name}),body:i("agent.deleteBody"),danger:!0,confirmLabel:i("agent.delete"),cancelLabel:i("agent.keep"),onClose:b,onConfirm:async()=>{await g.FH.del(`/agents/${a.id}`),await j(["agents","colonies"]),k(i("agent.deleted")),c?.()}})}},72836:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},79588:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("Container",[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]])},80749:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>U});var d=c(55322),e=c(91705),f=c.n(e),g=c(17027),h=c(71267),i=c(67455),j=c(48881),k=c(2266),l=c(61222),m=c(29723),n=c(45762),o=c(38550),p=c(31251);let q=(0,c(51537).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var r=c(34410),s=c(60570),t=c(73269),u=c(7371),v=c(61162),w=c(81963),x=c(94547),y=c(36143),z=c(59686),A=c(13520),B=c(85748),C=c(93884);let D=v.hg,E=["cwd","permission","skills","prompt"];function F({colony:a,onClose:b}){let{t:c}=(0,C.s9)(),{agents:e,skills:f,colonies:h,refresh:i}=(0,s.q5)(),j=(0,w.dj)(),[k,l]=(0,g.useState)(()=>a?{name:a.name,color:a.color,cwd:a.cwd,permission:a.permission,system_prompt:a.system_prompt,skill_ids:a.skill_ids,skill_loads:a.skill_loads,agent_ids:a.agent_ids,inherit:a.inherit}:{name:"",color:D[h.length%D.length],cwd:"",permission:"acceptEdits",system_prompt:"",skill_ids:[],skill_loads:{},agent_ids:[],inherit:{cwd:!0,permission:!0,skills:!0,prompt:!0}}),m=(0,g.useMemo)(()=>JSON.stringify(k),[]),n=JSON.stringify(k)!==m;(0,A.h)(n);let[o,p]=(0,g.useState)(!1),q=()=>{n?p(!0):b()},[t,v]=(0,g.useState)(""),[x,y]=(0,g.useState)(!1),[E,F]=(0,g.useState)(!1),[H,I]=(0,g.useState)(!1),J=(a,b)=>l(c=>({...c,[a]:b})),K=async d=>{I(!0);try{let e={...k,name:k.name.trim(),color:k.color.toLowerCase(),inherit:d};a?await u.FH.patch(`/colonies/${a.id}`,e):await u.FH.post("/colonies",e),await i(["agents","colonies"]),j(a?c("colony.saved"):c("colony.created")),b()}catch(a){y(!1),v(a instanceof Error?a.message:c("edit.saveFailed")),I(!1)}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(w._s,{title:a?c("colony.editTitle",{name:a.name}):c("colony.newTitle"),subtitle:c("colony.subtitle"),onClose:q,footer:(0,d.jsxs)(d.Fragment,{children:[a&&(0,d.jsxs)("button",{className:"btn danger push-r",onClick:()=>F(!0),children:[(0,d.jsx)(r.A,{size:15}),c("common.delete")]}),(0,d.jsx)("button",{className:"btn ghost",onClick:q,children:c("common.cancel")}),(0,d.jsx)("button",{className:"btn primary",onClick:()=>k.name.trim()?h.some(b=>b.id!==a?.id&&b.name.toLowerCase()===k.name.trim().toLowerCase())?void v(c("colony.err.nameTaken")):/^#[0-9a-f]{6}$/i.test(k.color)?void(v(""),y(!0)):void v(c("colony.err.color")):void v(c("colony.err.name")),children:a?c("colony.save"):c("colony.create")})]}),children:[(0,d.jsx)(w.D0,{label:c("form.name"),error:t,children:(0,d.jsx)("input",{className:"input",value:k.name,onChange:a=>J("name",a.target.value),placeholder:c("colony.name.placeholder"),"data-autofocus":!0})}),(0,d.jsx)(w.D0,{label:c("colony.color"),children:(0,d.jsxs)("div",{className:"swatches",children:[D.map(a=>(0,d.jsx)("button",{type:"button",className:"swatch",style:{"--c":a},"aria-pressed":k.color.toLowerCase()===a,"aria-label":c("colony.colorOption",{color:a}),onClick:()=>J("color",a)},a)),(0,d.jsx)("label",{className:`swatch custom ${D.includes(k.color.toLowerCase())?"":"on"}`,style:{"--c":/^#[0-9a-f]{6}$/i.test(k.color)?k.color:"transparent"},title:c("colony.colorCustom"),children:(0,d.jsx)("input",{type:"color",value:/^#[0-9a-f]{6}$/i.test(k.color)?k.color:"#2f8f5b",onChange:a=>J("color",a.target.value),"aria-label":c("colony.colorCustom")})}),(0,d.jsx)("input",{className:"input hex-input mono",value:k.color,maxLength:7,spellCheck:!1,"aria-label":c("colony.colorHex"),placeholder:"#2f8f5b",onChange:a=>{let b=a.target.value.trim();J("color",b.startsWith("#")||!b?b:`#${b}`)}})]})}),(0,d.jsx)(w.dR,{value:k.cwd,onChange:a=>J("cwd",a)}),(0,d.jsx)(w.en,{value:k.permission,onChange:a=>J("permission",a)}),(0,d.jsx)(w.D0,{label:c("inherit.context"),hint:c("colony.context.hint"),children:(0,d.jsx)(z.n,{value:k.system_prompt,onChange:a=>J("system_prompt",a),placeholder:c("colony.context.placeholder"),defaultView:"write",minHeight:160})}),(0,d.jsx)(w.D0,{label:c("form.skills"),children:(0,d.jsx)(w.kV,{skills:f,value:k.skill_ids,loads:k.skill_loads,onChange:(a,b)=>l({...k,skill_ids:a,skill_loads:b})})}),(0,d.jsx)(w.D0,{label:c("colony.members"),hint:c("colony.members.hint"),children:0===e.length?(0,d.jsx)("p",{className:"hint",children:c("colony.members.empty")}):(0,d.jsx)(B.C,{value:k.agent_ids,onChange:a=>J("agent_ids",a),items:e.map(b=>{let d=b.colony_id&&b.colony_id!==a?.id?h.find(a=>a.id===b.colony_id):null;return{id:b.id,name:b.name,note:d?c("colony.currentlyIn",{name:d.name}):b.description||c(`role.${b.role}`)}})})})]}),x&&(0,d.jsx)(G,{draft:k,colony:a,members:e.filter(a=>k.agent_ids.includes(a.id)),busy:H,onBack:()=>y(!1),onConfirm:K}),o&&(0,d.jsx)(w.TM,{danger:!0,title:c("fa.unsaved.title"),body:c("fa.unsaved.body"),confirmLabel:c("fa.unsaved.discard"),cancelLabel:c("fa.unsaved.keep"),onClose:()=>p(!1),onConfirm:b}),E&&a&&(0,d.jsx)(w.TM,{title:c("colony.deleteTitle",{name:a.name}),body:c("colony.deleteBody",{count:a.agent_ids.length}),danger:!0,confirmLabel:c("colony.delete"),cancelLabel:c("colony.keep"),onClose:()=>F(!1),onConfirm:async()=>{await u.FH.del(`/colonies/${a.id}`),await i(["agents","colonies"]),j(c("colony.deleted")),b()}})]})}function G({draft:a,colony:b,members:c,busy:e,onBack:f,onConfirm:h}){let{t:i}=(0,C.s9)(),j={cwd:!!a.cwd,permission:!0,skills:a.skill_ids.length>0,prompt:!!a.system_prompt.trim()},[k,l]=(0,g.useState)(()=>({cwd:(!b||b.inherit.cwd)&&j.cwd,permission:!b||b.inherit.permission,skills:(!b||b.inherit.skills)&&j.skills,prompt:(!b||b.inherit.prompt)&&j.prompt})),m=(0,g.useMemo)(()=>k.cwd&&a.cwd&&c.filter(b=>!b.overrides.includes("cwd")&&b.effective.cwd!==a.cwd).length,[k.cwd,a.cwd,c]);return(0,d.jsxs)(w.aF,{title:i("inheritAsk.title"),onClose:f,children:[(0,d.jsx)("p",{className:"muted small m0",children:i("inheritAsk.intro")}),(0,d.jsx)("div",{className:"col gap-s",children:E.map(b=>(0,d.jsx)(w.Tl,{disabled:!j[b],checked:k[b],onChange:a=>l(c=>({...c,[b]:a})),label:(0,d.jsxs)(d.Fragment,{children:[i(`inheritAsk.field.${b}`),"cwd"===b&&a.cwd?(0,d.jsxs)("span",{className:"muted mono fw-400",children:[" \xb7 ",(0,v._1)(a.cwd)]}):null,"permission"===b?(0,d.jsxs)("span",{className:"muted fw-400",children:[" \xb7 ",(0,v.Ck)(a.permission)]}):null]}),hint:j[b]?i(`inheritAsk.hint.${b}`):i(`inheritAsk.empty.${b}`)},b))}),m?(0,d.jsx)(w.lZ,{kind:"honey",children:i("inheritAsk.folderMoves",{count:Number(m)})}):null,(0,d.jsxs)("div",{className:"row push-end",children:[(0,d.jsx)("button",{className:"btn ghost",onClick:f,children:i("common.back")}),(0,d.jsx)("button",{className:"btn primary",disabled:e,onClick:()=>h(k),children:e?i("common.saving"):b?i("colony.save"):i("colony.create")})]})]})}var H=c(15964),I=c(93674);function J({agent:a,onClose:b}){let{t:c}=(0,C.s9)(),e=(0,I.A)(a,{onSaved:b,onDeleted:b});return e.draft?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(w._s,{title:c("edit.title",{name:a.name}),subtitle:c("running"===a.status?"edit.subtitleRunning":"edit.subtitleIdle"),onClose:b,footer:e.actions({onCancel:b}),children:(0,d.jsx)(H.SU,{draft:e.draft,onChange:e.setDraft,errors:e.errors,selfId:a.id})}),e.deleteModal]}):null}var K=c(66390),L=c(24956),M=c(3936),N=c(36368),O=c(54403),P=c(93717);let Q=74*Math.sqrt(3),R=[[1,0],[1,-1],[0,-1],[-1,0],[-1,1],[0,1]],S=([a,b])=>({x:Q*(a+b/2),y:111*b}),T=(a,b,c)=>Array.from({length:6},(d,e)=>{let f=(60*e-30)*Math.PI/180;return`${(a+c*Math.cos(f)).toFixed(1)},${(b+c*Math.sin(f)).toFixed(1)}`}).join(" ");function U(){let{t:a}=(0,C.s9)(),{agents:b,colonies:c,objects:e,dispatches:z,ready:A,error:B,retry:D,refresh:E}=(0,s.q5)(),G=(0,w.dj)(),[H,I]=(0,g.useState)(null),[U,V]=(0,g.useState)(null),[W,X]=(0,g.useState)(null),[Y,Z]=(0,g.useState)(null),[$,_]=(0,g.useState)(null),[aa,ab]=(0,g.useState)(null),[ac,ad]=(0,t.ud)("hive-colony-layout",{}),[ae,af]=(0,g.useState)(null),[ag,ah]=(0,t.ud)("hive-colony-zoom",1),ai=ag>=.4&&ag<=2.5?ag:1,aj=a=>ah(Math.min(2.5,Math.max(.4,Math.round(100*a)/100))),ak=(0,g.useMemo)(()=>ae?{...ac,[ae.key]:{x:ae.x,y:ae.y}}:ac,[ac,ae]),{clusters:al,width:am,height:an}=(0,g.useMemo)(()=>(function(a,b,c,d={}){let e=a=>!!a&&b.some(b=>b.id===a),f=b.map(b=>({key:b.id,colony:b,members:a.filter(a=>a.colony_id===b.id),things:c.filter(a=>a.colony_id===b.id)}));f.push({key:"free",colony:null,members:a.filter(a=>!e(a.colony_id)),things:c.filter(a=>!e(a.colony_id))});let g=[],h=0,i=0,j=0;for(let b of f){if(!b.members.length&&!b.things.length&&!b.colony&&a.length+c.length>0)continue;let e=function(a){let b=a.filter(a=>"orchestrator"===a.role);for(let c of[...b])for(let d of c.worker_ids){let c=a.find(a=>a.id===d);c&&!b.includes(c)&&b.push(c)}for(let c of a)b.includes(c)||b.push(c);return b}(b.members),f=(function(a){let b=[[0,0]];for(let c=1;b.length<a;c++){let a=R[4][0]*c,d=R[4][1]*c;for(let e=0;e<6;e++)for(let f=0;f<c;f++)b.push([a,d]),a+=R[e][0],d+=R[e][1]}return b.slice(0,a)})(e.length+b.things.length+1).map(S),k=Math.min(...f.map(a=>a.x))-Q/2,l=Math.max(...f.map(a=>a.x))+Q/2,m=Math.min(...f.map(a=>a.y))-74,n=Math.max(...f.map(a=>a.y))+74,o=l-k+52,p=n-m+52+50,q=b.colony?d[b.key]:void 0;!q&&h>0&&h+o>880&&(h=0,i+=j+36,j=0);let r=q?q.x:h,s=q?q.y:i,t=f.map((a,c)=>{let f=e[c]??null,g=b.things[c-e.length],h=b.colony?void 0:d[(f??g)?.id??""];return{agent:f,object:g,x:h?h.x:r+(a.x-k)+26,y:h?h.y:s+(a.y-m)+26+50}});g.push({key:b.key,colony:b.colony,cells:t,x:r,y:s,w:o,h:p}),q||(h+=o+36,j=Math.max(j,p))}let k=0,l=0;for(let a of g)if(a.colony)k=Math.max(k,a.x+a.w),l=Math.max(l,a.y+a.h);else for(let b of a.cells)k=Math.max(k,b.x+Q/2+26),l=Math.max(l,b.y+74+26);return{clusters:g,width:k,height:l}})(b,c,e,ak),[b,c,e,ak]),ao=(0,g.useRef)(null),[ap,aq]=(0,g.useState)(0);(0,g.useRef)(ai).current=ai;let ar=am+80,as=an+80,at=(ap?Math.min(1,(ap-24)/ar):1)*ai,au=(0,g.useRef)(null),av=(0,g.useRef)(!1),aw=a=>{let b=au.current;if(!b)return;let c=(a.clientX-b.sx)/at,d=(a.clientY-b.sy)/at;!b.moved&&Math.hypot(c,d)*at<6||(b.moved=!0,b.last={x:Math.max(b.min.x,b.ox+c),y:Math.max(b.min.y,b.oy+d)},af({key:b.key,...b.last}))},ax=()=>{let a=au.current;au.current=null,a?.moved&&a.last&&(av.current=!0,setTimeout(()=>{av.current=!1},0),ad({...ac,[a.key]:a.last}),af(null))},ay=(a,b,c,d,e={x:0,y:0})=>{let f={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[a.key];if(!f||a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault();let g=a.shiftKey?64:16;ad({...ac,[b]:{x:Math.max(e.x,c+f[0]*g),y:Math.max(e.y,d+f[1]*g)}})},az=(a,b,c,d)=>({onPointerDown:e=>((a,b,c,d,e={x:0,y:0})=>{if(0===a.button){au.current={key:b,sx:a.clientX,sy:a.clientY,ox:c,oy:d,min:e,moved:!1};try{a.currentTarget.setPointerCapture(a.pointerId)}catch{}}})(e,a,b,c,d),onPointerMove:aw,onPointerUp:ax,onPointerCancel:ax}),aA=new Map;for(let a of al)for(let b of a.cells)b.agent&&aA.set(b.agent.id,{x:b.x+40,y:b.y+40}),b.object&&aA.set(b.object.id,{x:b.x+40,y:b.y+40});let aB=e.filter(a=>"cluster"===a.kind).flatMap(a=>a.config.members.map(b=>({from:a.id,to:b}))),aC=e.filter(a=>a.manager_id&&aA.has(a.manager_id)&&aA.has(a.id)).map(a=>({from:a.manager_id,to:a.id})),aD=a=>e.filter(b=>b.manager_id===a),[aE,aF]=(0,g.useState)(null),aG=b.find(a=>a.id===H)??null,aH=e.find(a=>a.id===H)??null,[aI,aJ]=(0,g.useState)(null),aK=U??H,aL=b.filter(a=>"orchestrator"===a.role).flatMap(a=>a.worker_ids.map(b=>({from:a.id,to:b}))),aM=new Set(aK?[aK,...[...aL,...aB,...aC].filter(a=>a.from===aK||a.to===aK).flatMap(a=>[a.from,a.to])]:[]),aN=a=>b.filter(b=>"orchestrator"===b.role&&b.worker_ids.includes(a)),aO=b.filter(a=>"running"===a.status).length,aP=e.filter(a=>"running"===a.state.status).length,aQ=b.filter(a=>"orchestrator"===a.role).length,aR=c=>b.find(a=>a.id===c)?.name??a("colony.removedAgent"),aS=z.filter(a=>"running"===a.status).length,aT=[{id:"agents",n:b.length,label:a("stat.agents",{count:b.length}),href:"/agents"},{id:"colonies",n:c.length,label:a("stat.colonies",{count:c.length})},{id:"objects",n:e.length,label:a("stat.objects",{count:e.length}),href:"/resources",title:e.length?a("obj.running",{count:aP}):void 0},{id:"queens",n:aQ,label:a("stat.orchestrators",{count:aQ}),href:"/agents"},{id:"working",n:aO,label:a("stat.working"),href:"/agents"},{id:"tasks",n:aS,label:a("stat.tasks"),href:"#recent"}],aU=aG?c.find(a=>a.id===aG.colony_id):void 0,aV=async(b,d)=>{try{await u.FH.patch(`/agents/${b.id}`,{colony_id:d||null,overrides:[]}),await E(["agents","colonies"]),G(d?a("colony.joined",{name:b.name,colony:c.find(a=>a.id===d)?.name??""}):a("colony.left",{name:b.name}))}catch(b){G(b instanceof Error?b.message:a("colony.moveFailed"),"err")}};return(0,d.jsxs)("div",{className:"page",children:[(0,d.jsxs)("div",{className:"page-head",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("h1",{children:a("nav.colony")}),(0,d.jsx)(L.B,{label:a("colony.helpLabel"),title:a("colony.howTitle"),children:a("colony.howBody")})]}),(0,d.jsx)("p",{children:a("colony.page.subtitle")})]}),(0,d.jsx)("div",{className:"cx-head-actions",children:(0,d.jsx)(x.W1,{label:a("cx.new"),icon:(0,d.jsx)(h.A,{size:14}),children:b=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(i.A,{size:15}),onClick:()=>{b(),X({})},children:a("newAgent.title")}),(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(j.A,{size:15}),onClick:()=>{b(),Z("new")},children:a("colony.newTitle")}),(0,d.jsx)(x.Dr,{icon:(0,d.jsx)(k.A,{size:15}),onClick:()=>{b(),ab({})},children:a("obj.new")})]})})})]}),(0,d.jsx)("div",{className:"stats",children:aT.map(b=>{let c=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("b",{children:b.n}),(0,d.jsx)("span",{children:b.label})]});return b.href?(0,d.jsx)(f(),{href:b.href,className:"card stat",title:b.title,"aria-label":`${b.n} ${b.label}. ${a("cx.stat.open",{label:b.label})}`,children:c},b.id):(0,d.jsx)("div",{className:"card stat",title:b.title,children:c},b.id)})}),(0,d.jsxs)("div",{className:"colony",children:[(0,d.jsxs)("div",{className:"comb-wrap",ref:ao,children:[A?0===b.length&&0===c.length&&0===e.length?(0,d.jsx)("div",{className:"comb-empty-wrap",children:(0,d.jsx)(w.pp,{icon:(0,d.jsx)(w._h,{size:"lg",queen:!0,label:"+"}),title:a("colony.empty.title"),body:a("colony.empty.body"),action:(0,d.jsxs)("div",{className:"row",children:[(0,d.jsxs)("button",{className:"btn",onClick:()=>Z("new"),children:[(0,d.jsx)(h.A,{size:16}),a("colony.empty.createColony")]}),(0,d.jsxs)("button",{className:"btn primary",onClick:()=>X({}),children:[(0,d.jsx)(h.A,{size:16}),a("colony.empty.createAgent")]})]})})}):(0,d.jsx)("div",{className:"comb-box",style:{width:ar*at,height:as*at},children:(0,d.jsxs)("div",{className:"comb",style:{width:ar,height:as,transform:`scale(${at})`,transformOrigin:"0 0","--w":`${.9*Q}px`,"--h":`${133.20000000000002}px`},children:[(0,d.jsx)("svg",{className:"links",width:ar,height:as,children:al.filter(a=>a.colony).map(a=>{let b=a.colony.color||"var(--honey)";return(0,d.jsxs)("g",{children:[a.cells.map((a,c)=>(0,d.jsx)("polygon",{points:T(a.x+40,a.y+40,74),style:{fill:b,stroke:b},strokeWidth:44,strokeLinejoin:"round"},"o"+c)),a.cells.map((a,c)=>(0,d.jsx)("polygon",{points:T(a.x+40,a.y+40,74),style:{fill:`color-mix(in srgb, ${b} 9%, var(--surface))`,stroke:`color-mix(in srgb, ${b} 9%, var(--surface))`},strokeWidth:38,strokeLinejoin:"round"},"i"+c))]},a.key)})}),al.map(b=>(0,d.jsxs)("div",{children:[b.colony?(0,d.jsxs)("button",{className:`colony-label draggable ${ae?.key===b.key?"dragging":""}`,style:{left:b.x+b.w/2+40,top:b.y+50-10+40,"--c":b.colony.color||"var(--honey)"},...az(b.key,b.x,b.y),onKeyDown:a=>ay(a,b.key,b.x,b.y),onClick:()=>{av.current||Z(b.colony)},title:`${b.colony.cwd?a("colony.editHover",{path:(0,v._1)(b.colony.cwd)}):a("colony.editHoverShort")} \xb7 ${a("colony.dragHint")} \xb7 ${a("cx.moveHint")}`,children:[(0,d.jsx)("i",{className:"cdot"}),b.colony.name,(0,d.jsx)("small",{children:a("colony.agentCount",{count:b.cells.filter(a=>a.agent).length})}),(0,d.jsx)(j.A,{size:13,className:"muted"})]}):c.length>0&&b.cells.some(a=>a.agent)?(0,d.jsx)("span",{className:"colony-label cx-unplaced",style:{left:b.x+b.w/2+40,top:b.y+50-10+40},children:(0,d.jsx)("small",{children:a("common.noColony")})}):null,b.cells.map((c,e)=>{let f=c.agent,g={left:c.x+40,top:c.y+40},i=c.object;if(i){let{icon:e,color:f}=P.Nd[i.kind];return(0,d.jsxs)("button",{"data-sid":i.id,className:`cell fill obj st-${i.state.status} ${"running"===i.state.status?"running":""} ${aK&&!aM.has(i.id)?"dim":""} ${aK&&aM.has(i.id)&&i.id!==aK?"linked":""} ${b.colony?"":"draggable"}`,style:{...g,"--c":f},"aria-pressed":H===i.id,onMouseEnter:()=>V(i.id),onMouseLeave:()=>V(null),onFocus:()=>V(i.id),onBlur:()=>V(null),...b.colony?{}:{...az(i.id,c.x,c.y,{x:Q/2,y:74}),onKeyDown:a=>ay(a,i.id,c.x,c.y,{x:Q/2,y:74})},onClick:()=>{av.current||I(i.id===H?null:i.id)},"aria-label":`${i.name}, ${a(`obj.kind.${i.kind}`)}, ${a(`obj.status.${i.state.status}`)}`,title:i.state.detail?`${a(`obj.status.${i.state.status}`)}: ${i.state.detail}`:a(`obj.status.${i.state.status}`),children:[(0,d.jsx)("span",{className:"shape"}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)(e,{size:16}),(0,d.jsx)("b",{children:i.name}),(0,d.jsx)("small",{children:a(`obj.status.${i.state.status}`)})]}),(0,d.jsx)("span",{className:`pip o-${i.state.status}`}),i.manager_id&&(0,d.jsxs)("span",{className:"ltag top mgr",title:a("colony.managedBy",{name:aR(i.manager_id)}),children:["⚙ ",aR(i.manager_id)]})]},i.id)}return f?(0,d.jsxs)("button",{"data-sid":f.id,className:`cell fill ${"orchestrator"===f.role?"queen":""} ${"running"===f.status?"running":""} ${aK&&!aM.has(f.id)?"dim":""} ${aK&&aM.has(f.id)&&f.id!==aK?"linked":""} ${b.colony?"":"draggable"}`,onMouseEnter:()=>V(f.id),onMouseLeave:()=>V(null),onFocus:()=>V(f.id),onBlur:()=>V(null),style:{...g,"--c":v.xq[f.provider].color},"aria-pressed":H===f.id,...b.colony?{}:{...az(f.id,c.x,c.y,{x:Q/2,y:74}),onKeyDown:a=>ay(a,f.id,c.x,c.y,{x:Q/2,y:74}),title:a("cx.moveHint")},onClick:()=>{av.current||I(f.id===H?null:f.id)},"aria-label":`${f.name}, ${a(`role.${f.role}`)}, ${v.xq[f.provider].short}, ${a(`status.${f.status}`)}`,children:[(0,d.jsx)("span",{className:"shape"}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)("b",{children:f.name}),(0,d.jsx)("small",{children:v.xq[f.provider].short})]}),"idle"!==f.status&&(0,d.jsx)("span",{className:`pip ${"error"===f.status?"err":""}`}),aD(f.id).length>0&&(0,d.jsxs)("span",{className:"ltag top mgr",title:a("colony.manages",{names:aD(f.id).map(a=>a.name).join(", ")}),children:["⚙ ",1===aD(f.id).length?aD(f.id)[0].name:aD(f.id).length]}),("orchestrator"===f.role?f.worker_ids.length>0:aN(f.id).length>0)&&(0,d.jsx)("span",{className:"ltag",title:"orchestrator"===f.role?a("colony.delegatesTo",{count:f.worker_ids.length}):a("colony.connectedTo",{names:aN(f.id).map(a=>a.name).join(", ")}),children:"orchestrator"===f.role?`↓ ${f.worker_ids.length}`:`↑ ${1===aN(f.id).length?aN(f.id)[0].name:aN(f.id).length}`})]},f.id):(0,d.jsxs)("button",{className:"cell ghost",style:g,onClick:()=>X({colonyId:b.colony?.id}),"aria-label":b.colony?a("colony.addTo",{name:b.colony.name}):a("colony.addAgent"),children:[(0,d.jsx)("svg",{className:"ghost-hex",viewBox:"0 0 100 115",preserveAspectRatio:"none","aria-hidden":!0,children:(0,d.jsx)("polygon",{points:"50,2 98,29 98,86 50,113 2,86 2,29"})}),(0,d.jsxs)("span",{className:"label",children:[(0,d.jsx)(h.A,{size:18}),a("colony.addAgent")]})]},b.key+"g"+e)})]},b.key+"l")),(0,d.jsxs)("svg",{className:"links top",width:ar,height:as,"aria-hidden":!0,children:[aL.filter(a=>!!aK&&(a.from===aK||a.to===aK)).map(a=>{let c=aA.get(a.from),e=aA.get(a.to);if(!c||!e)return null;let f=e.x-c.x,g=e.y-c.y,h=Math.hypot(f,g)||1,i=f/h,j=g/h,k=c.x+45.88*i,l=c.y+45.88*j,m=e.x-45.88*i,n=e.y-45.88*j,o=b.find(b=>b.id===a.to)?.status==="running",p=!!aK&&(a.from===aK||a.to===aK),q=!!aK&&!p;return(0,d.jsxs)("g",{opacity:q?.18:1,children:[(0,d.jsx)("line",{x1:k,y1:l,x2:m,y2:n,stroke:"var(--surface)",strokeWidth:p?8:5,strokeLinecap:"round",opacity:.85}),(0,d.jsx)("line",{x1:k,y1:l,x2:m,y2:n,stroke:"var(--honey)",strokeWidth:p?3.5:2.2,strokeDasharray:o?"7 6":p?void 0:"1 6",strokeLinecap:"round",children:o&&(0,d.jsx)("animate",{attributeName:"stroke-dashoffset",from:"26",to:"0",dur:"0.8s",repeatCount:"indefinite"})}),(0,d.jsx)("circle",{cx:m,cy:n,r:p?5.5:4,fill:"var(--honey)",stroke:"var(--surface)",strokeWidth:2})]},a.from+a.to)}),[...aB.map(a=>({...a,kind:"cluster"})),...aC.map(a=>({...a,kind:"manager"}))].filter(a=>!!aK&&(a.from===aK||a.to===aK)).map(a=>{let b=aA.get(a.from),c=aA.get(a.to);if(!b||!c)return null;let e=c.x-b.x,f=c.y-b.y,g=Math.hypot(e,f)||1,h=e/g,i=f/g,j="cluster"===a.kind?v.Ng:"var(--link-manager)";return(0,d.jsxs)("g",{children:[(0,d.jsx)("line",{x1:b.x+45.88*h,y1:b.y+45.88*i,x2:c.x-45.88*h,y2:c.y-45.88*i,stroke:"var(--surface)",strokeWidth:8,strokeLinecap:"round",opacity:.9}),(0,d.jsx)("line",{x1:b.x+45.88*h,y1:b.y+45.88*i,x2:c.x-45.88*h,y2:c.y-45.88*i,stroke:j,strokeWidth:3,strokeDasharray:"cluster"===a.kind?"3 5":"8 5",strokeLinecap:"round"}),(0,d.jsx)("circle",{cx:c.x-45.88*h,cy:c.y-45.88*i,r:5,fill:j,stroke:"var(--surface)",strokeWidth:2})]},a.kind+a.from+a.to)})]})]})}):B?(0,d.jsx)("div",{className:"comb-skel",children:(0,d.jsx)(w.lZ,{kind:"err",children:(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("span",{className:"grow",children:[a("cx.loadFailed")," ",B]}),(0,d.jsx)("button",{className:"btn sm",onClick:()=>void D(),children:a("cx.retry")})]})})}):(0,d.jsxs)("div",{className:"comb-skel",role:"status","aria-label":a("cx.loading"),children:[(0,d.jsx)("div",{className:"skel",style:{width:220,height:190}}),(0,d.jsxs)("div",{className:"row gap-l",children:[(0,d.jsx)("div",{className:"skel",style:{width:150,height:130}}),(0,d.jsx)("div",{className:"skel",style:{width:150,height:130}})]})]}),(0,d.jsxs)("div",{className:"comb-zoom",role:"group","aria-label":a("colony.zoom"),children:[Object.keys(ac).length>0&&(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>ad({}),title:a("colony.layout.reset"),"aria-label":a("colony.layout.reset"),children:(0,d.jsx)(l.A,{size:14})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(ai/1.2),disabled:ai<=.4,title:a("colony.zoom.out"),"aria-label":a("colony.zoom.out"),children:(0,d.jsx)(m.A,{size:14})}),(0,d.jsxs)("button",{className:"btn ghost sm zoom-pct",onClick:()=>aj(1),title:a("colony.zoom.fit"),"aria-label":a("colony.zoom.fit"),children:[Math.round(100*ai),"%"]}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(1.2*ai),disabled:ai>=2.5,title:a("colony.zoom.in"),"aria-label":a("colony.zoom.in"),children:(0,d.jsx)(h.A,{size:14})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>aj(1),title:a("colony.zoom.fit"),"aria-label":a("colony.zoom.fit"),children:(0,d.jsx)(n.A,{size:14})})]}),(0,d.jsxs)("div",{className:"comb-legend",children:[Object.keys(v.xq).map(a=>(0,d.jsxs)("span",{className:"pbadge",style:{"--c":v.xq[a].color},children:[(0,d.jsx)("i",{}),v.xq[a].short]},a)),(0,d.jsxs)("span",{className:"pbadge",style:{"--c":"var(--honey)"},children:[(0,d.jsx)("i",{}),a("role.orchestrator")]})]})]}),aH?(0,d.jsx)(N.wl,{object:aH,target:aI,onClose:()=>I(null),onCreateManager:()=>X({colonyId:aH.colony_id??void 0,manager:!0,objectId:aH.id})},aH.id):aG?(0,d.jsxs)(M.rs,{target:aI,pinned:!0,width:340,label:aG.name,onClose:()=>I(null),children:[(0,d.jsxs)("div",{className:"ap-corner row gap-s",children:[(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>_(aG.id),"aria-label":a("colony.settingsFor",{name:aG.name}),title:a("colony.agentSettings"),children:(0,d.jsx)(o.A,{size:16})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:()=>I(null),"aria-label":a("common.close"),title:`${a("common.close")} (Esc)`,children:(0,d.jsx)(p.A,{size:16})})]}),(0,d.jsx)(M.kh,{agent:aG,hideColony:!0}),(0,d.jsxs)("div",{className:"field ap-pin-field",children:[(0,d.jsx)("label",{children:a("form.colony")}),(0,d.jsxs)("select",{className:"select",value:aU?.id??"",onChange:a=>void aV(aG,a.target.value),children:[(0,d.jsx)("option",{value:"",children:a("common.noColony")}),c.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})]}),(0,d.jsxs)("div",{className:"row ap-pin-actions",children:[(0,d.jsxs)(f(),{className:"btn primary grow",href:`/agents/${aG.id}`,children:[a("colony.openChat")," ",(0,d.jsx)(q,{size:16})]}),(0,d.jsx)("button",{className:"btn danger icon",onClick:()=>aF(aG.id),"aria-label":a("agent.delete"),title:a("agent.delete"),children:(0,d.jsx)(r.A,{size:16})})]})]},aG.id):null]}),(0,d.jsxs)("div",{className:"card card-pad recent",id:"recent",children:[(0,d.jsx)("div",{className:"eyebrow recent-head",children:a("colony.recent")}),0===z.length?(0,d.jsx)("p",{className:"muted small m0",children:a("colony.recentEmpty")}):(0,d.jsx)("div",{className:"recent-grid",children:z.slice(0,6).map(c=>(0,d.jsxs)("div",{className:"feed-item",children:[(0,d.jsx)("i",{className:`dot ${"running"===c.status?"run":"done"===c.status?"ok":"err"}`}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"feed-line",children:[b.some(a=>a.id===c.from_id)?(0,d.jsx)(f(),{href:`/agents/${c.from_id}`,"aria-label":a("cx.openAgent",{name:aR(c.from_id)}),children:aR(c.from_id)}):(0,d.jsx)("b",{children:aR(c.from_id)})," → ",b.some(a=>a.id===c.to_id)?(0,d.jsx)(f(),{href:`/agents/${c.to_id}`,"aria-label":a("cx.openAgent",{name:aR(c.to_id)}),children:aR(c.to_id)}):(0,d.jsx)("b",{children:aR(c.to_id)})]}),(0,d.jsx)("div",{className:"muted small ellipsis",children:c.task}),(0,d.jsx)("div",{className:"muted feed-when",children:(0,v.KN)(c.created_at)})]})]},c.id))})]}),aE&&b.find(a=>a.id===aE)&&(0,d.jsx)(K.G,{agent:b.find(a=>a.id===aE),onClose:()=>aF(null),onDeleted:()=>I(null)}),W&&(0,d.jsx)(y.b,{presetColonyId:W.colonyId,presetObjectId:W.objectId,manager:W.manager,onClose:()=>X(null),onCreated:a=>I(a)}),$&&b.find(a=>a.id===$)&&(0,d.jsx)(J,{agent:b.find(a=>a.id===$),onClose:()=>_(null)},$),aa&&(0,d.jsx)(O.X,{presetColonyId:aa.colonyId,onClose:()=>ab(null),onSaved:a=>I(a)}),Y&&(0,d.jsx)(F,{colony:"new"===Y?void 0:Y,onClose:()=>Z(null)})]})}},85605:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]])},85635:(a,b,c)=>{Promise.resolve().then(c.bind(c,10230))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93674:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(55322),e=c(17027),f=c(34410),g=c(81963),h=c(15964),i=c(66390),j=c(60570),k=c(13520),l=c(7371),m=c(93884);function n(a,b={}){let{t:c}=(0,m.s9)(),{agents:o,colonies:p,objects:q,refresh:r}=(0,j.q5)(),s=(0,g.dj)(),t=(0,e.useMemo)(()=>a?q.filter(b=>b.manager_id===a.id).map(a=>a.id).sort():[],[q,a?.id]),u=(0,e.useMemo)(()=>a?JSON.stringify((0,h.TN)(a,t)):"",[a,t]),[v,w]=(0,e.useState)(()=>a?(0,h.TN)(a,t):null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(!1),B=v&&a?(0,h.tf)(v,o,a.id,p):{},C=!!v&&JSON.stringify(v)!==u;(0,k.h)(C);let D=async()=>{if(v&&a){if(Object.keys(B).length)return void s(c("edit.fixFields"),"err");y(!0);try{let{type_id:d,object_ids:e,...f}=v;await l.FH.patch(`/agents/${a.id}`,f),JSON.stringify([...e].sort())!==JSON.stringify(t)&&await l.FH.put(`/agents/${a.id}/resources`,{object_ids:e}),await r(["agents","colonies","objects"]),s(c("edit.saved",{name:v.name.trim()})),b.onSaved?.()}catch(a){s(a instanceof Error?a.message:c("edit.saveFailed"),"err")}y(!1)}},E=()=>{a&&w((0,h.TN)(a,t))};return{draft:v,setDraft:w,errors:B,dirty:C,saving:x,save:D,discard:E,actions:(a={})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{className:`btn danger push-r ${a.size??""}`,onClick:()=>A(!0),children:[(0,d.jsx)(f.A,{size:a.size?14:15}),c("agent.delete")]}),a.onCancel?(0,d.jsx)("button",{className:`btn ghost ${a.size??""}`,onClick:a.onCancel,children:c("common.cancel")}):(0,d.jsx)("button",{className:`btn ghost ${a.size??""}`,disabled:!C,onClick:E,children:c("common.discard")}),(0,d.jsx)("button",{className:`btn primary ${a.size??""}`,disabled:!C||x,onClick:D,children:x?c("common.saving"):c("common.saveChanges")})]}),deleteModal:z&&a?(0,d.jsx)(i.G,{agent:a,onClose:()=>A(!1),onDeleted:b.onDeleted}):null}}},96107:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},96489:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(51537).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[691,790,335,451,274,143,716,306],()=>b(b.s=1417));module.exports=c})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/hash.js/sha256/256.js","../../../../../../node_modules/next/dist/compiled/hash.js/sha256/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/route-cache-key.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js","../../../../../../node_modules/next/dist/server/normalizers/normalizers.js","../../../../../../node_modules/next/dist/server/normalizers/underscore-normalizer.js","../../../../../../node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/route-kind.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/page-path/normalize-page-path.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/index.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/dist/shared/lib/utils.js","../../../../../../node_modules/next/package.json","../../package.json","../chunks/143.js","../chunks/274.js","../chunks/306.js","../chunks/335.js","../chunks/423.js","../chunks/555.js","../chunks/691.js","../chunks/692.js","../chunks/716.js","../chunks/790.js","../chunks/919.js","../webpack-runtime.js","page_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/hash.js/sha256/256.js","../../../../../../node_modules/next/dist/compiled/hash.js/sha256/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/route-cache-key.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js","../../../../../../node_modules/next/dist/server/normalizers/normalizers.js","../../../../../../node_modules/next/dist/server/normalizers/underscore-normalizer.js","../../../../../../node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/route-kind.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/page-path/normalize-page-path.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/index.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/dist/shared/lib/utils.js","../../../../../../node_modules/next/package.json","../../package.json","../chunks/143.js","../chunks/274.js","../chunks/306.js","../chunks/335.js","../chunks/423.js","../chunks/451.js","../chunks/691.js","../chunks/692.js","../chunks/716.js","../chunks/790.js","../chunks/919.js","../webpack-runtime.js","page_client-reference-manifest.js"]}