@aeolus-fleet/console 0.20.1 → 0.20.3

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 (89) 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/_0dogq79._.js +1 -1
  48. package/.next/server/chunks/ssr/_0s2b6hb._.js +1 -1
  49. package/.next/server/chunks/ssr/_0sko-kt._.js +1 -1
  50. package/.next/server/chunks/ssr/_0sv2xqb._.js +1 -1
  51. package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
  52. package/.next/server/chunks/ssr/_0xc3etp._.js +1 -1
  53. package/.next/server/chunks/ssr/_0xvm1ng._.js +1 -1
  54. package/.next/server/chunks/ssr/_0ziovn_._.js +1 -1
  55. package/.next/server/chunks/ssr/_11cgy8n._.js +1 -1
  56. package/.next/server/chunks/ssr/_1442xyx._.js +1 -1
  57. package/.next/server/chunks/ssr/_17u4fan._.js +1 -1
  58. package/.next/server/chunks/ssr/_181kpys._.js +1 -1
  59. package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
  60. package/.next/server/chunks/ssr/_1ejhqt9._.js +1 -1
  61. package/.next/server/chunks/ssr/_1kv8ma5._.js +1 -1
  62. package/.next/server/chunks/ssr/_1ommvbv._.js +1 -1
  63. package/.next/server/chunks/ssr/_1on9mjs._.js +1 -1
  64. package/.next/server/chunks/ssr/_1oofkty._.js +1 -1
  65. package/.next/server/chunks/ssr/_1r6ce_7._.js +1 -1
  66. package/.next/server/chunks/ssr/packages_console_0edevze._.js +1 -1
  67. package/.next/server/chunks/ssr/packages_console_0y7h5dm._.js +1 -1
  68. package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
  69. package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +1 -1
  70. package/.next/server/middleware-build-manifest.js +3 -3
  71. package/.next/server/pages/500.html +1 -1
  72. package/.next/server/server-reference-manifest.js +1 -1
  73. package/.next/server/server-reference-manifest.json +1 -1
  74. package/.next/static/chunks/{26dg2z_6kosr0.js → 0r8dost92fvd7.js} +1 -1
  75. package/.next/static/chunks/{3z61krti-vbu2.js → 108myfe5p_uik.js} +1 -1
  76. package/.next/static/chunks/{1bvfk_-_enrxp.js → 1dj9u_t1hus9k.js} +1 -1
  77. package/.next/static/chunks/{414186x82sxkk.js → 1jt80qxcc5_14.js} +1 -1
  78. package/.next/static/chunks/{28j4p-34f5axr.js → 1ntkufzth29k5.js} +1 -1
  79. package/.next/static/chunks/{3jsj5ozfio3me.js → 2c6e9e-s7rbf3.js} +1 -1
  80. package/.next/static/chunks/{1h0f7mfr5wxsj.js → 2ie6mvt-ssazt.js} +1 -1
  81. package/.next/static/chunks/{2wnrtdpkhbd_j.js → 2n90taswwrii-.js} +1 -1
  82. package/.next/static/chunks/{3splvoavlf-cc.js → 2yxtvf_jtfnbf.js} +5 -5
  83. package/.next/static/chunks/{2spn0c35v7c1b.js → 3plldogn92kay.js} +1 -1
  84. package/.next/static/chunks/3x1-acncumcu6.js +1 -0
  85. package/package.json +3 -3
  86. package/.next/static/chunks/1ct431l_sosvm.js +0 -1
  87. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → 2RcnmMJXP55xfywa0IWOJ}/_buildManifest.js +0 -0
  88. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → 2RcnmMJXP55xfywa0IWOJ}/_clientMiddlewareManifest.js +0 -0
  89. /package/.next/static/{tBoOmC5nKBL5eqDmRV5Vd → 2RcnmMJXP55xfywa0IWOJ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),n=e.i(52245),r=e.i(33332);let a=t.createContext(void 0);function s(){let e=t.useContext(a);if(void 0===e)throw Error((0,r.default)(13));return e}let i={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,r){let{className:s,render:l,style:u,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:i});return(0,o.jsx)(a.Provider,{value:h,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let m={...i,...f.transitionStatusMapping},g=t.forwardRef(function(e,r){let{className:a,render:i,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:g,srcSet:b,src:v,...y}=e,{setImageLoadingStatus:x}=s(),[k,j]=function(e,{referrerPolicy:n,crossOrigin:r,sizes:a,srcSet:s},i){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!i)return p.NOOP;if(!e&&!s)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),n&&(o.referrerPolicy=n),o.crossOrigin=r??null,a&&(o.sizes=a),s&&(o.srcset=s),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[i,e,s,a,r,n,l]),o}(v,e,!l),S="loaded"===k,{mounted:w,transitionStatus:N,setMounted:C}=(0,h.useTransitionStatus)(S),I=t.useRef(null),P=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=P.current;P.current=!1;let t=I.current;if(!t)return;if(!t.complete)return void j("loading");let n=t.naturalWidth>0?"loaded":"error";j(n),"loaded"===n&&e&&C(!0)},[l,v,b,g,y.crossOrigin,y.referrerPolicy,i,j,C]);let E=l?{"data-loading":"loading"===k?"":void 0,"data-error":"error"===k?"":void 0,"aria-hidden":"loaded"!==k||void 0,onLoad(){j("loaded")},onError(){j("error")}}:void 0,O=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==k&&O(k)},[k,O]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!S,open:S,ref:I,onComplete(){S||C(!1)}});let A=l||w,L={};void 0!==g&&(L.sizes=g),void 0!==b&&(L.srcSet=b),void 0!==v&&(L.src=v);let M=(0,n.useRenderElement)("img",e,{state:{imageLoadingStatus:k,transitionStatus:l&&"ending"===N?void 0:N},ref:[r,I],props:[E,y,L],stateAttributesMapping:m,enabled:A});return A?M:null});var b=e.i(39957);let v=t.forwardRef(function(e,r){let{className:a,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=s(),[f,h]=t.useState(0===l),p=(0,b.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>h(!0)):h(!0),p.clear),[p,l]),(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:i,enabled:"loaded"!==d&&(0===l||f)})});e.s(["Fallback",0,v,"Image",0,g,"Root",0,l],14751);var y=e.i(14751);e.s(["Avatar",0,y],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let n={[t.startingStyle]:""},r={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?n:"ending"===e?r:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),n=e.i(67865),r=e.i(74080),a=e.i(8445),s=e.i(94603),i=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,a.useAnimationFrame)();return(0,n.useStableCallback)((n,a=null)=>{c.cancel();let l=(0,s.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void r.flushSync(n);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,r.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{a?.aborted||n()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||d()},()=>{a?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=i.startingStyle;if(!l.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void a?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:r=!0,open:a,ref:s,batch:i=!1,onComplete:o}=e,u=(0,n.useStableCallback)(o),c=l(s,a,i);t.useEffect(()=>{if(!r)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[r,a,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),n=e.i(46376),r=e.i(8445);e.s(["useTransitionStatus",0,function(e,a=!1,s=!1,i=!1){let[o,l]=t.useState(e&&a?"idle":void 0),[u,c]=t.useState(e&&!i);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||s||l("ending"),e||u||"ending"!==o||l(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&s){let e=r.AnimationFrame.request(()=>{l("ending")});return()=>{r.AnimationFrame.cancel(e)}}},[e,u,o,s]),(0,n.useIsoLayoutEffect)(()=>{if(!e||a)return;let t=r.AnimationFrame.request(()=>{l(void 0)});return()=>{r.AnimationFrame.cancel(t)}},[a,e]),(0,n.useIsoLayoutEffect)(()=>{if(!e||!a)return;e&&u&&"idle"!==o&&l("starting");let t=r.AnimationFrame.request(()=>{l("idle")});return()=>{r.AnimationFrame.cancel(t)}},[a,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),n=e.i(26300);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class a{static create(){return new a}static request(e){return r.request(e)}static cancel(e){return r.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,a,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(a.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),n=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,n.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),n=e.i(26300);class r{static create(){return new r}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,r,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(r.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},92150,e=>{"use strict";var t=e.i(56420);let n={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"}]]};n.node;let r=(0,t.default)(n);e.s(["Boxes",0,r],92150)},49287,e=>{"use strict";var t=e.i(56420);let n={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};n.node;let r=(0,t.default)(n);e.s(["Ship",0,r],49287)},94831,e=>{"use strict";var t=e.i(56420);let n={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"}]]};n.node;let r=(0,t.default)(n);e.s(["Unplug",0,r],94831)},22016,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return b},useLinkStatus:function(){return y}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let s=e.r(90809),i=e.r(43476),o=s._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var n;let r,a,s,[b,y]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:k,as:j,children:S,prefetch:w=null,passHref:N,replace:C,shallow:I,scroll:P,onClick:E,onMouseEnter:O,onTouchStart:A,legacyBehavior:L=!1,onNavigate:M,transitionTypes:_,ref:R,unstable_dynamicOnHover:T,...z}=t;r=S,L&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let $=o.default.useContext(u.AppRouterContext),F=!1!==w,q=!1===w?"none":!0===w?"full":"auto",B="none"!==q?"auto"===q?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(n=j||k)?n:(0,l.formatUrl)(n);if(L){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(r)}let W=L?a&&"object"==typeof a&&a.ref:R,D,V=o.default.useCallback(e=>(null!==$&&(x.current=(0,p.mountLinkInstance)(e,U,$,B,F,y,D)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,$,B,y,D]),K={ref:(0,c.useMergedRef)(V,W),onClick(t){L||"function"!=typeof E||E(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,n,r,a,s,i,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){a&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(n,a?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,l,u)})}}(t,U,x,C,P,M,_,q)},onMouseEnter(e){L||"function"!=typeof O||O(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:L&&!N&&("a"!==a.type||"href"in a.props)||(K.href=(0,f.addBasePath)(U)),s=L?o.default.cloneElement(a,K):(0,i.jsx)("a",{...z,...K,children:r}),(0,i.jsx)(v.Provider,{value:b,children:s})}let v=(0,o.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(v);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return a}});let r=e.r(71645);function a(e,t){let n=(0,r.useRef)(null),a=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(n.current=s(e,r)),t&&(a.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18967,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&f(n))return r;if(!r)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return r}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class v extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),a=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,a.hasBasePath)(n.pathname)}catch(e){return!1}}},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});function s(e){let t={};for(let[n,r]of e.entries()){let e=t[n];void 0===e?t[n]=r:Array.isArray(e)?e.push(r):t[n]=[e,r]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,i(e));else t.set(n,i(r));return t}function l(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,r]of n.entries())e.append(t,r)}return e}},95057,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let s=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",a=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||i.test(r))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${u}${a}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},94859,26478,e=>{"use strict";var t=e.i(43476),n=e.i(52376),r=e.i(25913),a=e.i(49287),s=e.i(56420);let i={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};i.node;let o=(0,s.default)(i);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,r.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:r,name:s="",className:i}){let c=e??"ship";return(0,t.jsx)(n.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:r}),i),children:(0,t.jsx)(n.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(a.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):s.replaceAll("-","").slice(0,2)})})}],94859)},95960,e=>{"use strict";var t=e.i(43476),n=e.i(92150),r=e.i(49287),a=e.i(86875),s=e.i(63676),i=e.i(90063);let o={"trierarch-plugin":a.ShipWheel,squadrons:n.Boxes,ship:r.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:n,testId:r,className:a,trailing:l}){let u="none"===e.mark?null:o[e.mark],c=`${e.key}=${e.value}`,d="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":r,title:`${c}, by ${d}`,className:(0,i.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",a),children:[null===u?null:(0,t.jsx)(u,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),l,void 0===n?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:n,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,t.jsx)(s.X,{"aria-hidden":!0})})]})}])},10649,78608,87851,4032,e=>{"use strict";e.i(31627);var t=e.i(9677),n=e.i(83615),r=e.i(14695);function a(e,t){for(let n of t)e.includes(n)||e.push(n)}function s(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function i(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[n]=e?.folders??[];return void 0===n?void 0:{kind:"folder",name:n}}function o(e){let[t]=e;return{harness:t?.harness??"",workspace:i(t),options:s(t),firstPrompt:"",squadron:"",machineLabels:[]}}let l=new TextEncoder;function u(e){return l.encode(e).byteLength}function c(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,c,"defaultValues",0,o,"offersOf",0,function(e){let t=[];for(let n of e)if(!n.isSilent&&null!==n.details)for(let e of n.details.harnesses){let s=t.find(t=>t.harness===e.harness);for(let i of(void 0===s&&(s={harness:e.harness,repositories:[],folders:[],options:[]},t.push(s)),a(s.repositories,n.details.workspaces.repositories),a(s.folders,n.details.workspaces.folders),(0,r.harnessOptions)(e.options))){let e=s.options.find(e=>e.name===i.name);void 0===e?s.options.push({...i,values:[...i.values]}):(a(e.values,i.values),e.defaultValue??=i.defaultValue)}}return t},"promptBytes",0,u,"settingsOf",0,function(e){if(""!==e.harness&&void 0!==e.workspace)return{harness:e.harness,workspace:e.workspace,options:e.options,...""===e.firstPrompt?{}:{firstPrompt:e.firstPrompt},...""===e.squadron?{}:{squadron:e.squadron},...0===e.machineLabels.length?{}:{machineLabels:e.machineLabels.flatMap(e=>{let t=(0,n.idSchema)("labelValue").safeParse(e);return t.success?[t.data]:[]})}}},"settingsRows",0,function(e){let n=t.crewSettingsSchema.safeParse(e);if(!n.success)return;let{harness:r,workspace:a,options:s,firstPrompt:i,squadron:o}=n.data;return[{label:"Harness",value:r??"Trierarch default"},"worktree"===a.kind?{label:"Workspace",value:a.repository,meta:"New worktree"}:{label:"Workspace",value:a.name,meta:"Folder, as it is"},...Object.entries(s).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===i?null:c(u(i))},{label:"Squadron",value:o??null,isMono:!0}]},"valuesOf",0,function(e,n){let r=t.crewSettingsSchema.safeParse(e);if(!r.success)return o(n);let{harness:a,workspace:s,options:i,firstPrompt:l,squadron:u,machineLabels:c}=r.data;return{harness:a??o(n).harness,workspace:"worktree"===s.kind?{kind:"worktree",repository:s.repository}:{kind:"folder",name:s.name},options:Object.fromEntries(Object.entries(i).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:l??"",squadron:u??"",machineLabels:[...c??[]]}},"withHarness",0,function(e,t){let{harness:n,offers:r}=t,a=r.find(e=>e.harness===n),o=e.workspace,l=void 0!==o&&("worktree"===o.kind?a?.repositories.includes(o.repository)??!1:a?.folders.includes(o.name)??!1);return{...e,harness:n,workspace:l?o:i(a),options:s(a)}}],10649);var d=e.i(80581);function f(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}function h(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}e.s(["machineLabelIdsOf",0,function(e){let n=t.crewSettingsSchema.safeParse(e);return n.success?[...n.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(e,t){return{groups:function(e,t){let n=t.map(t=>f(e,t)),r=[],a=[];for(let t of e.labels){let s=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:n.filter(t=>t.includes(e.id)).length})),i={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:s};(s.some(e=>e.shipCount>0)?r:a).push(i)}let s=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:r.toSorted(s)},{title:"On no machine yet",keys:a.toSorted(s)}].filter(e=>e.keys.length>0)}(e,t),chipsOf:t=>(0,d.pickedChips)(t,e),matchOf:n=>{var r;return{matching:(r={machines:t,valueIds:n}).machines.filter(t=>{let n=f(e,t);return r.valueIds.every(e=>n.includes(e))}).map(e=>e.name),total:r.machines.length}}}},"machineLabelsText",0,function(e){let t=e.map(e=>`${e.key}=${e.value}`);return t.length<=2?t.join(" and "):`${t.slice(0,-1).join(", ")} and ${t.at(-1)??""}`},"noMatchWords",0,h],78608);var p=e.i(43476),m=e.i(93669),g=e.i(22768),b=e.i(74544),v=e.i(77071),y=e.i(63676),x=e.i(22016),k=e.i(71645),j=e.i(15905),S=e.i(6734),w=e.i(95960),N=e.i(92150),C=e.i(24071),I=e.i(67927),P=e.i(66595),E=e.i(49287),O=e.i(86875),A=e.i(90063),L=e.i(12470);let M={"trierarch-plugin":O.ShipWheel,squadrons:N.Boxes,ship:E.Ship};function _(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function R({groups:e,pickedValueIds:t,onPick:n,size:r="sm",pickedWord:a="Picked",countWord:s="ship"}){let[i,o]=(0,k.useState)(""),[l,u]=(0,k.useState)(void 0),c="touch"===r,d=(0,A.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",c?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==l)return(0,p.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,p.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:()=>{u(void 0)},"aria-label":`Back to the keys, from ${l.key}`,children:[(0,p.jsx)(C.ChevronLeft,{"aria-hidden":!0}),l.key,"="]}),(0,p.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===s?"Ships":"Machines"," with each"]})]}),(0,p.jsx)("ul",{className:"flex flex-col",children:l.values.map(e=>{let r=t.includes(e.valueId);return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:d,disabled:r,"data-testid":"label-picker-value",onClick:()=>{n(e.valueId),u(void 0),o("")},children:[(0,p.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:e.value}),(0,p.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:r?a:_(e.shipCount,s)})]})},e.valueId)})})]});let f=i.trim().toLowerCase(),h=e.map(e=>({...e,keys:e.keys.filter(e=>""===f||e.key.includes(f))})).filter(e=>e.keys.length>0);return(0,p.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,p.jsx)(L.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:c?"touch":"md",leadingIcon:(0,p.jsx)(P.Search,{}),value:i,onChange:e=>{o(e.target.value)}}),0===h.length?(0,p.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===e.length?"The fleet has no labels yet.":`No key matches “${i.trim()}”.`}):h.map(e=>(0,p.jsxs)("div",{className:"flex flex-col",children:[(0,p.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:e.title}),(0,p.jsx)("ul",{className:"flex flex-col",children:e.keys.map(e=>{let t="none"===e.mark?null:M[e.mark];return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:(0,A.classNames)(d,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{u(e)},children:[null===t?null:(0,p.jsx)(t,{"aria-hidden":!0}),(0,p.jsx)("span",{className:"font-mono",children:e.key}),(0,p.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:_(e.values.length,"value")}),(0,p.jsx)(I.ChevronRight,{"aria-hidden":!0})]})},e.labelId)})})]},e.title))]})}function T({groups:e,picked:t,isDisabled:n,onAdd:r}){let[a,s]=(0,k.useState)(!1);return(0,p.jsxs)(S.Popover,{open:a,onOpenChange:s,children:[(0,p.jsx)(S.PopoverTrigger,{render:(0,p.jsx)(j.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,p.jsx)(v.Plus,{}),disabled:n,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,p.jsxs)(S.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,p.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,p.jsx)(R,{groups:e,pickedValueIds:t.map(e=>e.valueId),countWord:"machine",onPick:e=>{s(!1),r(e)}}),(0,p.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,p.jsx)(x.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["LabelPicker",0,R],87851),e.s(["MachineLabelsField",0,function({shipName:e,picked:t,groups:n,match:r,isDisabled:a,onAdd:s,onRemove:i,unknown:o=[],onRemoveUnknown:l}){let u=h(t.length);return(0,p.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,p.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,p.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,p.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===t.length?(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,t.map((e,t)=>(0,p.jsxs)(k.Fragment,{children:[0===t?null:(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,p.jsx)(w.LabelChip,{chip:e,testId:"machine-label",...a?{}:{onRemove:()=>{i(e.valueId)}}})]},e.valueId)),o.map(e=>(0,p.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: 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,p.jsx)(g.CircleAlert,{"aria-hidden":!0}),e,void 0===l||a?null:(0,p.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{l(e)},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,p.jsx)(y.X,{"aria-hidden":!0})})]},e)),t.length+o.length>=m.SHIP_LABELS_MAX?null:(0,p.jsx)(T,{groups:n,picked:t,isDisabled:a,onAdd:s})]}),0===o.length?null:(0,p.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",o.join(", "),". Forming refuses ",1===o.length?"it":"them",": define ",1===o.length?"it":"them"," on the Labels page, or remove ",1===o.length?"it":"them"," here."]}),0===t.length?null:0===r.matching.length?(0,p.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,p.jsx)(b.Clock,{"aria-hidden":!0}),(0,p.jsxs)("span",{children:["No machine matches ",u.these,". You can still request: it waits on Needs crew until a machine ",u.carries,"."]})]}):(0,p.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",r.matching.length," of ",r.total," ",1===r.total?"machine":"machines",": ",r.matching.join(", "),"."]}),(0,p.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}],4032)},66616,e=>{"use strict";let t={"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 n(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":n(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,n])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),n=e.i(52245),r=e.i(33332);let i=t.createContext(void 0);function s(){let e=t.useContext(i);if(void 0===e)throw Error((0,r.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,r){let{className:s,render:l,style:u,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:a});return(0,o.jsx)(i.Provider,{value:h,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let m={...a,...f.transitionStatusMapping},g=t.forwardRef(function(e,r){let{className:i,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:g,srcSet:b,src:v,...y}=e,{setImageLoadingStatus:x}=s(),[k,j]=function(e,{referrerPolicy:n,crossOrigin:r,sizes:i,srcSet:s},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return p.NOOP;if(!e&&!s)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),n&&(o.referrerPolicy=n),o.crossOrigin=r??null,i&&(o.sizes=i),s&&(o.srcset=s),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,s,i,r,n,l]),o}(v,e,!l),w="loaded"===k,{mounted:S,transitionStatus:C,setMounted:N}=(0,h.useTransitionStatus)(w),I=t.useRef(null),P=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=P.current;P.current=!1;let t=I.current;if(!t)return;if(!t.complete)return void j("loading");let n=t.naturalWidth>0?"loaded":"error";j(n),"loaded"===n&&e&&N(!0)},[l,v,b,g,y.crossOrigin,y.referrerPolicy,a,j,N]);let E=l?{"data-loading":"loading"===k?"":void 0,"data-error":"error"===k?"":void 0,"aria-hidden":"loaded"!==k||void 0,onLoad(){j("loaded")},onError(){j("error")}}:void 0,O=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==k&&O(k)},[k,O]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!w,open:w,ref:I,onComplete(){w||N(!1)}});let A=l||S,L={};void 0!==g&&(L.sizes=g),void 0!==b&&(L.srcSet=b),void 0!==v&&(L.src=v);let M=(0,n.useRenderElement)("img",e,{state:{imageLoadingStatus:k,transitionStatus:l&&"ending"===C?void 0:C},ref:[r,I],props:[E,y,L],stateAttributesMapping:m,enabled:A});return A?M:null});var b=e.i(39957);let v=t.forwardRef(function(e,r){let{className:i,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=s(),[f,h]=t.useState(0===l),p=(0,b.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>h(!0)):h(!0),p.clear),[p,l]),(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:a,enabled:"loaded"!==d&&(0===l||f)})});e.s(["Fallback",0,v,"Image",0,g,"Root",0,l],14751);var y=e.i(14751);e.s(["Avatar",0,y],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let n={[t.startingStyle]:""},r={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?n:"ending"===e?r:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),n=e.i(67865),r=e.i(74080),i=e.i(8445),s=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,i.useAnimationFrame)();return(0,n.useStableCallback)((n,i=null)=>{c.cancel();let l=(0,s.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void r.flushSync(n);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,r.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{i?.aborted||n()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||d()},()=>{i?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:r=!0,open:i,ref:s,batch:a=!1,onComplete:o}=e,u=(0,n.useStableCallback)(o),c=l(s,i,a);t.useEffect(()=>{if(!r)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[r,i,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),n=e.i(46376),r=e.i(8445);e.s(["useTransitionStatus",0,function(e,i=!1,s=!1,a=!1){let[o,l]=t.useState(e&&i?"idle":void 0),[u,c]=t.useState(e&&!a);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||s||l("ending"),e||u||"ending"!==o||l(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&s){let e=r.AnimationFrame.request(()=>{l("ending")});return()=>{r.AnimationFrame.cancel(e)}}},[e,u,o,s]),(0,n.useIsoLayoutEffect)(()=>{if(!e||i)return;let t=r.AnimationFrame.request(()=>{l(void 0)});return()=>{r.AnimationFrame.cancel(t)}},[i,e]),(0,n.useIsoLayoutEffect)(()=>{if(!e||!i)return;e&&u&&"idle"!==o&&l("starting");let t=r.AnimationFrame.request(()=>{l("idle")});return()=>{r.AnimationFrame.cancel(t)}},[i,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),n=e.i(26300);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(e){return r.request(e)}static cancel(e){return r.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(i.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),n=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,n.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),n=e.i(26300);class r{static create(){return new r}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,r,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(r.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},92150,e=>{"use strict";var t=e.i(56420);let n={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"}]]};n.node;let r=(0,t.default)(n);e.s(["Boxes",0,r],92150)},49287,e=>{"use strict";var t=e.i(56420);let n={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};n.node;let r=(0,t.default)(n);e.s(["Ship",0,r],49287)},94831,e=>{"use strict";var t=e.i(56420);let n={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"}]]};n.node;let r=(0,t.default)(n);e.s(["Unplug",0,r],94831)},22016,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return b},useLinkStatus:function(){return y}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809),a=e.r(43476),o=s._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var n;let r,i,s,[b,y]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:k,as:j,children:w,prefetch:S=null,passHref:C,replace:N,shallow:I,scroll:P,onClick:E,onMouseEnter:O,onTouchStart:A,legacyBehavior:L=!1,onNavigate:M,transitionTypes:_,ref:R,unstable_dynamicOnHover:T,...z}=t;r=w,L&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let $=o.default.useContext(u.AppRouterContext),F=!1!==S,q=!1===S?"none":!0===S?"full":"auto",B="none"!==q?"auto"===q?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(n=j||k)?n:(0,l.formatUrl)(n);if(L){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(r)}let D=L?i&&"object"==typeof i&&i.ref:R,W,V=o.default.useCallback(e=>(null!==$&&(x.current=(0,p.mountLinkInstance)(e,U,$,B,F,y,W)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,$,B,y,W]),K={ref:(0,c.useMergedRef)(V,D),onClick(t){L||"function"!=typeof E||E(t),L&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!$||t.defaultPrevented||function(t,n,r,i,s,a,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(n,i?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,l,u)})}}(t,U,x,N,P,M,_,q)},onMouseEnter(e){L||"function"!=typeof O||O(e),L&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:L&&!C&&("a"!==i.type||"href"in i.props)||(K.href=(0,f.addBasePath)(U)),s=L?o.default.cloneElement(i,K):(0,a.jsx)("a",{...z,...K,children:r}),(0,a.jsx)(v.Provider,{value:b,children:s})}let v=(0,o.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(v);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=s(e,r)),t&&(i.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18967,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&f(n))return r;if(!r)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return r}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class v extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),i=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});function s(e){let t={};for(let[n,r]of e.entries()){let e=t[n];void 0===e?t[n]=r:Array.isArray(e)?e.push(r):t[n]=[e,r]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,a(e));else t.set(n,a(r));return t}function l(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,r]of n.entries())e.append(t,r)}return e}},95057,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${u}${i}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},94859,26478,e=>{"use strict";var t=e.i(43476),n=e.i(52376),r=e.i(25913),i=e.i(49287),s=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,s.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,r.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:r,name:s="",className:a}){let c=e??"ship";return(0,t.jsx)(n.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:r}),a),children:(0,t.jsx)(n.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(i.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):s.replaceAll("-","").slice(0,2)})})}],94859)},95960,e=>{"use strict";var t=e.i(43476),n=e.i(92150),r=e.i(49287),i=e.i(86875),s=e.i(63676),a=e.i(90063);let o={"trierarch-plugin":i.ShipWheel,squadrons:n.Boxes,ship:r.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:n,testId:r,className:i,trailing:l}){let u="none"===e.mark?null:o[e.mark],c=`${e.key}=${e.value}`,d="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":r,title:`${c}, by ${d}`,className:(0,a.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",i),children:[null===u?null:(0,t.jsx)(u,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),l,void 0===n?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:n,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,t.jsx)(s.X,{"aria-hidden":!0})})]})}])},10649,78608,87851,4032,e=>{"use strict";e.i(31627);var t=e.i(9677),n=e.i(83615),r=e.i(14695);function i(e,t){for(let n of t)e.includes(n)||e.push(n)}function s(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function a(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[n]=e?.folders??[];return void 0===n?void 0:{kind:"folder",name:n}}function o(e){let[t]=e;return{harness:t?.harness??"",workspace:a(t),options:s(t),firstPrompt:"",squadron:"",machineLabels:[]}}let l=new TextEncoder;function u(e){return l.encode(e).byteLength}function c(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,c,"defaultValues",0,o,"offersOf",0,function(e){let t=[];for(let n of e)if(!n.isSilent&&null!==n.details)for(let e of n.details.harnesses){let s=t.find(t=>t.harness===e.harness);for(let a of(void 0===s&&(s={harness:e.harness,repositories:[],folders:[],options:[]},t.push(s)),i(s.repositories,n.details.workspaces.repositories),i(s.folders,n.details.workspaces.folders),(0,r.harnessOptions)(e.options))){let e=s.options.find(e=>e.name===a.name);void 0===e?s.options.push({...a,values:[...a.values]}):(i(e.values,a.values),e.defaultValue??=a.defaultValue)}}return t},"promptBytes",0,u,"settingsOf",0,function(e){if(""!==e.harness&&void 0!==e.workspace)return{harness:e.harness,workspace:e.workspace,options:e.options,...""===e.firstPrompt?{}:{firstPrompt:e.firstPrompt},...""===e.squadron?{}:{squadron:e.squadron},...0===e.machineLabels.length?{}:{machineLabels:e.machineLabels.flatMap(e=>{let t=(0,n.idSchema)("labelValue").safeParse(e);return t.success?[t.data]:[]})}}},"settingsRows",0,function(e){let n=t.crewSettingsSchema.safeParse(e);if(!n.success)return;let{harness:r,workspace:i,options:s,firstPrompt:a,squadron:o}=n.data;return[{label:"Harness",value:r??"Trierarch default"},"worktree"===i.kind?{label:"Workspace",value:i.repository,meta:"New worktree"}:{label:"Workspace",value:i.name,meta:"Folder, as it is"},...Object.entries(s).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===a?null:c(u(a))},{label:"Squadron",value:o??null,isMono:!0}]},"valuesOf",0,function(e,n){let r=t.crewSettingsSchema.safeParse(e);if(!r.success)return o(n);let{harness:i,workspace:s,options:a,firstPrompt:l,squadron:u,machineLabels:c}=r.data;return{harness:i??o(n).harness,workspace:"worktree"===s.kind?{kind:"worktree",repository:s.repository}:{kind:"folder",name:s.name},options:Object.fromEntries(Object.entries(a).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:l??"",squadron:u??"",machineLabels:[...c??[]]}},"withHarness",0,function(e,t){let{harness:n,offers:r}=t,i=r.find(e=>e.harness===n),o=e.workspace,l=void 0!==o&&("worktree"===o.kind?i?.repositories.includes(o.repository)??!1:i?.folders.includes(o.name)??!1);return{...e,harness:n,workspace:l?o:a(i),options:s(i)}}],10649);var d=e.i(80581);function f(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}function h(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}e.s(["machineLabelIdsOf",0,function(e){let n=t.crewSettingsSchema.safeParse(e);return n.success?[...n.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(e,t){return{groups:function(e,t){let n=t.map(t=>f(e,t)),r=[],i=[];for(let t of e.labels){let s=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:n.filter(t=>t.includes(e.id)).length})),a={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:s};(s.some(e=>e.shipCount>0)?r:i).push(a)}let s=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:r.toSorted(s)},{title:"On no machine yet",keys:i.toSorted(s)}].filter(e=>e.keys.length>0)}(e,t),chipsOf:t=>(0,d.pickedChips)(t,e),matchOf:n=>{var r;return{matching:(r={machines:t,valueIds:n}).machines.filter(t=>{let n=f(e,t);return r.valueIds.every(e=>n.includes(e))}).map(e=>e.name),total:r.machines.length}}}},"machineLabelsText",0,function(e){let t=e.map(e=>`${e.key}=${e.value}`);return t.length<=2?t.join(" and "):`${t.slice(0,-1).join(", ")} and ${t.at(-1)??""}`},"noMatchWords",0,h],78608);var p=e.i(43476),m=e.i(93669),g=e.i(22768),b=e.i(74544),v=e.i(77071),y=e.i(63676),x=e.i(22016),k=e.i(71645),j=e.i(15905),w=e.i(6734),S=e.i(95960),C=e.i(92150),N=e.i(24071),I=e.i(67927),P=e.i(66595),E=e.i(49287),O=e.i(86875),A=e.i(90063),L=e.i(12470);let M={"trierarch-plugin":O.ShipWheel,squadrons:C.Boxes,ship:E.Ship};function _(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function R({groups:e,pickedValueIds:t,onPick:n,size:r="sm",pickedWord:i="Picked",countWord:s="ship"}){let[a,o]=(0,k.useState)(""),[l,u]=(0,k.useState)(void 0),c="touch"===r,d=(0,A.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",c?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==l)return(0,p.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,p.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:()=>{u(void 0)},"aria-label":`Back to the keys, from ${l.key}`,children:[(0,p.jsx)(N.ChevronLeft,{"aria-hidden":!0}),l.key,"="]}),(0,p.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===s?"Ships":"Machines"," with each"]})]}),(0,p.jsx)("ul",{className:"flex flex-col",children:l.values.map(e=>{let r=t.includes(e.valueId);return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:d,disabled:r,"data-testid":"label-picker-value",onClick:()=>{n(e.valueId),u(void 0),o("")},children:[(0,p.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:e.value}),(0,p.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:r?i:_(e.shipCount,s)})]})},e.valueId)})})]});let f=a.trim().toLowerCase(),h=e.map(e=>({...e,keys:e.keys.filter(e=>""===f||e.key.includes(f))})).filter(e=>e.keys.length>0);return(0,p.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,p.jsx)(L.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:c?"touch":"md",leadingIcon:(0,p.jsx)(P.Search,{}),value:a,onChange:e=>{o(e.target.value)}}),0===h.length?(0,p.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===e.length?"The fleet has no labels yet.":`No key matches “${a.trim()}”.`}):h.map(e=>(0,p.jsxs)("div",{className:"flex flex-col",children:[(0,p.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:e.title}),(0,p.jsx)("ul",{className:"flex flex-col",children:e.keys.map(e=>{let t="none"===e.mark?null:M[e.mark];return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:(0,A.classNames)(d,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{u(e)},children:[null===t?null:(0,p.jsx)(t,{"aria-hidden":!0}),(0,p.jsx)("span",{className:"font-mono",children:e.key}),(0,p.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:_(e.values.length,"value")}),(0,p.jsx)(I.ChevronRight,{"aria-hidden":!0})]})},e.labelId)})})]},e.title))]})}function T({groups:e,picked:t,isDisabled:n,onAdd:r}){let[i,s]=(0,k.useState)(!1);return(0,p.jsxs)(w.Popover,{open:i,onOpenChange:s,children:[(0,p.jsx)(w.PopoverTrigger,{render:(0,p.jsx)(j.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,p.jsx)(v.Plus,{}),disabled:n,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,p.jsxs)(w.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,p.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,p.jsx)(R,{groups:e,pickedValueIds:t.map(e=>e.valueId),countWord:"machine",onPick:e=>{s(!1),r(e)}}),(0,p.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,p.jsx)(x.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["LabelPicker",0,R],87851),e.s(["MachineLabelsField",0,function({shipName:e,picked:t,groups:n,match:r,isDisabled:i,onAdd:s,onRemove:a,unknown:o=[],onRemoveUnknown:l}){let u=h(t.length);return(0,p.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,p.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,p.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,p.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===t.length?(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,t.map((e,t)=>(0,p.jsxs)(k.Fragment,{children:[0===t?null:(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,p.jsx)(S.LabelChip,{chip:e,testId:"machine-label",...i?{}:{onRemove:()=>{a(e.valueId)}}})]},e.valueId)),o.map(e=>(0,p.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: 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,p.jsx)(g.CircleAlert,{"aria-hidden":!0}),e,void 0===l||i?null:(0,p.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{l(e)},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,p.jsx)(y.X,{"aria-hidden":!0})})]},e)),t.length+o.length>=m.SHIP_LABELS_MAX?null:(0,p.jsx)(T,{groups:n,picked:t,isDisabled:i,onAdd:s})]}),0===o.length?null:(0,p.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",o.join(", "),". Forming refuses ",1===o.length?"it":"them",": define ",1===o.length?"it":"them"," on the Labels page, or remove ",1===o.length?"it":"them"," here."]}),0===t.length?null:0===r.matching.length?(0,p.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,p.jsx)(b.Clock,{"aria-hidden":!0}),(0,p.jsxs)("span",{children:["No machine matches ",u.these,". You can still request: it waits on Needs crew until a machine ",u.carries,"."]})]}):(0,p.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",r.matching.length," of ",r.total," ",1===r.total?"machine":"machines",": ",r.matching.join(", "),"."]}),(0,p.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}],4032)},66616,e=>{"use strict";var t=e.i(49635);let n={"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 r(e){return n[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessDetection",0,function(e,n){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let r=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),n);return`${e.version} \xb7 models confirmed ${"Just now"===r?"just now":r}`},"harnessKind",0,function(e){return n[e]?.kind},"harnessWord",0,r])}]);
@@ -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.3",
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.3",
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.3",
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})]})}])}]);