@usine/server 0.4.1-next.291.g2bf4be2 → 0.4.1-next.293.gde8dcb8

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 (45) hide show
  1. package/README.md +2 -0
  2. package/dist/http.d.ts.map +1 -1
  3. package/dist/http.js +2 -0
  4. package/dist/http.js.map +1 -1
  5. package/dist/up.js +1 -1
  6. package/dist/up.js.map +1 -1
  7. package/dist/web/assets/{_agent-Bhd0HrYb.js → _agent-BFryjNNb.js} +1 -1
  8. package/dist/web/assets/_label-CtKiaGWz.js +1 -0
  9. package/dist/web/assets/{_loop-CtUiE6FL.js → _loop-DONFu16v.js} +1 -1
  10. package/dist/web/assets/{_name-CXbew0J1.js → _name-C42q_xws.js} +1 -1
  11. package/dist/web/assets/{_name-CZL0wkxq.js → _name-Dfqc_Qea.js} +1 -1
  12. package/dist/web/assets/{_number-By4h1S_S.js → _number-DOYIujsh.js} +1 -1
  13. package/dist/web/assets/{_number-Dr2R11XM.js → _number-Dyt5PXPW.js} +1 -1
  14. package/dist/web/assets/_project-DpvIZdrA.js +1 -0
  15. package/dist/web/assets/{_run-BEVm7k9V.js → _run-B4DFmBFm.js} +1 -1
  16. package/dist/web/assets/{_worker-D_1Qa8KI.js → _worker-BtNHlRPT.js} +1 -1
  17. package/dist/web/assets/{agents-DmMTEEce.js → agents-BEHsLITF.js} +1 -1
  18. package/dist/web/assets/{agents-B88JG2q0.js → agents-DHMF3XEr.js} +1 -1
  19. package/dist/web/assets/{drawer-yjp9B9Ed.js → drawer-HmQLxogt.js} +1 -1
  20. package/dist/web/assets/{history-Z63_hw3L.js → history-BgN7BMZM.js} +1 -1
  21. package/dist/web/assets/{index-BPhLK23-.js → index-DSOKl9hZ.js} +2 -2
  22. package/dist/web/assets/{label-badge-N-5KY9g6.js → label-badge-DlfFeHM2.js} +1 -1
  23. package/dist/web/assets/{labels-DwcmI5hF.js → labels--U1i9KoY.js} +1 -1
  24. package/dist/web/assets/{list-DeCG0M1M.js → list-7qDdKUWr.js} +1 -1
  25. package/dist/web/assets/{loops-CO67AN6J.js → loops-KEH8Xuo_.js} +1 -1
  26. package/dist/web/assets/{members-D6eY25k6.js → members-CBC3IWWZ.js} +1 -1
  27. package/dist/web/assets/{outcome-5sHQcdFl.js → outcome-OMgE9R0d.js} +1 -1
  28. package/dist/web/assets/{repositories-DOa9jauq.js → repositories-BAf0wI3v.js} +1 -1
  29. package/dist/web/assets/route-DkMTJBWm.js +1 -0
  30. package/dist/web/assets/route-Do86j4UK.js +1 -0
  31. package/dist/web/assets/routes-BU0GYe5f.js +65 -0
  32. package/dist/web/assets/{section-D0pZ24Q9.js → section-B9rSL8Bj.js} +1 -1
  33. package/dist/web/assets/{settings-S8Duih5O.js → settings-DQhtSVA1.js} +1 -1
  34. package/dist/web/assets/{sign-in-DjL5kSOj.js → sign-in-DUJybrEP.js} +1 -1
  35. package/dist/web/assets/{tasks-BVCobs32.js → tasks-BuEAwx2n.js} +1 -1
  36. package/dist/web/assets/{tokens-C6JfL-2h.js → tokens-B-7iRBKh.js} +1 -1
  37. package/dist/web/assets/{usage-DL_2QgAQ.js → usage-DG8mHuwO.js} +1 -1
  38. package/dist/web/assets/{workers-COw6mVNF.js → workers-BZ6ZrOma.js} +1 -1
  39. package/dist/web/index.html +1 -1
  40. package/package.json +11 -11
  41. package/dist/web/assets/_label-DAUm1_LF.js +0 -1
  42. package/dist/web/assets/_project-DNs8Oq14.js +0 -1
  43. package/dist/web/assets/route-Dw2CrkLW.js +0 -1
  44. package/dist/web/assets/route-ytl33NeP.js +0 -1
  45. package/dist/web/assets/routes-B5Lyezif.js +0 -65
