@aeolus-fleet/console 0.20.1 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/inbox/page.js.nft.json +1 -1
  13. package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/labels/page.js.nft.json +1 -1
  15. package/.next/server/app/labels/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/needs-attention/page.js.nft.json +1 -1
  17. package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/needs-crew/page.js.nft.json +1 -1
  19. package/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/page.js.nft.json +1 -1
  21. package/.next/server/app/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/settings/page.js.nft.json +1 -1
  23. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
  25. package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  27. package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/sign-in/page.js.nft.json +1 -1
  29. package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  30. package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
  31. package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  32. package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  33. package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
  35. package/.next/server/app/squadrons/page.js.nft.json +1 -1
  36. package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
  38. package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -1
  40. package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
  41. package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  42. package/.next/server/app/trierarchs/page.js.nft.json +1 -1
  43. package/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/version/route.js.nft.json +1 -1
  45. package/.next/server/chunks/_0h366h9._.js +1 -1
  46. package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +1 -1
  47. package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
  48. package/.next/server/chunks/ssr/_0xc3etp._.js +1 -1
  49. package/.next/server/chunks/ssr/_11cgy8n._.js +1 -1
  50. package/.next/server/chunks/ssr/_17u4fan._.js +1 -1
  51. package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
  52. package/.next/server/chunks/ssr/_1on9mjs._.js +1 -1
  53. package/.next/server/chunks/ssr/packages_console_0edevze._.js +1 -1
  54. package/.next/server/chunks/ssr/packages_console_0y7h5dm._.js +1 -1
  55. package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +1 -1
  56. package/.next/server/middleware-build-manifest.js +3 -3
  57. package/.next/server/pages/500.html +1 -1
  58. package/.next/server/server-reference-manifest.js +1 -1
  59. package/.next/server/server-reference-manifest.json +1 -1
  60. package/.next/static/chunks/{26dg2z_6kosr0.js → 0r8dost92fvd7.js} +1 -1
  61. package/.next/static/chunks/{1bvfk_-_enrxp.js → 1dj9u_t1hus9k.js} +1 -1
  62. package/.next/static/chunks/{28j4p-34f5axr.js → 1ntkufzth29k5.js} +1 -1
  63. package/.next/static/chunks/{3splvoavlf-cc.js → 23hfit3epwjh0.js} +1 -1
  64. package/.next/static/chunks/{3jsj5ozfio3me.js → 2c6e9e-s7rbf3.js} +1 -1
  65. package/.next/static/chunks/{1h0f7mfr5wxsj.js → 2ie6mvt-ssazt.js} +1 -1
  66. package/.next/static/chunks/{2wnrtdpkhbd_j.js → 2n90taswwrii-.js} +1 -1
  67. package/.next/static/chunks/{2spn0c35v7c1b.js → 3plldogn92kay.js} +1 -1
  68. package/.next/static/chunks/3x1-acncumcu6.js +1 -0
  69. package/package.json +3 -3
  70. package/.next/static/chunks/1ct431l_sosvm.js +0 -1
  71. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → va-oYqdgsZx7jVoPSVC3a}/_buildManifest.js +0 -0
  72. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → va-oYqdgsZx7jVoPSVC3a}/_clientMiddlewareManifest.js +0 -0
  73. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → va-oYqdgsZx7jVoPSVC3a}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},44561,39315,a=>{"use strict";var b=a.i(64831);let c={name:"folder-open",size:24,node:[["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",key:"usdka0"}]]};c.node;let d=(0,b.default)(c);a.s(["FolderOpen",0,d],44561);let e={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};e.node;let f=(0,b.default)(e);a.s(["GitBranch",0,f],39315)},53783,a=>{"use strict";var b=a.i(64831);let c={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},19665,a=>{"use strict";var b=a.i(87924),c=a.i(3512),d=a.i(72131),e=a.i(76166),f=a.i(12068),g=a.i(15439),h=a.i(2549),i=a.i(83786),j=a.i(68698);a.i(23600);var k=a.i(69040),l=a.i(93817),m=a.i(97024),n=a.i(73370),o=a.i(52357),p=a.i(80487),q=a.i(18691),r=a.i(84980),s=a.i(18441),t=a.i(2374),u=a.i(75297),v=a.i(45098),w=a.i(88647),x=a.i(40392);function y({activeNames:a,isPending:c,error:e,onSubmit:g}){let h=(0,d.useId)(),i=(0,d.useId)(),[j,l]=(0,d.useState)(""),o=(0,q.checkShipName)(j,{activeNames:a}),r="invalid"===o.kind||"reserved"===o.kind||"taken"===o.kind,t="available"===o.kind;return(0,b.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:a=>{a.preventDefault(),t&&g(j)},children:[(0,b.jsxs)(s.DialogHeader,{children:[(0,b.jsx)(s.DialogTitle,{children:"Join a machine"}),(0,b.jsx)(s.DialogDescription,{children:"The trierarch plugin commissions a trierarch ship of this name. You then run its setup line on the machine, and the trierarch there starts sessions for the crew requests it is given."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)(v.Label,{htmlFor:h,children:"Name"}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[j.length," / ",k.SHIP_HANDLE_MAX_LENGTH]})]}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(u.Input,{id:h,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"trierarch-mac","data-testid":"join-machine-name","aria-invalid":!!r||void 0,"aria-describedby":i,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:j,onChange:a=>{l((0,q.asHandle)(a.target.value))}}),"available"===o.kind?(0,b.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):r?(0,b.jsx)(n.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,b.jsx)("p",{id:i,"aria-live":"polite",className:(0,p.classNames)("text-meta",r?"text-destructive-text":"text-muted-foreground"),children:o.message})]}),void 0===e?null:(0,b.jsx)(x.InlineError,{title:"Couldn’t join the machine",description:`${e} Nothing changed.`}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(s.DialogClose,{render:(0,b.jsx)(f.Button,{type:"button",disabled:c}),children:"Cancel"}),(0,b.jsx)(f.Button,{type:"submit",variant:"primary",isLoading:c,disabled:!t,"data-testid":"join-machine-submit",children:c?"Joining":"Join machine"})]})]})}function z({joined:a}){let[c,e]=(0,d.useState)(!1),g=()=>{e(!1)},h=()=>{e(!0)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(s.DialogHeader,{children:[(0,b.jsxs)(s.DialogTitle,{children:[a.name," joined"]}),(0,b.jsxs)(s.DialogDescription,{children:["Run the setup line on the machine. It installs the trierarch, which then crews ",a.name," and reports what the machine offers."]})]}),(0,b.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,b.jsx)(o.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," It carries the ship’s secret. If you lose it, get a new starting prompt on ",a.name,"’s ship page."]})]}),(0,b.jsx)(r.CodeBlock,{label:"Setup line",code:a.setupLine,isWrapped:!0,copyLabel:`Copy the setup line for ${a.name}`,codeTestId:"join-machine-setup-line",copyTestId:"join-machine-setup-line-copy",onCopied:g,onCopyFailed:h}),(0,b.jsx)(r.CodeBlock,{label:`Starting prompt for ${a.name}`,code:a.prompt,isWrapped:!0,copyLabel:`Copy the starting prompt for ${a.name}`,codeTestId:"join-machine-prompt",onCopied:g,onCopyFailed:h}),(0,b.jsx)(w.CrewLines,{crewLines:a.crewLines,subject:a.name,testIdPrefix:"join-machine-crew-line",onCopied:g,onCopyFailed:h}),(0,b.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null}),(0,b.jsx)(s.DialogFooter,{children:(0,b.jsx)(s.DialogClose,{render:(0,b.jsx)(f.Button,{variant:"primary"}),children:"Done"})})]})}function A(a){let{isOpen:c,onOpenChange:d,isPending:e,joined:f}=a;return(0,b.jsx)(s.Dialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(s.DialogContent,{size:"md","data-testid":"join-machine-dialog",className:t.dialogSurface.phoneFullScreen,children:void 0===f?(0,b.jsx)(y,{...a}):(0,b.jsx)(z,{joined:f})})})}var B=a.i(15954),C=a.i(2466),D=a.i(65563),E=a.i(94764),F=a.i(90146),G=a.i(26949),H=a.i(67336),I=a.i(10023),J=a.i(68450),K=a.i(34159),L=a.i(10572),M=a.i(93454);a.s(["default",0,function(){let a=(0,J.useNow)(),k=(0,E.useAccountMenu)(a),l=(0,G.useOpenInboxCount)(),m=(0,I.useNeedsAttention)(),n=(0,I.useAttentionCount)(),o=(0,H.useLiveFleet)(),p=(0,F.useFleetSnapshot)(),q=(0,M.useTrierarchPluginConnection)(),r=(0,M.useMachines)(),s=(0,M.useTrierarchPluginVersion)(),t=(0,M.useJoinMachine)(),u=(0,D.useAccess)(),v=(0,K.usePluginNav)(),[w,x]=(0,d.useState)(!1),[y,z]=(0,d.useState)(!1),[N,O]=(0,d.useState)(!1);(0,L.useSignInWhenSessionEnds)([m.error,o.error]);let P=u.canManage&&"connected"===q,Q=()=>{t.reset(),x(!0)};return(0,b.jsxs)(C.ListLayout,{title:"Trierarchs",titleMeta:void 0===s?void 0:(0,b.jsxs)(e.Badge,{variant:"outline","data-testid":"trierarchs-plugin-version",children:["trierarch plugin ",s]}),description:"none"===q?"Not set up.":"Machines that run sessions for crew requests. The plugin picks a trierarch for each request.",live:o.live,nav:{active:"trierarchs",inboxCount:l,attentionCount:n,...v},primaryAction:P?(0,b.jsx)(f.Button,{variant:"primary",icon:(0,b.jsx)(c.Plus,{"aria-hidden":!0}),onClick:Q,"data-testid":"trierarchs-join",children:"Join a machine"}):void 0,onCompose:u.canSend?()=>{z(!0)}:void 0,onSearch:()=>{O(!0)},account:k,banner:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j.ConsoleNotices,{}),(0,b.jsx)(i.ConsoleGuide,{})]}),children:[(0,b.jsx)(B.MachineList,{connection:q,machines:r.data,ships:p.data??[],error:r.isError?r.error.message:void 0,onRetry:()=>{r.refetch()},onJoin:P?Q:void 0,now:a}),P&&(0,b.jsx)(A,{activeNames:(p.data??[]).filter(a=>"retired"!==a.status).map(a=>a.name),isOpen:w,onOpenChange:a=>{x(a),a||t.reset()},isPending:t.isPending,error:t.error?.message,joined:t.data,onSubmit:a=>{t.mutate(a)}}),(0,b.jsx)(g.ComposeMessage,{isOpen:y,onOpenChange:z}),(0,b.jsx)(h.ConsoleCommands,{isOpen:N,onOpenChange:O,onCompose:()=>{z(!0)}})]})}],19665)},84980,a=>{"use strict";var b=a.i(87924),c=a.i(53783),d=a.i(80487),e=a.i(82314);a.s(["CodeBlock",0,function({label:a,code:f,isWrapped:g=!1,copyValue:h,copyLabel:i=`Copy ${a.toLowerCase()}`,onCopied:j,onCopyFailed:k,codeTestId:l,copyTestId:m}){return(0,b.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,b.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsx)(c.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a})]}),(0,b.jsx)(e.CopyButton,{value:h??f,label:i,isLabeled:!0,onCopied:j,onCopyFailed:k,"data-testid":m})]}),(0,b.jsx)("pre",{"data-testid":l,className:(0,d.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",g?"break-all whitespace-pre-wrap":"whitespace-pre"),children:f})]})}])},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},44032,a=>{"use strict";var b=a.i(87924),c=a.i(80487),d=a.i(29931);let e={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};a.s(["CapacityBar",0,function({spots:a,caps:f,unknownText:g="Unknown",testId:h}){let i=(0,d.capacityLine)(a,f);if(void 0===f||void 0===i)return(0,b.jsx)("span",{"data-testid":h,className:"text-meta text-muted-foreground",children:g});let j=Math.max(0,f.ships-a.length);return(0,b.jsxs)("span",{role:"img","aria-label":i,"data-testid":h,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,b.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[a.map((a,d)=>(0,b.jsx)("span",{title:`Spot ${String(d+1)}: ${a.name}, ${a.status}`,className:(0,c.classNames)("h-2 w-3 rounded-xs",e[a.status])},a.shipId)),Array.from({length:j},(c,d)=>(0,b.jsx)("span",{title:`Spot ${String(a.length+d+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(d)}`))]}),(0,b.jsx)("span",{className:"text-meta tabular-nums",children:i})]})}])},88647,a=>{"use strict";var b=a.i(87924),c=a.i(67042),d=a.i(84980);a.s(["CrewLines",0,function({crewLines:a,subject:e,testIdPrefix:f,onCopied:g,onCopyFailed:h}){return a.map(({harness:a,line:i})=>(0,b.jsx)(d.CodeBlock,{label:`Crew line, ${(0,c.harnessWord)(a)} with the aeolus plugin`,code:i,isWrapped:!0,copyLabel:`Copy the ${(0,c.harnessWord)(a)} crew line for ${e}`,codeTestId:`${f}-${a}`,copyTestId:`${f}-${a}-copy`,onCopied:g,onCopyFailed:h},a))}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},15954,75111,a=>{"use strict";var b=a.i(87924),c=a.i(3512),d=a.i(23636),e=a.i(25212),f=a.i(38246),g=a.i(29931),h=a.i(31402),i=a.i(12068),j=a.i(24173),k=a.i(40392),l=a.i(50808),m=a.i(82260),n=a.i(56987),o=a.i(44561),p=a.i(39315),q=a.i(26268),r=a.i(67042),s=a.i(72872),t=a.i(76166),u=a.i(44032),v=a.i(40108);let w={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},x={alive:"Alive",silent:"Not answering","not-started":"Not started"};function y({machine:a,now:c}){let e=(0,g.machineLiveness)(a),f=null===a.lastSeenAt?null:new Date(a.lastSeenAt);return(0,b.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":e,children:[(0,b.jsxs)(t.Badge,{variant:"outline",className:w[e],children:["alive"===e?(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}):(0,b.jsx)(n.CircleDashed,{"aria-hidden":!0}),x[e]]}),null===f?(0,b.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,b.jsxs)("time",{dateTime:a.lastSeenAt??void 0,title:(0,s.fullDateTime)(f),className:"text-muted-foreground tabular-nums",children:["· ","silent"===e?`since ${(0,s.clockTime)(f)}`:(0,s.lastSeen)(f,c).replace("Last seen","seen")]})]})}function z(a,b){let c=(0,s.relativeTime)(a,b);return"Just now"===c?"just now":c}function A({title:a,children:c,className:d}){return(0,b.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${d??""}`,children:[(0,b.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:a}),c]})}function B({harness:a}){return(0,b.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,b.jsx)(m.Bot,{"aria-hidden":!0}),(0,r.harnessWord)(a.harness)]}),(0,g.harnessOptions)(a.options).map(a=>(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:a.name}),a.values.map(c=>(0,b.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[c,c===a.defaultValue?(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},c))]},a.name)),0===a.flags.length?null:(0,b.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:a.flags.map(c=>a.riskyFlags?.includes(c)===!0?(0,b.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,b.jsx)(q.TriangleAlert,{"aria-hidden":!0}),c,(0,b.jsx)("span",{className:"sr-only",children:" (risky)"})]},c):(0,b.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:c},c))})]})}function C({title:a,icon:c,names:d}){return(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a}),0===d.length?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):d.map(a=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[c,a]},a))]})}function D({workspaces:a}){return(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,b.jsx)(C,{title:"Repositories · a new worktree per ship",icon:(0,b.jsx)(p.GitBranch,{"aria-hidden":!0}),names:a.repositories}),(0,b.jsx)(C,{title:"Folders · used as they are",icon:(0,b.jsx)(o.FolderOpen,{"aria-hidden":!0}),names:a.folders})]})}function E({machine:a,spots:c,location:e,now:g}){let{details:h,report:i}=a,j=null===i?null:new Date(i.reportedAt);return(0,b.jsxs)("section",{"aria-label":a.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,b.jsxs)(f.default,{href:`/trierarchs/${a.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),a.name]}),(0,b.jsx)(y,{machine:a,now:g}),(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(v.LocationTag,{kind:e?.kind??null,description:e?.description}),null===h?null:(0,b.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",h.version]})]}),(0,b.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,b.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,b.jsx)(u.CapacityBar,{spots:c,caps:h?.caps,testId:"machine-card-capacity",unknownText:null===j?"Unknown until it answers":`Unknown since ${(0,s.clockTime)(j)}`}),null===j?null:(0,b.jsxs)("time",{dateTime:i?.reportedAt,title:(0,s.fullDateTime)(j),className:"text-meta text-muted-foreground",children:["Last answer ",z(j,g)]})]}),(0,b.jsx)(A,{title:"Harnesses, options and flags",children:null===h?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):h.harnesses.map(a=>(0,b.jsx)(B,{harness:a},a.harness))}),(0,b.jsx)(A,{title:"Workspaces",children:null===h?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,b.jsx)(D,{workspaces:h.workspaces})})]})}a.s(["HarnessOffer",0,B,"MachineCard",0,E,"MachineLiveness",0,y,"WorkspaceOffer",0,D,"lastAnswer",0,z],75111);let F=`${h.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;a.s(["MachineList",0,function({connection:a,machines:h,ships:m,error:n,onRetry:o,onJoin:p,now:q}){return"none"===a?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,b.jsx)(i.Button,{nativeButton:!1,render:({children:a,...c})=>(0,b.jsx)("a",{href:F,target:"_blank",rel:"noreferrer",...c,children:a}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===a?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(e.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,b.jsx)(i.Button,{nativeButton:!1,render:(0,b.jsx)(f.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==n?(0,b.jsx)(k.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:n,onRetry:o}):void 0===h||"unknown"===a?(0,b.jsx)(l.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===h.length?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:p?(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(c.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,b.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:h.map(a=>(0,b.jsx)(E,{machine:a,spots:(0,g.spotsOf)(a,m),location:m.find(b=>b.id===a.shipId)?.location??null,now:q},a.shipId))})}],15954)},2466,a=>{"use strict";var b=a.i(87924),c=a.i(17256),d=a.i(12068),e=a.i(82247),f=a.i(63041),g=a.i(43216),h=a.i(63089);a.s(["ListLayout",0,function({title:a,description:i,titleMeta:j,primaryAction:k,toolbar:l,live:m,nav:n,onCompose:o,onSearch:p,account:q,banner:r,children:s}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(f.Sidebar,{active:n.active,inboxCount:n.inboxCount,attentionCount:n.attentionCount,needsCrewCount:n.needsCrewCount,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,hasSettings:n.hasSettings,...q}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(e.Header,{breadcrumb:a,live:m,onCompose:o,onSearch:p}),r,(0,b.jsx)(h.TopBar,{title:a,live:m,account:q,onSearch:p,actions:o?(0,b.jsx)(d.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:o,children:(0,b.jsx)(c.SquarePen,{"aria-hidden":!0})}):void 0}),(0,b.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,b.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:a}),j]}),i?(0,b.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),k?(0,b.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:k}):null]}),l,s]})]}),(0,b.jsx)(g.TabBar,{active:"overview"===n.active||"needs-crew"===n.active?"fleet":"settings"===n.active?void 0:n.active,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,inboxCount:n.inboxCount,attentionCount:n.attentionCount})]})}])},67042,a=>{"use strict";let b={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function c(a){return b[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":c(a)},"harnessKind",0,function(a){return b[a]?.kind},"harnessWord",0,c])}];
