@usine/server 0.4.1-next.264.gfdecd7e → 0.4.1-next.265.g59d6496

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 (124) 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.d.ts.map +1 -1
  6. package/dist/up.js +3 -1
  7. package/dist/up.js.map +1 -1
  8. package/dist/web/assets/_agent-_6-dDU4o.js +1 -0
  9. package/dist/web/assets/_label-B2hIQTiP.js +1 -0
  10. package/dist/web/assets/_loop-DvEDblaI.js +1 -0
  11. package/dist/web/assets/_name-CGGRdFfK.js +1 -0
  12. package/dist/web/assets/_name-DXMuBR5m.js +1 -0
  13. package/dist/web/assets/_name-Jq31XnPR.js +1 -0
  14. package/dist/web/assets/_name-z-THY2_h.js +2 -0
  15. package/dist/web/assets/{_number-CpU9ru_u.js → _number-DPBp5g17.js} +1 -1
  16. package/dist/web/assets/_number-DdeVk37S.js +1 -0
  17. package/dist/web/assets/_number-Jq31XnPR.js +1 -0
  18. package/dist/web/assets/_run-CdbRrREt.js +5 -0
  19. package/dist/web/assets/_run-Jq31XnPR.js +1 -0
  20. package/dist/web/assets/_worker-Kb3E2cex.js +1 -0
  21. package/dist/web/assets/action-BbYQzHVY.js +1 -0
  22. package/dist/web/assets/agents-aKrqbR-m.js +1 -0
  23. package/dist/web/assets/agents-ySzr8fy8.js +1 -0
  24. package/dist/web/assets/code-block-CjNdHwJz.js +4 -0
  25. package/dist/web/assets/collapsible-iYmFtriP.js +1 -0
  26. package/dist/web/assets/drawer-jppXFu1P.js +1 -0
  27. package/dist/web/assets/dropdown-menu-CFZLqcex.js +1 -0
  28. package/dist/web/assets/edit-and-retry-DE8DjLVA.js +1 -0
  29. package/dist/web/assets/{error-alert-hABzwCSY.js → error-alert-BVIxPJFU.js} +1 -1
  30. package/dist/web/assets/{file-error-B5tv6DhJ.js → file-error-DhZlb2_Y.js} +1 -1
  31. package/dist/web/assets/heading-D62nMA3C.js +1 -0
  32. package/dist/web/assets/{history-PYEz5wbe.js → history-DkNNnV6Y.js} +1 -1
  33. package/dist/web/assets/identity-DlGZ_gKf.js +1 -0
  34. package/dist/web/assets/index-B3ZB08sw.css +2 -0
  35. package/dist/web/assets/index-BdDPka5v.js +10 -0
  36. package/dist/web/assets/{label-badge-JdNthOHh.js → label-badge-d6omX3Kx.js} +1 -1
  37. package/dist/web/assets/labels-B7V9VhjQ.js +1 -0
  38. package/dist/web/assets/list-CMj9dgxo.js +1 -0
  39. package/dist/web/assets/loops-w6ia_oEU.js +1 -0
  40. package/dist/web/assets/mark-B8EExm_5.js +1 -0
  41. package/dist/web/assets/model-0V8C6gKN.js +1 -0
  42. package/dist/web/assets/moves-B2I_hBZb.js +1 -0
  43. package/dist/web/assets/{not-found-D7GT8Sj7.js → not-found-hL2Tp5vW.js} +1 -1
  44. package/dist/web/assets/outcome-xmjRsDh1.js +5 -0
  45. package/dist/web/assets/{overview-C73v5kbv.js → overview-BixI1Gdc.js} +1 -1
  46. package/dist/web/assets/{page-C47YAWAl.js → page-BLxt7Xfg.js} +1 -1
  47. package/dist/web/assets/pull-request-marks-BIB-F5Bo.js +1 -0
  48. package/dist/web/assets/repositories-DhkeCOwR.js +1 -0
  49. package/dist/web/assets/route-D0B3Tsri.js +1 -0
  50. package/dist/web/assets/route-NFcp08tu.js +1 -0
  51. package/dist/web/assets/{routes-g6SHTgCO.js → routes-BHwcH9Lh.js} +17 -17
  52. package/dist/web/assets/routes-Jq31XnPR.js +1 -0
  53. package/dist/web/assets/run-again-DSDtftlB.js +1 -0
  54. package/dist/web/assets/{section-BZs0sQLB.js → section-BP8TxDno.js} +1 -1
  55. package/dist/web/assets/section-D4djNiAN.js +24 -0
  56. package/dist/web/assets/settings-0NNJ2XzL.js +1 -0
  57. package/dist/web/assets/{sortable.esm-Lp8AM6j2.js → sortable.esm-JyniDt4R.js} +1 -1
  58. package/dist/web/assets/strings-BeaABxX0.js +311 -0
  59. package/dist/web/assets/{strings-Bexnszes.js → strings-Bs2WdZYo.js} +1 -1
  60. package/dist/web/assets/tasks-Jq31XnPR.js +1 -0
  61. package/dist/web/assets/tasks-x2oa1Rt3.js +1 -0
  62. package/dist/web/assets/usage-C27cuo6g.js +1 -0
  63. package/dist/web/assets/useAnchoredPopupScrollLock-DEVFEHhP.js +1 -0
  64. package/dist/web/assets/usePositioner-BeAdUrxb.js +1 -0
  65. package/dist/web/assets/useScrollLock-77tiYKUD.js +1 -0
  66. package/dist/web/assets/workers-jjiTPmGP.js +1 -0
  67. package/dist/web/index.html +10 -19
  68. package/package.json +9 -9
  69. package/dist/web/assets/Match-BsHjCE-9.js +0 -1
  70. package/dist/web/assets/_agent-CK1JZbEZ.js +0 -1
  71. package/dist/web/assets/_label-CkDrdgxa.js +0 -1
  72. package/dist/web/assets/_loop-DLKJmqFq.js +0 -1
  73. package/dist/web/assets/_name--06G9LKw.js +0 -1
  74. package/dist/web/assets/_name-BzeOsU08.js +0 -1
  75. package/dist/web/assets/_name-CCrJHJTI.js +0 -1
  76. package/dist/web/assets/_name-LWtfT5Eq.js +0 -2
  77. package/dist/web/assets/_number-BzeOsU08.js +0 -1
  78. package/dist/web/assets/_number-n4iejSEq.js +0 -1
  79. package/dist/web/assets/_run-BzeOsU08.js +0 -1
  80. package/dist/web/assets/_run-CHrGLkXR.js +0 -5
  81. package/dist/web/assets/_worker-BvlkSKMd.js +0 -1
  82. package/dist/web/assets/action-DQzkdVHs.js +0 -1
  83. package/dist/web/assets/actions-CG0hkpe7.js +0 -1
  84. package/dist/web/assets/agents-CgWsAMoz.js +0 -1
  85. package/dist/web/assets/agents-D3eAK_60.js +0 -1
  86. package/dist/web/assets/code-block-Y9Y-8fHK.js +0 -4
  87. package/dist/web/assets/collapsible-BKcakxvM.js +0 -1
  88. package/dist/web/assets/drawer-ClcvABkO.js +0 -1
  89. package/dist/web/assets/dropdown-menu-BHKHYfLs.js +0 -1
  90. package/dist/web/assets/edit-and-retry-DZ5FH7N6.js +0 -1
  91. package/dist/web/assets/heading-zIOXe3qT.js +0 -1
  92. package/dist/web/assets/index-C_S4sA5L.css +0 -2
  93. package/dist/web/assets/index-Dki55xSv.js +0 -10
  94. package/dist/web/assets/labels-Dr9t-xYj.js +0 -1
  95. package/dist/web/assets/lazyRouteComponent-BnRF0Crs.js +0 -1
  96. package/dist/web/assets/list-NcxSR9Ja.js +0 -1
  97. package/dist/web/assets/loops-DI4kElkX.js +0 -1
  98. package/dist/web/assets/mark-uyeJ8aPC.js +0 -1
  99. package/dist/web/assets/model-87X7P9Uh.js +0 -1
  100. package/dist/web/assets/moves-DS1ecXd6.js +0 -1
  101. package/dist/web/assets/outcome-DvqnSso3.js +0 -5
  102. package/dist/web/assets/preload-helper-BLdHbfdN.js +0 -1
  103. package/dist/web/assets/pull-request-marks-B4f7z4xa.js +0 -1
  104. package/dist/web/assets/queries-BZMW2wiD.js +0 -1
  105. package/dist/web/assets/queries-oea_Y4on.js +0 -1
  106. package/dist/web/assets/repositories-CZBhubWh.js +0 -1
  107. package/dist/web/assets/route-BtU2HI1M.js +0 -1
  108. package/dist/web/assets/route-CD6OvH-7.js +0 -1
  109. package/dist/web/assets/route-status-DGpeFNCC.js +0 -1
  110. package/dist/web/assets/routes-BzeOsU08.js +0 -1
  111. package/dist/web/assets/run-again-DPa5c27z.js +0 -1
  112. package/dist/web/assets/section-eyIYzZrG.js +0 -24
  113. package/dist/web/assets/settings-DusVdmgP.js +0 -1
  114. package/dist/web/assets/skeleton-87E84B2f.js +0 -1
  115. package/dist/web/assets/strings-DXB6PB2g.js +0 -311
  116. package/dist/web/assets/tasks-BzeOsU08.js +0 -1
  117. package/dist/web/assets/tasks-ClShPUFW.js +0 -1
  118. package/dist/web/assets/usage-BMYuEDo9.js +0 -1
  119. package/dist/web/assets/use-open-run-B8nD_BT1.js +0 -1
  120. package/dist/web/assets/useAnchoredPopupScrollLock-NN99o6YU.js +0 -1
  121. package/dist/web/assets/useSelector-CRBsgquS.js +0 -1
  122. package/dist/web/assets/useSuspenseQuery-DbhQN-t-.js +0 -1
  123. package/dist/web/assets/visuallyHidden-BUGCJ1D9.js +0 -1
  124. package/dist/web/assets/workers-CDWbu1Tb.js +0 -1
