@usine/server 0.4.1-next.289.g7247fc9 → 0.4.1-next.291.g2bf4be2

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 (69) hide show
  1. package/dist/web/assets/{_agent-CqBNvd4M.js → _agent-Bhd0HrYb.js} +1 -1
  2. package/dist/web/assets/_label-DAUm1_LF.js +1 -0
  3. package/dist/web/assets/{_loop-0TdZGSiW.js → _loop-CtUiE6FL.js} +1 -1
  4. package/dist/web/assets/_name-BwBQjvjI.js +1 -0
  5. package/dist/web/assets/_name-C6VkudVs.js +1 -0
  6. package/dist/web/assets/_name-CXbew0J1.js +2 -0
  7. package/dist/web/assets/{_name-CnhNGg6p.js → _name-CZL0wkxq.js} +1 -1
  8. package/dist/web/assets/_number-BwBQjvjI.js +1 -0
  9. package/dist/web/assets/{_number-CFaB3pUF.js → _number-By4h1S_S.js} +1 -1
  10. package/dist/web/assets/{_number-D7FWcmAc.js → _number-Dr2R11XM.js} +1 -1
  11. package/dist/web/assets/_project-DNs8Oq14.js +1 -0
  12. package/dist/web/assets/_run-BEVm7k9V.js +5 -0
  13. package/dist/web/assets/_run-BwBQjvjI.js +1 -0
  14. package/dist/web/assets/{_worker-E7dj7o6Q.js → _worker-D_1Qa8KI.js} +1 -1
  15. package/dist/web/assets/{agents-BGQFRPZN.js → agents-B88JG2q0.js} +1 -1
  16. package/dist/web/assets/{agents-Bx89QUtR.js → agents-DmMTEEce.js} +1 -1
  17. package/dist/web/assets/boot-screen-BS1pSJCP.js +1 -0
  18. package/dist/web/assets/{drawer-Dcan4kzj.js → drawer-yjp9B9Ed.js} +1 -1
  19. package/dist/web/assets/favicon-B8fCbbfp.svg +13 -0
  20. package/dist/web/assets/{history-BljS5wHp.js → history-Z63_hw3L.js} +1 -1
  21. package/dist/web/assets/index-BHydEFMr.css +2 -0
  22. package/dist/web/assets/index-BPhLK23-.js +10 -0
  23. package/dist/web/assets/{label-badge-CKvu7sce.js → label-badge-N-5KY9g6.js} +1 -1
  24. package/dist/web/assets/{labels-BRXNrqoV.js → labels-DwcmI5hF.js} +1 -1
  25. package/dist/web/assets/{list-CkmR7rgl.js → list-DeCG0M1M.js} +1 -1
  26. package/dist/web/assets/{loops-m2X3i10A.js → loops-CO67AN6J.js} +1 -1
  27. package/dist/web/assets/{members-B6aYmOCQ.js → members-D6eY25k6.js} +1 -1
  28. package/dist/web/assets/not-found-TW_8OQxg.js +1 -0
  29. package/dist/web/assets/outcome-5sHQcdFl.js +5 -0
  30. package/dist/web/assets/project-not-found-CZLTPMV2.js +1 -0
  31. package/dist/web/assets/{repositories-C8u24ntT.js → repositories-DOa9jauq.js} +1 -1
  32. package/dist/web/assets/route-Dw2CrkLW.js +1 -0
  33. package/dist/web/assets/route-status-C_1qpdyX.js +1 -0
  34. package/dist/web/assets/route-ytl33NeP.js +1 -0
  35. package/dist/web/assets/routes-B5Lyezif.js +65 -0
  36. package/dist/web/assets/routes-BwBQjvjI.js +1 -0
  37. package/dist/web/assets/{section-_7wo1fd_.js → section-D0pZ24Q9.js} +1 -1
  38. package/dist/web/assets/{settings-DIBJam3v.js → settings-S8Duih5O.js} +1 -1
  39. package/dist/web/assets/{sign-in-DX1r1jO-.js → sign-in-DjL5kSOj.js} +1 -1
  40. package/dist/web/assets/status-badge-CYV7BO8y.js +1 -0
  41. package/dist/web/assets/{tasks-BAoWjMGZ.js → tasks-BVCobs32.js} +1 -1
  42. package/dist/web/assets/tasks-BwBQjvjI.js +1 -0
  43. package/dist/web/assets/{tokens-BnGN2MGy.js → tokens-C6JfL-2h.js} +1 -1
  44. package/dist/web/assets/{usage-oPJwjPZ4.js → usage-DL_2QgAQ.js} +1 -1
  45. package/dist/web/assets/usine-mark-p0IVPpwW.js +1 -0
  46. package/dist/web/assets/{workers-Dpji-bMX.js → workers-COw6mVNF.js} +1 -1
  47. package/dist/web/index.html +7 -5
  48. package/package.json +9 -9
  49. package/dist/web/assets/_label-B7-DPFtb.js +0 -1
  50. package/dist/web/assets/_name-BYk_VNWT.js +0 -2
  51. package/dist/web/assets/_name-CP-dKX5M.js +0 -1
  52. package/dist/web/assets/_name-llUPSusw.js +0 -1
  53. package/dist/web/assets/_number-CP-dKX5M.js +0 -1
  54. package/dist/web/assets/_project-CMDFgNO5.js +0 -1
  55. package/dist/web/assets/_run-CP-dKX5M.js +0 -1
  56. package/dist/web/assets/_run-DKOSeYPm.js +0 -5
  57. package/dist/web/assets/boot-screen-TxK12v5T.js +0 -1
  58. package/dist/web/assets/index-8CK1-Hto.css +0 -2
  59. package/dist/web/assets/index-BrAROw92.js +0 -10
  60. package/dist/web/assets/not-found-C90UbMCB.js +0 -1
  61. package/dist/web/assets/outcome-cdTDawRg.js +0 -5
  62. package/dist/web/assets/project-not-found-CltXUnUa.js +0 -1
  63. package/dist/web/assets/route-CHvdUE3d.js +0 -1
  64. package/dist/web/assets/route-D83A8Fls.js +0 -1
  65. package/dist/web/assets/route-status-DNiWpfei.js +0 -1
  66. package/dist/web/assets/routes-2cVdAP3l.js +0 -65
  67. package/dist/web/assets/routes-CP-dKX5M.js +0 -1
  68. package/dist/web/assets/status-badge-C7yFD5bT.js +0 -1
  69. package/dist/web/assets/tasks-CP-dKX5M.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,D as n,S as r,Y as i,a,b as o,i as s,k as c,n as l,q as u,r as d,s as f,t as p,u as m,y as h}from"./section-_7wo1fd_.js";import{t as g}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as _}from"./link-04lHwIZK.js";import{a as v,m as y,s as b}from"./strings-Cgrt38_s.js";import{H as x,R as S,V as C,z as w}from"./overview-CyrdJxvZ.js";import{n as T}from"./queries-TKKPRagF.js";import{D as E,s as D}from"./index-BrAROw92.js";import{r as O}from"./status-badge-C7yFD5bT.js";import{a as k,i as A,n as j,o as M,r as N,t as P}from"./table-kSUccuLf.js";import{t as F}from"./fill-cell-C7QNSxol.js";import{t as I}from"./slots-BYLP8TNt.js";var L=e(),R=({check:e})=>{switch(e._tag){case`Passed`:return(0,L.jsx)(O,{state:`Succeeded`,label:`Passed`});case`Degraded`:return(0,L.jsx)(O,{state:`Waiting`,label:`Degraded: no container per attempt`});case`Deferred`:return(0,L.jsx)(O,{state:`Deferred`,label:`Deferred`});case`Failed`:return(0,L.jsx)(O,{state:`Failed`,label:`Failed: ${r(e)}`})}},z=({subject:e,detail:t,check:n})=>{let r=n._tag===`Passed`?null:n.message,i=v(n.checkedAt);return(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsxs)(N,{className:`py-3 align-top whitespace-normal @2xl:min-w-56`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:e}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}),r!==null&&(0,L.jsx)(`p`,{className:`mt-1 wrap-anywhere @2xl:hidden`,children:r})]}),(0,L.jsxs)(N,{className:`py-3 align-top`,children:[(0,L.jsx)(R,{check:n}),(0,L.jsx)(`p`,{className:`mt-1 font-mono text-xs text-muted-foreground tabular-nums @2xl:hidden`,children:i})]}),(0,L.jsx)(N,{className:`hidden py-3 align-top font-mono text-xs text-muted-foreground tabular-nums @2xl:table-cell`,children:i}),(0,L.jsx)(F,{className:`hidden py-3 align-top whitespace-normal wrap-anywhere @2xl:table-cell`,children:r})]})},B=({pause:e,now:t})=>(0,L.jsxs)(`div`,{className:`rounded-lg border border-destructive/25 bg-destructive/8 px-3 pt-2 pb-2.5 text-sm`,children:[(0,L.jsx)(`p`,{className:`font-medium text-destructive`,children:S(e)}),(0,L.jsx)(`p`,{className:`wrap-anywhere`,children:e.message}),(0,L.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground tabular-nums`,children:[w(e,t),`. `,C(e,t)]})]}),V=({machine:e})=>{let{runId:t,attemptId:n}=e;return t===null?n===null?(0,L.jsx)(m,{children:`Found after a restart`}):(0,L.jsxs)(`span`,{children:[`Attempt `,(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:n.slice(0,8)}),(0,L.jsx)(m,{children:`, found after a restart`})]}):(0,L.jsxs)(_,{to:`.`,search:e=>({...e,run:t}),className:`text-primary hover:underline`,children:[`Run `,(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:t.slice(0,8)})]})},H={creating:{state:`Queued`,label:`Creating`},ready:{state:`live`,label:`Ready`},deleting:{state:`Canceled`,label:`Deleting`}},U=({worker:e})=>{let t=E(15e3);return(0,L.jsxs)(d,{title:`Machines`,aside:`Created for each attempt and deleted afterwards`,children:[e.provisioning!==null&&(0,L.jsx)(B,{pause:e.provisioning,now:t}),e.machines.length===0?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No machines`}):(0,L.jsx)(`div`,{className:`-mx-2`,children:(0,L.jsxs)(P,{children:[(0,L.jsx)(k,{children:(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsx)(A,{className:`max-sm:w-full`,children:`Machine`}),(0,L.jsx)(A,{children:`State`}),(0,L.jsx)(A,{className:`text-right`,children:`Age`}),(0,L.jsx)(A,{className:`max-sm:hidden`,children:`For`})]})}),(0,L.jsx)(j,{children:e.machines.map((e,n)=>(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsxs)(N,{className:`whitespace-normal max-sm:w-full max-sm:align-top`,children:[e.id===null?(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`No ID yet`}):(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:e.id}),(0,L.jsx)(`span`,{className:`mt-0.5 block text-xs sm:hidden`,children:(0,L.jsx)(V,{machine:e})})]}),(0,L.jsx)(N,{className:`max-sm:align-top`,children:(0,L.jsx)(O,{...H[e.state]})}),(0,L.jsx)(N,{className:`text-right font-mono text-xs text-muted-foreground tabular-nums max-sm:align-top`,title:`Since ${y(e.since)}`,children:b(e.since,t)}),(0,L.jsx)(F,{className:`whitespace-normal max-sm:hidden`,children:(0,L.jsx)(V,{machine:e})})]},e.id??`${e.since}:${n}`))})]})})]})},W=({container:e,applied:t})=>{let{configured:n,derived:r}=h(e),i=t===null?n:o(t);return(0,L.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[i!==null&&(0,L.jsx)(`span`,{className:`tabular-nums`,children:i}),r!==null&&(0,L.jsx)(m,{children:`${t===null?`Derived from the machine at preflight`:`Derived from the machine at the last preflight`}: ${r}`})]})},G=({name:e})=>e===null?(0,L.jsx)(m,{children:`Not set`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m,{children:`Read from `}),(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e})]}),K=({provisioner:e})=>(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Provisioner`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Provider`,children:x[e._tag]}),e._tag===`hetzner`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(s,{label:`Server type`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.serverType})}),(0,L.jsx)(s,{label:`Location`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.location})}),(0,L.jsx)(s,{label:`Image`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.image})}),(0,L.jsx)(s,{label:`Network`,children:e.network===null?(0,L.jsx)(m,{children:`None; each server has a public address`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.network})}),(0,L.jsx)(s,{label:`Firewall`,children:e.firewall===null?(0,L.jsx)(m,{children:`None`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.firewall})}),(0,L.jsx)(s,{label:`SSH key`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.sshKey})}),(0,L.jsx)(s,{label:`SSH user`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.sshUser})}),Object.keys(e.labels).length>0&&(0,L.jsx)(s,{label:`Labels`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)})})]}):(0,L.jsx)(s,{label:`Size`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.size})}),(0,L.jsx)(s,{label:`API token`,children:(0,L.jsx)(G,{name:e.tokenEnv})}),(0,L.jsx)(s,{label:`Anthropic key`,children:(0,L.jsx)(G,{name:e.anthropicKeyEnv})}),(0,L.jsx)(s,{label:`OpenAI key`,children:(0,L.jsx)(G,{name:e.openaiKeyEnv})})]})]}),q=({worker:e})=>(0,L.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Kind`,children:u[e.kind]}),(0,L.jsxs)(s,{label:`Max attempts`,children:[(0,L.jsx)(`span`,{className:`tabular-nums`,children:e.maxConcurrentAttempts}),` `,(0,L.jsx)(m,{children:e.provisioner===null?`at the same time`:`at the same time, one machine each`})]}),e.destination!==null&&(0,L.jsx)(s,{label:`Destination`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.destination})}),e.kind===`ssh`&&e.provisioner===null&&(0,L.jsx)(s,{label:`Port`,children:e.port===null?(0,L.jsx)(m,{children:`From the SSH configuration`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.port})}),e.kind===`ssh`&&(0,L.jsx)(s,{label:`Identity file`,children:e.identityFile===null?(0,L.jsx)(m,{children:`From the SSH configuration`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.identityFile})}),e.root!==null&&(0,L.jsx)(s,{label:`Root`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.root})})]}),e.provisioner!==null&&(0,L.jsx)(K,{provisioner:e.provisioner}),e.container!==null&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Attempt container`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Image`,children:e.container.image===null?(0,L.jsx)(m,{children:`Default for this release`}):(0,L.jsx)(`code`,{className:`font-mono text-xs wrap-anywhere`,children:e.container.image})}),(0,L.jsx)(s,{label:`Limits`,children:(0,L.jsx)(W,{container:e.container,applied:e.containerLimits})})]})]}),e.gateway!==null&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Gateway`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Domain`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.domain})}),(0,L.jsx)(s,{label:`Destination`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.destination})}),(0,L.jsx)(s,{label:`Admin port`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.adminPort})}),(0,L.jsxs)(s,{label:`Admin token`,children:[(0,L.jsx)(m,{children:`Read from `}),(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.adminTokenEnv})]}),(0,L.jsx)(s,{label:`LLM credentials`,children:e.gateway.llmProviders.length===0?(0,L.jsx)(m,{children:`None; each harness uses the login on the worker`}):e.gateway.llmProviders.join(`, `)})]})]})]}),J=({capacity:e,leased:t})=>`${t} of ${n(e,`slot`)} in use`,Y=({name:e,configuration:n})=>{let r=n.workers.find(t=>t.name===e);if(r===void 0)return(0,L.jsx)(p,{entity:i(`worker`,e),title:e,children:(0,L.jsxs)(f,{title:`Worker not found`,children:[(0,L.jsx)(`code`,{children:`usine.yaml`}),` has no worker `,e,`.`,` `,(0,L.jsx)(_,{to:`/configuration/workers`,className:`text-primary hover:underline`,children:`See all workers`}),`.`]})});let a=[...r.prerequisites===null?[]:[{subject:`Worker`,detail:r.provisioner===null?r.kind===`ssh`?`Machine, Git, memory, gateway, credentials, and Docker`:`Machine, Git, memory, gateway, and credentials`:`Provider, gateway, and credentials`,check:r.prerequisites}],...r.harnesses.map(({harness:e,check:n})=>({subject:t[e],detail:`Harness installed and logged in`,check:n}))];return(0,L.jsx)(p,{entity:i(`worker`,e),title:r.name,marks:(0,L.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[u[r.kind],` worker`]}),children:(0,L.jsxs)(l,{facts:(0,L.jsx)(q,{worker:r}),children:[(0,L.jsx)(d,{title:`Slots`,children:r.slots===null?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempts run until the GitHub App is set up.`}):(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,L.jsx)(I,{slots:r.slots}),(0,L.jsx)(`p`,{className:`tabular-nums`,children:J(r.slots)})]})}),r.provisioner!==null&&(0,L.jsx)(U,{worker:r}),(0,L.jsxs)(d,{title:`Preflight`,aside:c,children:[r.provisioner!==null&&(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Harness checks run on the first machine, then on the next machine created after the configured interval since the last successful check.`}),a.length===0?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No preflight since usine up started.`}):(0,L.jsx)(`div`,{className:`@container -mx-2`,children:(0,L.jsxs)(P,{children:[(0,L.jsx)(k,{children:(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsx)(A,{children:`Check`}),(0,L.jsx)(A,{children:`Result`}),(0,L.jsx)(A,{className:`hidden @2xl:table-cell`,children:`Checked`}),(0,L.jsx)(A,{className:`hidden @2xl:table-cell`,children:`Detail`})]})}),(0,L.jsx)(j,{children:a.map(({subject:e,detail:t,check:n})=>(0,L.jsx)(z,{subject:e,detail:t,check:n},e))})]})})]})]})})},X=()=>{let{worker:e}=D.useParams(),{data:t}=g(T());return(0,L.jsx)(Y,{name:e,configuration:t})};export{X as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,D as n,S as r,Y as i,a,b as o,i as s,k as c,n as l,q as u,r as d,s as f,t as p,u as m,y as h}from"./section-D0pZ24Q9.js";import{t as g}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as _}from"./link-04lHwIZK.js";import{a as v,m as y,s as b}from"./strings-Cgrt38_s.js";import{H as x,R as S,V as C,z as w}from"./overview-CyrdJxvZ.js";import{n as T}from"./queries-TKKPRagF.js";import{D as E,s as D}from"./index-BPhLK23-.js";import{r as O}from"./status-badge-CYV7BO8y.js";import{a as k,i as A,n as j,o as M,r as N,t as P}from"./table-kSUccuLf.js";import{t as F}from"./fill-cell-C7QNSxol.js";import{t as I}from"./slots-BYLP8TNt.js";var L=e(),R=({check:e})=>{switch(e._tag){case`Passed`:return(0,L.jsx)(O,{state:`Succeeded`,label:`Passed`});case`Degraded`:return(0,L.jsx)(O,{state:`Waiting`,label:`Degraded: no container per attempt`});case`Deferred`:return(0,L.jsx)(O,{state:`Deferred`,label:`Deferred`});case`Failed`:return(0,L.jsx)(O,{state:`Failed`,label:`Failed: ${r(e)}`})}},z=({subject:e,detail:t,check:n})=>{let r=n._tag===`Passed`?null:n.message,i=v(n.checkedAt);return(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsxs)(N,{className:`py-3 align-top whitespace-normal @2xl:min-w-56`,children:[(0,L.jsx)(`p`,{className:`font-medium`,children:e}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}),r!==null&&(0,L.jsx)(`p`,{className:`mt-1 wrap-anywhere @2xl:hidden`,children:r})]}),(0,L.jsxs)(N,{className:`py-3 align-top`,children:[(0,L.jsx)(R,{check:n}),(0,L.jsx)(`p`,{className:`mt-1 font-mono text-xs text-muted-foreground tabular-nums @2xl:hidden`,children:i})]}),(0,L.jsx)(N,{className:`hidden py-3 align-top font-mono text-xs text-muted-foreground tabular-nums @2xl:table-cell`,children:i}),(0,L.jsx)(F,{className:`hidden py-3 align-top whitespace-normal wrap-anywhere @2xl:table-cell`,children:r})]})},B=({pause:e,now:t})=>(0,L.jsxs)(`div`,{className:`rounded-lg border border-destructive/25 bg-destructive/8 px-3 pt-2 pb-2.5 text-sm`,children:[(0,L.jsx)(`p`,{className:`font-medium text-destructive`,children:S(e)}),(0,L.jsx)(`p`,{className:`wrap-anywhere`,children:e.message}),(0,L.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground tabular-nums`,children:[w(e,t),`. `,C(e,t)]})]}),V=({machine:e})=>{let{runId:t,attemptId:n}=e;return t===null?n===null?(0,L.jsx)(m,{children:`Found after a restart`}):(0,L.jsxs)(`span`,{children:[`Attempt `,(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:n.slice(0,8)}),(0,L.jsx)(m,{children:`, found after a restart`})]}):(0,L.jsxs)(_,{to:`.`,search:e=>({...e,run:t}),className:`text-primary hover:underline`,children:[`Run `,(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:t.slice(0,8)})]})},H={creating:{state:`Queued`,label:`Creating`},ready:{state:`live`,label:`Ready`},deleting:{state:`Canceled`,label:`Deleting`}},U=({worker:e})=>{let t=E(15e3);return(0,L.jsxs)(d,{title:`Machines`,aside:`Created for each attempt and deleted afterwards`,children:[e.provisioning!==null&&(0,L.jsx)(B,{pause:e.provisioning,now:t}),e.machines.length===0?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No machines`}):(0,L.jsx)(`div`,{className:`-mx-2`,children:(0,L.jsxs)(P,{children:[(0,L.jsx)(k,{children:(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsx)(A,{className:`max-sm:w-full`,children:`Machine`}),(0,L.jsx)(A,{children:`State`}),(0,L.jsx)(A,{className:`text-right`,children:`Age`}),(0,L.jsx)(A,{className:`max-sm:hidden`,children:`For`})]})}),(0,L.jsx)(j,{children:e.machines.map((e,n)=>(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsxs)(N,{className:`whitespace-normal max-sm:w-full max-sm:align-top`,children:[e.id===null?(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`No ID yet`}):(0,L.jsx)(`span`,{className:`font-mono text-xs`,children:e.id}),(0,L.jsx)(`span`,{className:`mt-0.5 block text-xs sm:hidden`,children:(0,L.jsx)(V,{machine:e})})]}),(0,L.jsx)(N,{className:`max-sm:align-top`,children:(0,L.jsx)(O,{...H[e.state]})}),(0,L.jsx)(N,{className:`text-right font-mono text-xs text-muted-foreground tabular-nums max-sm:align-top`,title:`Since ${y(e.since)}`,children:b(e.since,t)}),(0,L.jsx)(F,{className:`whitespace-normal max-sm:hidden`,children:(0,L.jsx)(V,{machine:e})})]},e.id??`${e.since}:${n}`))})]})})]})},W=({container:e,applied:t})=>{let{configured:n,derived:r}=h(e),i=t===null?n:o(t);return(0,L.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[i!==null&&(0,L.jsx)(`span`,{className:`tabular-nums`,children:i}),r!==null&&(0,L.jsx)(m,{children:`${t===null?`Derived from the machine at preflight`:`Derived from the machine at the last preflight`}: ${r}`})]})},G=({name:e})=>e===null?(0,L.jsx)(m,{children:`Not set`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m,{children:`Read from `}),(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e})]}),K=({provisioner:e})=>(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Provisioner`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Provider`,children:x[e._tag]}),e._tag===`hetzner`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(s,{label:`Server type`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.serverType})}),(0,L.jsx)(s,{label:`Location`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.location})}),(0,L.jsx)(s,{label:`Image`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.image})}),(0,L.jsx)(s,{label:`Network`,children:e.network===null?(0,L.jsx)(m,{children:`None; each server has a public address`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.network})}),(0,L.jsx)(s,{label:`Firewall`,children:e.firewall===null?(0,L.jsx)(m,{children:`None`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.firewall})}),(0,L.jsx)(s,{label:`SSH key`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.sshKey})}),(0,L.jsx)(s,{label:`SSH user`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.sshUser})}),Object.keys(e.labels).length>0&&(0,L.jsx)(s,{label:`Labels`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)})})]}):(0,L.jsx)(s,{label:`Size`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.size})}),(0,L.jsx)(s,{label:`API token`,children:(0,L.jsx)(G,{name:e.tokenEnv})}),(0,L.jsx)(s,{label:`Anthropic key`,children:(0,L.jsx)(G,{name:e.anthropicKeyEnv})}),(0,L.jsx)(s,{label:`OpenAI key`,children:(0,L.jsx)(G,{name:e.openaiKeyEnv})})]})]}),q=({worker:e})=>(0,L.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Kind`,children:u[e.kind]}),(0,L.jsxs)(s,{label:`Max attempts`,children:[(0,L.jsx)(`span`,{className:`tabular-nums`,children:e.maxConcurrentAttempts}),` `,(0,L.jsx)(m,{children:e.provisioner===null?`at the same time`:`at the same time, one machine each`})]}),e.destination!==null&&(0,L.jsx)(s,{label:`Destination`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.destination})}),e.kind===`ssh`&&e.provisioner===null&&(0,L.jsx)(s,{label:`Port`,children:e.port===null?(0,L.jsx)(m,{children:`From the SSH configuration`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.port})}),e.kind===`ssh`&&(0,L.jsx)(s,{label:`Identity file`,children:e.identityFile===null?(0,L.jsx)(m,{children:`From the SSH configuration`}):(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.identityFile})}),e.root!==null&&(0,L.jsx)(s,{label:`Root`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.root})})]}),e.provisioner!==null&&(0,L.jsx)(K,{provisioner:e.provisioner}),e.container!==null&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Attempt container`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Image`,children:e.container.image===null?(0,L.jsx)(m,{children:`Default for this release`}):(0,L.jsx)(`code`,{className:`font-mono text-xs wrap-anywhere`,children:e.container.image})}),(0,L.jsx)(s,{label:`Limits`,children:(0,L.jsx)(W,{container:e.container,applied:e.containerLimits})})]})]}),e.gateway!==null&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{className:`text-md font-semibold`,children:`Gateway`}),(0,L.jsxs)(a,{children:[(0,L.jsx)(s,{label:`Domain`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.domain})}),(0,L.jsx)(s,{label:`Destination`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.destination})}),(0,L.jsx)(s,{label:`Admin port`,children:(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.adminPort})}),(0,L.jsxs)(s,{label:`Admin token`,children:[(0,L.jsx)(m,{children:`Read from `}),(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:e.gateway.adminTokenEnv})]}),(0,L.jsx)(s,{label:`LLM credentials`,children:e.gateway.llmProviders.length===0?(0,L.jsx)(m,{children:`None; each harness uses the login on the worker`}):e.gateway.llmProviders.join(`, `)})]})]})]}),J=({capacity:e,leased:t})=>`${t} of ${n(e,`slot`)} in use`,Y=({name:e,configuration:n})=>{let r=n.workers.find(t=>t.name===e);if(r===void 0)return(0,L.jsx)(p,{entity:i(`worker`,e),title:e,children:(0,L.jsxs)(f,{title:`Worker not found`,children:[(0,L.jsx)(`code`,{children:`usine.yaml`}),` has no worker `,e,`.`,` `,(0,L.jsx)(_,{to:`/configuration/workers`,className:`text-primary hover:underline`,children:`See all workers`}),`.`]})});let a=[...r.prerequisites===null?[]:[{subject:`Worker`,detail:r.provisioner===null?r.kind===`ssh`?`Machine, Git, memory, gateway, credentials, and Docker`:`Machine, Git, memory, gateway, and credentials`:`Provider, gateway, and credentials`,check:r.prerequisites}],...r.harnesses.map(({harness:e,check:n})=>({subject:t[e],detail:`Harness installed and logged in`,check:n}))];return(0,L.jsx)(p,{entity:i(`worker`,e),title:r.name,marks:(0,L.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[u[r.kind],` worker`]}),children:(0,L.jsxs)(l,{facts:(0,L.jsx)(q,{worker:r}),children:[(0,L.jsx)(d,{title:`Slots`,children:r.slots===null?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempts run until the GitHub App is set up.`}):(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,L.jsx)(I,{slots:r.slots}),(0,L.jsx)(`p`,{className:`tabular-nums`,children:J(r.slots)})]})}),r.provisioner!==null&&(0,L.jsx)(U,{worker:r}),(0,L.jsxs)(d,{title:`Preflight`,aside:c,children:[r.provisioner!==null&&(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`Harness checks run on the first machine, then on the next machine created after the configured interval since the last successful check.`}),a.length===0?(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No preflight since usine up started.`}):(0,L.jsx)(`div`,{className:`@container -mx-2`,children:(0,L.jsxs)(P,{children:[(0,L.jsx)(k,{children:(0,L.jsxs)(M,{className:`hover:bg-transparent`,children:[(0,L.jsx)(A,{children:`Check`}),(0,L.jsx)(A,{children:`Result`}),(0,L.jsx)(A,{className:`hidden @2xl:table-cell`,children:`Checked`}),(0,L.jsx)(A,{className:`hidden @2xl:table-cell`,children:`Detail`})]})}),(0,L.jsx)(j,{children:a.map(({subject:e,detail:t,check:n})=>(0,L.jsx)(z,{subject:e,detail:t,check:n},e))})]})})]})]})})},X=()=>{let{worker:e}=D.useParams(),{data:t}=g(T());return(0,L.jsx)(Y,{name:e,configuration:t})};export{X as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,D as n,Y as r,_ as i,a,c as o,d as s,i as c,l,n as u,r as d,s as f,t as p,u as m}from"./section-_7wo1fd_.js";import{n as h}from"./useNavigate-I5E4IRt2.js";import{t as g}from"./link-04lHwIZK.js";import{t as _}from"./markdown-BqTCgzdQ.js";import{a as v,i as y,n as b,o as x,r as S,t as C}from"./table-kSUccuLf.js";import{t as w}from"./fill-cell-C7QNSxol.js";import{t as T}from"./file-error-BWxiLF1l.js";var E=e(),D=e=>[n(e.agents.length,`agent`),...e.invalidAgents.length>0?[`${e.invalidAgents.length} not loaded`]:[]].join(`, `),O=({agent:e})=>{let n=h(),r={agent:e.name};return(0,E.jsxs)(l,{open:()=>void n({to:`/configuration/agents/$agent`,params:r}),children:[(0,E.jsx)(S,{className:`py-3`,children:(0,E.jsx)(g,{to:`/configuration/agents/$agent`,params:r,onClick:e=>e.stopPropagation(),className:s,children:e.name})}),(0,E.jsx)(S,{children:t[e.harness]}),(0,E.jsx)(S,{className:`font-mono text-xs`,children:e.model}),(0,E.jsx)(S,{className:`hidden sm:table-cell`,children:e.effort}),(0,E.jsx)(S,{className:`hidden font-mono text-xs lg:table-cell`,children:e.resolvedParentModel??(0,E.jsx)(`span`,{className:`font-sans text-sm text-muted-foreground`,children:`Chosen by Pi`})}),(0,E.jsx)(w,{className:`hidden whitespace-normal text-muted-foreground md:table-cell`,children:e.loops.length===0?`No loop`:e.loops.join(`, `)})]})},k=({agent:e})=>{let t=h(),n={agent:e.name};return(0,E.jsxs)(l,{open:()=>void t({to:`/configuration/agents/$agent`,params:n}),children:[(0,E.jsx)(S,{className:`py-3`,children:(0,E.jsx)(g,{to:`/configuration/agents/$agent`,params:n,onClick:e=>e.stopPropagation(),className:s,children:e.name})}),(0,E.jsx)(S,{children:(0,E.jsx)(o,{})}),(0,E.jsx)(S,{colSpan:4,className:`max-w-0`,children:(0,E.jsx)(`p`,{className:`truncate text-destructive`,title:e.error.message,children:e.error.message})})]})},A=({configuration:e})=>(0,E.jsx)(p,{title:`Agents`,createKind:`agent`,counts:D(e),children:e.agents.length===0&&e.invalidAgents.length===0?(0,E.jsx)(f,{title:`No agents`,children:i.add}):(0,E.jsx)(`div`,{className:`-mx-2`,children:(0,E.jsxs)(C,{children:[(0,E.jsx)(v,{children:(0,E.jsxs)(x,{className:`hover:bg-transparent`,children:[(0,E.jsx)(y,{children:`Agent`}),(0,E.jsx)(y,{children:`Harness`}),(0,E.jsx)(y,{children:`Model`}),(0,E.jsx)(y,{className:`hidden sm:table-cell`,children:`Effort`}),(0,E.jsx)(y,{className:`hidden lg:table-cell`,children:`Parent model`}),(0,E.jsx)(y,{className:`hidden md:table-cell`,children:`Loops`})]})}),(0,E.jsxs)(b,{children:[e.invalidAgents.map(e=>(0,E.jsx)(k,{agent:e},e.file)),e.agents.map(e=>(0,E.jsx)(O,{agent:e},e.name))]})]})})}),j=({children:e})=>(0,E.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:e}),M=({agent:e,configuration:n})=>(0,E.jsxs)(a,{children:[(0,E.jsx)(c,{label:`Harness`,children:t[e.harness]}),(0,E.jsx)(c,{label:`Model`,children:(0,E.jsx)(`code`,{className:`font-mono text-xs`,children:e.model})}),(0,E.jsx)(c,{label:`Effort`,children:e.effort}),(0,E.jsxs)(c,{label:`Parent model`,children:[e.resolvedParentModel===null?(0,E.jsx)(m,{children:`Chosen by Pi`}):(0,E.jsx)(`code`,{className:`font-mono text-xs`,children:e.resolvedParentModel}),(0,E.jsx)(j,{children:e.parentModel===null?n.settings.parentModel===null?i.parentModelUnset:`From settings.parent_model`:i.parentOverride})]}),(0,E.jsxs)(c,{label:`Parent effort`,children:[e.resolvedParentEffort,(0,E.jsx)(j,{children:e.parentEffort===null?n.settings.parentEffort===null?`Same as effort`:`From settings.parent_effort`:i.parentOverride})]}),(0,E.jsx)(c,{label:`Loops`,children:e.loops.length===0?(0,E.jsx)(m,{children:`No loop uses this agent`}):(0,E.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.loops.map(e=>(0,E.jsx)(`li`,{children:(0,E.jsx)(g,{to:`/configuration/loops/$loop`,params:{loop:e},className:`text-primary hover:underline`,children:e})},e))})})]}),N=({name:e,configuration:t})=>{let n=t.agents.find(t=>t.name===e);if(n!==void 0)return(0,E.jsx)(p,{entity:r(`agent`,e),title:n.name,file:n.file,children:(0,E.jsx)(u,{facts:(0,E.jsx)(M,{agent:n,configuration:t}),children:(0,E.jsx)(d,{title:`Persona`,aside:`Sent to the agent with every task`,children:(0,E.jsx)(_,{className:`max-w-[72ch] text-md`,children:n.persona})})})});let i=t.invalidAgents.find(t=>t.name===e);return i===void 0?(0,E.jsx)(p,{entity:r(`agent`,e),title:e,children:(0,E.jsxs)(f,{title:`Agent not found`,children:[`The configuration has no file `,(0,E.jsxs)(`code`,{children:[`agents/`,e,`.md`]}),`.`,` `,(0,E.jsx)(g,{to:`/configuration/agents`,className:`text-primary hover:underline`,children:`See all agents`}),`.`]})}):(0,E.jsx)(p,{entity:r(`agent`,e),title:i.name,marks:(0,E.jsx)(o,{}),file:i.file,children:(0,E.jsx)(T,{error:i.error,consequence:`Loops that use this agent are not loaded.`})})};export{A as n,N as t};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{C as t,D as n,Y as r,_ as i,a,c as o,d as s,i as c,l,n as u,r as d,s as f,t as p,u as m}from"./section-D0pZ24Q9.js";import{n as h}from"./useNavigate-I5E4IRt2.js";import{t as g}from"./link-04lHwIZK.js";import{t as _}from"./markdown-BqTCgzdQ.js";import{a as v,i as y,n as b,o as x,r as S,t as C}from"./table-kSUccuLf.js";import{t as w}from"./fill-cell-C7QNSxol.js";import{t as T}from"./file-error-BWxiLF1l.js";var E=e(),D=e=>[n(e.agents.length,`agent`),...e.invalidAgents.length>0?[`${e.invalidAgents.length} not loaded`]:[]].join(`, `),O=({agent:e})=>{let n=h(),r={agent:e.name};return(0,E.jsxs)(l,{open:()=>void n({to:`/configuration/agents/$agent`,params:r}),children:[(0,E.jsx)(S,{className:`py-3`,children:(0,E.jsx)(g,{to:`/configuration/agents/$agent`,params:r,onClick:e=>e.stopPropagation(),className:s,children:e.name})}),(0,E.jsx)(S,{children:t[e.harness]}),(0,E.jsx)(S,{className:`font-mono text-xs`,children:e.model}),(0,E.jsx)(S,{className:`hidden sm:table-cell`,children:e.effort}),(0,E.jsx)(S,{className:`hidden font-mono text-xs lg:table-cell`,children:e.resolvedParentModel??(0,E.jsx)(`span`,{className:`font-sans text-sm text-muted-foreground`,children:`Chosen by Pi`})}),(0,E.jsx)(w,{className:`hidden whitespace-normal text-muted-foreground md:table-cell`,children:e.loops.length===0?`No loop`:e.loops.join(`, `)})]})},k=({agent:e})=>{let t=h(),n={agent:e.name};return(0,E.jsxs)(l,{open:()=>void t({to:`/configuration/agents/$agent`,params:n}),children:[(0,E.jsx)(S,{className:`py-3`,children:(0,E.jsx)(g,{to:`/configuration/agents/$agent`,params:n,onClick:e=>e.stopPropagation(),className:s,children:e.name})}),(0,E.jsx)(S,{children:(0,E.jsx)(o,{})}),(0,E.jsx)(S,{colSpan:4,className:`max-w-0`,children:(0,E.jsx)(`p`,{className:`truncate text-destructive`,title:e.error.message,children:e.error.message})})]})},A=({configuration:e})=>(0,E.jsx)(p,{title:`Agents`,createKind:`agent`,counts:D(e),children:e.agents.length===0&&e.invalidAgents.length===0?(0,E.jsx)(f,{title:`No agents`,children:i.add}):(0,E.jsx)(`div`,{className:`-mx-2`,children:(0,E.jsxs)(C,{children:[(0,E.jsx)(v,{children:(0,E.jsxs)(x,{className:`hover:bg-transparent`,children:[(0,E.jsx)(y,{children:`Agent`}),(0,E.jsx)(y,{children:`Harness`}),(0,E.jsx)(y,{children:`Model`}),(0,E.jsx)(y,{className:`hidden sm:table-cell`,children:`Effort`}),(0,E.jsx)(y,{className:`hidden lg:table-cell`,children:`Parent model`}),(0,E.jsx)(y,{className:`hidden md:table-cell`,children:`Loops`})]})}),(0,E.jsxs)(b,{children:[e.invalidAgents.map(e=>(0,E.jsx)(k,{agent:e},e.file)),e.agents.map(e=>(0,E.jsx)(O,{agent:e},e.name))]})]})})}),j=({children:e})=>(0,E.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:e}),M=({agent:e,configuration:n})=>(0,E.jsxs)(a,{children:[(0,E.jsx)(c,{label:`Harness`,children:t[e.harness]}),(0,E.jsx)(c,{label:`Model`,children:(0,E.jsx)(`code`,{className:`font-mono text-xs`,children:e.model})}),(0,E.jsx)(c,{label:`Effort`,children:e.effort}),(0,E.jsxs)(c,{label:`Parent model`,children:[e.resolvedParentModel===null?(0,E.jsx)(m,{children:`Chosen by Pi`}):(0,E.jsx)(`code`,{className:`font-mono text-xs`,children:e.resolvedParentModel}),(0,E.jsx)(j,{children:e.parentModel===null?n.settings.parentModel===null?i.parentModelUnset:`From settings.parent_model`:i.parentOverride})]}),(0,E.jsxs)(c,{label:`Parent effort`,children:[e.resolvedParentEffort,(0,E.jsx)(j,{children:e.parentEffort===null?n.settings.parentEffort===null?`Same as effort`:`From settings.parent_effort`:i.parentOverride})]}),(0,E.jsx)(c,{label:`Loops`,children:e.loops.length===0?(0,E.jsx)(m,{children:`No loop uses this agent`}):(0,E.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.loops.map(e=>(0,E.jsx)(`li`,{children:(0,E.jsx)(g,{to:`/configuration/loops/$loop`,params:{loop:e},className:`text-primary hover:underline`,children:e})},e))})})]}),N=({name:e,configuration:t})=>{let n=t.agents.find(t=>t.name===e);if(n!==void 0)return(0,E.jsx)(p,{entity:r(`agent`,e),title:n.name,file:n.file,children:(0,E.jsx)(u,{facts:(0,E.jsx)(M,{agent:n,configuration:t}),children:(0,E.jsx)(d,{title:`Persona`,aside:`Sent to the agent with every task`,children:(0,E.jsx)(_,{className:`max-w-[72ch] text-md`,children:n.persona})})})});let i=t.invalidAgents.find(t=>t.name===e);return i===void 0?(0,E.jsx)(p,{entity:r(`agent`,e),title:e,children:(0,E.jsxs)(f,{title:`Agent not found`,children:[`The configuration has no file `,(0,E.jsxs)(`code`,{children:[`agents/`,e,`.md`]}),`.`,` `,(0,E.jsx)(g,{to:`/configuration/agents`,className:`text-primary hover:underline`,children:`See all agents`}),`.`]})}):(0,E.jsx)(p,{entity:r(`agent`,e),title:i.name,marks:(0,E.jsx)(o,{}),file:i.file,children:(0,E.jsx)(T,{error:i.error,consequence:`Loops that use this agent are not loaded.`})})};export{A as n,N as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./useSuspenseQuery-BRPaB8Gf.js";import{n}from"./queries-TKKPRagF.js";import{n as r}from"./agents-BGQFRPZN.js";var i=e(),a=()=>{let{data:e}=t(n());return(0,i.jsx)(r,{configuration:e})};export{a as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./useSuspenseQuery-BRPaB8Gf.js";import{n}from"./queries-TKKPRagF.js";import{n as r}from"./agents-B88JG2q0.js";var i=e(),a=()=>{let{data:e}=t(n());return(0,i.jsx)(r,{configuration:e})};export{a as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{A as t,U as n}from"./button-D4_M-wHl.js";import{t as r}from"./usine-mark-p0IVPpwW.js";import{a as i,i as a,n as o,o as s,r as c,t as l}from"./empty-C7BJKsCc.js";var u=e(),d=({title:e,description:d,tone:f=`loading`,inPanel:p=!1,children:m})=>(0,u.jsx)(`main`,{className:t(`grid place-items-center p-6`,p?`flex-1`:`min-h-svh`),children:(0,u.jsxs)(l,{className:`max-w-md p-0`,children:[(0,u.jsxs)(a,{className:`gap-2`,children:[(0,u.jsx)(i,{className:t(`mb-1`,f===`error`?`text-destructive`:`text-foreground`),children:f===`loading`?(0,u.jsx)(`span`,{role:`status`,"aria-label":`Loading`,children:(0,u.jsx)(r,{running:!0,className:`block size-8`})}):(0,u.jsx)(n,{weight:`fill`,className:`size-5`})}),(0,u.jsx)(s,{className:`text-md font-semibold tracking-normal`,children:e}),(0,u.jsx)(c,{className:`text-sm text-muted-foreground wrap-anywhere`,children:d})]}),m!==void 0&&(0,u.jsx)(o,{className:`mt-1`,children:m})]})});export{d as t};
@@ -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{r as i}from"./queries-w5gAm8od.js";import{g as a}from"./mark-TjVTH0zt.js";import{t as o}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as s}from"./link-04lHwIZK.js";import{Fn as c,Mn as l,Nn as u,Tn as d}from"./api-DMBgrk17.js";import{m as f,r as p}from"./strings-Cgrt38_s.js";import{c as m,d as h,f as g,p as _,r as v,s as y,t as b}from"./outcome-cdTDawRg.js";import{A as x,W as S,n as C}from"./button-D4_M-wHl.js";import{t as w}from"./error-alert-C3tCznIk.js";import{B as T,O as E,i as D,n as O}from"./overview-CyrdJxvZ.js";import{$ as k,D as A,G as j,K as M,P as N,Q as P,X as F,Y as I,Z as L,q as R}from"./index-BrAROw92.js";import{n as z,t as B}from"./edit-and-retry-B4VIXVuU.js";var V=e(t(),1),H=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]]),U=V.forwardRef((e,t)=>V.createElement(S,{ref:t,...e,weights:H}));U.displayName=`ArrowsOutSimpleIcon`;var W=n(),G=({detail:e})=>{let t=(0,V.useMemo)(()=>v(h(e.transcript,e.run.attempts,e.sessionState),e.run.attempts,e.transcript),[e.transcript,e.sessionState,e.run.attempts]),n=[...t.chapters].reverse().find(({live:e})=>e),r=t.chapters.flatMap(({rows:e})=>e).reverse().find(e=>e._tag===`Message`);return(0,W.jsxs)(`div`,{className:`space-y-4`,children:[n===void 0?(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Attempt starting`}):(0,W.jsx)(m,{chapter:n}),r?._tag===`Message`&&(0,W.jsxs)(`section`,{"aria-label":`Latest message`,className:`space-y-1`,children:[(0,W.jsxs)(`p`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,W.jsx)(`span`,{className:`font-medium`,children:r.speaker.name}),(0,W.jsx)(`time`,{dateTime:r.receivedAt,title:f(r.receivedAt),className:`font-mono tabular-nums text-muted-foreground`,children:p(r.receivedAt)})]}),(0,W.jsx)(`p`,{className:`line-clamp-6 text-md wrap-anywhere`,children:y(r.text)}),r.queued!==null&&(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:E(r.queued)})]})]})},K=e=>{let t=e.attempts.at(-1),n=t?.salvage??null;return e.state===`Succeeded`?c({_tag:`Succeeded`,message:d(e.resultMessage)}):e.state===`Canceled`?c({_tag:`Canceled`,salvage:n}):e.state===`Failed`&&t?.outcome?._tag===`Failed`?c({_tag:`Failed`,failure:t.outcome.failure,salvage:n}):u()},q=({machine:e})=>{let t=A(15e3);return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:T(e,t)})},J=({detail:e})=>{let t=e.run;switch(t.state){case`Pending`:return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Opened, not scheduled yet`});case`Waiting`:return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Waiting for approval`});case`Queued`:return e.machine?.state===`creating`?(0,W.jsx)(q,{machine:e.machine}):(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Approved, waiting for a free worker`});case`Running`:return(0,W.jsx)(G,{detail:e});case`Succeeded`:case`Failed`:case`Canceled`:return l(K(t),{onNone:()=>(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempt started`}),onSome:e=>(0,W.jsx)(b,{end:e,outOfMemory:t.attempts.at(-1)?.outOfMemory??null})})}},Y=({runId:e,open:t,close:n})=>{let{data:c}=o(O()),l=r(),u=a({...i(l,e),enabled:t}),[d,f]=(0,V.useState)(null),p=N(),m=u.data?.run;return(0,W.jsx)(I,{open:t,onOpenChange:e=>{e||n()},children:(0,W.jsxs)(F,{side:`right`,"aria-label":`Run detail`,className:`gap-0 data-[side=right]:w-full data-[side=right]:sm:max-w-md`,children:[(0,W.jsx)(P,{className:`shrink-0 gap-3 border-b px-5 pt-5 pb-4 pr-20`,children:m===void 0||u.data===void 0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(k,{children:`Loading…`}),(0,W.jsx)(L,{children:`Loading run…`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_,{detail:u.data,overview:c,placement:`drawer`,shared:t,as:k,actions:(0,W.jsx)(g,{detail:u.data,onEdit:f,openRun:p})}),(0,W.jsxs)(L,{className:`sr-only`,children:[`Run `,m.id,` of `,m.loop,` on `,m.repository]})]})}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4`,children:[u.isError&&(0,W.jsx)(w,{message:u.error.message}),m!==void 0&&d!==null&&z(m,d)&&(0,W.jsx)(B,{run:m,intent:d,close:()=>f(null),openRun:p},`${m.id}:${d}`),u.data!==void 0&&(0,W.jsx)(J,{detail:u.data}),m!==void 0&&(0,W.jsx)(s,{to:`/projects/$owner/$name/runs/$run`,params:{...D(m.repository),run:m.id},search:{},viewTransition:!0,className:C({variant:`outline`}),children:`Open run page`})]}),m!==void 0&&(0,W.jsxs)(j,{children:[(0,W.jsx)(R,{render:(0,W.jsx)(s,{to:`/projects/$owner/$name/runs/$run`,params:{...D(m.repository),run:m.id},search:{},viewTransition:!0,"aria-label":`Open run page`,className:x(C({variant:`ghost`,size:`icon-sm`}),`absolute top-4 right-11`)}),children:(0,W.jsx)(U,{"aria-hidden":`true`})}),(0,W.jsx)(M,{side:`bottom`,children:`Open run page`})]})]})})};export{Y as RunDrawer};
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{r as i}from"./queries-w5gAm8od.js";import{g as a}from"./mark-TjVTH0zt.js";import{t as o}from"./useSuspenseQuery-BRPaB8Gf.js";import{t as s}from"./link-04lHwIZK.js";import{Fn as c,Mn as l,Nn as u,Tn as d}from"./api-DMBgrk17.js";import{m as f,r as p}from"./strings-Cgrt38_s.js";import{c as m,d as h,f as g,p as _,r as v,s as y,t as b}from"./outcome-5sHQcdFl.js";import{A as x,W as S,n as C}from"./button-D4_M-wHl.js";import{t as w}from"./error-alert-C3tCznIk.js";import{B as T,O as E,i as D,n as O}from"./overview-CyrdJxvZ.js";import{$ as k,D as A,G as j,K as M,P as N,Q as P,X as F,Y as I,Z as L,q as R}from"./index-BPhLK23-.js";import{n as z,t as B}from"./edit-and-retry-B4VIXVuU.js";var V=e(t(),1),H=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]]),U=V.forwardRef((e,t)=>V.createElement(S,{ref:t,...e,weights:H}));U.displayName=`ArrowsOutSimpleIcon`;var W=n(),G=({detail:e})=>{let t=(0,V.useMemo)(()=>v(h(e.transcript,e.run.attempts,e.sessionState),e.run.attempts,e.transcript),[e.transcript,e.sessionState,e.run.attempts]),n=[...t.chapters].reverse().find(({live:e})=>e),r=t.chapters.flatMap(({rows:e})=>e).reverse().find(e=>e._tag===`Message`);return(0,W.jsxs)(`div`,{className:`space-y-4`,children:[n===void 0?(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Attempt starting`}):(0,W.jsx)(m,{chapter:n}),r?._tag===`Message`&&(0,W.jsxs)(`section`,{"aria-label":`Latest message`,className:`space-y-1`,children:[(0,W.jsxs)(`p`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,W.jsx)(`span`,{className:`font-medium`,children:r.speaker.name}),(0,W.jsx)(`time`,{dateTime:r.receivedAt,title:f(r.receivedAt),className:`font-mono tabular-nums text-muted-foreground`,children:p(r.receivedAt)})]}),(0,W.jsx)(`p`,{className:`line-clamp-6 text-md wrap-anywhere`,children:y(r.text)}),r.queued!==null&&(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:E(r.queued)})]})]})},K=e=>{let t=e.attempts.at(-1),n=t?.salvage??null;return e.state===`Succeeded`?c({_tag:`Succeeded`,message:d(e.resultMessage)}):e.state===`Canceled`?c({_tag:`Canceled`,salvage:n}):e.state===`Failed`&&t?.outcome?._tag===`Failed`?c({_tag:`Failed`,failure:t.outcome.failure,salvage:n}):u()},q=({machine:e})=>{let t=A(15e3);return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:T(e,t)})},J=({detail:e})=>{let t=e.run;switch(t.state){case`Pending`:return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Opened, not scheduled yet`});case`Waiting`:return(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Waiting for approval`});case`Queued`:return e.machine?.state===`creating`?(0,W.jsx)(q,{machine:e.machine}):(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Approved, waiting for a free worker`});case`Running`:return(0,W.jsx)(G,{detail:e});case`Succeeded`:case`Failed`:case`Canceled`:return l(K(t),{onNone:()=>(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempt started`}),onSome:e=>(0,W.jsx)(b,{end:e,outOfMemory:t.attempts.at(-1)?.outOfMemory??null})})}},Y=({runId:e,open:t,close:n})=>{let{data:c}=o(O()),l=r(),u=a({...i(l,e),enabled:t}),[d,f]=(0,V.useState)(null),p=N(),m=u.data?.run;return(0,W.jsx)(I,{open:t,onOpenChange:e=>{e||n()},children:(0,W.jsxs)(F,{side:`right`,"aria-label":`Run detail`,className:`gap-0 data-[side=right]:w-full data-[side=right]:sm:max-w-md`,children:[(0,W.jsx)(P,{className:`shrink-0 gap-3 border-b px-5 pt-5 pb-4 pr-20`,children:m===void 0||u.data===void 0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(k,{children:`Loading…`}),(0,W.jsx)(L,{children:`Loading run…`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_,{detail:u.data,overview:c,placement:`drawer`,shared:t,as:k,actions:(0,W.jsx)(g,{detail:u.data,onEdit:f,openRun:p})}),(0,W.jsxs)(L,{className:`sr-only`,children:[`Run `,m.id,` of `,m.loop,` on `,m.repository]})]})}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4`,children:[u.isError&&(0,W.jsx)(w,{message:u.error.message}),m!==void 0&&d!==null&&z(m,d)&&(0,W.jsx)(B,{run:m,intent:d,close:()=>f(null),openRun:p},`${m.id}:${d}`),u.data!==void 0&&(0,W.jsx)(J,{detail:u.data}),m!==void 0&&(0,W.jsx)(s,{to:`/projects/$owner/$name/runs/$run`,params:{...D(m.repository),run:m.id},search:{},viewTransition:!0,className:C({variant:`outline`}),children:`Open run page`})]}),m!==void 0&&(0,W.jsxs)(j,{children:[(0,W.jsx)(R,{render:(0,W.jsx)(s,{to:`/projects/$owner/$name/runs/$run`,params:{...D(m.repository),run:m.id},search:{},viewTransition:!0,"aria-label":`Open run page`,className:x(C({variant:`ghost`,size:`icon-sm`}),`absolute top-4 right-11`)}),children:(0,W.jsx)(U,{"aria-hidden":`true`})}),(0,W.jsx)(M,{side:`bottom`,children:`Open run page`})]})]})})};export{Y as RunDrawer};
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="14" fill="#1e1e2e"/>
3
+ <g transform="translate(4 4) scale(0.875)">
4
+ <rect x="4" y="4" width="16" height="16" rx="4" fill="#585b70"/>
5
+ <rect x="4" y="24" width="16" height="16" rx="4" fill="#6c7086"/>
6
+ <rect x="4" y="44" width="16" height="16" rx="4" fill="#7f849c"/>
7
+ <rect x="24" y="44" width="16" height="16" rx="4" fill="#9399b2"/>
8
+ <rect x="44" y="44" width="16" height="16" rx="4" fill="#a6adc8"/>
9
+ <rect x="44" y="24" width="16" height="16" rx="4" fill="#bac2de"/>
10
+ <rect x="44" y="4" width="16" height="16" rx="4" fill="#cdd6f4"/>
11
+ <circle cx="32" cy="32" r="6" fill="#cba6f7"/>
12
+ </g>
13
+ </svg>
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{f as t,t as n}from"./section-_7wo1fd_.js";var r=e(),i=()=>(0,r.jsx)(n,{title:`Configuration history`,children:(0,r.jsx)(t,{})});export{i as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{f as t,t as n}from"./section-D0pZ24Q9.js";var r=e(),i=()=>(0,r.jsx)(n,{title:`Configuration history`,children:(0,r.jsx)(t,{})});export{i as component};