1
+ module.exports=[63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},44561,39315,a=>{"use strict";var b=a.i(64831);let c={name:"folder-open",size:24,node:[["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",key:"usdka0"}]]};c.node;let d=(0,b.default)(c);a.s(["FolderOpen",0,d],44561);let e={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};e.node;let f=(0,b.default)(e);a.s(["GitBranch",0,f],39315)},53783,a=>{"use strict";var b=a.i(64831);let c={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},19665,a=>{"use strict";var b=a.i(87924),c=a.i(3512),d=a.i(72131),e=a.i(76166),f=a.i(12068),g=a.i(15439),h=a.i(2549),i=a.i(83786),j=a.i(68698);a.i(23600);var k=a.i(69040),l=a.i(93817),m=a.i(97024),n=a.i(73370),o=a.i(52357),p=a.i(80487),q=a.i(18691),r=a.i(84980),s=a.i(18441),t=a.i(2374),u=a.i(75297),v=a.i(45098),w=a.i(88647),x=a.i(40392);function y({activeNames:a,isPending:c,error:e,onSubmit:g}){let h=(0,d.useId)(),i=(0,d.useId)(),[j,l]=(0,d.useState)(""),o=(0,q.checkShipName)(j,{activeNames:a}),r="invalid"===o.kind||"reserved"===o.kind||"taken"===o.kind,t="available"===o.kind;return(0,b.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:a=>{a.preventDefault(),t&&g(j)},children:[(0,b.jsxs)(s.DialogHeader,{children:[(0,b.jsx)(s.DialogTitle,{children:"Join a machine"}),(0,b.jsx)(s.DialogDescription,{children:"The trierarch plugin commissions a trierarch ship of this name. You then run its setup line on the machine, and the trierarch there starts sessions for the crew requests it is given."})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)(v.Label,{htmlFor:h,children:"Name"}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[j.length," / ",k.SHIP_HANDLE_MAX_LENGTH]})]}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(u.Input,{id:h,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"trierarch-mac","data-testid":"join-machine-name","aria-invalid":!!r||void 0,"aria-describedby":i,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:j,onChange:a=>{l((0,q.asHandle)(a.target.value))}}),"available"===o.kind?(0,b.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):r?(0,b.jsx)(n.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,b.jsx)("p",{id:i,"aria-live":"polite",className:(0,p.classNames)("text-meta",r?"text-destructive-text":"text-muted-foreground"),children:o.message})]}),void 0===e?null:(0,b.jsx)(x.InlineError,{title:"Couldn’t join the machine",description:`${e} Nothing changed.`}),(0,b.jsxs)(s.DialogFooter,{children:[(0,b.jsx)(s.DialogClose,{render:(0,b.jsx)(f.Button,{type:"button",disabled:c}),children:"Cancel"}),(0,b.jsx)(f.Button,{type:"submit",variant:"primary",isLoading:c,disabled:!t,"data-testid":"join-machine-submit",children:c?"Joining":"Join machine"})]})]})}function z({joined:a}){let[c,e]=(0,d.useState)(!1),g=()=>{e(!1)},h=()=>{e(!0)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(s.DialogHeader,{children:[(0,b.jsxs)(s.DialogTitle,{children:[a.name," joined"]}),(0,b.jsxs)(s.DialogDescription,{children:["Run the setup line on the machine. It installs the trierarch, which then crews ",a.name," and reports what the machine offers."]})]}),(0,b.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,b.jsx)(o.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," It carries the ship’s secret. If you lose it, get a new starting prompt on ",a.name,"’s ship page."]})]}),(0,b.jsx)(r.CodeBlock,{label:"Setup line",code:a.setupLine,isWrapped:!0,copyLabel:`Copy the setup line for ${a.name}`,codeTestId:"join-machine-setup-line",copyTestId:"join-machine-setup-line-copy",onCopied:g,onCopyFailed:h}),(0,b.jsx)(r.CodeBlock,{label:`Starting prompt for ${a.name}`,code:a.prompt,isWrapped:!0,copyLabel:`Copy the starting prompt for ${a.name}`,codeTestId:"join-machine-prompt",onCopied:g,onCopyFailed:h}),(0,b.jsx)(w.CrewLines,{crewLines:a.crewLines,subject:a.name,testIdPrefix:"join-machine-crew-line",onCopied:g,onCopyFailed:h}),(0,b.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null}),(0,b.jsx)(s.DialogFooter,{children:(0,b.jsx)(s.DialogClose,{render:(0,b.jsx)(f.Button,{variant:"primary"}),children:"Done"})})]})}function A(a){let{isOpen:c,onOpenChange:d,isPending:e,joined:f}=a;return(0,b.jsx)(s.Dialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(s.DialogContent,{size:"md","data-testid":"join-machine-dialog",className:t.dialogSurface.phoneFullScreen,children:void 0===f?(0,b.jsx)(y,{...a}):(0,b.jsx)(z,{joined:f})})})}var B=a.i(15954),C=a.i(2466),D=a.i(65563),E=a.i(94764),F=a.i(90146),G=a.i(26949),H=a.i(67336),I=a.i(10023),J=a.i(68450),K=a.i(34159),L=a.i(10572),M=a.i(93454);a.s(["default",0,function(){let a=(0,J.useNow)(),k=(0,E.useAccountMenu)(a),l=(0,G.useOpenInboxCount)(),m=(0,I.useNeedsAttention)(),n=(0,I.useAttentionCount)(),o=(0,H.useLiveFleet)(),p=(0,F.useFleetSnapshot)(),q=(0,M.useTrierarchPluginConnection)(),r=(0,M.useMachines)(),s=(0,M.useTrierarchPluginVersion)(),t=(0,M.useJoinMachine)(),u=(0,D.useAccess)(),v=(0,K.usePluginNav)(),[w,x]=(0,d.useState)(!1),[y,z]=(0,d.useState)(!1),[N,O]=(0,d.useState)(!1);(0,L.useSignInWhenSessionEnds)([m.error,o.error]);let P=u.canManage&&"connected"===q,Q=()=>{t.reset(),x(!0)};return(0,b.jsxs)(C.ListLayout,{title:"Trierarchs",titleMeta:void 0===s?void 0:(0,b.jsxs)(e.Badge,{variant:"outline","data-testid":"trierarchs-plugin-version",children:["trierarch plugin ",s]}),description:"none"===q?"Not set up.":"Machines that run sessions for crew requests. The plugin picks a trierarch for each request.",live:o.live,nav:{active:"trierarchs",inboxCount:l,attentionCount:n,...v},primaryAction:P?(0,b.jsx)(f.Button,{variant:"primary",icon:(0,b.jsx)(c.Plus,{"aria-hidden":!0}),onClick:Q,"data-testid":"trierarchs-join",children:"Join a machine"}):void 0,onCompose:u.canSend?()=>{z(!0)}:void 0,onSearch:()=>{O(!0)},account:k,banner:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j.ConsoleNotices,{}),(0,b.jsx)(i.ConsoleGuide,{})]}),children:[(0,b.jsx)(B.MachineList,{connection:q,machines:r.data,ships:p.data??[],error:r.isError?r.error.message:void 0,onRetry:()=>{r.refetch()},onJoin:P?Q:void 0,now:a}),P&&(0,b.jsx)(A,{activeNames:(p.data??[]).filter(a=>"retired"!==a.status).map(a=>a.name),isOpen:w,onOpenChange:a=>{x(a),a||t.reset()},isPending:t.isPending,error:t.error?.message,joined:t.data,onSubmit:a=>{t.mutate(a)}}),(0,b.jsx)(g.ComposeMessage,{isOpen:y,onOpenChange:z}),(0,b.jsx)(h.ConsoleCommands,{isOpen:N,onOpenChange:O,onCompose:()=>{z(!0)}})]})}],19665)},84980,a=>{"use strict";var b=a.i(87924),c=a.i(53783),d=a.i(80487),e=a.i(82314);a.s(["CodeBlock",0,function({label:a,code:f,isWrapped:g=!1,copyValue:h,copyLabel:i=`Copy ${a.toLowerCase()}`,onCopied:j,onCopyFailed:k,codeTestId:l,copyTestId:m}){return(0,b.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,b.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsx)(c.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a})]}),(0,b.jsx)(e.CopyButton,{value:h??f,label:i,isLabeled:!0,onCopied:j,onCopyFailed:k,"data-testid":m})]}),(0,b.jsx)("pre",{"data-testid":l,className:(0,d.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",g?"break-all whitespace-pre-wrap":"whitespace-pre"),children:f})]})}])},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},44032,a=>{"use strict";var b=a.i(87924),c=a.i(80487),d=a.i(29931);let e={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};a.s(["CapacityBar",0,function({spots:a,caps:f,unknownText:g="Unknown",testId:h}){let i=(0,d.capacityLine)(a,f);if(void 0===f||void 0===i)return(0,b.jsx)("span",{"data-testid":h,className:"text-meta text-muted-foreground",children:g});let j=Math.max(0,f.ships-a.length);return(0,b.jsxs)("span",{role:"img","aria-label":i,"data-testid":h,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,b.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[a.map((a,d)=>(0,b.jsx)("span",{title:`Spot ${String(d+1)}: ${a.name}, ${a.status}`,className:(0,c.classNames)("h-2 w-3 rounded-xs",e[a.status])},a.shipId)),Array.from({length:j},(c,d)=>(0,b.jsx)("span",{title:`Spot ${String(a.length+d+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(d)}`))]}),(0,b.jsx)("span",{className:"text-meta tabular-nums",children:i})]})}])},88647,a=>{"use strict";var b=a.i(87924),c=a.i(67042),d=a.i(84980);a.s(["CrewLines",0,function({crewLines:a,subject:e,testIdPrefix:f,onCopied:g,onCopyFailed:h}){return a.map(({harness:a,line:i})=>(0,b.jsx)(d.CodeBlock,{label:`Crew line, ${(0,c.harnessWord)(a)} with the aeolus plugin`,code:i,isWrapped:!0,copyLabel:`Copy the ${(0,c.harnessWord)(a)} crew line for ${e}`,codeTestId:`${f}-${a}`,copyTestId:`${f}-${a}-copy`,onCopied:g,onCopyFailed:h},a))}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},15954,75111,a=>{"use strict";var b=a.i(87924),c=a.i(3512),d=a.i(23636),e=a.i(25212),f=a.i(38246),g=a.i(29931),h=a.i(31402),i=a.i(12068),j=a.i(24173),k=a.i(40392),l=a.i(50808),m=a.i(82260),n=a.i(56987),o=a.i(44561),p=a.i(39315),q=a.i(26268),r=a.i(67042),s=a.i(72872),t=a.i(76166),u=a.i(44032),v=a.i(40108);let w={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},x={alive:"Alive",silent:"Not answering","not-started":"Not started"};function y({machine:a,now:c}){let e=(0,g.machineLiveness)(a),f=null===a.lastSeenAt?null:new Date(a.lastSeenAt);return(0,b.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":e,children:[(0,b.jsxs)(t.Badge,{variant:"outline",className:w[e],children:["alive"===e?(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}):(0,b.jsx)(n.CircleDashed,{"aria-hidden":!0}),x[e]]}),null===f?(0,b.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,b.jsxs)("time",{dateTime:a.lastSeenAt??void 0,title:(0,s.fullDateTime)(f),className:"text-muted-foreground tabular-nums",children:["· ","silent"===e?`since ${(0,s.clockTime)(f)}`:(0,s.lastSeen)(f,c).replace("Last seen","seen")]})]})}function z(a,b){let c=(0,s.relativeTime)(a,b);return"Just now"===c?"just now":c}function A({title:a,children:c,className:d}){return(0,b.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${d??""}`,children:[(0,b.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:a}),c]})}function B({harness:a,now:c}){let d=(0,r.harnessDetection)(a,c);return(0,b.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,b.jsx)(m.Bot,{"aria-hidden":!0}),(0,r.harnessWord)(a.harness),void 0===d?null:(0,b.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:d})]}),(0,g.harnessOptions)(a.options).map(a=>(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:a.name}),a.values.map(c=>(0,b.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[c,c===a.defaultValue?(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},c))]},a.name)),0===a.flags.length?null:(0,b.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:a.flags.map(c=>a.riskyFlags?.includes(c)===!0?(0,b.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,b.jsx)(q.TriangleAlert,{"aria-hidden":!0}),c,(0,b.jsx)("span",{className:"sr-only",children:" (risky)"})]},c):(0,b.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:c},c))})]})}function C({title:a,icon:c,names:d}){return(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a}),0===d.length?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):d.map(a=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[c,a]},a))]})}function D({workspaces:a}){return(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,b.jsx)(C,{title:"Repositories · a new worktree per ship",icon:(0,b.jsx)(p.GitBranch,{"aria-hidden":!0}),names:a.repositories}),(0,b.jsx)(C,{title:"Folders · used as they are",icon:(0,b.jsx)(o.FolderOpen,{"aria-hidden":!0}),names:a.folders})]})}function E({machine:a,spots:c,location:e,now:g}){let{details:h,report:i}=a,j=null===i?null:new Date(i.reportedAt);return(0,b.jsxs)("section",{"aria-label":a.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,b.jsxs)(f.default,{href:`/trierarchs/${a.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),a.name]}),(0,b.jsx)(y,{machine:a,now:g}),(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(v.LocationTag,{kind:e?.kind??null,description:e?.description}),null===h?null:(0,b.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",h.version]})]}),(0,b.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,b.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,b.jsx)(u.CapacityBar,{spots:c,caps:h?.caps,testId:"machine-card-capacity",unknownText:null===j?"Unknown until it answers":`Unknown since ${(0,s.clockTime)(j)}`}),null===j?null:(0,b.jsxs)("time",{dateTime:i?.reportedAt,title:(0,s.fullDateTime)(j),className:"text-meta text-muted-foreground",children:["Last answer ",z(j,g)]})]}),(0,b.jsx)(A,{title:"Harnesses, options and flags",children:null===h?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):h.harnesses.map(a=>(0,b.jsx)(B,{harness:a,now:g},a.harness))}),(0,b.jsx)(A,{title:"Workspaces",children:null===h?(0,b.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,b.jsx)(D,{workspaces:h.workspaces})})]})}a.s(["HarnessOffer",0,B,"MachineCard",0,E,"MachineLiveness",0,y,"WorkspaceOffer",0,D,"lastAnswer",0,z],75111);let F=`${h.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;a.s(["MachineList",0,function({connection:a,machines:h,ships:m,error:n,onRetry:o,onJoin:p,now:q}){return"none"===a?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,b.jsx)(i.Button,{nativeButton:!1,render:({children:a,...c})=>(0,b.jsx)("a",{href:F,target:"_blank",rel:"noreferrer",...c,children:a}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===a?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(e.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,b.jsx)(i.Button,{nativeButton:!1,render:(0,b.jsx)(f.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==n?(0,b.jsx)(k.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:n,onRetry:o}):void 0===h||"unknown"===a?(0,b.jsx)(l.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===h.length?(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(d.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:p?(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(c.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,b.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:h.map(a=>(0,b.jsx)(E,{machine:a,spots:(0,g.spotsOf)(a,m),location:m.find(b=>b.id===a.shipId)?.location??null,now:q},a.shipId))})}],15954)},2466,a=>{"use strict";var b=a.i(87924),c=a.i(17256),d=a.i(12068),e=a.i(82247),f=a.i(63041),g=a.i(43216),h=a.i(63089);a.s(["ListLayout",0,function({title:a,description:i,titleMeta:j,primaryAction:k,toolbar:l,live:m,nav:n,onCompose:o,onSearch:p,account:q,banner:r,children:s}){return(0,b.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,b.jsx)(f.Sidebar,{active:n.active,inboxCount:n.inboxCount,attentionCount:n.attentionCount,needsCrewCount:n.needsCrewCount,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,hasSettings:n.hasSettings,...q}),(0,b.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,b.jsx)(e.Header,{breadcrumb:a,live:m,onCompose:o,onSearch:p}),r,(0,b.jsx)(h.TopBar,{title:a,live:m,account:q,onSearch:p,actions:o?(0,b.jsx)(d.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:o,children:(0,b.jsx)(c.SquarePen,{"aria-hidden":!0})}):void 0}),(0,b.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,b.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:a}),j]}),i?(0,b.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),k?(0,b.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:k}):null]}),l,s]})]}),(0,b.jsx)(g.TabBar,{active:"overview"===n.active||"needs-crew"===n.active?"fleet":"settings"===n.active?void 0:n.active,hasSquadrons:n.hasSquadrons,hasTrierarchs:n.hasTrierarchs,trierarchsCount:n.trierarchsCount,inboxCount:n.inboxCount,attentionCount:n.attentionCount})]})}])},67042,a=>{"use strict";var b=a.i(72872);let c={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function d(a){return c[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":d(a)},"harnessDetection",0,function(a,c){if(void 0===a.version)return;if(void 0===a.modelsConfirmedAt||null===a.modelsConfirmedAt)return`${a.version} \xb7 no model confirmed`;let d=(0,b.relativeTime)(new Date(a.modelsConfirmedAt),c);return`${a.version} \xb7 models confirmed ${"Just now"===d?"just now":d}`},"harnessKind",0,function(a){return c[a]?.kind},"harnessWord",0,d])}];
2
2
 