@@ -1 +1 @@
1
- import{i as e,r as t,s as n}from"./useRouter-Hur3RN7j.js";import{M as r,O as i,_ as a,f as o,h as s,k as c,p as l,w as u,y as d}from"./page-C47YAWAl.js";import{P as f}from"./overview-C73v5kbv.js";import{D as p,E as m,U as h}from"./button-4rhhIcK8.js";import{Cn as g,at as _,rt as v,tt as y,v as b}from"./strings-DXB6PB2g.js";var x=class extends o{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||S(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=l({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),s.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function S(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var C=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),i(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&d(t.mutationKey)!==d(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??S();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},w=n(e(),1);function T(e,t){let n=r(t),[i]=w.useState(()=>new C(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);let a=w.useSyncExternalStore(w.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=w.useCallback((...e)=>{i.mutate(e[0],e[1]).catch(u)},[i]);if(a.error&&c(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var E=(e,t)=>{let n=new Map(e.map(e=>[e.sequence,e]));for(let e of t)n.has(e.sequence)||n.set(e.sequence,e);return[...n.values()].sort((e,t)=>e.sequence-t.sequence)},D=(e,t,n)=>[...e.filter(({attemptId:e})=>e!==t),...n].sort((e,t)=>e.before-t.before),O=(e,t,n)=>new y({...e,transcript:E(e.transcript,t.transcript),earlierTranscript:D(e.earlierTranscript,n.attemptId,t.earlierTranscript)}),k=e=>{let t=new Map;for(let n of e){if(n.payload._tag!==`SessionEvent`)continue;let e=n.payload.event;e._tag===`PoolRateLimitsUpdated`&&t.set(e.pool,{pool:e.pool,windows:g([e.rateLimits.primary,e.rateLimits.secondary])})}return[...t.values()]},A=async(e,t)=>{let n=await t(e);if(e._tag===`ColdTranscriptRequest`)return n;let r=n.transcript;for(;!n.run.canCancel;){let e=n.transcript.at(-1);if(e===void 0)break;n=await t(new _({after:e.sequence})),r=E(r,n.transcript)}return new y({...n,transcript:r})},j=[`run`],M=e=>[...j,e],N=(e,t)=>{let n=M(t);return f({queryKey:n,queryFn:async()=>{let r=e.getQueryData(n)?.transcript.at(-1)?.sequence,i=await A(r===void 0?new v:new _({after:r}),e=>b(n=>n.detail({params:{runId:t},query:e}))),a=e.getQueryData(n);return r===void 0||a===void 0?i:new y({...i,transcript:E(a.transcript,i.transcript),earlierTranscript:a.earlierTranscript})},staleTime:1e3,structuralSharing:!1,refetchInterval:e=>e.state.data?.run.canCancel===!0&&1e3})},P=t(),F=m(`group/alert relative grid w-full gap-0.5 rounded-lg border px-3 py-2.5 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/25 bg-destructive/8 text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function I({className:e,variant:t,...n}){return(0,P.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:p(F({variant:t}),e),...n})}function L({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`alert-title`,className:p(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function R({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`alert-description`,className:p(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}var z=({title:e,message:t,className:n})=>(0,P.jsxs)(I,{variant:`destructive`,className:p(`wrap-anywhere`,n),children:[(0,P.jsx)(h,{weight:`fill`}),e!==void 0&&(0,P.jsx)(L,{children:e}),(0,P.jsx)(R,{children:t})]});export{M as a,O as c,x as d,L as i,k as l,I as n,j as o,R as r,N as s,z as t,T as u};
1
+ import{i as e,r as t,s as n}from"./useRouter-Hur3RN7j.js";import{M as r,O as i,_ as a,f as o,h as s,k as c,p as l,w as u,y as d}from"./page-BLxt7Xfg.js";import{P as f}from"./overview-BixI1Gdc.js";import{D as p,E as m,U as h}from"./button-4rhhIcK8.js";import{An as g,at as _,lt as v,st as y,v as b}from"./strings-BeaABxX0.js";var x=class extends o{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||S(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=l({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),s.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function S(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var C=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),i(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&d(t.mutationKey)!==d(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??S();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},w=n(e(),1);function T(e,t){let n=r(t),[i]=w.useState(()=>new C(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);let a=w.useSyncExternalStore(w.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=w.useCallback((...e)=>{i.mutate(e[0],e[1]).catch(u)},[i]);if(a.error&&c(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var E=(e,t)=>{let n=new Map(e.map(e=>[e.sequence,e]));for(let e of t)n.has(e.sequence)||n.set(e.sequence,e);return[...n.values()].sort((e,t)=>e.sequence-t.sequence)},D=(e,t,n)=>[...e.filter(({attemptId:e})=>e!==t),...n].sort((e,t)=>e.before-t.before),O=(e,t,n)=>new _({...e,transcript:E(e.transcript,t.transcript),earlierTranscript:D(e.earlierTranscript,n.attemptId,t.earlierTranscript)}),k=e=>{let t=new Map;for(let n of e){if(n.payload._tag!==`SessionEvent`)continue;let e=n.payload.event;e._tag===`PoolRateLimitsUpdated`&&t.set(e.pool,{pool:e.pool,windows:g([e.rateLimits.primary,e.rateLimits.secondary])})}return[...t.values()]},A=async(e,t)=>{let n=await t(e);if(e._tag===`ColdTranscriptRequest`)return n;let r=n.transcript;for(;!n.run.canCancel;){let e=n.transcript.at(-1);if(e===void 0)break;n=await t(new v({after:e.sequence})),r=E(r,n.transcript)}return new _({...n,transcript:r})},j=[`run`],M=e=>[...j,e],N=(e,t)=>{let n=M(t);return f({queryKey:n,queryFn:async()=>{let r=e.getQueryData(n)?.transcript.at(-1)?.sequence,i=await A(r===void 0?new y:new v({after:r}),e=>b(n=>n.detail({params:{runId:t},query:e}))),a=e.getQueryData(n);return r===void 0||a===void 0?i:new _({...i,transcript:E(a.transcript,i.transcript),earlierTranscript:a.earlierTranscript})},staleTime:1e3,structuralSharing:!1,refetchInterval:e=>e.state.data?.run.canCancel===!0&&1e3})},P=t(),F=m(`group/alert relative grid w-full gap-0.5 rounded-lg border px-3 py-2.5 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/25 bg-destructive/8 text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function I({className:e,variant:t,...n}){return(0,P.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:p(F({variant:t}),e),...n})}function L({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`alert-title`,className:p(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function R({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`alert-description`,className:p(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}var z=({title:e,message:t,className:n})=>(0,P.jsxs)(I,{variant:`destructive`,className:p(`wrap-anywhere`,n),children:[(0,P.jsx)(h,{weight:`fill`}),e!==void 0&&(0,P.jsx)(L,{children:e}),(0,P.jsx)(R,{children:t})]});export{M as a,O as c,x as d,L as i,k as l,I as n,j as o,R as r,N as s,z as t,T as u};
@@ -1 +1 @@
1
- import{r as e}from"./useRouter-Hur3RN7j.js";import{Fn as t}from"./strings-DXB6PB2g.js";var n=e(),r={read:`Could not read the file`,yaml:`Frontmatter is not valid YAML`,frontmatter:`Frontmatter block missing or not closed`,schema:`Invalid file name or field value`,expression:`Invalid expression`,reference:`Unknown agent, repository, or tag`},i=({error:e,consequence:i})=>{let a=t(e.expression);return(0,n.jsxs)(`div`,{className:`flex max-w-[72ch] flex-col gap-3`,children:[(0,n.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg border border-destructive/25 bg-destructive/8 px-3 pt-2 pb-2.5 wrap-anywhere`,children:[(0,n.jsx)(`p`,{className:`font-medium text-destructive`,children:r[e.stage]}),(0,n.jsx)(`p`,{children:e.message}),a!==void 0&&(0,n.jsx)(`code`,{className:`mt-1 font-mono text-xs whitespace-pre-wrap text-muted-foreground`,children:a})]}),(0,n.jsxs)(`p`,{className:`text-muted-foreground`,children:[i,` Fix `,(0,n.jsx)(`code`,{className:`font-mono text-xs`,children:e.file}),`, then reload the configuration.`]})]})};export{i as t};
1
+ import{r as e}from"./useRouter-Hur3RN7j.js";import{Hn as t}from"./strings-BeaABxX0.js";var n=e(),r={read:`Could not read the file`,yaml:`Frontmatter is not valid YAML`,frontmatter:`Frontmatter block missing or not closed`,schema:`Invalid file name or field value`,expression:`Invalid expression`,reference:`Unknown agent, repository, or tag`},i=({error:e,consequence:i})=>{let a=t(e.expression);return(0,n.jsxs)(`div`,{className:`flex max-w-[72ch] flex-col gap-3`,children:[(0,n.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg border border-destructive/25 bg-destructive/8 px-3 pt-2 pb-2.5 wrap-anywhere`,children:[(0,n.jsx)(`p`,{className:`font-medium text-destructive`,children:r[e.stage]}),(0,n.jsx)(`p`,{children:e.message}),a!==void 0&&(0,n.jsx)(`code`,{className:`mt-1 font-mono text-xs whitespace-pre-wrap text-muted-foreground`,children:a})]}),(0,n.jsxs)(`p`,{className:`text-muted-foreground`,children:[i,` Fix `,(0,n.jsx)(`code`,{className:`font-mono text-xs`,children:e.file}),`, then reload the configuration.`]})]})};export{i as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./useRouter-Hur3RN7j.js";import{t}from"./mark-B8EExm_5.js";import{D as n}from"./button-4rhhIcK8.js";import{Kn as r}from"./strings-BeaABxX0.js";var i=e(),a=({item:e,title:a,variant:o,linked:s=!0,as:c=o===`page`?`h1`:`span`,className:l,style:u})=>(0,i.jsxs)(c,{className:n(o===`page`?`text-xl font-semibold wrap-anywhere`:`block truncate text-sm font-medium`,l),...u===void 0?{}:{style:u},...o===`row`?{title:a}:{},children:[r(e,{onNone:()=>null,onSome:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t,{item:e,size:o===`page`?`title`:`inline`,linked:s}),` `]})}),a]});export{a as t};
@@ -1 +1 @@
1
- import{r as e}from"./useRouter-Hur3RN7j.js";import{f as t,t as n}from"./section-eyIYzZrG.js";var r=e(),i=()=>(0,r.jsx)(n,{title:`Configuration history`,children:(0,r.jsx)(t,{})});export{i as component};
1
+ import{r as e}from"./useRouter-Hur3RN7j.js";import{f as t,t as n}from"./section-D4djNiAN.js";var r=e(),i=()=>(0,r.jsx)(n,{title:`Configuration history`,children:(0,r.jsx)(t,{})});export{i as component};
@@ -0,0 +1 @@
1
+ import{i as e,s as t}from"./useRouter-Hur3RN7j.js";import{B as n}from"./mark-B8EExm_5.js";import{n as r}from"./overview-BixI1Gdc.js";import{Gn as i,Kn as a,jn as o,zn as s}from"./strings-BeaABxX0.js";var c=t(e(),1),l=c.createContext(void 0);function u(){return c.useContext(l)?.direction??`ltr`}var d=(e,t)=>e.number-t.number,f=e=>{let t=[...e].sort(d),n=t.find(({kind:e})=>e===`issue`)??t[0]??e[0];return{origin:n,pullRequests:t.filter(({kind:e,number:t})=>e===`pr`&&t!==n.number)}},p=e=>f(o(e.items)?e.items:[e]),m=(e,t)=>s(e?.projects.flatMap(({board:e})=>e.lanes).flatMap(({items:e})=>e).find(e=>e.items.some(e=>e.itemKey===t))),h=(e,t)=>a(m(e,t.itemKey),{onNone:()=>f([t]),onSome:p}),g=()=>n(r()).data,_=e=>i(s(/\/pull\/(\d+)/u.exec(e)?.[1]),Number),v=(e,t)=>i(_(e),n=>t.find(e=>e.number===n)??{kind:`pr`,number:n,url:e,state:null});export{f as a,m as i,h as n,g as o,v as r,u as s,p as t};