hive-am 1.4.0 → 1.5.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.
- package/CHANGELOG.md +28 -1
- package/README.md +1 -5
- package/bin/hive-am.mjs +242 -31
- package/bin/run.mjs +135 -0
- package/package.json +1 -1
- package/server/dist/connections/manager.js +15 -3
- package/server/dist/connections/router.js +2 -2
- package/server/dist/connections/secrets.js +8 -0
- package/server/dist/db/migrations.js +68 -0
- package/server/dist/db.js +11 -10
- package/server/dist/efforts.js +105 -0
- package/server/dist/http/routes/agents.js +4 -3
- package/server/dist/http/routes/meta.js +12 -0
- package/server/dist/http/routes/notebook.js +10 -2
- package/server/dist/http/routes/resources.js +3 -0
- package/server/dist/http/routes/types.js +18 -1
- package/server/dist/http/validate.js +5 -2
- package/server/dist/index.js +4 -1
- package/server/dist/instructions.js +10 -2
- package/server/dist/objects/agent-db.js +258 -0
- package/server/dist/objects/database.js +496 -34
- package/server/dist/objects/index.js +16 -8
- package/server/dist/providers/kiro.js +7 -1
- package/server/dist/providers/opencode-server.js +11 -1
- package/server/dist/providers/opencode.js +4 -3
- package/server/dist/providers/spawn.js +38 -4
- package/server/dist/retention.js +50 -0
- package/server/dist/runtime.js +52 -21
- package/server/dist/services/agents.js +53 -1
- package/server/dist/services/notebook.js +7 -3
- package/server/dist/skills/defaults.js +35 -1
- package/server/dist/skills/notebook.js +57 -13
- package/server/mcp/dispatch.mjs +68 -0
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-build-manifest.json +60 -60
- package/web/.next/app-path-routes-manifest.json +7 -7
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +58 -58
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/server/app/agents/[id]/page.js +4 -4
- package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents/page.js +2 -2
- package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents.html +1 -1
- package/web/.next/server/app/agents.rsc +4 -4
- package/web/.next/server/app/chat/page.js +1 -1
- package/web/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/chat.html +1 -1
- package/web/.next/server/app/chat.rsc +4 -4
- package/web/.next/server/app/connections/page.js +1 -1
- package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/connections.html +1 -1
- package/web/.next/server/app/connections.rsc +4 -4
- package/web/.next/server/app/index.html +1 -1
- package/web/.next/server/app/index.rsc +4 -4
- package/web/.next/server/app/page.js +1 -1
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/relations/page.js +1 -1
- package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/relations.html +1 -1
- package/web/.next/server/app/relations.rsc +4 -4
- package/web/.next/server/app/resources/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/resources/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/resources.html +1 -1
- package/web/.next/server/app/resources.rsc +4 -4
- package/web/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/schedules.html +1 -1
- package/web/.next/server/app/schedules.rsc +4 -4
- package/web/.next/server/app/sessions/page.js +1 -1
- package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/sessions.html +1 -1
- package/web/.next/server/app/sessions.rsc +4 -4
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills.html +1 -1
- package/web/.next/server/app/skills.rsc +4 -4
- package/web/.next/server/app/types/page.js +1 -1
- package/web/.next/server/app/types/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/types.html +1 -1
- package/web/.next/server/app/types.rsc +4 -4
- package/web/.next/server/app-paths-manifest.json +7 -7
- package/web/.next/server/chunks/143.js +1 -1
- package/web/.next/server/chunks/213.js +1 -1
- package/web/.next/server/chunks/274.js +1 -1
- package/web/.next/server/chunks/368.js +1 -1
- package/web/.next/server/chunks/403.js +1 -1
- package/web/.next/server/chunks/612.js +1 -1
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/{316-26da9cc233ba7557.js → 107-77dd87cc2ca4f941.js} +1 -1
- package/web/.next/static/chunks/281-30e32d932b8b5a75.js +1 -0
- package/web/.next/static/chunks/517-b3b1c9044d2ef23c.js +1 -0
- package/web/.next/static/chunks/587-5b511f5f93910180.js +1 -0
- package/web/.next/static/chunks/606-14fb5aaa4d0ff22d.js +1 -0
- package/web/.next/static/chunks/656-f3cc78328603241a.js +1 -0
- package/web/.next/static/chunks/{705-f81face97b1bb1af.js → 705-ce86175dea00e6a9.js} +1 -1
- package/web/.next/static/chunks/757-03361e7a97a605a2.js +1 -0
- package/web/.next/static/chunks/app/agents/[id]/page-638e12ba3cb813c3.js +1 -0
- package/web/.next/static/chunks/app/agents/page-9da499db6d22731f.js +1 -0
- package/web/.next/static/chunks/app/chat/{page-5261b12b7d50f5d1.js → page-383bc24e72dab7fa.js} +1 -1
- package/web/.next/static/chunks/app/connections/{page-eb11cfb1ffeab3ca.js → page-06bd2d7d9495126a.js} +1 -1
- package/web/.next/static/chunks/app/page-0062ebc30322b1ae.js +1 -0
- package/web/.next/static/chunks/app/relations/page-02710fe1f8a670a9.js +1 -0
- package/web/.next/static/chunks/app/sessions/page-85638705fdc18174.js +1 -0
- package/web/.next/static/chunks/app/types/page-8e25f503bdcd72ad.js +1 -0
- package/web/.next/static/css/dfcaa19a8d46e60d.css +1 -0
- package/web/.next/trace +30 -30
- package/web/.next/static/chunks/281-113274e705940a55.js +0 -1
- package/web/.next/static/chunks/517-373a80c8ba432bdc.js +0 -1
- package/web/.next/static/chunks/562-7c2e33d838e869bf.js +0 -1
- package/web/.next/static/chunks/587-8e4d2be01ba7d48f.js +0 -1
- package/web/.next/static/chunks/606-c9a19918b02a98d0.js +0 -1
- package/web/.next/static/chunks/656-f537149fe28f79aa.js +0 -1
- package/web/.next/static/chunks/app/agents/[id]/page-6ed6edb3e74b0ebe.js +0 -1
- package/web/.next/static/chunks/app/agents/page-9bb8cba69776c719.js +0 -1
- package/web/.next/static/chunks/app/page-99e0351e6ccaa384.js +0 -1
- package/web/.next/static/chunks/app/relations/page-a44fd515a3b0525e.js +0 -1
- package/web/.next/static/chunks/app/sessions/page-a7534ebd90e982d6.js +0 -1
- package/web/.next/static/chunks/app/types/page-ebd37e220f77c1f3.js +0 -1
- package/web/.next/static/css/582723fcea1f9887.css +0 -1
- /package/web/.next/static/{YT6HM6qmegMJaBMX5QvuP → UDA414PFPu9ZROltNmjbX}/_buildManifest.js +0 -0
- /package/web/.next/static/{YT6HM6qmegMJaBMX5QvuP → UDA414PFPu9ZROltNmjbX}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=368,exports.ids=[368],exports.modules={3936:(a,b,c)=>{c.d(b,{kh:()=>n,rs:()=>o,z6:()=>l});var d=c(55322),e=c(17027),f=c(37322),g=c(60570),h=c(93884),i=c(61162),j=c(54842),k=c(81963);function l(){let[a,b]=(0,e.useState)(null),c=(0,e.useRef)(void 0),g=(0,e.useRef)(!1);g.current=!!a;let h=(0,e.useCallback)((a,d,e)=>{clearTimeout(c.current);let f=()=>b({id:a,rect:d.getBoundingClientRect()});e||g.current?f():c.current=setTimeout(f,280)},[]),i=(0,e.useCallback)(()=>{clearTimeout(c.current),b(null)},[]);return{bind:(0,e.useCallback)(a=>({onMouseEnter:b=>h(a,b.currentTarget,!1),onMouseLeave:i,onFocus:b=>{b.currentTarget.matches(":focus-visible")&&h(a,b.currentTarget,!0)},onBlur:i,onClick:i}),[h,i]),node:a&&"undefined"!=typeof document?(0,f.createPortal)((0,d.jsx)(p,{anchor:a}),document.body):null}}function m({label:a,children:b}){return(0,d.jsxs)("div",{className:"ap-row",children:[(0,d.jsx)("dt",{children:a}),(0,d.jsx)("dd",{children:b})]})}function n({agent:a,hideColony:b=!1}){let{t:c}=(0,h.s9)(),e=(0,g.Tu)(a=>a.agents),f=(0,g.Tu)(a=>a.colonies).find(b=>b.id===a.colony_id),l=(0,j.E)((0,g.M_)(a.id)),n=a.worker_ids.map(a=>e.find(b=>b.id===a)?.name).filter(Boolean),o=e.filter(b=>"orchestrator"===b.role&&b.worker_ids.includes(a.id)).map(a=>a.name),p=a=>a.length>4?`${a.slice(0,4).join(", ")} ${c("hover.more",{count:a.length-4})}`:a.join(", ");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"ap-head",children:[(0,d.jsx)(k._h,{agent:a}),(0,d.jsxs)("div",{className:"grow",children:[(0,d.jsx)("b",{className:"ap-name",children:a.name}),(0,d.jsxs)("div",{className:"row gap-s wrap mt-s",children:[(0,d.jsx)(k.PW,{role:a.role}),(0,d.jsx)(k.P5,{status:a.status})]})]})]}),(0,d.jsx)("p",{className:`ap-desc ${a.description?"":"muted"}`,children:a.description||c("switcher.noDescription")}),l&&(0,d.jsxs)("div",{className:"ap-now",children:[(0,d.jsx)("i",{className:"dot run"}),l]}),(0,d.jsxs)("dl",{className:"ap-rows",children:[(0,d.jsxs)(m,{label:c("form.provider"),children:[i.xq[a.provider].label,a.model?` \xb7 ${a.model}`:` \xb7 ${c("model.cliDefault")}`]}),(0,d.jsx)(m,{label:c("inherit.permissions"),children:(0,i.Ck)(a.effective.permission)}),(0,d.jsxs)(m,{label:c("colony.folder"),children:[(0,d.jsx)("span",{className:"mono",children:(0,i._1)(a.effective.cwd)}),a.effective.inherited.includes("cwd")&&(0,d.jsxs)("span",{className:"muted",children:[" \xb7 ",c("colony.fromColony")]})]}),!b&&(0,d.jsx)(m,{label:c("form.colony"),children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("i",{className:"cdot",style:{background:f.color||"var(--honey)"}}),f.name]}):(0,d.jsx)("span",{className:"muted",children:c("common.noColony")})}),"orchestrator"===a.role?(0,d.jsx)(m,{label:c("form.team"),children:n.length?p(n):(0,d.jsx)("span",{className:"muted",children:c("colony.noWorkers")})}):(0,d.jsx)(m,{label:c("rel.directedBy"),children:o.length?p(o):(0,d.jsx)("span",{className:"muted",children:c("hover.noOrchestrator")})}),(0,d.jsx)(m,{label:c("colony.session"),children:(0,d.jsx)("span",{className:"mono",children:a.session_id?`${a.session_id.slice(0,12)}…`:c("colony.noSession")})}),(0,d.jsxs)(m,{label:c("agents.col.updated"),children:[(0,i.KN)(a.updated_at),!!a.queued&&a.queued>0&&(0,d.jsxs)("span",{className:"muted",children:[" \xb7 ",c("queue.count",{count:a.queued})]})]})]})]})}function o({target:a,width:b=310,pinned:c=!1,onClose:g,children:h,label:i}){let j=(0,e.useRef)(null),[k,l]=(0,e.useState)(null);return((0,e.useCallback)(()=>{if(!a)return;let c=j.current?.offsetHeight??0,d=a instanceof DOMRect?a:a.getBoundingClientRect(),e=d.right+12+b+8<=window.innerWidth?"right":"left",f="right"===e?d.right+12:Math.max(8,d.left-12-b),g=Math.min(Math.max(8,d.top+d.height/2-c/2),Math.max(8,window.innerHeight-c-8));l(a=>a&&a.left===f&&a.top===g&&a.side===e?a:{left:f,top:g,side:e})},[a,b]),a&&"undefined"!=typeof document)?(0,f.createPortal)((0,d.jsx)("div",{ref:j,className:`ap-card ${c?"pinned":""} ${k?.side??"right"}`,role:c?"complementary":"tooltip","aria-label":i,style:{left:k?.left??-9999,top:k?.top??-9999,width:b,visibility:k?"visible":"hidden"},children:h}),document.body):null}function p({anchor:a}){let b=(0,g.fJ)(a.id);return b?(0,d.jsx)(o,{target:a.rect,children:(0,d.jsx)(n,{agent:b})}):null}},36368:(a,b,c)=>{c.d(b,{md:()=>I,wl:()=>K});var d=c(55322),e=c(97984),f=c(17027),g=c(91705),h=c.n(g),i=c(46378),j=c(31251),k=c(96489),l=c(48370),m=c(72836),n=c(6289),o=c(58437),p=c(85605),q=c(32309),r=c(84300),s=c(37811),t=c(78381),u=c(44521),v=c(8811),w=c(3936),x=c(7371),y=c(93884),z=c(61162),A=c(81963),B=c(89477),C=c(60570),D=c(42580),E=c(36143),F=c(93717),G=c(77712);let H={mysql:"MySQL / MariaDB",postgresql:"PostgreSQL",sqlite:"SQLite",mssql:"SQL Server"};function I({status:a,className:b=""}){return(0,d.jsx)("i",{className:`odot ${F.Wy[a]} ${b}`,"aria-hidden":!0})}function J(a){if("server"===a.kind)return a.config.start;if("http"===a.kind)return(0,z._1)(a.config.folder);if("database"===a.kind){let b=a.config;return"sqlite"===b.engine?(0,z._1)(b.file??""):`${b.host||"127.0.0.1"}${b.port?`:${b.port}`:""}${b.database?`/${b.database}`:""}`}if("cluster"===a.kind)return`${a.config.members.length}`;let b=a.config;return"container"===b.mode?b.image??"":"compose"===b.mode?(0,z._1)(b.file??""):b.container??""}function K({object:a,target:b,onClose:c,onCreateManager:g}){let{t:K}=(0,y.s9)(),{agents:L,objects:M,colonies:N}=(0,C.o0)(),O=(0,D.n)(),P="server"===a.kind||"docker"===a.kind&&"compose"!==a.config.mode,Q=a.manager_id?L.filter(b=>b.id===a.manager_id):L.filter(b=>b.skill_ids.includes(E.t)&&(b.colony_id??null)===(a.colony_id??null)),[R,S]=(0,f.useState)(!1),{refresh:T}=(0,C.o0)(),U=async b=>{try{await x.FH.put(`/objects/${a.id}/manager`,{agent_id:b}),await T(["objects","agents"]),S(!1)}catch(a){V(a instanceof Error?a.message:"","err")}},V=(0,A.dj)(),[W,X]=(0,f.useState)(null),{icon:Y,color:Z}=F.Nd[a.kind],$=a.state.status,_=async b=>{X(b);try{await x.FH.post(`/objects/${a.id}/action`,{action:b})}catch(a){V(`${K("obj.act.failed",{action:K(`obj.act.${b}`)})}: ${a instanceof Error?a.message:""}`,"err")}finally{X(null)}},aa="running"===$||"starting"===$,ab=async()=>{X("test");try{let b=await x.FH.post("/object-db/test",{id:a.id,config:a.config});V(`${K("db.test.ok")} \xb7 ${b.version} \xb7 ${b.ms} ms`)}catch(a){V(a instanceof Error?a.message:"","err")}finally{X(null)}},ac="cluster"===a.kind?a.config.members.map(a=>M.find(b=>b.id===a)).filter(a=>!!a):[];return(0,d.jsx)(w.rs,{target:b,pinned:!0,width:380,label:a.name,onClose:c,children:(0,d.jsxs)("div",{className:"col obj-panel res-gap12",children:[(0,d.jsxs)("div",{className:"ap-corner row gap-s",children:[(0,d.jsx)(h(),{className:"btn ghost icon sm",href:`/resources/${a.id}?tab=config`,"aria-label":K("obj.act.edit"),title:K("obj.act.edit"),children:(0,d.jsx)(i.A,{size:15})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:c,"aria-label":K("common.close"),title:`${K("common.close")} (Esc)`,children:(0,d.jsx)(j.A,{size:16})})]}),(0,d.jsxs)("div",{className:"row gap-l res-pr70",children:[(0,d.jsx)("span",{className:"obj-ico",style:{"--c":Z},children:(0,d.jsx)(Y,{size:22})}),(0,d.jsxs)("div",{className:"grow res-minw0",children:[(0,d.jsx)("h2",{className:"res-h2",children:a.name}),(0,d.jsxs)("div",{className:"row gap-s wrap res-mt4",children:[(0,d.jsxs)("span",{className:`ostatus ${F.Wy[$]}`,children:[(0,d.jsx)(I,{status:$}),K(`obj.status.${$}`)]}),(0,d.jsx)("span",{className:"muted small",children:K(`obj.kind.${a.kind}`)})]})]})]}),(a.state.detail||a.state.since)&&(0,d.jsx)("p",{className:"muted small res-m0",children:[(0,F.HS)(K,a.state.detail),a.state.since&&aa?K("obj.since",{time:(0,z.KN)(a.state.since)}):"",a.state.pid?K("obj.pid",{pid:a.state.pid}):""].filter(Boolean).join(" \xb7 ")}),(0,d.jsxs)(h(),{className:"btn primary",href:`/resources/${a.id}`,children:[(0,d.jsx)(k.A,{size:15}),K("obj.open")]}),"cluster"!==a.kind&&(0,d.jsx)("div",{className:"mono small obj-cmd",title:J(a),children:J(a)}),"database"===a.kind&&(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("span",{className:"db-badge",children:[(0,d.jsx)(l.A,{size:12}),H[a.config.engine]]}),!1!==a.config.readOnly?(0,d.jsxs)("span",{className:"db-badge ro",children:[(0,d.jsx)(m.A,{size:12}),K("db.readonly.badge")]}):(0,d.jsxs)("span",{className:"db-badge rw",children:[(0,d.jsx)(n.A,{size:12}),K("db.write.badge")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W,onClick:()=>void ab(),children:["test"===W?(0,d.jsx)(o.A,{size:14,className:"spin"}):(0,d.jsx)(p.A,{size:14}),K("db.test")]})]}),"http"===a.kind||"database"===a.kind?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("button",{className:"btn primary sm",disabled:!!W||("cluster"===a.kind?"running"===$:aa),onClick:()=>void _("start"),children:[(0,d.jsx)(q.A,{size:14}),K("cluster"===a.kind?"obj.act.startAll":"obj.act.start")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W||!aa&&"error"!==$&&!("cluster"===a.kind&&ac.some(a=>"running"===a.state.status)),onClick:()=>void _("stop"),children:[(0,d.jsx)(r.A,{size:14}),K("cluster"===a.kind?"obj.act.stopAll":"obj.act.stop")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W,onClick:()=>void _("restart"),children:[(0,d.jsx)(s.A,{size:14}),K("cluster"===a.kind?"obj.act.restartAll":"obj.act.restart")]})]}),"cluster"===a.kind&&(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.members")}),ac.length?(0,d.jsx)("div",{className:"col res-gap4",children:ac.map((a,b)=>(0,d.jsxs)("div",{className:"row gap-s small",children:[(0,d.jsx)("span",{className:"ord",children:b+1}),(0,d.jsx)(I,{status:a.state.status}),(0,d.jsx)("b",{className:"grow ellipsis",children:a.name}),(0,d.jsx)("span",{className:"muted",children:K(`obj.status.${a.state.status}`)})]},a.id))}):(0,d.jsx)("p",{className:"muted small res-m0",children:K("obj.members.empty")})]}),(0,d.jsxs)("div",{className:"row gap-s wrap",children:[P&&(0,d.jsx)(e.N,{spec:{objectId:a.id},label:"server"===a.kind?K("dock.here"):K("dock.shell")}),(0,d.jsxs)("button",{className:"btn sm",onClick:()=>O.openLogs(a.id,a.name),children:[(0,d.jsx)(t.A,{size:14}),K("dock.logs")]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.logs")}),(0,d.jsx)(G.I,{id:a.id})]})]}),"http"!==a.kind&&"database"!==a.kind&&(0,d.jsxs)("div",{className:"obj-managers",children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.managers")}),Q.length?(0,d.jsx)("div",{className:"row gap-s wrap",children:Q.map(b=>(0,d.jsxs)("span",{className:"chip ps-chip",children:[(0,d.jsxs)(h(),{href:`/agents/${b.id}`,title:"plan"===b.permission?K("obj.managers.readonly"):void 0,children:[b.name,"plan"===b.permission?` \xb7 ${K("obj.managers.ro")}`:""]}),a.manager_id===b.id&&(0,d.jsx)("button",{type:"button",onClick:()=>void U(null),"aria-label":K("obj.managers.remove"),title:K("obj.managers.remove"),children:(0,d.jsx)(j.A,{size:12})})]},b.id))}):(0,d.jsx)("p",{className:"muted small res-m0",children:K("obj.managers.none")}),a.manager_id&&(0,d.jsx)("p",{className:"muted small res-mt6",children:K("obj.managers.only")}),(0,d.jsxs)("div",{className:"row gap-s wrap res-mt8",children:[(0,d.jsxs)("button",{className:"btn sm",onClick:g,children:[(0,d.jsx)(u.A,{size:14}),K("obj.managers.create")]}),(0,d.jsxs)("button",{className:"btn sm","aria-pressed":R,onClick:()=>S(a=>!a),children:[(0,d.jsx)(v.A,{size:14}),K("obj.managers.add")]})]}),R&&(0,d.jsx)("div",{className:"res-mt8",children:(0,d.jsx)(B.c,{inline:!0,autoFocus:!0,options:L.filter(b=>b.id!==a.manager_id).map(a=>({id:a.id,label:a.name,hint:N.find(b=>b.id===a.colony_id)?.name??K("common.noColony")})),value:[],onChange:a=>a[0]&&void U(a[0]),placeholder:K("obj.manager.placeholder"),empty:K("obj.manager.empty"),ariaLabel:K("obj.managers.add")})})]})]})})}},54842:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(93043),e=c(2335);function f(a){if(!a)return null;let b=a.blocks[a.blocks.length-1],c="dispatch"===a.source?(0,d.Tl)("activity.delegated"):"";if(!b)return`${c}${(0,d.Tl)("activity.starting")}`;if("tool"===b.type){let a=(0,e.q0)(b),f=`${a.label}${a.summary?` ${a.summary}`:""}`;return`${c}${void 0===b.output?(0,d.Tl)("activity.running",{tool:f}):(0,d.Tl)("activity.ran",{tool:f})}`}return`${c}${"thinking"===b.type?(0,d.Tl)("activity.thinking"):(0,d.Tl)("activity.writing")}`}},93717:(a,b,c)=>{c.d(b,{HS:()=>p,M6:()=>l,Mn:()=>n,Nd:()=>j,Wy:()=>k,y$:()=>m});var d=c(87456),e=c(79588),f=c(30162),g=c(48370),h=c(2266),i=c(61162);let j={server:{color:"#0f8f9e",icon:d.A},docker:{color:"#2496ed",icon:e.A},http:{color:"#7a4de0",icon:f.A},database:{color:"#d9822b",icon:g.A},cluster:{color:i.Ng,icon:h.A}},k={running:"ok",ready:"ok",starting:"warn",error:"err",stopped:"off",unknown:"off"},l=a=>Object.entries(a??{}).map(([a,b])=>`${a}=${b}`).join("\n");function m(a){let b={};for(let c of a.split("\n")){let a=c.trim();if(!a||a.startsWith("#"))continue;let d=a.indexOf("=");if(d<=0)throw Error(`"${a}" is not NAME=value`);b[a.slice(0,d).trim()]=a.slice(d+1)}return b}let n=a=>a.split("\n").map(a=>a.trim()).filter(Boolean),o=[[/^(\d+) requests in (\d+) files$/,"d.requests"],[/^(\d+)\/(\d+) running$/,"d.running"],[/^no members$/,"d.noMembers"],[/^only (\d+)\/(\d+) running · stopped: (.+)$/,"d.onlySome"],[/^(.+) failed · (\d+)\/(\d+) running$/,"d.failed"],[/^waiting for port (\d+)$/,"d.waitPort"],[/^running, but nothing listens on port (\d+)$/,"d.noPort"],[/^exited with code (\d+)$/,"d.exited"],[/^ended by (\w+)$/,"d.signal"],[/^restarted \((\d+)\/(\d+)\)$/,"d.restarted"],[/^was unhealthy: restarting \((\d+)\/(\d+)\)$/,"d.unhealthyRestart"],[/^health check pending$/,"d.healthPending"],[/^restarting$/,"d.restarting"],[/^container not found$/,"d.noContainer"],[/^the compose file is missing$/,"d.noCompose"],[/^(\d+) of (\d+) running$/,"d.running2"],[/^(\d+) services?$/,"d.services"],[/^a service exited with an error$/,"d.serviceFailed"],[/^checking…$/,"d.checking"],[/^unhealthy$/,"d.unhealthy"]];function p(a,b){return b?b.split(" \xb7 ").map(b=>{for(let[c,d]of o){let e=c.exec(b);if(e)return a(d,Object.fromEntries(e.slice(1).map((a,b)=>[`a${b+1}`,a])))}let c=/^(.*)restarting in (\d+) s \((\d+)\/(\d+)\)$/.exec(b);if(c)return a("d.restartIn",{a1:c[2],a2:c[3],a3:c[4]});let d=/^gave up after (\d+) restarts$/.exec(b);if(d)return a("d.gaveUp",{a1:d[1]});let e=/^unhealthy: (.+)$/.exec(b);return e?`${a("d.unhealthy")}: ${e[1]}`:b}).join(" \xb7 "):""}},97984:(a,b,c)=>{c.d(b,{N:()=>h});var d=c(55322),e=c(35305),f=c(42580),g=c(93884);function h({spec:a,label:b,title:c}){let{t:h}=(0,g.s9)(),i=(0,f.n)();return(0,d.jsxs)("button",{className:"btn sm",onClick:()=>void i.openTerminal(a),title:c,children:[(0,d.jsx)(e.A,{size:14}),b??h("dock.nav")]})}}};
|
|
1
|
+
"use strict";exports.id=368,exports.ids=[368],exports.modules={3936:(a,b,c)=>{c.d(b,{kh:()=>o,rs:()=>p,z6:()=>m});var d=c(55322),e=c(17027),f=c(37322),g=c(60570),h=c(93884),i=c(61162),j=c(54842),k=c(81963),l=c(4460);function m(){let[a,b]=(0,e.useState)(null),c=(0,e.useRef)(void 0),g=(0,e.useRef)(!1);g.current=!!a;let h=(0,e.useCallback)((a,d,e)=>{clearTimeout(c.current);let f=()=>b({id:a,rect:d.getBoundingClientRect()});e||g.current?f():c.current=setTimeout(f,280)},[]),i=(0,e.useCallback)(()=>{clearTimeout(c.current),b(null)},[]);return{bind:(0,e.useCallback)(a=>({onMouseEnter:b=>h(a,b.currentTarget,!1),onMouseLeave:i,onFocus:b=>{b.currentTarget.matches(":focus-visible")&&h(a,b.currentTarget,!0)},onBlur:i,onClick:i}),[h,i]),node:a&&"undefined"!=typeof document?(0,f.createPortal)((0,d.jsx)(q,{anchor:a}),document.body):null}}function n({label:a,children:b}){return(0,d.jsxs)("div",{className:"ap-row",children:[(0,d.jsx)("dt",{children:a}),(0,d.jsx)("dd",{children:b})]})}function o({agent:a,hideColony:b=!1}){let{t:c}=(0,h.s9)(),e=(0,g.Tu)(a=>a.agents),f=(0,g.Tu)(a=>a.colonies).find(b=>b.id===a.colony_id),m=(0,j.E)((0,g.M_)(a.id)),o=a.worker_ids.map(a=>e.find(b=>b.id===a)?.name).filter(Boolean),p=e.filter(b=>"orchestrator"===b.role&&b.worker_ids.includes(a.id)).map(a=>a.name),q=a=>a.length>4?`${a.slice(0,4).join(", ")} ${c("hover.more",{count:a.length-4})}`:a.join(", ");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"ap-head",children:[(0,d.jsx)(k._h,{agent:a}),(0,d.jsxs)("div",{className:"grow",children:[(0,d.jsx)("b",{className:"ap-name",children:a.name}),(0,d.jsxs)("div",{className:"row gap-s wrap mt-s",children:[(0,d.jsx)(k.PW,{role:a.role}),(0,d.jsx)(k.P5,{status:a.status}),(0,d.jsx)(l.IX,{agent:a}),(0,d.jsx)(l.R4,{agent:a})]})]})]}),(0,d.jsx)("p",{className:`ap-desc ${a.description?"":"muted"}`,children:a.description||c("switcher.noDescription")}),m&&(0,d.jsxs)("div",{className:"ap-now",children:[(0,d.jsx)("i",{className:"dot run"}),m]}),(0,d.jsxs)("dl",{className:"ap-rows",children:[(0,d.jsxs)(n,{label:c("form.provider"),children:[i.xq[a.provider].label,a.model?` \xb7 ${a.model}`:` \xb7 ${c("model.cliDefault")}`]}),(0,d.jsx)(n,{label:c("inherit.permissions"),children:(0,i.Ck)(a.effective.permission)}),(0,d.jsxs)(n,{label:c("colony.folder"),children:[(0,d.jsx)("span",{className:"mono",children:(0,i._1)(a.effective.cwd)}),a.effective.inherited.includes("cwd")&&(0,d.jsxs)("span",{className:"muted",children:[" \xb7 ",c("colony.fromColony")]})]}),!b&&(0,d.jsx)(n,{label:c("form.colony"),children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("i",{className:"cdot",style:{background:f.color||"var(--honey)"}}),f.name]}):(0,d.jsx)("span",{className:"muted",children:c("common.noColony")})}),"orchestrator"===a.role?(0,d.jsx)(n,{label:c("form.team"),children:o.length?q(o):(0,d.jsx)("span",{className:"muted",children:c("colony.noWorkers")})}):(0,d.jsx)(n,{label:c("rel.directedBy"),children:p.length?q(p):(0,d.jsx)("span",{className:"muted",children:c("hover.noOrchestrator")})}),(0,d.jsx)(n,{label:c("colony.session"),children:(0,d.jsx)("span",{className:"mono",children:a.session_id?`${a.session_id.slice(0,12)}…`:c("colony.noSession")})}),(0,d.jsxs)(n,{label:c("agents.col.updated"),children:[(0,i.KN)(a.updated_at),!!a.queued&&a.queued>0&&(0,d.jsxs)("span",{className:"muted",children:[" \xb7 ",c("queue.count",{count:a.queued})]})]})]})]})}function p({target:a,width:b=310,pinned:c=!1,onClose:g,children:h,label:i}){let j=(0,e.useRef)(null),[k,l]=(0,e.useState)(null);return((0,e.useCallback)(()=>{if(!a)return;let c=j.current?.offsetHeight??0,d=a instanceof DOMRect?a:a.getBoundingClientRect(),e=d.right+12+b+8<=window.innerWidth?"right":"left",f="right"===e?d.right+12:Math.max(8,d.left-12-b),g=Math.min(Math.max(8,d.top+d.height/2-c/2),Math.max(8,window.innerHeight-c-8));l(a=>a&&a.left===f&&a.top===g&&a.side===e?a:{left:f,top:g,side:e})},[a,b]),a&&"undefined"!=typeof document)?(0,f.createPortal)((0,d.jsx)("div",{ref:j,className:`ap-card ${c?"pinned":""} ${k?.side??"right"}`,role:c?"complementary":"tooltip","aria-label":i,style:{left:k?.left??-9999,top:k?.top??-9999,width:b,visibility:k?"visible":"hidden"},children:h}),document.body):null}function q({anchor:a}){let b=(0,g.fJ)(a.id);return b?(0,d.jsx)(p,{target:a.rect,children:(0,d.jsx)(o,{agent:b})}):null}},4460:(a,b,c)=>{c.d(b,{IX:()=>l,R4:()=>m});var d=c(55322),e=c(91705),f=c.n(e),g=c(17027),h=c(35842),i=c(60570),j=c(93884);function k(a){let b=(0,i.Tu)(a=>a.agents);return(0,g.useMemo)(()=>({of:a.cloned_from?b.find(b=>b.id===a.cloned_from):void 0,clones:b.filter(b=>b.cloned_from===a.id)}),[b,a.id,a.cloned_from])}function l({agent:a,link:b=!1,className:c=""}){let{t:e}=(0,j.s9)(),{of:g}=k(a);if(!g)return null;let i=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.A,{size:11,"aria-hidden":!0}),g.name]}),l=e("agent.cloneOf",{name:g.name});return b?(0,d.jsx)(f(),{className:`chip clone ${c}`,href:`/agents/${g.id}`,title:l,onClick:a=>a.stopPropagation(),children:i}):(0,d.jsx)("span",{className:`chip clone ${c}`,title:l,children:i})}function m({agent:a}){let{t:b}=(0,j.s9)(),{clones:c}=k(a);return c.length?(0,d.jsxs)("span",{className:"chip clone",title:b("agent.clonesList",{names:c.map(a=>a.name).join(", ")}),children:[(0,d.jsx)(h.A,{size:11,"aria-hidden":!0}),b("agent.clones.count",{count:c.length})]}):null}},36368:(a,b,c)=>{c.d(b,{md:()=>I,wl:()=>K});var d=c(55322),e=c(97984),f=c(17027),g=c(91705),h=c.n(g),i=c(46378),j=c(31251),k=c(96489),l=c(48370),m=c(72836),n=c(6289),o=c(58437),p=c(85605),q=c(32309),r=c(84300),s=c(37811),t=c(78381),u=c(44521),v=c(8811),w=c(3936),x=c(7371),y=c(93884),z=c(61162),A=c(81963),B=c(89477),C=c(60570),D=c(42580),E=c(36143),F=c(93717),G=c(77712);let H={mysql:"MySQL / MariaDB",postgresql:"PostgreSQL",sqlite:"SQLite",mssql:"SQL Server"};function I({status:a,className:b=""}){return(0,d.jsx)("i",{className:`odot ${F.Wy[a]} ${b}`,"aria-hidden":!0})}function J(a){if("server"===a.kind)return a.config.start;if("http"===a.kind)return(0,z._1)(a.config.folder);if("database"===a.kind){let b=a.config;return"sqlite"===b.engine?(0,z._1)(b.file??""):`${b.host||"127.0.0.1"}${b.port?`:${b.port}`:""}${b.database?`/${b.database}`:""}`}if("cluster"===a.kind)return`${a.config.members.length}`;let b=a.config;return"container"===b.mode?b.image??"":"compose"===b.mode?(0,z._1)(b.file??""):b.container??""}function K({object:a,target:b,onClose:c,onCreateManager:g}){let{t:K}=(0,y.s9)(),{agents:L,objects:M,colonies:N}=(0,C.o0)(),O=(0,D.n)(),P="server"===a.kind||"docker"===a.kind&&"compose"!==a.config.mode,Q=a.manager_id?L.filter(b=>b.id===a.manager_id):L.filter(b=>b.skill_ids.includes("database"===a.kind?E.pU:E.tJ)&&(b.colony_id??null)===(a.colony_id??null)),[R,S]=(0,f.useState)(!1),{refresh:T}=(0,C.o0)(),U=async b=>{try{await x.FH.put(`/objects/${a.id}/manager`,{agent_id:b}),await T(["objects","agents"]),S(!1)}catch(a){V(a instanceof Error?a.message:"","err")}},V=(0,A.dj)(),[W,X]=(0,f.useState)(null),{icon:Y,color:Z}=F.Nd[a.kind],$=a.state.status,_=async b=>{X(b);try{await x.FH.post(`/objects/${a.id}/action`,{action:b})}catch(a){V(`${K("obj.act.failed",{action:K(`obj.act.${b}`)})}: ${a instanceof Error?a.message:""}`,"err")}finally{X(null)}},aa="running"===$||"starting"===$,ab=async()=>{X("test");try{let b=await x.FH.post("/object-db/test",{id:a.id,config:a.config});V(`${K("db.test.ok")} \xb7 ${b.version} \xb7 ${b.ms} ms`)}catch(a){V(a instanceof Error?a.message:"","err")}finally{X(null)}},ac="cluster"===a.kind?a.config.members.map(a=>M.find(b=>b.id===a)).filter(a=>!!a):[];return(0,d.jsx)(w.rs,{target:b,pinned:!0,width:380,label:a.name,onClose:c,children:(0,d.jsxs)("div",{className:"col obj-panel res-gap12",children:[(0,d.jsxs)("div",{className:"ap-corner row gap-s",children:[(0,d.jsx)(h(),{className:"btn ghost icon sm",href:`/resources/${a.id}?tab=config`,"aria-label":K("obj.act.edit"),title:K("obj.act.edit"),children:(0,d.jsx)(i.A,{size:15})}),(0,d.jsx)("button",{className:"btn ghost icon sm",onClick:c,"aria-label":K("common.close"),title:`${K("common.close")} (Esc)`,children:(0,d.jsx)(j.A,{size:16})})]}),(0,d.jsxs)("div",{className:"row gap-l res-pr70",children:[(0,d.jsx)("span",{className:"obj-ico",style:{"--c":Z},children:(0,d.jsx)(Y,{size:22})}),(0,d.jsxs)("div",{className:"grow res-minw0",children:[(0,d.jsx)("h2",{className:"res-h2",children:a.name}),(0,d.jsxs)("div",{className:"row gap-s wrap res-mt4",children:[(0,d.jsxs)("span",{className:`ostatus ${F.Wy[$]}`,children:[(0,d.jsx)(I,{status:$}),K(`obj.status.${$}`)]}),(0,d.jsx)("span",{className:"muted small",children:K(`obj.kind.${a.kind}`)})]})]})]}),(a.state.detail||a.state.since)&&(0,d.jsx)("p",{className:"muted small res-m0",children:[(0,F.HS)(K,a.state.detail),a.state.since&&aa?K("obj.since",{time:(0,z.KN)(a.state.since)}):"",a.state.pid?K("obj.pid",{pid:a.state.pid}):""].filter(Boolean).join(" \xb7 ")}),(0,d.jsxs)(h(),{className:"btn primary",href:`/resources/${a.id}`,children:[(0,d.jsx)(k.A,{size:15}),K("obj.open")]}),"cluster"!==a.kind&&(0,d.jsx)("div",{className:"mono small obj-cmd",title:J(a),children:J(a)}),"database"===a.kind&&(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("span",{className:"db-badge",children:[(0,d.jsx)(l.A,{size:12}),H[a.config.engine]]}),!1!==a.config.readOnly?(0,d.jsxs)("span",{className:"db-badge ro",children:[(0,d.jsx)(m.A,{size:12}),K("db.readonly.badge")]}):(0,d.jsxs)("span",{className:"db-badge rw",children:[(0,d.jsx)(n.A,{size:12}),K("db.write.badge")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W,onClick:()=>void ab(),children:["test"===W?(0,d.jsx)(o.A,{size:14,className:"spin"}):(0,d.jsx)(p.A,{size:14}),K("db.test")]})]}),"http"===a.kind||"database"===a.kind?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"row gap-s wrap",children:[(0,d.jsxs)("button",{className:"btn primary sm",disabled:!!W||("cluster"===a.kind?"running"===$:aa),onClick:()=>void _("start"),children:[(0,d.jsx)(q.A,{size:14}),K("cluster"===a.kind?"obj.act.startAll":"obj.act.start")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W||!aa&&"error"!==$&&!("cluster"===a.kind&&ac.some(a=>"running"===a.state.status)),onClick:()=>void _("stop"),children:[(0,d.jsx)(r.A,{size:14}),K("cluster"===a.kind?"obj.act.stopAll":"obj.act.stop")]}),(0,d.jsxs)("button",{className:"btn sm",disabled:!!W,onClick:()=>void _("restart"),children:[(0,d.jsx)(s.A,{size:14}),K("cluster"===a.kind?"obj.act.restartAll":"obj.act.restart")]})]}),"cluster"===a.kind&&(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.members")}),ac.length?(0,d.jsx)("div",{className:"col res-gap4",children:ac.map((a,b)=>(0,d.jsxs)("div",{className:"row gap-s small",children:[(0,d.jsx)("span",{className:"ord",children:b+1}),(0,d.jsx)(I,{status:a.state.status}),(0,d.jsx)("b",{className:"grow ellipsis",children:a.name}),(0,d.jsx)("span",{className:"muted",children:K(`obj.status.${a.state.status}`)})]},a.id))}):(0,d.jsx)("p",{className:"muted small res-m0",children:K("obj.members.empty")})]}),(0,d.jsxs)("div",{className:"row gap-s wrap",children:[P&&(0,d.jsx)(e.N,{spec:{objectId:a.id},label:"server"===a.kind?K("dock.here"):K("dock.shell")}),(0,d.jsxs)("button",{className:"btn sm",onClick:()=>O.openLogs(a.id,a.name),children:[(0,d.jsx)(t.A,{size:14}),K("dock.logs")]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.logs")}),(0,d.jsx)(G.I,{id:a.id})]})]}),"http"!==a.kind&&(0,d.jsxs)("div",{className:"obj-managers",children:[(0,d.jsx)("div",{className:"eyebrow res-mb6",children:K("obj.managers")}),Q.length?(0,d.jsx)("div",{className:"row gap-s wrap",children:Q.map(b=>(0,d.jsxs)("span",{className:"chip ps-chip",children:[(0,d.jsxs)(h(),{href:`/agents/${b.id}`,title:"plan"===b.permission?K("database"===a.kind?"obj.managers.readonly.db":"obj.managers.readonly"):void 0,children:[b.name,"plan"===b.permission?` \xb7 ${K("obj.managers.ro")}`:""]}),a.manager_id===b.id&&(0,d.jsx)("button",{type:"button",onClick:()=>void U(null),"aria-label":K("obj.managers.remove"),title:K("obj.managers.remove"),children:(0,d.jsx)(j.A,{size:12})})]},b.id))}):(0,d.jsx)("p",{className:"muted small res-m0",children:K("obj.managers.none")}),a.manager_id&&(0,d.jsx)("p",{className:"muted small res-mt6",children:K("obj.managers.only")}),(0,d.jsxs)("div",{className:"row gap-s wrap res-mt8",children:[(0,d.jsxs)("button",{className:"btn sm",onClick:g,children:[(0,d.jsx)(u.A,{size:14}),K("obj.managers.create")]}),(0,d.jsxs)("button",{className:"btn sm","aria-pressed":R,onClick:()=>S(a=>!a),children:[(0,d.jsx)(v.A,{size:14}),K("obj.managers.add")]})]}),R&&(0,d.jsx)("div",{className:"res-mt8",children:(0,d.jsx)(B.c,{inline:!0,autoFocus:!0,options:L.filter(b=>b.id!==a.manager_id).map(a=>({id:a.id,label:a.name,hint:N.find(b=>b.id===a.colony_id)?.name??K("common.noColony")})),value:[],onChange:a=>a[0]&&void U(a[0]),placeholder:K("obj.manager.placeholder"),empty:K("obj.manager.empty"),ariaLabel:K("obj.managers.add")})})]})]})})}},54842:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(93043),e=c(2335);function f(a){if(!a)return null;let b=a.blocks[a.blocks.length-1],c="dispatch"===a.source?(0,d.Tl)("activity.delegated"):"";if(!b)return`${c}${(0,d.Tl)("activity.starting")}`;if("tool"===b.type){let a=(0,e.q0)(b),f=`${a.label}${a.summary?` ${a.summary}`:""}`;return`${c}${void 0===b.output?(0,d.Tl)("activity.running",{tool:f}):(0,d.Tl)("activity.ran",{tool:f})}`}return`${c}${"thinking"===b.type?(0,d.Tl)("activity.thinking"):(0,d.Tl)("activity.writing")}`}},93717:(a,b,c)=>{c.d(b,{HS:()=>p,M6:()=>l,Mn:()=>n,Nd:()=>j,Wy:()=>k,y$:()=>m});var d=c(87456),e=c(79588),f=c(30162),g=c(48370),h=c(2266),i=c(61162);let j={server:{color:"#0f8f9e",icon:d.A},docker:{color:"#2496ed",icon:e.A},http:{color:"#7a4de0",icon:f.A},database:{color:"#d9822b",icon:g.A},cluster:{color:i.Ng,icon:h.A}},k={running:"ok",ready:"ok",starting:"warn",error:"err",stopped:"off",unknown:"off"},l=a=>Object.entries(a??{}).map(([a,b])=>`${a}=${b}`).join("\n");function m(a){let b={};for(let c of a.split("\n")){let a=c.trim();if(!a||a.startsWith("#"))continue;let d=a.indexOf("=");if(d<=0)throw Error(`"${a}" is not NAME=value`);b[a.slice(0,d).trim()]=a.slice(d+1)}return b}let n=a=>a.split("\n").map(a=>a.trim()).filter(Boolean),o=[[/^(\d+) requests in (\d+) files$/,"d.requests"],[/^(\d+)\/(\d+) running$/,"d.running"],[/^no members$/,"d.noMembers"],[/^only (\d+)\/(\d+) running · stopped: (.+)$/,"d.onlySome"],[/^(.+) failed · (\d+)\/(\d+) running$/,"d.failed"],[/^waiting for port (\d+)$/,"d.waitPort"],[/^running, but nothing listens on port (\d+)$/,"d.noPort"],[/^exited with code (\d+)$/,"d.exited"],[/^ended by (\w+)$/,"d.signal"],[/^restarted \((\d+)\/(\d+)\)$/,"d.restarted"],[/^was unhealthy: restarting \((\d+)\/(\d+)\)$/,"d.unhealthyRestart"],[/^health check pending$/,"d.healthPending"],[/^restarting$/,"d.restarting"],[/^container not found$/,"d.noContainer"],[/^the compose file is missing$/,"d.noCompose"],[/^(\d+) of (\d+) running$/,"d.running2"],[/^(\d+) services?$/,"d.services"],[/^a service exited with an error$/,"d.serviceFailed"],[/^checking…$/,"d.checking"],[/^unhealthy$/,"d.unhealthy"]];function p(a,b){return b?b.split(" \xb7 ").map(b=>{for(let[c,d]of o){let e=c.exec(b);if(e)return a(d,Object.fromEntries(e.slice(1).map((a,b)=>[`a${b+1}`,a])))}let c=/^(.*)restarting in (\d+) s \((\d+)\/(\d+)\)$/.exec(b);if(c)return a("d.restartIn",{a1:c[2],a2:c[3],a3:c[4]});let d=/^gave up after (\d+) restarts$/.exec(b);if(d)return a("d.gaveUp",{a1:d[1]});let e=/^unhealthy: (.+)$/.exec(b);return e?`${a("d.unhealthy")}: ${e[1]}`:b}).join(" \xb7 "):""}},97984:(a,b,c)=>{c.d(b,{N:()=>h});var d=c(55322),e=c(35305),f=c(42580),g=c(93884);function h({spec:a,label:b,title:c}){let{t:h}=(0,g.s9)(),i=(0,f.n)();return(0,d.jsxs)("button",{className:"btn sm",onClick:()=>void i.openTerminal(a),title:c,children:[(0,d.jsx)(e.A,{size:14}),b??h("dock.nav")]})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=403,exports.ids=[403],exports.modules={20668:(a,b,c)=>{c.d(b,{B:()=>h});var d=c(55322),e=c(17027);let f=(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"}]]);var g=c(2838);function h({label:a,title:b,children:c,size:h="md",align:i="start"}){let[j,k]=(0,e.useState)(!1),l=(0,e.useRef)(null),m=(0,e.useRef)(null),n=(0,e.useId)();return(0,g.s)(j,l,()=>k(!1),()=>m.current?.focus()),(0,d.jsxs)("span",{className:`help ${"sm"===h?"sm":""} ${"end"===i?"end":""}`,ref:l,children:[(0,d.jsx)("button",{ref:m,type:"button",className:"help-btn","aria-label":a,title:a,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":j?n:void 0,onClick:()=>k(a=>!a),children:(0,d.jsx)(f,{size:"sm"===h?15:18})}),j&&(0,d.jsxs)("div",{id:n,role:"dialog","aria-label":b,className:"help-pop",children:[(0,d.jsx)("div",{className:"eyebrow",children:b}),(0,d.jsx)("div",{className:"muted small help-body",children:c})]})]})}},31055:(a,b,c)=>{c.d(b,{b:()=>h});var d=c(55322),e=c(17027),f=c(2838),g=c(81963);function h({value:a,onChange:b,options:c,placeholder:h,mono:i=!1,ariaLabel:j,onOpen:k,empty:l}){let[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null);(0,f.s)(m,q,()=>n(!1));let r=(0,e.useMemo)(()=>{let b=a.trim().toLowerCase();return(b?c.filter(a=>`${a.value} ${a.label??""} ${a.hint??""}`.toLowerCase().includes(b)):c).slice(0,60)},[c,a]),s=(0,g.Bp)(m&&(r.length>0||!!l),o,r.length),t=a=>{b(a.value),n(!1)};return(0,d.jsxs)("div",{className:"sg",ref:q,children:[(0,d.jsx)("input",{className:`input ${i?"mono":""}`,value:a,placeholder:h,"aria-label":j,autoComplete:"off",spellCheck:!1,...s.input,onFocus:()=>{m||(n(!0),k?.())},onClick:()=>n(!0),onChange:a=>{b(a.target.value),n(!0)},onKeyDown:a=>{"ArrowDown"===a.key?(a.preventDefault(),n(!0),p(a=>Math.min(r.length-1,a+1))):"ArrowUp"===a.key?(a.preventDefault(),p(a=>Math.max(0,a-1))):"Enter"===a.key&&m&&r[o]?(a.preventDefault(),t(r[o])):"Escape"===a.key&&m&&(a.stopPropagation(),n(!1))}}),m&&(r.length>0||l)&&(0,d.jsxs)("ul",{className:"sg-list",...s.listProps,children:[0===r.length&&(0,d.jsx)("li",{className:"sg-empty",role:"presentation",children:l}),r.map((a,b)=>(0,d.jsx)("li",{...s.optionProps(b),children:(0,d.jsxs)("button",{type:"button",tabIndex:-1,className:`sg-opt ${b===o?"hi":""}`,onMouseDown:a=>a.preventDefault(),onMouseEnter:()=>p(b),onClick:()=>t(a),children:[(0,d.jsx)("span",{className:`nm ${i?"mono":""}`,children:a.label??a.value}),a.hint&&(0,d.jsx)("span",{className:"hint",children:a.hint})]})},a.value))]})]})}},54403:(a,b,c)=>{c.d(b,{X:()=>m});var d=c(55322),e=c(17027),f=c(7371),g=c(93884),h=c(60570),i=c(81963),j=c(88055),k=c(70226),l=c(78925);function m({presetColonyId:a,presetKind:b,onClose:c,onSaved:m}){let{t:n}=(0,g.s9)(),{refresh:o}=(0,h.o0)(),p=(0,i.dj)(),{d:q,set:r,setD:s}=(0,j.Te)(()=>(0,j.QJ)(void 0,a,b)),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(!1),x=async()=>{let a=q.name.trim()||("database"===q.kind?(0,l.I5)(q):"");if(!a)return void u(n("obj.err.name"));w(!0),u("");try{if("docker"===q.kind&&"template"===q.mode&&!q.template){u(n("tpl.pick")),w(!1);return}let b="docker"===q.kind&&"template"===q.mode?await f.FH.post("/objects/from-template",{name:a,colony_id:q.colony_id||null,template:q.template,values:q.tplValues}):await f.FH.post("/objects",{name:a,colony_id:q.colony_id||null,kind:q.kind,config:(0,j.qP)(q)});q.manager&&k.G.includes(q.kind)&&await f.FH.put(`/objects/${b.id}/manager`,{agent_id:q.manager}).catch(a=>p(a instanceof Error?a.message:"","err")),await o(["objects","agents"]),p(n("obj.created")),m?.(b.id),c()}catch(a){u(a instanceof Error?a.message:n("edit.saveFailed")),w(!1)}};return(0,d.jsx)(i._s,{title:n("obj.newTitle"),subtitle:n("obj.subtitle"),onClose:c,footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"btn ghost",onClick:c,children:n("common.cancel")}),(0,d.jsx)("button",{className:"btn primary",disabled:v,onClick:()=>void x(),children:n("obj.create")})]}),children:(0,d.jsx)(j.Bh,{d:q,set:r,setD:s,showKind:!0,error:t})})}},61060:(a,b,c)=>{c.d(b,{W:()=>p});var d=c(55322),e=c(17027),f=c(71267),g=c(72836),h=c(62850),i=c(45482),j=c(34410),k=c(31251),l=c(20668),m=c(93884),n=c(31055);let o="$shared";function p({value:a,onChange:b,fileEnvs:c=[],fileVars:p={},used:q=[],fileDefined:r=[],setBy:s={}}){let{t}=(0,m.s9)(),u=[o,...[...new Set([...Object.keys(a),...c])].filter(a=>a!==o).sort()],[v,w]=(0,e.useState)(()=>u.find(b=>b!==o&&Object.keys(a[b]??{}).length>0)??u[0]),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)({}),B=a[v]??{},C=new Set([...v!==o?p[o]??[]:[],...p[v]??[]]),D=q.filter(a=>!(a.name in B)).map(a=>({value:a.name,hint:t("vars.used.count",{count:a.count})})),E=(c,d,e)=>{if(void 0!==e&&e!==c&&e in B)return;let f=Object.entries(B).map(([a,b])=>a===c?[e??a,{...b,...d}]:[a,b]);b({...a,[v]:Object.fromEntries(f)})},F=()=>{let c=x.trim();!/^[\w.$-]{1,60}$/.test(c)||c in a||c===o||(b({...a,[c]:{}}),w(c),y(""))};return(0,d.jsxs)("div",{className:"vars",children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("b",{children:t("ow.tab.vars")}),(0,d.jsxs)(l.B,{size:"sm",label:t("common.help"),title:t("vars.how.title"),children:[(0,d.jsx)("p",{children:t("vars.hint")}),(0,d.jsx)("p",{children:t("vars.how.1")}),(0,d.jsx)("p",{children:t("vars.how.2")}),(0,d.jsx)("p",{children:t("vars.note")})]})]}),(0,d.jsxs)("div",{className:"vars-envs",role:"tablist",children:[u.map(a=>(0,d.jsxs)("button",{type:"button",role:"tab","aria-selected":v===a,className:`vars-env ${v===a?"on":""}`,onClick:()=>w(a),title:a===o?t("vars.all.hint"):void 0,children:[a===o?t("vars.all"):a,c.includes(a)&&(0,d.jsx)("i",{className:"vars-file",title:t("vars.fromFile"),children:"\xb7"})]},a)),(0,d.jsxs)("span",{className:"vars-add",children:[(0,d.jsx)("input",{className:"input",placeholder:t("vars.newEnv"),value:x,onChange:a=>y(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),F())},"aria-label":t("vars.newEnv")}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:F,disabled:!x.trim(),"aria-label":t("vars.newEnv"),children:(0,d.jsx)(f.A,{size:14})})]})]}),(0,d.jsx)("p",{className:"muted small vars-scope",children:v===o?t("vars.scope.all"):t("vars.scope.env",{env:v})}),(0,d.jsxs)("div",{className:"vars-table",children:[0===Object.keys(B).length&&(0,d.jsx)("p",{className:"muted small",style:{margin:"4px 2px"},children:t("vars.empty")}),Object.entries(B).map(([c,e],f)=>{let k=`${v}/${f}`,l=e.secret&&!z[k];return(0,d.jsxs)("div",{className:"vars-row",children:[(0,d.jsx)(n.b,{value:c,onChange:a=>E(c,{},a.trim()),options:D,mono:!0,placeholder:t("vars.name"),ariaLabel:t("vars.name")}),(0,d.jsx)("input",{className:"input mono",type:l?"password":"text",value:e.value,onChange:a=>E(c,{value:a.target.value}),"aria-label":t("vars.value"),placeholder:e.secret&&e.set&&!e.value?t("vars.saved"):t("vars.value"),autoComplete:"off"}),(0,d.jsx)("button",{type:"button",className:`btn ghost icon sm ${e.secret?"on":""}`,"aria-pressed":!!e.secret,onClick:()=>E(c,{secret:!e.secret}),"aria-label":t("vars.secret"),title:t("vars.secret.hint"),children:(0,d.jsx)(g.A,{size:14})}),e.secret?(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>A(a=>({...a,[k]:!a[k]})),"aria-label":t("vars.show"),title:t("vars.show"),children:z[k]?(0,d.jsx)(h.A,{size:14}):(0,d.jsx)(i.A,{size:14})}):(0,d.jsx)("span",{}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>(c=>{let d={...B};delete d[c],b({...a,[v]:d})})(c),"aria-label":t("common.delete"),children:(0,d.jsx)(j.A,{size:14})}),C.has(c)&&(0,d.jsx)("span",{className:"vars-note",children:t("vars.overridden")})]},`${v}:${f}`)})]}),(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>(c=>{let d=(void 0)??"name",e=1;for(;d in B;)d=`${(void 0)??"name"}${++e}`;b({...a,[v]:{...B,[d]:{value:""}}})})(),children:[(0,d.jsx)(f.A,{size:14}),t("vars.add")]}),v!==o&&!c.includes(v)&&(0,d.jsxs)("button",{type:"button",className:"btn ghost sm",onClick:()=>{let c={...a};delete c[v],b(c),w(o)},children:[(0,d.jsx)(k.A,{size:14}),t("vars.delEnv")]})]})]})}},78925:(a,b,c)=>{c.d(b,{dN:()=>F,I5:()=>E});var d=c(55322),e=c(85669),f=c(17027),g=c(58437),h=c(85605),i=c(51537);let j=(0,i.A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),k=(0,i.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"}]]);var l=c(48370),m=c(22276),n=c(29083),o=c(7371),p=c(81963),q=c(93884);function r(){let[a,b]=(0,f.useState)(null);return a}var s=c(88055),t=c(31251),u=c(71267);let v=["session","network","ssl","advanced"];function w({def:a,value:b,onChange:c}){return"boolean"===a.type?(0,d.jsxs)("select",{className:"select",value:b,onChange:a=>c(a.target.value),"aria-label":a.name,children:[(0,d.jsx)("option",{value:"true",children:"true"}),(0,d.jsx)("option",{value:"false",children:"false"})]}):"choice"===a.type?(0,d.jsxs)("select",{className:"select",value:b,onChange:a=>c(a.target.value),"aria-label":a.name,children:[!b&&(0,d.jsx)("option",{value:""}),a.choices.map(a=>(0,d.jsx)("option",{value:a,children:a},a))]}):(0,d.jsx)("input",{className:"input mono",type:"number"===a.type?"number":"text",min:a.min,max:a.max,value:b,placeholder:a.placeholder,autoComplete:"off",onChange:a=>c(a.target.value),"aria-label":a.name})}function x({engine:a,value:b,onChange:c,groups:e=v,exclude:f=[],quiet:g=!1}){let{t:h,locale:i}=(0,q.s9)(),j=r();if(!j)return(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:h("dp.loading")});let k=j[a].filter(a=>e.includes(a.group)&&!f.includes(a.name)),l=k.filter(a=>a.name in b),m=k.filter(a=>!(a.name in b));return(0,d.jsxs)("div",{className:"dprops",children:[0===l.length&&!g&&(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:h("dp.none")}),l.map(a=>(0,d.jsxs)("div",{className:"dprop",children:[(0,d.jsxs)("div",{className:"dprop-row",children:[(0,d.jsx)("code",{className:"dprop-name",children:a.name}),(0,d.jsx)("div",{className:"dprop-val",children:(0,d.jsx)(w,{def:a,value:b[a.name],onChange:d=>c({...b,[a.name]:d})})}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>{let{[a.name]:d,...e}=b;c(e)},"aria-label":h("dp.remove",{name:a.name}),title:h("dp.remove",{name:a.name}),children:(0,d.jsx)(t.A,{size:14})})]}),(0,d.jsx)("p",{className:"muted small dprop-desc",children:"es"===i?a.es:a.desc})]},a.name)),m.length>0&&(0,d.jsxs)("div",{className:"dprop-add",children:[(0,d.jsx)(u.A,{size:14,className:"muted"}),(0,d.jsxs)("select",{className:"select",value:"","aria-label":h("dp.add"),onChange:a=>{let d=k.find(b=>b.name===a.target.value);d&&c({...b,[d.name]:"boolean"===d.type?"true":"choice"===d.type?d.choices[0]:""})},children:[(0,d.jsx)("option",{value:"",children:h("dp.add")}),v.filter(a=>m.some(b=>b.group===a)).map(a=>(0,d.jsx)("optgroup",{label:h(`dp.group.${a}`),children:m.filter(b=>b.group===a).map(a=>(0,d.jsx)("option",{value:a.name,children:a.name},a.name))},a))]})]})]})}let y={postgres:"postgresql",postgresql:"postgresql",mysql:"mysql",mariadb:"mysql",mssql:"mssql",sqlserver:"mssql",sqlite:"sqlite",file:"sqlite"};function z(a,b=[]){let c,d=a.trim(),e=/^(?:jdbc:)?([a-z][a-z0-9+.-]*):/i.exec(d),f=e?y[e[1].toLowerCase()]:void 0;if(!f)return null;let g={engine:f,host:"",port:"",user:"",password:"",database:"",file:"",ssl:!1,trust:!1,props:{}};if("sqlite"===f){let a=d.replace(/^(?:jdbc:)?(?:sqlite|file):(?:\/\/)?/i,"").split("?")[0],b=decodeURIComponent(a.startsWith("/")?a:`/${a}`);return b.length>1?{...g,file:b}:null}try{c=new URL(d.replace(/^jdbc:/i,"").replace(/^[a-z][a-z0-9+.-]*:/i,"http:"))}catch{return null}g.host=c.hostname,g.port=c.port,g.user=decodeURIComponent(c.username),g.password=decodeURIComponent(c.password),g.database=decodeURIComponent(c.pathname.replace(/^\//,""));let h=new Map(b.map(a=>[a.name.toLowerCase(),a]));return c.searchParams.forEach((a,b)=>{let c=b.toLowerCase(),d=a.toLowerCase();if("sslmode"===c||"ssl"===c||"encrypt"===c||"tls"===c)g.ssl=!["disable","disabled","false","no","0","allow","prefer"].includes(d)&&""!==d,g.trust=g.ssl&&["require","required","preferred"].includes(d);else if("trustservercertificate"===c)g.trust="true"===d;else{let b=h.get(c);b&&!b.name.startsWith("ssl.")&&(g.props[b.name]=a)}}),g}let A={mysql:{label:"MySQL / MariaDB",port:3306,color:"#00758f",sample:"mysql://user:password@localhost:3306/app"},postgresql:{label:"PostgreSQL",port:5432,color:"#4a7fb5",sample:"postgresql://user:password@localhost:5432/app?sslmode=require"},sqlite:{label:"SQLite",port:0,color:"#0f80cc",sample:"sqlite:///home/you/app/data.db"},mssql:{label:"SQL Server",port:1433,color:"#cc2927",sample:"mssql://sa:password@localhost:1433/master"}},B=Object.keys(A),C=["ssl.ca","ssl.cert","ssl.key"],D={"ssl.ca":"db.ssl.ca","ssl.cert":"db.ssl.cert","ssl.key":"db.ssl.key"};function E(a){let b="sqlite"===a.engine?a.dbFile.split("/").pop()?.replace(/\.[^.]+$/,""):a.dbName.trim()||a.dbHost.trim();return b?`${b} \xb7 ${A[a.engine].label.split(" ")[0]}`:""}function F({d:a,set:b,setD:c,objectId:i,creating:t=!1}){let{t:u,locale:v}=(0,q.s9)(),w=r(),[y,E]=(0,f.useState)({state:"idle"}),[F,G]=(0,f.useState)(""),[H,I]=(0,f.useState)(""),J="sqlite"===a.engine,K=(c,e={})=>(0,d.jsx)("input",{className:`input ${e.mono?"mono":""}`,type:e.type,value:a[c],placeholder:e.placeholder,autoComplete:e.auto??"off",onChange:a=>b(c,a.target.value)}),L=b=>{b!==a.engine&&(c(a=>({...a,engine:b,dbProps:{},dbSsl:!1,dbTrust:!1})),E({state:"idle"}))},M=async()=>{E({state:"busy"});try{let b=await o.FH.post("/object-db/test",{id:i,config:(0,s.Mr)(a)});E({state:"ok",text:`${b.version} \xb7 ${b.ms} ms`})}catch(a){E({state:"err",text:a instanceof Error?a.message:""})}},N=()=>{let b=z(F,w?.[z(F)?.engine??a.engine]);if(!b)return void I(u("db.url.bad"));I(""),E({state:"idle"}),c(a=>({...a,engine:b.engine,dbHost:b.host,dbPort:b.port,dbUser:b.user,dbPassword:b.password,dbName:b.database,dbFile:b.file,dbSsl:b.ssl,dbTrust:b.trust,dbProps:b.props})),G("")},O=(0,d.jsxs)(d.Fragment,{children:[J?(0,d.jsx)(p.yQ,{mode:"file",exts:["db","sqlite","sqlite3","db3"],value:a.dbFile,onChange:a=>b("dbFile",a),label:u("db.file"),hint:u("db.file.hint"),placeholder:"/home/you/app/data.db"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(p.D0,{label:u("db.host"),children:K("dbHost",{placeholder:"127.0.0.1",mono:!0})}),(0,d.jsx)(p.D0,{label:u("db.port"),children:K("dbPort",{placeholder:String(A[a.engine].port)})}),(0,d.jsx)(p.D0,{label:u("db.user"),children:K("dbUser",{mono:!0})}),(0,d.jsx)(p.D0,{label:u("db.password"),hint:a.dbPasswordSet&&!a.dbPassword?u("db.password.saved"):void 0,children:(0,d.jsx)(e.y,{value:a.dbPassword,autoComplete:"new-password",placeholder:a.dbPasswordSet?"••••••••":"",onChange:a=>b("dbPassword",a.target.value)})})]}),(0,d.jsx)(p.D0,{label:u("db.database"),hint:u("db.database.hint"),children:K("dbName",{mono:!0})})]}),(0,d.jsxs)("div",{className:"row gap-s wrap db-test",children:[(0,d.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>void M(),disabled:"busy"===y.state||!!J&&!a.dbFile.trim(),children:["busy"===y.state?(0,d.jsx)(g.A,{size:14,className:"spin"}):(0,d.jsx)(h.A,{size:14}),u("db.test")]}),"ok"===y.state&&(0,d.jsxs)("span",{className:"db-ok small",children:[(0,d.jsx)(j,{size:14}),u("db.test.ok")," \xb7 ",y.text]}),"err"===y.state&&(0,d.jsxs)("span",{className:"db-bad small",children:[(0,d.jsx)(k,{size:14}),y.text]})]})]}),P=J?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbSsl,onChange:a=>b("dbSsl",a),label:u("db.ssl")}),a.dbSsl&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbTrust,onChange:a=>b("dbTrust",a),label:u("db.trust"),hint:a.dbTrust?u("db.trust.on"):u("db.trust.off")}),C.filter(b=>w?.[a.engine].some(a=>a.name===b)).map(c=>{let e=w[a.engine].find(a=>a.name===c);return(0,d.jsx)(p.yQ,{mode:"file",exts:["pem","crt","cer","key"],value:a.dbProps[c]??"",onChange:d=>b("dbProps",{...a.dbProps,[c]:d}),label:u(D[c]),hint:"es"===v?e.es:e.desc,placeholder:e.placeholder},c)}),(0,d.jsx)(x,{engine:a.engine,value:a.dbProps,onChange:a=>b("dbProps",a),groups:["ssl"],exclude:[...C],quiet:!0})]})]}),Q=(0,d.jsx)(x,{engine:a.engine,value:a.dbProps,onChange:a=>b("dbProps",a),groups:["session","network","advanced"]}),R=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbReadOnly,onChange:a=>b("dbReadOnly",a),label:u("db.readonly"),hint:a.dbReadOnly?u("db.readonly.on"):u("db.readonly.off")}),(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(p.D0,{label:u("db.timeout"),hint:u("db.timeout.hint"),children:K("dbTimeout",{placeholder:"30"})}),(0,d.jsx)(p.D0,{label:u("db.maxRows"),hint:u("db.maxRows.hint"),children:K("dbMaxRows",{placeholder:"1000"})})]})]}),S=(0,d.jsx)("div",{className:"dbengines",role:"group","aria-label":u("db.engine"),children:B.map(b=>(0,d.jsxs)("button",{type:"button",className:"dbengine","aria-pressed":a.engine===b,style:{"--c":A[b].color},onClick:()=>L(b),children:[(0,d.jsx)(l.A,{size:18}),(0,d.jsx)("b",{children:A[b].label}),(0,d.jsx)("small",{children:"sqlite"===b?u("db.engine.file"):u("db.engine.port",{port:A[b].port})})]},b))});return t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Zp,{title:u("db.engine"),hint:u("db.engine.hint"),children:S}),(0,d.jsxs)(s.Zp,{title:u("db.conn"),hint:u("db.conn.hint"),children:[(0,d.jsx)(p.D0,{label:u("db.url"),error:H,hint:H?void 0:u("db.url.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("input",{className:"input mono grow",value:F,placeholder:A[a.engine].sample,autoComplete:"off",spellCheck:!1,onChange:a=>{G(a.target.value),I("")},onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),N())}}),(0,d.jsxs)("button",{type:"button",className:"btn sm",disabled:!F.trim(),onClick:N,children:[(0,d.jsx)(m.A,{size:14}),u("db.url.use")]})]})}),O]}),(0,d.jsx)(s.Zp,{title:u("db.safety"),hint:u("db.safety.hint"),children:R}),(0,d.jsxs)("details",{className:"of-adv",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(n.A,{size:15}),u("db.advanced"),(0,d.jsx)("span",{className:"muted small",children:u("db.advanced.hint")})]}),!J&&(0,d.jsx)(s.Zp,{title:u("db.sslTitle"),hint:u("db.sslTitle.hint"),children:P}),(0,d.jsx)(s.Zp,{title:u("dp.title"),hint:u("dp.hint"),children:Q})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(s.Zp,{title:u("db.conn"),hint:u("db.conn.hint"),children:[(0,d.jsx)(p.D0,{label:u("db.engine"),children:(0,d.jsx)(p.$q,{value:a.engine,onChange:L,options:B.map(a=>({id:a,label:A[a].label}))})}),O]}),!J&&(0,d.jsx)(s.Zp,{title:u("db.sslTitle"),hint:u("db.sslTitle.hint"),children:P}),(0,d.jsx)(s.Zp,{title:u("dp.title"),hint:u("dp.hint"),children:Q}),(0,d.jsx)(s.Zp,{title:u("db.safety"),hint:u("db.safety.hint"),children:R})]})}},88055:(a,b,c)=>{c.d(b,{Zp:()=>v,Bh:()=>x,Mr:()=>u,QJ:()=>r,qP:()=>t,Te:()=>y});var d=c(55322),e=c(70226),f=c(17027),g=c(77671),h=c(29083),i=c(81963);c(7371);var j=c(31055),k=c(93884);function l({template:a,values:b,onPick:c,onValue:e}){let{t:g}=(0,k.s9)(),h=function(){let[a,b]=(0,f.useState)(null);return a}(),j=h?.find(b=>b.id===a);return h?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"tpls",children:h.map(b=>(0,d.jsxs)("button",{type:"button",className:"tpl","aria-pressed":a===b.id,onClick:()=>c(b),children:[(0,d.jsx)("b",{children:b.name}),(0,d.jsx)("small",{children:b.description})]},b.id))}),j&&j.fields.map(a=>(0,d.jsx)(i.D0,{label:a.label,children:(0,d.jsx)("input",{className:`input ${"text"===a.kind&&"version"!==a.key?"":"mono"}`,value:b[a.key]??"",onChange:b=>e(a.key,b.target.value),placeholder:a.default,inputMode:"port"===a.kind?"numeric":void 0})},`${j.id}-${a.key}`)),j&&(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:g("tpl.note")})]}):(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:g("git.loading")})}var m=c(60570),n=c(93717),o=c(61060),p=c(78925);let q=a=>void 0===a?"":String(a),r=(a,b,c)=>{let d=a?.kind==="server"?a.config:{},e=a?.kind==="docker"?a.config:{},f=a?.kind==="http"?a.config:{},g=a?.kind==="cluster"?a.config:{},h=a?.kind==="database"?a.config:{};return{manager:a?.manager_id??"",name:a?.name??"",colony_id:a?.colony_id??b??"",kind:a?.kind??c??"server",cwd:d.cwd??"",start:d.start??"",stop:d.stop??"",port:q(d.port),env:(0,n.M6)(a?.kind==="server"?d.env:e.env),restart:d.restart??"no",maxRestarts:q(d.maxRestarts),healthKind:d.health?.kind??"",healthTarget:d.health?.target??"",healthInterval:q(d.health?.intervalSec),healthTimeout:q(d.health?.timeoutSec),healthRetries:q(d.health?.retries),healthRestart:!!d.health?.restartWhenUnhealthy,stopTimeout:q(a?.kind==="server"?d.stopTimeoutSec:e.stopTimeoutSec),logMax:q(a?.kind==="server"?d.logMaxMb:e.logMaxMb),folder:f.folder??"",defEnv:f.env??"",variables:f.variables??{},members:g.members??[],template:"",tplValues:{},mode:e.mode??(a?"container":"template"),image:e.image??"",ports:(e.ports??[]).join("\n"),volumes:(e.volumes??[]).join("\n"),dockerRestart:e.restart??"no",command:e.command??"",file:e.file??"",project:e.project??"",services:(e.services??[]).join(", "),container:e.container??"",memory:e.memory??"",cpus:q(e.cpus),network:e.network??"",engine:h.engine??"postgresql",dbHost:h.host??"",dbPort:q(h.port),dbUser:h.user??"",dbPassword:"",dbPasswordSet:!!h.passwordSet,dbName:h.database??"",dbFile:h.file??"",dbSsl:!!h.ssl,dbTrust:!!h.trustCert,dbReadOnly:!1!==h.readOnly,dbTimeout:q(h.timeoutSec),dbMaxRows:q(h.maxRows),dbProps:{...h.props??{}}}},s=a=>""===a.trim()?void 0:Number(a);function t(a){return"database"===a.kind?u(a):"http"===a.kind?{folder:a.folder.trim(),env:a.defEnv.trim()||void 0,variables:Object.keys(a.variables).length?a.variables:void 0}:"cluster"===a.kind?{members:a.members}:"server"===a.kind?{cwd:a.cwd.trim(),start:a.start.trim(),stop:a.stop.trim()||void 0,port:s(a.port),env:(0,n.y$)(a.env),restart:"no"===a.restart?void 0:a.restart,maxRestarts:s(a.maxRestarts),stopTimeoutSec:s(a.stopTimeout),logMaxMb:s(a.logMax),health:a.healthKind&&a.healthTarget.trim()?{kind:a.healthKind,target:a.healthTarget.trim(),intervalSec:s(a.healthInterval),timeoutSec:s(a.healthTimeout),retries:s(a.healthRetries),restartWhenUnhealthy:a.healthRestart||void 0}:void 0}:"template"===a.mode?{mode:"compose"}:"existing"===a.mode?{mode:"existing",container:a.container.trim(),stopTimeoutSec:s(a.stopTimeout)}:"compose"===a.mode?{mode:"compose",file:a.file.trim(),project:a.project.trim()||void 0,services:a.services.split(",").map(a=>a.trim()).filter(Boolean),stopTimeoutSec:s(a.stopTimeout)}:{mode:"container",image:a.image.trim(),ports:(0,n.Mn)(a.ports),volumes:(0,n.Mn)(a.volumes),env:(0,n.y$)(a.env),restart:a.dockerRestart||"no",command:a.command.trim()||void 0,memory:a.memory.trim()||void 0,cpus:s(a.cpus),network:a.network.trim()||void 0,stopTimeoutSec:s(a.stopTimeout),logMaxMb:s(a.logMax)}}let u=a=>{let b=Object.entries(a.dbProps).filter(([b,c])=>""!==c.trim()&&(a.dbSsl||!b.startsWith("ssl."))),c=b.length?Object.fromEntries(b):void 0;return"sqlite"===a.engine?{engine:"sqlite",file:a.dbFile.trim(),props:c,readOnly:a.dbReadOnly,timeoutSec:s(a.dbTimeout),maxRows:s(a.dbMaxRows)}:{engine:a.engine,host:a.dbHost.trim()||void 0,port:s(a.dbPort),user:a.dbUser.trim()||void 0,password:a.dbPassword,database:a.dbName.trim()||void 0,ssl:a.dbSsl||void 0,trustCert:!!a.dbSsl&&!!a.dbTrust||void 0,props:c,readOnly:a.dbReadOnly,timeoutSec:s(a.dbTimeout),maxRows:s(a.dbMaxRows)}},v=({title:a,hint:b,wide:c=!1,children:e})=>(0,d.jsxs)("section",{className:`of-card ${c?"wide":""}`,id:`of-${a.toLowerCase().normalize("NFD").replace(/[^a-z0-9]+/g,"-")}`,"data-title":a,children:[(0,d.jsxs)("header",{children:[(0,d.jsx)("h4",{children:a}),b&&(0,d.jsx)("p",{className:"muted small",children:b})]}),e]});function w({file:a,project:b,services:c,onServices:e,onProject:g}){let{t:h}=(0,k.s9)(),{info:j,err:l,loading:m}=function(a){let[b,c]=(0,f.useState)(null),[d,e]=(0,f.useState)(""),[g,h]=(0,f.useState)(!1);return{info:b,err:d,loading:g}}(0),n=new Set(c.split(",").map(a=>a.trim()).filter(Boolean));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.D0,{label:h("obj.f.services"),hint:h("dk.services.hint"),children:a?m?(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.loading")}):l?(0,d.jsx)("p",{className:"gx-note err res-m0",children:l}):j&&0===j.services.length?(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.none")}):j?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"chips",children:j.services.map(a=>(0,d.jsx)("button",{type:"button",className:`chip-pick ${n.has(a)?"on":""}`,"aria-pressed":n.has(a),onClick:()=>(a=>{let b=new Set(n);b.has(a)?b.delete(a):b.add(a),e([...b].join(", "))})(a),children:a},a))}),"file"===j.source&&(0,d.jsx)("p",{className:"muted small res-mt6",children:h("dk.services.file")})]}):null:(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.pickFile")})}),(0,d.jsx)(i.D0,{label:h("obj.f.project"),hint:h("dk.project.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("input",{className:"input mono",value:b,onChange:a=>g(a.target.value),placeholder:j?.project}),j&&!b&&(0,d.jsx)("button",{type:"button",className:"btn sm",onClick:()=>g(j.project),children:h("dk.project.use",{name:j.project})})]})})]})}function x({d:a,set:b,setD:c,scan:q,showKind:r=!1,error:s,objectId:t}){let{t:u}=(0,k.s9)(),{colonies:x,objects:y}=(0,m.o0)(),z=("docker"===a.kind&&("existing"===a.mode||a.mode),function(a){let[b,c]=(0,f.useState)(null),[d,e]=(0,f.useState)(null),[g,h]=(0,f.useState)(""),[i,j]=(0,f.useState)(0);return{containers:b,images:d,error:g,reload:(0,f.useCallback)(()=>j(a=>a+1),[])}}(0)),A=(c,e={})=>(0,d.jsx)("input",{className:`input ${e.mono?"mono":""}`,type:e.type,value:a[c],placeholder:e.placeholder,onChange:a=>b(c,a.target.value)}),B=z.error?(0,d.jsx)("p",{className:"muted small res-mt4",children:u("dk.unavailable",{error:z.error})}):null,C=(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:z.reload,"aria-label":u("dk.refresh"),title:u("dk.refresh"),children:(0,d.jsx)(g.A,{size:14})}),D=q?Object.keys(q.fileVars).filter(a=>"$shared"!==a):void 0,E=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.dR,{value:a.folder,onChange:a=>b("folder",a),label:u("obj.f.httpFolder"),hint:u("obj.f.httpFolder.hint")}),(0,d.jsx)(i.D0,{label:u("obj.f.defaultEnv"),hint:u("obj.f.defaultEnv.hint"),children:(0,d.jsx)(j.b,{value:a.defEnv,onChange:a=>b("defEnv",a),mono:!0,placeholder:"dev",options:[...new Set([...q?.environments??[],...Object.keys(a.variables).filter(a=>"$shared"!==a)])].map(a=>({value:a}))})})]});return(0,d.jsxs)("div",{className:"of",children:[r&&(0,d.jsx)(v,{title:u("obj.kind.pick"),wide:!0,children:(0,d.jsx)("div",{className:"okinds",children:["server","docker","http","database","cluster"].map(c=>{let{icon:e,color:f}=n.Nd[c];return(0,d.jsxs)("button",{type:"button",className:"okind","aria-pressed":a.kind===c,style:{"--c":f},onClick:()=>b("kind",c),children:[(0,d.jsx)(e,{size:20}),(0,d.jsx)("b",{children:u(`obj.kind.${c}`)}),(0,d.jsx)("small",{children:u(`obj.kind.${c}.hint`)})]},c)})})}),(0,d.jsxs)(v,{title:u("of.general"),children:[(0,d.jsx)(i.D0,{label:u("obj.f.name"),error:s,children:A("name",{placeholder:"database"===a.kind?(0,p.I5)(a):void 0})}),(0,d.jsx)(i.D0,{label:u("obj.colony"),children:(0,d.jsxs)("select",{className:"select",value:a.colony_id,onChange:a=>c(b=>({...b,colony_id:a.target.value,members:[]})),children:[(0,d.jsx)("option",{value:"",children:u("obj.noColony")}),x.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})}),e.G.includes(a.kind)&&(0,d.jsx)(e.I,{value:a.manager,onChange:a=>b("manager",a)}),"http"===a.kind&&!r&&E]}),"http"===a.kind?(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)(v,{title:u("of.files"),children:E}),r&&(0,d.jsx)(v,{title:u("of.vars"),wide:!0,children:(0,d.jsx)(o.W,{value:a.variables,onChange:a=>b("variables",a),fileEnvs:D,fileVars:q?.fileVars,used:q?.used,fileDefined:q?.fileDefined,setBy:q?.setBy})})]}):"database"===a.kind?(0,d.jsx)(p.dN,{d:a,set:b,setD:c,objectId:t,creating:r}):"cluster"===a.kind?(0,d.jsx)(v,{title:u("of.members"),hint:u("obj.f.members.hint"),children:(()=>{let c=y.filter(b=>("server"===b.kind||"docker"===b.kind)&&(b.colony_id??"")===a.colony_id);return c.length?(0,d.jsx)("div",{className:"omembers",children:c.map(c=>{let{icon:e,color:f}=n.Nd[c.kind],g=a.members.indexOf(c.id);return(0,d.jsxs)("label",{className:"omember",children:[(0,d.jsx)("input",{type:"checkbox",checked:g>=0,onChange:()=>{let d;return d=c.id,b("members",a.members.includes(d)?a.members.filter(a=>a!==d):[...a.members,d])}}),(0,d.jsx)(e,{size:15,style:{color:f}}),(0,d.jsx)("span",{className:"nm",children:c.name}),g>=0&&(0,d.jsx)("span",{className:"ord",children:g+1})]},c.id)})}):(0,d.jsx)("p",{className:"muted small res-m0",children:u("obj.f.members.none")})})()}):"server"===a.kind?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(v,{title:u("of.run"),children:[(0,d.jsx)(i.dR,{value:a.cwd,onChange:a=>b("cwd",a),label:u("obj.f.folder"),hint:u("obj.f.folder.hint")}),(0,d.jsx)(i.D0,{label:u("obj.f.start"),hint:u("obj.f.start.hint"),children:A("start",{placeholder:"npm run dev",mono:!0})}),(0,d.jsx)(i.D0,{label:u("obj.f.stop"),hint:u("obj.f.stop.hint"),children:A("stop",{mono:!0})}),(0,d.jsx)(i.D0,{label:u("obj.f.port"),hint:u("obj.f.port.hint"),children:A("port",{placeholder:"3000"})})]}),(0,d.jsx)(v,{title:u("of.env"),children:(0,d.jsx)(i.D0,{label:u("obj.f.env"),hint:u("obj.f.env.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:5,value:a.env,onChange:a=>b("env",a.target.value)})})}),(0,d.jsxs)(v,{title:u("obj.sup.crash"),hint:u("obj.sup.note"),children:[(0,d.jsx)(i.D0,{label:u("obj.sup.restart"),hint:u("obj.sup.restart.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("select",{className:"select",value:a.restart,onChange:a=>b("restart",a.target.value),children:[(0,d.jsx)("option",{value:"no",children:u("obj.sup.restart.no")}),(0,d.jsx)("option",{value:"on-failure",children:u("obj.sup.restart.fail")}),(0,d.jsx)("option",{value:"always",children:u("obj.sup.restart.always")})]}),("no"!==a.restart||a.healthRestart)&&(0,d.jsx)("input",{className:"input res-mw130",value:a.maxRestarts,placeholder:u("obj.sup.max"),onChange:a=>b("maxRestarts",a.target.value),title:u("obj.sup.max.hint"),"aria-label":u("obj.sup.max")})]})}),(0,d.jsxs)("details",{className:"fold of-fold",children:[(0,d.jsxs)("summary",{children:[u("obj.sup.more"),(0,d.jsx)(h.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"8"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.logMax"),hint:u("obj.sup.logMax.hint"),children:A("logMax",{placeholder:"5"})})]})]})]}),(0,d.jsxs)(v,{title:u("obj.sup.health"),hint:u("obj.sup.health.hint"),children:[(0,d.jsx)(i.D0,{label:u("obj.sup.health.how"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("select",{className:"select res-mw170",value:a.healthKind,onChange:a=>b("healthKind",a.target.value),children:[(0,d.jsx)("option",{value:"",children:u("obj.sup.health.none")}),(0,d.jsx)("option",{value:"http",children:"HTTP"}),(0,d.jsx)("option",{value:"tcp",children:u("obj.sup.health.tcp")}),(0,d.jsx)("option",{value:"command",children:u("obj.sup.health.command")})]}),a.healthKind&&(0,d.jsx)("input",{className:"input mono grow",value:a.healthTarget,onChange:a=>b("healthTarget",a.target.value),placeholder:"http"===a.healthKind?"http://127.0.0.1:3000/health":"tcp"===a.healthKind?"3000":"curl -fs localhost:3000","aria-label":u("obj.sup.health")})]})}),a.healthKind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.Tl,{checked:a.healthRestart,onChange:a=>b("healthRestart",a),label:u("obj.sup.healthRestart")}),(0,d.jsx)("p",{className:"hint hint-block",children:(()=>{let b=Number(a.healthInterval)||15,c=Number(a.healthRetries)||3,d=Number(a.maxRestarts)||5;return u(a.healthRestart?"obj.sup.health.sumRestart":"obj.sup.health.sum",{a1:String(b),a2:String(c),a3:String(b*c),a4:String(d)})})()}),(0,d.jsxs)("details",{className:"fold of-fold",children:[(0,d.jsxs)("summary",{children:[u("obj.sup.timing"),(0,d.jsx)(h.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,d.jsxs)("div",{className:"of-grid3",children:[(0,d.jsx)(i.D0,{label:u("obj.sup.interval"),hint:u("obj.sup.interval.hint"),children:A("healthInterval",{placeholder:"15"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.timeout"),hint:u("obj.sup.timeout.hint"),children:A("healthTimeout",{placeholder:"5"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.retries"),hint:u("obj.sup.retries.hint"),children:A("healthRetries",{placeholder:"3"})})]})]})]})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v,{title:u("obj.f.mode"),children:(0,d.jsx)(i.$q,{value:a.mode,onChange:a=>b("mode",a),options:[...r?[{id:"template",label:u("obj.mode.template")}]:[],{id:"container",label:u("obj.mode.container")},{id:"compose",label:u("obj.mode.compose")},{id:"existing",label:u("obj.mode.existing")}]})}),"template"===a.mode&&(0,d.jsx)(v,{title:u("obj.mode.template"),hint:u("tpl.hint"),children:(0,d.jsx)(l,{template:a.template,values:a.tplValues,onPick:a=>c(b=>({...b,template:a.id,tplValues:Object.fromEntries(a.fields.map(a=>[a.key,a.default])),name:b.name.trim()?b.name:a.name})),onValue:(a,b)=>c(c=>({...c,tplValues:{...c.tplValues,[a]:b}}))})}),"container"===a.mode&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(v,{title:u("of.image"),children:[(0,d.jsxs)(i.D0,{label:u("obj.f.image"),children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("div",{className:"grow",children:(0,d.jsx)(j.b,{value:a.image,onChange:a=>b("image",a),mono:!0,placeholder:u("dk.pickImage"),ariaLabel:u("obj.f.image"),options:(z.images??[]).map(a=>({value:a.ref,hint:`${a.size}${a.created?` \xb7 ${a.created}`:""}`}))})}),C]}),B]}),(0,d.jsx)(i.D0,{label:u("obj.f.ports"),hint:u("obj.f.ports.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:2,value:a.ports,onChange:a=>b("ports",a.target.value),placeholder:"8080:80"})}),(0,d.jsxs)(i.D0,{label:u("obj.f.volumes"),hint:u("obj.f.volumes.hint"),children:[(0,d.jsx)("textarea",{className:"textarea mono",rows:2,value:a.volumes,onChange:a=>b("volumes",a.target.value)}),(0,d.jsx)(i.yQ,{bare:!0,value:"",buttonLabel:u("obj.f.volumes.add"),onChange:c=>b("volumes",`${a.volumes.trimEnd()}${a.volumes.trim()?"\n":""}${c}:/data`)})]})]}),(0,d.jsxs)(v,{title:u("of.env"),children:[(0,d.jsx)(i.D0,{label:u("obj.f.env"),hint:u("obj.f.env.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:4,value:a.env,onChange:a=>b("env",a.target.value)})}),(0,d.jsx)(i.D0,{label:u("obj.f.restart"),children:(0,d.jsx)("select",{className:"select",value:a.dockerRestart,onChange:a=>b("dockerRestart",a.target.value),children:["no","always","unless-stopped","on-failure"].map(a=>(0,d.jsx)("option",{value:a,children:a},a))})}),(0,d.jsx)(i.D0,{label:u("obj.f.command"),children:A("command",{mono:!0})})]}),(0,d.jsx)(v,{title:u("of.limits"),hint:u("obj.dk.limits.hint"),children:(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(i.D0,{label:u("obj.dk.memory"),children:A("memory",{placeholder:"512m"})}),(0,d.jsx)(i.D0,{label:u("obj.dk.cpus"),children:A("cpus",{placeholder:"1.5"})}),(0,d.jsx)(i.D0,{label:u("obj.dk.network"),children:A("network",{placeholder:"bridge"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),children:A("stopTimeout",{placeholder:"10"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.logMax"),children:A("logMax",{placeholder:"10"})})]})})]}),"compose"===a.mode&&(0,d.jsxs)(v,{title:u("obj.mode.compose"),children:[(0,d.jsx)(i.yQ,{mode:"file",exts:["yml","yaml"],value:a.file,onChange:a=>b("file",a),label:u("obj.f.file"),hint:u("obj.f.file.hint"),placeholder:"/home/you/app/docker-compose.yml"}),(0,d.jsx)(w,{file:a.file,project:a.project,services:a.services,onServices:a=>b("services",a),onProject:a=>b("project",a)}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"10"})})]}),"existing"===a.mode&&(0,d.jsxs)(v,{title:u("obj.mode.existing"),children:[(0,d.jsxs)(i.D0,{label:u("obj.f.container"),hint:u("obj.f.container.hint"),children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("div",{className:"grow",children:(0,d.jsx)(j.b,{value:a.container,onChange:a=>b("container",a),mono:!0,placeholder:u("dk.pickContainer"),ariaLabel:u("obj.f.container"),options:(z.containers??[]).map(a=>({value:a.name,hint:`${a.image} \xb7 ${a.state}${a.managed?` \xb7 ${u("dk.managed")}`:""}`}))})}),C]}),B]}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"10"})})]})]})]})}function y(a){let[b,c]=(0,f.useState)(a);return{d:b,setD:c,set:(a,b)=>c(c=>({...c,[a]:b}))}}}};
|
|
1
|
+
"use strict";exports.id=403,exports.ids=[403],exports.modules={20668:(a,b,c)=>{c.d(b,{B:()=>h});var d=c(55322),e=c(17027);let f=(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"}]]);var g=c(2838);function h({label:a,title:b,children:c,size:h="md",align:i="start"}){let[j,k]=(0,e.useState)(!1),l=(0,e.useRef)(null),m=(0,e.useRef)(null),n=(0,e.useId)();return(0,g.s)(j,l,()=>k(!1),()=>m.current?.focus()),(0,d.jsxs)("span",{className:`help ${"sm"===h?"sm":""} ${"end"===i?"end":""}`,ref:l,children:[(0,d.jsx)("button",{ref:m,type:"button",className:"help-btn","aria-label":a,title:a,"aria-haspopup":"dialog","aria-expanded":j,"aria-controls":j?n:void 0,onClick:()=>k(a=>!a),children:(0,d.jsx)(f,{size:"sm"===h?15:18})}),j&&(0,d.jsxs)("div",{id:n,role:"dialog","aria-label":b,className:"help-pop",children:[(0,d.jsx)("div",{className:"eyebrow",children:b}),(0,d.jsx)("div",{className:"muted small help-body",children:c})]})]})}},31055:(a,b,c)=>{c.d(b,{b:()=>h});var d=c(55322),e=c(17027),f=c(2838),g=c(81963);function h({value:a,onChange:b,options:c,placeholder:h,mono:i=!1,ariaLabel:j,onOpen:k,empty:l}){let[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null);(0,f.s)(m,q,()=>n(!1));let r=(0,e.useMemo)(()=>{let b=a.trim().toLowerCase();return(b?c.filter(a=>`${a.value} ${a.label??""} ${a.hint??""}`.toLowerCase().includes(b)):c).slice(0,60)},[c,a]),s=(0,g.Bp)(m&&(r.length>0||!!l),o,r.length),t=a=>{b(a.value),n(!1)};return(0,d.jsxs)("div",{className:"sg",ref:q,children:[(0,d.jsx)("input",{className:`input ${i?"mono":""}`,value:a,placeholder:h,"aria-label":j,autoComplete:"off",spellCheck:!1,...s.input,onFocus:()=>{m||(n(!0),k?.())},onClick:()=>n(!0),onChange:a=>{b(a.target.value),n(!0)},onKeyDown:a=>{"ArrowDown"===a.key?(a.preventDefault(),n(!0),p(a=>Math.min(r.length-1,a+1))):"ArrowUp"===a.key?(a.preventDefault(),p(a=>Math.max(0,a-1))):"Enter"===a.key&&m&&r[o]?(a.preventDefault(),t(r[o])):"Escape"===a.key&&m&&(a.stopPropagation(),n(!1))}}),m&&(r.length>0||l)&&(0,d.jsxs)("ul",{className:"sg-list",...s.listProps,children:[0===r.length&&(0,d.jsx)("li",{className:"sg-empty",role:"presentation",children:l}),r.map((a,b)=>(0,d.jsx)("li",{...s.optionProps(b),children:(0,d.jsxs)("button",{type:"button",tabIndex:-1,className:`sg-opt ${b===o?"hi":""}`,onMouseDown:a=>a.preventDefault(),onMouseEnter:()=>p(b),onClick:()=>t(a),children:[(0,d.jsx)("span",{className:`nm ${i?"mono":""}`,children:a.label??a.value}),a.hint&&(0,d.jsx)("span",{className:"hint",children:a.hint})]})},a.value))]})]})}},54403:(a,b,c)=>{c.d(b,{X:()=>m});var d=c(55322),e=c(17027),f=c(7371),g=c(93884),h=c(60570),i=c(81963),j=c(88055),k=c(70226),l=c(78925);function m({presetColonyId:a,presetKind:b,onClose:c,onSaved:m}){let{t:n}=(0,g.s9)(),{refresh:o}=(0,h.o0)(),p=(0,i.dj)(),{d:q,set:r,setD:s}=(0,j.Te)(()=>(0,j.QJ)(void 0,a,b)),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(!1),x=async()=>{let a=q.name.trim()||("database"===q.kind?(0,l.I5)(q):"");if(!a)return void u(n("obj.err.name"));w(!0),u("");try{if("docker"===q.kind&&"template"===q.mode&&!q.template){u(n("tpl.pick")),w(!1);return}let b="docker"===q.kind&&"template"===q.mode?await f.FH.post("/objects/from-template",{name:a,colony_id:q.colony_id||null,template:q.template,values:q.tplValues}):await f.FH.post("/objects",{name:a,colony_id:q.colony_id||null,kind:q.kind,config:(0,j.qP)(q)});q.manager&&k.Gn.includes(q.kind)&&await f.FH.put(`/objects/${b.id}/manager`,{agent_id:q.manager}).catch(a=>p(a instanceof Error?a.message:"","err")),await o(["objects","agents"]),p(n("obj.created")),m?.(b.id),c()}catch(a){u(a instanceof Error?a.message:n("edit.saveFailed")),w(!1)}};return(0,d.jsx)(i._s,{title:n("obj.newTitle"),subtitle:n("obj.subtitle"),onClose:c,footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"btn ghost",onClick:c,children:n("common.cancel")}),(0,d.jsx)("button",{className:"btn primary",disabled:v,onClick:()=>void x(),children:n("obj.create")})]}),children:(0,d.jsx)(j.Bh,{d:q,set:r,setD:s,showKind:!0,error:t})})}},61060:(a,b,c)=>{c.d(b,{W:()=>p});var d=c(55322),e=c(17027),f=c(71267),g=c(72836),h=c(62850),i=c(45482),j=c(34410),k=c(31251),l=c(20668),m=c(93884),n=c(31055);let o="$shared";function p({value:a,onChange:b,fileEnvs:c=[],fileVars:p={},used:q=[],fileDefined:r=[],setBy:s={}}){let{t}=(0,m.s9)(),u=[o,...[...new Set([...Object.keys(a),...c])].filter(a=>a!==o).sort()],[v,w]=(0,e.useState)(()=>u.find(b=>b!==o&&Object.keys(a[b]??{}).length>0)??u[0]),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)({}),B=a[v]??{},C=new Set([...v!==o?p[o]??[]:[],...p[v]??[]]),D=q.filter(a=>!(a.name in B)).map(a=>({value:a.name,hint:t("vars.used.count",{count:a.count})})),E=(c,d,e)=>{if(void 0!==e&&e!==c&&e in B)return;let f=Object.entries(B).map(([a,b])=>a===c?[e??a,{...b,...d}]:[a,b]);b({...a,[v]:Object.fromEntries(f)})},F=()=>{let c=x.trim();!/^[\w.$-]{1,60}$/.test(c)||c in a||c===o||(b({...a,[c]:{}}),w(c),y(""))};return(0,d.jsxs)("div",{className:"vars",children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("b",{children:t("ow.tab.vars")}),(0,d.jsxs)(l.B,{size:"sm",label:t("common.help"),title:t("vars.how.title"),children:[(0,d.jsx)("p",{children:t("vars.hint")}),(0,d.jsx)("p",{children:t("vars.how.1")}),(0,d.jsx)("p",{children:t("vars.how.2")}),(0,d.jsx)("p",{children:t("vars.note")})]})]}),(0,d.jsxs)("div",{className:"vars-envs",role:"tablist",children:[u.map(a=>(0,d.jsxs)("button",{type:"button",role:"tab","aria-selected":v===a,className:`vars-env ${v===a?"on":""}`,onClick:()=>w(a),title:a===o?t("vars.all.hint"):void 0,children:[a===o?t("vars.all"):a,c.includes(a)&&(0,d.jsx)("i",{className:"vars-file",title:t("vars.fromFile"),children:"\xb7"})]},a)),(0,d.jsxs)("span",{className:"vars-add",children:[(0,d.jsx)("input",{className:"input",placeholder:t("vars.newEnv"),value:x,onChange:a=>y(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),F())},"aria-label":t("vars.newEnv")}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:F,disabled:!x.trim(),"aria-label":t("vars.newEnv"),children:(0,d.jsx)(f.A,{size:14})})]})]}),(0,d.jsx)("p",{className:"muted small vars-scope",children:v===o?t("vars.scope.all"):t("vars.scope.env",{env:v})}),(0,d.jsxs)("div",{className:"vars-table",children:[0===Object.keys(B).length&&(0,d.jsx)("p",{className:"muted small",style:{margin:"4px 2px"},children:t("vars.empty")}),Object.entries(B).map(([c,e],f)=>{let k=`${v}/${f}`,l=e.secret&&!z[k];return(0,d.jsxs)("div",{className:"vars-row",children:[(0,d.jsx)(n.b,{value:c,onChange:a=>E(c,{},a.trim()),options:D,mono:!0,placeholder:t("vars.name"),ariaLabel:t("vars.name")}),(0,d.jsx)("input",{className:"input mono",type:l?"password":"text",value:e.value,onChange:a=>E(c,{value:a.target.value}),"aria-label":t("vars.value"),placeholder:e.secret&&e.set&&!e.value?t("vars.saved"):t("vars.value"),autoComplete:"off"}),(0,d.jsx)("button",{type:"button",className:`btn ghost icon sm ${e.secret?"on":""}`,"aria-pressed":!!e.secret,onClick:()=>E(c,{secret:!e.secret}),"aria-label":t("vars.secret"),title:t("vars.secret.hint"),children:(0,d.jsx)(g.A,{size:14})}),e.secret?(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>A(a=>({...a,[k]:!a[k]})),"aria-label":t("vars.show"),title:t("vars.show"),children:z[k]?(0,d.jsx)(h.A,{size:14}):(0,d.jsx)(i.A,{size:14})}):(0,d.jsx)("span",{}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>(c=>{let d={...B};delete d[c],b({...a,[v]:d})})(c),"aria-label":t("common.delete"),children:(0,d.jsx)(j.A,{size:14})}),C.has(c)&&(0,d.jsx)("span",{className:"vars-note",children:t("vars.overridden")})]},`${v}:${f}`)})]}),(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>(c=>{let d=(void 0)??"name",e=1;for(;d in B;)d=`${(void 0)??"name"}${++e}`;b({...a,[v]:{...B,[d]:{value:""}}})})(),children:[(0,d.jsx)(f.A,{size:14}),t("vars.add")]}),v!==o&&!c.includes(v)&&(0,d.jsxs)("button",{type:"button",className:"btn ghost sm",onClick:()=>{let c={...a};delete c[v],b(c),w(o)},children:[(0,d.jsx)(k.A,{size:14}),t("vars.delEnv")]})]})]})}},78925:(a,b,c)=>{c.d(b,{dN:()=>F,I5:()=>E});var d=c(55322),e=c(85669),f=c(17027),g=c(58437),h=c(85605),i=c(51537);let j=(0,i.A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),k=(0,i.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"}]]);var l=c(48370),m=c(22276),n=c(29083),o=c(7371),p=c(81963),q=c(93884);function r(){let[a,b]=(0,f.useState)(null);return a}var s=c(88055),t=c(31251),u=c(71267);let v=["session","network","ssl","advanced"];function w({def:a,value:b,onChange:c}){return"boolean"===a.type?(0,d.jsxs)("select",{className:"select",value:b,onChange:a=>c(a.target.value),"aria-label":a.name,children:[(0,d.jsx)("option",{value:"true",children:"true"}),(0,d.jsx)("option",{value:"false",children:"false"})]}):"choice"===a.type?(0,d.jsxs)("select",{className:"select",value:b,onChange:a=>c(a.target.value),"aria-label":a.name,children:[!b&&(0,d.jsx)("option",{value:""}),a.choices.map(a=>(0,d.jsx)("option",{value:a,children:a},a))]}):(0,d.jsx)("input",{className:"input mono",type:"number"===a.type?"number":"text",min:a.min,max:a.max,value:b,placeholder:a.placeholder,autoComplete:"off",onChange:a=>c(a.target.value),"aria-label":a.name})}function x({engine:a,value:b,onChange:c,groups:e=v,exclude:f=[],quiet:g=!1}){let{t:h,locale:i}=(0,q.s9)(),j=r();if(!j)return(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:h("dp.loading")});let k=j[a].filter(a=>e.includes(a.group)&&!f.includes(a.name)),l=k.filter(a=>a.name in b),m=k.filter(a=>!(a.name in b));return(0,d.jsxs)("div",{className:"dprops",children:[0===l.length&&!g&&(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:h("dp.none")}),l.map(a=>(0,d.jsxs)("div",{className:"dprop",children:[(0,d.jsxs)("div",{className:"dprop-row",children:[(0,d.jsx)("code",{className:"dprop-name",children:a.name}),(0,d.jsx)("div",{className:"dprop-val",children:(0,d.jsx)(w,{def:a,value:b[a.name],onChange:d=>c({...b,[a.name]:d})})}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>{let{[a.name]:d,...e}=b;c(e)},"aria-label":h("dp.remove",{name:a.name}),title:h("dp.remove",{name:a.name}),children:(0,d.jsx)(t.A,{size:14})})]}),(0,d.jsx)("p",{className:"muted small dprop-desc",children:"es"===i?a.es:a.desc})]},a.name)),m.length>0&&(0,d.jsxs)("div",{className:"dprop-add",children:[(0,d.jsx)(u.A,{size:14,className:"muted"}),(0,d.jsxs)("select",{className:"select",value:"","aria-label":h("dp.add"),onChange:a=>{let d=k.find(b=>b.name===a.target.value);d&&c({...b,[d.name]:"boolean"===d.type?"true":"choice"===d.type?d.choices[0]:""})},children:[(0,d.jsx)("option",{value:"",children:h("dp.add")}),v.filter(a=>m.some(b=>b.group===a)).map(a=>(0,d.jsx)("optgroup",{label:h(`dp.group.${a}`),children:m.filter(b=>b.group===a).map(a=>(0,d.jsx)("option",{value:a.name,children:a.name},a.name))},a))]})]})]})}let y={postgres:"postgresql",postgresql:"postgresql",mysql:"mysql",mariadb:"mysql",mssql:"mssql",sqlserver:"mssql",sqlite:"sqlite",file:"sqlite"};function z(a,b=[]){let c,d=a.trim(),e=/^(?:jdbc:)?([a-z][a-z0-9+.-]*):/i.exec(d),f=e?y[e[1].toLowerCase()]:void 0;if(!f)return null;let g={engine:f,host:"",port:"",user:"",password:"",database:"",file:"",ssl:!1,trust:!1,props:{}};if("sqlite"===f){let a=d.replace(/^(?:jdbc:)?(?:sqlite|file):(?:\/\/)?/i,"").split("?")[0],b=decodeURIComponent(a.startsWith("/")?a:`/${a}`);return b.length>1?{...g,file:b}:null}try{c=new URL(d.replace(/^jdbc:/i,"").replace(/^[a-z][a-z0-9+.-]*:/i,"http:"))}catch{return null}g.host=c.hostname,g.port=c.port,g.user=decodeURIComponent(c.username),g.password=decodeURIComponent(c.password),g.database=decodeURIComponent(c.pathname.replace(/^\//,""));let h=new Map(b.map(a=>[a.name.toLowerCase(),a]));return c.searchParams.forEach((a,b)=>{let c=b.toLowerCase(),d=a.toLowerCase();if("sslmode"===c||"ssl"===c||"encrypt"===c||"tls"===c)g.ssl=!["disable","disabled","false","no","0","allow","prefer"].includes(d)&&""!==d,g.trust=g.ssl&&["require","required","preferred"].includes(d);else if("trustservercertificate"===c)g.trust="true"===d;else{let b=h.get(c);b&&!b.name.startsWith("ssl.")&&(g.props[b.name]=a)}}),g}let A={mysql:{label:"MySQL / MariaDB",port:3306,color:"#00758f",sample:"mysql://user:password@localhost:3306/app"},postgresql:{label:"PostgreSQL",port:5432,color:"#4a7fb5",sample:"postgresql://user:password@localhost:5432/app?sslmode=require"},sqlite:{label:"SQLite",port:0,color:"#0f80cc",sample:"sqlite:///home/you/app/data.db"},mssql:{label:"SQL Server",port:1433,color:"#cc2927",sample:"mssql://sa:password@localhost:1433/master"}},B=Object.keys(A),C=["ssl.ca","ssl.cert","ssl.key"],D={"ssl.ca":"db.ssl.ca","ssl.cert":"db.ssl.cert","ssl.key":"db.ssl.key"};function E(a){let b="sqlite"===a.engine?a.dbFile.split("/").pop()?.replace(/\.[^.]+$/,""):a.dbName.trim()||a.dbHost.trim();return b?`${b} \xb7 ${A[a.engine].label.split(" ")[0]}`:""}function F({d:a,set:b,setD:c,objectId:i,creating:t=!1}){let{t:u,locale:v}=(0,q.s9)(),w=r(),[y,E]=(0,f.useState)({state:"idle"}),[F,G]=(0,f.useState)(""),[H,I]=(0,f.useState)(""),J="sqlite"===a.engine,K=(c,e={})=>(0,d.jsx)("input",{className:`input ${e.mono?"mono":""}`,type:e.type,value:a[c],placeholder:e.placeholder,autoComplete:e.auto??"off",onChange:a=>b(c,a.target.value)}),L=b=>{b!==a.engine&&(c(a=>({...a,engine:b,dbProps:{},dbSsl:!1,dbTrust:!1})),E({state:"idle"}))},M=async()=>{E({state:"busy"});try{let b=await o.FH.post("/object-db/test",{id:i,config:(0,s.Mr)(a)});E({state:"ok",text:`${b.version} \xb7 ${b.ms} ms`})}catch(a){E({state:"err",text:a instanceof Error?a.message:""})}},N=()=>{let b=z(F,w?.[z(F)?.engine??a.engine]);if(!b)return void I(u("db.url.bad"));I(""),E({state:"idle"}),c(a=>({...a,engine:b.engine,dbHost:b.host,dbPort:b.port,dbUser:b.user,dbPassword:b.password,dbName:b.database,dbFile:b.file,dbSsl:b.ssl,dbTrust:b.trust,dbProps:b.props})),G("")},O=(0,d.jsxs)(d.Fragment,{children:[J?(0,d.jsx)(p.yQ,{mode:"file",exts:["db","sqlite","sqlite3","db3"],value:a.dbFile,onChange:a=>b("dbFile",a),label:u("db.file"),hint:u("db.file.hint"),placeholder:"/home/you/app/data.db"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(p.D0,{label:u("db.host"),children:K("dbHost",{placeholder:"127.0.0.1",mono:!0})}),(0,d.jsx)(p.D0,{label:u("db.port"),children:K("dbPort",{placeholder:String(A[a.engine].port)})}),(0,d.jsx)(p.D0,{label:u("db.user"),children:K("dbUser",{mono:!0})}),(0,d.jsx)(p.D0,{label:u("db.password"),hint:a.dbPasswordSet&&!a.dbPassword?u("db.password.saved"):void 0,children:(0,d.jsx)(e.y,{value:a.dbPassword,autoComplete:"new-password",placeholder:a.dbPasswordSet?"••••••••":"",onChange:a=>b("dbPassword",a.target.value)})})]}),(0,d.jsx)(p.D0,{label:u("db.database"),hint:u("db.database.hint"),children:K("dbName",{mono:!0})})]}),(0,d.jsxs)("div",{className:"row gap-s wrap db-test",children:[(0,d.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>void M(),disabled:"busy"===y.state||!!J&&!a.dbFile.trim(),children:["busy"===y.state?(0,d.jsx)(g.A,{size:14,className:"spin"}):(0,d.jsx)(h.A,{size:14}),u("db.test")]}),"ok"===y.state&&(0,d.jsxs)("span",{className:"db-ok small",children:[(0,d.jsx)(j,{size:14}),u("db.test.ok")," \xb7 ",y.text]}),"err"===y.state&&(0,d.jsxs)("span",{className:"db-bad small",children:[(0,d.jsx)(k,{size:14}),y.text]})]})]}),P=J?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbSsl,onChange:a=>b("dbSsl",a),label:u("db.ssl")}),a.dbSsl&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbTrust,onChange:a=>b("dbTrust",a),label:u("db.trust"),hint:a.dbTrust?u("db.trust.on"):u("db.trust.off")}),C.filter(b=>w?.[a.engine].some(a=>a.name===b)).map(c=>{let e=w[a.engine].find(a=>a.name===c);return(0,d.jsx)(p.yQ,{mode:"file",exts:["pem","crt","cer","key"],value:a.dbProps[c]??"",onChange:d=>b("dbProps",{...a.dbProps,[c]:d}),label:u(D[c]),hint:"es"===v?e.es:e.desc,placeholder:e.placeholder},c)}),(0,d.jsx)(x,{engine:a.engine,value:a.dbProps,onChange:a=>b("dbProps",a),groups:["ssl"],exclude:[...C],quiet:!0})]})]}),Q=(0,d.jsx)(x,{engine:a.engine,value:a.dbProps,onChange:a=>b("dbProps",a),groups:["session","network","advanced"]}),R=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.Tl,{checked:a.dbReadOnly,onChange:a=>b("dbReadOnly",a),label:u("db.readonly"),hint:a.dbReadOnly?u("db.readonly.on"):u("db.readonly.off")}),(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(p.D0,{label:u("db.timeout"),hint:u("db.timeout.hint"),children:K("dbTimeout",{placeholder:"30"})}),(0,d.jsx)(p.D0,{label:u("db.maxRows"),hint:u("db.maxRows.hint"),children:K("dbMaxRows",{placeholder:"1000"})})]})]}),S=(0,d.jsx)("div",{className:"dbengines",role:"group","aria-label":u("db.engine"),children:B.map(b=>(0,d.jsxs)("button",{type:"button",className:"dbengine","aria-pressed":a.engine===b,style:{"--c":A[b].color},onClick:()=>L(b),children:[(0,d.jsx)(l.A,{size:18}),(0,d.jsx)("b",{children:A[b].label}),(0,d.jsx)("small",{children:"sqlite"===b?u("db.engine.file"):u("db.engine.port",{port:A[b].port})})]},b))});return t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Zp,{title:u("db.engine"),hint:u("db.engine.hint"),children:S}),(0,d.jsxs)(s.Zp,{title:u("db.conn"),hint:u("db.conn.hint"),children:[(0,d.jsx)(p.D0,{label:u("db.url"),error:H,hint:H?void 0:u("db.url.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("input",{className:"input mono grow",value:F,placeholder:A[a.engine].sample,autoComplete:"off",spellCheck:!1,onChange:a=>{G(a.target.value),I("")},onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),N())}}),(0,d.jsxs)("button",{type:"button",className:"btn sm",disabled:!F.trim(),onClick:N,children:[(0,d.jsx)(m.A,{size:14}),u("db.url.use")]})]})}),O]}),(0,d.jsx)(s.Zp,{title:u("db.safety"),hint:u("db.safety.hint"),children:R}),(0,d.jsxs)("details",{className:"of-adv",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(n.A,{size:15}),u("db.advanced"),(0,d.jsx)("span",{className:"muted small",children:u("db.advanced.hint")})]}),!J&&(0,d.jsx)(s.Zp,{title:u("db.sslTitle"),hint:u("db.sslTitle.hint"),children:P}),(0,d.jsx)(s.Zp,{title:u("dp.title"),hint:u("dp.hint"),children:Q})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(s.Zp,{title:u("db.conn"),hint:u("db.conn.hint"),children:[(0,d.jsx)(p.D0,{label:u("db.engine"),children:(0,d.jsx)(p.$q,{value:a.engine,onChange:L,options:B.map(a=>({id:a,label:A[a].label}))})}),O]}),!J&&(0,d.jsx)(s.Zp,{title:u("db.sslTitle"),hint:u("db.sslTitle.hint"),children:P}),(0,d.jsx)(s.Zp,{title:u("dp.title"),hint:u("dp.hint"),children:Q}),(0,d.jsx)(s.Zp,{title:u("db.safety"),hint:u("db.safety.hint"),children:R})]})}},88055:(a,b,c)=>{c.d(b,{Zp:()=>v,Bh:()=>x,Mr:()=>u,QJ:()=>r,qP:()=>t,Te:()=>y});var d=c(55322),e=c(70226),f=c(17027),g=c(77671),h=c(29083),i=c(81963);c(7371);var j=c(31055),k=c(93884);function l({template:a,values:b,onPick:c,onValue:e}){let{t:g}=(0,k.s9)(),h=function(){let[a,b]=(0,f.useState)(null);return a}(),j=h?.find(b=>b.id===a);return h?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"tpls",children:h.map(b=>(0,d.jsxs)("button",{type:"button",className:"tpl","aria-pressed":a===b.id,onClick:()=>c(b),children:[(0,d.jsx)("b",{children:b.name}),(0,d.jsx)("small",{children:b.description})]},b.id))}),j&&j.fields.map(a=>(0,d.jsx)(i.D0,{label:a.label,children:(0,d.jsx)("input",{className:`input ${"text"===a.kind&&"version"!==a.key?"":"mono"}`,value:b[a.key]??"",onChange:b=>e(a.key,b.target.value),placeholder:a.default,inputMode:"port"===a.kind?"numeric":void 0})},`${j.id}-${a.key}`)),j&&(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:g("tpl.note")})]}):(0,d.jsx)("p",{className:"muted small",style:{margin:0},children:g("git.loading")})}var m=c(60570),n=c(93717),o=c(61060),p=c(78925);let q=a=>void 0===a?"":String(a),r=(a,b,c)=>{let d=a?.kind==="server"?a.config:{},e=a?.kind==="docker"?a.config:{},f=a?.kind==="http"?a.config:{},g=a?.kind==="cluster"?a.config:{},h=a?.kind==="database"?a.config:{};return{manager:a?.manager_id??"",name:a?.name??"",colony_id:a?.colony_id??b??"",kind:a?.kind??c??"server",cwd:d.cwd??"",start:d.start??"",stop:d.stop??"",port:q(d.port),env:(0,n.M6)(a?.kind==="server"?d.env:e.env),restart:d.restart??"no",maxRestarts:q(d.maxRestarts),healthKind:d.health?.kind??"",healthTarget:d.health?.target??"",healthInterval:q(d.health?.intervalSec),healthTimeout:q(d.health?.timeoutSec),healthRetries:q(d.health?.retries),healthRestart:!!d.health?.restartWhenUnhealthy,stopTimeout:q(a?.kind==="server"?d.stopTimeoutSec:e.stopTimeoutSec),logMax:q(a?.kind==="server"?d.logMaxMb:e.logMaxMb),folder:f.folder??"",defEnv:f.env??"",variables:f.variables??{},members:g.members??[],template:"",tplValues:{},mode:e.mode??(a?"container":"template"),image:e.image??"",ports:(e.ports??[]).join("\n"),volumes:(e.volumes??[]).join("\n"),dockerRestart:e.restart??"no",command:e.command??"",file:e.file??"",project:e.project??"",services:(e.services??[]).join(", "),container:e.container??"",memory:e.memory??"",cpus:q(e.cpus),network:e.network??"",engine:h.engine??"postgresql",dbHost:h.host??"",dbPort:q(h.port),dbUser:h.user??"",dbPassword:"",dbPasswordSet:!!h.passwordSet,dbName:h.database??"",dbFile:h.file??"",dbSsl:!!h.ssl,dbTrust:!!h.trustCert,dbReadOnly:!1!==h.readOnly,dbTimeout:q(h.timeoutSec),dbMaxRows:q(h.maxRows),dbProps:{...h.props??{}}}},s=a=>""===a.trim()?void 0:Number(a);function t(a){return"database"===a.kind?u(a):"http"===a.kind?{folder:a.folder.trim(),env:a.defEnv.trim()||void 0,variables:Object.keys(a.variables).length?a.variables:void 0}:"cluster"===a.kind?{members:a.members}:"server"===a.kind?{cwd:a.cwd.trim(),start:a.start.trim(),stop:a.stop.trim()||void 0,port:s(a.port),env:(0,n.y$)(a.env),restart:"no"===a.restart?void 0:a.restart,maxRestarts:s(a.maxRestarts),stopTimeoutSec:s(a.stopTimeout),logMaxMb:s(a.logMax),health:a.healthKind&&a.healthTarget.trim()?{kind:a.healthKind,target:a.healthTarget.trim(),intervalSec:s(a.healthInterval),timeoutSec:s(a.healthTimeout),retries:s(a.healthRetries),restartWhenUnhealthy:a.healthRestart||void 0}:void 0}:"template"===a.mode?{mode:"compose"}:"existing"===a.mode?{mode:"existing",container:a.container.trim(),stopTimeoutSec:s(a.stopTimeout)}:"compose"===a.mode?{mode:"compose",file:a.file.trim(),project:a.project.trim()||void 0,services:a.services.split(",").map(a=>a.trim()).filter(Boolean),stopTimeoutSec:s(a.stopTimeout)}:{mode:"container",image:a.image.trim(),ports:(0,n.Mn)(a.ports),volumes:(0,n.Mn)(a.volumes),env:(0,n.y$)(a.env),restart:a.dockerRestart||"no",command:a.command.trim()||void 0,memory:a.memory.trim()||void 0,cpus:s(a.cpus),network:a.network.trim()||void 0,stopTimeoutSec:s(a.stopTimeout),logMaxMb:s(a.logMax)}}let u=a=>{let b=Object.entries(a.dbProps).filter(([b,c])=>""!==c.trim()&&(a.dbSsl||!b.startsWith("ssl."))),c=b.length?Object.fromEntries(b):void 0;return"sqlite"===a.engine?{engine:"sqlite",file:a.dbFile.trim(),props:c,readOnly:a.dbReadOnly,timeoutSec:s(a.dbTimeout),maxRows:s(a.dbMaxRows)}:{engine:a.engine,host:a.dbHost.trim()||void 0,port:s(a.dbPort),user:a.dbUser.trim()||void 0,password:a.dbPassword,database:a.dbName.trim()||void 0,ssl:a.dbSsl||void 0,trustCert:!!a.dbSsl&&!!a.dbTrust||void 0,props:c,readOnly:a.dbReadOnly,timeoutSec:s(a.dbTimeout),maxRows:s(a.dbMaxRows)}},v=({title:a,hint:b,wide:c=!1,children:e})=>(0,d.jsxs)("section",{className:`of-card ${c?"wide":""}`,id:`of-${a.toLowerCase().normalize("NFD").replace(/[^a-z0-9]+/g,"-")}`,"data-title":a,children:[(0,d.jsxs)("header",{children:[(0,d.jsx)("h4",{children:a}),b&&(0,d.jsx)("p",{className:"muted small",children:b})]}),e]});function w({file:a,project:b,services:c,onServices:e,onProject:g}){let{t:h}=(0,k.s9)(),{info:j,err:l,loading:m}=function(a){let[b,c]=(0,f.useState)(null),[d,e]=(0,f.useState)(""),[g,h]=(0,f.useState)(!1);return{info:b,err:d,loading:g}}(0),n=new Set(c.split(",").map(a=>a.trim()).filter(Boolean));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.D0,{label:h("obj.f.services"),hint:h("dk.services.hint"),children:a?m?(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.loading")}):l?(0,d.jsx)("p",{className:"gx-note err res-m0",children:l}):j&&0===j.services.length?(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.none")}):j?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"chips",children:j.services.map(a=>(0,d.jsx)("button",{type:"button",className:`chip-pick ${n.has(a)?"on":""}`,"aria-pressed":n.has(a),onClick:()=>(a=>{let b=new Set(n);b.has(a)?b.delete(a):b.add(a),e([...b].join(", "))})(a),children:a},a))}),"file"===j.source&&(0,d.jsx)("p",{className:"muted small res-mt6",children:h("dk.services.file")})]}):null:(0,d.jsx)("p",{className:"muted small res-m0",children:h("dk.services.pickFile")})}),(0,d.jsx)(i.D0,{label:h("obj.f.project"),hint:h("dk.project.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("input",{className:"input mono",value:b,onChange:a=>g(a.target.value),placeholder:j?.project}),j&&!b&&(0,d.jsx)("button",{type:"button",className:"btn sm",onClick:()=>g(j.project),children:h("dk.project.use",{name:j.project})})]})})]})}function x({d:a,set:b,setD:c,scan:q,showKind:r=!1,error:s,objectId:t}){let{t:u}=(0,k.s9)(),{colonies:x,objects:y}=(0,m.o0)(),z=("docker"===a.kind&&("existing"===a.mode||a.mode),function(a){let[b,c]=(0,f.useState)(null),[d,e]=(0,f.useState)(null),[g,h]=(0,f.useState)(""),[i,j]=(0,f.useState)(0);return{containers:b,images:d,error:g,reload:(0,f.useCallback)(()=>j(a=>a+1),[])}}(0)),A=(c,e={})=>(0,d.jsx)("input",{className:`input ${e.mono?"mono":""}`,type:e.type,value:a[c],placeholder:e.placeholder,onChange:a=>b(c,a.target.value)}),B=z.error?(0,d.jsx)("p",{className:"muted small res-mt4",children:u("dk.unavailable",{error:z.error})}):null,C=(0,d.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:z.reload,"aria-label":u("dk.refresh"),title:u("dk.refresh"),children:(0,d.jsx)(g.A,{size:14})}),D=q?Object.keys(q.fileVars).filter(a=>"$shared"!==a):void 0,E=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.dR,{value:a.folder,onChange:a=>b("folder",a),label:u("obj.f.httpFolder"),hint:u("obj.f.httpFolder.hint")}),(0,d.jsx)(i.D0,{label:u("obj.f.defaultEnv"),hint:u("obj.f.defaultEnv.hint"),children:(0,d.jsx)(j.b,{value:a.defEnv,onChange:a=>b("defEnv",a),mono:!0,placeholder:"dev",options:[...new Set([...q?.environments??[],...Object.keys(a.variables).filter(a=>"$shared"!==a)])].map(a=>({value:a}))})})]});return(0,d.jsxs)("div",{className:"of",children:[r&&(0,d.jsx)(v,{title:u("obj.kind.pick"),wide:!0,children:(0,d.jsx)("div",{className:"okinds",children:["server","docker","http","database","cluster"].map(c=>{let{icon:e,color:f}=n.Nd[c];return(0,d.jsxs)("button",{type:"button",className:"okind","aria-pressed":a.kind===c,style:{"--c":f},onClick:()=>b("kind",c),children:[(0,d.jsx)(e,{size:20}),(0,d.jsx)("b",{children:u(`obj.kind.${c}`)}),(0,d.jsx)("small",{children:u(`obj.kind.${c}.hint`)})]},c)})})}),(0,d.jsxs)(v,{title:u("of.general"),children:[(0,d.jsx)(i.D0,{label:u("obj.f.name"),error:s,children:A("name",{placeholder:"database"===a.kind?(0,p.I5)(a):void 0})}),(0,d.jsx)(i.D0,{label:u("obj.colony"),children:(0,d.jsxs)("select",{className:"select",value:a.colony_id,onChange:a=>c(b=>({...b,colony_id:a.target.value,members:[]})),children:[(0,d.jsx)("option",{value:"",children:u("obj.noColony")}),x.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})}),e.Gn.includes(a.kind)&&(0,d.jsx)(e.ID,{kind:a.kind,value:a.manager,onChange:a=>b("manager",a)}),"http"===a.kind&&!r&&E]}),"http"===a.kind?(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)(v,{title:u("of.files"),children:E}),r&&(0,d.jsx)(v,{title:u("of.vars"),wide:!0,children:(0,d.jsx)(o.W,{value:a.variables,onChange:a=>b("variables",a),fileEnvs:D,fileVars:q?.fileVars,used:q?.used,fileDefined:q?.fileDefined,setBy:q?.setBy})})]}):"database"===a.kind?(0,d.jsx)(p.dN,{d:a,set:b,setD:c,objectId:t,creating:r}):"cluster"===a.kind?(0,d.jsx)(v,{title:u("of.members"),hint:u("obj.f.members.hint"),children:(()=>{let c=y.filter(b=>("server"===b.kind||"docker"===b.kind)&&(b.colony_id??"")===a.colony_id);return c.length?(0,d.jsx)("div",{className:"omembers",children:c.map(c=>{let{icon:e,color:f}=n.Nd[c.kind],g=a.members.indexOf(c.id);return(0,d.jsxs)("label",{className:"omember",children:[(0,d.jsx)("input",{type:"checkbox",checked:g>=0,onChange:()=>{let d;return d=c.id,b("members",a.members.includes(d)?a.members.filter(a=>a!==d):[...a.members,d])}}),(0,d.jsx)(e,{size:15,style:{color:f}}),(0,d.jsx)("span",{className:"nm",children:c.name}),g>=0&&(0,d.jsx)("span",{className:"ord",children:g+1})]},c.id)})}):(0,d.jsx)("p",{className:"muted small res-m0",children:u("obj.f.members.none")})})()}):"server"===a.kind?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(v,{title:u("of.run"),children:[(0,d.jsx)(i.dR,{value:a.cwd,onChange:a=>b("cwd",a),label:u("obj.f.folder"),hint:u("obj.f.folder.hint")}),(0,d.jsx)(i.D0,{label:u("obj.f.start"),hint:u("obj.f.start.hint"),children:A("start",{placeholder:"npm run dev",mono:!0})}),(0,d.jsx)(i.D0,{label:u("obj.f.stop"),hint:u("obj.f.stop.hint"),children:A("stop",{mono:!0})}),(0,d.jsx)(i.D0,{label:u("obj.f.port"),hint:u("obj.f.port.hint"),children:A("port",{placeholder:"3000"})})]}),(0,d.jsx)(v,{title:u("of.env"),children:(0,d.jsx)(i.D0,{label:u("obj.f.env"),hint:u("obj.f.env.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:5,value:a.env,onChange:a=>b("env",a.target.value)})})}),(0,d.jsxs)(v,{title:u("obj.sup.crash"),hint:u("obj.sup.note"),children:[(0,d.jsx)(i.D0,{label:u("obj.sup.restart"),hint:u("obj.sup.restart.hint"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("select",{className:"select",value:a.restart,onChange:a=>b("restart",a.target.value),children:[(0,d.jsx)("option",{value:"no",children:u("obj.sup.restart.no")}),(0,d.jsx)("option",{value:"on-failure",children:u("obj.sup.restart.fail")}),(0,d.jsx)("option",{value:"always",children:u("obj.sup.restart.always")})]}),("no"!==a.restart||a.healthRestart)&&(0,d.jsx)("input",{className:"input res-mw130",value:a.maxRestarts,placeholder:u("obj.sup.max"),onChange:a=>b("maxRestarts",a.target.value),title:u("obj.sup.max.hint"),"aria-label":u("obj.sup.max")})]})}),(0,d.jsxs)("details",{className:"fold of-fold",children:[(0,d.jsxs)("summary",{children:[u("obj.sup.more"),(0,d.jsx)(h.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"8"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.logMax"),hint:u("obj.sup.logMax.hint"),children:A("logMax",{placeholder:"5"})})]})]})]}),(0,d.jsxs)(v,{title:u("obj.sup.health"),hint:u("obj.sup.health.hint"),children:[(0,d.jsx)(i.D0,{label:u("obj.sup.health.how"),children:(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsxs)("select",{className:"select res-mw170",value:a.healthKind,onChange:a=>b("healthKind",a.target.value),children:[(0,d.jsx)("option",{value:"",children:u("obj.sup.health.none")}),(0,d.jsx)("option",{value:"http",children:"HTTP"}),(0,d.jsx)("option",{value:"tcp",children:u("obj.sup.health.tcp")}),(0,d.jsx)("option",{value:"command",children:u("obj.sup.health.command")})]}),a.healthKind&&(0,d.jsx)("input",{className:"input mono grow",value:a.healthTarget,onChange:a=>b("healthTarget",a.target.value),placeholder:"http"===a.healthKind?"http://127.0.0.1:3000/health":"tcp"===a.healthKind?"3000":"curl -fs localhost:3000","aria-label":u("obj.sup.health")})]})}),a.healthKind&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.Tl,{checked:a.healthRestart,onChange:a=>b("healthRestart",a),label:u("obj.sup.healthRestart")}),(0,d.jsx)("p",{className:"hint hint-block",children:(()=>{let b=Number(a.healthInterval)||15,c=Number(a.healthRetries)||3,d=Number(a.maxRestarts)||5;return u(a.healthRestart?"obj.sup.health.sumRestart":"obj.sup.health.sum",{a1:String(b),a2:String(c),a3:String(b*c),a4:String(d)})})()}),(0,d.jsxs)("details",{className:"fold of-fold",children:[(0,d.jsxs)("summary",{children:[u("obj.sup.timing"),(0,d.jsx)(h.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,d.jsxs)("div",{className:"of-grid3",children:[(0,d.jsx)(i.D0,{label:u("obj.sup.interval"),hint:u("obj.sup.interval.hint"),children:A("healthInterval",{placeholder:"15"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.timeout"),hint:u("obj.sup.timeout.hint"),children:A("healthTimeout",{placeholder:"5"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.retries"),hint:u("obj.sup.retries.hint"),children:A("healthRetries",{placeholder:"3"})})]})]})]})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v,{title:u("obj.f.mode"),children:(0,d.jsx)(i.$q,{value:a.mode,onChange:a=>b("mode",a),options:[...r?[{id:"template",label:u("obj.mode.template")}]:[],{id:"container",label:u("obj.mode.container")},{id:"compose",label:u("obj.mode.compose")},{id:"existing",label:u("obj.mode.existing")}]})}),"template"===a.mode&&(0,d.jsx)(v,{title:u("obj.mode.template"),hint:u("tpl.hint"),children:(0,d.jsx)(l,{template:a.template,values:a.tplValues,onPick:a=>c(b=>({...b,template:a.id,tplValues:Object.fromEntries(a.fields.map(a=>[a.key,a.default])),name:b.name.trim()?b.name:a.name})),onValue:(a,b)=>c(c=>({...c,tplValues:{...c.tplValues,[a]:b}}))})}),"container"===a.mode&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(v,{title:u("of.image"),children:[(0,d.jsxs)(i.D0,{label:u("obj.f.image"),children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("div",{className:"grow",children:(0,d.jsx)(j.b,{value:a.image,onChange:a=>b("image",a),mono:!0,placeholder:u("dk.pickImage"),ariaLabel:u("obj.f.image"),options:(z.images??[]).map(a=>({value:a.ref,hint:`${a.size}${a.created?` \xb7 ${a.created}`:""}`}))})}),C]}),B]}),(0,d.jsx)(i.D0,{label:u("obj.f.ports"),hint:u("obj.f.ports.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:2,value:a.ports,onChange:a=>b("ports",a.target.value),placeholder:"8080:80"})}),(0,d.jsxs)(i.D0,{label:u("obj.f.volumes"),hint:u("obj.f.volumes.hint"),children:[(0,d.jsx)("textarea",{className:"textarea mono",rows:2,value:a.volumes,onChange:a=>b("volumes",a.target.value)}),(0,d.jsx)(i.yQ,{bare:!0,value:"",buttonLabel:u("obj.f.volumes.add"),onChange:c=>b("volumes",`${a.volumes.trimEnd()}${a.volumes.trim()?"\n":""}${c}:/data`)})]})]}),(0,d.jsxs)(v,{title:u("of.env"),children:[(0,d.jsx)(i.D0,{label:u("obj.f.env"),hint:u("obj.f.env.hint"),children:(0,d.jsx)("textarea",{className:"textarea mono",rows:4,value:a.env,onChange:a=>b("env",a.target.value)})}),(0,d.jsx)(i.D0,{label:u("obj.f.restart"),children:(0,d.jsx)("select",{className:"select",value:a.dockerRestart,onChange:a=>b("dockerRestart",a.target.value),children:["no","always","unless-stopped","on-failure"].map(a=>(0,d.jsx)("option",{value:a,children:a},a))})}),(0,d.jsx)(i.D0,{label:u("obj.f.command"),children:A("command",{mono:!0})})]}),(0,d.jsx)(v,{title:u("of.limits"),hint:u("obj.dk.limits.hint"),children:(0,d.jsxs)("div",{className:"of-grid2",children:[(0,d.jsx)(i.D0,{label:u("obj.dk.memory"),children:A("memory",{placeholder:"512m"})}),(0,d.jsx)(i.D0,{label:u("obj.dk.cpus"),children:A("cpus",{placeholder:"1.5"})}),(0,d.jsx)(i.D0,{label:u("obj.dk.network"),children:A("network",{placeholder:"bridge"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),children:A("stopTimeout",{placeholder:"10"})}),(0,d.jsx)(i.D0,{label:u("obj.sup.logMax"),children:A("logMax",{placeholder:"10"})})]})})]}),"compose"===a.mode&&(0,d.jsxs)(v,{title:u("obj.mode.compose"),children:[(0,d.jsx)(i.yQ,{mode:"file",exts:["yml","yaml"],value:a.file,onChange:a=>b("file",a),label:u("obj.f.file"),hint:u("obj.f.file.hint"),placeholder:"/home/you/app/docker-compose.yml"}),(0,d.jsx)(w,{file:a.file,project:a.project,services:a.services,onServices:a=>b("services",a),onProject:a=>b("project",a)}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"10"})})]}),"existing"===a.mode&&(0,d.jsxs)(v,{title:u("obj.mode.existing"),children:[(0,d.jsxs)(i.D0,{label:u("obj.f.container"),hint:u("obj.f.container.hint"),children:[(0,d.jsxs)("div",{className:"row gap-s",children:[(0,d.jsx)("div",{className:"grow",children:(0,d.jsx)(j.b,{value:a.container,onChange:a=>b("container",a),mono:!0,placeholder:u("dk.pickContainer"),ariaLabel:u("obj.f.container"),options:(z.containers??[]).map(a=>({value:a.name,hint:`${a.image} \xb7 ${a.state}${a.managed?` \xb7 ${u("dk.managed")}`:""}`}))})}),C]}),B]}),(0,d.jsx)(i.D0,{label:u("obj.sup.stopTimeout"),hint:u("obj.sup.stopTimeout.hint"),children:A("stopTimeout",{placeholder:"10"})})]})]})]})}function y(a){let[b,c]=(0,f.useState)(a);return{d:b,setD:c,set:(a,b)=>c(c=>({...c,[a]:b}))}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=612,exports.ids=[612],exports.modules={33165:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},40413:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},48612:(a,b,c)=>{c.d(b,{ry:()=>R,BZ:()=>P});var d=c(55322),e=c(17027),f=c(37070),g=c(31826),h=c(40413),i=c(33165),j=c(30257),k=c(78574),l=c(51537);let m=(0,l.A)("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);var n=c(29083),o=c(47087),p=c(31251),q=c(84300),r=c(36414),s=c(93351),t=c(12675),u=c(7371),v=c(60570),w=c(73269),x=c(61162),y=c(81963),z=c(2335);let A=(0,l.A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var B=c(91313);let C=(0,l.A)("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]),D=/^\[hive:channel\] (.+?) · Place: (.+?) · Thread: (.+?) · From: (.+?)((?: · (?:Addressed|Muted): \w+| · To: [^·\n]+)*)(?: · Now: [^\n]*)?\nMessage:\n([\s\S]*)$/,E="\n\n[hive:context]\n",F="\n\n[hive:files]\n";var G=c(93884);function H({text:a,badge:b,agentId:c}){let{t:e}=(0,G.s9)(),f=function(a){let b=D.exec(a);if(!b)return null;let[c,...d]=b[6].split(E),[e,...f]=c.split(F),g=f.join(F).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^\d+-\d+-/,""),detail:b[2]}]:[]});return{platform:b[1],place:b[2],thread:b[3],from:b[4],body:e,files:g,overheard:/Addressed: no/.test(b[5]),muted:/Muted: yes/.test(b[5]),context:d.join(E)}}(a),g=f?null:function(a){let b=a.indexOf(F);if(b<0)return null;let c=a.slice(b+F.length).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^web-\d+-\d+-/,""),detail:b[2]}]:[]});return c.length?{body:a.slice(0,b),files:c}:null}(a);return g?(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsxs)("div",{className:"bubble",children:[g.body.trim()&&"(no text)"!==g.body.trim()&&(0,d.jsx)("div",{children:g.body.trim()}),(0,d.jsx)("div",{className:"bubble-imgs",children:g.files.map(a=>{let b=c?`/api/agents/${c}/inbox?path=${encodeURIComponent(a.path)}`:void 0;return c&&/\.(png|jpe?g|gif|webp)$/i.test(a.path)?(0,d.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",title:a.name,children:(0,d.jsx)("img",{src:b,alt:a.name,loading:"lazy"})},a.path):(0,d.jsxs)("a",{className:"chfile",href:b,download:a.name,title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path)})})]}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]}):f?(0,d.jsx)("div",{className:"msg user",children:(0,d.jsxs)("div",{className:"bubble channel",children:[(0,d.jsxs)("div",{className:"chhead",children:[(0,d.jsx)(B.A,{size:12,"aria-hidden":!0}),(0,d.jsx)("b",{children:f.platform}),(0,d.jsx)("span",{children:f.place}),f.overheard&&(0,d.jsxs)("span",{className:"chtag",title:e("chat.channel.overheard.hint"),children:[(0,d.jsx)(C,{size:11,"aria-hidden":!0}),e("chat.channel.overheard")]}),(0,d.jsx)("span",{className:"chfrom",children:f.from.replace(/\s*\(.*\)$/,"")})]}),(0,d.jsx)("div",{className:"chbody",children:f.body}),f.files.length>0&&(0,d.jsx)("div",{className:"chfiles",children:f.files.map(a=>(0,d.jsxs)("span",{className:"chfile",title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path))}),f.context&&(0,d.jsxs)("details",{className:"chctx",children:[(0,d.jsx)("summary",{children:e("chat.channel.context",{n:f.context.split("\n").filter(a=>a.startsWith("- ")).length})}),(0,d.jsx)("pre",{children:f.context.replace(/^[^\n]*\n/,"")})]})]})}):(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsx)("div",{className:"bubble",children:a}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]})}var I=c(30584);function J({m:a}){let{t:b}=(0,G.s9)(),c=a.meta?.usage,e=a.blocks.filter(a=>"tool"===a.type).length;if(!c&&!a.durationMs&&!e)return null;let f=(0,I.RP)(c);return(0,d.jsxs)("div",{className:"replymeta",children:[a.meta?.model&&(0,d.jsx)("span",{className:"mono",children:a.meta.model.replace(/^claude-/,"").replace(/-\d{8}$/,"")}),f>0&&(0,d.jsxs)("span",{title:c?b("chat.tokenDetail",{input:c.input,output:c.output,cacheRead:c.cacheRead,cacheWrite:c.cacheWrite}):"",children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)(c.input+c.cacheRead+c.cacheWrite),out:(0,I.yj)(c.output)})]}),c?.credits?(0,d.jsxs)("span",{children:[(0,d.jsx)(i.A,{size:12}),b("chat.credits",{value:c.credits.toFixed(2)})]}):null,a.meta?.cost!==void 0&&(0,d.jsxs)("span",{title:b(a.meta.costEstimated?"stats.costEstimated":"stats.costReported"),children:[(0,d.jsx)(i.A,{size:12}),a.meta.costEstimated?"≈ ":"",(0,I.F0)(a.meta.cost)]}),e>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:e})]}),a.durationMs?(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)(a.durationMs)]}):null]})}let K=/usage limit|quota|insufficient|rate.?limit|too many requests|credits/i;function L({agent:a,error:b,onDone:c}){let{t:f}=(0,G.s9)(),g=(0,y.dj)(),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1),l=async()=>{k(!0);try{await u.FH.post(`/agents/${a.id}/compact`),g(f("chat.compacted"),"ok"),c()}catch(a){g(f("chat.compactFailed",{reason:a instanceof Error?a.message:String(a)}),"err")}finally{k(!1)}},m=K.test(b);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("span",{className:"muted",children:f(m?"chat.failedHintLimit":h?"chat.failedHintCompact":"chat.failedHint")}),h&&!m&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("button",{type:"button",className:"btn sm",disabled:j,onClick:()=>void l(),children:j?f("chat.compacting"):f("chat.compact")})]})]})}function M({turn:a}){let{t:b}=(0,G.s9)(),[,c]=(0,e.useState)(0),f=!!a.error,g=(0,e.useRef)(0);f&&!g.current&&(g.current=Date.now());let i=a.usage,l=a.blocks.filter(a=>"tool"===a.type).length;return(0,d.jsxs)("div",{className:"replymeta live",children:[(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)((f?g.current:Date.now())-a.startedAt)]}),l>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:l})]}),i&&(i.output??0)>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)((i.input??0)+(i.cacheRead??0)+(i.cacheWrite??0)),out:(0,I.yj)(i.output??0)})]}),i?.contextPct!==void 0&&(0,d.jsx)("span",{children:b("chat.contextPct",{pct:i.contextPct.toFixed(1)})})]})}let N=(0,e.memo)(function({text:a}){return(0,d.jsx)("div",{className:"md",children:(0,d.jsx)(f.oz,{remarkPlugins:[g.A],children:a})})}),O=(0,e.memo)(function({blocks:a,streaming:b}){let{t:c}=(0,G.s9)();return(0,d.jsxs)(d.Fragment,{children:[a.map((e,f)=>"text"===e.type?(0,d.jsx)(N,{text:e.text},f):"thinking"===e.type?(0,d.jsxs)("details",{className:"fold think",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(m,{size:14}),b&&f===a.length-1?c("activity.thinking"):c("chat.thought"),(0,d.jsx)(n.A,{size:14,className:"chev"})]}),(0,d.jsx)("pre",{children:e.text})]},f):(0,d.jsx)(z.Dm,{tool:e,streaming:b},f)),(0,d.jsx)(z.Kt,{blocks:a})]})}),P=(0,e.memo)(function({msgs:a,agent:b}){let{t:c}=(0,G.s9)(),f=(0,e.useMemo)(()=>(function(a){let b=[],c=null;for(let d of a){let a;if("user"===d.role){c=d.ts,b.push(d);continue}if(d.compact){b.push(d);continue}let e=b[b.length-1],f=(a,b)=>{if(!a)return b;if(!b)return a;let c=a.usage,d=b.usage;return{model:b.model??a.model,endTs:b.endTs??a.endTs,cost:void 0!==a.cost||void 0!==b.cost?(a.cost??0)+(b.cost??0):void 0,costEstimated:a.costEstimated||b.costEstimated,usage:c&&d?{input:c.input+d.input,output:c.output+d.output,cacheRead:c.cacheRead+d.cacheRead,cacheWrite:c.cacheWrite+d.cacheWrite,reasoning:c.reasoning+d.reasoning,credits:(c.credits??0)+(d.credits??0)||void 0,contextPct:d.contextPct??c.contextPct}:c??d}};e?.role!=="assistant"||e.compact?(a={...d},b.push(a)):(a={...e,blocks:[...e.blocks,...d.blocks],meta:f(e.meta,d.meta)},b[b.length-1]=a);let g=a.meta?.endTs;a.durationMs=c&&g?Math.max(0,g-c):void 0}return b})(a),[a]);return(0,d.jsx)(d.Fragment,{children:f.map(a=>a.compact?(0,d.jsx)("div",{className:"compact-mark",role:"separator",children:(0,d.jsx)("span",{children:c("chat.compactMark",{pre:(0,I.yj)(a.compact.pre),post:(0,I.yj)(a.compact.post)})})},a.id):"user"===a.role?(0,d.jsx)(H,{agentId:b.id,text:a.blocks.map(a=>"text"===a.type?a.text:"").join("")},a.id):(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:b,size:"sm"}),b.name,(0,d.jsx)("span",{className:"stamp",children:a.ts?(0,x.KN)(a.ts):""})]}),(0,d.jsx)(O,{blocks:a.blocks}),(0,d.jsx)(J,{m:a})]},a.id))})},(a,b)=>a.msgs===b.msgs&&a.agent.id===b.agent.id&&a.agent.name===b.agent.name&&a.agent.provider===b.agent.provider&&a.agent.role===b.agent.role),Q=(0,e.memo)(function({agentId:a,name:b,running:c,queued:f,readOnly:g,onSend:h,onStop:i,toolsOpen:j,onToggleTools:k}){let{t:l}=(0,G.s9)(),[m,n]=(0,w.ud)(`hive-am.draft.${a}`,""),[s,t]=(0,e.useState)([]),[u,v]=(0,e.useState)(!1),x=(0,y.dj)(),z=(0,e.useRef)(null),A=(0,e.useRef)(null),B=()=>{let a=z.current;a&&(a.style.height="auto",a.style.height=Math.min(a.scrollHeight,200)+"px")},C=async a=>{let b=a.slice(0,Math.max(0,5-s.length));b.length<a.length&&x(l("chat.img.max",{n:5}),"err");let c=b.filter(a=>a.size<=0x1400000&&a.size>0);c.length<b.length&&x(l("chat.img.big",{mb:20}),"err");let d=await Promise.all(c.map((a,b)=>new Promise((c,d)=>{let e=new FileReader;e.onload=()=>c({id:`${Date.now()}-${b}`,name:a.name&&"image.png"!==a.name?a.name:`pasted-${b+1}.png`,data:String(e.result),type:a.type,size:a.size}),e.onerror=()=>d(e.error),e.readAsDataURL(a)})));t(a=>[...a,...d])},D=async()=>{let a=m.trim();(a||s.length)&&(n(""),t([]),requestAnimationFrame(B),await h(a,s.map(({name:a,data:b,type:c})=>({name:a,data:b,type:c})))||(n(a),t(s),requestAnimationFrame(B)))};return(0,d.jsxs)("div",{className:"composer",children:[g?(0,d.jsx)("div",{className:"composer-box chat-readonly",children:(0,d.jsx)("span",{className:"muted",children:l("chat.readOnly")})}):(0,d.jsxs)("div",{className:`composer-box ${u?"over":""}`,onDragOver:a=>{[...a.dataTransfer.types].includes("Files")&&(a.preventDefault(),v(!0))},onDragLeave:()=>v(!1),onDrop:a=>{v(!1);let b=[...a.dataTransfer.files];b.length&&(a.preventDefault(),C(b))},children:[s.length>0&&(0,d.jsx)("div",{className:"cmp-imgs",children:s.map(a=>{let b;return(0,d.jsxs)("span",{className:`cmp-img${a.type.startsWith("image/")?"":" file"}`,title:a.name,children:[a.type.startsWith("image/")?(0,d.jsx)("img",{src:a.data,alt:a.name}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.A,{size:14,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),(0,d.jsx)("i",{children:(b=a.size)<1024?`${b} B`:b<1048576?`${Math.round(b/1024)} KB`:`${(b/1024/1024).toFixed(1)} MB`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>t(b=>b.filter(b=>b.id!==a.id)),"aria-label":l("chat.img.remove",{name:a.name}),title:l("chat.img.remove",{name:a.name}),children:(0,d.jsx)(p.A,{size:12})})]},a.id)})}),(0,d.jsx)("input",{ref:A,type:"file",multiple:!0,hidden:!0,onChange:a=>{C([...a.target.files??[]]),a.target.value=""}}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon",onClick:()=>A.current?.click(),"aria-label":l("chat.img.attach"),title:l("chat.img.attach"),children:(0,d.jsx)(o.A,{size:18})}),(0,d.jsx)("textarea",{ref:z,rows:1,onPaste:a=>{let b=[...a.clipboardData.files];!b.length||a.clipboardData.getData("text/plain").trim()||(a.preventDefault(),C(b))},value:m,placeholder:c?l("chat.queuePlaceholder"):l("chat.placeholder",{name:b}),"aria-label":l("chat.messageLabel"),onChange:a=>{n(a.target.value),B()},onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),D())}}),c&&(0,d.jsxs)("button",{className:"btn",onClick:i,"aria-label":l("chat.stop"),children:[(0,d.jsx)(q.A,{size:14,fill:"currentColor"}),l("chat.stop")]}),(0,d.jsx)("button",{className:"btn primary icon",onClick:()=>void D(),disabled:!m.trim()&&!s.length,"aria-label":l("chat.send"),children:(0,d.jsx)(r.A,{size:18})})]}),(0,d.jsxs)("div",{className:"composer-meta",children:[(0,d.jsx)("span",{children:l("chat.keys")}),(0,d.jsx)("button",{type:"button",className:"linkbtn",onClick:k,children:j?l("chat.collapseTools"):l("chat.expandTools")}),f>0&&(0,d.jsx)("span",{children:l("queue.count",{count:f})})]})]})});function R({agent:a,sessionOverride:b}){let{t:c}=(0,G.s9)(),{agents:f}=(0,v.q5)(),{clearLive:g}=(0,v.zd)(),h=(0,y.dj)(),[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(60),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null),[r,w]=(0,e.useState)([]),[x,A]=(0,e.useState)(null),B=(0,e.useRef)(null),C=(0,e.useRef)(!0),D=(0,e.useRef)(0),E=(0,e.useRef)(0),F=(0,e.useCallback)(()=>{E.current=performance.now()},[]),[I,J]=(0,e.useState)(!1),K=(0,e.useCallback)(()=>{C.current=!1,J(!0)},[]),N=(0,e.useCallback)(()=>{let a=B.current;C.current=!0,J(!1),a&&(a.scrollTop=a.scrollHeight)},[]),R=(0,v.M_)(a.id),S="running"===a.status||!!R&&!R.error,T=void 0!==b&&b!==a.session_id;(0,e.useCallback)(()=>{let c=T?b:a.session_id;return c?u.FH.get(`/agents/${a.id}/history?session=${encodeURIComponent(c)}&limit=${m}`).then(a=>{j(a.messages),p(a.total??a.messages.length),l(!0)}).catch(a=>{h(a.message,"err"),l(!0)}):(j([]),p(0),l(!0),Promise.resolve())},[a.id,a.session_id,T,b,h,m]);let U=(0,e.useCallback)(()=>{q.current=B.current?.scrollHeight??null,K(),n(a=>a+120)},[K]),V=(0,v.SV)(a.id);(0,e.useRef)(!0).current=!R&&"running"!==a.status&&!a.queued;let W=(0,e.useCallback)(async(b,d=[])=>{if(T)return!1;w(a=>[...a,b]),N();try{let c=await u.FH.post(`/agents/${a.id}/messages`,{prompt:b,...d.length?{files:d}:{}});return c.prompt&&c.prompt!==b&&w(a=>{let d=a.lastIndexOf(b);return d<0?a:a.map((a,b)=>b===d?c.prompt:a)}),!0}catch(a){return w(a=>{let c=a.lastIndexOf(b);return c<0?a:a.filter((a,b)=>b!==c)}),h(a instanceof Error?a.message:c("chat.sendFailed"),"err"),!1}},[a.id,T,h,c,N]),X=(0,e.useCallback)(()=>{u.FH.post(`/agents/${a.id}/stop`).catch(()=>void 0)},[a.id]),Y=(0,e.useCallback)(()=>A(a=>!a),[]),Z=r.filter((a,b)=>!(R&&b===r.findIndex(a=>a.trim()===R.prompt.trim()))),$=k&&!i.length&&!R&&!r.length;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.Qh.Provider,{value:x,children:(0,d.jsxs)("div",{className:"thread-wrap",children:[(0,d.jsx)("div",{className:"thread",ref:B,role:"log","aria-label":c("fa.chat.log",{name:a.name}),"aria-live":R?"off":"polite","aria-relevant":"additions",tabIndex:-1,onWheel:a=>{a.deltaY<0&&K()},onTouchStart:F,onTouchMove:F,onPointerDown:F,onPointerMove:a=>{a.buttons&&F()},onKeyDown:a=>{!["PageUp","ArrowUp","Home"].includes(a.key)||a.target instanceof HTMLTextAreaElement||K()},onScroll:a=>{let b=a.currentTarget;b.scrollHeight-b.scrollTop-b.clientHeight<40?(C.current=!0,J(!1)):b.scrollTop<D.current-1&&performance.now()-E.current<700&&K(),D.current=b.scrollTop},children:(0,d.jsxs)("div",{className:`thread-inner ${k?"in":""}`,children:[$&&(0,d.jsx)("div",{className:"mt-l",children:(0,d.jsx)(y.pp,{icon:(0,d.jsx)(y._h,{agent:a,size:"lg"}),title:c("chat.empty.title",{name:a.name}),body:"orchestrator"===a.role?c("chat.empty.orchestrator"):c("chat.empty.worker")})}),o>i.length&&(0,d.jsx)("button",{type:"button",className:"btn sm chat-earlier",onClick:U,children:c("chat.earlier",{n:o-i.length})}),(0,d.jsx)(P,{msgs:i,agent:a}),R&&(0,d.jsxs)(d.Fragment,{children:["dispatch"===R.source?(0,d.jsxs)("div",{className:"delegation-card",children:[(0,d.jsxs)("div",{className:"head",children:[(0,d.jsx)(s.A,{size:14}),c("chat.delegatedFrom",{name:f.find(a=>a.id===R.from)?.name??c("chat.anOrchestrator")})]}),(0,d.jsx)("p",{children:R.prompt}),(0,d.jsx)("span",{className:"hint",children:c("chat.delegatedNote")})]}):!i.some(a=>"user"===a.role&&a.blocks.some(a=>"text"===a.type&&a.text.trim()===R.prompt.trim()))&&(0,d.jsx)(H,{text:R.prompt,agentId:a.id}),(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:a,size:"sm"}),a.name]}),(0,d.jsx)(O,{blocks:R.blocks,streaming:!0}),!R.error&&(0,d.jsxs)("span",{className:"typing","aria-label":c("common.working"),children:[(0,d.jsx)("i",{}),(0,d.jsx)("i",{}),(0,d.jsx)("i",{})]}),(0,d.jsx)(M,{turn:R}),R.error&&(0,d.jsxs)(y.lZ,{kind:"err",onDismiss:()=>g(a.id),children:[(0,G.YF)(R.error),(0,d.jsx)(L,{agent:a,error:R.error,onDone:()=>g(a.id)})]})]})]}),Z.map((b,e)=>(0,d.jsx)(H,{agentId:a.id,text:b,badge:R?c("chat.queuedBadge"):void 0},`${e}:${b}`))]})}),I&&(0,d.jsxs)("button",{type:"button",className:"btn sm chat-jump",onClick:N,children:[(0,d.jsx)(t.A,{size:14,"aria-hidden":!0}),c("fa.chat.jump")]})]})}),(0,d.jsx)("span",{className:"chat-sr",role:"status",children:R?c("fa.chat.working",{name:a.name}):V?c("fa.chat.done",{name:a.name}):""}),(0,d.jsx)(Q,{agentId:a.id,name:a.name,running:S,queued:a.queued??0,readOnly:T,onSend:W,onStop:X,toolsOpen:x,onToggleTools:Y})]})}},78574:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},91313:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}};
|
|
1
|
+
"use strict";exports.id=612,exports.ids=[612],exports.modules={33165:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},40413:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},48612:(a,b,c)=>{c.d(b,{ry:()=>R,BZ:()=>P});var d=c(55322),e=c(17027),f=c(37070),g=c(31826),h=c(40413),i=c(33165),j=c(30257),k=c(78574),l=c(51537);let m=(0,l.A)("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);var n=c(29083),o=c(47087),p=c(31251),q=c(84300),r=c(36414),s=c(93351),t=c(12675),u=c(7371),v=c(60570),w=c(73269),x=c(61162),y=c(81963),z=c(2335);let A=(0,l.A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var B=c(91313);let C=(0,l.A)("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]),D=/^\[hive:channel\] (.+?) · Place: (.+?) · Thread: (.+?) · From: (.+?)((?: · (?:Addressed|Muted): \w+| · To: [^·\n]+)*)(?: · Now: [^\n]*)?\nMessage:\n([\s\S]*)$/,E="\n\n[hive:context]\n",F="\n\n[hive:files]\n";var G=c(93884);function H({text:a,badge:b,agentId:c}){let{t:e}=(0,G.s9)(),f=function(a){let b=D.exec(a);if(!b)return null;let[c,...d]=b[6].split(E),[e,...f]=c.split(F),g=f.join(F).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^\d+-\d+-/,""),detail:b[2]}]:[]});return{platform:b[1],place:b[2],thread:b[3],from:b[4],body:e,files:g,overheard:/Addressed: no/.test(b[5]),muted:/Muted: yes/.test(b[5]),context:d.join(E)}}(a),g=f?null:function(a){let b=a.indexOf(F);if(b<0)return null;let c=a.slice(b+F.length).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^web-\d+-\d+-/,""),detail:b[2]}]:[]});return c.length?{body:a.slice(0,b),files:c}:null}(a);return g?(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsxs)("div",{className:"bubble",children:[g.body.trim()&&"(no text)"!==g.body.trim()&&(0,d.jsx)("div",{children:g.body.trim()}),(0,d.jsx)("div",{className:"bubble-imgs",children:g.files.map(a=>{let b=c?`/api/agents/${c}/inbox?path=${encodeURIComponent(a.path)}`:void 0;return c&&/\.(png|jpe?g|gif|webp)$/i.test(a.path)?(0,d.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",title:a.name,children:(0,d.jsx)("img",{src:b,alt:a.name,loading:"lazy"})},a.path):(0,d.jsxs)("a",{className:"chfile",href:b,download:a.name,title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path)})})]}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]}):f?(0,d.jsx)("div",{className:"msg user",children:(0,d.jsxs)("div",{className:"bubble channel",children:[(0,d.jsxs)("div",{className:"chhead",children:[(0,d.jsx)(B.A,{size:12,"aria-hidden":!0}),(0,d.jsx)("b",{children:f.platform}),(0,d.jsx)("span",{children:f.place}),f.overheard&&(0,d.jsxs)("span",{className:"chtag",title:e("chat.channel.overheard.hint"),children:[(0,d.jsx)(C,{size:11,"aria-hidden":!0}),e("chat.channel.overheard")]}),(0,d.jsx)("span",{className:"chfrom",children:f.from.replace(/\s*\(.*\)$/,"")})]}),(0,d.jsx)("div",{className:"chbody",children:f.body}),f.files.length>0&&(0,d.jsx)("div",{className:"chfiles",children:f.files.map(a=>(0,d.jsxs)("span",{className:"chfile",title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path))}),f.context&&(0,d.jsxs)("details",{className:"chctx",children:[(0,d.jsx)("summary",{children:e("chat.channel.context",{n:f.context.split("\n").filter(a=>a.startsWith("- ")).length})}),(0,d.jsx)("pre",{children:f.context.replace(/^[^\n]*\n/,"")})]})]})}):(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsx)("div",{className:"bubble",children:a}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]})}var I=c(30584);function J({m:a}){let{t:b}=(0,G.s9)(),c=a.meta?.usage,e=a.blocks.filter(a=>"tool"===a.type).length;if(!c&&!a.durationMs&&!e)return null;let f=(0,I.RP)(c);return(0,d.jsxs)("div",{className:"replymeta",children:[a.meta?.model&&(0,d.jsx)("span",{className:"mono",children:a.meta.model.replace(/^claude-/,"").replace(/-\d{8}$/,"")}),f>0&&(0,d.jsxs)("span",{title:c?b("chat.tokenDetail",{input:c.input,output:c.output,cacheRead:c.cacheRead,cacheWrite:c.cacheWrite}):"",children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)(c.input+c.cacheRead+c.cacheWrite),out:(0,I.yj)(c.output)})]}),c?.credits?(0,d.jsxs)("span",{children:[(0,d.jsx)(i.A,{size:12}),b("chat.credits",{value:c.credits.toFixed(2)})]}):null,a.meta?.cost!==void 0&&(0,d.jsxs)("span",{title:b(a.meta.costEstimated?"stats.costEstimated":"stats.costReported"),children:[(0,d.jsx)(i.A,{size:12}),a.meta.costEstimated?"≈ ":"",(0,I.F0)(a.meta.cost)]}),e>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:e})]}),a.durationMs?(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)(a.durationMs)]}):null]})}let K=/usage limit|quota|insufficient|rate.?limit|too many requests|credits/i;function L({agent:a,error:b,onDone:c}){let{t:f}=(0,G.s9)(),g=(0,y.dj)(),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1),l=async()=>{k(!0);try{await u.FH.post(`/agents/${a.id}/compact`),g(f("chat.compacted"),"ok"),c()}catch(a){g(f("chat.compactFailed",{reason:a instanceof Error?a.message:String(a)}),"err")}finally{k(!1)}},m=K.test(b);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("span",{className:"muted",children:f(m?"chat.failedHintLimit":h?"chat.failedHintCompact":"chat.failedHint")}),h&&!m&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("button",{type:"button",className:"btn sm",disabled:j,onClick:()=>void l(),children:j?f("chat.compacting"):f("chat.compact")})]})]})}function M({turn:a}){let{t:b}=(0,G.s9)(),[,c]=(0,e.useState)(0),f=!!a.error,g=(0,e.useRef)(0);f&&!g.current&&(g.current=Date.now());let i=a.usage,l=a.blocks.filter(a=>"tool"===a.type).length;return(0,d.jsxs)("div",{className:"replymeta live",children:[(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)((f?g.current:Date.now())-a.startedAt)]}),l>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:l})]}),i&&(i.output??0)>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)((i.input??0)+(i.cacheRead??0)+(i.cacheWrite??0)),out:(0,I.yj)(i.output??0)})]}),i?.contextPct!==void 0&&(0,d.jsx)("span",{children:b("chat.contextPct",{pct:i.contextPct.toFixed(1)})})]})}let N=(0,e.memo)(function({text:a}){return(0,d.jsx)("div",{className:"md",children:(0,d.jsx)(f.oz,{remarkPlugins:[g.A],children:a})})}),O=(0,e.memo)(function({blocks:a,streaming:b}){let{t:c}=(0,G.s9)();return(0,d.jsxs)(d.Fragment,{children:[a.map((e,f)=>"text"===e.type?(0,d.jsx)(N,{text:e.text},f):"thinking"===e.type?(0,d.jsxs)("details",{className:"fold think",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(m,{size:14}),b&&f===a.length-1?c("activity.thinking"):c("chat.thought"),(0,d.jsx)(n.A,{size:14,className:"chev"})]}),(0,d.jsx)("pre",{children:e.text})]},f):(0,d.jsx)(z.Dm,{tool:e,streaming:b},f)),(0,d.jsx)(z.Kt,{blocks:a})]})}),P=(0,e.memo)(function({msgs:a,agent:b}){let{t:c}=(0,G.s9)(),f=(0,e.useMemo)(()=>(function(a){let b=[],c=null;for(let d of a){let a;if("user"===d.role){c=d.ts,b.push(d);continue}if(d.compact){b.push(d);continue}let e=b[b.length-1],f=(a,b)=>{if(!a)return b;if(!b)return a;let c=a.usage,d=b.usage;return{model:b.model??a.model,endTs:b.endTs??a.endTs,cost:void 0!==a.cost||void 0!==b.cost?(a.cost??0)+(b.cost??0):void 0,costEstimated:a.costEstimated||b.costEstimated,usage:c&&d?{input:c.input+d.input,output:c.output+d.output,cacheRead:c.cacheRead+d.cacheRead,cacheWrite:c.cacheWrite+d.cacheWrite,reasoning:c.reasoning+d.reasoning,credits:(c.credits??0)+(d.credits??0)||void 0,contextPct:d.contextPct??c.contextPct}:c??d}};e?.role!=="assistant"||e.compact?(a={...d},b.push(a)):(a={...e,blocks:[...e.blocks,...d.blocks],meta:f(e.meta,d.meta)},b[b.length-1]=a);let g=a.meta?.endTs;a.durationMs=c&&g?Math.max(0,g-c):void 0}return b})(a),[a]);return(0,d.jsx)(d.Fragment,{children:f.map(a=>a.compact?(0,d.jsx)("div",{className:"compact-mark",role:"separator",children:(0,d.jsx)("span",{children:c("chat.compactMark",{pre:(0,I.yj)(a.compact.pre),post:(0,I.yj)(a.compact.post)})})},a.id):"user"===a.role?(0,d.jsx)(H,{agentId:b.id,text:a.blocks.map(a=>"text"===a.type?a.text:"").join("")},a.id):(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:b,size:"sm"}),b.name,(0,d.jsx)("span",{className:"stamp",children:a.ts?(0,x.KN)(a.ts):""})]}),(0,d.jsx)(O,{blocks:a.blocks}),(0,d.jsx)(J,{m:a})]},a.id))})},(a,b)=>a.msgs===b.msgs&&a.agent.id===b.agent.id&&a.agent.name===b.agent.name&&a.agent.provider===b.agent.provider&&a.agent.role===b.agent.role),Q=(0,e.memo)(function({agentId:a,name:b,running:c,queued:f,readOnly:g,onSend:h,onStop:i,toolsOpen:j,onToggleTools:k}){let{t:l}=(0,G.s9)(),[m,n]=(0,w.ud)(`hive-am.draft.${a}`,""),[s,t]=(0,e.useState)([]),[u,v]=(0,e.useState)(!1),x=(0,y.dj)(),z=(0,e.useRef)(null),A=(0,e.useRef)(null),B=()=>{let a=z.current;a&&(a.style.height="auto",a.style.height=Math.min(a.scrollHeight,200)+"px")},C=async a=>{let b=a.slice(0,Math.max(0,5-s.length));b.length<a.length&&x(l("chat.img.max",{n:5}),"err");let c=b.filter(a=>a.size<=0x1400000&&a.size>0);c.length<b.length&&x(l("chat.img.big",{mb:20}),"err");let d=await Promise.all(c.map((a,b)=>new Promise((c,d)=>{let e=new FileReader;e.onload=()=>c({id:`${Date.now()}-${b}`,name:a.name&&"image.png"!==a.name?a.name:`pasted-${b+1}.png`,data:String(e.result),type:a.type,size:a.size}),e.onerror=()=>d(e.error),e.readAsDataURL(a)})));t(a=>[...a,...d])},D=async()=>{let a=m.trim();(a||s.length)&&(n(""),t([]),requestAnimationFrame(B),await h(a,s.map(({name:a,data:b,type:c})=>({name:a,data:b,type:c})))||(n(a),t(s),requestAnimationFrame(B)))};return(0,d.jsxs)("div",{className:"composer",children:[g?(0,d.jsx)("div",{className:"composer-box chat-readonly",children:(0,d.jsx)("span",{className:"muted",children:l("chat.readOnly")})}):(0,d.jsxs)("div",{className:`composer-box ${u?"over":""}`,onDragOver:a=>{[...a.dataTransfer.types].includes("Files")&&(a.preventDefault(),v(!0))},onDragLeave:()=>v(!1),onDrop:a=>{v(!1);let b=[...a.dataTransfer.files];b.length&&(a.preventDefault(),C(b))},children:[s.length>0&&(0,d.jsx)("div",{className:"cmp-imgs",children:s.map(a=>{let b;return(0,d.jsxs)("span",{className:`cmp-img${a.type.startsWith("image/")?"":" file"}`,title:a.name,children:[a.type.startsWith("image/")?(0,d.jsx)("img",{src:a.data,alt:a.name}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.A,{size:14,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),(0,d.jsx)("i",{children:(b=a.size)<1024?`${b} B`:b<1048576?`${Math.round(b/1024)} KB`:`${(b/1024/1024).toFixed(1)} MB`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>t(b=>b.filter(b=>b.id!==a.id)),"aria-label":l("chat.img.remove",{name:a.name}),title:l("chat.img.remove",{name:a.name}),children:(0,d.jsx)(p.A,{size:12})})]},a.id)})}),(0,d.jsx)("input",{ref:A,type:"file",multiple:!0,hidden:!0,onChange:a=>{C([...a.target.files??[]]),a.target.value=""}}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon",onClick:()=>A.current?.click(),"aria-label":l("chat.img.attach"),title:l("chat.img.attach"),children:(0,d.jsx)(o.A,{size:18})}),(0,d.jsx)("textarea",{ref:z,rows:1,onPaste:a=>{let b=[...a.clipboardData.files];!b.length||a.clipboardData.getData("text/plain").trim()||(a.preventDefault(),C(b))},value:m,placeholder:c?l("chat.queuePlaceholder"):l("chat.placeholder",{name:b}),"aria-label":l("chat.messageLabel"),onChange:a=>{n(a.target.value),B()},onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),D())}}),c&&(0,d.jsxs)("button",{className:"btn",onClick:i,"aria-label":l("chat.stop"),children:[(0,d.jsx)(q.A,{size:14,fill:"currentColor"}),l("chat.stop")]}),(0,d.jsx)("button",{className:"btn primary icon",onClick:()=>void D(),disabled:!m.trim()&&!s.length,"aria-label":l("chat.send"),children:(0,d.jsx)(r.A,{size:18})})]}),(0,d.jsxs)("div",{className:"composer-meta",children:[(0,d.jsx)("span",{children:l("chat.keys")}),(0,d.jsx)("button",{type:"button",className:"linkbtn",onClick:k,children:j?l("chat.collapseTools"):l("chat.expandTools")}),f>0&&(0,d.jsx)("span",{children:l("queue.count",{count:f})})]})]})});function R({agent:a,sessionOverride:b}){let{t:c}=(0,G.s9)(),{agents:f}=(0,v.q5)(),{clearLive:g}=(0,v.zd)(),h=(0,y.dj)(),[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(60),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null),[r,w]=(0,e.useState)([]),[x,A]=(0,e.useState)(null),B=(0,e.useRef)(null),C=(0,e.useRef)(!0),D=(0,e.useRef)(0),E=(0,e.useRef)(0),F=(0,e.useCallback)(()=>{E.current=performance.now()},[]),[I,J]=(0,e.useState)(!1),K=(0,e.useCallback)(()=>{let a=B.current;return a?a.scrollHeight-a.scrollTop-a.clientHeight:0},[]),N=(0,e.useCallback)(()=>J(!C.current&&K()>=8),[K]),R=(0,e.useCallback)(()=>{C.current=!1,N()},[N]),S=(0,e.useCallback)(()=>{let a=B.current;C.current=!0,J(!1),a&&(a.scrollTop=a.scrollHeight)},[]),T=(0,e.useCallback)(()=>{let a=B.current;return!!a&&a.scrollHeight>a.clientHeight},[]),U=(0,v.M_)(a.id),V="running"===a.status||!!U&&!U.error,W=void 0!==b&&b!==a.session_id;(0,e.useCallback)(()=>{let c=W?b:a.session_id;return c?u.FH.get(`/agents/${a.id}/history?session=${encodeURIComponent(c)}&limit=${m}`).then(a=>{j(a.messages),p(a.total??a.messages.length),l(!0)}).catch(a=>{h(a.message,"err"),l(!0)}):(j([]),p(0),l(!0),Promise.resolve())},[a.id,a.session_id,W,b,h,m]);let X=(0,e.useCallback)(()=>{q.current=B.current?.scrollHeight??null,R(),n(a=>a+120)},[R]),Y=(0,v.SV)(a.id);(0,e.useRef)(!0).current=!U&&"running"!==a.status&&!a.queued;let Z=(0,e.useCallback)(async(b,d=[])=>{if(W)return!1;w(a=>[...a,b]),S();try{let c=await u.FH.post(`/agents/${a.id}/messages`,{prompt:b,...d.length?{files:d}:{}});return c.prompt&&c.prompt!==b&&w(a=>{let d=a.lastIndexOf(b);return d<0?a:a.map((a,b)=>b===d?c.prompt:a)}),!0}catch(a){return w(a=>{let c=a.lastIndexOf(b);return c<0?a:a.filter((a,b)=>b!==c)}),h(a instanceof Error?a.message:c("chat.sendFailed"),"err"),!1}},[a.id,W,h,c,S]),$=(0,e.useCallback)(()=>{u.FH.post(`/agents/${a.id}/stop`).catch(()=>void 0)},[a.id]),_=(0,e.useCallback)(()=>A(a=>!a),[]),aa=r.filter((a,b)=>!(U&&b===r.findIndex(a=>a.trim()===U.prompt.trim()))),ab=k&&!i.length&&!U&&!r.length;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.Qh.Provider,{value:x,children:(0,d.jsxs)("div",{className:"thread-wrap",children:[(0,d.jsx)("div",{className:"thread",ref:B,role:"log","aria-label":c("fa.chat.log",{name:a.name}),"aria-live":U?"off":"polite","aria-relevant":"additions",tabIndex:-1,onWheel:a=>{a.deltaY<0&&T()&&R()},onTouchStart:F,onTouchMove:F,onPointerDown:F,onPointerMove:a=>{a.buttons&&F()},onKeyDown:a=>{["PageUp","ArrowUp","Home"].includes(a.key)&&!(a.target instanceof HTMLTextAreaElement)&&T()&&R()},onScroll:a=>{let b=a.currentTarget;2>=K()?C.current=!0:b.scrollTop<D.current-1&&performance.now()-E.current<700&&(C.current=!1),N(),D.current=b.scrollTop},children:(0,d.jsxs)("div",{className:`thread-inner ${k?"in":""}`,children:[ab&&(0,d.jsx)("div",{className:"mt-l",children:(0,d.jsx)(y.pp,{icon:(0,d.jsx)(y._h,{agent:a,size:"lg"}),title:c("chat.empty.title",{name:a.name}),body:"orchestrator"===a.role?c("chat.empty.orchestrator"):c("chat.empty.worker")})}),o>i.length&&(0,d.jsx)("button",{type:"button",className:"btn sm chat-earlier",onClick:X,children:c("chat.earlier",{n:o-i.length})}),(0,d.jsx)(P,{msgs:i,agent:a}),U&&(0,d.jsxs)(d.Fragment,{children:["dispatch"===U.source?(0,d.jsxs)("div",{className:"delegation-card",children:[(0,d.jsxs)("div",{className:"head",children:[(0,d.jsx)(s.A,{size:14}),c("chat.delegatedFrom",{name:f.find(a=>a.id===U.from)?.name??c("chat.anOrchestrator")})]}),(0,d.jsx)("p",{children:U.prompt}),(0,d.jsx)("span",{className:"hint",children:c("chat.delegatedNote")})]}):!i.some(a=>"user"===a.role&&a.blocks.some(a=>"text"===a.type&&a.text.trim()===U.prompt.trim()))&&(0,d.jsx)(H,{text:U.prompt,agentId:a.id}),(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:a,size:"sm"}),a.name]}),(0,d.jsx)(O,{blocks:U.blocks,streaming:!0}),!U.error&&(0,d.jsxs)("span",{className:"typing","aria-label":c("common.working"),children:[(0,d.jsx)("i",{}),(0,d.jsx)("i",{}),(0,d.jsx)("i",{})]}),(0,d.jsx)(M,{turn:U}),U.error&&(0,d.jsxs)(y.lZ,{kind:"err",onDismiss:()=>g(a.id),children:[(0,G.YF)(U.error),(0,d.jsx)(L,{agent:a,error:U.error,onDone:()=>g(a.id)})]})]})]}),aa.map((b,e)=>(0,d.jsx)(H,{agentId:a.id,text:b,badge:U?c("chat.queuedBadge"):void 0},`${e}:${b}`))]})}),I&&(0,d.jsxs)("button",{type:"button",className:"btn sm chat-jump",onClick:S,children:[(0,d.jsx)(t.A,{size:14,"aria-hidden":!0}),c("fa.chat.jump")]})]})}),(0,d.jsx)("span",{className:"chat-sr",role:"status",children:U?c("fa.chat.working",{name:a.name}):Y?c("fa.chat.done",{name:a.name}):""}),(0,d.jsx)(Q,{agentId:a.id,name:a.name,running:V,queued:a.queued??0,readOnly:W,onSend:Z,onStop:$,toolsOpen:x,onToggleTools:_})]})}},78574:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},91313:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--YT6HM6qmegMJaBMX5QvuP--><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/582723fcea1f9887.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-113274e705940a55.js" async=""></script><script src="/_next/static/chunks/app/layout-fad968a635f9a4b3.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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" href="/chat"><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-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="t">Chat</span></a><a class="nav" 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 style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></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-113274e705940a55.js\",\"177\",\"static/chunks/app/layout-fad968a635f9a4b3.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[40523,[],\"OutletBoundary\"]\n7:I[91962,[],\"AsyncMetadataOutlet\"]\n9:I[40523,[],\"ViewportBoundary\"]\nb:I[40523,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne: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/582723fcea1f9887.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"YT6HM6qmegMJaBMX5QvuP\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/582723fcea1f9887.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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"f:I[13970,[],\"IconMark\"]\n8:{\"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\"}],[\"$\",\"$Lf\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--UDA414PFPu9ZROltNmjbX--><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/dfcaa19a8d46e60d.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-30e32d932b8b5a75.js" async=""></script><script src="/_next/static/chunks/app/layout-fad968a635f9a4b3.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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" href="/chat"><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-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg><span class="t">Chat</span></a><a class="nav" 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 style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></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-30e32d932b8b5a75.js\",\"177\",\"static/chunks/app/layout-fad968a635f9a4b3.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[40523,[],\"OutletBoundary\"]\n7:I[91962,[],\"AsyncMetadataOutlet\"]\n9:I[40523,[],\"ViewportBoundary\"]\nb:I[40523,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne: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/dfcaa19a8d46e60d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"UDA414PFPu9ZROltNmjbX\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/dfcaa19a8d46e60d.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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"f:I[13970,[],\"IconMark\"]\n8:{\"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\"}],[\"$\",\"$Lf\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" defer=""></script><script src="/_next/static/chunks/framework-bbac72adbbe2d328.js" defer=""></script><script src="/_next/static/chunks/main-c15f3fee674e0303.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d1670a2c6ce392fc.js" defer=""></script><script src="/_next/static/chunks/pages/_error-95aac014d202fa7a.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" defer=""></script><script src="/_next/static/chunks/framework-bbac72adbbe2d328.js" defer=""></script><script src="/_next/static/chunks/main-c15f3fee674e0303.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d1670a2c6ce392fc.js" defer=""></script><script src="/_next/static/chunks/pages/_error-95aac014d202fa7a.js" defer=""></script><script src="/_next/static/UDA414PFPu9ZROltNmjbX/_buildManifest.js" defer=""></script><script src="/_next/static/UDA414PFPu9ZROltNmjbX/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"UDA414PFPu9ZROltNmjbX","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"pFXdmtoWHVkmPb3lp7gHyz5r5GdnFYWwXLakyV5tr40="}
|