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
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[291],{5372:(e,t,n)=>{n.d(t,{kh:()=>h,rs:()=>v,z6:()=>u});var l=n(94799),r=n(34023),i=n(56742),s=n(48538),o=n(69654),c=n(47890),a=n(72942),d=n(86606);function u(){let[e,t]=(0,r.useState)(null),n=(0,r.useRef)(void 0),s=(0,r.useRef)(!1);s.current=!!e;let o=(0,r.useCallback)((e,l,r)=>{clearTimeout(n.current);let i=()=>t({id:e,rect:l.getBoundingClientRect()});r||s.current?i():n.current=setTimeout(i,280)},[]),c=(0,r.useCallback)(()=>{clearTimeout(n.current),t(null)},[]);return(0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&c()};return window.addEventListener("keydown",t),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("keydown",t),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,c]),(0,r.useEffect)(()=>()=>clearTimeout(n.current),[]),{bind:(0,r.useCallback)(e=>({onMouseEnter:t=>o(e,t.currentTarget,!1),onMouseLeave:c,onFocus:t=>{t.currentTarget.matches(":focus-visible")&&o(e,t.currentTarget,!0)},onBlur:c,onClick:c}),[o,c]),node:e&&"undefined"!=typeof document?(0,i.createPortal)((0,l.jsx)(f,{anchor:e}),document.body):null}}function m(e){let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"ap-row",children:[(0,l.jsx)("dt",{children:t}),(0,l.jsx)("dd",{children:n})]})}function h(e){let{agent:t,hideColony:n=!1}=e,{t:r}=(0,o.s9)(),i=(0,s.Tu)(e=>e.agents),u=(0,s.Tu)(e=>e.colonies).find(e=>e.id===t.colony_id),h=(0,a.E)((0,s.M_)(t.id)),v=t.worker_ids.map(e=>{var t;return null==(t=i.find(t=>t.id===e))?void 0:t.name}).filter(Boolean),f=i.filter(e=>"orchestrator"===e.role&&e.worker_ids.includes(t.id)).map(e=>e.name),p=e=>e.length>4?"".concat(e.slice(0,4).join(", ")," ").concat(r("hover.more",{count:e.length-4})):e.join(", ");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"ap-head",children:[(0,l.jsx)(d._h,{agent:t}),(0,l.jsxs)("div",{className:"grow",children:[(0,l.jsx)("b",{className:"ap-name",children:t.name}),(0,l.jsxs)("div",{className:"row gap-s wrap mt-s",children:[(0,l.jsx)(d.PW,{role:t.role}),(0,l.jsx)(d.P5,{status:t.status})]})]})]}),(0,l.jsx)("p",{className:"ap-desc ".concat(t.description?"":"muted"),children:t.description||r("switcher.noDescription")}),h&&(0,l.jsxs)("div",{className:"ap-now",children:[(0,l.jsx)("i",{className:"dot run"}),h]}),(0,l.jsxs)("dl",{className:"ap-rows",children:[(0,l.jsxs)(m,{label:r("form.provider"),children:[c.xq[t.provider].label,t.model?" \xb7 ".concat(t.model):" \xb7 ".concat(r("model.cliDefault"))]}),(0,l.jsx)(m,{label:r("inherit.permissions"),children:(0,c.Ck)(t.effective.permission)}),(0,l.jsxs)(m,{label:r("colony.folder"),children:[(0,l.jsx)("span",{className:"mono",children:(0,c._1)(t.effective.cwd)}),t.effective.inherited.includes("cwd")&&(0,l.jsxs)("span",{className:"muted",children:[" \xb7 ",r("colony.fromColony")]})]}),!n&&(0,l.jsx)(m,{label:r("form.colony"),children:u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("i",{className:"cdot",style:{background:u.color||"var(--honey)"}}),u.name]}):(0,l.jsx)("span",{className:"muted",children:r("common.noColony")})}),"orchestrator"===t.role?(0,l.jsx)(m,{label:r("form.team"),children:v.length?p(v):(0,l.jsx)("span",{className:"muted",children:r("colony.noWorkers")})}):(0,l.jsx)(m,{label:r("rel.directedBy"),children:f.length?p(f):(0,l.jsx)("span",{className:"muted",children:r("hover.noOrchestrator")})}),(0,l.jsx)(m,{label:r("colony.session"),children:(0,l.jsx)("span",{className:"mono",children:t.session_id?"".concat(t.session_id.slice(0,12),"…"):r("colony.noSession")})}),(0,l.jsxs)(m,{label:r("agents.col.updated"),children:[(0,c.KN)(t.updated_at),!!t.queued&&t.queued>0&&(0,l.jsxs)("span",{className:"muted",children:[" \xb7 ",r("queue.count",{count:t.queued})]})]})]})]})}function v(e){var t,n,s;let{target:o,width:c=310,pinned:a=!1,onClose:d,children:u,label:m}=e,h=(0,r.useRef)(null),[v,f]=(0,r.useState)(null),p=(0,r.useCallback)(()=>{var e,t;if(!o)return;let n=null!=(t=null==(e=h.current)?void 0:e.offsetHeight)?t:0,l=o instanceof DOMRect?o:o.getBoundingClientRect(),r=l.right+12+c+8<=window.innerWidth?"right":"left",i="right"===r?l.right+12:Math.max(8,l.left-12-c),s=Math.min(Math.max(8,l.top+l.height/2-n/2),Math.max(8,window.innerHeight-n-8));f(e=>e&&e.left===i&&e.top===s&&e.side===r?e:{left:i,top:s,side:r})},[o,c]);return((0,r.useLayoutEffect)(p),(0,r.useEffect)(()=>{if(!a)return;window.addEventListener("scroll",p,!0),window.addEventListener("resize",p);let e="undefined"!=typeof ResizeObserver&&h.current?new ResizeObserver(p):null;e&&h.current&&e.observe(h.current);let t=e=>{var t;let n=e.target;(null==(t=h.current)?void 0:t.contains(n))||n.closest('.cell, [role="dialog"], .modal, .drawer, .scrim, .menu-pop')||null==d||d()};return document.addEventListener("pointerdown",t),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p),null==e||e.disconnect(),document.removeEventListener("pointerdown",t)}},[a,p,d]),o&&"undefined"!=typeof document)?(0,i.createPortal)((0,l.jsx)("div",{ref:h,className:"ap-card ".concat(a?"pinned":""," ").concat(null!=(t=null==v?void 0:v.side)?t:"right"),role:a?"complementary":"tooltip","aria-label":m,style:{left:null!=(n=null==v?void 0:v.left)?n:-9999,top:null!=(s=null==v?void 0:v.top)?s:-9999,width:c,visibility:v?"visible":"hidden"},children:u}),document.body):null}function f(e){let{anchor:t}=e,n=(0,s.fJ)(t.id);return n?(0,l.jsx)(v,{target:t.rect,children:(0,l.jsx)(h,{agent:n})}):null}},20422:(e,t,n)=>{n.d(t,{N:()=>o});var l=n(94799),r=n(70283),i=n(42162),s=n(69654);function o(e){let{spec:t,label:n,title:o}=e,{t:c}=(0,s.s9)(),a=(0,i.n)();return(0,l.jsxs)("button",{className:"btn sm",onClick:()=>void a.openTerminal(t),title:o,children:[(0,l.jsx)(r.A,{size:14}),null!=n?n:c("dock.nav")]})}},42162:(e,t,n)=>{n.d(t,{$:()=>u,n:()=>c});var l=n(94799),r=n(34023),i=n(3749),s=n(69654);let o=(0,r.createContext)(null),c=()=>{let e=(0,r.useContext)(o);if(!e)throw Error("DockProvider missing");return e},a="hive-am.dock",d=e=>Math.max(140,Math.min(e,Math.round(.8*window.innerHeight)));function u(e){let{children:t}=e,{t:n}=(0,s.s9)(),[c,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(320),[v,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(null),[w,y]=(0,r.useState)(!0),[k,x]=(0,r.useState)(""),j=(0,r.useRef)(!1);(0,r.useEffect)(()=>{try{var e;let t=JSON.parse(null!=(e=localStorage.getItem(a))?e:"{}");"number"==typeof t.height&&h(d(t.height)),t.open&&u(!0),"string"==typeof t.active&&g(t.active)}catch(e){}i.FH.get("/terminals").then(e=>{y(e.enabled),f(t=>[...e.terminals.map(e=>({key:"t:".concat(e.id),kind:"term",id:e.id,title:e.title,cwd:e.cwd,ended:e.alive?void 0:e.exitCode})),...t.filter(e=>"logs"===e.kind)]),g(t=>t&&e.terminals.some(e=>"t:".concat(e.id)===t)?t:e.terminals[0]?"t:".concat(e.terminals[0].id):t)}).catch(()=>void 0).finally(()=>{j.current=!0})},[]),(0,r.useEffect)(()=>{if(j.current)try{localStorage.setItem(a,JSON.stringify({open:c,height:m,active:p}))}catch(e){}},[c,m,p]),(0,r.useEffect)(()=>{document.documentElement.style.setProperty("--app-h",c?"calc(100vh - ".concat(m,"px)"):"100vh")},[c,m]);let b=(0,r.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x("");try{let t=await i.FH.post("/terminals",e),n={key:"t:".concat(t.id),kind:"term",id:t.id,title:t.title,cwd:t.cwd};f(e=>[...e,n]),g(n.key),u(!0)}catch(e){x(e instanceof Error?e.message:n("dock.failed")),u(!0)}},[n]),E=(0,r.useCallback)((e,t)=>{let n="l:".concat(e);f(l=>l.some(e=>e.key===n)?l:[...l,{key:n,kind:"logs",objectId:e,title:t}]),g(n),u(!0)},[]),N=(0,r.useCallback)(e=>{f(t=>{let n=t.find(t=>t.key===e);(null==n?void 0:n.kind)==="term"&&i.FH.del("/terminals/".concat(n.id)).catch(()=>void 0);let l=t.filter(t=>t.key!==e);return g(t=>{var n,r;return t===e?null!=(r=null==(n=l[l.length-1])?void 0:n.key)?r:null:t}),l})},[]),C=(0,r.useCallback)((e,t)=>f(n=>n.map(n=>n.key===e&&"term"===n.kind?{...n,ended:null!=t?t:0}:n)),[]),L=(0,r.useCallback)(()=>{if(c)return void u(!1);u(!0),!v.length&&w&&b()},[c,v.length,w,b]);(0,r.useEffect)(()=>{let e=e=>{!e.ctrlKey||e.altKey||e.metaKey||"`"!==e.key&&"Backquote"!==e.code||(e.preventDefault(),e.stopPropagation(),L())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[L]);let T=(0,r.useMemo)(()=>({open:c,height:m,tabs:v,active:p,enabled:w,error:k,toggle:L,setOpen:u,setHeight:e=>h(d(e)),setActive:g,openTerminal:b,openLogs:E,closeTab:N,markEnded:C}),[c,m,v,p,w,k,L,b,E,N,C]);return(0,l.jsx)(o.Provider,{value:T,children:t})}},72942:(e,t,n)=>{n.d(t,{E:()=>i});var l=n(68419),r=n(10969);function i(e){if(!e)return null;let t=e.blocks[e.blocks.length-1],n="dispatch"===e.source?(0,l.Tl)("activity.delegated"):"";if(!t)return"".concat(n).concat((0,l.Tl)("activity.starting"));if("tool"===t.type){let e=(0,r.q0)(t),i="".concat(e.label).concat(e.summary?" ".concat(e.summary):"");return"".concat(n).concat(void 0===t.output?(0,l.Tl)("activity.running",{tool:i}):(0,l.Tl)("activity.ran",{tool:i}))}return"".concat(n).concat("thinking"===t.type?(0,l.Tl)("activity.thinking"):(0,l.Tl)("activity.writing"))}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[291],{5372:(e,t,n)=>{n.d(t,{kh:()=>h,rs:()=>v,z6:()=>u});var l=n(94799),r=n(34023),i=n(56742),s=n(48538),o=n(69654),c=n(47890),a=n(72942),d=n(10804);function u(){let[e,t]=(0,r.useState)(null),n=(0,r.useRef)(void 0),s=(0,r.useRef)(!1);s.current=!!e;let o=(0,r.useCallback)((e,l,r)=>{clearTimeout(n.current);let i=()=>t({id:e,rect:l.getBoundingClientRect()});r||s.current?i():n.current=setTimeout(i,280)},[]),c=(0,r.useCallback)(()=>{clearTimeout(n.current),t(null)},[]);return(0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&c()};return window.addEventListener("keydown",t),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("keydown",t),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,c]),(0,r.useEffect)(()=>()=>clearTimeout(n.current),[]),{bind:(0,r.useCallback)(e=>({onMouseEnter:t=>o(e,t.currentTarget,!1),onMouseLeave:c,onFocus:t=>{t.currentTarget.matches(":focus-visible")&&o(e,t.currentTarget,!0)},onBlur:c,onClick:c}),[o,c]),node:e&&"undefined"!=typeof document?(0,i.createPortal)((0,l.jsx)(f,{anchor:e}),document.body):null}}function m(e){let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"ap-row",children:[(0,l.jsx)("dt",{children:t}),(0,l.jsx)("dd",{children:n})]})}function h(e){let{agent:t,hideColony:n=!1}=e,{t:r}=(0,o.s9)(),i=(0,s.Tu)(e=>e.agents),u=(0,s.Tu)(e=>e.colonies).find(e=>e.id===t.colony_id),h=(0,a.E)((0,s.M_)(t.id)),v=t.worker_ids.map(e=>{var t;return null==(t=i.find(t=>t.id===e))?void 0:t.name}).filter(Boolean),f=i.filter(e=>"orchestrator"===e.role&&e.worker_ids.includes(t.id)).map(e=>e.name),p=e=>e.length>4?"".concat(e.slice(0,4).join(", ")," ").concat(r("hover.more",{count:e.length-4})):e.join(", ");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"ap-head",children:[(0,l.jsx)(d._h,{agent:t}),(0,l.jsxs)("div",{className:"grow",children:[(0,l.jsx)("b",{className:"ap-name",children:t.name}),(0,l.jsxs)("div",{className:"row gap-s wrap mt-s",children:[(0,l.jsx)(d.PW,{role:t.role}),(0,l.jsx)(d.P5,{status:t.status})]})]})]}),(0,l.jsx)("p",{className:"ap-desc ".concat(t.description?"":"muted"),children:t.description||r("switcher.noDescription")}),h&&(0,l.jsxs)("div",{className:"ap-now",children:[(0,l.jsx)("i",{className:"dot run"}),h]}),(0,l.jsxs)("dl",{className:"ap-rows",children:[(0,l.jsxs)(m,{label:r("form.provider"),children:[c.xq[t.provider].label,t.model?" \xb7 ".concat(t.model):" \xb7 ".concat(r("model.cliDefault"))]}),(0,l.jsx)(m,{label:r("inherit.permissions"),children:(0,c.Ck)(t.effective.permission)}),(0,l.jsxs)(m,{label:r("colony.folder"),children:[(0,l.jsx)("span",{className:"mono",children:(0,c._1)(t.effective.cwd)}),t.effective.inherited.includes("cwd")&&(0,l.jsxs)("span",{className:"muted",children:[" \xb7 ",r("colony.fromColony")]})]}),!n&&(0,l.jsx)(m,{label:r("form.colony"),children:u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("i",{className:"cdot",style:{background:u.color||"var(--honey)"}}),u.name]}):(0,l.jsx)("span",{className:"muted",children:r("common.noColony")})}),"orchestrator"===t.role?(0,l.jsx)(m,{label:r("form.team"),children:v.length?p(v):(0,l.jsx)("span",{className:"muted",children:r("colony.noWorkers")})}):(0,l.jsx)(m,{label:r("rel.directedBy"),children:f.length?p(f):(0,l.jsx)("span",{className:"muted",children:r("hover.noOrchestrator")})}),(0,l.jsx)(m,{label:r("colony.session"),children:(0,l.jsx)("span",{className:"mono",children:t.session_id?"".concat(t.session_id.slice(0,12),"…"):r("colony.noSession")})}),(0,l.jsxs)(m,{label:r("agents.col.updated"),children:[(0,c.KN)(t.updated_at),!!t.queued&&t.queued>0&&(0,l.jsxs)("span",{className:"muted",children:[" \xb7 ",r("queue.count",{count:t.queued})]})]})]})]})}function v(e){var t,n,s;let{target:o,width:c=310,pinned:a=!1,onClose:d,children:u,label:m}=e,h=(0,r.useRef)(null),[v,f]=(0,r.useState)(null),p=(0,r.useCallback)(()=>{var e,t;if(!o)return;let n=null!=(t=null==(e=h.current)?void 0:e.offsetHeight)?t:0,l=o instanceof DOMRect?o:o.getBoundingClientRect(),r=l.right+12+c+8<=window.innerWidth?"right":"left",i="right"===r?l.right+12:Math.max(8,l.left-12-c),s=Math.min(Math.max(8,l.top+l.height/2-n/2),Math.max(8,window.innerHeight-n-8));f(e=>e&&e.left===i&&e.top===s&&e.side===r?e:{left:i,top:s,side:r})},[o,c]);return((0,r.useLayoutEffect)(p),(0,r.useEffect)(()=>{if(!a)return;window.addEventListener("scroll",p,!0),window.addEventListener("resize",p);let e="undefined"!=typeof ResizeObserver&&h.current?new ResizeObserver(p):null;e&&h.current&&e.observe(h.current);let t=e=>{var t;let n=e.target;(null==(t=h.current)?void 0:t.contains(n))||n.closest('.cell, [role="dialog"], .modal, .drawer, .scrim, .menu-pop')||null==d||d()};return document.addEventListener("pointerdown",t),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p),null==e||e.disconnect(),document.removeEventListener("pointerdown",t)}},[a,p,d]),o&&"undefined"!=typeof document)?(0,i.createPortal)((0,l.jsx)("div",{ref:h,className:"ap-card ".concat(a?"pinned":""," ").concat(null!=(t=null==v?void 0:v.side)?t:"right"),role:a?"complementary":"tooltip","aria-label":m,style:{left:null!=(n=null==v?void 0:v.left)?n:-9999,top:null!=(s=null==v?void 0:v.top)?s:-9999,width:c,visibility:v?"visible":"hidden"},children:u}),document.body):null}function f(e){let{anchor:t}=e,n=(0,s.fJ)(t.id);return n?(0,l.jsx)(v,{target:t.rect,children:(0,l.jsx)(h,{agent:n})}):null}},20422:(e,t,n)=>{n.d(t,{N:()=>o});var l=n(94799),r=n(70283),i=n(42162),s=n(69654);function o(e){let{spec:t,label:n,title:o}=e,{t:c}=(0,s.s9)(),a=(0,i.n)();return(0,l.jsxs)("button",{className:"btn sm",onClick:()=>void a.openTerminal(t),title:o,children:[(0,l.jsx)(r.A,{size:14}),null!=n?n:c("dock.nav")]})}},42162:(e,t,n)=>{n.d(t,{$:()=>u,n:()=>c});var l=n(94799),r=n(34023),i=n(3749),s=n(69654);let o=(0,r.createContext)(null),c=()=>{let e=(0,r.useContext)(o);if(!e)throw Error("DockProvider missing");return e},a="hive-am.dock",d=e=>Math.max(140,Math.min(e,Math.round(.8*window.innerHeight)));function u(e){let{children:t}=e,{t:n}=(0,s.s9)(),[c,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(320),[v,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(null),[w,y]=(0,r.useState)(!0),[k,x]=(0,r.useState)(""),j=(0,r.useRef)(!1);(0,r.useEffect)(()=>{try{var e;let t=JSON.parse(null!=(e=localStorage.getItem(a))?e:"{}");"number"==typeof t.height&&h(d(t.height)),t.open&&u(!0),"string"==typeof t.active&&g(t.active)}catch(e){}i.FH.get("/terminals").then(e=>{y(e.enabled),f(t=>[...e.terminals.map(e=>({key:"t:".concat(e.id),kind:"term",id:e.id,title:e.title,cwd:e.cwd,ended:e.alive?void 0:e.exitCode})),...t.filter(e=>"logs"===e.kind)]),g(t=>t&&e.terminals.some(e=>"t:".concat(e.id)===t)?t:e.terminals[0]?"t:".concat(e.terminals[0].id):t)}).catch(()=>void 0).finally(()=>{j.current=!0})},[]),(0,r.useEffect)(()=>{if(j.current)try{localStorage.setItem(a,JSON.stringify({open:c,height:m,active:p}))}catch(e){}},[c,m,p]),(0,r.useEffect)(()=>{document.documentElement.style.setProperty("--app-h",c?"calc(100vh - ".concat(m,"px)"):"100vh")},[c,m]);let b=(0,r.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x("");try{let t=await i.FH.post("/terminals",e),n={key:"t:".concat(t.id),kind:"term",id:t.id,title:t.title,cwd:t.cwd};f(e=>[...e,n]),g(n.key),u(!0)}catch(e){x(e instanceof Error?e.message:n("dock.failed")),u(!0)}},[n]),E=(0,r.useCallback)((e,t)=>{let n="l:".concat(e);f(l=>l.some(e=>e.key===n)?l:[...l,{key:n,kind:"logs",objectId:e,title:t}]),g(n),u(!0)},[]),N=(0,r.useCallback)(e=>{f(t=>{let n=t.find(t=>t.key===e);(null==n?void 0:n.kind)==="term"&&i.FH.del("/terminals/".concat(n.id)).catch(()=>void 0);let l=t.filter(t=>t.key!==e);return g(t=>{var n,r;return t===e?null!=(r=null==(n=l[l.length-1])?void 0:n.key)?r:null:t}),l})},[]),C=(0,r.useCallback)((e,t)=>f(n=>n.map(n=>n.key===e&&"term"===n.kind?{...n,ended:null!=t?t:0}:n)),[]),L=(0,r.useCallback)(()=>{if(c)return void u(!1);u(!0),!v.length&&w&&b()},[c,v.length,w,b]);(0,r.useEffect)(()=>{let e=e=>{!e.ctrlKey||e.altKey||e.metaKey||"`"!==e.key&&"Backquote"!==e.code||(e.preventDefault(),e.stopPropagation(),L())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[L]);let T=(0,r.useMemo)(()=>({open:c,height:m,tabs:v,active:p,enabled:w,error:k,toggle:L,setOpen:u,setHeight:e=>h(d(e)),setActive:g,openTerminal:b,openLogs:E,closeTab:N,markEnded:C}),[c,m,v,p,w,k,L,b,E,N,C]);return(0,l.jsx)(o.Provider,{value:T,children:t})}},72942:(e,t,n)=>{n.d(t,{E:()=>i});var l=n(68419),r=n(10969);function i(e){if(!e)return null;let t=e.blocks[e.blocks.length-1],n="dispatch"===e.source?(0,l.Tl)("activity.delegated"):"";if(!t)return"".concat(n).concat((0,l.Tl)("activity.starting"));if("tool"===t.type){let e=(0,r.q0)(t),i="".concat(e.label).concat(e.summary?" ".concat(e.summary):"");return"".concat(n).concat(void 0===t.output?(0,l.Tl)("activity.running",{tool:i}):(0,l.Tl)("activity.ran",{tool:i}))}return"".concat(n).concat("thinking"===t.type?(0,l.Tl)("activity.thinking"):(0,l.Tl)("activity.writing"))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[304],{494:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3492:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]])},4713:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},5503:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]])},19431:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},20555:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])},32219:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},38950:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},52263:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},52687:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},55267:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},55712:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},55838:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]])},62716:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},66477:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},70283:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},71529:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},77841:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},79141:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79278:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},83372:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},84616:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},87454:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},89075:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},90124:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},91833:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},92720:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},92947:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},97356:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},97541:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])},98148:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},98938:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},99579:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[350],{10969:(e,l,t)=>{t.d(l,{Dm:()=>J,Kt:()=>I,Qh:()=>k,WQ:()=>z,q0:()=>F});var s=t(94799),n=t(34023),o=t(72705),r=t(494),a=t(87454),i=t(66477),c=t(4713),d=t(92720),u=t(38950),m=t(97541),p=t(52687),h=t(19431),x=t(90124),j=t(32219),f=t(58311),b=t(84616),y=t(62716),g=t(55267),v=t(5503),w=t(79278),N=t(79141),T=t(56072),_=t(69654);let k=(0,n.createContext)(null),A=e=>e.replace(/^\/home\/[^/]+/,"~");function z(e){let{text:l,label:t,compact:a=!1}=e,{t:i}=(0,_.s9)();null!=t||(t=i("common.copy"));let[c,d]=(0,n.useState)(!1);return(0,s.jsxs)("button",{type:"button",className:"copybtn ".concat(a?"compact":""),"aria-label":t,title:t,onClick:e=>{var t;e.preventDefault(),e.stopPropagation(),null==(t=navigator.clipboard)||t.writeText(l).then(()=>{d(!0),setTimeout(()=>d(!1),1200)}).catch(()=>void 0)},children:[c?(0,s.jsx)(o.A,{size:13}):(0,s.jsx)(r.A,{size:13}),a?null:c?i("common.copied"):t]})}let S=e=>"string"==typeof e?e:null==e?"":JSON.stringify(e),O=function(e){for(var l=arguments.length,t=Array(l>1?l-1:0),s=1;s<l;s++)t[s-1]=arguments[s];for(let l of t)if((null==e?void 0:e[l])!=null&&""!==e[l])return e[l]};function C(e){let{oldText:l,newText:t}=e;return(0,s.jsxs)("div",{className:"diff",children:[l.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"del",children:[(0,s.jsx)("b",{children:"−"}),e]},"o"+l)),t.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"add",children:[(0,s.jsx)("b",{children:"+"}),e]},"n"+l))]})}function W(e){let{rows:l}=e;return(0,s.jsx)("dl",{className:"kv",children:l.filter(e=>{let[,l]=e;return void 0!==l&&""!==l&&null!==l}).map(e=>{let[l,t]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{children:l}),(0,s.jsx)("dd",{children:t})]},l)})})}function F(e){var l,t,n,o,r,N;let k,F=e.input&&"object"==typeof e.input?e.input:{},J=e.name,E=/^mcp__([^_]+(?:_[^_]+)*)__(.+)$/.exec(J),P=(E?E[2]:J).toLowerCase().replace(/[^a-z]/g,""),q="string"==typeof F.code?/tools\.hive\.channel_reply\(\s*\{\s*text\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(q)try{k=JSON.parse(q[1])}catch(e){}if(P.endsWith("channelreply")||void 0!==k){let e=null!=k?k:S(F.text);return{icon:(0,s.jsx)(a.A,{size:14}),label:(0,_.Tl)("tool.channelReply"),summary:e.replace(/\s+/g," ").slice(0,140),body:(0,s.jsx)("pre",{className:"codebox pre-wrap",children:e})}}let I="string"==typeof F.code?/tools\.hive\.skill_read\(\s*\{\s*name\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(P.endsWith("skillread")||I){let e=S(F.name);if(I)try{e=JSON.parse(I[1])}catch(e){}return{icon:(0,s.jsx)(i.A,{size:14}),label:(0,_.Tl)("tool.skillRead"),summary:e,body:null}}let $="string"==typeof F.code?/tools\.hive\.channel_send_file\(\s*\{\s*path\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(P.endsWith("channelsendfile")||$){let e=S(F.path);if($)try{e=JSON.parse($[1])}catch(e){}let l=S(F.caption);return{icon:(0,s.jsx)(c.A,{size:14}),label:(0,_.Tl)("tool.channelSendFile"),summary:e.replace(/^.*[\\/]/,""),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("span",{className:"mono",children:e},"p")],...l?[[(0,_.Tl)("tool.k.caption"),(0,s.jsx)("span",{children:l},"c")]]:[]]})}}let D="string"==typeof F.code?/tools\.hive\.channel_mute\(\s*\{\s*muted\s*:\s*(true|false)/.exec(F.code):null;if(P.endsWith("channelmute")||D){let e=D?"true"===D[1]:!1!==F.muted;return{icon:e?(0,s.jsx)(d.A,{size:14}):(0,s.jsx)(u.A,{size:14}),label:(0,_.Tl)(e?"tool.channelMute":"tool.channelUnmute"),summary:"",body:null}}if((null==E?void 0:E[1])==="hive"&&"dispatch"===E[2])return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,_.Tl)("tool.delegate"),summary:"".concat(S(F.agent),": ").concat(S(F.task).slice(0,90)),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.subagent"),(0,s.jsx)("b",{children:S(F.agent)},"a")],[(0,_.Tl)("tool.k.task"),(0,s.jsx)("span",{className:"pre-wrap",children:S(F.task)},"t")]]})};if((null==E?void 0:E[1])==="hive")return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,_.Tl)("tool.roster"),summary:"",body:null};if(["bash","shell","executebash","execute","run","runcommand","command"].includes(P)||F.command&&P.includes("bash")){let e=S(O(F,"command","cmd","code","script"));return{icon:(0,s.jsx)(p.A,{size:14}),label:(0,_.Tl)("tool.shell"),kind:"shell",command:e,summary:e,body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:(0,_.Tl)("tool.command")}),(0,s.jsx)(z,{text:e,label:(0,_.Tl)("tool.copyCommand")})]}),(0,s.jsxs)("pre",{className:"cmd",children:[(0,s.jsx)("span",{className:"prompt",children:"$"})," ",e]}),F.description&&(0,s.jsx)("p",{className:"hint",style:{margin:"2px 0 0"},children:S(F.description)}),(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.tool"),(0,s.jsx)("code",{children:J},"n")],[(0,_.Tl)("tool.k.workdir"),F.cwd||F.workdir?(0,s.jsx)("code",{children:A(S(null!=(l=F.cwd)?l:F.workdir))},"c"):""],[(0,_.Tl)("tool.k.timeout"),F.timeout?(0,T.nc)(Number(F.timeout)):""],[(0,_.Tl)("tool.k.background"),F.run_in_background?(0,_.Tl)("common.yes"):""]]})]})}}if(["read","fsread","view","cat"].includes(P)){let e=S(O(F,"file_path","filePath","path","file"));return{icon:(0,s.jsx)(h.A,{size:14}),label:(0,_.Tl)("tool.read"),summary:A(e)||S(F.operations?JSON.stringify(F.operations).slice(0,80):""),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,_.Tl)("tool.k.offset"),S(null!=(t=F.offset)?t:"")],[(0,_.Tl)("tool.k.limit"),S(null!=(n=F.limit)?n:"")]]})}}if(["write","fswrite","create","writefile"].includes(P)){let e=S(O(F,"file_path","filePath","path")),l=S(O(F,"content","file_text","text"));return{icon:(0,s.jsx)(x.A,{size:14}),label:(0,_.Tl)("tool.write"),summary:(0,_.Tl)("tool.writeSummary",{path:A(e),count:l.split("\n").length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),(0,s.jsxs)("pre",{className:"codebox",children:[l.slice(0,4e3),l.length>4e3?"\n…":""]})]})}}if(["edit","strreplace","strreplaceeditor","patch","replace"].includes(P)){let e=S(O(F,"file_path","filePath","path"));return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,_.Tl)("tool.edit"),summary:A(e),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,_.Tl)("tool.k.replaceAll"),F.replace_all?(0,_.Tl)("common.yes"):""]]}),(0,s.jsx)(C,{oldText:S(O(F,"old_string","oldString","old_str")),newText:S(O(F,"new_string","newString","new_str"))})]})}}if("multiedit"===P&&Array.isArray(F.edits)){let e=S(F.file_path);return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,_.Tl)("tool.edit"),summary:(0,_.Tl)("tool.editSummary",{path:A(e),count:F.edits.length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),F.edits.map((e,l)=>(0,s.jsx)(C,{oldText:S(e.old_string),newText:S(e.new_string)},l))]})}}if(["grep","glob","search","find","ls","list","codesearch"].includes(P)){let e=S(O(F,"pattern","query","glob","path"));return{icon:(0,s.jsx)(f.A,{size:14}),label:J.charAt(0).toUpperCase()+J.slice(1),summary:e,body:(0,s.jsx)(W,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("code",{children:S(t)},l)]})})}}if(["webfetch","websearch","fetch","browser"].includes(P)){let e=S(O(F,"url","query"));return{icon:(0,s.jsx)(b.A,{size:14}),label:J,summary:e,body:(0,s.jsx)(W,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("span",{className:"pre-wrap",children:S(t)},l)]})})}}if(["task","agent","subagent"].includes(P))return{icon:(0,s.jsx)(y.A,{size:14}),label:(0,_.Tl)("tool.subagent"),summary:S(O(F,"description","subagent_type")),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.type"),S(null!=(o=F.subagent_type)?o:"")],[(0,_.Tl)("tool.k.description"),S(null!=(r=F.description)?r:"")],[(0,_.Tl)("tool.k.prompt"),(0,s.jsx)("span",{className:"pre-wrap",children:S(null!=(N=F.prompt)?N:"").slice(0,1500)},"p")]]})};if("todowrite"===P&&Array.isArray(F.todos)){let e=F.todos.filter(e=>"completed"===e.status).length;return{icon:(0,s.jsx)(g.A,{size:14}),label:(0,_.Tl)("tool.plan"),summary:(0,_.Tl)("tool.planSummary",{done:e,total:F.todos.length}),body:(0,s.jsx)("ul",{className:"todos",children:F.todos.map((e,l)=>(0,s.jsxs)("li",{"data-s":e.status,children:[(0,s.jsx)("i",{}),S(e.content)]},l))})}}if((null==E?void 0:E[1])==="claude-in-chrome"){let e=S(F.action),l=S(O(F,"url","query","text","ref","value"))||(Array.isArray(F.coordinate)?F.coordinate.join(", "):""),t="navigate"===P||"tabscreatemcp"===P||"tabscontextmcp"===P||"tabsclosemcp"===P,n=(0,_.Tl)("navigate"===P?"tool.chrome.navigate":"tabscreatemcp"===P?"tool.chrome.tabNew":"tabsclosemcp"===P?"tool.chrome.tabClose":P.startsWith("tabs")?"tool.chrome.tabs":"computer"===P?"tool.chrome.act":"readpage"===P||"getpagetext"===P?"tool.chrome.read":"find"===P?"tool.chrome.find":"forminput"===P?"tool.chrome.form":"javascripttool"===P?"tool.chrome.js":"tool.chrome.other");return{icon:t?(0,s.jsx)(b.A,{size:14}):(0,s.jsx)(v.A,{size:14}),label:n,summary:["computer"===P||"javascripttool"===P?e.replace(/_/g," "):"",l].filter(Boolean).join(" \xb7 ").slice(0,140),body:Object.keys(F).some(e=>"tabId"!==e)?(0,s.jsx)(W,{rows:Object.entries(F).filter(e=>{let[l]=e;return"tabId"!==l}).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("span",{className:"pre-wrap",children:S(t)},l)]})}):null}}let M=Object.entries(F);return{icon:(0,s.jsx)(w.A,{size:14}),label:E?"".concat(E[1]," \xb7 ").concat(E[2]):J,summary:M.length?S(M[0][1]).slice(0,100):"",body:M.length?(0,s.jsx)("pre",{className:"codebox",children:JSON.stringify(F,null,2)}):null}}function J(e){var l,t,o,r;let{tool:a,streaming:i}=e,{t:c}=(0,_.s9)(),d=F(a),u=void 0!==a.output,m=!u&&!!i,[,p]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(!m)return;let e=setInterval(()=>p(e=>e+1),500);return()=>clearInterval(e)},[m]);let h=null!=(t=a.durationMs)?t:m&&a.startedAt?Date.now()-a.startedAt:void 0,x=null!=(o=a.output)?o:"",j=x?x.split("\n").length:0,f="shell"===d.kind&&u?null==(l=/(?:^|\n)Exit code:?\s*(-?\d+)/i.exec(x))?void 0:l[1]:void 0,b=(0,n.useContext)(k),[y,g]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{null!==b&&g(b)},[b]),(0,s.jsxs)("details",{className:"fold tool ".concat("shell"===d.kind?"is-shell":""," ").concat(a.error?"err":""," ").concat(m?"running":""),open:y,onToggle:e=>g(e.currentTarget.open),children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("span",{className:"tico",children:d.icon}),(0,s.jsx)("b",{className:"tlabel",children:d.label}),(0,s.jsxs)("span",{className:"tsum mono",title:null!=(r=d.command)?r:d.summary,children:["shell"===d.kind&&(0,s.jsx)("span",{className:"prompt",children:"$ "}),d.summary]}),(0,s.jsxs)("span",{className:"tmeta",children:[void 0!==f&&"0"!==f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.exit",{code:f})}),a.error&&void 0===f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.failed")}),u&&!a.error&&j>0&&(0,s.jsx)("span",{children:c("tool.lines",{count:j})}),void 0!==h&&(0,s.jsx)("span",{className:m?"live":"",children:(0,T.nc)(h)}),m&&(0,s.jsx)("i",{className:"dot run"})]}),(0,s.jsx)(N.A,{size:14,className:"chev"})]}),(0,s.jsxs)("div",{className:"tbody",children:[d.body,u&&(0,s.jsxs)("div",{className:"tout",children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:c("tool.output")}),x&&(0,s.jsx)(z,{text:x,label:c("tool.copyOutput")})]}),(0,s.jsx)("pre",{children:x?x.length>12e3?x.slice(0,12e3)+"\n".concat(c("tool.truncated")):x:c("tool.noOutput")})]})]})]})}let E=["write","fswrite","create","writefile"],P=["edit","strreplace","strreplaceeditor","patch","replace","multiedit"],q=e=>"string"==typeof e&&e?e.split("\n").length:0;function I(e){let{blocks:l}=e,{t}=(0,_.s9)(),n=function(e){let l=new Map;for(let i of e){var t,s,n,o,r,a;if("tool"!==i.type||i.error)continue;let e=i.input&&"object"==typeof i.input?i.input:{},c=(null!=(s=null==(t=/^mcp__.+?__(.+)$/.exec(i.name))?void 0:t[1])?s:i.name).toLowerCase().replace(/[^a-z]/g,""),d=E.includes(c);if(!d&&!P.includes(c))continue;let u=S(O(e,"file_path","filePath","path"));if(!u)continue;let m=Array.isArray(e.edits)?e.edits:[e],p=d?q(O(e,"content","file_text","text")):m.reduce((e,l)=>e+q(O(l,"new_string","newString","new_str")),0),h=d?0:m.reduce((e,l)=>e+q(O(l,"old_string","oldString","old_str")),0),x=l.get(u),j=[...null!=(n=null==x?void 0:x.hunks)?n:[]];if(!d)for(let e of m)j.push({old:S(O(e,"old_string","oldString","old_str")),new:S(O(e,"new_string","newString","new_str"))});l.set(u,{path:u,created:null!=(o=null==x?void 0:x.created)&&o||d,added:(null!=(r=null==x?void 0:x.added)?r:0)+p,removed:(null!=(a=null==x?void 0:x.removed)?a:0)+h,hunks:j,content:d?S(O(e,"content","file_text","text")):null==x?void 0:x.content})}return[...l.values()]}(l);return n.length?(0,s.jsxs)("details",{className:"fold changed",open:n.length<=5,children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(j.A,{size:14}),t("chat.changedFiles",{count:n.length}),(0,s.jsx)(N.A,{size:14,className:"chev"})]}),(0,s.jsx)("div",{className:"cf-list",children:n.map(e=>(0,s.jsxs)("details",{className:"cf-file",children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(N.A,{size:12,className:"chev"}),(0,s.jsx)("code",{title:e.path,children:A(e.path)}),(0,s.jsxs)("span",{className:"cf-meta",children:[e.created&&(0,s.jsx)("em",{children:t("chat.fileWritten")}),e.added>0&&(0,s.jsxs)("span",{className:"cf-add",children:["+",e.added]}),e.removed>0&&(0,s.jsxs)("span",{className:"cf-del",children:["−",e.removed]})]})]}),(0,s.jsxs)("div",{className:"cf-body",children:[e.hunks.map((e,l)=>(0,s.jsx)(C,{oldText:e.old,newText:e.new},l)),void 0!==e.content&&0===e.hunks.length&&(0,s.jsxs)("pre",{className:"codebox",children:[e.content.slice(0,6e3),e.content.length>6e3?"\n…":""]})]})]},e.path))})]}):null}}}]);