3
3
  //# sourceMappingURL=_0xc3etp._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[39977,a=>{"use strict";var b=a.i(64831);let c={name:"boxes",size:24,node:[["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",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["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",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["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",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};c.node;let d=(0,b.default)(c);a.s(["Boxes",0,d],39977)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},36501,a=>{"use strict";var b=a.i(87924),c=a.i(39977),d=a.i(98238),e=a.i(23636),f=a.i(74215),g=a.i(80487);let h={"trierarch-plugin":e.ShipWheel,squadrons:c.Boxes,ship:d.Ship};a.s(["LabelChip",0,function({chip:a,onRemove:c,testId:d,className:e,trailing:i}){let j="none"===a.mark?null:h[a.mark],k=`${a.key}=${a.value}`,l="none"===a.mark?"you":a.ownerName;return(0,b.jsxs)("span",{"data-slot":"label-chip","data-testid":d,title:`${k}, by ${l}`,className:(0,g.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",e),children:[null===j?null:(0,b.jsx)(j,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.key,"="]}),(0,b.jsx)("span",{className:"font-medium",children:a.value})]}),i,void 0===c?null:(0,b.jsx)("button",{type:"button","aria-label":`Remove ${k}`,onClick:c,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,b.jsx)(f.X,{"aria-hidden":!0})})]})}])},96082,82611,681,98600,a=>{"use strict";a.i(23600);var b=a.i(11708),c=a.i(2811),d=a.i(29931);function e(a,b){for(let c of b)a.includes(c)||a.push(c)}function f(a){return Object.fromEntries((a?.options??[]).flatMap(a=>{let b=a.defaultValue??a.values[0];return void 0===b?[]:[[a.name,b]]}))}function g(a){let[b]=a?.repositories??[];if(void 0!==b)return{kind:"worktree",repository:b};let[c]=a?.folders??[];return void 0===c?void 0:{kind:"folder",name:c}}function h(a){let[b]=a;return{harness:b?.harness??"",workspace:g(b),options:f(b),firstPrompt:"",squadron:"",machineLabels:[]}}let i=new TextEncoder;function j(a){return i.encode(a).byteLength}function k(a){return a<1024?`${String(a)} B`:`${(a/1024).toFixed(1).replace(/\.0$/,"")} KB`}a.s(["byteSize",0,k,"defaultValues",0,h,"offersOf",0,function(a){let b=[];for(let c of a)if(!c.isSilent&&null!==c.details)for(let a of c.details.harnesses){let f=b.find(b=>b.harness===a.harness);for(let g of(void 0===f&&(f={harness:a.harness,repositories:[],folders:[],options:[]},b.push(f)),e(f.repositories,c.details.workspaces.repositories),e(f.folders,c.details.workspaces.folders),(0,d.harnessOptions)(a.options))){let a=f.options.find(a=>a.name===g.name);void 0===a?f.options.push({...g,values:[...g.values]}):(e(a.values,g.values),a.defaultValue??=g.defaultValue)}}return b},"promptBytes",0,j,"settingsOf",0,function(a){if(""!==a.harness&&void 0!==a.workspace)return{harness:a.harness,workspace:a.workspace,options:a.options,...""===a.firstPrompt?{}:{firstPrompt:a.firstPrompt},...""===a.squadron?{}:{squadron:a.squadron},...0===a.machineLabels.length?{}:{machineLabels:a.machineLabels.flatMap(a=>{let b=(0,c.idSchema)("labelValue").safeParse(a);return b.success?[b.data]:[]})}}},"settingsRows",0,function(a){let c=b.crewSettingsSchema.safeParse(a);if(!c.success)return;let{harness:d,workspace:e,options:f,firstPrompt:g,squadron:h}=c.data;return[{label:"Harness",value:d??"Trierarch default"},"worktree"===e.kind?{label:"Workspace",value:e.repository,meta:"New worktree"}:{label:"Workspace",value:e.name,meta:"Folder, as it is"},...Object.entries(f).map(([a,b])=>({label:a,value:"string"==typeof b?b:JSON.stringify(b),isMono:!0})),{label:"First prompt",value:void 0===g?null:k(j(g))},{label:"Squadron",value:h??null,isMono:!0}]},"valuesOf",0,function(a,c){let d=b.crewSettingsSchema.safeParse(a);if(!d.success)return h(c);let{harness:e,workspace:f,options:g,firstPrompt:i,squadron:j,machineLabels:k}=d.data;return{harness:e??h(c).harness,workspace:"worktree"===f.kind?{kind:"worktree",repository:f.repository}:{kind:"folder",name:f.name},options:Object.fromEntries(Object.entries(g).flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[])),firstPrompt:i??"",squadron:j??"",machineLabels:[...k??[]]}},"withHarness",0,function(a,b){let{harness:c,offers:d}=b,e=d.find(a=>a.harness===c),h=a.workspace,i=void 0!==h&&("worktree"===h.kind?e?.repositories.includes(h.repository)??!1:e?.folders.includes(h.name)??!1);return{...a,harness:c,workspace:i?h:g(e),options:f(e)}}],96082);var l=a.i(65230);function m(a,b){return a.ships.find(a=>a.id===b.shipId)?.labels.map(a=>a.valueId)??[]}function n(a){return 1===a?{these:"this label",carries:"carries it"}:2===a?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}a.s(["machineLabelIdsOf",0,function(a){let c=b.crewSettingsSchema.safeParse(a);return c.success?[...c.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(a,b){return{groups:function(a,b){let c=b.map(b=>m(a,b)),d=[],e=[];for(let b of a.labels){let f=b.values.map(a=>({valueId:a.id,value:a.value,shipCount:c.filter(b=>b.includes(a.id)).length})),g={labelId:b.id,key:b.key,mark:a.ownerOf.get(b.id)?.mark??"ship",values:f};(f.some(a=>a.shipCount>0)?d:e).push(g)}let f=(a,b)=>a.key.localeCompare(b.key);return[{title:"On machines",keys:d.toSorted(f)},{title:"On no machine yet",keys:e.toSorted(f)}].filter(a=>a.keys.length>0)}(a,b),chipsOf:b=>(0,l.pickedChips)(b,a),matchOf:c=>{var d;return{matching:(d={machines:b,valueIds:c}).machines.filter(b=>{let c=m(a,b);return d.valueIds.every(a=>c.includes(a))}).map(a=>a.name),total:d.machines.length}}}},"machineLabelsText",0,function(a){let b=a.map(a=>`${a.key}=${a.value}`);return b.length<=2?b.join(" and "):`${b.slice(0,-1).join(", ")} and ${b.at(-1)??""}`},"noMatchWords",0,n],82611);var o=a.i(87924),p=a.i(7058),q=a.i(93817),r=a.i(8311),s=a.i(3512),t=a.i(74215),u=a.i(38246),v=a.i(72131),w=a.i(12068),x=a.i(60275),y=a.i(36501),z=a.i(39977),A=a.i(7963),B=a.i(41146),C=a.i(33540),D=a.i(98238),E=a.i(23636),F=a.i(80487),G=a.i(75297);let H={"trierarch-plugin":E.ShipWheel,squadrons:z.Boxes,ship:D.Ship};function I(a,b){return`${String(a)} ${1===a?b:`${b}s`}`}function J({groups:a,pickedValueIds:b,onPick:c,size:d="sm",pickedWord:e="Picked",countWord:f="ship"}){let[g,h]=(0,v.useState)(""),[i,j]=(0,v.useState)(void 0),k="touch"===d,l=(0,F.classNames)("flex w-full items-center gap-2 rounded-sm px-2 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50",k?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==i)return(0,o.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,o.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 font-mono text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{j(void 0)},"aria-label":`Back to the keys, from ${i.key}`,children:[(0,o.jsx)(A.ChevronLeft,{"aria-hidden":!0}),i.key,"="]}),(0,o.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===f?"Ships":"Machines"," with each"]})]}),(0,o.jsx)("ul",{className:"flex flex-col",children:i.values.map(a=>{let d=b.includes(a.valueId);return(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button",className:l,disabled:d,"data-testid":"label-picker-value",onClick:()=>{c(a.valueId),j(void 0),h("")},children:[(0,o.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:a.value}),(0,o.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:d?e:I(a.shipCount,f)})]})},a.valueId)})})]});let m=g.trim().toLowerCase(),n=a.map(a=>({...a,keys:a.keys.filter(a=>""===m||a.key.includes(m))})).filter(a=>a.keys.length>0);return(0,o.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,o.jsx)(G.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:k?"touch":"md",leadingIcon:(0,o.jsx)(C.Search,{}),value:g,onChange:a=>{h(a.target.value)}}),0===n.length?(0,o.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===a.length?"The fleet has no labels yet.":`No key matches “${g.trim()}”.`}):n.map(a=>(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:a.title}),(0,o.jsx)("ul",{className:"flex flex-col",children:a.keys.map(a=>{let b="none"===a.mark?null:H[a.mark];return(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button",className:(0,F.classNames)(l,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{j(a)},children:[null===b?null:(0,o.jsx)(b,{"aria-hidden":!0}),(0,o.jsx)("span",{className:"font-mono",children:a.key}),(0,o.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:I(a.values.length,"value")}),(0,o.jsx)(B.ChevronRight,{"aria-hidden":!0})]})},a.labelId)})})]},a.title))]})}function K({groups:a,picked:b,isDisabled:c,onAdd:d}){let[e,f]=(0,v.useState)(!1);return(0,o.jsxs)(x.Popover,{open:e,onOpenChange:f,children:[(0,o.jsx)(x.PopoverTrigger,{render:(0,o.jsx)(w.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,o.jsx)(s.Plus,{}),disabled:c,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,o.jsxs)(x.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,o.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,o.jsx)(J,{groups:a,pickedValueIds:b.map(a=>a.valueId),countWord:"machine",onPick:a=>{f(!1),d(a)}}),(0,o.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,o.jsx)(u.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}a.s(["LabelPicker",0,J],681),a.s(["MachineLabelsField",0,function({shipName:a,picked:b,groups:c,match:d,isDisabled:e,onAdd:f,onRemove:g,unknown:h=[],onRemoveUnknown:i}){let j=n(b.length);return(0,o.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,o.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,o.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,o.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===b.length?(0,o.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,b.map((a,b)=>(0,o.jsxs)(v.Fragment,{children:[0===b?null:(0,o.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,o.jsx)(y.LabelChip,{chip:a,testId:"machine-label",...e?{}:{onRemove:()=>{g(a.valueId)}}})]},a.valueId)),h.map(a=>(0,o.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${a}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,o.jsx)(q.CircleAlert,{"aria-hidden":!0}),a,void 0===i||e?null:(0,o.jsx)("button",{type:"button","aria-label":`Remove ${a}`,onClick:()=>{i(a)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,o.jsx)(t.X,{"aria-hidden":!0})})]},a)),b.length+h.length>=p.SHIP_LABELS_MAX?null:(0,o.jsx)(K,{groups:c,picked:b,isDisabled:e,onAdd:f})]}),0===h.length?null:(0,o.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",h.join(", "),". Forming refuses ",1===h.length?"it":"them",": define ",1===h.length?"it":"them"," on the Labels page, or remove ",1===h.length?"it":"them"," here."]}),0===b.length?null:0===d.matching.length?(0,o.jsxs)("p",{role:"status","data-testid":"machine-labels-match",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,o.jsx)(r.Clock,{"aria-hidden":!0}),(0,o.jsxs)("span",{children:["No machine matches ",j.these,". You can still request: it waits on Needs crew until a machine ",j.carries,"."]})]}):(0,o.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",d.matching.length," of ",d.total," ",1===d.total?"machine":"machines",": ",d.matching.join(", "),"."]}),(0,o.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",a," only on a machine that carries every label here. Leave it empty for any machine."]})]})}],98600)},67042,a=>{"use strict";let b={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function c(a){return b[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":c(a)},"harnessKind",0,function(a){return b[a]?.kind},"harnessWord",0,c])}];