@@ -1,4 +1,4 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{D as r,a as i,o as a,r as o,t as s}from"./useBaseQuery-Bq9mMy4d.js";import{a as c,f as l,g as u,i as d,o as f,s as p}from"./mark-TjVTH0zt.js";import{a as m,c as h,f as g,i as ee,n as _,o as te,p as ne,r as v,s as re,t as ie,u as ae}from"./queries-CR2-1r-p.js";import{n as oe}from"./useNavigate-I5E4IRt2.js";import{t as se}from"./link-04lHwIZK.js";import{A as ce,At as le,Bt as ue,C as de,Dn as y,E as fe,Et as b,F as x,Fn as pe,Ht as S,I as C,L as w,Lt as T,M as E,Mn as D,Mt as O,N as k,Nn as me,Nt as he,Ot as ge,P as _e,Qt as ve,R as A,Rt as ye,S as be,T as xe,Tt as Se,_t as Ce,a as we,an as Te,at as Ee,b as De,bn as j,cn as Oe,ct as ke,en as M,fn as Ae,gt as N,ht as je,i as Me,it as Ne,j as Pe,kn as Fe,ln as Ie,mt as Le,n as Re,nn as ze,o as Be,on as Ve,ot as He,r as Ue,rn as We,u as Ge,un as Ke,ut as qe,vn as Je,vt as Ye,x as Xe,xt as Ze,y as Qe,yn as $e,yt as et}from"./api-DMBgrk17.js";import{c as tt,l as nt,s as rt,t as it}from"./code-block-DKVMeNpL.js";import{r as at,t as ot}from"./native-select-Cc4FV9cz.js";import{A as st,B as ct,H as lt,L as ut,P as dt,W as ft,c as pt,i as mt,r as ht,s as gt,t as P,y as _t}from"./button-D4_M-wHl.js";import{C as vt,_ as yt,u as bt,y as xt}from"./reason-parts-CztZqjlj.js";import{t as F}from"./error-alert-C3tCznIk.js";import{i as St,o as Ct,r as wt,t as Tt}from"./empty-C7BJKsCc.js";import{t as Et}from"./useControlled-CiSbwZN5.js";import{i as Dt,t as Ot}from"./page-5rCn82pX.js";import{n as kt}from"./queries-TKKPRagF.js";import{O as At,at as jt,et as I,it as Mt,nt as Nt,ot as Pt,rt as Ft,st as It,tt as Lt}from"./index-BPhLK23-.js";import{r as Rt}from"./status-badge-CYV7BO8y.js";import{t as L}from"./label-B2PrCNtN.js";import{t as zt}from"./markdown-BqTCgzdQ.js";import{n as Bt,o as Vt,r as Ht,t as Ut}from"./table-kSUccuLf.js";import{t as Wt}from"./fill-cell-C7QNSxol.js";import{a as Gt,c as Kt,g as qt,h as Jt,i as Yt,l as Xt,m as Zt,n as Qt,o as $t,r as en,t as tn,u as nn}from"./sortable.esm-DCopHyTW.js";import{t as rn}from"./label-badge-N-5KY9g6.js";var an=class extends o{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:a(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function on(e,t){return s(e,an,t)}var R=e(t(),1),sn=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z`}))]]),cn=R.forwardRef((e,t)=>R.createElement(ft,{ref:t,...e,weights:sn}));cn.displayName=`DotsSixVerticalIcon`;var{workers:ln,repos:un,labels:dn,projects:fn,...pn}=E.fields,mn=he(pn),hn={agent:g,loop:ne,worker:_e,repository:Pe,settings:mn},gn=ge(Je(hn)),_n=S(gn),vn=(e,t)=>{if(!_n(e.kind))return Te(new w({file:A.make(e.key),stage:`schema`,expression:me(),message:`Use the text editor for this configuration entity.`}));let n=hn[e.kind];return T(n)(t,{onExcessProperty:`error`,errors:`all`}).pipe(ze(t),Ie(t=>w.fromSchema(A.make(e.key),t)))},yn=(e,t)=>{let n=A.make(e.key);return e.kind===`loop`?De(A.make(`loops/${e.identifier}.md`),t).pipe(Oe(ue(ne)),Ve(e=>T(b)(e)),We(`SchemaError`,e=>Te(w.fromSchema(n,e)))):e.kind===`agent`?Qe(A.make(`agents/${e.identifier}.md`),t).pipe(Oe(ue(g)),Ve(e=>T(b)(e)),We(`SchemaError`,e=>Te(w.fromSchema(n,e)))):be(n,t).pipe(Ve(e=>T(b)(e.toJS())),We(`SchemaError`,e=>Te(w.fromSchema(n,e))),Ve(t=>vn(e,t)))};function bn(e,t,n,r=!0,i,a){let[o,s]=R.useState(),c=vt(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return pt(()=>{let i=e||t||l||!r?void 0:xn(n.current,c);o!==i&&s(i)}),u}function xn(e,t){let n=Sn(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Sn(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var z=n(),Cn=R.createContext({disabled:!1});function wn(){return R.useContext(Cn)}var Tn=(e,t)=>new fe({kind:e,identifier:xe.make(t)}),En=({kind:e,identifier:t})=>{switch(e){case`settings`:return`/configuration/settings`;case`repository`:return`/configuration/repositories/${t.split(`/`).map(encodeURIComponent).join(`/`)}`;default:return`/configuration/${e}s/${encodeURIComponent(t)}`}},Dn=(e,t)=>{let n=e.identifier;switch(e.kind){case`agent`:return t.agents.find(({name:e})=>e===n)?.loops.map(e=>`loop ${e}`)??[];case`loop`:return t.loops.find(({name:e})=>e===n)?.repositories.map(e=>`project ${e}`)??[];case`project`:return t.loops.filter(({name:e})=>e.startsWith(`${n}/`)).map(({name:e})=>`loop ${e}`);case`repository`:return t.loops.filter(({repositories:e})=>e.some(e=>e===n)).map(({name:e})=>`loop ${e}`);case`label`:return t.repositories.filter(({declaredLabels:e})=>e.some(({name:e})=>e===n)).map(({name:e})=>`project ${e}`);case`worker`:return t.repositories.map(({name:e})=>`project ${e}`);case`settings`:return t.repositories.map(({name:e})=>`project ${e}`)}},On=(e,t,n)=>{switch(e){case`agent`:return`---
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{D as r,a as i,o as a,r as o,t as s}from"./useBaseQuery-Bq9mMy4d.js";import{a as c,f as l,g as u,i as d,o as f,s as p}from"./mark-TjVTH0zt.js";import{a as m,c as h,f as g,i as ee,n as _,o as te,p as ne,r as v,s as re,t as ie,u as ae}from"./queries-CR2-1r-p.js";import{n as oe}from"./useNavigate-I5E4IRt2.js";import{t as se}from"./link-04lHwIZK.js";import{A as ce,At as le,Bt as ue,C as de,Dn as y,E as fe,Et as b,F as x,Fn as pe,Ht as S,I as C,L as w,Lt as T,M as E,Mn as D,Mt as O,N as k,Nn as me,Nt as he,Ot as ge,P as _e,Qt as ve,R as A,Rt as ye,S as be,T as xe,Tt as Se,_t as Ce,a as we,an as Te,at as Ee,b as De,bn as j,cn as Oe,ct as ke,en as M,fn as Ae,gt as N,ht as je,i as Me,it as Ne,j as Pe,kn as Fe,ln as Ie,mt as Le,n as Re,nn as ze,o as Be,on as Ve,ot as He,r as Ue,rn as We,u as Ge,un as Ke,ut as qe,vn as Je,vt as Ye,x as Xe,xt as Ze,y as Qe,yn as $e,yt as et}from"./api-DMBgrk17.js";import{c as tt,l as nt,s as rt,t as it}from"./code-block-DKVMeNpL.js";import{r as at,t as ot}from"./native-select-Cc4FV9cz.js";import{A as st,B as ct,H as lt,L as ut,P as dt,W as ft,c as pt,i as mt,r as ht,s as gt,t as P,y as _t}from"./button-D4_M-wHl.js";import{C as vt,_ as yt,u as bt,y as xt}from"./reason-parts-CztZqjlj.js";import{t as F}from"./error-alert-C3tCznIk.js";import{i as St,o as Ct,r as wt,t as Tt}from"./empty-C7BJKsCc.js";import{t as Et}from"./useControlled-CiSbwZN5.js";import{i as Dt,t as Ot}from"./page-5rCn82pX.js";import{n as kt}from"./queries-TKKPRagF.js";import{O as At,at as jt,et as I,it as Mt,nt as Nt,ot as Pt,rt as Ft,st as It,tt as Lt}from"./index-DSOKl9hZ.js";import{r as Rt}from"./status-badge-CYV7BO8y.js";import{t as L}from"./label-B2PrCNtN.js";import{t as zt}from"./markdown-BqTCgzdQ.js";import{n as Bt,o as Vt,r as Ht,t as Ut}from"./table-kSUccuLf.js";import{t as Wt}from"./fill-cell-C7QNSxol.js";import{a as Gt,c as Kt,g as qt,h as Jt,i as Yt,l as Xt,m as Zt,n as Qt,o as $t,r as en,t as tn,u as nn}from"./sortable.esm-DCopHyTW.js";import{t as rn}from"./label-badge-DlfFeHM2.js";var an=class extends o{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:a(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function on(e,t){return s(e,an,t)}var R=e(t(),1),sn=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z`}))]]),cn=R.forwardRef((e,t)=>R.createElement(ft,{ref:t,...e,weights:sn}));cn.displayName=`DotsSixVerticalIcon`;var{workers:ln,repos:un,labels:dn,projects:fn,...pn}=E.fields,mn=he(pn),hn={agent:g,loop:ne,worker:_e,repository:Pe,settings:mn},gn=ge(Je(hn)),_n=S(gn),vn=(e,t)=>{if(!_n(e.kind))return Te(new w({file:A.make(e.key),stage:`schema`,expression:me(),message:`Use the text editor for this configuration entity.`}));let n=hn[e.kind];return T(n)(t,{onExcessProperty:`error`,errors:`all`}).pipe(ze(t),Ie(t=>w.fromSchema(A.make(e.key),t)))},yn=(e,t)=>{let n=A.make(e.key);return e.kind===`loop`?De(A.make(`loops/${e.identifier}.md`),t).pipe(Oe(ue(ne)),Ve(e=>T(b)(e)),We(`SchemaError`,e=>Te(w.fromSchema(n,e)))):e.kind===`agent`?Qe(A.make(`agents/${e.identifier}.md`),t).pipe(Oe(ue(g)),Ve(e=>T(b)(e)),We(`SchemaError`,e=>Te(w.fromSchema(n,e)))):be(n,t).pipe(Ve(e=>T(b)(e.toJS())),We(`SchemaError`,e=>Te(w.fromSchema(n,e))),Ve(t=>vn(e,t)))};function bn(e,t,n,r=!0,i,a){let[o,s]=R.useState(),c=vt(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return pt(()=>{let i=e||t||l||!r?void 0:xn(n.current,c);o!==i&&s(i)}),u}function xn(e,t){let n=Sn(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Sn(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var z=n(),Cn=R.createContext({disabled:!1});function wn(){return R.useContext(Cn)}var Tn=(e,t)=>new fe({kind:e,identifier:xe.make(t)}),En=({kind:e,identifier:t})=>{switch(e){case`settings`:return`/configuration/settings`;case`repository`:return`/configuration/repositories/${t.split(`/`).map(encodeURIComponent).join(`/`)}`;default:return`/configuration/${e}s/${encodeURIComponent(t)}`}},Dn=(e,t)=>{let n=e.identifier;switch(e.kind){case`agent`:return t.agents.find(({name:e})=>e===n)?.loops.map(e=>`loop ${e}`)??[];case`loop`:return t.loops.find(({name:e})=>e===n)?.repositories.map(e=>`project ${e}`)??[];case`project`:return t.loops.filter(({name:e})=>e.startsWith(`${n}/`)).map(({name:e})=>`loop ${e}`);case`repository`:return t.loops.filter(({repositories:e})=>e.some(e=>e===n)).map(({name:e})=>`loop ${e}`);case`label`:return t.repositories.filter(({declaredLabels:e})=>e.some(({name:e})=>e===n)).map(({name:e})=>`project ${e}`);case`worker`:return t.repositories.map(({name:e})=>`project ${e}`);case`settings`:return t.repositories.map(({name:e})=>`project ${e}`)}},On=(e,t,n)=>{switch(e){case`agent`:return`---
2
2
  harness: codex
3
3
  model: gpt-6-astra
4
4
  effort: medium
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{D as t}from"./useBaseQuery-Bq9mMy4d.js";import{B as n,H as r,I as i,K as a,L as o,N as s,P as c,U as l,V as u,W as d,Y as f,j as p,t as m}from"./section-D0pZ24Q9.js";import{o as h}from"./queries-w5gAm8od.js";import{t as g}from"./useSuspenseQuery-BRPaB8Gf.js";import{l as _}from"./queries-CR2-1r-p.js";import{Nn as v,n as y,s as b,t as x}from"./api-DMBgrk17.js";import{t as S}from"./button-D4_M-wHl.js";import{n as C}from"./queries-TKKPRagF.js";var w=e(),T=e=>/-next\.\d+\.g([0-9a-f]{7,40})$/u.exec(e)?.[1]??`@usine/server@${e}`,E=()=>{let{data:e}=g(_()),f=t(),m=h({mutationFn:e=>x(t=>t.requestUpgrade({payload:new b({timing:e,version:v()})})),onSuccess:()=>f.invalidateQueries(_())}),C=e.phase===`waiting`||e.phase===`installing`,E=e.available===null?null:`https://github.com/basaltbytes/usine/compare/${encodeURIComponent(T(e.running))}...${encodeURIComponent(T(e.available))}`;return(0,w.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`upgrades-title`,children:[(0,w.jsx)(`h2`,{id:`upgrades-title`,className:`text-md font-semibold`,children:a}),(0,w.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 border-y py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:r}),(0,w.jsx)(`dd`,{className:`font-mono text-xs`,children:e.running}),(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:s}),(0,w.jsx)(`dd`,{children:e.channel}),(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:o}),(0,w.jsx)(`dd`,{children:e.mode})]}),e.supported?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`p`,{role:`status`,children:e.phase===`waiting`?d:e.phase===`installing`?i:e.mode===`off`?n:e.available===null?c:p(e.available)}),E!==null&&(0,w.jsx)(`a`,{href:E,target:`_blank`,rel:`noreferrer`,className:`w-fit text-primary underline underline-offset-4`,children:`View changes`}),e.available!==null&&!C&&e.phase!==`failed`&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:gap-8`,children:[(0,w.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,w.jsx)(S,{disabled:m.isPending,onClick:()=>m.mutate(`idle`),children:`Upgrade when idle`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Wait for running attempts to finish. No new attempt starts while waiting.`})]}),(0,w.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,w.jsx)(S,{variant:`outline`,disabled:m.isPending,onClick:()=>m.mutate(`now`),children:`Upgrade now`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Restart now. Running attempts reattach after the server restarts.`})]})]})]}):(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:l}),e.outcome?.status===`rolled-back`&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:u(e.outcome.previous,e.outcome.target,e.outcome.reason)}),e.outcome?.status===`failed`&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.outcome.reason}),e.message!==null&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.message}),m.isError&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:y(m.error)})]})},D=e=>(0,w.jsx)(`span`,{className:`text-muted-foreground`,children:e}),O=e=>(0,w.jsx)(`code`,{className:`font-mono text-xs`,children:e}),k=e=>[[`Polling`,[{key:`settings.poll_interval`,value:O(e.pollInterval),effect:`Seconds between the starts of two GitHub poll cycles.`}]],[`Attempts`,[{key:`settings.max_children`,value:O(e.maxChildren),effect:`Maximum child sessions per attempt. Starting one more fails the attempt.`},{key:`settings.max_attempt_minutes`,value:e.maxAttemptMinutes===null?D(`Not set`):O(e.maxAttemptMinutes),effect:e.maxAttemptMinutes===null?`No wall-clock ceiling.`:`Minutes an attempt may run before the runaway guard fails it.`},{key:`settings.max_attempt_tokens`,value:e.maxAttemptTokens===null?D(`Not set`):O(e.maxAttemptTokens),effect:e.maxAttemptTokens===null?`No token ceiling.`:`Tokens an attempt may use, parent and children combined, before the runaway guard fails it.`}]],[`Parent`,[{key:`settings.parent_model`,value:e.parentModel===null?D(`Not set`):O(e.parentModel),effect:e.parentModel===null?`Chosen by Pi unless the agent file sets parent_model.`:`Parent model when the agent file sets no parent_model.`},{key:`settings.parent_effort`,value:e.parentEffort===null?D(`Not set`):O(e.parentEffort),effect:e.parentEffort===null?`parent_effort from the agent file, or effort if it is not set.`:`Parent effort when the agent file sets no parent_effort.`}]],[`Operator`,[{key:`operator`,value:e.operator===null?D(`Not set`):O(e.operator),effect:e.operator===null?`Approvals from the UI record no approver; messages show as local operator.`:`The GitHub login recorded on approvals and messages from the UI, and the only login that can answer an ask on GitHub.`}]],[`Webhooks`,[{key:`webhooks.mode`,value:O(e.webhooks),effect:`Parsed and validated but not used: this version reads GitHub changes by polling only. A change applies after usine up restarts.`},...e.webhooksPublicUrl===null?[]:[{key:`webhooks.public_url`,value:O(e.webhooksPublicUrl),effect:`Where GitHub would deliver webhooks.`}]]],[`Tracing`,e.tracing===null?[{key:`tracing.otlp_url`,value:D(`Not set`),effect:`No span export. A change applies after usine up restarts.`}]:[{key:`tracing.otlp_url`,value:O(e.tracing.otlpUrl),effect:`Collector endpoint that receives every span as OTLP/HTTP protobuf. A change applies after usine up restarts.`},{key:`tracing.service_name`,value:O(e.tracing.serviceName),effect:`The service.name resource attribute of every exported span.`}]]],A=({configuration:e,children:t})=>(0,w.jsx)(m,{entity:f(`settings`,`instance`),title:`Settings`,children:(0,w.jsxs)(`div`,{className:`flex max-w-4xl flex-col gap-8 pt-2`,children:[t,k(e.settings).map(([e,t])=>(0,w.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),(0,w.jsx)(`dl`,{className:`border-t`,children:t.map(({key:e,value:t,effect:n})=>(0,w.jsxs)(`div`,{className:`grid gap-x-6 gap-y-1 border-b py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,w.jsx)(`dt`,{className:`font-mono text-xs leading-5 text-muted-foreground`,children:e}),(0,w.jsxs)(`dd`,{className:`flex flex-col gap-0.5 wrap-anywhere`,children:[(0,w.jsx)(`span`,{children:t}),(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))})]},e))]})}),j=()=>{let{data:e}=g(C());return(0,w.jsx)(A,{configuration:e,children:(0,w.jsx)(E,{})})};export{j as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{D as t}from"./useBaseQuery-Bq9mMy4d.js";import{B as n,H as r,I as i,K as a,L as o,N as s,P as c,U as l,V as u,W as d,Y as f,j as p,t as m}from"./section-B9rSL8Bj.js";import{o as h}from"./queries-w5gAm8od.js";import{t as g}from"./useSuspenseQuery-BRPaB8Gf.js";import{l as _}from"./queries-CR2-1r-p.js";import{Nn as v,n as y,s as b,t as x}from"./api-DMBgrk17.js";import{t as S}from"./button-D4_M-wHl.js";import{n as C}from"./queries-TKKPRagF.js";var w=e(),T=e=>/-next\.\d+\.g([0-9a-f]{7,40})$/u.exec(e)?.[1]??`@usine/server@${e}`,E=()=>{let{data:e}=g(_()),f=t(),m=h({mutationFn:e=>x(t=>t.requestUpgrade({payload:new b({timing:e,version:v()})})),onSuccess:()=>f.invalidateQueries(_())}),C=e.phase===`waiting`||e.phase===`installing`,E=e.available===null?null:`https://github.com/basaltbytes/usine/compare/${encodeURIComponent(T(e.running))}...${encodeURIComponent(T(e.available))}`;return(0,w.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`upgrades-title`,children:[(0,w.jsx)(`h2`,{id:`upgrades-title`,className:`text-md font-semibold`,children:a}),(0,w.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-2 border-y py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:r}),(0,w.jsx)(`dd`,{className:`font-mono text-xs`,children:e.running}),(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:s}),(0,w.jsx)(`dd`,{children:e.channel}),(0,w.jsx)(`dt`,{className:`text-muted-foreground`,children:o}),(0,w.jsx)(`dd`,{children:e.mode})]}),e.supported?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`p`,{role:`status`,children:e.phase===`waiting`?d:e.phase===`installing`?i:e.mode===`off`?n:e.available===null?c:p(e.available)}),E!==null&&(0,w.jsx)(`a`,{href:E,target:`_blank`,rel:`noreferrer`,className:`w-fit text-primary underline underline-offset-4`,children:`View changes`}),e.available!==null&&!C&&e.phase!==`failed`&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:gap-8`,children:[(0,w.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,w.jsx)(S,{disabled:m.isPending,onClick:()=>m.mutate(`idle`),children:`Upgrade when idle`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Wait for running attempts to finish. No new attempt starts while waiting.`})]}),(0,w.jsxs)(`div`,{className:`flex max-w-sm flex-col items-start gap-2`,children:[(0,w.jsx)(S,{variant:`outline`,disabled:m.isPending,onClick:()=>m.mutate(`now`),children:`Upgrade now`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Restart now. Running attempts reattach after the server restarts.`})]})]})]}):(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:l}),e.outcome?.status===`rolled-back`&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:u(e.outcome.previous,e.outcome.target,e.outcome.reason)}),e.outcome?.status===`failed`&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.outcome.reason}),e.message!==null&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:e.message}),m.isError&&(0,w.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:y(m.error)})]})},D=e=>(0,w.jsx)(`span`,{className:`text-muted-foreground`,children:e}),O=e=>(0,w.jsx)(`code`,{className:`font-mono text-xs`,children:e}),k=e=>[[`Polling`,[{key:`settings.poll_interval`,value:O(e.pollInterval),effect:`Seconds between the starts of two GitHub poll cycles.`}]],[`Attempts`,[{key:`settings.max_children`,value:O(e.maxChildren),effect:`Maximum child sessions per attempt. Starting one more fails the attempt.`},{key:`settings.max_attempt_minutes`,value:e.maxAttemptMinutes===null?D(`Not set`):O(e.maxAttemptMinutes),effect:e.maxAttemptMinutes===null?`No wall-clock ceiling.`:`Minutes an attempt may run before the runaway guard fails it.`},{key:`settings.max_attempt_tokens`,value:e.maxAttemptTokens===null?D(`Not set`):O(e.maxAttemptTokens),effect:e.maxAttemptTokens===null?`No token ceiling.`:`Tokens an attempt may use, parent and children combined, before the runaway guard fails it.`}]],[`Parent`,[{key:`settings.parent_model`,value:e.parentModel===null?D(`Not set`):O(e.parentModel),effect:e.parentModel===null?`Chosen by Pi unless the agent file sets parent_model.`:`Parent model when the agent file sets no parent_model.`},{key:`settings.parent_effort`,value:e.parentEffort===null?D(`Not set`):O(e.parentEffort),effect:e.parentEffort===null?`parent_effort from the agent file, or effort if it is not set.`:`Parent effort when the agent file sets no parent_effort.`}]],[`Operator`,[{key:`operator`,value:e.operator===null?D(`Not set`):O(e.operator),effect:e.operator===null?`Approvals from the UI record no approver; messages show as local operator.`:`The GitHub login recorded on approvals and messages from the UI, and the only login that can answer an ask on GitHub.`}]],[`Webhooks`,[{key:`webhooks.mode`,value:O(e.webhooks),effect:`Parsed and validated but not used: this version reads GitHub changes by polling only. A change applies after usine up restarts.`},...e.webhooksPublicUrl===null?[]:[{key:`webhooks.public_url`,value:O(e.webhooksPublicUrl),effect:`Where GitHub would deliver webhooks.`}]]],[`Tracing`,e.tracing===null?[{key:`tracing.otlp_url`,value:D(`Not set`),effect:`No span export. A change applies after usine up restarts.`}]:[{key:`tracing.otlp_url`,value:O(e.tracing.otlpUrl),effect:`Collector endpoint that receives every span as OTLP/HTTP protobuf. A change applies after usine up restarts.`},{key:`tracing.service_name`,value:O(e.tracing.serviceName),effect:`The service.name resource attribute of every exported span.`}]]],A=({configuration:e,children:t})=>(0,w.jsx)(m,{entity:f(`settings`,`instance`),title:`Settings`,children:(0,w.jsxs)(`div`,{className:`flex max-w-4xl flex-col gap-8 pt-2`,children:[t,k(e.settings).map(([e,t])=>(0,w.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,w.jsx)(`h2`,{className:`text-md font-semibold`,children:e}),(0,w.jsx)(`dl`,{className:`border-t`,children:t.map(({key:e,value:t,effect:n})=>(0,w.jsxs)(`div`,{className:`grid gap-x-6 gap-y-1 border-b py-3 sm:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,w.jsx)(`dt`,{className:`font-mono text-xs leading-5 text-muted-foreground`,children:e}),(0,w.jsxs)(`dd`,{className:`flex flex-col gap-0.5 wrap-anywhere`,children:[(0,w.jsx)(`span`,{children:t}),(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))})]},e))]})}),j=()=>{let{data:e}=g(C());return(0,w.jsx)(A,{configuration:e,children:(0,w.jsx)(E,{})})};export{j as component};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-BRPaB8Gf.js";import{Nt as i,St as a,l as o,n as s}from"./api-DMBgrk17.js";import{t as c}from"./button-D4_M-wHl.js";import{t as l}from"./error-alert-C3tCznIk.js";import{m as u,p as d}from"./index-BPhLK23-.js";var f=e(t(),1),p=`Sign in to usine`,m=`Run usine sign-in-link in the instance folder to get a one-time sign-in link.`,h=`Signing in…`,g=n(),_=({error:e})=>{let{data:t}=r(u()),[n,d]=(0,f.useState)(e),[_,v]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(`link`);e!==null&&(window.history.replaceState(null,``,window.location.pathname),d(void 0),v(!0),o(`/api/auth/link/consume`,i({ok:a,bootstrap:a}),{method:`POST`,body:{token:e}}).then(e=>window.location.replace(e.bootstrap&&t.github?`/api/auth/github`:`/`),e=>{d(s(e)),v(!1)}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[t.github]),(0,g.jsx)(`main`,{className:`flex min-h-svh items-center justify-center bg-background p-6`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-sm space-y-6`,"aria-labelledby":`sign-in-title`,children:[(0,g.jsx)(`h1`,{id:`sign-in-title`,className:`text-xl font-semibold`,children:p}),n!==void 0&&(0,g.jsx)(l,{message:n}),_?(0,g.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:h}):(0,g.jsxs)(g.Fragment,{children:[t.github&&(0,g.jsx)(c,{render:(0,g.jsx)(`a`,{href:`/api/auth/github`}),children:`Continue with GitHub`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m})]})]})})},v=()=>(0,g.jsx)(_,{error:d.useSearch().error});export{v as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-BRPaB8Gf.js";import{Nt as i,St as a,l as o,n as s}from"./api-DMBgrk17.js";import{t as c}from"./button-D4_M-wHl.js";import{t as l}from"./error-alert-C3tCznIk.js";import{m as u,p as d}from"./index-DSOKl9hZ.js";var f=e(t(),1),p=`Sign in to usine`,m=`Run usine sign-in-link in the instance folder to get a one-time sign-in link.`,h=`Signing in…`,g=n(),_=({error:e})=>{let{data:t}=r(u()),[n,d]=(0,f.useState)(e),[_,v]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(`link`);e!==null&&(window.history.replaceState(null,``,window.location.pathname),d(void 0),v(!0),o(`/api/auth/link/consume`,i({ok:a,bootstrap:a}),{method:`POST`,body:{token:e}}).then(e=>window.location.replace(e.bootstrap&&t.github?`/api/auth/github`:`/`),e=>{d(s(e)),v(!1)}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[t.github]),(0,g.jsx)(`main`,{className:`flex min-h-svh items-center justify-center bg-background p-6`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-sm space-y-6`,"aria-labelledby":`sign-in-title`,children:[(0,g.jsx)(`h1`,{id:`sign-in-title`,className:`text-xl font-semibold`,children:p}),n!==void 0&&(0,g.jsx)(l,{message:n}),_?(0,g.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:h}):(0,g.jsxs)(g.Fragment,{children:[t.github&&(0,g.jsx)(c,{render:(0,g.jsx)(`a`,{href:`/api/auth/github`}),children:`Continue with GitHub`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m})]})]})})},v=()=>(0,g.jsx)(_,{error:d.useSearch().error});export{v as component};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{s as r,t as i}from"./mark-TjVTH0zt.js";import{t as a}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as o}from"./link-04lHwIZK.js";import{Fn as s,bt as c}from"./api-DMBgrk17.js";import{h as l,m as u,o as d,t as f,y as p}from"./strings-Cgrt38_s.js";import{A as m,P as h,c as g,s as _,x as v}from"./button-D4_M-wHl.js";import{A as y,Ct as ee,D as b,E as x,F as S,I as C,K as w,L as T,N as E,O as D,T as O,_ as k,b as A,g as j,h as M,m as N,p as P,v as te,x as ne,xt as re,y as ie}from"./useScrollLock-C-KKJ25P.js";import{C as ae,_ as oe,o as se}from"./reason-parts-CztZqjlj.js";import{S as ce,_ as le,a as F,d as ue,f as de,p as fe,v as pe,x as me,y as he}from"./useTriggerFocusGuards-w5WLoQxU.js";import{i as ge,n as _e,r as ve}from"./overview-CyrdJxvZ.js";import{a as ye,i as be,t as xe}from"./page-5rCn82pX.js";import{D as Se,J as Ce,O as we,r as Te}from"./index-BPhLK23-.js";import{t as Ee}from"./pull-request-marks-B6oHQmCS.js";import{n as I}from"./status-badge-CYV7BO8y.js";import{t as De}from"./usage-DL_2QgAQ.js";import{a as Oe,i as L,n as ke,o as R,r as z,t as Ae}from"./table-kSUccuLf.js";import{t as je}from"./fill-cell-C7QNSxol.js";import{n as Me}from"./section-DQ4WUt68.js";import{c as Ne,d as Pe,g as Fe,h as Ie,i as Le,l as Re,m as ze,p as Be,r as Ve,s as He,u as Ue}from"./model-Ca7RC2YV.js";import{n as We,t as Ge}from"./strings-CD2oxW8w.js";import{t as Ke}from"./project-not-found-CZLTPMV2.js";import{i as qe,r as Je}from"./section-CZjeg41d.js";function B(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Ye(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function V(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Ye(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:B(r,i,a,o)}}function H(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function U(e){return B(e.left,e.top,e.right,e.bottom)}function Xe(e,t,n){let{lines:r}=V(e.getClientRects());if(r.length<2)return;let i=H(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Ze(e,t,n){let{lines:r,fallback:i}=V(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return U(r[n.lineIndex]);if(a!=null&&o!=null){let e=H(r,a,o);if(e!==-1)return U(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return B(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return B(l,f.top,u,p.bottom)}function Qe(e){return`contextElement`in e&&e.contextElement?e.contextElement:v(e)?e:void 0}function $e(e,t){function n(t){W(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function W(e,t,n,r){let i=Xe(t,n,r);return e.current=i,i}function et(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=Qe(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=Ze(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var G=e(t(),1),K=G.createContext(void 0);function q(e){let t=G.useContext(K);if(t===void 0&&!e)throw Error(_(50));return t}var tt={...N,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},nt=class extends M{constructor(e,t,n){let r=new te;super(rt(e,r,t,n),it(r),tt)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;ne(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&W(n,t.trigger,r.clientX,r.clientY)}})}};function rt(e,t,n,r=!1){return{...P(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function it(e){return{popupRef:G.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var J=n();function Y(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=D((e,r)=>new nt({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);O(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=x(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});g(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),G.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,oe(se))}),[h,u]);let _=d||p||o!=null;return(0,J.jsxs)(K.Provider,{value:u,children:[o&&(0,J.jsx)(A,{handle:o,store:u}),_&&(0,J.jsx)(at,{store:u}),typeof l==`function`?l({payload:m}):l]})}function at({store:e}){let t=e.useState(`floatingRootContext`),n=E(t);return b(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var ot=j(function(e){return q(!0)?(0,J.jsx)(Y,{...e}):(0,J.jsx)(C,{children:(0,J.jsx)(Y,{...e})})}),X=G.createContext(void 0);function st(){let e=G.useContext(X);if(e===void 0)throw Error(_(48));return e}var ct=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return q().useState(`mounted`)||n?(0,J.jsx)(X.Provider,{value:n,children:(0,J.jsx)(Ce,{ref:t,...r})}):null}),lt=k(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=q(!0),f=ce(c)??d;if(!f)throw Error(_(89));let p=ae(o),m=f.useState(`isTriggerActive`,p),g=f.useState(`isOpenedByTrigger`,p),v=f.useState(`floatingRootContext`),b=f.context.inlineRectCoordsRef,x=G.useRef(null),S=i??600,C=a??300,{registerTrigger:w,isMountedByThisTrigger:T}=y(p,x,f,{payload:s,closeDelay:C}),E=pe(v,{mouseOnly:!0,move:!1,handleClose:le(),delay:()=>({open:S,close:C}),triggerElementRef:x,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),D=me(v,{delay:S}),O={open:g},k=f.useState(`triggerProps`,T),A=$e(b,g);return h(`a`,e,{state:O,ref:[t,w,x],props:[E,D.reference,k,A,{id:p},u],stateAttributesMapping:ee})}),ut=G.createContext(void 0);function dt(){let e=G.useContext(ut);if(e===void 0)throw Error(_(49));return e}var ft=G.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=w,style:_,...v}=e,y=q(),ee=st(),b=T(),x=y.useState(`open`),C=y.useState(`mounted`),E=y.useState(`floatingRootContext`),D=y.useState(`instantType`),O=y.useState(`transitionStatus`),k=y.useState(`adaptiveOrigin`),A=y.context.inlineRectCoordsRef,j=fe({anchor:i,floatingRootContext:E,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:ee,nodeId:b,collisionAvoidance:h,adaptiveOrigin:k,inline:et(A)}),M=j.update;g(()=>{x&&C&&M()},[x,C,M]);let N={open:x,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:D},P=ue(e,N,{styles:j.positionerStyles,transitionStatus:O,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!C,inert:!x});return(0,J.jsx)(ut.Provider,{value:j,children:(0,J.jsx)(S,{id:b,children:P})})}),pt=G.forwardRef(function(e,t){let{className:n,render:i,style:a,...o}=e,s=q(),{side:c,align:l}=dt(),u=s.useState(`open`),d=s.useState(`instantType`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return r({open:u,ref:s.context.popupRef,onComplete(){u&&s.context.onOpenChangeComplete?.(!0)}}),he(m,{closeDelay:g}),h(`div`,e,{state:{open:u,side:c,align:l,instant:d,transitionStatus:f},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[ie,p,de(f),o],stateAttributesMapping:re})});function mt({...e}){return(0,J.jsx)(ot,{"data-slot":`hover-card`,...e})}function ht({...e}){return(0,J.jsx)(lt,{"data-slot":`hover-card-trigger`,...e})}function gt({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,J.jsx)(ct,{"data-slot":`hover-card-portal`,children:(0,J.jsx)(ft,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,J.jsx)(pt,{"data-slot":`hover-card-content`,className:m(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-xs/relaxed text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var _t=`relative z-10 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,vt=({usage:e,label:t,note:n,children:r})=>(0,J.jsxs)(mt,{children:[(0,J.jsx)(ht,{delay:200,"aria-label":t,render:(0,J.jsx)(`button`,{type:`button`,className:_t}),children:r}),(0,J.jsxs)(gt,{align:`end`,className:`w-[26rem] max-w-[calc(100vw-2rem)] p-3 font-sans text-xs shadow-raised`,children:[n!==null&&(0,J.jsxs)(`p`,{className:`pb-2 text-muted-foreground`,children:[n,`.`]}),(0,J.jsx)(De,{pools:e.pools})]})]}),Z=`hidden @5xl:table-cell`,Q=`hidden @4xl:table-cell`,yt=`@md:w-max @md:max-w-(--side)`,bt=({reason:e})=>c(e,{AwaitingApproval:()=>`Waiting`,SuppressedForOperator:()=>`needs-you`,CycleBudgetUsedUp:()=>`needs-you`,RunFailed:()=>`Failed`,ClosedUnchanged:({run:e})=>e.state,LoopPaused:()=>`paused`,WaitingForStop:({run:e})=>e.state,QueuedForWorker:({run:e})=>e.state,AwaitingPoll:()=>`Pending`}),xt=({last:e,status:t},n)=>{let r=Le(e),i=t=>({state:bt(t),words:`${e.loop!==t.loop&&!Ge(t)?`${t.loop} `:``}${We(t,n)}`,at:null});return c(t,{Running:({run:e})=>({state:`Running`,words:`Running ${e.loop}`,at:r}),AwaitingApproval:()=>({state:`Waiting`,words:`Waiting for approval`,at:r}),Queued:({run:e})=>({state:e.state,words:e.state,at:r}),Stalled:({stall:e})=>i(e),Idle:({stall:e})=>i(e),NeedsAttention:()=>({state:`needs-you`,words:`Needs attention`,at:r}),Done:()=>({state:`Done`,words:`Done`,at:r}),Ended:({run:e})=>({state:e.state,words:e.state,at:r})})},St=({row:e,now:t})=>{let{state:n,words:r,at:a}=xt(e,t);return(0,J.jsxs)(`span`,{className:m(`flex items-start gap-1.5 text-xs/5 font-medium`,yt),children:[n===`Done`?(0,J.jsx)(i,{item:e.task,linked:!1,numbered:!1,className:`mt-0.75`}):(0,J.jsx)(I,{state:n,className:`mt-1.75 mr-0.5 ml-0.75`}),(0,J.jsxs)(`span`,{className:`min-w-0 wrap-break-word`,children:[r,a!==null&&(0,J.jsxs)(J.Fragment,{children:[` `,(0,J.jsxs)(`span`,{className:`font-normal whitespace-nowrap text-muted-foreground`,children:[`·`,` `,(0,J.jsx)(`time`,{dateTime:a,title:u(a),className:`font-mono tabular-nums`,children:f(a,t)})]})]})]})]})},Ct=()=>(0,J.jsx)(`span`,{className:`absolute left-full text-muted-foreground`,children:`*`}),wt=({usage:e})=>{if(e.cost===null)return null;let t=Ve(e),n=p(e.cost.usd);return(0,J.jsxs)(vt,{usage:e,label:`Estimated cost: ${t?`at least `:``}${n}. Show per pool`,note:t?Ie:null,children:[n,t&&(0,J.jsx)(Ct,{})]})},Tt=({task:e,now:t})=>{let{usage:n}=e;if(e.runs.every(({attempts:e})=>e.length===0))return null;let r=n.unmeasured>0;return(0,J.jsxs)(`span`,{className:`relative`,title:r?Fe:`Total attempt time`,children:[d(Ne(n,t)),r&&(0,J.jsx)(Ct,{})]})},Et=`py-3 align-top whitespace-normal`,$=`py-3 text-right align-top font-mono text-xs/5 whitespace-nowrap tabular-nums`,Dt=({task:e})=>{let t=Re(e);return(0,J.jsxs)(`span`,{className:m(`flex items-baseline gap-2`,yt),children:[(0,J.jsx)(`span`,{className:`truncate`,title:t.map(({loop:e})=>e).join(` · `),children:t.map(({loop:e,state:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,J.jsx)(I,{state:t,className:`mr-2 ml-0.75 align-middle`}),e,(0,J.jsxs)(`span`,{className:`sr-only`,children:[` `,t]})]},e))}),(0,J.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular-nums`,children:e.runs.length})]})},Ot=({row:e,repository:t,now:n})=>(0,J.jsxs)(R,{className:Je,children:[(0,J.jsx)(je,{className:`py-3 align-top`,children:(0,J.jsx)(o,{"data-row-link":!0,to:`/projects/$owner/$name/tasks/$number`,params:{...ge(t),number:Ue(e.task)},className:m(`block min-w-0`,qe),children:(0,J.jsx)(we,{variant:`row`,item:s(F(e.task).origin),title:e.task.title,linked:!1})})}),(0,J.jsx)(z,{className:Et,children:(0,J.jsx)(St,{row:e,now:n})}),(0,J.jsx)(z,{className:m(`py-3 align-top`,Z),children:(0,J.jsx)(Dt,{task:e.task})}),(0,J.jsx)(z,{className:m(`py-3 text-right align-top`,Z),children:(0,J.jsx)(Ee,{pullRequests:F(e.task).pullRequests,className:`relative z-10 justify-end`})}),(0,J.jsx)(z,{className:$,children:(0,J.jsx)(Tt,{task:e.task,now:n})}),(0,J.jsx)(z,{className:m($,Q),children:e.task.usage.pools.length>0&&(0,J.jsx)(vt,{usage:e.task.usage,label:`Tokens: ${l(e.task.usage.tokens)}. Show per pool`,note:null,children:l(e.task.usage.tokens)})}),(0,J.jsx)(z,{className:m($,Q),children:(0,J.jsx)(wt,{usage:e.task.usage})})]}),kt=({totals:e})=>(0,J.jsx)(`p`,{className:`-mt-2 text-sm text-muted-foreground tabular-nums`,children:ze(e).map(({figure:e,words:t,lowerBound:n},r)=>(0,J.jsxs)(G.Fragment,{children:[r>0&&`, `,n===null?e:(0,J.jsx)(`span`,{title:n,children:`${e}*`}),` `,t]},t))}),At=[`@md:[--side:clamp(7rem,calc((100cqw-26rem-var(--rest))/var(--sides)),13rem)]`,`[--rest:7rem] [--sides:1] @4xl:[--rest:16.5rem] @5xl:[--rest:23rem] @5xl:[--sides:2]`].join(` `),jt=({project:e,stalled:t})=>{let n=Se(3e4),r=Pe(e.board.lanes,t);return(0,J.jsxs)(xe,{width:`full`,children:[(0,J.jsx)(be,{title:`Tasks`,counts:He(r)}),r.length===0?(0,J.jsx)(Me,{children:`No runs yet`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(kt,{totals:Be(r,n)}),(0,J.jsx)(`div`,{className:`@container -mx-2`,children:(0,J.jsxs)(Ae,{"aria-label":`${e.repository} tasks`,className:At,children:[(0,J.jsx)(Oe,{children:(0,J.jsxs)(R,{className:`hover:bg-transparent`,children:[(0,J.jsx)(L,{children:`Task`}),(0,J.jsx)(L,{children:`Status`}),(0,J.jsx)(L,{className:Z,children:`Runs`}),(0,J.jsx)(L,{className:m(`text-right`,Z),children:`Pull request`}),(0,J.jsx)(L,{className:`text-right`,children:`Elapsed time`}),(0,J.jsx)(L,{className:m(`text-right`,Q),children:`Tokens`}),(0,J.jsx)(L,{className:m(`text-right`,Q),children:`Estimated cost`})]})}),(0,J.jsx)(ke,{children:r.map(e=>(0,J.jsx)(Ot,{row:e,repository:e.task.repository,now:n},e.task.itemKey))})]})})]})]})},Mt=()=>{let{repository:e}=Te.useParams(),{data:t}=a(_e()),n=a(ye()),r=ve(t.projects,e);return r===void 0?(0,J.jsx)(Ke,{}):(0,J.jsx)(jt,{project:r,stalled:n.data.notMoving})};export{Mt as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{s as r,t as i}from"./mark-TjVTH0zt.js";import{t as a}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as o}from"./link-04lHwIZK.js";import{Fn as s,bt as c}from"./api-DMBgrk17.js";import{h as l,m as u,o as d,t as f,y as p}from"./strings-Cgrt38_s.js";import{A as m,P as h,c as g,s as _,x as v}from"./button-D4_M-wHl.js";import{A as y,Ct as ee,D as b,E as x,F as S,I as C,K as w,L as T,N as E,O as D,T as O,_ as k,b as A,g as j,h as M,m as N,p as P,v as te,x as ne,xt as re,y as ie}from"./useScrollLock-C-KKJ25P.js";import{C as ae,_ as oe,o as se}from"./reason-parts-CztZqjlj.js";import{S as ce,_ as le,a as F,d as ue,f as de,p as fe,v as pe,x as me,y as he}from"./useTriggerFocusGuards-w5WLoQxU.js";import{i as ge,n as _e,r as ve}from"./overview-CyrdJxvZ.js";import{a as ye,i as be,t as xe}from"./page-5rCn82pX.js";import{D as Se,J as Ce,O as we,r as Te}from"./index-DSOKl9hZ.js";import{t as Ee}from"./pull-request-marks-B6oHQmCS.js";import{n as I}from"./status-badge-CYV7BO8y.js";import{t as De}from"./usage-DG8mHuwO.js";import{a as Oe,i as L,n as ke,o as R,r as z,t as Ae}from"./table-kSUccuLf.js";import{t as je}from"./fill-cell-C7QNSxol.js";import{n as Me}from"./section-DQ4WUt68.js";import{c as Ne,d as Pe,g as Fe,h as Ie,i as Le,l as Re,m as ze,p as Be,r as Ve,s as He,u as Ue}from"./model-Ca7RC2YV.js";import{n as We,t as Ge}from"./strings-CD2oxW8w.js";import{t as Ke}from"./project-not-found-CZLTPMV2.js";import{i as qe,r as Je}from"./section-CZjeg41d.js";function B(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Ye(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function V(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Ye(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:B(r,i,a,o)}}function H(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function U(e){return B(e.left,e.top,e.right,e.bottom)}function Xe(e,t,n){let{lines:r}=V(e.getClientRects());if(r.length<2)return;let i=H(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Ze(e,t,n){let{lines:r,fallback:i}=V(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return U(r[n.lineIndex]);if(a!=null&&o!=null){let e=H(r,a,o);if(e!==-1)return U(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return B(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return B(l,f.top,u,p.bottom)}function Qe(e){return`contextElement`in e&&e.contextElement?e.contextElement:v(e)?e:void 0}function $e(e,t){function n(t){W(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function W(e,t,n,r){let i=Xe(t,n,r);return e.current=i,i}function et(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=Qe(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=Ze(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var G=e(t(),1),K=G.createContext(void 0);function q(e){let t=G.useContext(K);if(t===void 0&&!e)throw Error(_(50));return t}var tt={...N,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},nt=class extends M{constructor(e,t,n){let r=new te;super(rt(e,r,t,n),it(r),tt)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;ne(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&W(n,t.trigger,r.clientX,r.clientY)}})}};function rt(e,t,n,r=!1){return{...P(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function it(e){return{popupRef:G.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}var J=n();function Y(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=D((e,r)=>new nt({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);O(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=x(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});g(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),G.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,oe(se))}),[h,u]);let _=d||p||o!=null;return(0,J.jsxs)(K.Provider,{value:u,children:[o&&(0,J.jsx)(A,{handle:o,store:u}),_&&(0,J.jsx)(at,{store:u}),typeof l==`function`?l({payload:m}):l]})}function at({store:e}){let t=e.useState(`floatingRootContext`),n=E(t);return b(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}var ot=j(function(e){return q(!0)?(0,J.jsx)(Y,{...e}):(0,J.jsx)(C,{children:(0,J.jsx)(Y,{...e})})}),X=G.createContext(void 0);function st(){let e=G.useContext(X);if(e===void 0)throw Error(_(48));return e}var ct=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return q().useState(`mounted`)||n?(0,J.jsx)(X.Provider,{value:n,children:(0,J.jsx)(Ce,{ref:t,...r})}):null}),lt=k(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=q(!0),f=ce(c)??d;if(!f)throw Error(_(89));let p=ae(o),m=f.useState(`isTriggerActive`,p),g=f.useState(`isOpenedByTrigger`,p),v=f.useState(`floatingRootContext`),b=f.context.inlineRectCoordsRef,x=G.useRef(null),S=i??600,C=a??300,{registerTrigger:w,isMountedByThisTrigger:T}=y(p,x,f,{payload:s,closeDelay:C}),E=pe(v,{mouseOnly:!0,move:!1,handleClose:le(),delay:()=>({open:S,close:C}),triggerElementRef:x,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),D=me(v,{delay:S}),O={open:g},k=f.useState(`triggerProps`,T),A=$e(b,g);return h(`a`,e,{state:O,ref:[t,w,x],props:[E,D.reference,k,A,{id:p},u],stateAttributesMapping:ee})}),ut=G.createContext(void 0);function dt(){let e=G.useContext(ut);if(e===void 0)throw Error(_(49));return e}var ft=G.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=w,style:_,...v}=e,y=q(),ee=st(),b=T(),x=y.useState(`open`),C=y.useState(`mounted`),E=y.useState(`floatingRootContext`),D=y.useState(`instantType`),O=y.useState(`transitionStatus`),k=y.useState(`adaptiveOrigin`),A=y.context.inlineRectCoordsRef,j=fe({anchor:i,floatingRootContext:E,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:ee,nodeId:b,collisionAvoidance:h,adaptiveOrigin:k,inline:et(A)}),M=j.update;g(()=>{x&&C&&M()},[x,C,M]);let N={open:x,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:D},P=ue(e,N,{styles:j.positionerStyles,transitionStatus:O,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!C,inert:!x});return(0,J.jsx)(ut.Provider,{value:j,children:(0,J.jsx)(S,{id:b,children:P})})}),pt=G.forwardRef(function(e,t){let{className:n,render:i,style:a,...o}=e,s=q(),{side:c,align:l}=dt(),u=s.useState(`open`),d=s.useState(`instantType`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`floatingRootContext`),g=s.useState(`closeDelay`);return r({open:u,ref:s.context.popupRef,onComplete(){u&&s.context.onOpenChangeComplete?.(!0)}}),he(m,{closeDelay:g}),h(`div`,e,{state:{open:u,side:c,align:l,instant:d,transitionStatus:f},ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],props:[ie,p,de(f),o],stateAttributesMapping:re})});function mt({...e}){return(0,J.jsx)(ot,{"data-slot":`hover-card`,...e})}function ht({...e}){return(0,J.jsx)(lt,{"data-slot":`hover-card-trigger`,...e})}function gt({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,J.jsx)(ct,{"data-slot":`hover-card-portal`,children:(0,J.jsx)(ft,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,J.jsx)(pt,{"data-slot":`hover-card-content`,className:m(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-xs/relaxed text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var _t=`relative z-10 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,vt=({usage:e,label:t,note:n,children:r})=>(0,J.jsxs)(mt,{children:[(0,J.jsx)(ht,{delay:200,"aria-label":t,render:(0,J.jsx)(`button`,{type:`button`,className:_t}),children:r}),(0,J.jsxs)(gt,{align:`end`,className:`w-[26rem] max-w-[calc(100vw-2rem)] p-3 font-sans text-xs shadow-raised`,children:[n!==null&&(0,J.jsxs)(`p`,{className:`pb-2 text-muted-foreground`,children:[n,`.`]}),(0,J.jsx)(De,{pools:e.pools})]})]}),Z=`hidden @5xl:table-cell`,Q=`hidden @4xl:table-cell`,yt=`@md:w-max @md:max-w-(--side)`,bt=({reason:e})=>c(e,{AwaitingApproval:()=>`Waiting`,SuppressedForOperator:()=>`needs-you`,CycleBudgetUsedUp:()=>`needs-you`,RunFailed:()=>`Failed`,ClosedUnchanged:({run:e})=>e.state,LoopPaused:()=>`paused`,WaitingForStop:({run:e})=>e.state,QueuedForWorker:({run:e})=>e.state,AwaitingPoll:()=>`Pending`}),xt=({last:e,status:t},n)=>{let r=Le(e),i=t=>({state:bt(t),words:`${e.loop!==t.loop&&!Ge(t)?`${t.loop} `:``}${We(t,n)}`,at:null});return c(t,{Running:({run:e})=>({state:`Running`,words:`Running ${e.loop}`,at:r}),AwaitingApproval:()=>({state:`Waiting`,words:`Waiting for approval`,at:r}),Queued:({run:e})=>({state:e.state,words:e.state,at:r}),Stalled:({stall:e})=>i(e),Idle:({stall:e})=>i(e),NeedsAttention:()=>({state:`needs-you`,words:`Needs attention`,at:r}),Done:()=>({state:`Done`,words:`Done`,at:r}),Ended:({run:e})=>({state:e.state,words:e.state,at:r})})},St=({row:e,now:t})=>{let{state:n,words:r,at:a}=xt(e,t);return(0,J.jsxs)(`span`,{className:m(`flex items-start gap-1.5 text-xs/5 font-medium`,yt),children:[n===`Done`?(0,J.jsx)(i,{item:e.task,linked:!1,numbered:!1,className:`mt-0.75`}):(0,J.jsx)(I,{state:n,className:`mt-1.75 mr-0.5 ml-0.75`}),(0,J.jsxs)(`span`,{className:`min-w-0 wrap-break-word`,children:[r,a!==null&&(0,J.jsxs)(J.Fragment,{children:[` `,(0,J.jsxs)(`span`,{className:`font-normal whitespace-nowrap text-muted-foreground`,children:[`·`,` `,(0,J.jsx)(`time`,{dateTime:a,title:u(a),className:`font-mono tabular-nums`,children:f(a,t)})]})]})]})]})},Ct=()=>(0,J.jsx)(`span`,{className:`absolute left-full text-muted-foreground`,children:`*`}),wt=({usage:e})=>{if(e.cost===null)return null;let t=Ve(e),n=p(e.cost.usd);return(0,J.jsxs)(vt,{usage:e,label:`Estimated cost: ${t?`at least `:``}${n}. Show per pool`,note:t?Ie:null,children:[n,t&&(0,J.jsx)(Ct,{})]})},Tt=({task:e,now:t})=>{let{usage:n}=e;if(e.runs.every(({attempts:e})=>e.length===0))return null;let r=n.unmeasured>0;return(0,J.jsxs)(`span`,{className:`relative`,title:r?Fe:`Total attempt time`,children:[d(Ne(n,t)),r&&(0,J.jsx)(Ct,{})]})},Et=`py-3 align-top whitespace-normal`,$=`py-3 text-right align-top font-mono text-xs/5 whitespace-nowrap tabular-nums`,Dt=({task:e})=>{let t=Re(e);return(0,J.jsxs)(`span`,{className:m(`flex items-baseline gap-2`,yt),children:[(0,J.jsx)(`span`,{className:`truncate`,title:t.map(({loop:e})=>e).join(` · `),children:t.map(({loop:e,state:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,J.jsx)(I,{state:t,className:`mr-2 ml-0.75 align-middle`}),e,(0,J.jsxs)(`span`,{className:`sr-only`,children:[` `,t]})]},e))}),(0,J.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular-nums`,children:e.runs.length})]})},Ot=({row:e,repository:t,now:n})=>(0,J.jsxs)(R,{className:Je,children:[(0,J.jsx)(je,{className:`py-3 align-top`,children:(0,J.jsx)(o,{"data-row-link":!0,to:`/projects/$owner/$name/tasks/$number`,params:{...ge(t),number:Ue(e.task)},className:m(`block min-w-0`,qe),children:(0,J.jsx)(we,{variant:`row`,item:s(F(e.task).origin),title:e.task.title,linked:!1})})}),(0,J.jsx)(z,{className:Et,children:(0,J.jsx)(St,{row:e,now:n})}),(0,J.jsx)(z,{className:m(`py-3 align-top`,Z),children:(0,J.jsx)(Dt,{task:e.task})}),(0,J.jsx)(z,{className:m(`py-3 text-right align-top`,Z),children:(0,J.jsx)(Ee,{pullRequests:F(e.task).pullRequests,className:`relative z-10 justify-end`})}),(0,J.jsx)(z,{className:$,children:(0,J.jsx)(Tt,{task:e.task,now:n})}),(0,J.jsx)(z,{className:m($,Q),children:e.task.usage.pools.length>0&&(0,J.jsx)(vt,{usage:e.task.usage,label:`Tokens: ${l(e.task.usage.tokens)}. Show per pool`,note:null,children:l(e.task.usage.tokens)})}),(0,J.jsx)(z,{className:m($,Q),children:(0,J.jsx)(wt,{usage:e.task.usage})})]}),kt=({totals:e})=>(0,J.jsx)(`p`,{className:`-mt-2 text-sm text-muted-foreground tabular-nums`,children:ze(e).map(({figure:e,words:t,lowerBound:n},r)=>(0,J.jsxs)(G.Fragment,{children:[r>0&&`, `,n===null?e:(0,J.jsx)(`span`,{title:n,children:`${e}*`}),` `,t]},t))}),At=[`@md:[--side:clamp(7rem,calc((100cqw-26rem-var(--rest))/var(--sides)),13rem)]`,`[--rest:7rem] [--sides:1] @4xl:[--rest:16.5rem] @5xl:[--rest:23rem] @5xl:[--sides:2]`].join(` `),jt=({project:e,stalled:t})=>{let n=Se(3e4),r=Pe(e.board.lanes,t);return(0,J.jsxs)(xe,{width:`full`,children:[(0,J.jsx)(be,{title:`Tasks`,counts:He(r)}),r.length===0?(0,J.jsx)(Me,{children:`No runs yet`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(kt,{totals:Be(r,n)}),(0,J.jsx)(`div`,{className:`@container -mx-2`,children:(0,J.jsxs)(Ae,{"aria-label":`${e.repository} tasks`,className:At,children:[(0,J.jsx)(Oe,{children:(0,J.jsxs)(R,{className:`hover:bg-transparent`,children:[(0,J.jsx)(L,{children:`Task`}),(0,J.jsx)(L,{children:`Status`}),(0,J.jsx)(L,{className:Z,children:`Runs`}),(0,J.jsx)(L,{className:m(`text-right`,Z),children:`Pull request`}),(0,J.jsx)(L,{className:`text-right`,children:`Elapsed time`}),(0,J.jsx)(L,{className:m(`text-right`,Q),children:`Tokens`}),(0,J.jsx)(L,{className:m(`text-right`,Q),children:`Estimated cost`})]})}),(0,J.jsx)(ke,{children:r.map(e=>(0,J.jsx)(Ot,{row:e,repository:e.task.repository,now:n},e.task.itemKey))})]})})]})]})},Mt=()=>{let{repository:e}=Te.useParams(),{data:t}=a(_e()),n=a(ye()),r=ve(t.projects,e);return r===void 0?(0,J.jsx)(Ke,{}):(0,J.jsx)(jt,{project:r,stalled:n.data.notMoving})};export{Mt as component};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{D as r}from"./useBaseQuery-Bq9mMy4d.js";import{t as i}from"./useSuspenseQuery-BRPaB8Gf.js";import{c as a,l as o,n as s}from"./api-DMBgrk17.js";import{t as c}from"./button-D4_M-wHl.js";import{t as l}from"./error-alert-C3tCznIk.js";import{f as u}from"./index-BPhLK23-.js";var d=e(t(),1),f=`Tokens`,p=`Revoke a token to end access from that browser or device.`,m=`No tokens`,h=`Revoke`,g=`Confirm revocation`,_=`Keep token`,v=`Last used`,y=`Created`,b=n(),x=()=>{let{data:e}=i(u()),t=r(),[n,x]=(0,d.useState)(),[S,C]=(0,d.useState)(!1),[w,T]=(0,d.useState)(),E=async e=>{C(!0),T(void 0);try{await o(`/api/tokens/${encodeURIComponent(e)}`,a,{method:`DELETE`}),x(void 0),await t.invalidateQueries(u())}catch(e){T(s(e))}finally{C(!1)}};return(0,b.jsxs)(`section`,{className:`space-y-6 p-4 md:p-5`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`h1`,{className:`text-xl font-semibold`,children:f}),(0,b.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:p})]}),w!==void 0&&(0,b.jsx)(l,{message:w}),e.length===0?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m}):(0,b.jsx)(`ul`,{className:`divide-y divide-border`,children:e.map(e=>(0,b.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 py-3`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`p`,{className:`text-sm font-medium`,children:e.name}),(0,b.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[y,` `,new Date(e.createdAt).toLocaleDateString(),` · `,v,` `,new Date(e.lastUsedAt).toLocaleString()]})]}),(0,b.jsx)(`div`,{className:`flex gap-2`,children:n===e.id?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{variant:`destructive`,disabled:S,onClick:()=>void E(e.id),children:g}),(0,b.jsx)(c,{variant:`ghost`,onClick:()=>x(void 0),children:_})]}):(0,b.jsx)(c,{variant:`ghost`,disabled:S,onClick:()=>x(e.id),children:h})})]},e.id))})]})};export{x as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{D as r}from"./useBaseQuery-Bq9mMy4d.js";import{t as i}from"./useSuspenseQuery-BRPaB8Gf.js";import{c as a,l as o,n as s}from"./api-DMBgrk17.js";import{t as c}from"./button-D4_M-wHl.js";import{t as l}from"./error-alert-C3tCznIk.js";import{f as u}from"./index-DSOKl9hZ.js";var d=e(t(),1),f=`Tokens`,p=`Revoke a token to end access from that browser or device.`,m=`No tokens`,h=`Revoke`,g=`Confirm revocation`,_=`Keep token`,v=`Last used`,y=`Created`,b=n(),x=()=>{let{data:e}=i(u()),t=r(),[n,x]=(0,d.useState)(),[S,C]=(0,d.useState)(!1),[w,T]=(0,d.useState)(),E=async e=>{C(!0),T(void 0);try{await o(`/api/tokens/${encodeURIComponent(e)}`,a,{method:`DELETE`}),x(void 0),await t.invalidateQueries(u())}catch(e){T(s(e))}finally{C(!1)}};return(0,b.jsxs)(`section`,{className:`space-y-6 p-4 md:p-5`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`h1`,{className:`text-xl font-semibold`,children:f}),(0,b.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:p})]}),w!==void 0&&(0,b.jsx)(l,{message:w}),e.length===0?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:m}):(0,b.jsx)(`ul`,{className:`divide-y divide-border`,children:e.map(e=>(0,b.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 py-3`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`p`,{className:`text-sm font-medium`,children:e.name}),(0,b.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[y,` `,new Date(e.createdAt).toLocaleDateString(),` · `,v,` `,new Date(e.lastUsedAt).toLocaleString()]})]}),(0,b.jsx)(`div`,{className:`flex gap-2`,children:n===e.id?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{variant:`destructive`,disabled:S,onClick:()=>void E(e.id),children:g}),(0,b.jsx)(c,{variant:`ghost`,onClick:()=>x(void 0),children:_})]}):(0,b.jsx)(c,{variant:`ghost`,disabled:S,onClick:()=>x(e.id),children:h})})]},e.id))})]})};export{x as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{f as t,h as n,y as r}from"./strings-Cgrt38_s.js";import{C as i,S as a,x as o}from"./index-BPhLK23-.js";var s=e(),c=new Intl.NumberFormat(`en`),l=({cost:e})=>e===null?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`font-mono text-foreground tabular-nums`,children:r(e.usd)}),e.estimate&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:` estimate`})]}),u=({session:e})=>e._tag===`ParentSession`?`Parent`:e.agent,d=`grid grid-cols-[minmax(0,1fr)_auto_7rem] items-baseline gap-x-3 py-0.5`,f=`grid grid-cols-[minmax(0,1fr)_auto_10rem] items-baseline gap-x-3 py-0.5`,p=e=>`unpriced`in e&&e.unpriced,m=({pools:e})=>{let n=e.some(e=>p(e)&&e.cost!==null);return(0,s.jsxs)(`section`,{"aria-label":`Tokens per pool`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per pool`}),e.map(e=>(0,s.jsxs)(`div`,{className:n?f:d,children:[(0,s.jsx)(`span`,{className:`truncate text-foreground`,children:t(e.pool)}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsxs)(`span`,{className:`text-right`,children:[p(e)&&e.cost!==null&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:`at least `}),(0,s.jsx)(l,{cost:e.cost})]})]},e.pool))]})},h=({usage:e,attempts:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{pools:e.pools}),(0,s.jsxs)(`section`,{"aria-label":`Tokens per session`,className:`border-t pt-2.5`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per session`}),t.map(t=>{let n=e.sessions.filter(({attemptId:e})=>e===t.id);return n.length===0?null:(0,s.jsxs)(`div`,{className:`pb-1`,children:[(0,s.jsxs)(`h3`,{className:`pt-1 text-muted-foreground`,children:[`Attempt `,t.number]}),n.map(e=>(0,s.jsxs)(`div`,{className:d,children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,s.jsx)(`span`,{className:`shrink-0 text-foreground`,children:u(e)}),(0,s.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e.session.brain.model})]}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsx)(`span`,{className:`text-right`,children:(0,s.jsx)(l,{cost:e.cost})})]},e.session.id))]},t.id)})]}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`Tokens are output and uncached input. Dollars are the price each harness reports, or for Codex, the OpenAI API price.`})]}),g=({usage:e,attempts:t})=>(0,s.jsxs)(o,{children:[(0,s.jsxs)(i,{"aria-label":`Tokens: ${c.format(e.tokens)}. Show per pool and session`,className:`rounded-sm text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`,children:[(0,s.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,children:n(e.tokens)}),` tokens`]}),(0,s.jsx)(a,{align:`start`,className:`w-[26rem] max-w-[calc(100vw-2rem)] gap-3 p-3 text-xs shadow-raised`,children:(0,s.jsx)(h,{usage:e,attempts:t})})]});export{g as n,m as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{f as t,h as n,y as r}from"./strings-Cgrt38_s.js";import{C as i,S as a,x as o}from"./index-DSOKl9hZ.js";var s=e(),c=new Intl.NumberFormat(`en`),l=({cost:e})=>e===null?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`font-mono text-foreground tabular-nums`,children:r(e.usd)}),e.estimate&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:` estimate`})]}),u=({session:e})=>e._tag===`ParentSession`?`Parent`:e.agent,d=`grid grid-cols-[minmax(0,1fr)_auto_7rem] items-baseline gap-x-3 py-0.5`,f=`grid grid-cols-[minmax(0,1fr)_auto_10rem] items-baseline gap-x-3 py-0.5`,p=e=>`unpriced`in e&&e.unpriced,m=({pools:e})=>{let n=e.some(e=>p(e)&&e.cost!==null);return(0,s.jsxs)(`section`,{"aria-label":`Tokens per pool`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per pool`}),e.map(e=>(0,s.jsxs)(`div`,{className:n?f:d,children:[(0,s.jsx)(`span`,{className:`truncate text-foreground`,children:t(e.pool)}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsxs)(`span`,{className:`text-right`,children:[p(e)&&e.cost!==null&&(0,s.jsx)(`span`,{className:`text-muted-foreground`,children:`at least `}),(0,s.jsx)(l,{cost:e.cost})]})]},e.pool))]})},h=({usage:e,attempts:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{pools:e.pools}),(0,s.jsxs)(`section`,{"aria-label":`Tokens per session`,className:`border-t pt-2.5`,children:[(0,s.jsx)(`h2`,{className:`pb-1 text-sm font-medium text-foreground`,children:`Tokens per session`}),t.map(t=>{let n=e.sessions.filter(({attemptId:e})=>e===t.id);return n.length===0?null:(0,s.jsxs)(`div`,{className:`pb-1`,children:[(0,s.jsxs)(`h3`,{className:`pt-1 text-muted-foreground`,children:[`Attempt `,t.number]}),n.map(e=>(0,s.jsxs)(`div`,{className:d,children:[(0,s.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,s.jsx)(`span`,{className:`shrink-0 text-foreground`,children:u(e)}),(0,s.jsx)(`span`,{className:`truncate font-mono text-muted-foreground`,children:e.session.brain.model})]}),(0,s.jsx)(`span`,{className:`text-right font-mono text-foreground tabular-nums`,children:c.format(e.tokens)}),(0,s.jsx)(`span`,{className:`text-right`,children:(0,s.jsx)(l,{cost:e.cost})})]},e.session.id))]},t.id)})]}),(0,s.jsx)(`p`,{className:`text-muted-foreground`,children:`Tokens are output and uncached input. Dollars are the price each harness reports, or for Codex, the OpenAI API price.`})]}),g=({usage:e,attempts:t})=>(0,s.jsxs)(o,{children:[(0,s.jsxs)(i,{"aria-label":`Tokens: ${c.format(e.tokens)}. Show per pool and session`,className:`rounded-sm text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`,children:[(0,s.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,children:n(e.tokens)}),` tokens`]}),(0,s.jsx)(a,{align:`start`,className:`w-[26rem] max-w-[calc(100vw-2rem)] gap-3 p-3 text-xs shadow-raised`,children:(0,s.jsx)(h,{usage:e,attempts:t})})]});export{g as n,m as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{D as t,J as n,O as r,d as i,l as a,q as o,t as s}from"./section-D0pZ24Q9.js";import{t as c}from"./useSuspenseQuery-BRPaB8Gf.js";import{n as l}from"./useNavigate-I5E4IRt2.js";import{t as u}from"./link-04lHwIZK.js";import{a as d}from"./strings-Cgrt38_s.js";import{R as f,V as p}from"./overview-CyrdJxvZ.js";import{n as m}from"./queries-TKKPRagF.js";import{D as h}from"./index-BPhLK23-.js";import{r as g}from"./status-badge-CYV7BO8y.js";import{a as _,i as v,n as y,o as b,r as x,t as S}from"./table-kSUccuLf.js";import{t as C}from"./fill-cell-C7QNSxol.js";import{t as w}from"./slots-BYLP8TNt.js";var T=e(),E={passed:{state:`Succeeded`,label:`Passed`},degraded:{state:`Waiting`,label:`Degraded`},deferred:{state:`Deferred`,label:`Deferred`},failed:{state:`Failed`,label:`Failed`}},D=({worker:e})=>{let{state:t,checkedAt:n}=r(e);return t===`unchecked`?(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`Not checked`}):(0,T.jsxs)(`span`,{className:`inline-flex flex-wrap items-baseline gap-x-2`,children:[(0,T.jsx)(g,{...E[t]}),n!==null&&(0,T.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular-nums`,children:d(n)})]})},O=({worker:e})=>{let t=h(15e3),r=l(),s={worker:e.name};return(0,T.jsxs)(a,{open:()=>void r({to:`/configuration/workers/$worker`,params:s}),children:[(0,T.jsx)(x,{className:`py-3`,children:(0,T.jsx)(u,{to:`/configuration/workers/$worker`,params:s,onClick:e=>e.stopPropagation(),className:i,children:e.name})}),(0,T.jsx)(x,{children:o[e.kind]}),(0,T.jsx)(x,{className:`hidden font-mono text-xs @2xl:table-cell`,children:n(e)}),(0,T.jsx)(x,{className:`tabular-nums`,children:e.slots===null?(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.maxConcurrentAttempts,` max`]}):(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,T.jsx)(w,{slots:e.slots}),(0,T.jsxs)(`span`,{className:`max-sm:sr-only`,children:[e.slots.leased,` of `,e.slots.capacity]})]})}),(0,T.jsxs)(C,{className:`whitespace-normal`,children:[(0,T.jsx)(D,{worker:e}),e.provisioning?.blocked===!0&&(0,T.jsxs)(`p`,{className:`text-xs text-destructive tabular-nums`,title:e.provisioning.message,children:[f(e.provisioning),`.`,` `,p(e.provisioning,t)]})]})]})},k=({configuration:e})=>{let n=e.workers.some(({slots:e})=>e!==null);return(0,T.jsxs)(s,{title:`Workers`,createKind:`worker`,counts:t(e.workers.length,`worker`),children:[!n&&(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempts run until the GitHub App is set up.`}),(0,T.jsx)(`div`,{className:`@container -mx-2`,children:(0,T.jsxs)(S,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(b,{className:`hover:bg-transparent`,children:[(0,T.jsx)(v,{children:`Worker`}),(0,T.jsx)(v,{children:`Kind`}),(0,T.jsx)(v,{className:`hidden @2xl:table-cell`,children:`Location`}),(0,T.jsx)(v,{children:`Slots in use`}),(0,T.jsx)(v,{children:`Last preflight`})]})}),(0,T.jsx)(y,{children:e.workers.map(e=>(0,T.jsx)(O,{worker:e},e.name))})]})}),e.removedWorkers.length>0&&(0,T.jsx)(`ul`,{className:`flex flex-col gap-1 text-muted-foreground`,children:e.removedWorkers.map(({name:e,running:n})=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e}),` removed by a reload,`,` `,t(n,`attempt`),` still running`]},e))})]})},A=()=>{let{data:e}=c(m());return(0,T.jsx)(k,{configuration:e})};export{A as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{D as t,J as n,O as r,d as i,l as a,q as o,t as s}from"./section-B9rSL8Bj.js";import{t as c}from"./useSuspenseQuery-BRPaB8Gf.js";import{n as l}from"./useNavigate-I5E4IRt2.js";import{t as u}from"./link-04lHwIZK.js";import{a as d}from"./strings-Cgrt38_s.js";import{R as f,V as p}from"./overview-CyrdJxvZ.js";import{n as m}from"./queries-TKKPRagF.js";import{D as h}from"./index-DSOKl9hZ.js";import{r as g}from"./status-badge-CYV7BO8y.js";import{a as _,i as v,n as y,o as b,r as x,t as S}from"./table-kSUccuLf.js";import{t as C}from"./fill-cell-C7QNSxol.js";import{t as w}from"./slots-BYLP8TNt.js";var T=e(),E={passed:{state:`Succeeded`,label:`Passed`},degraded:{state:`Waiting`,label:`Degraded`},deferred:{state:`Deferred`,label:`Deferred`},failed:{state:`Failed`,label:`Failed`}},D=({worker:e})=>{let{state:t,checkedAt:n}=r(e);return t===`unchecked`?(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`Not checked`}):(0,T.jsxs)(`span`,{className:`inline-flex flex-wrap items-baseline gap-x-2`,children:[(0,T.jsx)(g,{...E[t]}),n!==null&&(0,T.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular-nums`,children:d(n)})]})},O=({worker:e})=>{let t=h(15e3),r=l(),s={worker:e.name};return(0,T.jsxs)(a,{open:()=>void r({to:`/configuration/workers/$worker`,params:s}),children:[(0,T.jsx)(x,{className:`py-3`,children:(0,T.jsx)(u,{to:`/configuration/workers/$worker`,params:s,onClick:e=>e.stopPropagation(),className:i,children:e.name})}),(0,T.jsx)(x,{children:o[e.kind]}),(0,T.jsx)(x,{className:`hidden font-mono text-xs @2xl:table-cell`,children:n(e)}),(0,T.jsx)(x,{className:`tabular-nums`,children:e.slots===null?(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.maxConcurrentAttempts,` max`]}):(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,T.jsx)(w,{slots:e.slots}),(0,T.jsxs)(`span`,{className:`max-sm:sr-only`,children:[e.slots.leased,` of `,e.slots.capacity]})]})}),(0,T.jsxs)(C,{className:`whitespace-normal`,children:[(0,T.jsx)(D,{worker:e}),e.provisioning?.blocked===!0&&(0,T.jsxs)(`p`,{className:`text-xs text-destructive tabular-nums`,title:e.provisioning.message,children:[f(e.provisioning),`.`,` `,p(e.provisioning,t)]})]})]})},k=({configuration:e})=>{let n=e.workers.some(({slots:e})=>e!==null);return(0,T.jsxs)(s,{title:`Workers`,createKind:`worker`,counts:t(e.workers.length,`worker`),children:[!n&&(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempts run until the GitHub App is set up.`}),(0,T.jsx)(`div`,{className:`@container -mx-2`,children:(0,T.jsxs)(S,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(b,{className:`hover:bg-transparent`,children:[(0,T.jsx)(v,{children:`Worker`}),(0,T.jsx)(v,{children:`Kind`}),(0,T.jsx)(v,{className:`hidden @2xl:table-cell`,children:`Location`}),(0,T.jsx)(v,{children:`Slots in use`}),(0,T.jsx)(v,{children:`Last preflight`})]})}),(0,T.jsx)(y,{children:e.workers.map(e=>(0,T.jsx)(O,{worker:e},e.name))})]})}),e.removedWorkers.length>0&&(0,T.jsx)(`ul`,{className:`flex flex-col gap-1 text-muted-foreground`,children:e.removedWorkers.map(({name:e,running:n})=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs text-foreground`,children:e}),` removed by a reload,`,` `,t(n,`attempt`),` still running`]},e))})]})},A=()=>{let{data:e}=c(m());return(0,T.jsx)(k,{configuration:e})};export{A as component};
@@ -6,7 +6,7 @@
6
6
  <meta name="theme-color" content="#181825" />
7
7
  <link rel="icon" type="image/svg+xml" href="/assets/favicon-B8fCbbfp.svg" />
8
8
  <title>usine</title>
9
- <script type="module" crossorigin src="/assets/index-BPhLK23-.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-DSOKl9hZ.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-Wy9s6hX0.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/useBaseQuery-Bq9mMy4d.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/queryOptions-Dfvzj6n2.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/server",
3
- "version": "0.4.1-next.291.g2bf4be2",
3
+ "version": "0.4.1-next.293.gde8dcb8",
4
4
  "description": "The usine orchestrator as a headless server: a thin CLI over @usine/orchestrator that serves the web UI.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -23,21 +23,21 @@
23
23
  "@effect/platform-node": "4.0.6",
24
24
  "@effect/platform-node-shared": "4.0.6",
25
25
  "effect": "4.0.6",
26
- "@usine/core": "0.5.1-next.291.g2bf4be2",
27
- "@usine/config": "0.4.1-next.291.g2bf4be2",
28
- "@usine/durable": "0.2.1-next.291.g2bf4be2",
29
- "@usine/engine": "0.5.1-next.291.g2bf4be2",
30
- "@usine/expression": "0.4.1-next.291.g2bf4be2",
31
- "@usine/github": "0.3.1-next.291.g2bf4be2",
32
- "@usine/orchestrator": "0.4.1-next.291.g2bf4be2"
26
+ "@usine/core": "0.5.1-next.293.gde8dcb8",
27
+ "@usine/config": "0.4.1-next.293.gde8dcb8",
28
+ "@usine/durable": "0.2.1-next.293.gde8dcb8",
29
+ "@usine/engine": "0.5.1-next.293.gde8dcb8",
30
+ "@usine/expression": "0.4.1-next.293.gde8dcb8",
31
+ "@usine/github": "0.3.1-next.293.gde8dcb8",
32
+ "@usine/orchestrator": "0.4.1-next.293.gde8dcb8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "7.0.2",
36
36
  "vitest": "5.0.5",
37
37
  "yaml": "2.9.1",
38
- "@usine/executor": "0.4.1-next.291.g2bf4be2",
39
- "@usine/web": "0.0.0",
40
- "@usine/tsconfig": "0.0.0"
38
+ "@usine/tsconfig": "0.0.0",
39
+ "@usine/executor": "0.4.1-next.293.gde8dcb8",
40
+ "@usine/web": "0.0.0"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=22"
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{Y as t,t as n}from"./section-D0pZ24Q9.js";import{u as r}from"./index-BPhLK23-.js";var i=e(),a=()=>{let{label:e}=r.useParams();return(0,i.jsx)(n,{title:e,entity:t(`label`,e),children:null})};export{a as component};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{Y as t,t as n}from"./section-D0pZ24Q9.js";import{c as r}from"./index-BPhLK23-.js";var i=e(),a=()=>{let{project:e}=r.useParams();return(0,i.jsx)(n,{title:e,entity:t(`project`,e),children:null})};export{a as component};
@@ -1 +0,0 @@
1
- import{g as e}from"./index-BPhLK23-.js";var t=e;export{t as component};
@@ -1 +0,0 @@
1
- import{_ as e}from"./index-BPhLK23-.js";var t=e;export{t as errorComponent};