@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
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69644,69846,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let n=(0,t.default)(s);e.s(["FolderOpen",0,n],69644);let i={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"}]]};i.node;let a=(0,t.default)(i);e.s(["GitBranch",0,a],69846)},59659,e=>{"use strict";var t=e.i(56420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let n=(0,t.default)(s);e.s(["Trash2",0,n],59659)},96773,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(44824),i=e.i(45608),a=e.i(95475),r=e.i(2767),l=e.i(15905),o=e.i(24010),d=e.i(94945),c=e.i(17981);function h({worktree:e,onOpenChange:s,isPending:n,error:i,onClear:a}){return(0,t.jsx)(o.AlertDialog,{open:void 0!==e,onOpenChange:e=>{n||s(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":"clear-worktree-dialog",className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Delete the kept ",(0,t.jsx)("span",{className:"font-mono",children:e?.repository})," worktree of ",e?.shipName,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:void 0===e?null:`${e.machineName} removes it on its next pass, with its uncommitted changes. They can't be recovered, and the request can't be withdrawn.`})]}),void 0===i?null:(0,t.jsx)(c.InlineError,{title:"Couldn’t delete the worktree",description:`Refused: ${i}. Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:n}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:n,"data-testid":"clear-worktree-confirm",onClick:a,children:"Delete worktree"})]})]})})}var m=e.i(22768),u=e.i(16984),x=e.i(56420);let p={name:"folder-x",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]};p.node;let g=(0,x.default)(p);var f=e.i(11568),j=e.i(49287),v=e.i(86875),w=e.i(59659),b=e.i(22016),N=e.i(54616),y=e.i(66027),k=e.i(12598),C=e.i(27702),S=e.i(54492),T=e.i(49635),I=e.i(61966),A=e.i(19321),z=e.i(54422),$=e.i(67874),B=e.i(99261),L=e.i(63481),D=e.i(78865),_=e.i(94313);function M({spot:e,now:s}){let n="running"===e.status?e.startedAt:null,i=(0,S.restartWords)(e);return null===n&&void 0===i?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"machine-spot-session",children:[null===n?null:(0,t.jsxs)(t.Fragment,{children:["since"," ",(0,t.jsx)("time",{dateTime:n,title:(0,T.fullDateTime)(new Date(n)),className:"tabular-nums",children:(0,T.sinceTime)(new Date(n),s)})]}),null!==n&&void 0!==i?" · ":null,i]})}function O({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1 bg-card px-3.5 py-3",children:[(0,t.jsx)("dt",{className:"text-meta text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"flex min-w-0 items-center gap-1.5 text-body text-foreground",children:s})]})}function q({title:e,count:s,note:n,children:i}){return(0,t.jsxs)("section",{"aria-label":e,className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("h2",{className:"flex items-baseline gap-2 text-section font-semibold",children:[e,void 0===s?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground tabular-nums",children:s}),void 0===n?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:n})]}),i]})}function R({icon:e,name:s,meta:n,action:i}){return(0,t.jsxs)("li",{className:"flex items-start gap-2 px-3.5 py-2.5 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[e,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:s}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:n})]}),i]})}function U({kept:e,shipName:s,isBeingCleared:n,onClear:i}){let a=n?(0,t.jsx)(W,{}):void 0===i?void 0:(0,t.jsx)(l.Button,{size:"xs",variant:"ghost",icon:(0,t.jsx)(w.Trash2,{"aria-hidden":!0}),"aria-label":`Delete the kept ${e.repository} worktree of ${s}`,"data-testid":"machine-worktree-delete",onClick:()=>{i({...e,shipName:s})},children:"Delete"});return(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${s}`,meta:"Kept after release, with uncommitted changes",action:a})}function W(){return(0,t.jsxs)("span",{"data-testid":"machine-worktree-clearing",className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-1.5 py-0.5 text-meta text-tone-waiting-fg [&_svg]:mt-0 [&_svg]:text-tone-waiting-fg",children:[(0,t.jsx)(f.LoaderCircle,{"aria-hidden":!0}),"Clearing"]})}function H({machine:e,state:s,spots:n,location:i,labels:a,now:r,shipNames:o,clearRequests:d=[],onClearKept:c}){if("loading"===s||"ready"===s&&void 0===e)return(0,t.jsxs)("div",{"aria-busy":!0,"data-testid":"machine-detail",className:"flex flex-col gap-4",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading the machine"}),(0,t.jsx)(A.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(A.Skeleton,{className:"h-16 w-full rounded-lg"}),(0,t.jsx)(A.Skeleton,{className:"h-40 w-full rounded-lg"})]});if("not-found"===s||void 0===e)return(0,t.jsx)("div",{"data-testid":"machine-detail",children:(0,t.jsx)($.EmptyState,{variant:"section",icon:(0,t.jsx)(m.CircleAlert,{}),title:"Machine not found",description:"The trierarch plugin lists no machine with this ship id. The link may be incomplete.",action:(0,t.jsx)(l.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:"/trierarchs"}),children:"Back to Trierarchs"})})});let{details:h,report:x}=e,p=null===x?null:new Date(x.reportedAt),f=e.isSilent&&null!==e.lastSeenAt,w=f&&null!==p?`As of ${(0,T.clockTime)(p)}`:void 0;return(0,t.jsxs)("div",{"data-testid":"machine-detail",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2.5",children:[(0,t.jsxs)("h1",{className:"inline-flex items-center gap-2 text-title font-semibold [&_svg]:size-(--size-icon-lg) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(v.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(_.MachineLiveness,{machine:e,now:r})]}),(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(j.Ship,{"aria-hidden":!0}),nativeButton:!1,render:(0,t.jsx)(b.default,{href:`/ships/${e.shipId}`}),"data-testid":"machine-ship-page",children:"Ship page"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-5 gap-px overflow-hidden rounded-lg border border-border bg-border max-lg:grid-cols-2",children:[(0,t.jsx)(O,{label:"Capacity",children:(0,t.jsx)(z.CapacityBar,{spots:n,caps:h?.caps,unknownText:null===p?"Unknown until it answers":`Unknown since ${(0,T.clockTime)(p)}`})}),(0,t.jsx)(O,{label:"Machine",children:(0,t.jsx)(L.LocationTag,{kind:i?.kind??null,description:i?.description,size:"md"})}),(0,t.jsx)(O,{label:"Version",children:null===h?(0,t.jsx)("span",{className:"text-muted-foreground",children:"Unknown"}):(0,t.jsxs)("span",{className:"font-mono text-id",children:["@aeolus-fleet/trierarch@",h.version]})}),(0,t.jsx)(O,{label:"Last answer",children:null===p?(0,t.jsx)("span",{className:"text-muted-foreground",children:"None yet"}):(0,t.jsx)("time",{dateTime:x?.reportedAt,title:(0,T.fullDateTime)(p),className:"tabular-nums",children:(0,_.lastAnswer)(p,r)})}),(0,t.jsxs)(O,{label:"Ship id",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:e.shipId}),(0,t.jsx)(I.CopyButton,{value:e.shipId,label:"Copy ship id"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5","data-testid":"machine-labels-row",children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Labels"}),void 0===a?(0,t.jsx)(A.Skeleton,{className:"h-5.5 w-40"}):(0,t.jsx)(B.ShipLabels,{chips:a}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Read-only here. Crew requests that ask for machine labels go only to machines carrying all of them."})]}),f&&null!==e.lastSeenAt?(0,t.jsxs)("p",{role:"alert","data-testid":"machine-silent",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(u.CircleX,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{className:"font-medium",children:[e.name," has not answered since ",(0,T.clockTime)(new Date(e.lastSeenAt)),"."]})," ","It is probably not running",i?.description?` on ${i.description}`:"",". Until it answers, nothing restarts its sessions; everything below is its last answer."]})]}):null,(0,t.jsx)(q,{title:"Running here",count:n.length,note:w,children:0===n.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No ship is assigned to this trierarch."}):(0,t.jsx)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-spots",children:n.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-3 px-3.5 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)(b.default,{href:`/ships/${e.shipId}`,className:"truncate text-body font-medium hover:underline",children:e.name}),void 0===e.workspace?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"machine-spot-workspace",children:[(0,t.jsx)("span",{className:"sr-only",children:"Workspace: "}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.workspace.name})," · ","worktree"===e.workspace.kind?"new worktree":"folder, as it is"]})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2.5",children:[(0,t.jsx)(M,{spot:e,now:r}),(0,t.jsx)(D.StatusBadge,{status:e.status})]})]},e.shipId))})}),(0,t.jsx)(q,{title:"Harnesses",count:h?.harnesses.length,note:w,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:h.harnesses.map(e=>(0,t.jsx)(_.HarnessOffer,{harness:e,now:r},e.harness))})}),(0,t.jsx)(q,{title:"Workspaces",count:null===h?void 0:h.workspaces.repositories.length+h.workspaces.folders.length,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:(0,t.jsx)(_.WorkspaceOffer,{workspaces:h.workspaces})})}),null===h||0===h.kept.length&&0===h.orphans.length?null:(0,t.jsxs)(q,{title:"Worktrees",children:[(0,t.jsxs)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-worktrees",children:[h.kept.map(s=>{var n;return(0,t.jsx)(U,{kept:s,shipName:o?.get(s.shipId)??s.shipId,isBeingCleared:(n={trierarchShipId:e.shipId,...s},d.some(e=>e.trierarchShipId===n.trierarchShipId&&e.shipId===n.shipId&&e.repository===n.repository)),onClear:c},`${s.shipId}/${s.repository}`)}),h.orphans.map(e=>(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${e.name}`,meta:"No crew request"},`${e.repository}/${e.name}`))]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"The trierarch never deletes these on its own."})]})]})}var E=e.i(42383),F=e.i(274),P=e.i(90262),V=e.i(88721),K=e.i(5387),G=e.i(80581),J=e.i(86413),Q=e.i(18423),X=e.i(14695),Z=e.i(28459),Y=e.i(96676),ee=e.i(3979),et=e.i(78485),es=e.i(53573),en=e.i(265);e.s(["default",0,function({params:e}){let l,o,d,{shipId:c}=(0,s.use)(e),m=(0,Y.useNow)(),u=(0,V.useAccountMenu)(m),x=(0,J.useOpenInboxCount)(),p=(0,Z.useNeedsAttention)(),g=(0,Z.useAttentionCount)(),f=(0,Q.useLiveFleet)(),j=(0,K.useFleetSnapshot)(),v=(0,K.useLabelContext)(),w=(0,en.useTrierarchPluginConnection)(),b=(0,en.useMachines)(),S=(0,P.useAccess)(),T=(0,ee.usePluginNav)(),[I,A]=(0,s.useState)(!1),[z,$]=(0,s.useState)(!1),[B,L]=(0,s.useState)(void 0),D=(l=(0,C.useTRPC)(),(0,y.useQuery)(l.fleet.clearRequests.queryOptions(void 0,{refetchInterval:1e4}))),_=(o=(0,C.useTRPC)(),d=(0,k.useQueryClient)(),(0,N.useMutation)(o.fleet.clearWorktree.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:o.fleet.clearRequests.queryKey()})})));(0,et.useSignInWhenSessionEnds)([p.error,f.error]);let M=b.data?.find(e=>e.shipId===c),O=j.data??[],q=void 0===M?[]:(0,X.spotsOf)(M,O),R=O.find(e=>e.id===c),U=new Map([...(0,es.useShips)(q.map(e=>e.shipId))].map(([e,t])=>[e,t.crewRequest?.settings]));return(0,t.jsxs)(F.DetailLayout,{title:M?.name??"Machine",parents:[{href:"/trierarchs",label:"Trierarchs"}],live:f.live,nav:{active:"trierarchs",inboxCount:x,attentionCount:g,...T},onCompose:S.canSend?()=>{A(!0)}:void 0,onSearch:()=>{$(!0)},account:u,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ConsoleNotices,{}),(0,t.jsx)(a.ConsoleGuide,{})]}),header:"connected"!==w||b.isError?(0,t.jsx)(E.MachineList,{connection:w,machines:b.data,ships:O,error:b.isError?b.error.message:void 0,onRetry:()=>{b.refetch()},now:m}):(0,t.jsx)(H,{machine:M,state:void 0===b.data?"loading":void 0===M?"not-found":"ready",spots:(0,X.withWorkspaces)(q,U),location:R?.location??null,...void 0===v||void 0===R?{}:{labels:(0,G.chipsOf)(R,v)},now:m,shipNames:new Map(O.map(e=>[e.id,e.name])),clearRequests:D.data??[],...S.canManage&&void 0!==M?{onClearKept:e=>{_.reset(),L({...e,trierarchShipId:M.shipId,machineName:M.name})}}:{}}),children:[(0,t.jsx)(h,{worktree:B,onOpenChange:e=>{e||L(void 0)},isPending:_.isPending,...null===_.error?{}:{error:_.error.message},onClear:()=>{void 0!==B&&_.mutate({trierarchShipId:B.trierarchShipId,shipId:B.shipId,repository:B.repository},{onSuccess:()=>{L(void 0)}})}}),(0,t.jsx)(n.ComposeMessage,{isOpen:I,onOpenChange:A}),(0,t.jsx)(i.ConsoleCommands,{isOpen:z,onOpenChange:$,onCompose:()=>{A(!0)}})]})}],96773)},54422,e=>{"use strict";var t=e.i(43476),s=e.i(90063),n=e.i(14695);let i={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"};e.s(["CapacityBar",0,function({spots:e,caps:a,unknownText:r="Unknown",testId:l}){let o=(0,n.capacityLine)(e,a);if(void 0===a||void 0===o)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":o,"data-testid":l,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,n)=>(0,t.jsx)("span",{title:`Spot ${String(n+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",i[e.status])},e.shipId)),Array.from({length:d},(s,n)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+n+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(n)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:o})]})}])},99261,56539,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let n={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};n.node;let i=(0,s.default)(n);e.s(["ChevronUp",0,i],56539);var a=e.i(71645),r=e.i(95960);e.s(["ShipLabels",0,function({chips:e}){let[s,n]=(0,a.useState)(!1);return 0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!s&&e.length>2?(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[e.slice(0,2).map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId)),(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{n(!0)},children:["+",e.length-2]})]}):(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(e){let t=[];for(let s of e){let e="none"===s.mark?null:s.ownerName,n=t.find(t=>t.owner===e);void 0===n?t.push({owner:e,chips:[s]}):n.chips.push(s)}return t})(e).map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===e.owner?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e.owner]}),e.chips.map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e.owner??"")),e.length>2?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{n(!1)},children:[(0,t.jsx)(i,{"aria-hidden":!0}),"Show fewer"]}):null]})}],99261)},42383,94313,e=>{"use strict";var t=e.i(43476),s=e.i(77071),n=e.i(86875),i=e.i(94831),a=e.i(22016),r=e.i(14695),l=e.i(31513),o=e.i(15905),d=e.i(67874),c=e.i(17981),h=e.i(88393),m=e.i(71567),u=e.i(52886),x=e.i(69644),p=e.i(69846),g=e.i(66787),f=e.i(66616),j=e.i(49635),v=e.i(66390),w=e.i(54422),b=e.i(63481);let N={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"},y={alive:"Alive",silent:"Not answering","not-started":"Not started"};function k({machine:e,now:s}){let i=(0,r.machineLiveness)(e),a=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":i,children:[(0,t.jsxs)(v.Badge,{variant:"outline",className:N[i],children:["alive"===i?(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(u.CircleDashed,{"aria-hidden":!0}),y[i]]}),null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,j.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===i?`since ${(0,j.clockTime)(a)}`:(0,j.lastSeen)(a,s).replace("Last seen","seen")]})]})}function C(e,t){let s=(0,j.relativeTime)(e,t);return"Just now"===s?"just now":s}function S({title:e,children:s,className:n}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${n??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function T({harness:e,now:s}){let n=(0,f.harnessDetection)(e,s);return(0,t.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,t.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,t.jsx)(m.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness),void 0===n?null:(0,t.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:n})]}),(0,r.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(s=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[s,s===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},s))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(s=>e.riskyFlags?.includes(s)===!0?(0,t.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,t.jsx)(g.TriangleAlert,{"aria-hidden":!0}),s,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},s):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:s},s))})]})}function I({title:e,icon:s,names:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===n.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):n.map(e=>(0,t.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:[s,e]},e))]})}function A({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(I,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(p.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(I,{title:"Folders · used as they are",icon:(0,t.jsx)(x.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function z({machine:e,spots:s,location:i,now:r}){let{details:l,report:o}=e,d=null===o?null:new Date(o.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.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,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(a.default,{href:`/trierarchs/${e.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,t.jsx)(n.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(k,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(b.LocationTag,{kind:i?.kind??null,description:i?.description}),null===l?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",l.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(w.CapacityBar,{spots:s,caps:l?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,j.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:o?.reportedAt,title:(0,j.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",C(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):l.harnesses.map(e=>(0,t.jsx)(T,{harness:e,now:r},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(A,{workspaces:l.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,z,"MachineLiveness",0,k,"WorkspaceOffer",0,A,"lastAnswer",0,C],94313);let $=`${l.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:l,ships:m,error:u,onRetry:x,onJoin:p,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.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,t.jsx)(o.Button,{nativeButton:!1,render:({children:e,...s})=>(0,t.jsx)("a",{href:$,target:"_blank",rel:"noreferrer",...s,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(i.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==u?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:u,onRetry:x}):void 0===l||"unknown"===e?(0,t.jsx)(h.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===l.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.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,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:l.map(e=>(0,t.jsx)(z,{machine:e,spots:(0,r.spotsOf)(e,m),location:m.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},274,e=>{"use strict";var t=e.i(43476),s=e.i(77880),n=e.i(36779),i=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:r,header:l,children:o,sheet:d,live:c,nav:h,onCompose:m,onSearch:u,account:x,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...x}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(s.Header,{breadcrumb:e,parents:r,live:c,onCompose:m,onSearch:u}),p,(0,t.jsx)(a.TopBar,{title:e,live:c,back:r[r.length-1]??r[0]}),(0,t.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:[l,o]})]}),d,(0,t.jsx)(i.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeolus-fleet/console",
3
- "version": "0.20.1",
3
+ "version": "0.20.2",
4
4
  "description": "Aeolus operator web app (Next.js).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "postpack": "rm LICENSE"
40
40
  },
41
41
  "dependencies": {
42
- "@aeolus-fleet/common": "0.20.1",
42
+ "@aeolus-fleet/common": "0.20.2",
43
43
  "@base-ui/react": "^1.8.0",
44
44
  "@hookform/resolvers": "^5.9.1",
45
45
  "@tailwindcss/postcss": "^4.3.3",
@@ -59,7 +59,7 @@
59
59
  "tw-animate-css": "^1.4.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@aeolus-fleet/core": "0.20.1",
62
+ "@aeolus-fleet/core": "0.20.2",
63
63
  "@storybook/addon-vitest": "^10.6.1",
64
64
  "@storybook/nextjs-vite": "^10.6.1",
65
65
  "@types/react": "^19.3.0",
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69644,69846,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let n=(0,t.default)(s);e.s(["FolderOpen",0,n],69644);let i={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"}]]};i.node;let a=(0,t.default)(i);e.s(["GitBranch",0,a],69846)},59659,e=>{"use strict";var t=e.i(56420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let n=(0,t.default)(s);e.s(["Trash2",0,n],59659)},96773,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(44824),i=e.i(45608),a=e.i(95475),r=e.i(2767),l=e.i(15905),o=e.i(24010),d=e.i(94945),c=e.i(17981);function h({worktree:e,onOpenChange:s,isPending:n,error:i,onClear:a}){return(0,t.jsx)(o.AlertDialog,{open:void 0!==e,onOpenChange:e=>{n||s(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":"clear-worktree-dialog",className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Delete the kept ",(0,t.jsx)("span",{className:"font-mono",children:e?.repository})," worktree of ",e?.shipName,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:void 0===e?null:`${e.machineName} removes it on its next pass, with its uncommitted changes. They can't be recovered, and the request can't be withdrawn.`})]}),void 0===i?null:(0,t.jsx)(c.InlineError,{title:"Couldn’t delete the worktree",description:`Refused: ${i}. Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:n}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:n,"data-testid":"clear-worktree-confirm",onClick:a,children:"Delete worktree"})]})]})})}var m=e.i(22768),u=e.i(16984),x=e.i(56420);let p={name:"folder-x",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]};p.node;let g=(0,x.default)(p);var f=e.i(11568),j=e.i(49287),v=e.i(86875),b=e.i(59659),w=e.i(22016),N=e.i(54616),y=e.i(66027),k=e.i(12598),C=e.i(27702),S=e.i(54492),T=e.i(49635),I=e.i(61966),A=e.i(19321),z=e.i(54422),$=e.i(67874),B=e.i(99261),L=e.i(63481),D=e.i(78865),_=e.i(94313);function M({spot:e,now:s}){let n="running"===e.status?e.startedAt:null,i=(0,S.restartWords)(e);return null===n&&void 0===i?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"machine-spot-session",children:[null===n?null:(0,t.jsxs)(t.Fragment,{children:["since"," ",(0,t.jsx)("time",{dateTime:n,title:(0,T.fullDateTime)(new Date(n)),className:"tabular-nums",children:(0,T.sinceTime)(new Date(n),s)})]}),null!==n&&void 0!==i?" · ":null,i]})}function O({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1 bg-card px-3.5 py-3",children:[(0,t.jsx)("dt",{className:"text-meta text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"flex min-w-0 items-center gap-1.5 text-body text-foreground",children:s})]})}function q({title:e,count:s,note:n,children:i}){return(0,t.jsxs)("section",{"aria-label":e,className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("h2",{className:"flex items-baseline gap-2 text-section font-semibold",children:[e,void 0===s?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground tabular-nums",children:s}),void 0===n?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:n})]}),i]})}function R({icon:e,name:s,meta:n,action:i}){return(0,t.jsxs)("li",{className:"flex items-start gap-2 px-3.5 py-2.5 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[e,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:s}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:n})]}),i]})}function U({kept:e,shipName:s,isBeingCleared:n,onClear:i}){let a=n?(0,t.jsx)(W,{}):void 0===i?void 0:(0,t.jsx)(l.Button,{size:"xs",variant:"ghost",icon:(0,t.jsx)(b.Trash2,{"aria-hidden":!0}),"aria-label":`Delete the kept ${e.repository} worktree of ${s}`,"data-testid":"machine-worktree-delete",onClick:()=>{i({...e,shipName:s})},children:"Delete"});return(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${s}`,meta:"Kept after release, with uncommitted changes",action:a})}function W(){return(0,t.jsxs)("span",{"data-testid":"machine-worktree-clearing",className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-1.5 py-0.5 text-meta text-tone-waiting-fg [&_svg]:mt-0 [&_svg]:text-tone-waiting-fg",children:[(0,t.jsx)(f.LoaderCircle,{"aria-hidden":!0}),"Clearing"]})}function H({machine:e,state:s,spots:n,location:i,labels:a,now:r,shipNames:o,clearRequests:d=[],onClearKept:c}){if("loading"===s||"ready"===s&&void 0===e)return(0,t.jsxs)("div",{"aria-busy":!0,"data-testid":"machine-detail",className:"flex flex-col gap-4",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading the machine"}),(0,t.jsx)(A.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(A.Skeleton,{className:"h-16 w-full rounded-lg"}),(0,t.jsx)(A.Skeleton,{className:"h-40 w-full rounded-lg"})]});if("not-found"===s||void 0===e)return(0,t.jsx)("div",{"data-testid":"machine-detail",children:(0,t.jsx)($.EmptyState,{variant:"section",icon:(0,t.jsx)(m.CircleAlert,{}),title:"Machine not found",description:"The trierarch plugin lists no machine with this ship id. The link may be incomplete.",action:(0,t.jsx)(l.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)(w.default,{href:"/trierarchs"}),children:"Back to Trierarchs"})})});let{details:h,report:x}=e,p=null===x?null:new Date(x.reportedAt),f=e.isSilent&&null!==e.lastSeenAt,b=f&&null!==p?`As of ${(0,T.clockTime)(p)}`:void 0;return(0,t.jsxs)("div",{"data-testid":"machine-detail",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2.5",children:[(0,t.jsxs)("h1",{className:"inline-flex items-center gap-2 text-title font-semibold [&_svg]:size-(--size-icon-lg) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(v.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(_.MachineLiveness,{machine:e,now:r})]}),(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(j.Ship,{"aria-hidden":!0}),nativeButton:!1,render:(0,t.jsx)(w.default,{href:`/ships/${e.shipId}`}),"data-testid":"machine-ship-page",children:"Ship page"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-5 gap-px overflow-hidden rounded-lg border border-border bg-border max-lg:grid-cols-2",children:[(0,t.jsx)(O,{label:"Capacity",children:(0,t.jsx)(z.CapacityBar,{spots:n,caps:h?.caps,unknownText:null===p?"Unknown until it answers":`Unknown since ${(0,T.clockTime)(p)}`})}),(0,t.jsx)(O,{label:"Machine",children:(0,t.jsx)(L.LocationTag,{kind:i?.kind??null,description:i?.description,size:"md"})}),(0,t.jsx)(O,{label:"Version",children:null===h?(0,t.jsx)("span",{className:"text-muted-foreground",children:"Unknown"}):(0,t.jsxs)("span",{className:"font-mono text-id",children:["@aeolus-fleet/trierarch@",h.version]})}),(0,t.jsx)(O,{label:"Last answer",children:null===p?(0,t.jsx)("span",{className:"text-muted-foreground",children:"None yet"}):(0,t.jsx)("time",{dateTime:x?.reportedAt,title:(0,T.fullDateTime)(p),className:"tabular-nums",children:(0,_.lastAnswer)(p,r)})}),(0,t.jsxs)(O,{label:"Ship id",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:e.shipId}),(0,t.jsx)(I.CopyButton,{value:e.shipId,label:"Copy ship id"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5","data-testid":"machine-labels-row",children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Labels"}),void 0===a?(0,t.jsx)(A.Skeleton,{className:"h-5.5 w-40"}):(0,t.jsx)(B.ShipLabels,{chips:a}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Read-only here. Crew requests that ask for machine labels go only to machines carrying all of them."})]}),f&&null!==e.lastSeenAt?(0,t.jsxs)("p",{role:"alert","data-testid":"machine-silent",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(u.CircleX,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{className:"font-medium",children:[e.name," has not answered since ",(0,T.clockTime)(new Date(e.lastSeenAt)),"."]})," ","It is probably not running",i?.description?` on ${i.description}`:"",". Until it answers, nothing restarts its sessions; everything below is its last answer."]})]}):null,(0,t.jsx)(q,{title:"Running here",count:n.length,note:b,children:0===n.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No ship is assigned to this trierarch."}):(0,t.jsx)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-spots",children:n.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-3 px-3.5 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)(w.default,{href:`/ships/${e.shipId}`,className:"truncate text-body font-medium hover:underline",children:e.name}),void 0===e.workspace?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"machine-spot-workspace",children:[(0,t.jsx)("span",{className:"sr-only",children:"Workspace: "}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.workspace.name})," · ","worktree"===e.workspace.kind?"new worktree":"folder, as it is"]})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2.5",children:[(0,t.jsx)(M,{spot:e,now:r}),(0,t.jsx)(D.StatusBadge,{status:e.status})]})]},e.shipId))})}),(0,t.jsx)(q,{title:"Harnesses",count:h?.harnesses.length,note:b,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:h.harnesses.map(e=>(0,t.jsx)(_.HarnessOffer,{harness:e},e.harness))})}),(0,t.jsx)(q,{title:"Workspaces",count:null===h?void 0:h.workspaces.repositories.length+h.workspaces.folders.length,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:(0,t.jsx)(_.WorkspaceOffer,{workspaces:h.workspaces})})}),null===h||0===h.kept.length&&0===h.orphans.length?null:(0,t.jsxs)(q,{title:"Worktrees",children:[(0,t.jsxs)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-worktrees",children:[h.kept.map(s=>{var n;return(0,t.jsx)(U,{kept:s,shipName:o?.get(s.shipId)??s.shipId,isBeingCleared:(n={trierarchShipId:e.shipId,...s},d.some(e=>e.trierarchShipId===n.trierarchShipId&&e.shipId===n.shipId&&e.repository===n.repository)),onClear:c},`${s.shipId}/${s.repository}`)}),h.orphans.map(e=>(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${e.name}`,meta:"No crew request"},`${e.repository}/${e.name}`))]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"The trierarch never deletes these on its own."})]})]})}var E=e.i(42383),F=e.i(274),P=e.i(90262),V=e.i(88721),K=e.i(5387),G=e.i(80581),J=e.i(86413),Q=e.i(18423),X=e.i(14695),Z=e.i(28459),Y=e.i(96676),ee=e.i(3979),et=e.i(78485),es=e.i(53573),en=e.i(265);e.s(["default",0,function({params:e}){let l,o,d,{shipId:c}=(0,s.use)(e),m=(0,Y.useNow)(),u=(0,V.useAccountMenu)(m),x=(0,J.useOpenInboxCount)(),p=(0,Z.useNeedsAttention)(),g=(0,Z.useAttentionCount)(),f=(0,Q.useLiveFleet)(),j=(0,K.useFleetSnapshot)(),v=(0,K.useLabelContext)(),b=(0,en.useTrierarchPluginConnection)(),w=(0,en.useMachines)(),S=(0,P.useAccess)(),T=(0,ee.usePluginNav)(),[I,A]=(0,s.useState)(!1),[z,$]=(0,s.useState)(!1),[B,L]=(0,s.useState)(void 0),D=(l=(0,C.useTRPC)(),(0,y.useQuery)(l.fleet.clearRequests.queryOptions(void 0,{refetchInterval:1e4}))),_=(o=(0,C.useTRPC)(),d=(0,k.useQueryClient)(),(0,N.useMutation)(o.fleet.clearWorktree.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:o.fleet.clearRequests.queryKey()})})));(0,et.useSignInWhenSessionEnds)([p.error,f.error]);let M=w.data?.find(e=>e.shipId===c),O=j.data??[],q=void 0===M?[]:(0,X.spotsOf)(M,O),R=O.find(e=>e.id===c),U=new Map([...(0,es.useShips)(q.map(e=>e.shipId))].map(([e,t])=>[e,t.crewRequest?.settings]));return(0,t.jsxs)(F.DetailLayout,{title:M?.name??"Machine",parents:[{href:"/trierarchs",label:"Trierarchs"}],live:f.live,nav:{active:"trierarchs",inboxCount:x,attentionCount:g,...T},onCompose:S.canSend?()=>{A(!0)}:void 0,onSearch:()=>{$(!0)},account:u,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ConsoleNotices,{}),(0,t.jsx)(a.ConsoleGuide,{})]}),header:"connected"!==b||w.isError?(0,t.jsx)(E.MachineList,{connection:b,machines:w.data,ships:O,error:w.isError?w.error.message:void 0,onRetry:()=>{w.refetch()},now:m}):(0,t.jsx)(H,{machine:M,state:void 0===w.data?"loading":void 0===M?"not-found":"ready",spots:(0,X.withWorkspaces)(q,U),location:R?.location??null,...void 0===v||void 0===R?{}:{labels:(0,G.chipsOf)(R,v)},now:m,shipNames:new Map(O.map(e=>[e.id,e.name])),clearRequests:D.data??[],...S.canManage&&void 0!==M?{onClearKept:e=>{_.reset(),L({...e,trierarchShipId:M.shipId,machineName:M.name})}}:{}}),children:[(0,t.jsx)(h,{worktree:B,onOpenChange:e=>{e||L(void 0)},isPending:_.isPending,...null===_.error?{}:{error:_.error.message},onClear:()=>{void 0!==B&&_.mutate({trierarchShipId:B.trierarchShipId,shipId:B.shipId,repository:B.repository},{onSuccess:()=>{L(void 0)}})}}),(0,t.jsx)(n.ComposeMessage,{isOpen:I,onOpenChange:A}),(0,t.jsx)(i.ConsoleCommands,{isOpen:z,onOpenChange:$,onCompose:()=>{A(!0)}})]})}],96773)},54422,e=>{"use strict";var t=e.i(43476),s=e.i(90063),n=e.i(14695);let i={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"};e.s(["CapacityBar",0,function({spots:e,caps:a,unknownText:r="Unknown",testId:l}){let o=(0,n.capacityLine)(e,a);if(void 0===a||void 0===o)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":o,"data-testid":l,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,n)=>(0,t.jsx)("span",{title:`Spot ${String(n+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",i[e.status])},e.shipId)),Array.from({length:d},(s,n)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+n+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(n)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:o})]})}])},99261,56539,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let n={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};n.node;let i=(0,s.default)(n);e.s(["ChevronUp",0,i],56539);var a=e.i(71645),r=e.i(95960);e.s(["ShipLabels",0,function({chips:e}){let[s,n]=(0,a.useState)(!1);return 0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!s&&e.length>2?(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[e.slice(0,2).map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId)),(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{n(!0)},children:["+",e.length-2]})]}):(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(e){let t=[];for(let s of e){let e="none"===s.mark?null:s.ownerName,n=t.find(t=>t.owner===e);void 0===n?t.push({owner:e,chips:[s]}):n.chips.push(s)}return t})(e).map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===e.owner?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e.owner]}),e.chips.map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e.owner??"")),e.length>2?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{n(!1)},children:[(0,t.jsx)(i,{"aria-hidden":!0}),"Show fewer"]}):null]})}],99261)},42383,94313,e=>{"use strict";var t=e.i(43476),s=e.i(77071),n=e.i(86875),i=e.i(94831),a=e.i(22016),r=e.i(14695),l=e.i(31513),o=e.i(15905),d=e.i(67874),c=e.i(17981),h=e.i(88393),m=e.i(71567),u=e.i(52886),x=e.i(69644),p=e.i(69846),g=e.i(66787),f=e.i(66616),j=e.i(49635),v=e.i(66390),b=e.i(54422),w=e.i(63481);let N={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"},y={alive:"Alive",silent:"Not answering","not-started":"Not started"};function k({machine:e,now:s}){let i=(0,r.machineLiveness)(e),a=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":i,children:[(0,t.jsxs)(v.Badge,{variant:"outline",className:N[i],children:["alive"===i?(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(u.CircleDashed,{"aria-hidden":!0}),y[i]]}),null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,j.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===i?`since ${(0,j.clockTime)(a)}`:(0,j.lastSeen)(a,s).replace("Last seen","seen")]})]})}function C(e,t){let s=(0,j.relativeTime)(e,t);return"Just now"===s?"just now":s}function S({title:e,children:s,className:n}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${n??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function T({harness:e}){return(0,t.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,t.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,t.jsx)(m.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness)]}),(0,r.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(s=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[s,s===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},s))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(s=>e.riskyFlags?.includes(s)===!0?(0,t.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,t.jsx)(g.TriangleAlert,{"aria-hidden":!0}),s,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},s):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:s},s))})]})}function I({title:e,icon:s,names:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===n.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):n.map(e=>(0,t.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:[s,e]},e))]})}function A({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(I,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(p.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(I,{title:"Folders · used as they are",icon:(0,t.jsx)(x.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function z({machine:e,spots:s,location:i,now:r}){let{details:l,report:o}=e,d=null===o?null:new Date(o.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.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,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(a.default,{href:`/trierarchs/${e.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,t.jsx)(n.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(k,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(w.LocationTag,{kind:i?.kind??null,description:i?.description}),null===l?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",l.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(b.CapacityBar,{spots:s,caps:l?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,j.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:o?.reportedAt,title:(0,j.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",C(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):l.harnesses.map(e=>(0,t.jsx)(T,{harness:e},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(A,{workspaces:l.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,z,"MachineLiveness",0,k,"WorkspaceOffer",0,A,"lastAnswer",0,C],94313);let $=`${l.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:l,ships:m,error:u,onRetry:x,onJoin:p,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.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,t.jsx)(o.Button,{nativeButton:!1,render:({children:e,...s})=>(0,t.jsx)("a",{href:$,target:"_blank",rel:"noreferrer",...s,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(i.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==u?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:u,onRetry:x}):void 0===l||"unknown"===e?(0,t.jsx)(h.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===l.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.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,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:l.map(e=>(0,t.jsx)(z,{machine:e,spots:(0,r.spotsOf)(e,m),location:m.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},274,e=>{"use strict";var t=e.i(43476),s=e.i(77880),n=e.i(36779),i=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:r,header:l,children:o,sheet:d,live:c,nav:h,onCompose:m,onSearch:u,account:x,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...x}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(s.Header,{breadcrumb:e,parents:r,live:c,onCompose:m,onSearch:u}),p,(0,t.jsx)(a.TopBar,{title:e,live:c,back:r[r.length-1]??r[0]}),(0,t.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:[l,o]})]}),d,(0,t.jsx)(i.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])}]);