1
+ module.exports=[39977,a=>{"use strict";var b=a.i(64831);let c={name:"boxes",size:24,node:[["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",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["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",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["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",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};c.node;let d=(0,b.default)(c);a.s(["Boxes",0,d],39977)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},36501,a=>{"use strict";var b=a.i(87924),c=a.i(39977),d=a.i(98238),e=a.i(23636),f=a.i(74215),g=a.i(80487);let h={"trierarch-plugin":e.ShipWheel,squadrons:c.Boxes,ship:d.Ship};a.s(["LabelChip",0,function({chip:a,onRemove:c,testId:d,className:e,trailing:i}){let j="none"===a.mark?null:h[a.mark],k=`${a.key}=${a.value}`,l="none"===a.mark?"you":a.ownerName;return(0,b.jsxs)("span",{"data-slot":"label-chip","data-testid":d,title:`${k}, by ${l}`,className:(0,g.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",e),children:[null===j?null:(0,b.jsx)(j,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.key,"="]}),(0,b.jsx)("span",{className:"font-medium",children:a.value})]}),i,void 0===c?null:(0,b.jsx)("button",{type:"button","aria-label":`Remove ${k}`,onClick:c,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,b.jsx)(f.X,{"aria-hidden":!0})})]})}])},96082,82611,681,98600,a=>{"use strict";a.i(23600);var b=a.i(11708),c=a.i(2811),d=a.i(29931);function e(a,b){for(let c of b)a.includes(c)||a.push(c)}function f(a){return Object.fromEntries((a?.options??[]).flatMap(a=>{let b=a.defaultValue??a.values[0];return void 0===b?[]:[[a.name,b]]}))}function g(a){let[b]=a?.repositories??[];if(void 0!==b)return{kind:"worktree",repository:b};let[c]=a?.folders??[];return void 0===c?void 0:{kind:"folder",name:c}}function h(a){let[b]=a;return{harness:b?.harness??"",workspace:g(b),options:f(b),firstPrompt:"",squadron:"",machineLabels:[]}}let i=new TextEncoder;function j(a){return i.encode(a).byteLength}function k(a){return a<1024?`${String(a)} B`:`${(a/1024).toFixed(1).replace(/\.0$/,"")} KB`}a.s(["byteSize",0,k,"defaultValues",0,h,"offersOf",0,function(a){let b=[];for(let c of a)if(!c.isSilent&&null!==c.details)for(let a of c.details.harnesses){let f=b.find(b=>b.harness===a.harness);for(let g of(void 0===f&&(f={harness:a.harness,repositories:[],folders:[],options:[]},b.push(f)),e(f.repositories,c.details.workspaces.repositories),e(f.folders,c.details.workspaces.folders),(0,d.harnessOptions)(a.options))){let a=f.options.find(a=>a.name===g.name);void 0===a?f.options.push({...g,values:[...g.values]}):(e(a.values,g.values),a.defaultValue??=g.defaultValue)}}return b},"promptBytes",0,j,"settingsOf",0,function(a){if(""!==a.harness&&void 0!==a.workspace)return{harness:a.harness,workspace:a.workspace,options:a.options,...""===a.firstPrompt?{}:{firstPrompt:a.firstPrompt},...""===a.squadron?{}:{squadron:a.squadron},...0===a.machineLabels.length?{}:{machineLabels:a.machineLabels.flatMap(a=>{let b=(0,c.idSchema)("labelValue").safeParse(a);return b.success?[b.data]:[]})}}},"settingsRows",0,function(a){let c=b.crewSettingsSchema.safeParse(a);if(!c.success)return;let{harness:d,workspace:e,options:f,firstPrompt:g,squadron:h}=c.data;return[{label:"Harness",value:d??"Trierarch default"},"worktree"===e.kind?{label:"Workspace",value:e.repository,meta:"New worktree"}:{label:"Workspace",value:e.name,meta:"Folder, as it is"},...Object.entries(f).map(([a,b])=>({label:a,value:"string"==typeof b?b:JSON.stringify(b),isMono:!0})),{label:"First prompt",value:void 0===g?null:k(j(g))},{label:"Squadron",value:h??null,isMono:!0}]},"valuesOf",0,function(a,c){let d=b.crewSettingsSchema.safeParse(a);if(!d.success)return h(c);let{harness:e,workspace:f,options:g,firstPrompt:i,squadron:j,machineLabels:k}=d.data;return{harness:e??h(c).harness,workspace:"worktree"===f.kind?{kind:"worktree",repository:f.repository}:{kind:"folder",name:f.name},options:Object.fromEntries(Object.entries(g).flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[])),firstPrompt:i??"",squadron:j??"",machineLabels:[...k??[]]}},"withHarness",0,function(a,b){let{harness:c,offers:d}=b,e=d.find(a=>a.harness===c),h=a.workspace,i=void 0!==h&&("worktree"===h.kind?e?.repositories.includes(h.repository)??!1:e?.folders.includes(h.name)??!1);return{...a,harness:c,workspace:i?h:g(e),options:f(e)}}],96082);var l=a.i(65230);function m(a,b){return a.ships.find(a=>a.id===b.shipId)?.labels.map(a=>a.valueId)??[]}function n(a){return 1===a?{these:"this label",carries:"carries it"}:2===a?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}a.s(["machineLabelIdsOf",0,function(a){let c=b.crewSettingsSchema.safeParse(a);return c.success?[...c.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(a,b){return{groups:function(a,b){let c=b.map(b=>m(a,b)),d=[],e=[];for(let b of a.labels){let f=b.values.map(a=>({valueId:a.id,value:a.value,shipCount:c.filter(b=>b.includes(a.id)).length})),g={labelId:b.id,key:b.key,mark:a.ownerOf.get(b.id)?.mark??"ship",values:f};(f.some(a=>a.shipCount>0)?d:e).push(g)}let f=(a,b)=>a.key.localeCompare(b.key);return[{title:"On machines",keys:d.toSorted(f)},{title:"On no machine yet",keys:e.toSorted(f)}].filter(a=>a.keys.length>0)}(a,b),chipsOf:b=>(0,l.pickedChips)(b,a),matchOf:c=>{var d;return{matching:(d={machines:b,valueIds:c}).machines.filter(b=>{let c=m(a,b);return d.valueIds.every(a=>c.includes(a))}).map(a=>a.name),total:d.machines.length}}}},"machineLabelsText",0,function(a){let b=a.map(a=>`${a.key}=${a.value}`);return b.length<=2?b.join(" and "):`${b.slice(0,-1).join(", ")} and ${b.at(-1)??""}`},"noMatchWords",0,n],82611);var o=a.i(87924),p=a.i(7058),q=a.i(93817),r=a.i(8311),s=a.i(3512),t=a.i(74215),u=a.i(38246),v=a.i(72131),w=a.i(12068),x=a.i(60275),y=a.i(36501),z=a.i(39977),A=a.i(7963),B=a.i(41146),C=a.i(33540),D=a.i(98238),E=a.i(23636),F=a.i(80487),G=a.i(75297);let H={"trierarch-plugin":E.ShipWheel,squadrons:z.Boxes,ship:D.Ship};function I(a,b){return`${String(a)} ${1===a?b:`${b}s`}`}function J({groups:a,pickedValueIds:b,onPick:c,size:d="sm",pickedWord:e="Picked",countWord:f="ship"}){let[g,h]=(0,v.useState)(""),[i,j]=(0,v.useState)(void 0),k="touch"===d,l=(0,F.classNames)("flex w-full items-center gap-2 rounded-sm px-2 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50",k?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==i)return(0,o.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,o.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 font-mono text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{j(void 0)},"aria-label":`Back to the keys, from ${i.key}`,children:[(0,o.jsx)(A.ChevronLeft,{"aria-hidden":!0}),i.key,"="]}),(0,o.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===f?"Ships":"Machines"," with each"]})]}),(0,o.jsx)("ul",{className:"flex flex-col",children:i.values.map(a=>{let d=b.includes(a.valueId);return(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button",className:l,disabled:d,"data-testid":"label-picker-value",onClick:()=>{c(a.valueId),j(void 0),h("")},children:[(0,o.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:a.value}),(0,o.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:d?e:I(a.shipCount,f)})]})},a.valueId)})})]});let m=g.trim().toLowerCase(),n=a.map(a=>({...a,keys:a.keys.filter(a=>""===m||a.key.includes(m))})).filter(a=>a.keys.length>0);return(0,o.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,o.jsx)(G.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:k?"touch":"md",leadingIcon:(0,o.jsx)(C.Search,{}),value:g,onChange:a=>{h(a.target.value)}}),0===n.length?(0,o.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===a.length?"The fleet has no labels yet.":`No key matches “${g.trim()}”.`}):n.map(a=>(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:a.title}),(0,o.jsx)("ul",{className:"flex flex-col",children:a.keys.map(a=>{let b="none"===a.mark?null:H[a.mark];return(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button",className:(0,F.classNames)(l,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{j(a)},children:[null===b?null:(0,o.jsx)(b,{"aria-hidden":!0}),(0,o.jsx)("span",{className:"font-mono",children:a.key}),(0,o.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:I(a.values.length,"value")}),(0,o.jsx)(B.ChevronRight,{"aria-hidden":!0})]})},a.labelId)})})]},a.title))]})}function K({groups:a,picked:b,isDisabled:c,onAdd:d}){let[e,f]=(0,v.useState)(!1);return(0,o.jsxs)(x.Popover,{open:e,onOpenChange:f,children:[(0,o.jsx)(x.PopoverTrigger,{render:(0,o.jsx)(w.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,o.jsx)(s.Plus,{}),disabled:c,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,o.jsxs)(x.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,o.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,o.jsx)(J,{groups:a,pickedValueIds:b.map(a=>a.valueId),countWord:"machine",onPick:a=>{f(!1),d(a)}}),(0,o.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,o.jsx)(u.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}a.s(["LabelPicker",0,J],681),a.s(["MachineLabelsField",0,function({shipName:a,picked:b,groups:c,match:d,isDisabled:e,onAdd:f,onRemove:g,unknown:h=[],onRemoveUnknown:i}){let j=n(b.length);return(0,o.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,o.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,o.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,o.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===b.length?(0,o.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,b.map((a,b)=>(0,o.jsxs)(v.Fragment,{children:[0===b?null:(0,o.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,o.jsx)(y.LabelChip,{chip:a,testId:"machine-label",...e?{}:{onRemove:()=>{g(a.valueId)}}})]},a.valueId)),h.map(a=>(0,o.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${a}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,o.jsx)(q.CircleAlert,{"aria-hidden":!0}),a,void 0===i||e?null:(0,o.jsx)("button",{type:"button","aria-label":`Remove ${a}`,onClick:()=>{i(a)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,o.jsx)(t.X,{"aria-hidden":!0})})]},a)),b.length+h.length>=p.SHIP_LABELS_MAX?null:(0,o.jsx)(K,{groups:c,picked:b,isDisabled:e,onAdd:f})]}),0===h.length?null:(0,o.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",h.join(", "),". Forming refuses ",1===h.length?"it":"them",": define ",1===h.length?"it":"them"," on the Labels page, or remove ",1===h.length?"it":"them"," here."]}),0===b.length?null:0===d.matching.length?(0,o.jsxs)("p",{role:"status","data-testid":"machine-labels-match",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,o.jsx)(r.Clock,{"aria-hidden":!0}),(0,o.jsxs)("span",{children:["No machine matches ",j.these,". You can still request: it waits on Needs crew until a machine ",j.carries,"."]})]}):(0,o.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",d.matching.length," of ",d.total," ",1===d.total?"machine":"machines",": ",d.matching.join(", "),"."]}),(0,o.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",a," only on a machine that carries every label here. Leave it empty for any machine."]})]})}],98600)},67042,a=>{"use strict";var b=a.i(72872);let c={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function d(a){return c[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":d(a)},"harnessDetection",0,function(a,c){if(void 0===a.version)return;if(void 0===a.modelsConfirmedAt||null===a.modelsConfirmedAt)return`${a.version} \xb7 no model confirmed`;let d=(0,b.relativeTime)(new Date(a.modelsConfirmedAt),c);return`${a.version} \xb7 models confirmed ${"Just now"===d?"just now":d}`},"harnessKind",0,function(a){return c[a]?.kind},"harnessWord",0,d])}];
2
2
 
3
3
  //# sourceMappingURL=_11cgy8n._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[38688,67594,92175,a=>{"use strict";var b=a.i(64831);let c={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};c.node;let d=(0,b.default)(c);a.s(["Activity",0,d],38688);let e={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};e.node;let f=(0,b.default)(e);a.s(["CirclePause",0,f],67594);let g={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};g.node;let h=(0,b.default)(g);a.s(["OctagonPause",0,h],92175)},63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},42955,a=>{"use strict";var b=a.i(64831);let c={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};c.node;let d=(0,b.default)(c);a.s(["Ellipsis",0,d],42955)},83138,a=>{"use strict";var b=a.i(64831);let c={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};c.node;let d=(0,b.default)(c);a.s(["FileText",0,d],83138)},25039,a=>{"use strict";var b=a.i(64831);let c={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],25039)},26766,a=>{"use strict";var b=a.i(64831);let c={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],26766)},53783,a=>{"use strict";var b=a.i(64831);let c={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},28339,a=>{"use strict";var b=a.i(64831);let c={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};c.node;let d=(0,b.default)(c);a.s(["UserMinus",0,d],28339)},85888,a=>{"use strict";var b=a.i(64831);let c={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};c.node;let d=(0,b.default)(c);a.s(["Users",0,d],85888)},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},71673,a=>{"use strict";var b=a.i(87924);a.s(["ConsequenceList",0,function({consequences:a}){return(0,b.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:a.map(({icon:a,text:c})=>(0,b.jsxs)("li",{className:"flex gap-2",children:[(0,b.jsx)(a,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{children:c})]},c))})}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},92717,a=>{"use strict";var b=a.i(87924),c=a.i(38688),d=a.i(67594),e=a.i(92175),f=a.i(80487),g=a.i(72872),h=a.i(45185);let i={working:c.Activity,blocked:e.OctagonPause,idle:d.CirclePause},j={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};a.s(["ReportLine",0,function({report:a,now:c,variant:d,isTimeInTitle:e=!1,testId:k}){let l="full"===d,m=(0,f.classNames)("flex min-w-0 items-center gap-1.5",l?"text-body":"text-meta");if(null===a)return(0,b.jsx)("span",{"data-testid":k,"data-state":"none",className:(0,f.classNames)(m,"text-muted-foreground"),children:"No report yet"});let n=i[a.state],o=j[h.REPORT_TONES[a.state]],p=new Date(a.reportedAt);return(0,b.jsxs)("span",{"data-testid":k,"data-state":a.state,title:e?`${(0,h.reportText)(a)} \xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportText)(a),className:m,children:[(0,b.jsx)(n,{"aria-hidden":!0,className:(0,f.classNames)("size-(--size-icon-sm) shrink-0",o)}),(0,b.jsx)("span",{className:(0,f.classNames)("shrink-0 font-medium",o),children:h.REPORT_STATE_WORDS[a.state]}),null===a.note?null:(0,b.jsx)("span",{className:"min-w-0 truncate text-foreground",children:a.note}),e?null:(0,b.jsx)("time",{dateTime:a.reportedAt,title:(0,g.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:l?`\xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportAge)(p,c)})]})}])},65698,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(46444),e=a.i(75297),f=a.i(45098);a.s(["TypedConfirm",0,function({expected:a,value:g,onValueChange:h,"data-testid":i="retire-typed-confirm"}){let j=(0,c.useId)(),k=(0,c.useId)();return(0,b.jsxs)("div",{"data-testid":i,className:"flex flex-col gap-1.5",children:[(0,b.jsxs)(f.Label,{htmlFor:j,className:"text-meta",children:["Type ",(0,b.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:a})," to confirm"]}),(0,b.jsx)(e.Input,{id:j,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":k,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:g,onChange:a=>{h(a.target.value)}}),(0,b.jsx)("p",{id:k,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===g?"Case and hyphens must match.":(0,d.isTypedMatch)(a,g)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},42231,46444,21327,3842,52702,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(31429);let e={one:"delivery",many:"deliveries"};function f(a){if(0===a)return"Nothing is in flight, so no delivery moves.";let b=1===a?"returns":"return";return`${(0,d.counted)(a,{one:"in-flight delivery",many:"in-flight deliveries"})} ${b} to pending. Nothing is lost.`}function g(a){if("crewed"===a.status){let b=null===a.location?"the session crewing it":`the session on ${a.location.description??a.location.kind.toLowerCase()}`;return`This ends ${b}. ${f(a.inFlightDeliveries)}`}if(null!==a.startingPrompt&&!a.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}a.s(["abandonedLine",0,function(a){return`${(0,d.counted)(a,e)} will be abandoned`},"inFlightLine",0,f,"isTypedMatch",0,function(a,b){return b===a},"newCrewLineReplaced",0,g,"retireButtonLabel",0,function(a){return 0===a?"Retire ship":`Retire and abandon ${(0,d.counted)(a,e)}`}],46444);var h=a.i(12540),i=a.i(12068),j=a.i(52357),k=a.i(48819),l=a.i(18441),m=a.i(2374),n=a.i(33809),o=a.i(67042),p=a.i(82314),q=a.i(94777);function r({crewLines:a,subject:d,testIdPrefix:e,onCopied:f,onCopyFailed:g}){let[h,i]=(0,c.useState)(a[0]?.harness),j=a.find(a=>a.harness===h)??a[0];if(!j)return null;let k=(0,o.crewLineHarnessWord)(j.harness);return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,b.jsx)(q.Tabs,{value:j.harness,onValueChange:b=>{let c=a.find(a=>a.harness===b);c&&i(c.harness)},children:(0,b.jsx)(q.TabsList,{"aria-label":`Crew ${d} from`,children:a.map(a=>(0,b.jsx)(q.TabsTrigger,{value:a.harness,"data-testid":`${e}-${a.harness}-tab`,children:(0,o.crewLineHarnessWord)(a.harness)},a.harness))})}),(0,b.jsx)("code",{"data-testid":`${e}-${j.harness}`,title:j.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:j.line}),(0,b.jsx)(p.CopyButton,{value:j.line,label:`Copy the ${k} crew line for ${d}`,isLabeled:!0,onCopied:f,onCopyFailed:g,"data-testid":`${e}-${j.harness}-copy`})]})}a.s(["CompactCrewLine",0,r],21327);var s=a.i(40392),t=a.i(83138);function u({note:a,model:c,template:d,testId:e}){return null===a&&null===c?null:(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,b.jsx)(t.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===d?"":` \xb7 ${d}`]}),null!==a&&(0,b.jsx)("span",{"data-testid":e,children:a}),null!==c&&(0,b.jsxs)("span",{children:["Runs ",(0,b.jsx)("span",{className:"font-mono",children:c})]})]})]})}function v({memberName:a,template:c,launchNote:d,model:e,crewLines:f}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{note:d,model:e,template:c,testId:"crew-line-launch-note"}),(0,b.jsx)(r,{crewLines:f,subject:a,testIdPrefix:"crew-line-text"}),(0,b.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(j.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function w({memberName:a,state:c,template:d,launchNote:e=null,model:f=null,crewLines:g,error:h,isOpen:j,onOpenChange:o,onConfirm:p}){let q="issuing"===c;return(0,b.jsx)(l.Dialog,{open:j,onOpenChange:a=>{q||o(a)},children:(0,b.jsxs)(l.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,b.jsxs)(l.DialogHeader,{children:[(0,b.jsxs)(l.DialogTitle,{children:["Crew line for ",a]}),(0,b.jsx)(l.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),q&&(0,b.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,b.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,b.jsx)(n.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,b.jsx)(n.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===c&&void 0!==g&&(0,b.jsx)(v,{memberName:a,template:d,launchNote:e,model:f,crewLines:g}),"error"===c&&(0,b.jsx)(s.InlineError,{title:"Couldn’t issue a crew line",description:`${h??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,b.jsxs)(l.DialogFooter,{children:[("shown"===c||q)&&(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{variant:"primary","data-testid":"crew-line-done",disabled:q}),children:"Done"}),"error"===c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Close"}),(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(k.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}a.s(["LaunchNote",0,u],3842),a.s(["CrewLineDialog",0,w],52702);var x=a.i(59613);function y({memberName:a,replacedText:c,isOpen:d,onOpenChange:e,onConfirm:f}){return(0,b.jsx)(x.AlertDialog,{open:d,onOpenChange:e,children:(0,b.jsxs)(x.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,b.jsxs)(x.AlertDialogHeader,{children:[(0,b.jsxs)(x.AlertDialogTitle,{children:["Get a new crew line for ",a,"?"]}),(0,b.jsx)(x.AlertDialogDescription,{children:c??"Its new secret is shown once, with its launch note."})]}),(0,b.jsxs)(x.AlertDialogFooter,{children:[(0,b.jsx)(x.AlertDialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Cancel"}),(0,b.jsx)(i.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:f,children:"Get new crew line"})]})]})})}function z(a){let d=(0,h.useNewCrewLine)(),[e,f]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(void 0),m=()=>{a&&d.mutate({squadronId:a.squadronId,shipId:a.member.shipId})},n=d.data?"shown":d.isError?"error":"issuing";return{isReady:a?.ship!==void 0,start:()=>{a?.ship&&(d.reset(),l(g(a.ship)),j(!0))},dialog:a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{memberName:a.member.name,replacedText:k,isOpen:i,onOpenChange:j,onConfirm:()=>{j(!1),f(!0),m()}}),(0,b.jsx)(w,{memberName:a.member.name,state:n,template:a.template,launchNote:d.data?.launchNote,model:d.data?.model,crewLines:d.data?.crewLines,error:d.error?.message,isOpen:e,onOpenChange:a=>{f(a),a||d.reset()},onConfirm:m})]}):null}}a.s(["GetNewCrewLine",0,function({isPrimary:a=!1,testId:c,...d}){let e=z(d);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Button,{size:"xs",variant:a?"primary":"secondary",disabled:!e.isReady,"data-testid":c,onClick:e.start,children:"Get new crew line"}),e.dialog]})},"useNewCrewLineFlow",0,z],42231)},80459,a=>{"use strict";var b=a.i(87924),c=a.i(79762),d=a.i(97024),e=a.i(26268),f=a.i(85888),g=a.i(72131),h=a.i(46444),i=a.i(31429),j=a.i(59613),k=a.i(12068),l=a.i(2374),m=a.i(71673),n=a.i(40392),o=a.i(65698);let p={one:"delivery",many:"deliveries"};function q({role:a,othersOfRole:b,blueprint:c}){let d=0===b.length?`no ${a}`:`${String(b.length)} ${a}`;return void 0===c?`The squadron then has ${d}.`:`The squadron then has ${d}; blueprint ${c.label} has ${String(c.count)}.`}function r(a){let{squadronId:l,member:r,othersOfRole:s,blueprint:t,openDeliveries:u,inFlightDeliveries:v,isPending:w,error:x,onConfirm:y}=a,[z,A]=(0,g.useState)(""),B=u>0,C=!B||(0,h.isTypedMatch)(r.name,z),D=0===s.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(j.AlertDialogHeader,{children:[(0,b.jsxs)(j.AlertDialogTitle,{children:["Remove ",r.name," from ",l,"?"]}),(0,b.jsx)(j.AlertDialogDescription,{children:B?(0,b.jsx)(b.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,b.jsx)(b.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),B?(0,b.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("p",{className:"font-medium",children:(0,h.abandonedLine)(u)}),(0,b.jsxs)("p",{className:"text-foreground",children:[u-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,b.jsx)(m.ConsequenceList,{consequences:[{icon:c.Archive,text:`Its ship ${r.name} is retired. Its history stays read-only.`},{icon:f.Users,text:q({role:r.role,othersOfRole:s,blueprint:t})}]}),D&&(0,b.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsxs)("span",{className:"font-medium",children:["The last ",r.role,"."]})," ",(0,b.jsxs)("span",{className:"text-foreground",children:[q({role:r.role,othersOfRole:s,blueprint:t})," Work for the role waits until a member is added."]})]})]}),!B&&(0,b.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,b.jsx)(d.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),B?(0,b.jsx)(o.TypedConfirm,{expected:r.name,value:z,onValueChange:A}):null,void 0!==x&&(0,b.jsx)(n.InlineError,{title:"Couldn’t remove the member",description:`${x} Nothing changed.`}),(0,b.jsxs)(j.AlertDialogFooter,{children:[(0,b.jsx)(j.AlertDialogClose,{render:(0,b.jsx)(k.Button,{disabled:w}),children:"Cancel"}),(0,b.jsx)(k.Button,{variant:"destructive",isLoading:w,disabled:!C,onClick:y,"data-testid":"remove-member-confirm",children:B?`Remove and abandon ${(0,i.counted)(u,p)}`:"Remove member"})]})]})}a.s(["RemoveMemberDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(j.AlertDialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(j.AlertDialogContent,{"data-testid":"remove-member-dialog",className:l.dialogSurface.phoneSheet,children:(0,b.jsx)(r,{...a})})})}])},67042,a=>{"use strict";let b={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function c(a){return b[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":c(a)},"harnessKind",0,function(a){return b[a]?.kind},"harnessWord",0,c])},45185,a=>{"use strict";a.i(23600);var b=a.i(90407),c=a.i(72872);let d={working:"Working",blocked:"Blocked",idle:"Idle"};a.s(["REPORT_STATE_WORDS",0,d,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(a,b){let d=Math.max(0,b.getTime()-a.getTime());return d<6e4?`${String(Math.floor(d/1e3))} s`:d<36e5?`${String(Math.floor(d/6e4))} min`:d<864e5?`${String(Math.floor(d/36e5))} h`:(0,c.relativeTime)(a,b)},"reportDetailsJson",0,function(a){return JSON.stringify(a,null,2)},"reportDetailsLabel",0,function(a){return`JSON \xb7 ${String((0,b.reportDetailsBytes)(a))} bytes`},"reportText",0,function(a){let b=d[a.state];return null===a.note?b:`${b}: ${a.note}`},"reportedWhen",0,function(a,b){let d=(0,c.relativeTime)(a,b);return`reported ${"Just now"===d?"just now":d}`}])}];
1
+ module.exports=[38688,67594,92175,a=>{"use strict";var b=a.i(64831);let c={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};c.node;let d=(0,b.default)(c);a.s(["Activity",0,d],38688);let e={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};e.node;let f=(0,b.default)(e);a.s(["CirclePause",0,f],67594);let g={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};g.node;let h=(0,b.default)(g);a.s(["OctagonPause",0,h],92175)},63359,a=>{"use strict";var b=a.i(64831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],63359)},82260,a=>{"use strict";var b=a.i(64831);let c={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};c.node;let d=(0,b.default)(c);a.s(["Bot",0,d],82260)},42955,a=>{"use strict";var b=a.i(64831);let c={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};c.node;let d=(0,b.default)(c);a.s(["Ellipsis",0,d],42955)},83138,a=>{"use strict";var b=a.i(64831);let c={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};c.node;let d=(0,b.default)(c);a.s(["FileText",0,d],83138)},25039,a=>{"use strict";var b=a.i(64831);let c={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],25039)},26766,a=>{"use strict";var b=a.i(64831);let c={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};c.node;let d=(0,b.default)(c);a.s(["KeyRound",0,d],26766)},53783,a=>{"use strict";var b=a.i(64831);let c={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};c.node;let d=(0,b.default)(c);a.s(["SquareTerminal",0,d],53783)},25212,a=>{"use strict";var b=a.i(64831);let c={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};c.node;let d=(0,b.default)(c);a.s(["Unplug",0,d],25212)},28339,a=>{"use strict";var b=a.i(64831);let c={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};c.node;let d=(0,b.default)(c);a.s(["UserMinus",0,d],28339)},85888,a=>{"use strict";var b=a.i(64831);let c={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};c.node;let d=(0,b.default)(c);a.s(["Users",0,d],85888)},82314,85650,a=>{"use strict";var b=a.i(87924),c=a.i(52562),d=a.i(64831);let e={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};e.node;let f=(0,d.default)(e);a.s(["Copy",0,f],85650);var g=a.i(72131),h=a.i(12068);a.s(["CopyButton",0,function({value:a,label:d,size:e="xs",isLabeled:i=!1,onCopied:j,onCopyFailed:k,className:l,"data-testid":m}){let[n,o]=(0,g.useState)(!1);async function p(){try{await navigator.clipboard.writeText(a)}catch{k?.();return}o(!0),j?.(),setTimeout(()=>{o(!1)},1500)}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"ghost",size:e,isIconOnly:!i,"aria-label":d,title:i?void 0:d,icon:n?(0,b.jsx)(c.Check,{"aria-hidden":!0}):(0,b.jsx)(f,{"aria-hidden":!0}),className:l,"data-testid":m,onClick:()=>{p()},children:i?n?"Copied":"Copy":null}),(0,b.jsx)("span",{role:"status",className:"sr-only",children:n?"Copied.":""})]})}],82314)},71673,a=>{"use strict";var b=a.i(87924);a.s(["ConsequenceList",0,function({consequences:a}){return(0,b.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:a.map(({icon:a,text:c})=>(0,b.jsxs)("li",{className:"flex gap-2",children:[(0,b.jsx)(a,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsx)("span",{children:c})]},c))})}])},40108,a=>{"use strict";var b=a.i(87924),c=a.i(63359),d=a.i(82260),e=a.i(64831);let f={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};f.node;let g=(0,e.default)(f),h={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};h.node;let i=(0,e.default)(h),j={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};j.node;let k=(0,e.default)(j),l={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};l.node;let m=(0,e.default)(l),n={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};n.node;let o=(0,e.default)(n);var p=a.i(53783),q=a.i(25212),r=a.i(80487),s=a.i(67042),t=a.i(29703);let u={DEVICE:i,CLOUD:g,SERVER:o,OTHER:k},v={coding:p.SquareTerminal,chat:m,bot:d.Bot,console:c.AppWindow},w={md:"text-body",sm:"text-meta"};a.s(["LocationTag",0,function({kind:a,description:c=null,harness:d=null,isCompact:e=!1,size:f="md",className:g}){let h=(0,r.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[f],g);if(null===a)return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(q.Unplug,{"aria-hidden":!0}),"No session"]});let i=u[a],j=(0,t.locationKindWord)(a),k=null===c?j:`${j} \xb7 ${c}`;if(null!==d){let a=(0,s.harnessKind)(d),e=void 0===a?void 0:v[a],f=(0,s.harnessWord)(d);return(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:null===c?`${f} \xb7 ${j}`:`${f} \xb7 ${j}: ${c}`,children:[void 0===e?null:(0,b.jsx)(e,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate text-foreground",children:f}),(0,b.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsx)("span",{className:"truncate",children:j}),null===c?null:(0,b.jsxs)("span",{className:"sr-only",children:[": ",c]})]})}return e?(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,title:k,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"sr-only",children:[j,": "]}),(0,b.jsx)("span",{className:"truncate text-foreground",children:c??j})]}):(0,b.jsxs)("span",{"data-slot":"location-tag",className:h,children:[(0,b.jsx)(i,{"aria-hidden":!0}),(0,b.jsxs)("span",{className:"truncate",children:[j,null===c?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,b.jsx)("span",{className:"sr-only",children:", "}),(0,b.jsx)("span",{className:"text-foreground",children:c})]})]})]})}],40108)},92717,a=>{"use strict";var b=a.i(87924),c=a.i(38688),d=a.i(67594),e=a.i(92175),f=a.i(80487),g=a.i(72872),h=a.i(45185);let i={working:c.Activity,blocked:e.OctagonPause,idle:d.CirclePause},j={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};a.s(["ReportLine",0,function({report:a,now:c,variant:d,isTimeInTitle:e=!1,testId:k}){let l="full"===d,m=(0,f.classNames)("flex min-w-0 items-center gap-1.5",l?"text-body":"text-meta");if(null===a)return(0,b.jsx)("span",{"data-testid":k,"data-state":"none",className:(0,f.classNames)(m,"text-muted-foreground"),children:"No report yet"});let n=i[a.state],o=j[h.REPORT_TONES[a.state]],p=new Date(a.reportedAt);return(0,b.jsxs)("span",{"data-testid":k,"data-state":a.state,title:e?`${(0,h.reportText)(a)} \xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportText)(a),className:m,children:[(0,b.jsx)(n,{"aria-hidden":!0,className:(0,f.classNames)("size-(--size-icon-sm) shrink-0",o)}),(0,b.jsx)("span",{className:(0,f.classNames)("shrink-0 font-medium",o),children:h.REPORT_STATE_WORDS[a.state]}),null===a.note?null:(0,b.jsx)("span",{className:"min-w-0 truncate text-foreground",children:a.note}),e?null:(0,b.jsx)("time",{dateTime:a.reportedAt,title:(0,g.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:l?`\xb7 ${(0,h.reportedWhen)(p,c)}`:(0,h.reportAge)(p,c)})]})}])},65698,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(46444),e=a.i(75297),f=a.i(45098);a.s(["TypedConfirm",0,function({expected:a,value:g,onValueChange:h,"data-testid":i="retire-typed-confirm"}){let j=(0,c.useId)(),k=(0,c.useId)();return(0,b.jsxs)("div",{"data-testid":i,className:"flex flex-col gap-1.5",children:[(0,b.jsxs)(f.Label,{htmlFor:j,className:"text-meta",children:["Type ",(0,b.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:a})," to confirm"]}),(0,b.jsx)(e.Input,{id:j,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":k,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:g,onChange:a=>{h(a.target.value)}}),(0,b.jsx)("p",{id:k,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===g?"Case and hyphens must match.":(0,d.isTypedMatch)(a,g)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},42231,46444,21327,3842,52702,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(31429);let e={one:"delivery",many:"deliveries"};function f(a){if(0===a)return"Nothing is in flight, so no delivery moves.";let b=1===a?"returns":"return";return`${(0,d.counted)(a,{one:"in-flight delivery",many:"in-flight deliveries"})} ${b} to pending. Nothing is lost.`}function g(a){if("crewed"===a.status){let b=null===a.location?"the session crewing it":`the session on ${a.location.description??a.location.kind.toLowerCase()}`;return`This ends ${b}. ${f(a.inFlightDeliveries)}`}if(null!==a.startingPrompt&&!a.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}a.s(["abandonedLine",0,function(a){return`${(0,d.counted)(a,e)} will be abandoned`},"inFlightLine",0,f,"isTypedMatch",0,function(a,b){return b===a},"newCrewLineReplaced",0,g,"retireButtonLabel",0,function(a){return 0===a?"Retire ship":`Retire and abandon ${(0,d.counted)(a,e)}`}],46444);var h=a.i(12540),i=a.i(12068),j=a.i(52357),k=a.i(48819),l=a.i(18441),m=a.i(2374),n=a.i(33809),o=a.i(67042),p=a.i(82314),q=a.i(94777);function r({crewLines:a,subject:d,testIdPrefix:e,onCopied:f,onCopyFailed:g}){let[h,i]=(0,c.useState)(a[0]?.harness),j=a.find(a=>a.harness===h)??a[0];if(!j)return null;let k=(0,o.crewLineHarnessWord)(j.harness);return(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,b.jsx)(q.Tabs,{value:j.harness,onValueChange:b=>{let c=a.find(a=>a.harness===b);c&&i(c.harness)},children:(0,b.jsx)(q.TabsList,{"aria-label":`Crew ${d} from`,children:a.map(a=>(0,b.jsx)(q.TabsTrigger,{value:a.harness,"data-testid":`${e}-${a.harness}-tab`,children:(0,o.crewLineHarnessWord)(a.harness)},a.harness))})}),(0,b.jsx)("code",{"data-testid":`${e}-${j.harness}`,title:j.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:j.line}),(0,b.jsx)(p.CopyButton,{value:j.line,label:`Copy the ${k} crew line for ${d}`,isLabeled:!0,onCopied:f,onCopyFailed:g,"data-testid":`${e}-${j.harness}-copy`})]})}a.s(["CompactCrewLine",0,r],21327);var s=a.i(40392),t=a.i(83138);function u({note:a,model:c,template:d,testId:e}){return null===a&&null===c?null:(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,b.jsx)(t.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===d?"":` \xb7 ${d}`]}),null!==a&&(0,b.jsx)("span",{"data-testid":e,children:a}),null!==c&&(0,b.jsxs)("span",{children:["Runs ",(0,b.jsx)("span",{className:"font-mono",children:c})]})]})]})}function v({memberName:a,template:c,launchNote:d,model:e,crewLines:f}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{note:d,model:e,template:c,testId:"crew-line-launch-note"}),(0,b.jsx)(r,{crewLines:f,subject:a,testIdPrefix:"crew-line-text"}),(0,b.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,b.jsx)(j.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function w({memberName:a,state:c,template:d,launchNote:e=null,model:f=null,crewLines:g,error:h,isOpen:j,onOpenChange:o,onConfirm:p}){let q="issuing"===c;return(0,b.jsx)(l.Dialog,{open:j,onOpenChange:a=>{q||o(a)},children:(0,b.jsxs)(l.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:m.dialogSurface.phoneFullScreen,children:[(0,b.jsxs)(l.DialogHeader,{children:[(0,b.jsxs)(l.DialogTitle,{children:["Crew line for ",a]}),(0,b.jsx)(l.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),q&&(0,b.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,b.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,b.jsx)(n.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,b.jsx)(n.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===c&&void 0!==g&&(0,b.jsx)(v,{memberName:a,template:d,launchNote:e,model:f,crewLines:g}),"error"===c&&(0,b.jsx)(s.InlineError,{title:"Couldn’t issue a crew line",description:`${h??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,b.jsxs)(l.DialogFooter,{children:[("shown"===c||q)&&(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{variant:"primary","data-testid":"crew-line-done",disabled:q}),children:"Done"}),"error"===c&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.DialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Close"}),(0,b.jsx)(i.Button,{variant:"primary",icon:(0,b.jsx)(k.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:p,children:"Try again"})]})]})]})})}a.s(["LaunchNote",0,u],3842),a.s(["CrewLineDialog",0,w],52702);var x=a.i(59613);function y({memberName:a,replacedText:c,isOpen:d,onOpenChange:e,onConfirm:f}){return(0,b.jsx)(x.AlertDialog,{open:d,onOpenChange:e,children:(0,b.jsxs)(x.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:m.dialogSurface.phoneSheet,children:[(0,b.jsxs)(x.AlertDialogHeader,{children:[(0,b.jsxs)(x.AlertDialogTitle,{children:["Get a new crew line for ",a,"?"]}),(0,b.jsx)(x.AlertDialogDescription,{children:c??"Its new secret is shown once, with its launch note."})]}),(0,b.jsxs)(x.AlertDialogFooter,{children:[(0,b.jsx)(x.AlertDialogClose,{render:(0,b.jsx)(i.Button,{}),children:"Cancel"}),(0,b.jsx)(i.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:f,children:"Get new crew line"})]})]})})}function z(a){let d=(0,h.useNewCrewLine)(),[e,f]=(0,c.useState)(!1),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(void 0),m=()=>{a&&d.mutate({squadronId:a.squadronId,shipId:a.member.shipId})},n=d.data?"shown":d.isError?"error":"issuing";return{isReady:a?.ship!==void 0,start:()=>{a?.ship&&(d.reset(),l(g(a.ship)),j(!0))},dialog:a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{memberName:a.member.name,replacedText:k,isOpen:i,onOpenChange:j,onConfirm:()=>{j(!1),f(!0),m()}}),(0,b.jsx)(w,{memberName:a.member.name,state:n,template:a.template,launchNote:d.data?.launchNote,model:d.data?.model,crewLines:d.data?.crewLines,error:d.error?.message,isOpen:e,onOpenChange:a=>{f(a),a||d.reset()},onConfirm:m})]}):null}}a.s(["GetNewCrewLine",0,function({isPrimary:a=!1,testId:c,...d}){let e=z(d);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Button,{size:"xs",variant:a?"primary":"secondary",disabled:!e.isReady,"data-testid":c,onClick:e.start,children:"Get new crew line"}),e.dialog]})},"useNewCrewLineFlow",0,z],42231)},80459,a=>{"use strict";var b=a.i(87924),c=a.i(79762),d=a.i(97024),e=a.i(26268),f=a.i(85888),g=a.i(72131),h=a.i(46444),i=a.i(31429),j=a.i(59613),k=a.i(12068),l=a.i(2374),m=a.i(71673),n=a.i(40392),o=a.i(65698);let p={one:"delivery",many:"deliveries"};function q({role:a,othersOfRole:b,blueprint:c}){let d=0===b.length?`no ${a}`:`${String(b.length)} ${a}`;return void 0===c?`The squadron then has ${d}.`:`The squadron then has ${d}; blueprint ${c.label} has ${String(c.count)}.`}function r(a){let{squadronId:l,member:r,othersOfRole:s,blueprint:t,openDeliveries:u,inFlightDeliveries:v,isPending:w,error:x,onConfirm:y}=a,[z,A]=(0,g.useState)(""),B=u>0,C=!B||(0,h.isTypedMatch)(r.name,z),D=0===s.length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(j.AlertDialogHeader,{children:[(0,b.jsxs)(j.AlertDialogTitle,{children:["Remove ",r.name," from ",l,"?"]}),(0,b.jsx)(j.AlertDialogDescription,{children:B?(0,b.jsx)(b.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,b.jsx)(b.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),B?(0,b.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("p",{className:"font-medium",children:(0,h.abandonedLine)(u)}),(0,b.jsxs)("p",{className:"text-foreground",children:[u-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,b.jsx)(m.ConsequenceList,{consequences:[{icon:c.Archive,text:`Its ship ${r.name} is retired. Its history stays read-only.`},{icon:f.Users,text:q({role:r.role,othersOfRole:s,blueprint:t})}]}),D&&(0,b.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,b.jsx)(e.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,b.jsxs)("span",{children:[(0,b.jsxs)("span",{className:"font-medium",children:["The last ",r.role,"."]})," ",(0,b.jsxs)("span",{className:"text-foreground",children:[q({role:r.role,othersOfRole:s,blueprint:t})," Work for the role waits until a member is added."]})]})]}),!B&&(0,b.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,b.jsx)(d.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),B?(0,b.jsx)(o.TypedConfirm,{expected:r.name,value:z,onValueChange:A}):null,void 0!==x&&(0,b.jsx)(n.InlineError,{title:"Couldn’t remove the member",description:`${x} Nothing changed.`}),(0,b.jsxs)(j.AlertDialogFooter,{children:[(0,b.jsx)(j.AlertDialogClose,{render:(0,b.jsx)(k.Button,{disabled:w}),children:"Cancel"}),(0,b.jsx)(k.Button,{variant:"destructive",isLoading:w,disabled:!C,onClick:y,"data-testid":"remove-member-confirm",children:B?`Remove and abandon ${(0,i.counted)(u,p)}`:"Remove member"})]})]})}a.s(["RemoveMemberDialog",0,function(a){let{isOpen:c,onOpenChange:d,isPending:e}=a;return(0,b.jsx)(j.AlertDialog,{open:c,onOpenChange:a=>{e||d(a)},children:(0,b.jsx)(j.AlertDialogContent,{"data-testid":"remove-member-dialog",className:l.dialogSurface.phoneSheet,children:(0,b.jsx)(r,{...a})})})}])},67042,a=>{"use strict";var b=a.i(72872);let c={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function d(a){return c[a]?.word??a}a.s(["crewLineHarnessWord",0,function(a){return"chat"===a?"Chat":d(a)},"harnessDetection",0,function(a,c){if(void 0===a.version)return;if(void 0===a.modelsConfirmedAt||null===a.modelsConfirmedAt)return`${a.version} \xb7 no model confirmed`;let d=(0,b.relativeTime)(new Date(a.modelsConfirmedAt),c);return`${a.version} \xb7 models confirmed ${"Just now"===d?"just now":d}`},"harnessKind",0,function(a){return c[a]?.kind},"harnessWord",0,d])},45185,a=>{"use strict";a.i(23600);var b=a.i(90407),c=a.i(72872);let d={working:"Working",blocked:"Blocked",idle:"Idle"};a.s(["REPORT_STATE_WORDS",0,d,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(a,b){let d=Math.max(0,b.getTime()-a.getTime());return d<6e4?`${String(Math.floor(d/1e3))} s`:d<36e5?`${String(Math.floor(d/6e4))} min`:d<864e5?`${String(Math.floor(d/36e5))} h`:(0,c.relativeTime)(a,b)},"reportDetailsJson",0,function(a){return JSON.stringify(a,null,2)},"reportDetailsLabel",0,function(a){return`JSON \xb7 ${String((0,b.reportDetailsBytes)(a))} bytes`},"reportText",0,function(a){let b=d[a.state];return null===a.note?b:`${b}: ${a.note}`},"reportedWhen",0,function(a,b){let d=(0,c.relativeTime)(a,b);return`reported ${"Just now"===d?"just now":d}`}])}];
2
2
 
3
3
  //# sourceMappingURL=_17u4fan._.js.map