@xopcai/xopc 0.0.129 → 0.0.131

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 (178) hide show
  1. package/dist/browser-ext/icons/icon-128.png +0 -0
  2. package/dist/browser-ext/icons/icon-16.png +0 -0
  3. package/dist/browser-ext/icons/icon-32.png +0 -0
  4. package/dist/browser-ext/icons/icon-48.png +0 -0
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/extensions/telegram/xopc.extension.json +1 -1
  7. package/dist/gateway/static/root/apple-touch-icon.png +0 -0
  8. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DHzfg5D-.js → agent-avatar-dicebear-BJYeTxQ9.js} +1 -1
  9. package/dist/gateway/static/root/assets/agents-kVsY4Iz_.js +2 -0
  10. package/dist/gateway/static/root/assets/app-management-settings-panel-Bj8iJ-7d.js +1 -0
  11. package/dist/gateway/static/root/assets/{appearance-settings-bYeEj3IW.js → appearance-settings-6TjISbHB.js} +1 -1
  12. package/dist/gateway/static/root/assets/apps-page-DC4YwXLL.js +1 -0
  13. package/dist/gateway/static/root/assets/{archive-plugin-Dy6lsTHw.js → archive-plugin-2G62raBg.js} +1 -1
  14. package/dist/gateway/static/root/assets/{attachment-load-qOtBYR6Y.js → attachment-load-kLNJMEJh.js} +1 -1
  15. package/dist/gateway/static/root/assets/{automation-suggestion-card-BFH-RfaV.js → automation-suggestion-card-CpcZSSD8.js} +1 -1
  16. package/dist/gateway/static/root/assets/automations-page-MZ8m4bYP.js +4 -0
  17. package/dist/gateway/static/root/assets/{binary-plugins-DJvi_thc.js → binary-plugins-C_zSrWow.js} +1 -1
  18. package/dist/gateway/static/root/assets/{block-editor-DlMnizlt.js → block-editor-D_PMrT-l.js} +4 -4
  19. package/dist/gateway/static/root/assets/browser-settings-page-C89wKfPd.js +8 -0
  20. package/dist/gateway/static/root/assets/capability-presets-api-CPFtajl7.js +1 -0
  21. package/dist/gateway/static/root/assets/{capability-presets-settings-panel-Dng8Grpv.js → capability-presets-settings-panel-DWw31-4v.js} +1 -1
  22. package/dist/gateway/static/root/assets/channel-recipient-api-BUi8syv2.js +1 -0
  23. package/dist/gateway/static/root/assets/channels-settings-DOYzcMAE.js +1 -0
  24. package/dist/gateway/static/root/assets/connectors-page-DCE-PgQF.js +2 -0
  25. package/dist/gateway/static/root/assets/desktop-pet-BYV16wez.js +1 -0
  26. package/dist/gateway/static/root/assets/{desktop-pet-settings-B-u63N4e.js → desktop-pet-settings-DGIaFqPR.js} +1 -1
  27. package/dist/gateway/static/root/assets/{directory-picker-path-field-8p1ehIHn.js → directory-picker-path-field-BEhDuShd.js} +1 -1
  28. package/dist/gateway/static/root/assets/dreaming-settings-BIkgLFDH.js +3 -0
  29. package/dist/gateway/static/root/assets/{extension-debug-page-DJ1ABK95.js → extension-debug-page-BIjLZMAQ.js} +1 -1
  30. package/dist/gateway/static/root/assets/{extension-page-CP9P2lGM.js → extension-page-Cxv4Bgj5.js} +1 -1
  31. package/dist/gateway/static/root/assets/extension-settings-page-DNd0tRFl.js +1 -0
  32. package/dist/gateway/static/root/assets/fetch-Bl7zMnmd.js +1 -0
  33. package/dist/gateway/static/root/assets/gateway-config-api-BiqKIkkp.js +1 -0
  34. package/dist/gateway/static/root/assets/gateway-settings-D_Cvasqi.js +1 -0
  35. package/dist/gateway/static/root/assets/{gateway-startup-retry-CY5W2Pp4.js → gateway-startup-retry-CPOgTcpv.js} +1 -1
  36. package/dist/gateway/static/root/assets/{goal-create-dialog-2lPbGfp3.js → goal-create-dialog-DZ68qzpm.js} +1 -1
  37. package/dist/gateway/static/root/assets/goal-detail-page-DF8QhTHH.js +4 -0
  38. package/dist/gateway/static/root/assets/goals-config-api-h26_-2Vm.js +1 -0
  39. package/dist/gateway/static/root/assets/goals-page-BzBKHZJg.js +2 -0
  40. package/dist/gateway/static/root/assets/goals-settings-BFG1uTI8.js +1 -0
  41. package/dist/gateway/static/root/assets/heartbeat-settings-5vV8vTva.js +1 -0
  42. package/dist/gateway/static/root/assets/index-DOetFpTt.js +262 -0
  43. package/dist/gateway/static/root/assets/index-W4ogAiHt.css +1 -0
  44. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BrENZzM7.js → keyboard-shortcuts-settings-Dpx1ovO6.js} +1 -1
  45. package/dist/gateway/static/root/assets/logs-page-3QO3elfx.js +7 -0
  46. package/dist/gateway/static/root/assets/{markdown-split-BYF4ReGM.js → markdown-split-Ba4EsPkV.js} +1 -1
  47. package/dist/gateway/static/root/assets/{media-plugins-CpQDz-QJ.js → media-plugins-lA5rvtCq.js} +1 -1
  48. package/dist/gateway/static/root/assets/{messages-YzjnURPJ.js → messages-Bq4REfIj.js} +2 -2
  49. package/dist/gateway/static/root/assets/models-hub-panel-BBG87CHZ.js +2 -0
  50. package/dist/gateway/static/root/assets/notes-page-DrUGE-Hn.js +1 -0
  51. package/dist/gateway/static/root/assets/notes-workbench-eAIE8iKV.js +2 -0
  52. package/dist/gateway/static/root/assets/{page-tabs-RnYYOIWO.js → page-tabs-Cy7bX7Ce.js} +1 -1
  53. package/dist/gateway/static/root/assets/{preview-open-alternatives-CTRt06Ri.js → preview-open-alternatives-B9_iql49.js} +1 -1
  54. package/dist/gateway/static/root/assets/project-detail-page-Cwct6pCV.js +1 -0
  55. package/dist/gateway/static/root/assets/projects-page-BXZlzV8t.js +1 -0
  56. package/dist/gateway/static/root/assets/remote-access-hub-C29EWM0P.js +1 -0
  57. package/dist/gateway/static/root/assets/{save-bar-controls-c4pZeikq.js → save-bar-controls-nMloZ0mp.js} +1 -1
  58. package/dist/gateway/static/root/assets/{schedule-field-Cb6R7iuP.js → schedule-field-BuajpVNF.js} +1 -1
  59. package/dist/gateway/static/root/assets/{schema-form-BqET_hEP.js → schema-form-IeXV_yQk.js} +1 -1
  60. package/dist/gateway/static/root/assets/sessions-page-DHHVDqsy.js +1 -0
  61. package/dist/gateway/static/root/assets/settings-advanced-gate-hDvmobsT.js +1 -0
  62. package/dist/gateway/static/root/assets/{settings-collapsible-section-DuOvqNsI.js → settings-collapsible-section-ByixWwvu.js} +1 -1
  63. package/dist/gateway/static/root/assets/{settings-form-section-DptSsbWd.js → settings-form-section-C-5-n-jM.js} +1 -1
  64. package/dist/gateway/static/root/assets/{settings-loading-skeleton-BlVfBCb9.js → settings-loading-skeleton-CTA5Gje4.js} +1 -1
  65. package/dist/gateway/static/root/assets/settings-page-DzqxeemF.js +1 -0
  66. package/dist/gateway/static/root/assets/{settings-page-layout-DVt69dJJ.js → settings-page-layout-DgFTf6nM.js} +1 -1
  67. package/dist/gateway/static/root/assets/setup-status-panel-svpHcJ62.js +1 -0
  68. package/dist/gateway/static/root/assets/share-preview-page-IOjU69FC.js +2 -0
  69. package/dist/gateway/static/root/assets/shares-settings-Ddg8gHPN.js +1 -0
  70. package/dist/gateway/static/root/assets/skill-reload-api-DcNOEJsK.js +1 -0
  71. package/dist/gateway/static/root/assets/skills-page-DoonnYRs.js +2 -0
  72. package/dist/gateway/static/root/assets/{system-settings-panel-CW22OkZ4.js → system-settings-panel-BMDD7FXg.js} +1 -1
  73. package/dist/gateway/static/root/assets/{typed-models-lib-BqpGAKxV.js → typed-models-lib-DayamJ56.js} +1 -1
  74. package/dist/gateway/static/root/assets/use-channel-catalog-ChYwFiqo.js +1 -0
  75. package/dist/gateway/static/root/assets/{user-profile-settings-panel-CERVLuaW.js → user-profile-settings-panel-Dd0X3mPv.js} +1 -1
  76. package/dist/gateway/static/root/assets/{utils-BnmysurA.js → utils-D9v9ZpK4.js} +1 -1
  77. package/dist/gateway/static/root/assets/voice-api-key-field-QXGvjTwa.js +1 -0
  78. package/dist/gateway/static/root/assets/work-item-detail-page-CP-5OUYI.js +1 -0
  79. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Ci9GSPnS.js → workflow-run-setup-panel-IidqhbUI.js} +2 -2
  80. package/dist/gateway/static/root/assets/{workflow-start-dialog-BhDj8pqH.js → workflow-start-dialog-BQQkr8YD.js} +1 -1
  81. package/dist/gateway/static/root/assets/workflows-page-DtVIjVSX.js +18 -0
  82. package/dist/gateway/static/root/favicon-16x16.png +0 -0
  83. package/dist/gateway/static/root/favicon-32x32.png +0 -0
  84. package/dist/gateway/static/root/favicon-icon.svg +23 -1
  85. package/dist/gateway/static/root/favicon.ico +0 -0
  86. package/dist/gateway/static/root/favicon.png +0 -0
  87. package/dist/gateway/static/root/favicon.svg +20 -24
  88. package/dist/gateway/static/root/index.html +11 -11
  89. package/dist/gateway/static/root/logo-dark.svg +18 -23
  90. package/dist/gateway/static/root/logo.svg +18 -24
  91. package/dist/gateway/static/root/pwa-192x192.png +0 -0
  92. package/dist/gateway/static/root/pwa-512x512.png +0 -0
  93. package/dist/gateway/static/root/site.webmanifest +23 -0
  94. package/dist/package.js +1 -1
  95. package/dist/src/cli/commands/gateway/probe.js +6 -6
  96. package/dist/src/cli/commands/gateway/probe.js.map +1 -1
  97. package/dist/src/cli/commands/onboard.js +2 -2
  98. package/dist/src/cli/commands/onboard.js.map +1 -1
  99. package/dist/src/cli/commands/tui.js +11 -4
  100. package/dist/src/cli/commands/tui.js.map +1 -1
  101. package/dist/src/cli/utils/gateway-client-options.d.ts +3 -0
  102. package/dist/src/cli/utils/gateway-client-options.js +2 -1
  103. package/dist/src/cli/utils/gateway-client-options.js.map +1 -1
  104. package/dist/src/cli/utils/gateway-client.d.ts +6 -3
  105. package/dist/src/cli/utils/gateway-client.js +14 -8
  106. package/dist/src/cli/utils/gateway-client.js.map +1 -1
  107. package/dist/src/gateway/credential.d.ts +9 -0
  108. package/dist/src/gateway/credential.js +16 -0
  109. package/dist/src/gateway/credential.js.map +1 -0
  110. package/dist/src/gateway/hono/app.d.ts +0 -1
  111. package/dist/src/gateway/hono/app.js +2 -9
  112. package/dist/src/gateway/hono/app.js.map +1 -1
  113. package/dist/src/gateway/hono/middleware/auth.d.ts +0 -2
  114. package/dist/src/gateway/hono/middleware/auth.js +46 -21
  115. package/dist/src/gateway/hono/middleware/auth.js.map +1 -1
  116. package/dist/src/gateway/hono/routes/sessions.js +2 -27
  117. package/dist/src/gateway/hono/routes/sessions.js.map +1 -1
  118. package/dist/src/gateway/server.js +1 -5
  119. package/dist/src/gateway/server.js.map +1 -1
  120. package/dist/src/mcp/channel-bridge.d.ts +2 -1
  121. package/dist/src/mcp/channel-bridge.js +10 -6
  122. package/dist/src/mcp/channel-bridge.js.map +1 -1
  123. package/dist/src/mcp/channel-server.d.ts +2 -1
  124. package/dist/src/mcp/channel-server.js +1 -1
  125. package/dist/src/mcp/channel-server.js.map +1 -1
  126. package/dist/src/mcp/gateway-http-client.d.ts +3 -2
  127. package/dist/src/mcp/gateway-http-client.js +9 -7
  128. package/dist/src/mcp/gateway-http-client.js.map +1 -1
  129. package/dist/src/tui/backends/gateway-sse-backend.d.ts +3 -2
  130. package/dist/src/tui/backends/gateway-sse-backend.js +45 -41
  131. package/dist/src/tui/backends/gateway-sse-backend.js.map +1 -1
  132. package/dist/src/tui/tui-types.d.ts +3 -2
  133. package/dist/src/tui/tui-types.js.map +1 -1
  134. package/dist/src/tui/tui.js +1 -1
  135. package/dist/src/tui/tui.js.map +1 -1
  136. package/package.json +5 -2
  137. package/dist/gateway/static/root/assets/agents-CMxKKFQD.js +0 -2
  138. package/dist/gateway/static/root/assets/app-management-settings-panel-ptk9c5BN.js +0 -1
  139. package/dist/gateway/static/root/assets/apps-page-DdZvDf5B.js +0 -1
  140. package/dist/gateway/static/root/assets/automations-page-B8JTjkCr.js +0 -4
  141. package/dist/gateway/static/root/assets/browser-settings-page-slHLiZgi.js +0 -8
  142. package/dist/gateway/static/root/assets/capability-presets-api-D4q7vHVJ.js +0 -1
  143. package/dist/gateway/static/root/assets/channel-recipient-api-BrW5Kcgc.js +0 -1
  144. package/dist/gateway/static/root/assets/channels-settings-KIsISXw0.js +0 -1
  145. package/dist/gateway/static/root/assets/connectors-page-C5fx4Qs9.js +0 -2
  146. package/dist/gateway/static/root/assets/desktop-pet-Jmdn6q47.js +0 -1
  147. package/dist/gateway/static/root/assets/dreaming-settings-CCkKP-I4.js +0 -3
  148. package/dist/gateway/static/root/assets/extension-settings-page-DnhU-tx0.js +0 -1
  149. package/dist/gateway/static/root/assets/fetch-BMjlW0g1.js +0 -1
  150. package/dist/gateway/static/root/assets/gateway-config-api-CjxDn46s.js +0 -1
  151. package/dist/gateway/static/root/assets/gateway-settings-TING7224.js +0 -1
  152. package/dist/gateway/static/root/assets/goal-detail-page-DHWVRafk.js +0 -4
  153. package/dist/gateway/static/root/assets/goals-config-api-BqhuxG8P.js +0 -1
  154. package/dist/gateway/static/root/assets/goals-page-CMk-9ZYN.js +0 -2
  155. package/dist/gateway/static/root/assets/goals-settings-BHzOAU_l.js +0 -1
  156. package/dist/gateway/static/root/assets/heartbeat-settings-BQIm0P3V.js +0 -1
  157. package/dist/gateway/static/root/assets/index-C4k6QSXw.js +0 -257
  158. package/dist/gateway/static/root/assets/index-EKmpPvZj.css +0 -1
  159. package/dist/gateway/static/root/assets/logs-page-BiL302Ve.js +0 -2
  160. package/dist/gateway/static/root/assets/models-hub-panel-CFPpl3Cq.js +0 -2
  161. package/dist/gateway/static/root/assets/notes-page-BurgcdVZ.js +0 -1
  162. package/dist/gateway/static/root/assets/notes-workbench-BAELRM_O.js +0 -2
  163. package/dist/gateway/static/root/assets/project-detail-page-iXX1Ceo2.js +0 -1
  164. package/dist/gateway/static/root/assets/projects-page-GDVTFAY7.js +0 -1
  165. package/dist/gateway/static/root/assets/remote-access-hub-BUrbUnwv.js +0 -1
  166. package/dist/gateway/static/root/assets/sessions-page-CiOreA2k.js +0 -1
  167. package/dist/gateway/static/root/assets/settings-advanced-gate-C-qvptlu.js +0 -1
  168. package/dist/gateway/static/root/assets/settings-page-xQx2Pkg5.js +0 -1
  169. package/dist/gateway/static/root/assets/setup-status-panel-DWB8VdLK.js +0 -1
  170. package/dist/gateway/static/root/assets/share-preview-page-8m_ACH0z.js +0 -2
  171. package/dist/gateway/static/root/assets/shares-settings-CgxfhNxI.js +0 -1
  172. package/dist/gateway/static/root/assets/skill-reload-api-BBFUOxmf.js +0 -1
  173. package/dist/gateway/static/root/assets/skills-page-bo695odu.js +0 -2
  174. package/dist/gateway/static/root/assets/url-DFGNSBNT.js +0 -1
  175. package/dist/gateway/static/root/assets/use-channel-catalog-CPdJ0o0i.js +0 -1
  176. package/dist/gateway/static/root/assets/voice-api-key-field-Jr3jvPcB.js +0 -1
  177. package/dist/gateway/static/root/assets/work-item-detail-page-B-8rex4u.js +0 -1
  178. package/dist/gateway/static/root/assets/workflows-page-Brb3UGvs.js +0 -18
@@ -0,0 +1,18 @@
1
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./cn-BQ_8x0bT.js";import{t as a}from"./messages-Bq4REfIj.js";import{a as o}from"./fetch-Bl7zMnmd.js";import{n as s}from"./locale-store-Ba72bFmP.js";import{i as c}from"./vendor-swr-BIWyz7Rc.js";import{$ as l,$a as u,$s as d,A as f,Ac as p,B as m,Ba as h,D as g,Do as _,E as v,Ec as y,El as b,Es as x,F as S,G as C,Ga as w,H as T,Ha as E,I as D,J as O,K as k,Kc as A,Lc as j,M,N,Nc as P,No as ee,O as F,Oc as I,P as L,Pc as R,Q as z,Qo as B,R as V,Ra as te,Ro as H,Rs as ne,Ss as U,U as W,Ua as G,Va as K,W as re,Wa as q,Xc as J,Y as ie,Z as ae,_i as oe,_t as se,b as ce,bs as le,bt as ue,cs as de,ct as fe,dt as pe,er as me,et as he,ft as ge,gt as _e,h as ve,ha as ye,hc as be,ht as xe,j as Se,k as Y,lt as Ce,m as we,mo as Te,mt as Ee,nl as De,ns as Oe,nt as ke,ol as Ae,ps as je,q as Me,qn as Ne,qs as Pe,st as Fe,tc as Ie,tl as Le,to as Re,tt as ze,ut as Be,vo as Ve,vt as He,w as Ue,wl as We,wo as X,xt as Ge,z as Ke,za as qe}from"./index-DOetFpTt.js";import{t as Je}from"./page-tabs-Cy7bX7Ce.js";import{t as Ye}from"./automation-suggestion-card-CpcZSSD8.js";import{t as Xe}from"./workflow-start-dialog-BQQkr8YD.js";var Z=e(t(),1),Q=n(),Ze=[`queued`,`running`,`succeeded`,`attention`],Qe=new Set([`failed`,`timeout`,`cancelled`]);function $e(e){return e.metadata?.sessionKey?.trim()||null}function et(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}function tt(e,t){if(!e||typeof e!=`object`)return null;let n=e;for(let e of t){let t=n[e];if(typeof t==`string`&&t.trim())return t.trim()}return null}function nt(e,t=90){let n=e.metadata?.input?.goal?.trim()||(typeof e.metadata?.input?.payload==`string`?e.metadata.input.payload.trim():null)||tt(e.metadata?.input?.payload,[`query`,`goal`,`prompt`,`input`,`message`])||tt(e.metadata?.input?.variables,[`query`,`goal`,`prompt`,`input`,`message`]);return n?et(n,t):null}function rt(e,t=90){return nt(e,t)??et(e.title?.trim()||e.definitionId,t)}function it(e,t=44){return et(e.title?.trim()||e.definitionId,t)}function at(e,t){let n=t.trim().toLowerCase();return n?[nt(e,500),e.title,e.definitionId,e.id].filter(Boolean).join(` `).toLowerCase().includes(n):!0}function ot(e,t){let n=t.workflowFilterId.trim();return e.filter(e=>n&&e.definitionId!==n||!L(e,t.triggerFilter??`all`)?!1:at(e,t.searchQuery))}function st(e){return e.completedAtMs??e.createdAtMs}function ct(e,t){return e.status===`queued`?`queued`:e.status===`running`?`running`:e.status===`succeeded`?`succeeded`:Qe.has(e.status)?`attention`:null}function lt(e,t){let n=[...t];return e===`queued`?n.sort((e,t)=>e.createdAtMs-t.createdAtMs):e===`running`?n.sort((e,t)=>(t.startedAtMs??t.createdAtMs)-(e.startedAtMs??e.createdAtMs)):n.sort((e,t)=>st(t)-st(e))}function ut(e,t){let n={queued:[],running:[],succeeded:[],attention:[]};for(let r of e){let e=ct(r,t);e&&n[e].push(r)}return Ze.map(e=>{if(e===`succeeded`){let t=lt(`succeeded`,n.succeeded);return{id:e,runs:t,totalInWindow:t.length}}return{id:e,runs:lt(e,n[e])}})}var dt=new Map;function ft(e){let t=dt.get(e);return t||(t=new Intl.RelativeTimeFormat(e,{numeric:`auto`}),dt.set(e,t)),t}function pt(e,t,n){let r=Math.round((t-e)/1e3),i=ft(n);if(r<60)return i.format(-r,`second`);let a=Math.round(r/60);if(a<60)return i.format(-a,`minute`);let o=Math.round(a/60);if(o<48)return i.format(-o,`hour`);let s=Math.round(o/24);return i.format(-s,`day`)}function mt(e){return e.status===`queued`||e.status===`running`}function ht(e){return e.status===`failed`||e.status===`timeout`||e.status===`cancelled`}var $=r(),gt=(0,Z.memo)(function(e){let t=(0,Q.c)(76),{run:n,language:r,localeTag:o,nowMs:s,selected:c,onOpen:l,onOpenChat:u,onCancel:d,onRetry:f}=e,p=a(r).workflows,[m,h]=(0,Z.useState)(!1),g;t[0]===n?g=t[1]:(g=$e(n),t[0]=n,t[1]=g);let _=!g,v;t[2]===n?v=t[3]:(v=mt(n),t[2]=n,t[3]=v);let y=v,b=n.status===`running`||n.status===`queued`,x;t[4]!==n.metrics.agentCount||t[5]!==n.metrics.doneAgentCount?(x=n.metrics.agentCount>0?Math.round(n.metrics.doneAgentCount/n.metrics.agentCount*100):0,t[4]=n.metrics.agentCount,t[5]=n.metrics.doneAgentCount,t[6]=x):x=t[6];let C=x,w=n.metrics.errorAgentCount>0,T=n.startedAtMs??n.createdAtMs,E=F(y?s-T:n.metrics.durationMs),D=Se(p.taskArtifacts,{count:n.metrics.artifactCount}),O;t[7]===n?O=t[8]:(O=rt(n),t[7]=n,t[8]=O);let k=O,A;t[9]===n?A=t[10]:(A=it(n),t[9]=n,t[10]=A);let j=A,M;t[11]!==l||t[12]!==n?(M=()=>{l(n)},t[11]=l,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==_||t[15]!==u||t[16]!==n?(P=()=>{_||u(n)},t[14]=_,t[15]=u,t[16]=n,t[17]=P):P=t[17];let ee=P,L=c&&`ring-1 ring-accent/30`,R;t[18]===L?R=t[19]:(R=i(`group relative min-h-24 overflow-hidden rounded-lg bg-surface-panel px-3 py-3 shadow-surface transition-colors`,L,`hover:bg-surface-hover`),t[18]=L,t[19]=R);let z;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(z=i(`w-full text-left`,Ve.focusRingPanel),t[20]=z):z=t[20];let B;t[21]===k?B=t[22]:(B=(0,$.jsx)(`div`,{className:`line-clamp-2 text-sm font-medium leading-5 text-fg`,children:k}),t[21]=k,t[22]=B);let V;t[23]===j?V=t[24]:(V=(0,$.jsx)(`div`,{className:`mt-1 truncate text-[11px] font-medium text-fg-muted`,children:j}),t[23]=j,t[24]=V);let te;t[25]!==B||t[26]!==V?(te=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[B,V]}),t[25]=B,t[26]=V,t[27]=te):te=t[27];let ne;t[28]===n.status?ne=t[29]:(ne=i(`shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold shadow-sm`,S(n.status)),t[28]=n.status,t[29]=ne);let U;t[30]!==o||t[31]!==s||t[32]!==T?(U=pt(T,s,o),t[30]=o,t[31]=s,t[32]=T,t[33]=U):U=t[33];let W;t[34]===U?W=t[35]:(W=(0,$.jsx)(`span`,{children:U}),t[34]=U,t[35]=W);let G=E===`—`?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,$.jsx)(`span`,{children:Se(p.taskElapsed,{duration:E})})]}),K;t[36]!==W||t[37]!==G?(K=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-1.5 text-[11px] text-fg-subtle`,children:[W,G]}),t[36]=W,t[37]=G,t[38]=K):K=t[38];let re=n.metrics.artifactCount>0?(0,$.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 font-medium text-fg-muted`,children:D}):null,q=c?(0,$.jsx)(`span`,{className:`font-medium text-accent-fg`,children:p.taskOpenDetails}):null,J;t[39]!==re||t[40]!==q?(J=(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2 text-[11px] text-fg-subtle`,children:[re,q]}),t[39]=re,t[40]=q,t[41]=J):J=t[41];let ie=_&&`cursor-not-allowed text-fg-disabled hover:bg-transparent`,ae;t[42]===ie?ae=t[43]:(ae=i(`rounded-md px-2 py-1 text-xs font-medium`,`text-accent-fg hover:bg-accent-soft`,Ve.focusRingPanel,ie),t[42]=ie,t[43]=ae);let oe;t[44]!==_||t[45]!==ee||t[46]!==p.continueInChat||t[47]!==ae?(oe=(0,$.jsx)(`button`,{type:`button`,className:ae,disabled:_,onClick:ee,children:p.continueInChat}),t[44]=_,t[45]=ee,t[46]=p.continueInChat,t[47]=ae,t[48]=oe):oe=t[48];let se;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(se=i(`rounded-md px-2 py-1 text-xs font-medium text-fg-muted hover:bg-surface-hover hover:text-fg`,Ve.focusRingPanel),t[49]=se):se=t[49];let ce;t[50]!==N||t[51]!==p.taskOpenDetails?(ce=(0,$.jsx)(`button`,{type:`button`,className:se,onClick:N,children:p.taskOpenDetails}),t[50]=N,t[51]=p.taskOpenDetails,t[52]=ce):ce=t[52];let le;t[53]!==oe||t[54]!==ce?(le=(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2 border-t border-edge-subtle pt-2`,children:[oe,ce]}),t[53]=oe,t[54]=ce,t[55]=le):le=t[55];let ue;t[56]===h?ue=t[57]:(ue=()=>h(vt),t[56]=h,t[57]=ue);let de;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(I,{className:`size-4`,"aria-hidden":!0}),t[58]=de):de=t[58];let fe;t[59]!==p.taskActionsAria||t[60]!==m||t[61]!==ue?(fe=(0,$.jsx)(X,{variant:`ghost`,className:`size-7 p-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100`,"aria-label":p.taskActionsAria,"aria-expanded":m,onClick:ue,children:de}),t[59]=p.taskActionsAria,t[60]=m,t[61]=ue,t[62]=fe):fe=t[62];let pe;t[63]!==y||t[64]!==p.cancel||t[65]!==p.rerun||t[66]!==p.taskCloseMenu||t[67]!==m||t[68]!==d||t[69]!==f||t[70]!==n||t[71]!==h?(pe=m?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{type:`button`,className:`fixed inset-0 z-10 cursor-default`,"aria-label":p.taskCloseMenu,onClick:()=>h(!1)}),(0,$.jsxs)(`div`,{className:`absolute right-0 z-20 mt-1 min-w-36 rounded-lg border border-edge bg-surface-panel py-1 shadow-surface`,children:[y?(0,$.jsx)(_t,{label:p.cancel,tone:`danger`,onClick:()=>{h(!1),d(n.id)}}):null,ht(n)?(0,$.jsx)(_t,{label:p.rerun,onClick:()=>{h(!1),f(n.id)}}):null]})]}):null,t[63]=y,t[64]=p.cancel,t[65]=p.rerun,t[66]=p.taskCloseMenu,t[67]=m,t[68]=d,t[69]=f,t[70]=n,t[71]=h,t[72]=pe):pe=t[72];let me;return t[73]!==fe||t[74]!==pe?(me=(0,$.jsxs)(`div`,{className:`absolute right-2 top-2`,children:[fe,pe]}),t[73]=fe,t[74]=pe,t[75]=me):me=t[75],(0,$.jsxs)(`div`,{className:R,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:N,"aria-label":`${p.taskOpenDetails}: ${k}`,"aria-current":c?`true`:void 0,className:z,children:[(0,$.jsxs)(`div`,{className:`pr-7`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[te,(0,$.jsx)(`span`,{className:ne,children:p.status[n.status]??n.status})]}),K]}),b?(0,$.jsxs)(`div`,{className:`mt-2.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-[11px] text-fg-muted`,children:[(0,$.jsx)(`span`,{children:Se(p.agentProgress,{done:n.metrics.doneAgentCount,total:n.metrics.agentCount})}),(0,$.jsxs)(`span`,{children:[C,`%`]})]}),(0,$.jsx)(`div`,{className:`mt-1.5 h-1.5 overflow-hidden rounded-full bg-surface-hover`,children:(0,$.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all`,style:{width:`${C}%`}})})]}):null,J,w?(0,$.jsxs)(`div`,{className:`mt-2 flex items-center gap-1 text-[11px] text-amber-700 dark:text-amber-300`,children:[(0,$.jsx)(H,{className:`size-3 shrink-0`,"aria-hidden":!0}),Se(p.runRowErrorSummary,{count:n.metrics.errorAgentCount})]}):null]}),le,me]})});function _t(e){let t=(0,Q.c)(8),{label:n,disabled:r,tone:a,onClick:o}=e,s=r?`cursor-not-allowed text-fg-subtle`:`text-fg hover:bg-surface-hover`,c=a===`danger`&&!r&&`text-red-600 dark:text-red-300`,l;t[0]!==s||t[1]!==c?(l=i(`block w-full px-3 py-1.5 text-left text-xs`,s,c),t[0]=s,t[1]=c,t[2]=l):l=t[2];let u;return t[3]!==r||t[4]!==n||t[5]!==o||t[6]!==l?(u=(0,$.jsx)(`button`,{type:`button`,disabled:r,onClick:o,className:l,children:n}),t[3]=r,t[4]=n,t[5]=o,t[6]=l,t[7]=u):u=t[7],u}function vt(e){return!e}function yt(e,t){return t.boardColumns[e]}var bt=(0,Z.memo)(function(e){let t=(0,Q.c)(17),{column:n,language:r,localeTag:o,nowMs:s,selectedRunId:c,loading:l,onOpenRun:u,onOpenRunChat:d,onCancelRun:f,onRetryRun:p}=e,m=a(r).workflows,[h,g]=(0,Z.useState)(!1),_=n.id===`succeeded`,v=_?5:n.runs.length,y;t[0]!==v||t[1]!==n.runs||t[2]!==h||t[3]!==_?(y=_&&!h?n.runs.slice(0,v):n.runs,t[0]=v,t[1]=n.runs,t[2]=h,t[3]=_,t[4]=y):y=t[4];let b=y,x=_&&n.runs.length>5&&!h,S=_&&h,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(C=i(`flex max-h-full w-72 min-w-72 max-w-72 shrink-0 flex-col overflow-y-auto rounded-lg bg-surface-base shadow-surface`),t[5]=C):C=t[5];let w;t[6]===n.runs.length?w=t[7]:(w=(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-subtle`,children:n.runs.length}),t[6]=n.runs.length,t[7]=w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(I,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}),t[8]=T):T=t[8];let E=l&&b.length===0?(0,$.jsx)(xt,{}):b.length===0?(0,$.jsx)(`div`,{className:`rounded-lg bg-surface-panel/70 px-3 py-6 text-center text-xs text-fg-subtle`,children:m.boardColumnEmpty}):b.map(e=>(0,$.jsx)(gt,{run:e,language:r,localeTag:o,nowMs:s,selected:e.id===c,onOpen:u,onOpenChat:d,onCancel:f,onRetry:p},e.id)),D=x?(0,$.jsx)(X,{variant:`ghost`,className:`h-8 w-full text-xs`,onClick:()=>g(!0),children:Se(m.boardExpandSucceeded,{count:Math.min(n.runs.length,n.totalInWindow??n.runs.length)})}):null,O;t[9]!==S||t[10]!==m||t[11]!==g?(O=S?(0,$.jsx)(X,{variant:`ghost`,className:`h-8 w-full text-xs`,onClick:()=>g(!1),children:m.boardCollapseSucceeded}):null,t[9]=S,t[10]=m,t[11]=g,t[12]=O):O=t[12];let k;return t[13]!==E||t[14]!==D||t[15]!==O?(k=(0,$.jsxs)(`div`,{className:`mx-2 mt-3 grid min-h-0 min-w-0 content-start gap-2 pb-2 pr-1 [scrollbar-gutter:stable]`,children:[E,D,O]}),t[13]=E,t[14]=D,t[15]=O,t[16]=k):k=t[16],(0,$.jsxs)(`section`,{className:C,"aria-label":yt(n.id,m),children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between gap-2 px-3 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,$.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:yt(n.id,m)}),w]}),T]}),k]})});function xt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`article`,{className:`min-h-24 rounded-lg bg-surface-panel px-3 py-3 shadow-surface`,"aria-hidden":`true`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(ye,{className:`h-4 w-4/5`}),(0,$.jsx)(ye,{className:`mt-2 h-3 w-24`})]}),(0,$.jsx)(ye,{className:`h-5 w-14 rounded-full`})]}),(0,$.jsx)(ye,{className:`mt-3 h-3 w-2/3`}),(0,$.jsx)(ye,{className:`mt-4 h-5 w-20 rounded-full`})]}),e[0]=t):t=e[0],t}function St(e){return e instanceof Element?!!e.closest(`a,button,input,select,textarea,[contenteditable="true"],[draggable="true"],[data-board-pan-skip="true"]`):!0}var Ct=(0,Z.memo)(function(e){let t=(0,Q.c)(54),{runs:n,language:r,localeTag:i,labels:a,searchQuery:o,workflowFilterId:s,triggerFilter:c,selectedRunId:l,loading:u,onOpenRun:d,onOpenRunChat:f,onCancelRun:p,onRetryRun:m,onStart:h}=e,g;t[0]===n?g=t[1]:(g=n.some(wt),t[0]=n,t[1]=g);let _=g,v=(0,Z.useRef)(null),y=(0,Z.useRef)(null),[b,x]=(0,Z.useState)(Tt),[S,C]=(0,Z.useState)(!1),w,T;t[2]===_?(w=t[3],T=t[4]):(w=()=>{if(!_)return;let e=window.setInterval(()=>x(Date.now()),1e3);return()=>window.clearInterval(e)},T=[_],t[2]=_,t[3]=w,t[4]=T),(0,Z.useEffect)(w,T);let E;t[5]!==b||t[6]!==n||t[7]!==o||t[8]!==c||t[9]!==s?(E=ut(ot(n,{searchQuery:o,workflowFilterId:s,triggerFilter:c}),b),t[5]=b,t[6]=n,t[7]=o,t[8]=c,t[9]=s,t[10]=E):E=t[10];let D=E,O=D.reduce(Et,0),k;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>{let t=y.current;!t||t.pointerId!==e.pointerId||(y.current=null,C(!1),e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},t[11]=k):k=t[11];let A=k,j;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{if(e.button!==0||St(e.target))return;let t=v.current;t&&(y.current={pointerId:e.pointerId,startX:e.clientX,scrollLeft:t.scrollLeft,active:!1},e.currentTarget.setPointerCapture(e.pointerId))},t[12]=j):j=t[12];let M=j,N;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{let t=y.current,n=v.current;if(!t||!n||t.pointerId!==e.pointerId)return;let r=e.clientX-t.startX;!t.active&&Math.abs(r)<5||(t.active||(t.active=!0,C(!0)),e.preventDefault(),n.scrollLeft=t.scrollLeft-r)},t[13]=N):N=t[13];let P=N;if(!u&&O===0){let e;t[14]===a.boardEmptyTitle?e=t[15]:(e=(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:a.boardEmptyTitle}),t[14]=a.boardEmptyTitle,t[15]=e);let n;t[16]===a.boardEmptyHint?n=t[17]:(n=(0,$.jsx)(`p`,{className:`mx-auto mt-2 max-w-md text-sm leading-6 text-fg-muted`,children:a.boardEmptyHint}),t[16]=a.boardEmptyHint,t[17]=n);let r;t[18]!==a.boardStart||t[19]!==h?(r=(0,$.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,$.jsx)(X,{variant:`primary`,onClick:h,children:a.boardStart})}),t[18]=a.boardStart,t[19]=h,t[20]=r):r=t[20];let i;return t[21]!==r||t[22]!==e||t[23]!==n?(i=(0,$.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col items-center justify-center rounded-2xl border border-dashed border-edge bg-surface-panel/40 px-6 py-12 text-center`,children:[e,n,r]}),t[21]=r,t[22]=e,t[23]=n,t[24]=i):i=t[24],i}let ee=S?`cursor-grabbing select-none`:`cursor-grab`,F;t[25]===ee?F=t[26]:(F=[`min-h-0 h-full min-w-0 overflow-x-auto rounded-lg px-2 py-2`,ee],t[25]=ee,t[26]=F);let I=F.join(` `),L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{y.current?.pointerId===e.pointerId&&(y.current=null,C(!1))},t[27]=L):L=t[27];let R;if(t[28]!==D||t[29]!==r||t[30]!==u||t[31]!==i||t[32]!==b||t[33]!==p||t[34]!==d||t[35]!==f||t[36]!==m||t[37]!==l){let e;t[39]!==r||t[40]!==u||t[41]!==i||t[42]!==b||t[43]!==p||t[44]!==d||t[45]!==f||t[46]!==m||t[47]!==l?(e=e=>(0,$.jsx)(bt,{column:e,language:r,localeTag:i,nowMs:b,selectedRunId:l,loading:u,onOpenRun:d,onOpenRunChat:f,onCancelRun:p,onRetryRun:m},e.id),t[39]=r,t[40]=u,t[41]=i,t[42]=b,t[43]=p,t[44]=d,t[45]=f,t[46]=m,t[47]=l,t[48]=e):e=t[48],R=D.map(e),t[28]=D,t[29]=r,t[30]=u,t[31]=i,t[32]=b,t[33]=p,t[34]=d,t[35]=f,t[36]=m,t[37]=l,t[38]=R}else R=t[38];let z;t[49]===R?z=t[50]:(z=(0,$.jsx)(`div`,{className:`flex min-h-full min-w-max items-start gap-3 pr-4`,children:R}),t[49]=R,t[50]=z);let B;return t[51]!==I||t[52]!==z?(B=(0,$.jsx)(`div`,{ref:v,className:I,onPointerDown:M,onPointerMove:P,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:L,children:z}),t[51]=I,t[52]=z,t[53]=B):B=t[53],B});function wt(e){return e.status===`queued`||e.status===`running`}function Tt(){return Date.now()}function Et(e,t){return e+t.runs.length}var Dt=`export const meta = {
2
+ name: 'my_workflow',
3
+ description: 'Describe what this workflow does.',
4
+ whenToUse: 'When the user asks for ...',
5
+ examplePrompts: [
6
+ { field: 'goal', text: 'Example goal for this workflow' },
7
+ ],
8
+ tags: ['custom'],
9
+ estimatedAgents: { min: 2, max: 4 },
10
+ phases: [{ title: 'Step 1' }, { title: 'Synthesize' }],
11
+ }
12
+
13
+ phase('Step 1')
14
+ const first = await agent('Do the first step.', { label: 'step 1' })
15
+
16
+ phase('Synthesize')
17
+ return await agent('Summarize:\\n\\n' + first, { label: 'synthesis' })
18
+ `;function Ot(e){let t=(0,Q.c)(48),{open:n,language:r,ownerAgentId:i,saving:o,initialDraft:s,onClose:c,onSave:l,onSaveAndStart:u}=e,d;t[0]===r?d=t[1]:(d=a(r),t[0]=r,t[1]=d);let f=d.workflows,[p,m]=(0,Z.useState)(`ai`),[g,_]=(0,Z.useState)(``),[v,y]=(0,Z.useState)(``),b=s?.mode===`edit`,x=b?f.editWorkflowTitle:f.createWorkflowTitle,S=b?f.editWorkflowHint:s?.mode===`copy`?f.createWorkflowHintFromCopy:f.createWorkflowHint,C,w;t[2]!==s||t[3]!==n?(C=()=>{n&&(m(s?`manual`:`ai`),_(s?.name??``),y(s?.script??``))},w=[s,n],t[2]=s,t[3]=n,t[4]=C,t[5]=w):(C=t[4],w=t[5]),(0,Z.useEffect)(C,w);let T;t[6]===c?T=t[7]:(T=e=>!e&&c(),t[6]=c,t[7]=T);let D;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(K,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),t[8]=D):D=t[8];let O;t[9]===x?O=t[10]:(O=(0,$.jsx)(q,{className:`text-base font-semibold text-fg`,children:x}),t[9]=x,t[10]=O);let k;t[11]===S?k=t[12]:(k=(0,$.jsx)(h,{className:`mt-1 text-sm text-fg-muted`,children:S}),t[11]=S,t[12]=k);let A=p===`ai`,M,N;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>m(`ai`),M=(0,$.jsx)(B,{className:`size-4`,"aria-hidden":!0}),t[13]=M,t[14]=N):(M=t[13],N=t[14]);let P;t[15]!==f.createWorkflowAiTab||t[16]!==A?(P=(0,$.jsx)(kt,{active:A,onClick:N,icon:M,children:f.createWorkflowAiTab}),t[15]=f.createWorkflowAiTab,t[16]=A,t[17]=P):P=t[17];let ee=p===`manual`,F,I;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>m(`manual`),I=(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[18]=F,t[19]=I):(F=t[18],I=t[19]);let L;t[20]!==f.createWorkflowManualTab||t[21]!==ee?(L=(0,$.jsx)(kt,{active:ee,onClick:F,icon:I,children:f.createWorkflowManualTab}),t[20]=f.createWorkflowManualTab,t[21]=ee,t[22]=L):L=t[22];let R;t[23]!==P||t[24]!==L?(R=(0,$.jsxs)(`div`,{className:`mt-4 inline-flex rounded-xl border border-edge bg-surface-base p-1`,children:[P,L]}),t[23]=P,t[24]=L,t[25]=R):R=t[25];let z;t[26]!==R||t[27]!==O||t[28]!==k?(z=(0,$.jsxs)(`div`,{className:`border-b border-edge px-5 py-4`,children:[O,k,R]}),t[26]=R,t[27]=O,t[28]=k,t[29]=z):z=t[29];let V;t[30]!==s||t[31]!==r||t[32]!==p||t[33]!==c||t[34]!==l||t[35]!==u||t[36]!==i||t[37]!==o||t[38]!==g||t[39]!==v?(V=p===`ai`?(0,$.jsx)(At,{language:r,ownerAgentId:i,saving:o,initialDraft:s,name:g,setName:_,script:v,setScript:y,onClose:c,onSave:l,onSaveAndStart:u}):(0,$.jsx)(jt,{language:r,saving:o,initialDraft:s,name:g,setName:_,script:v,setScript:y,onClose:c,onSave:l}),t[30]=s,t[31]=r,t[32]=p,t[33]=c,t[34]=l,t[35]=u,t[36]=i,t[37]=o,t[38]=g,t[39]=v,t[40]=V):V=t[40];let te;t[41]!==z||t[42]!==V?(te=(0,$.jsxs)(E,{children:[D,(0,$.jsxs)(qe,{className:`fixed left-1/2 top-1/2 z-66 flex h-[min(92vh,52rem)] w-[min(100%-2rem,72rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-panel shadow-popover outline-none`,children:[z,V]})]}),t[41]=z,t[42]=V,t[43]=te):te=t[43];let H;return t[44]!==n||t[45]!==te||t[46]!==T?(H=(0,$.jsx)(G,{open:n,onOpenChange:T,children:te}),t[44]=n,t[45]=te,t[46]=T,t[47]=H):H=t[47],H}function kt(e){let t=(0,Q.c)(5),{active:n,onClick:r,icon:i,children:a}=e,o=n?`inline-flex h-8 items-center gap-2 rounded-lg bg-surface-panel px-3 text-sm font-medium text-fg shadow-surface`:`inline-flex h-8 items-center gap-2 rounded-lg px-3 text-sm font-medium text-fg-muted hover:text-fg`,s;return t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==o?(s=(0,$.jsxs)(`button`,{type:`button`,onClick:r,className:o,children:[i,a]}),t[0]=a,t[1]=i,t[2]=r,t[3]=o,t[4]=s):s=t[4],s}function At({language:e,ownerAgentId:t,saving:n,initialDraft:r,name:i,setName:o,script:s,setScript:c,onClose:l,onSave:d,onSaveAndStart:f}){let p=a(e).workflows,[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)({allowNetwork:!1,fileSystem:`read`,maxPhases:4,maxSubagents:8,outputFormat:`report`}),[b,x]=(0,Z.useState)(!1),[S,C]=(0,Z.useState)(null),w=(0,Z.useMemo)(()=>g?.validation.errors.map(e=>e.message)??[],[g]),T=(0,Z.useMemo)(()=>g?.lint.filter(e=>e.severity===`error`)??[],[g]),E=m.trim().length>0&&!b,D=!!(g&&i.trim()&&s.trim()&&g.validation.valid&&T.length===0&&!n),O=s.trim().length>0,k=O?p.nlBuilderEditPromptLabel:p.nlBuilderPromptLabel,A=O?p.nlBuilderEditPromptPlaceholder:p.nlBuilderPromptPlaceholder,j=O?`improve`:`create`,M=async n=>{if(m.trim()){x(!0),C(null);try{let r=await fe({prompt:m,agentId:t,language:e===`zh`?`zh`:`en`,mode:n,existingScript:n===`improve`?s:void 0,constraints:v});_(r),o(r.name),c(r.script)}catch(e){C(e instanceof Error?e.message:p.nlBuilderGenerateFailed)}finally{x(!1)}}},N=async()=>{D&&await d({name:i.trim(),script:s})&&l()},P=async()=>{D&&await f({name:i.trim(),script:s,goal:m.trim()})};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-4 overflow-auto px-5 py-4 lg:grid-cols-[minmax(18rem,0.9fr)_minmax(24rem,1.4fr)]`,children:[(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:k}),(0,$.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),placeholder:A,className:`mt-1.5 min-h-36 w-full resize-y rounded-xl border border-edge bg-surface-base px-3 py-2 text-sm leading-6 text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/20`})]}),(0,$.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,$.jsx)(Mt,{label:p.nlBuilderMaxPhases,value:v.maxPhases??4,min:1,max:8,onChange:e=>y(t=>({...t,maxPhases:e}))}),(0,$.jsx)(Mt,{label:p.nlBuilderMaxAgents,value:v.maxSubagents??8,min:1,max:20,onChange:e=>y(t=>({...t,maxSubagents:e}))})]}),(0,$.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,$.jsxs)(`label`,{className:`flex items-center gap-2 rounded-xl border border-edge bg-surface-base px-3 py-2 text-sm text-fg-muted`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:!!v.allowNetwork,onChange:e=>y(t=>({...t,allowNetwork:e.target.checked}))}),p.nlBuilderAllowNetwork]}),(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:p.nlBuilderFilesystem}),(0,$.jsxs)(u,{value:v.fileSystem??`read`,onChange:e=>y(t=>({...t,fileSystem:e.target.value})),className:`mt-1.5 w-full rounded-xl border border-edge bg-surface-base px-3 py-2 text-sm text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,children:[(0,$.jsx)(Re,{value:`none`,children:`none`}),(0,$.jsx)(Re,{value:`read`,children:`read`}),(0,$.jsx)(Re,{value:`write`,children:`write`})]})]})]}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,$.jsxs)(X,{variant:`primary`,disabled:!E,onClick:()=>void M(j),children:[(0,$.jsx)(B,{className:`size-4`,"aria-hidden":!0}),b?p.nlBuilderGenerating:O?p.nlBuilderRewriteExisting:p.nlBuilderGenerate]})}),S?(0,$.jsx)(Gt,{text:S}):null,g?(0,$.jsx)(It,{draft:g,labels:p}):null]}),(0,$.jsxs)(`section`,{className:`min-w-0 space-y-3`,children:[(0,$.jsx)(Pt,{initialDraft:r,labels:p}),(0,$.jsx)(Nt,{labels:p,name:i,setName:o}),(0,$.jsx)(Ft,{labels:p,script:s,setScript:c,minHeightClass:`min-h-96`}),g?(0,$.jsx)(Lt,{draft:g,labels:p,validationIssues:w}):null]})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(X,{variant:`secondary`,onClick:l,disabled:n||b,children:p.cancelDialog}),(0,$.jsx)(X,{variant:`secondary`,disabled:!D,onClick:()=>void N(),children:n?p.savingWorkflow:p.saveWorkflow}),(0,$.jsx)(X,{variant:`primary`,disabled:!D,onClick:()=>void P(),children:p.nlBuilderSaveAndStart})]})]})}function jt({language:e,saving:t,initialDraft:n,name:r,setName:i,script:o,setScript:s,onClose:c,onSave:l}){let u=a(e).workflows,[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(null),[_,v]=(0,Z.useState)(null),y=r.trim(),b=!!(y&&o.trim());(0,Z.useEffect)(()=>{if(!b){m(!1),g(null),v(null);return}let e=!1,t=window.setTimeout(()=>{m(!0),g(null),Ge(y,o).then(t=>{e||v(t)}).catch(t=>{e||(v(null),g(t instanceof Error?t.message:u.validateWorkflowFailed))}).finally(()=>{e||m(!1)})},450);return()=>{e=!0,window.clearTimeout(t)}},[b,u.validateWorkflowFailed,o,y]);let x=(0,Z.useMemo)(()=>h?[h]:_?.errors.map(e=>e.message)??[],[h,_]),S=d||p||_!=null||h!=null,C=b&&!t&&!p&&_?.valid===!0;(0,Z.useEffect)(()=>{!n&&!o.trim()&&s(Dt),f(!1),m(!1),g(null),v(null)},[n,o,s]);let w=async()=>{if(f(!0),!(!b||t)){m(!0),g(null);try{let e=await Ge(y,o);if(v(e),!e.valid)return;await l({name:y,script:o})&&c()}catch(e){v(null),g(e instanceof Error?e.message:u.validateWorkflowFailed)}finally{m(!1)}}};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-auto px-5 py-4`,children:[(0,$.jsx)(Pt,{initialDraft:n,labels:u}),(0,$.jsx)(Nt,{labels:u,name:r,setName:e=>{i(e),v(null),g(null)}}),(0,$.jsx)(Ft,{labels:u,script:o,setScript:e=>{s(e),v(null),g(null)},minHeightClass:`min-h-72`}),S?(0,$.jsx)(Vt,{labels:u,validating:p,validationIssues:x,validationResult:_}):null]}),(0,$.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(X,{variant:`secondary`,onClick:c,disabled:t,children:u.cancelDialog}),(0,$.jsx)(X,{variant:`primary`,disabled:!C,onClick:()=>void w(),children:t?u.savingWorkflow:u.saveWorkflow})]})]})}function Mt(e){let t=(0,Q.c)(12),{label:n,value:r,min:i,max:a,onChange:o}=e,s;t[0]===n?s=t[1]:(s=(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:n}),t[0]=n,t[1]=s);let c;t[2]===o?c=t[3]:(c=e=>o(Number(e.target.value)||void 0),t[2]=o,t[3]=c);let l;t[4]!==a||t[5]!==i||t[6]!==c||t[7]!==r?(l=(0,$.jsx)(`input`,{type:`number`,min:i,max:a,value:r,onChange:c,className:`mt-1.5 w-full rounded-xl border border-edge bg-surface-base px-3 py-2 text-sm text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`}),t[4]=a,t[5]=i,t[6]=c,t[7]=r,t[8]=l):l=t[8];let u;return t[9]!==s||t[10]!==l?(u=(0,$.jsxs)(`label`,{className:`block`,children:[s,l]}),t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function Nt(e){let t=(0,Q.c)(11),{labels:n,name:r,setName:i}=e,a;t[0]===n.workflowNameLabel?a=t[1]:(a=(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:n.workflowNameLabel}),t[0]=n.workflowNameLabel,t[1]=a);let o;t[2]===i?o=t[3]:(o=e=>i(e.target.value),t[2]=i,t[3]=o);let s;t[4]!==n.workflowNamePlaceholder||t[5]!==r||t[6]!==o?(s=(0,$.jsx)(`input`,{value:r,onChange:o,placeholder:n.workflowNamePlaceholder,className:`mt-1.5 w-full rounded-xl border border-edge bg-surface-base px-3 py-2 font-mono text-sm text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:ring-2 focus:ring-accent/20`}),t[4]=n.workflowNamePlaceholder,t[5]=r,t[6]=o,t[7]=s):s=t[7];let c;return t[8]!==a||t[9]!==s?(c=(0,$.jsxs)(`label`,{className:`block`,children:[a,s]}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}function Pt(e){let t=(0,Q.c)(7),{initialDraft:n,labels:r}=e;if(!n)return null;let i;t[0]!==n.mode||t[1]!==n.sourceTitle||t[2]!==r.copyWorkflowNotice||t[3]!==r.editWorkflowNotice?(i=n.mode===`copy`?r.copyWorkflowNotice.replace(`{{title}}`,n.sourceTitle):r.editWorkflowNotice.replace(`{{title}}`,n.sourceTitle),t[0]=n.mode,t[1]=n.sourceTitle,t[2]=r.copyWorkflowNotice,t[3]=r.editWorkflowNotice,t[4]=i):i=t[4];let a=i,o;return t[5]===a?o=t[6]:(o=(0,$.jsx)(`div`,{className:`rounded-xl border border-accent/20 bg-accent-soft/60 px-3 py-2 text-sm leading-6 text-accent-fg`,children:a}),t[5]=a,t[6]=o),o}function Ft(e){let t=(0,Q.c)(11),{labels:n,script:r,setScript:i,minHeightClass:a}=e,o;t[0]===n.workflowScriptLabel?o=t[1]:(o=(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:n.workflowScriptLabel}),t[0]=n.workflowScriptLabel,t[1]=o);let s;t[2]===i?s=t[3]:(s=e=>i(e.target.value),t[2]=i,t[3]=s);let c=`mt-1.5 w-full resize-y rounded-xl border border-edge bg-surface-base px-3 py-2 font-mono text-xs leading-5 text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/20 ${a}`,l;t[4]!==r||t[5]!==s||t[6]!==c?(l=(0,$.jsx)(`textarea`,{value:r,onChange:s,spellCheck:!1,className:c}),t[4]=r,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==o||t[9]!==l?(u=(0,$.jsxs)(`label`,{className:`block`,children:[o,l]}),t[8]=o,t[9]=l,t[10]=u):u=t[10],u}function It(e){let t=(0,Q.c)(23),{draft:n,labels:r}=e,i=n.manifest.title??n.name,a;t[0]===i?a=t[1]:(a=(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:i}),t[0]=i,t[1]=a);let o;t[2]===n.explanation?o=t[3]:(o=(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:n.explanation}),t[2]=n.explanation,t[3]=o);let s;t[4]!==n.repairAttempts||t[5]!==r.nlBuilderAutoRepaired?(s=n.repairAttempts>0?(0,$.jsx)(`div`,{className:`text-xs font-medium text-accent-fg`,children:r.nlBuilderAutoRepaired.replace(`{count}`,String(n.repairAttempts))}):null,t[4]=n.repairAttempts,t[5]=r.nlBuilderAutoRepaired,t[6]=s):s=t[6];let c;t[7]!==n.permissionsSummary||t[8]!==r.nlBuilderPermissions?(c=(0,$.jsx)(Ut,{title:r.nlBuilderPermissions,items:n.permissionsSummary}),t[7]=n.permissionsSummary,t[8]=r.nlBuilderPermissions,t[9]=c):c=t[9];let l;t[10]!==n.assumptions||t[11]!==r.nlBuilderAssumptions?(l=(0,$.jsx)(Ut,{title:r.nlBuilderAssumptions,items:n.assumptions}),t[10]=n.assumptions,t[11]=r.nlBuilderAssumptions,t[12]=l):l=t[12];let u;t[13]!==n.risks||t[14]!==r.nlBuilderRisks?(u=(0,$.jsx)(Ut,{title:r.nlBuilderRisks,items:n.risks}),t[13]=n.risks,t[14]=r.nlBuilderRisks,t[15]=u):u=t[15];let d;return t[16]!==a||t[17]!==o||t[18]!==s||t[19]!==c||t[20]!==l||t[21]!==u?(d=(0,$.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-edge bg-surface-base/50 p-3`,children:[a,o,s,c,l,u]}),t[16]=a,t[17]=o,t[18]=s,t[19]=c,t[20]=l,t[21]=u,t[22]=d):d=t[22],d}function Lt(e){let t=(0,Q.c)(17),{draft:n,labels:r,validationIssues:i}=e,a=n.lint,o;t[0]!==n.validation.valid||t[1]!==a?(o=n.validation.valid&&a.every(Bt),t[0]=n.validation.valid,t[1]=a,t[2]=o):o=t[2];let s=o,c=s?`rounded-xl border border-emerald-500/30 bg-emerald-500/10 p-3 text-sm text-emerald-800 dark:text-emerald-200`:`rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-800 dark:text-amber-200`,l;t[3]===s?l=t[4]:(l=s?(0,$.jsx)(J,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(H,{className:`size-4`,"aria-hidden":!0}),t[3]=s,t[4]=l);let u=s?r.validationPassed:r.nlBuilderReviewIssues,d;t[5]!==l||t[6]!==u?(d=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[l,u]}),t[5]=l,t[6]=u,t[7]=d):d=t[7];let f;t[8]!==n.validation.definition?.phases||t[9]!==r.validationPreview||t[10]!==a||t[11]!==i?(f=i.length>0||a.length>0?(0,$.jsxs)(`ul`,{className:`mt-2 list-disc space-y-1 pl-5 text-xs leading-5`,children:[i.map(zt),a.map(Rt)]}):(0,$.jsx)(`p`,{className:`mt-1 text-xs opacity-80`,children:r.validationPreview.replace(`{{phaseCount}}`,String(n.validation.definition?.phases.length??0))}),t[8]=n.validation.definition?.phases,t[9]=r.validationPreview,t[10]=a,t[11]=i,t[12]=f):f=t[12];let p;return t[13]!==c||t[14]!==d||t[15]!==f?(p=(0,$.jsxs)(`div`,{className:c,children:[d,f]}),t[13]=c,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function Rt(e){return(0,$.jsx)(`li`,{children:e.message},`${e.code}:${e.message}`)}function zt(e){return(0,$.jsx)(`li`,{children:e},e)}function Bt(e){return e.severity!==`error`}function Vt(e){let t=(0,Q.c)(10),{labels:n,validating:r,validationIssues:i,validationResult:a}=e,o=i.length>0?`rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-200`:`rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-3 py-2 text-sm text-emerald-700 dark:text-emerald-200`,s=r?n.validatingWorkflow:i.length>0?n.validationFailed:n.validationPassed,c;t[0]===s?c=t[1]:(c=(0,$.jsx)(`div`,{className:`font-medium`,children:s}),t[0]=s,t[1]=c);let l;t[2]!==n.validationPreview||t[3]!==i||t[4]!==a?(l=i.length>0?(0,$.jsx)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5`,children:i.map(Ht)}):a?.definition?(0,$.jsx)(`div`,{className:`mt-1 text-xs opacity-80`,children:n.validationPreview.replace(`{{phaseCount}}`,String(a.definition.phases.length))}):null,t[2]=n.validationPreview,t[3]=i,t[4]=a,t[5]=l):l=t[5];let u;return t[6]!==o||t[7]!==c||t[8]!==l?(u=(0,$.jsxs)(`div`,{className:o,role:`status`,children:[c,l]}),t[6]=o,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Ht(e){return(0,$.jsx)(`li`,{children:e},e)}function Ut(e){let t=(0,Q.c)(10),{title:n,items:r}=e;if(!r.length)return null;let i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(Ae,{className:`size-3`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,$.jsxs)(`div`,{className:`mb-1 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle`,children:[i,n]}),t[1]=n,t[2]=a);let o;t[3]===r?o=t[4]:(o=r.slice(0,5).map(Wt),t[3]=r,t[4]=o);let s;t[5]===o?s=t[6]:(s=(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:o}),t[5]=o,t[6]=s);let c;return t[7]!==a||t[8]!==s?(c=(0,$.jsxs)(`div`,{children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function Wt(e){return(0,$.jsx)(`span`,{className:`rounded-lg border border-edge-subtle bg-surface-panel px-2 py-1 text-[11px] text-fg-muted`,children:e},e)}function Gt(e){let t=(0,Q.c)(2),{text:n}=e,r;return t[0]===n?r=t[1]:(r=(0,$.jsx)(`div`,{className:`rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-200`,children:n}),t[0]=n,t[1]=r),r}function Kt(e){let t=(0,Q.c)(57),{open:n,definition:r,language:i,onClose:o,onRun:s}=e,c;t[0]===i?c=t[1]:(c=a(i),t[0]=i,t[1]=c);let l=c.workflows;if(!r)return null;let u;t[2]!==r||t[3]!==i?(u=ae(r,i),t[2]=r,t[3]=i,t[4]=u):u=t[4];let d=u,f=r.runtime?.source??``,p;t[5]===o?p=t[6]:(p=e=>!e&&o(),t[5]=o,t[6]=p);let m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(K,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),t[7]=m):m=t[7];let g;t[8]===r.title?g=t[9]:(g=(0,$.jsx)(q,{className:`text-base font-semibold text-fg`,children:r.title}),t[8]=r.title,t[9]=g);let _;t[10]===d.description?_=t[11]:(_=(0,$.jsx)(h,{className:`mt-1 text-sm text-fg-muted`,children:d.description}),t[10]=d.description,t[11]=_);let v;t[12]!==g||t[13]!==_?(v=(0,$.jsxs)(`div`,{className:`border-b border-edge px-5 py-4`,children:[g,_]}),t[12]=g,t[13]=_,t[14]=v):v=t[14];let y;t[15]!==l.whenToUseHeading||t[16]!==d.whenToUse?(y=d.whenToUse?(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:l.whenToUseHeading}),(0,$.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:d.whenToUse})]}):null,t[15]=l.whenToUseHeading,t[16]=d.whenToUse,t[17]=y):y=t[17];let b;t[18]!==r||t[19]!==l?(b=(0,$.jsx)(Jt,{definition:r,labels:l}),t[18]=r,t[19]=l,t[20]=b):b=t[20];let x;t[21]!==r.inputSchema||t[22]!==l.inputsHeading?(x=r.inputSchema?(0,$.jsx)(Xt,{title:l.inputsHeading,schema:r.inputSchema}):null,t[21]=r.inputSchema,t[22]=l.inputsHeading,t[23]=x):x=t[23];let S;t[24]!==r.outputSchema||t[25]!==l.outputsHeading?(S=r.outputSchema?(0,$.jsx)(Xt,{title:l.outputsHeading,schema:r.outputSchema}):null,t[24]=r.outputSchema,t[25]=l.outputsHeading,t[26]=S):S=t[26];let C;t[27]!==r.phases||t[28]!==l.phasesHeading?(C=r.phases.length>0?(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:l.phasesHeading}),(0,$.jsx)(`ol`,{className:`mt-2 space-y-2`,children:r.phases.map(qt)})]}):null,t[27]=r.phases,t[28]=l.phasesHeading,t[29]=C):C=t[29];let w;t[30]!==l.scriptHeading||t[31]!==f?(w=f?(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:l.scriptHeading}),(0,$.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto rounded-xl border border-edge bg-surface-base/50 p-3 font-mono text-xs leading-5 text-fg-muted`,children:f})]}):null,t[30]=l.scriptHeading,t[31]=f,t[32]=w):w=t[32];let T;t[33]!==x||t[34]!==S||t[35]!==C||t[36]!==w||t[37]!==y||t[38]!==b?(T=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-auto px-5 py-4`,children:[y,b,x,S,C,w]}),t[33]=x,t[34]=S,t[35]=C,t[36]=w,t[37]=y,t[38]=b,t[39]=T):T=t[39];let D;t[40]!==l.closeResult||t[41]!==o?(D=(0,$.jsx)(X,{variant:`secondary`,onClick:o,children:l.closeResult}),t[40]=l.closeResult,t[41]=o,t[42]=D):D=t[42];let O;t[43]!==l.runWorkflow||t[44]!==s?(O=(0,$.jsx)(X,{variant:`primary`,onClick:s,children:l.runWorkflow}),t[43]=l.runWorkflow,t[44]=s,t[45]=O):O=t[45];let k;t[46]!==D||t[47]!==O?(k=(0,$.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-edge px-5 py-4`,children:[D,O]}),t[46]=D,t[47]=O,t[48]=k):k=t[48];let A;t[49]!==T||t[50]!==k||t[51]!==v?(A=(0,$.jsxs)(E,{children:[m,(0,$.jsxs)(qe,{className:`fixed left-1/2 top-1/2 z-66 flex max-h-[min(85vh,44rem)] w-[min(100%-2rem,48rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-panel shadow-popover outline-none`,children:[v,T,k]})]}),t[49]=T,t[50]=k,t[51]=v,t[52]=A):A=t[52];let j;return t[53]!==n||t[54]!==A||t[55]!==p?(j=(0,$.jsx)(G,{open:n,onOpenChange:p,children:A}),t[53]=n,t[54]=A,t[55]=p,t[56]=j):j=t[56],j}function qt(e,t){return(0,$.jsxs)(`li`,{className:`rounded-xl border border-edge bg-surface-base/40 px-3 py-2`,children:[(0,$.jsxs)(`div`,{className:`text-sm font-medium text-fg`,children:[t+1,`. `,e.title]}),e.description?(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:e.description}):null]},e.id)}function Jt(e){let t=(0,Q.c)(39),{definition:n,labels:r}=e,i=n.permissions,a=n.resources,o;t[0]!==r.permissionsTools||t[1]!==i?(o=i?.tools?.length?[r.permissionsTools,i.tools.join(`, `)]:null,t[0]=r.permissionsTools,t[1]=i,t[2]=o):o=t[2];let s;t[3]!==r.networkDisabled||t[4]!==r.networkEnabled||t[5]!==r.permissionsNetwork||t[6]!==i?(s=i?.network==null?null:[r.permissionsNetwork,i.network?r.networkEnabled:r.networkDisabled],t[3]=r.networkDisabled,t[4]=r.networkEnabled,t[5]=r.permissionsNetwork,t[6]=i,t[7]=s):s=t[7];let c;t[8]!==r.permissionsFileSystem||t[9]!==i?(c=i?.fileSystem?[r.permissionsFileSystem,i.fileSystem]:null,t[8]=r.permissionsFileSystem,t[9]=i,t[10]=c):c=t[10];let l;t[11]!==r.permissionsApproval||t[12]!==i?.approvalRequired?(l=i?.approvalRequired?[r.permissionsApproval,r.permissionsApproval]:null,t[11]=r.permissionsApproval,t[12]=i?.approvalRequired,t[13]=l):l=t[13];let u;t[14]!==r.resourcesSkills||t[15]!==a?(u=a?.skills?.length?[r.resourcesSkills,a.skills.join(`, `)]:null,t[14]=r.resourcesSkills,t[15]=a,t[16]=u):u=t[16];let d;t[17]!==r.resourcesContextFiles||t[18]!==a?(d=a?.contextFiles?.length?[r.resourcesContextFiles,a.contextFiles.join(`, `)]:null,t[17]=r.resourcesContextFiles,t[18]=a,t[19]=d):d=t[19];let f;t[20]!==r.resourcesPromptTemplates||t[21]!==a?(f=a?.promptTemplates?.length?[r.resourcesPromptTemplates,a.promptTemplates.join(`, `)]:null,t[20]=r.resourcesPromptTemplates,t[21]=a,t[22]=f):f=t[22];let p;t[23]!==o||t[24]!==s||t[25]!==c||t[26]!==l||t[27]!==u||t[28]!==d||t[29]!==f?(p=[o,s,c,l,u,d,f].filter(Boolean),t[23]=o,t[24]=s,t[25]=c,t[26]=l,t[27]=u,t[28]=d,t[29]=f,t[30]=p):p=t[30];let m=p,h;t[31]===r.capabilitiesHeading?h=t[32]:(h=(0,$.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:r.capabilitiesHeading}),t[31]=r.capabilitiesHeading,t[32]=h);let g;t[33]!==r.capabilityNone||t[34]!==m?(g=m.length>0?(0,$.jsx)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:m.map(Yt)}):(0,$.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:r.capabilityNone}),t[33]=r.capabilityNone,t[34]=m,t[35]=g):g=t[35];let _;return t[36]!==g||t[37]!==h?(_=(0,$.jsxs)(`section`,{children:[h,g]}),t[36]=g,t[37]=h,t[38]=_):_=t[38],_}function Yt(e){let[t,n]=e;return(0,$.jsxs)(`div`,{className:`rounded-xl border border-edge bg-surface-base/40 px-3 py-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-fg-muted`,children:[(0,$.jsx)(Oe,{className:`size-3.5 text-fg-subtle`,"aria-hidden":!0}),t]}),(0,$.jsx)(`div`,{className:`mt-1 break-words text-sm text-fg`,children:n})]},`${t}:${n}`)}function Xt(e){let t=(0,Q.c)(16),{title:n,schema:r}=e,i;t[0]===r.properties?i=t[1]:(i=Object.keys(r.properties??{}),t[0]=r.properties,t[1]=i);let a=i,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(Ae,{className:`size-3.5`,"aria-hidden":!0}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:[o,n]}),t[3]=n,t[4]=s);let c;t[5]===a?c=t[6]:(c=a.length>0?(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:a.map(Zt)}):null,t[5]=a,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`summary`,{className:`cursor-pointer text-xs text-fg-subtle hover:text-fg-muted`,children:`JSON`}),t[7]=l):l=t[7];let u;t[8]===r?u=t[9]:(u=JSON.stringify(r,null,2),t[8]=r,t[9]=u);let d;t[10]===u?d=t[11]:(d=(0,$.jsxs)(`details`,{className:`mt-2`,children:[l,(0,$.jsx)(`pre`,{className:`mt-2 max-h-48 overflow-auto rounded-xl border border-edge bg-surface-base/50 p-3 font-mono text-xs leading-5 text-fg-muted`,children:u})]}),t[10]=u,t[11]=d);let f;return t[12]!==s||t[13]!==c||t[14]!==d?(f=(0,$.jsxs)(`section`,{children:[s,c,d]}),t[12]=s,t[13]=c,t[14]=d,t[15]=f):f=t[15],f}function Zt(e){return(0,$.jsx)(`span`,{className:`rounded-lg border border-edge-subtle bg-surface-base px-2 py-1 text-xs text-fg-muted`,children:e},e)}function Qt(e,t){let n=e.metadata.estimatedAgents;return n?n.min===n.max?Se(t.agentScaleExact,{count:n.min}):Se(t.agentScaleRange,{min:n.min,max:n.max}):null}function $t(e){let t=(0,Q.c)(81),{definition:n,language:r,labels:a,onPick:o,onDetail:s,onEdit:c}=e,l;t[0]!==n||t[1]!==r?(l=ae(n,r),t[0]=n,t[1]=r,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==a?(d=Qt(n,a),t[3]=n,t[4]=a,t[5]=d):d=t[5];let f=d,p=n.metadata.source===`user`,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=i(`group flex h-full flex-col rounded-xl bg-surface-panel p-4 text-left shadow-surface transition-colors`,`hover:bg-surface-hover`),t[6]=m):m=t[6];let h;t[7]!==n||t[8]!==s?(h=()=>s(n),t[7]=n,t[8]=s,t[9]=h):h=t[9];let g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=i(`flex flex-1 flex-col text-left`,Ve.focusRingPanel),t[10]=g):g=t[10];let _=p?`bg-accent-soft text-accent-fg`:`bg-surface-hover text-fg-muted`,v;t[11]===_?v=t[12]:(v=i(`rounded-full px-2 py-0.5 text-[10px] font-medium`,_),t[11]=_,t[12]=v);let b=p?a.badgeUser:a.badgeBuiltin,S;t[13]!==v||t[14]!==b?(S=(0,$.jsx)(`span`,{className:v,children:b}),t[13]=v,t[14]=b,t[15]=S):S=t[15];let C;t[16]!==n.inputSchema||t[17]!==a.inputSchemaBadge?(C=n.inputSchema?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-surface-hover px-2 py-0.5 text-[10px] text-fg-subtle`,children:[(0,$.jsx)(Ae,{className:`size-2.5`,"aria-hidden":!0}),a.inputSchemaBadge]}):null,t[16]=n.inputSchema,t[17]=a.inputSchemaBadge,t[18]=C):C=t[18];let w;t[19]===n.metadata.tags?w=t[20]:(w=n.metadata.tags.slice(0,2).map(en),t[19]=n.metadata.tags,t[20]=w);let T;t[21]!==C||t[22]!==w||t[23]!==S?(T=(0,$.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-1.5`,children:[S,C,w]}),t[21]=C,t[22]=w,t[23]=S,t[24]=T):T=t[24];let E;t[25]===n.title?E=t[26]:(E=(0,$.jsx)(`span`,{className:`line-clamp-2 text-sm font-semibold leading-5 text-fg`,children:n.title}),t[25]=n.title,t[26]=E);let D;t[27]!==T||t[28]!==E?(D=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[T,E]}),t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent-fg opacity-80 transition-opacity group-hover:opacity-100`,children:(0,$.jsx)(y,{className:`size-3.5`,"aria-hidden":!0})}),t[30]=O):O=t[30];let k;t[31]===D?k=t[32]:(k=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[D,O]}),t[31]=D,t[32]=k);let A;t[33]===u.description?A=t[34]:(A=u.description?(0,$.jsx)(`p`,{className:`mt-2 line-clamp-2 text-xs leading-5 text-fg-muted`,children:u.description}):null,t[33]=u.description,t[34]=A);let j;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(Ie,{className:`size-3`,"aria-hidden":!0}),t[35]=j):j=t[35];let M;t[36]!==n.phases.length||t[37]!==a.phaseCount?(M=Se(a.phaseCount,{count:n.phases.length}),t[36]=n.phases.length,t[37]=a.phaseCount,t[38]=M):M=t[38];let N;t[39]===M?N=t[40]:(N=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[j,M]}),t[39]=M,t[40]=N);let P;t[41]===f?P=t[42]:(P=f?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(ee,{className:`size-3`,"aria-hidden":!0}),f]}):null,t[41]=f,t[42]=P);let F;t[43]!==N||t[44]!==P?(F=(0,$.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center gap-3 pt-3 text-[11px] text-fg-subtle`,children:[N,P]}),t[43]=N,t[44]=P,t[45]=F):F=t[45];let I;t[46]!==k||t[47]!==A||t[48]!==F||t[49]!==h?(I=(0,$.jsxs)(`button`,{type:`button`,onClick:h,className:g,children:[k,A,F]}),t[46]=k,t[47]=A,t[48]=F,t[49]=h,t[50]=I):I=t[50];let L;t[51]!==n||t[52]!==o?(L=()=>o(n),t[51]=n,t[52]=o,t[53]=L):L=t[53];let z;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(U,{className:`size-3.5`,"aria-hidden":!0}),t[54]=z):z=t[54];let B;t[55]!==a.runWorkflow||t[56]!==L?(B=(0,$.jsxs)(X,{type:`button`,variant:`primary`,className:`h-8 flex-1 rounded-lg text-xs`,onClick:L,children:[z,a.runWorkflow]}),t[55]=a.runWorkflow,t[56]=L,t[57]=B):B=t[57];let V;t[58]!==n||t[59]!==s?(V=()=>s(n),t[58]=n,t[59]=s,t[60]=V):V=t[60];let te;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(y,{className:`size-3.5`,"aria-hidden":!0}),t[61]=te):te=t[61];let H;t[62]!==a.viewDetails||t[63]!==V?(H=(0,$.jsxs)(X,{type:`button`,variant:`secondary`,className:`h-8 rounded-lg text-xs`,onClick:V,children:[te,a.viewDetails]}),t[62]=a.viewDetails,t[63]=V,t[64]=H):H=t[64];let ne;t[65]!==n||t[66]!==c?(ne=()=>c(n),t[65]=n,t[66]=c,t[67]=ne):ne=t[67];let W;t[68]===p?W=t[69]:(W=p?(0,$.jsx)(x,{className:`size-3.5`,"aria-hidden":!0}):(0,$.jsx)(R,{className:`size-3.5`,"aria-hidden":!0}),t[68]=p,t[69]=W);let G=p?a.editWorkflow:a.copyAndEditWorkflow,K;t[70]!==ne||t[71]!==W||t[72]!==G?(K=(0,$.jsxs)(X,{type:`button`,variant:`secondary`,className:`h-8 rounded-lg text-xs`,onClick:ne,children:[W,G]}),t[70]=ne,t[71]=W,t[72]=G,t[73]=K):K=t[73];let re;t[74]!==B||t[75]!==H||t[76]!==K?(re=(0,$.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2 border-t border-edge-subtle pt-3`,children:[B,H,K]}),t[74]=B,t[75]=H,t[76]=K,t[77]=re):re=t[77];let q;return t[78]!==I||t[79]!==re?(q=(0,$.jsxs)(`article`,{className:m,children:[I,re]}),t[78]=I,t[79]=re,t[80]=q):q=t[80],q}function en(e){return(0,$.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 text-[10px] text-fg-subtle`,children:e},e)}function tn(e,t){return e===`uncategorized`?t.categories.uncategorized:t.categories[e]}function nn(e){let t=(0,Q.c)(11),{definitions:n,language:r,onPick:o,onDetail:s,onEdit:c}=e,l=a(r).workflows,[u,d]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(`all`),h;t[0]!==p||t[1]!==n||t[2]!==u?(h=g(n,u,p,`all`),t[0]=p,t[1]=n,t[2]=u,t[3]=h):h=t[3];let _=h,v;t[4]===_?v=t[5]:(v=f(_),t[4]=_,t[5]=v);let y=v,b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(de,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),t[6]=b):b=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>d(e.target.value),t[7]=x):x=t[7];let S=l.searchPlaceholder,C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=i(`h-10 w-full rounded-xl border border-edge bg-surface-base py-2 pl-10 pr-3 text-sm text-fg`,`placeholder:text-fg-subtle`,Ve.focusRingPanel),t[8]=C):C=t[8];let w=_.length===0?(0,$.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center px-4 py-12 text-center`,children:[(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:l.noDefinitions}),(0,$.jsx)(`p`,{className:`mt-1 max-w-sm text-xs leading-5 text-fg-subtle`,children:l.noDefinitionsHint})]}):p===`all`?(0,$.jsx)(`div`,{className:`flex flex-col gap-6 pb-1`,children:y.map(e=>(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`mb-3 text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:tn(e.category,l)}),(0,$.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:e.items.map(e=>(0,$.jsx)($t,{definition:e,language:r,labels:l,onPick:o,onDetail:s,onEdit:c},e.id))})]},e.category))}):(0,$.jsx)(`div`,{className:`grid grid-cols-1 gap-3 pb-1 sm:grid-cols-2 xl:grid-cols-3`,children:_.map(e=>(0,$.jsx)($t,{definition:e,language:r,labels:l,onPick:o,onDetail:s,onEdit:c},e.id))}),E;return t[9]===w?E=t[10]:(E=(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:w}),t[9]=w,t[10]=E),(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-4`,children:[(0,$.jsxs)(`div`,{className:`relative`,children:[b,(0,$.jsx)(`input`,{value:u,onChange:x,placeholder:S,className:C})]}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":l.categoryFilterAria,children:T.map(e=>(0,$.jsx)(X,{type:`button`,variant:p===e?`secondary`:`ghost`,className:`h-8 rounded-full px-3 py-1.5 text-xs`,onClick:()=>m(e),children:l.categories[e]},e))})]}),E]})}function rn(e){let t=(0,Q.c)(32),{open:n,definitions:r,language:o,onClose:s,onPick:c,onDetail:l,onEdit:u}=e,d;t[0]===o?d=t[1]:(d=a(o),t[0]=o,t[1]=d);let f=d.workflows,p;t[2]===s?p=t[3]:(p=e=>!e&&s(),t[2]=s,t[3]=p);let m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(K,{className:`fixed inset-0 z-50 bg-scrim`}),t[4]=m):m=t[4];let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=i(`pointer-events-auto relative flex h-[min(90vh,840px)] w-full max-w-5xl flex-col`,`rounded-2xl border border-edge bg-surface-panel shadow-popover outline-none`,Ve.focusRingPanel),t[5]=g):g=t[5];let v;t[6]===f.pickStartTitle?v=t[7]:(v=(0,$.jsx)(q,{className:`text-lg font-semibold text-fg`,children:f.pickStartTitle}),t[6]=f.pickStartTitle,t[7]=v);let y;t[8]===f.pickStartHint?y=t[9]:(y=(0,$.jsx)(h,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:f.pickStartHint}),t[8]=f.pickStartHint,t[9]=y);let b;t[10]!==v||t[11]!==y?(b=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[v,y]}),t[10]=v,t[11]=y,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(_,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0}),t[13]=x):x=t[13];let S;t[14]===f.pickStartClose?S=t[15]:(S=(0,$.jsx)(te,{asChild:!0,children:(0,$.jsx)(X,{variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":f.pickStartClose,children:x})}),t[14]=f.pickStartClose,t[15]=S);let C;t[16]!==b||t[17]!==S?(C=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-4 border-b border-edge-subtle px-6 py-5`,children:[b,S]}),t[16]=b,t[17]=S,t[18]=C):C=t[18];let w;t[19]!==r||t[20]!==o||t[21]!==l||t[22]!==u||t[23]!==c?(w=(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-6 py-5`,children:(0,$.jsx)(nn,{definitions:r,language:o,onPick:c,onDetail:l,onEdit:u})}),t[19]=r,t[20]=o,t[21]=l,t[22]=u,t[23]=c,t[24]=w):w=t[24];let T;t[25]!==C||t[26]!==w?(T=(0,$.jsxs)(E,{children:[m,(0,$.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none`,children:(0,$.jsxs)(qe,{className:g,onOpenAutoFocus:an,children:[C,w]})})]}),t[25]=C,t[26]=w,t[27]=T):T=t[27];let D;return t[28]!==n||t[29]!==T||t[30]!==p?(D=(0,$.jsx)(G,{open:n,onOpenChange:p,children:T}),t[28]=n,t[29]=T,t[30]=p,t[31]=D):D=t[31],D}function an(e){return e.preventDefault()}function on(e,t){return t.status[e]??e}function sn(e,t){return t.phaseStatus[e]??e}function cn(e,t){let{run:n}=e;return n.status===`succeeded`?Se(t.runSummarySucceeded,{agents:n.metrics.doneAgentCount,artifacts:n.metrics.artifactCount}):n.status===`failed`||n.status===`timeout`?n.error?.message??t.runSummaryFailedFallback:n.status===`cancelled`?t.runSummaryCancelled:Se(t.runSummaryActive,{done:n.metrics.doneAgentCount,total:n.metrics.agentCount})}function ln(e,t){let{run:n}=e;return n.status===`failed`?t.diagnosticFailedHint:n.status===`timeout`?t.diagnosticTimeoutHint:n.status===`cancelled`?t.diagnosticCancelledHint:n.status===`succeeded`&&n.metrics.errorAgentCount>0?t.diagnosticPartialHint:null}function un(e){return N(e)}function dn({view:e,comparison:t,loading:n,language:r,localeTag:o,activeTab:s,onTabChange:c,onCancel:l,onRetry:u,onReplay:d,onOpenRunId:f,ownerAgentId:m,onClose:h}){let g=a(r).workflows,y=a(r).automations.suggestions,b=Ue(r),x=We(),[C,w]=(0,Z.useState)(!0),[T,O]=(0,Z.useState)(!1),[k,j]=(0,Z.useState)(null),[N,ee]=(0,Z.useState)(!1),[I,L]=(0,Z.useState)(null),[R,B]=(0,Z.useState)(null),[,te]=(0,Z.useState)(0),H=e?.run.status,U=H?Ke.has(H):!1;(0,Z.useEffect)(()=>{e?.run.id&&(w(U||H===`failed`||H===`timeout`),L(null))},[e?.run.id,U,H,e?.run.metrics.errorAgentCount]),(0,Z.useEffect)(()=>{if(!U)return;let e=window.setInterval(()=>te(e=>e+1),1e3);return()=>window.clearInterval(e)},[U]);let W=(0,Z.useMemo)(()=>e?ce(e):null,[e]),re=(0,Z.useMemo)(()=>W?ke(W):{phases:[],unphased:null},[W]),J=(0,Z.useMemo)(()=>k==null||!W?null:W.agents.find(e=>e.id===k)??null,[k,W]);(0,Z.useEffect)(()=>{W?.runId&&j((W.agents.find(e=>e.status===`error`||e.status===`skipped`)??W.agents.find(e=>e.status===`running`)??null)?.id??null)},[W?.runId]);let ie=(0,Z.useCallback)(e=>{j(e.id)},[]),ae=(0,Z.useMemo)(()=>e?v(e):[],[e]),oe=e?M(e.run.result):void 0,se=oe?En(oe):null,le=oe?D(oe):``,ue=!!oe,de=(0,Z.useCallback)(async()=>{ue&&await Te(le)&&(ee(!0),window.setTimeout(()=>ee(!1),1500))},[ue,le]),fe=(0,Z.useCallback)(()=>{if(!ue||!e)return;let t=new Blob([le],{type:`text/markdown;charset=utf-8`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`${e.run.definitionId}-${e.run.id.slice(0,8)}.md`,r.click(),URL.revokeObjectURL(n)},[ue,le,e]),pe=(0,Z.useCallback)(()=>{if(!e)return;let t=un(e);t&&x(V(t))},[x,e]),me=(0,Z.useCallback)(async t=>{if(e){L(null),B(t.id);try{wn(await Be(e.run.id,t.id,{ownerAgentId:m}),t.name||t.id)}catch(e){L(e instanceof Error?e.message:String(e))}finally{B(null)}}},[m,e]),he=(0,Z.useCallback)(t=>{if(!e||!t.prompt)return;let n=un(e);if(!n){Te(t.prompt);return}x(V(n,t.prompt))},[x,e]),ge=(0,Z.useCallback)(t=>{if(!e||t==null)return;let n=String(t),r=e.agents.findIndex(e=>String(e.id)===n);if(r<0)return;let i=Number.parseInt(n,10);j(Number.isFinite(i)?i:r+1)},[e]),_e=e?un(e):null,ye=H===`failed`;if(n)return(0,$.jsx)(G,{open:!0,onOpenChange:e=>!e&&h(),children:(0,$.jsxs)(E,{children:[(0,$.jsx)(K,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,$.jsxs)(qe,{className:`fixed left-1/2 top-1/2 z-66 flex h-[min(85vh,44rem)] w-[min(100%-2rem,48rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-panel shadow-popover outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-5 py-4`,children:[(0,$.jsx)(q,{className:`text-base font-semibold tracking-tight text-fg`,children:g.runSummaryTitle}),(0,$.jsx)(X,{type:`button`,variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":g.pickStartClose,onClick:h,children:(0,$.jsx)(_,{className:`size-5`,"aria-hidden":!0})})]}),(0,$.jsx)(`div`,{className:`p-5 text-sm text-fg-muted`,children:g.loading})]})]})});if(!e||!W)return null;let{run:be}=e,xe=e.controls.canCancel&&U,Ce=U&&be.startedAtMs!=null?F(Date.now()-be.startedAtMs):F(be.metrics.durationMs??void 0),we=cn(e,g),Ee=ln(e,g),Oe=e.controls.canRetry&&e.agents.some(e=>(e.status===`error`||e.status===`skipped`)&&e.prompt?.trim()),Ae=e.controls.canRetry&&(e.phases.some(t=>t.status===`failed`&&e.agents.some(e=>e.phaseId===t.id&&e.prompt?.trim()))||e.agents.some(e=>(e.status===`error`||e.status===`skipped`)&&e.phaseId&&e.prompt?.trim())),Me=be.goal?.trim()||be.title,Ne=ae.length>0||!!Ee,Pe=!!_e||xe,Fe=e.controls.canRetry||Oe||Ae,Ie=ue,Le=Pe||Fe||Ie,Re=s===`diagnostics`||s===`debug`?`process`:s;return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(G,{open:!0,onOpenChange:e=>!e&&h(),children:(0,$.jsxs)(E,{children:[(0,$.jsx)(K,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,$.jsxs)(qe,{className:`fixed left-1/2 top-1/2 z-66 flex h-[min(90vh,52rem)] w-[min(100%-2rem,64rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-panel shadow-popover outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-5 py-4`,children:[(0,$.jsx)(q,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:Me}),(0,$.jsx)(X,{type:`button`,variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":g.pickStartClose,onClick:h,children:(0,$.jsx)(_,{className:`size-5`,"aria-hidden":!0})})]}),(0,$.jsxs)(`section`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:[(0,$.jsxs)(`header`,{className:`rounded-2xl border border-edge-subtle bg-surface-base/60 p-4`,children:[(0,$.jsx)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`,children:(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`h2`,{className:`text-lg font-semibold leading-7 text-fg`,children:Me}),(0,$.jsx)(`span`,{className:i(`rounded-full px-2 py-0.5 text-xs font-medium`,S(be.status)),children:on(be.status,g)})]}),(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:[be.title,` · `,be.definitionId]}),(0,$.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:we}),Ee?(0,$.jsx)(`p`,{className:`mt-2 text-xs leading-5 text-fg-subtle`,children:Ee}):null]})}),(0,$.jsxs)(`dl`,{className:`mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,$.jsx)(jn,{label:g.metrics.startedAt,value:Y(be.startedAtMs??be.createdAtMs,o)}),(0,$.jsx)(jn,{label:g.metrics.duration,value:Ce}),(0,$.jsx)(jn,{label:g.metrics.agents,value:Se(g.agentProgress,{done:be.metrics.doneAgentCount,total:be.metrics.agentCount})}),(0,$.jsx)(jn,{label:g.metrics.artifacts,value:String(be.metrics.artifactCount)})]})]}),(0,$.jsx)(ve,{eventType:`workflow.run.completed`,source:`workflows`,payloadKey:`runId`,payloadValue:be.id,className:`mt-4`}),ye?(0,$.jsx)(Ye,{title:y.workflowFailedTitle,description:y.workflowFailedDescription,prompt:Se(y.workflowFailedPrompt,{runId:be.id,definitionId:be.definitionId}),coverage:{eventType:`workflow.run.completed`,source:`workflows`,eventPayload:{runId:be.id,status:`failed`}},className:`mt-4`}):null,(0,$.jsx)(pn,{activeTab:Re,onChange:c,labels:g,artifactCount:se?.artifacts.length??e.artifacts.length}),Re===`result`?(0,$.jsxs)(`section`,{className:`mt-5 space-y-4`,children:[ue?(0,$.jsx)(`div`,{className:`rounded-xl border border-edge bg-surface-base/50 p-3`,children:(0,$.jsx)(z,{result:oe,labels:b.result})}):(0,$.jsx)(`div`,{className:`rounded-xl border border-dashed border-edge p-4 text-sm text-fg-muted`,children:g.noResult}),Le?(0,$.jsxs)(`section`,{className:`rounded-2xl border border-edge-subtle bg-surface-base/35 p-4`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:g.nextActionsTitle}),(0,$.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-3`,children:[Pe?(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h4`,{className:`text-xs font-medium text-fg-subtle`,children:g.primaryActionsTitle}),(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[_e?(0,$.jsxs)(X,{variant:`primary`,onClick:pe,children:[(0,$.jsx)(ne,{className:`size-4`,"aria-hidden":!0}),g.continueInChat]}):null,xe?(0,$.jsxs)(X,{variant:`secondary`,onClick:l,className:`text-red-600 dark:text-red-300`,children:[(0,$.jsx)(A,{className:`size-4`,"aria-hidden":!0}),g.cancel]}):null]})]}):null,Fe?(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h4`,{className:`text-xs font-medium text-fg-subtle`,children:g.recoveryActionsTitle}),(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[Oe?(0,$.jsxs)(X,{variant:`secondary`,onClick:()=>d(`failed_agents`),children:[(0,$.jsx)(je,{className:`size-4`,"aria-hidden":!0}),g.replayFailedAgents]}):null,Ae?(0,$.jsxs)(X,{variant:`secondary`,onClick:()=>d(`failed_phases`),children:[(0,$.jsx)(je,{className:`size-4`,"aria-hidden":!0}),g.replayFailedPhases]}):null,e.controls.canRetry?(0,$.jsxs)(X,{variant:`secondary`,onClick:u,children:[(0,$.jsx)(je,{className:`size-4`,"aria-hidden":!0}),g.rerun]}):null]})]}):null,Ie?(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h4`,{className:`text-xs font-medium text-fg-subtle`,children:g.resultActionsTitle}),(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,$.jsxs)(X,{variant:`secondary`,onClick:de,children:[N?(0,$.jsx)(De,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(P,{className:`size-4`,"aria-hidden":!0}),N?g.copied:g.copyResult]}),(0,$.jsxs)(X,{variant:`secondary`,onClick:fe,children:[(0,$.jsx)(p,{className:`size-4`,"aria-hidden":!0}),g.exportResult]})]})]}):null]})]}):null,Ne?(0,$.jsx)(fn,{diagnostics:ae,labels:g,hint:Ee,onOpenAgent:ge}):null,(0,$.jsx)(bn,{view:e,comparison:t,labels:g,onOpenRunId:f})]}):null,Re===`process`?(0,$.jsxs)($.Fragment,{children:[Ne?(0,$.jsx)(fn,{diagnostics:ae,labels:g,hint:Ee,onOpenAgent:ge}):null,(0,$.jsx)(mn,{snapshot:W,rollup:re,view:e,labels:g,cardLabels:b,isActive:U,processExpanded:C,logsExpanded:T,selectedAgentId:k,selectedAgent:J,durationText:Ce,onToggleProcess:()=>w(e=>!e),onToggleLogs:()=>O(e=>!e),onSelectAgent:ie})]}):null,Re===`artifacts`?(0,$.jsx)(Cn,{outcome:se,labels:g,downloadingArtifactId:R,downloadError:I,onCopyText:e=>void Te(e),onDownloadArtifact:e=>void me(e),onStartFollowUp:he}):null]})]})]})})})}function fn(e){let t=(0,Q.c)(13),{diagnostics:n,labels:r,hint:i,onOpenAgent:a}=e;if(n.length===0&&!i)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`div`,{className:`rounded-xl bg-rose-500/10 p-2 text-rose-700 dark:text-rose-300`,children:(0,$.jsx)(H,{className:`size-4`,"aria-hidden":!0})}),t[0]=o):o=t[0];let s;t[1]===r.reliabilityTitle?s=t[2]:(s=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:r.reliabilityTitle}),t[1]=r.reliabilityTitle,t[2]=s);let c=i??r.reliabilityHint,l;t[3]===c?l=t[4]:(l=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:c}),t[3]=c,t[4]=l);let u;t[5]!==n||t[6]!==r||t[7]!==a?(u=n.length>0?(0,$.jsx)(`ul`,{className:`mt-3 space-y-2`,children:n.slice(0,5).map(e=>(0,$.jsx)(`li`,{className:`rounded-xl border border-edge-subtle bg-surface-panel px-3 py-2`,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:yn(e,r)}),e.message?(0,$.jsx)(`div`,{className:`mt-0.5 text-xs leading-5 text-fg-muted`,children:e.message}):null,e.detail?(0,$.jsx)(`div`,{className:`mt-0.5 line-clamp-2 text-xs leading-5 text-fg-subtle`,children:e.detail}):null]}),e.agentId==null?null:(0,$.jsx)(X,{type:`button`,variant:`ghost`,className:`h-8 shrink-0 px-2 text-xs`,onClick:()=>a(e.agentId),children:r.openAgentDetails})]})},e.key))}):null,t[5]=n,t[6]=r,t[7]=a,t[8]=u):u=t[8];let d;return t[9]!==s||t[10]!==l||t[11]!==u?(d=(0,$.jsx)(`section`,{className:`mt-5 rounded-2xl border border-rose-500/20 bg-rose-500/5 p-4`,children:(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[s,l,u]})]})}),t[9]=s,t[10]=l,t[11]=u,t[12]=d):d=t[12],d}function pn(e){let t=(0,Q.c)(16),{activeTab:n,onChange:r,labels:i,artifactCount:a}=e,o;t[0]===i.resultTitle?o=t[1]:(o={id:`result`,label:i.resultTitle},t[0]=i.resultTitle,t[1]=o);let s;t[2]===i.process?s=t[3]:(s={id:`process`,label:i.process},t[2]=i.process,t[3]=s);let c=a||void 0,l;t[4]!==i.outcomeArtifacts||t[5]!==c?(l={id:`artifacts`,label:i.outcomeArtifacts,count:c},t[4]=i.outcomeArtifacts,t[5]=c,t[6]=l):l=t[6];let u;t[7]!==o||t[8]!==s||t[9]!==l?(u=[o,s,l],t[7]=o,t[8]=s,t[9]=l,t[10]=u):u=t[10];let d=u,f;return t[11]!==n||t[12]!==i.taskActionsAria||t[13]!==r||t[14]!==d?(f=(0,$.jsx)(`div`,{className:`mt-5 flex overflow-x-auto border-b border-edge pb-2`,children:(0,$.jsx)(Je,{items:d,activeTab:n,onChange:r,ariaLabel:i.taskActionsAria})}),t[11]=n,t[12]=i.taskActionsAria,t[13]=r,t[14]=d,t[15]=f):f=t[15],f}function mn(e){let t=(0,Q.c)(37),{snapshot:n,rollup:r,view:a,labels:o,cardLabels:s,isActive:c,processExpanded:u,logsExpanded:d,selectedAgentId:f,selectedAgent:p,durationText:m,onToggleProcess:h,onToggleLogs:g,onSelectAgent:_}=e,v;t[0]===o.process?v=t[1]:(v=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:o.process}),t[0]=o.process,t[1]=v);let y;t[2]!==o.agentProgress||t[3]!==a.run.metrics.agentCount||t[4]!==a.run.metrics.doneAgentCount?(y=Se(o.agentProgress,{done:a.run.metrics.doneAgentCount,total:a.run.metrics.agentCount}),t[2]=o.agentProgress,t[3]=a.run.metrics.agentCount,t[4]=a.run.metrics.doneAgentCount,t[5]=y):y=t[5];let b;t[6]!==m||t[7]!==y?(b=(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:[y,` · `,m]}),t[6]=m,t[7]=y,t[8]=b):b=t[8];let x;t[9]!==v||t[10]!==b?(x=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[v,b]}),t[9]=v,t[10]=b,t[11]=x):x=t[11];let S=u?`rotate-180`:null,C;t[12]===S?C=t[13]:(C=i(`size-4 shrink-0 text-fg-subtle transition-transform`,S),t[12]=S,t[13]=C);let w;t[14]===C?w=t[15]:(w=(0,$.jsx)(Le,{className:C,"aria-hidden":!0}),t[14]=C,t[15]=w);let T;t[16]!==h||t[17]!==u||t[18]!==x||t[19]!==w?(T=(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-4 px-4 py-3 text-left`,onClick:h,"aria-expanded":u,children:[x,w]}),t[16]=h,t[17]=u,t[18]=x,t[19]=w,t[20]=T):T=t[20];let E;t[21]!==s||t[22]!==c||t[23]!==o||t[24]!==d||t[25]!==_||t[26]!==g||t[27]!==u||t[28]!==r||t[29]!==p||t[30]!==f||t[31]!==n||t[32]!==a.phases?(E=u?(0,$.jsx)(`div`,{className:`border-t border-edge px-4 pb-4 pt-4`,children:(0,$.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(20rem,26rem)]`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[c?(0,$.jsx)(he,{snapshot:n,labels:s,logsExpanded:d,onToggleLogs:g,selectedAgentId:f,onSelectAgent:_}):(0,$.jsx)(l,{rollup:r,currentPhase:n.currentPhase,labels:s.phase,recentLogs:n.logs,recentLogsHeading:s.recentLogsHeading,showAllLogsLabel:s.showAllLogs,logsExpanded:d,onToggleLogs:g,selectedAgentId:f,onSelectAgent:_}),a.phases.length>0?(0,$.jsx)(`div`,{className:`mt-4 grid gap-2 sm:grid-cols-2`,children:a.phases.map(e=>(0,$.jsx)(`div`,{className:`rounded-xl border border-edge bg-surface-panel px-3 py-2`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-fg`,children:e.title}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:sn(e.status,o)})]})},e.id))}):null]}),(0,$.jsx)(hn,{agent:p,snapshot:n,labels:o,cardLabels:s})]})}):null,t[21]=s,t[22]=c,t[23]=o,t[24]=d,t[25]=_,t[26]=g,t[27]=u,t[28]=r,t[29]=p,t[30]=f,t[31]=n,t[32]=a.phases,t[33]=E):E=t[33];let D;return t[34]!==T||t[35]!==E?(D=(0,$.jsxs)(`div`,{className:`mt-5 rounded-2xl border border-edge bg-surface-base/35`,children:[T,E]}),t[34]=T,t[35]=E,t[36]=D):D=t[36],D}function hn(e){let t=(0,Q.c)(68),{agent:n,snapshot:r,labels:a,cardLabels:o}=e,[s,c]=(0,Z.useState)(!1),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{c(!1)},t[0]=l):l=t[0];let u=n?.id,d;if(t[1]===u?d=t[2]:(d=[u],t[1]=u,t[2]=d),(0,Z.useEffect)(l,d),!n){let e;return t[3]===a.noSubagents?e=t[4]:(e=(0,$.jsx)(`aside`,{className:`min-w-0 rounded-2xl border border-dashed border-edge bg-surface-panel/45 p-4 text-sm text-fg-muted`,children:a.noSubagents}),t[3]=a.noSubagents,t[4]=e),e}let f;t[5]===n?f=t[6]:(f=ze(n),t[5]=n,t[6]=f);let p=f,m=n.error||n.resultPreview||n.currentStep||o.checkDetail.runningPlaceholder,h;t[7]===n.label?h=t[8]:(h=(0,$.jsx)(`h3`,{className:`truncate text-sm font-semibold text-fg`,children:n.label}),t[7]=n.label,t[8]=h);let g=n.phase||a.process,_;t[9]===g?_=t[10]:(_=(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:g}),t[9]=g,t[10]=_);let v;t[11]!==h||t[12]!==_?(v=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[h,_]}),t[11]=h,t[12]=_,t[13]=v):v=t[13];let y;t[14]===n.status?y=t[15]:(y=i(`rounded-full px-2 py-0.5 text-xs font-medium`,An(n.status)),t[14]=n.status,t[15]=y);let b=a.agentStatus[n.status]??n.status,x;t[16]!==b||t[17]!==y?(x=(0,$.jsx)(`span`,{className:y,children:b}),t[16]=b,t[17]=y,t[18]=x):x=t[18];let S;t[19]!==x||t[20]!==v?(S=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[v,x]}),t[19]=x,t[20]=v,t[21]=S):S=t[21];let C=n.invocation?.modelRef??n.invocation?.resolvedModelRef??`—`,w;t[22]!==a.agentInvocationModel||t[23]!==C?(w=(0,$.jsx)(Mn,{label:a.agentInvocationModel,value:C}),t[22]=a.agentInvocationModel,t[23]=C,t[24]=w):w=t[24];let T=p||`—`,E;t[25]!==a.metrics.duration||t[26]!==T?(E=(0,$.jsx)(Mn,{label:a.metrics.duration,value:T}),t[25]=a.metrics.duration,t[26]=T,t[27]=E):E=t[27];let D;t[28]!==w||t[29]!==E?(D=(0,$.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-xs sm:grid-cols-2 xl:grid-cols-1`,children:[w,E]}),t[28]=w,t[29]=E,t[30]=D):D=t[30];let O;t[31]===a.agentOutputHeading?O=t[32]:(O=(0,$.jsx)(`h4`,{className:`text-xs font-semibold text-fg`,children:a.agentOutputHeading}),t[31]=a.agentOutputHeading,t[32]=O);let k=n.error?`font-mono text-rose-600 dark:text-rose-400`:`text-fg-muted`,A;t[33]===k?A=t[34]:(A=i(`mt-2 max-h-72 overflow-auto whitespace-pre-wrap wrap-break-word text-sm leading-6`,k),t[33]=k,t[34]=A);let j;t[35]!==m||t[36]!==A?(j=(0,$.jsx)(`div`,{className:A,children:m}),t[35]=m,t[36]=A,t[37]=j):j=t[37];let M;t[38]!==O||t[39]!==j?(M=(0,$.jsxs)(`section`,{className:`mt-4 rounded-xl border border-edge-subtle bg-surface-base/60 p-3`,children:[O,j]}),t[38]=O,t[39]=j,t[40]=M):M=t[40];let N;t[41]!==n.steps||t[42]!==o?(N=n.steps?.length?(0,$.jsxs)(`section`,{className:`mt-3 rounded-xl border border-edge-subtle bg-surface-base/40 p-3`,children:[(0,$.jsx)(`h4`,{className:`text-xs font-semibold text-fg`,children:o.checkDetail.stepsHeading}),(0,$.jsx)(`div`,{className:`mt-2 space-y-2`,children:n.steps.slice(0,4).map(vn)})]}):null,t[41]=n.steps,t[42]=o,t[43]=N):N=t[43];let P;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>c(_n),t[44]=P):P=t[44];let ee=a.debugDetailsTitle,F=s&&`rotate-180`,I;t[45]===F?I=t[46]:(I=i(`size-4 shrink-0 text-fg-subtle transition-transform`,F),t[45]=F,t[46]=I);let L;t[47]===I?L=t[48]:(L=(0,$.jsx)(Le,{className:I,"aria-hidden":!0}),t[47]=I,t[48]=L);let R;t[49]!==s||t[50]!==a.debugDetailsTitle||t[51]!==L?(R=(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-xs font-semibold text-fg`,onClick:P,"aria-expanded":s,children:[ee,L]}),t[49]=s,t[50]=a.debugDetailsTitle,t[51]=L,t[52]=R):R=t[52];let z;t[53]!==s||t[54]!==n||t[55]!==o||t[56]!==a||t[57]!==r?(z=s?(0,$.jsxs)(`div`,{className:`space-y-3 border-t border-edge-subtle p-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-wide text-fg-subtle`,children:a.agentInputHeading}),(0,$.jsx)(`pre`,{className:`mt-1 max-h-44 overflow-auto whitespace-pre-wrap wrap-break-word rounded-lg bg-surface-panel p-2 font-mono text-xs leading-5 text-fg-muted`,children:n.prompt||`—`})]}),(0,$.jsx)(Dn,{agent:n,labels:a}),r.logs.length>0?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-wide text-fg-subtle`,children:o.recentLogsHeading}),(0,$.jsx)(`div`,{className:`mt-1 max-h-36 space-y-0.5 overflow-auto rounded-lg bg-surface-panel p-2 font-mono text-xs text-fg-subtle`,children:r.logs.map(gn)})]}):null]}):null,t[53]=s,t[54]=n,t[55]=o,t[56]=a,t[57]=r,t[58]=z):z=t[58];let B;t[59]!==R||t[60]!==z?(B=(0,$.jsxs)(`section`,{className:`mt-3 rounded-xl border border-edge-subtle bg-surface-base/40`,children:[R,z]}),t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;return t[62]!==S||t[63]!==D||t[64]!==M||t[65]!==N||t[66]!==B?(V=(0,$.jsxs)(`aside`,{className:`min-w-0 rounded-2xl border border-edge bg-surface-panel p-4`,children:[S,D,M,N,B]}),t[62]=S,t[63]=D,t[64]=M,t[65]=N,t[66]=B,t[67]=V):V=t[67],V}function gn(e){return(0,$.jsx)(`div`,{className:`wrap-break-word`,children:e},e)}function _n(e){return!e}function vn(e){return(0,$.jsxs)(`div`,{className:`rounded-lg bg-surface-panel px-2.5 py-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium text-fg`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-fg-subtle`,children:e.status})]}),e.detail||e.resultPreview||e.error?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs leading-5 text-fg-muted`,children:e.error||e.resultPreview||e.detail}):null]},e.id)}function yn(e,t){return e.kind===`run_error`?e.code?Se(t.diagnosticsRunErrorWithCode,{code:e.code}):t.diagnosticsRunError:e.kind===`agent_error`?Se(t.diagnosticsAgentError,{agent:e.agentLabel??String(e.agentId??`—`)}):e.kind===`step_error`?Se(t.diagnosticsStepError,{agent:e.agentLabel??String(e.agentId??`—`),step:e.stepLabel??e.stepId??`—`}):Se(t.diagnosticsAgentSkipped,{agent:e.agentLabel??String(e.agentId??`—`)})}function bn(e){let t=(0,Q.c)(36),{view:n,comparison:r,labels:i,onOpenRunId:a}=e,o=n.run.metadata?.replay;if(!o)return null;let s;t[0]===i.replayLineageTitle?s=t[1]:(s=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:i.replayLineageTitle}),t[0]=i.replayLineageTitle,t[1]=s);let c;t[2]!==i||t[3]!==o.scope||t[4]!==o.targetCount?(c=Se(i.replayLineageSummary,{scope:Sn(o.scope,i),count:o.targetCount}),t[2]=i,t[3]=o.scope,t[4]=o.targetCount,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:c}),t[6]=c,t[7]=l);let u;t[8]!==i.replaySourceRun||t[9]!==o.sourceRunId?(u=(0,$.jsx)(Mn,{label:i.replaySourceRun,value:o.sourceRunId}),t[8]=i.replaySourceRun,t[9]=o.sourceRunId,t[10]=u):u=t[10];let d=i.replayTargetAgents,f;t[11]===o.agentIds?f=t[12]:(f=o.agentIds.join(`, `),t[11]=o.agentIds,t[12]=f);let p;t[13]!==i.replayTargetAgents||t[14]!==f?(p=(0,$.jsx)(Mn,{label:d,value:f}),t[13]=i.replayTargetAgents,t[14]=f,t[15]=p):p=t[15];let m;t[16]!==u||t[17]!==p?(m=(0,$.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-xs sm:grid-cols-2`,children:[u,p]}),t[16]=u,t[17]=p,t[18]=m):m=t[18];let h;t[19]!==r||t[20]!==i.replayDurationDelta||t[21]!==i.replayFixedAgents||t[22]!==i.replayStillFailingAgents?(h=r?(0,$.jsxs)(`div`,{className:`mt-3 grid gap-2 sm:grid-cols-3`,children:[(0,$.jsx)(jn,{label:i.replayFixedAgents,value:String(r.fixedAgentIds.length)}),(0,$.jsx)(jn,{label:i.replayStillFailingAgents,value:String(r.stillFailingAgentIds.length)}),(0,$.jsx)(jn,{label:i.replayDurationDelta,value:xn(r.durationDeltaMs)})]}):null,t[19]=r,t[20]=i.replayDurationDelta,t[21]=i.replayFixedAgents,t[22]=i.replayStillFailingAgents,t[23]=h):h=t[23];let g;t[24]!==s||t[25]!==l||t[26]!==m||t[27]!==h?(g=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[s,l,m,h]}),t[24]=s,t[25]=l,t[26]=m,t[27]=h,t[28]=g):g=t[28];let _;t[29]!==i.replayOpenSource||t[30]!==a||t[31]!==o.sourceRunId?(_=a?(0,$.jsx)(X,{type:`button`,variant:`secondary`,className:`shrink-0`,onClick:()=>a(o.sourceRunId),children:i.replayOpenSource}):null,t[29]=i.replayOpenSource,t[30]=a,t[31]=o.sourceRunId,t[32]=_):_=t[32];let v;return t[33]!==g||t[34]!==_?(v=(0,$.jsx)(`section`,{className:`mt-5 rounded-2xl border border-edge-subtle bg-surface-base/35 p-4`,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[g,_]})}),t[33]=g,t[34]=_,t[35]=v):v=t[35],v}function xn(e){return e==null?`—`:`${e>0?`+`:e<0?`-`:``}${F(Math.abs(e))}`}function Sn(e,t){return e===`failed_phases`?t.replayScopeFailedPhases:t.replayScopeFailedAgents}function Cn(e){let t=(0,Q.c)(20),{outcome:n,labels:r,downloadingArtifactId:i,downloadError:a,onCopyText:o,onDownloadArtifact:s,onStartFollowUp:c}=e;if(!n||!n.artifacts.length&&!n.followUps.length&&n.structuredOutput===void 0){let e;return t[0]===r.noArtifacts?e=t[1]:(e=(0,$.jsx)(`section`,{className:`mt-5 rounded-xl border border-dashed border-edge p-4 text-sm text-fg-muted`,children:r.noArtifacts}),t[0]=r.noArtifacts,t[1]=e),e}let l;t[2]!==a||t[3]!==i||t[4]!==r||t[5]!==s||t[6]!==n.artifacts?(l=n.artifacts.length>0?(0,$.jsxs)(Tn,{title:r.outcomeArtifacts,children:[(0,$.jsx)(`ul`,{className:`space-y-2`,children:n.artifacts.map(e=>(0,$.jsxs)(`li`,{className:`min-w-0 rounded-lg bg-surface-base px-2.5 py-2`,children:[(0,$.jsx)(`div`,{className:`truncate text-sm font-medium text-fg`,title:e.title??e.name,children:e.title??e.name}),(0,$.jsx)(`div`,{className:`mt-0.5 text-xs text-fg-subtle`,children:e.mimeType}),(0,$.jsxs)(`button`,{type:`button`,className:`mt-1 inline-flex items-center gap-1 text-xs font-medium text-accent-fg hover:underline disabled:cursor-wait disabled:opacity-60`,disabled:i===e.id,onClick:()=>s(e),children:[(0,$.jsx)(p,{className:`size-3`,"aria-hidden":!0}),i===e.id?r.downloadingArtifact:r.downloadArtifact]})]},e.id))}),a?(0,$.jsx)(`p`,{className:`mt-2 text-xs leading-5 text-rose-600 dark:text-rose-400`,children:a}):null]}):null,t[2]=a,t[3]=i,t[4]=r,t[5]=s,t[6]=n.artifacts,t[7]=l):l=t[7];let u;t[8]!==r||t[9]!==o||t[10]!==c||t[11]!==n.followUps?(u=n.followUps.length>0?(0,$.jsx)(Tn,{title:r.outcomeFollowUps,children:(0,$.jsx)(`ul`,{className:`space-y-2`,children:n.followUps.map(e=>(0,$.jsxs)(`li`,{className:`rounded-lg bg-surface-base px-2.5 py-2`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:e.title}),e.prompt?(0,$.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,className:`text-xs font-medium text-accent-fg hover:underline`,onClick:()=>c(e),children:r.startFollowUp}),(0,$.jsx)(`button`,{type:`button`,className:`text-xs font-medium text-fg-subtle hover:text-fg`,onClick:()=>o(e.prompt??``),children:r.copyPrompt})]}):null]},e.id))})}):null,t[8]=r,t[9]=o,t[10]=c,t[11]=n.followUps,t[12]=u):u=t[12];let d;t[13]!==r||t[14]!==n.structuredOutput?(d=n.structuredOutput===void 0?null:(0,$.jsx)(Tn,{title:r.outcomeStructuredOutput,className:`lg:col-span-3`,children:(0,$.jsx)(`pre`,{className:`max-h-[28rem] min-w-0 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-base p-3 font-mono text-xs leading-5 text-fg-muted`,children:D(n.structuredOutput)})}),t[13]=r,t[14]=n.structuredOutput,t[15]=d):d=t[15];let f;return t[16]!==l||t[17]!==u||t[18]!==d?(f=(0,$.jsxs)(`div`,{className:`mt-5 grid gap-3 lg:grid-cols-3`,children:[l,u,d]}),t[16]=l,t[17]=u,t[18]=d,t[19]=f):f=t[19],f}function wn(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),URL.revokeObjectURL(n)}function Tn(e){let t=(0,Q.c)(10),{title:n,children:r,className:a}=e,o;t[0]===a?o=t[1]:(o=i(`min-w-0 rounded-xl border border-edge-subtle bg-surface-base/35 p-3`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,$.jsx)(`h4`,{className:`text-xs font-semibold uppercase tracking-wide text-fg-subtle`,children:n}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,$.jsx)(`div`,{className:`mt-2`,children:r}),t[4]=r,t[5]=c);let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,$.jsxs)(`section`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function En(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=Array.isArray(t.artifacts)?t.artifacts:[],r=Array.isArray(t.followUps)?t.followUps:[];return n.length===0&&r.length===0&&t.structuredOutput===void 0?null:{artifacts:n,followUps:r,structuredOutput:t.structuredOutput}}function Dn(e){let t=(0,Q.c)(21),{agent:n,labels:r}=e,i=n.invocation;if(!i)return null;let a=i.resolvedModelRef??i.modelRef,o;t[0]!==r.agentInvocationModel||t[1]!==a?(o={label:r.agentInvocationModel,value:a},t[0]=r.agentInvocationModel,t[1]=a,t[2]=o):o=t[2];let s;t[3]===i.toolset?s=t[4]:(s=i.toolset?.join(`, `),t[3]=i.toolset,t[4]=s);let c;t[5]!==r.agentInvocationTools||t[6]!==s?(c={label:r.agentInvocationTools,value:s},t[5]=r.agentInvocationTools,t[6]=s,t[7]=c):c=t[7];let l=i.maxIterations==null?void 0:String(i.maxIterations),u;t[8]!==r.agentInvocationIterations||t[9]!==l?(u={label:r.agentInvocationIterations,value:l},t[8]=r.agentInvocationIterations,t[9]=l,t[10]=u):u=t[10];let d=i.schema?r.agentInvocationSchemaPresent:void 0,f;t[11]!==r.agentInvocationSchema||t[12]!==d?(f={label:r.agentInvocationSchema,value:d},t[11]=r.agentInvocationSchema,t[12]=d,t[13]=f):f=t[13];let p;t[14]!==o||t[15]!==c||t[16]!==u||t[17]!==f?(p=[o,c,u,f].filter(kn),t[14]=o,t[15]=c,t[16]=u,t[17]=f,t[18]=p):p=t[18];let m=p;if(m.length===0)return null;let h;return t[19]===m?h=t[20]:(h=(0,$.jsx)(`dl`,{className:`mt-3 grid gap-2 border-t border-edge-subtle pt-3 text-xs sm:grid-cols-2 lg:grid-cols-4`,children:m.map(On)}),t[19]=m,t[20]=h),h}function On(e){return(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`dt`,{className:`text-fg-subtle`,children:e.label}),(0,$.jsx)(`dd`,{className:`mt-0.5 truncate font-medium text-fg-muted`,title:e.value,children:e.value})]},e.label)}function kn(e){return!!e.value}function An(e){return e===`done`?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`error`?`bg-rose-500/10 text-rose-700 dark:text-rose-300`:e===`running`?`bg-accent-soft text-accent-fg`:`bg-surface-hover text-fg-subtle`}function jn(e){let t=(0,Q.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`dd`,{className:`mt-1 text-sm font-semibold text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`div`,{className:`rounded-xl border border-edge bg-surface-base/40 p-3`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Mn(e){let t=(0,Q.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(`div`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`div`,{className:`mt-1 truncate text-sm font-medium text-fg`,title:r,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Nn(e){let t=(0,Q.c)(30),{stats:n,language:r}=e,i,o,s;if(t[0]!==r||t[1]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{if(i=a(r).workflows,!n||n.totalRuns===0){s=null;break bb0}o=n.topDefinitions[0]?Se(i.statsTopWorkflow,{name:n.topDefinitions[0].definitionId,count:n.topDefinitions[0].count}):null}t[0]=r,t[1]=n,t[2]=i,t[3]=o,t[4]=s}else i=t[2],o=t[3],s=t[4];if(s!==Symbol.for(`react.early_return_sentinel`))return s;let c=o,l=i.statsTotalRuns,u=String(n.totalRuns),d;t[5]!==i.statsTotalRuns||t[6]!==u?(d=(0,$.jsx)(Pn,{label:l,value:u}),t[5]=i.statsTotalRuns,t[6]=u,t[7]=d):d=t[7];let f=i.statsActiveRuns,p=String(n.activeRuns),m;t[8]!==i.statsActiveRuns||t[9]!==p?(m=(0,$.jsx)(Pn,{label:f,value:p}),t[8]=i.statsActiveRuns,t[9]=p,t[10]=m):m=t[10];let h;t[11]!==n.succeededRuns||t[12]!==n.totalRuns?(h=n.totalRuns>0?`${Math.round(n.succeededRuns/n.totalRuns*100)}%`:`—`,t[11]=n.succeededRuns,t[12]=n.totalRuns,t[13]=h):h=t[13];let g;t[14]!==i.statsSuccessRate||t[15]!==h?(g=(0,$.jsx)(Pn,{label:i.statsSuccessRate,value:h}),t[14]=i.statsSuccessRate,t[15]=h,t[16]=g):g=t[16];let _;t[17]===n.averageDurationMs?_=t[18]:(_=n.averageDurationMs==null?`—`:F(n.averageDurationMs),t[17]=n.averageDurationMs,t[18]=_);let v;t[19]!==i.statsAvgDuration||t[20]!==_?(v=(0,$.jsx)(Pn,{label:i.statsAvgDuration,value:_}),t[19]=i.statsAvgDuration,t[20]=_,t[21]=v):v=t[21];let y;t[22]===c?y=t[23]:(y=c?(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs text-fg-muted`,children:c}):null,t[22]=c,t[23]=y);let b;return t[24]!==g||t[25]!==v||t[26]!==y||t[27]!==d||t[28]!==m?(b=(0,$.jsxs)(`section`,{className:`flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-panel/70 px-3 py-2 shadow-surface`,children:[d,m,g,v,y]}),t[24]=g,t[25]=v,t[26]=y,t[27]=d,t[28]=m,t[29]=b):b=t[29],b}function Pn(e){let t=(0,Q.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(`span`,{children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`span`,{className:`font-semibold tabular-nums text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-surface-muted px-2.5 py-1 text-xs text-fg-muted`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Fn(e){let t=(0,Q.c)(20),{vm:n}=e,{labels:r,loading:i,refreshAll:a,setManageOpen:o,setPickStartOpen:s}=n,c;t[0]===s?c=t[1]:(c=()=>s(!0),t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(U,{className:`size-4`,"aria-hidden":!0}),t[2]=l):l=t[2];let u;t[3]!==r.boardStart||t[4]!==c?(u=(0,$.jsxs)(X,{variant:`primary`,className:`h-9 rounded-lg`,onClick:c,children:[l,r.boardStart]}),t[3]=r.boardStart,t[4]=c,t[5]=u):u=t[5];let d;t[6]===o?d=t[7]:(d=()=>o(!0),t[6]=o,t[7]=d);let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(le,{className:`size-4`,"aria-hidden":!0}),t[8]=f):f=t[8];let p;t[9]!==r.addWorkflow||t[10]!==d?(p=(0,$.jsxs)(X,{variant:`secondary`,className:`h-9 rounded-lg`,onClick:d,children:[f,r.addWorkflow]}),t[9]=r.addWorkflow,t[10]=d,t[11]=p):p=t[11];let m;t[12]!==r.refresh||t[13]!==i||t[14]!==a?(m=(0,$.jsx)(oe,{className:`size-9 shrink-0 p-0`,loading:i,label:r.refresh,onClick:a}),t[12]=r.refresh,t[13]=i,t[14]=a,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==p||t[18]!==m?(h=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[u,p,m]}),t[16]=u,t[17]=p,t[18]=m,t[19]=h):h=t[19],h}var In=[`attention`,`running`,`queued`,`recent`];function Ln(e){return e.status===`failed`||e.status===`timeout`||e.status===`cancelled`?`attention`:e.status===`running`?`running`:e.status===`queued`?`queued`:e.status===`succeeded`?`recent`:null}function Rn(e){return e.completedAtMs??e.startedAtMs??e.createdAtMs}function zn(e,t){let n=[...t];return e===`queued`?n.sort((e,t)=>e.createdAtMs-t.createdAtMs):n.sort((e,t)=>Rn(t)-Rn(e))}function Bn(e){let t=new Map(In.map(e=>[e,[]]));for(let n of e){let e=Ln(n);e&&t.get(e)?.push(n)}for(let e of In)t.set(e,zn(e,t.get(e)??[]));return t}function Vn(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(ye,{className:`size-4 rounded-full`}),(0,$.jsx)(ye,{className:`h-4 w-32`})]}),(0,$.jsx)(ye,{className:`mt-3 h-4 w-full`}),(0,$.jsx)(ye,{className:`mt-2 h-4 w-2/3`})]}),(0,$.jsx)(ye,{className:`h-6 w-20 rounded-full`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`article`,{className:`rounded-lg bg-surface-panel p-3 shadow-surface`,"aria-hidden":`true`,children:[t,(0,$.jsxs)(`div`,{className:`mt-4 flex gap-2`,children:[(0,$.jsx)(ye,{className:`h-8 w-20 rounded-md`}),(0,$.jsx)(ye,{className:`h-8 w-24 rounded-md`})]})]}),e[1]=n):n=e[1],n}function Hn(e){let t=(0,Q.c)(197),{vm:n}=e,{language:r,localeTag:o,labels:s,hasToken:c,definitions:l,runs:f,searchQuery:p,setSearchQuery:m,ownerAgentId:h,agentOptions:g,setOwnerAgentId:_,workflowFilterId:v,setWorkflowFilterId:y,triggerFilter:b,setTriggerFilter:x,viewMode:S,setViewMode:C,runTab:T,setRunTab:E,selectedRunId:D,selectedRunView:O,selectedRunComparison:k,selectedRunLoading:A,selectedRunError:j,openRunDetails:M,closeRunDetails:N,openRunDetailsById:P,openRunInChat:ee,pickStartOpen:F,setPickStartOpen:I,startDefinition:L,setStartDefinition:R,detailDefinition:z,setDetailDefinition:B,manageOpen:V,setManageOpen:te,workflowEditorDraft:H,openWorkflowEditor:ne,actionError:U,actionFeedback:W,starting:G,savingWorkflow:K,loading:re,error:q,stats:J,submitStart:ie,cancelRun:ae,retryRun:oe,replayRun:se,saveCustomWorkflow:ce,saveDraftAndStart:le}=n,ue=w(Kn),fe=w(Gn),pe;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(pe=Date.now(),t[0]=pe):pe=t[0];let me=pe,he=Bn(ot(f,{searchQuery:p,workflowFilterId:v,triggerFilter:b})),ge;t[1]!==fe||t[2]!==c||t[3]!==s.statsActiveRuns||t[4]!==s.statsTotalRuns||t[5]!==s.subtitleBoard||t[6]!==s.title||t[7]!==ue||t[8]!==J||t[9]!==n?(ge=()=>{if(!c){fe();return}return ue({startExtra:null,main:(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:s.title}),(0,$.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:J?`${s.statsTotalRuns}: ${J.totalRuns} · ${s.statsActiveRuns}: ${J.activeRuns}`:s.subtitleBoard})]}),end:(0,$.jsx)(Fn,{vm:n})}),()=>fe()},t[1]=fe,t[2]=c,t[3]=s.statsActiveRuns,t[4]=s.statsTotalRuns,t[5]=s.subtitleBoard,t[6]=s.title,t[7]=ue,t[8]=J,t[9]=n,t[10]=ge):ge=t[10];let _e;if(t[11]!==fe||t[12]!==c||t[13]!==s.statsActiveRuns||t[14]!==s.statsTotalRuns||t[15]!==s.subtitleBoard||t[16]!==s.title||t[17]!==re||t[18]!==J||t[19]!==n?(_e=[fe,c,s.title,s.statsActiveRuns,s.statsTotalRuns,s.subtitleBoard,re,J,n,n.refreshAll,n.setManageOpen,n.setSearchQuery],t[11]=fe,t[12]=c,t[13]=s.statsActiveRuns,t[14]=s.statsTotalRuns,t[15]=s.subtitleBoard,t[16]=s.title,t[17]=re,t[18]=J,t[19]=n,t[20]=_e):_e=t[20],(0,Z.useLayoutEffect)(ge,_e),!c){let e;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(be,{className:`size-10 text-accent-fg`,"aria-hidden":!0}),t[21]=e):e=t[21];let n;t[22]===s.title?n=t[23]:(n=(0,$.jsx)(`h1`,{className:`mt-4 text-xl font-semibold text-fg`,children:s.title}),t[22]=s.title,t[23]=n);let r;t[24]===s.needToken?r=t[25]:(r=(0,$.jsx)(`p`,{className:`mt-2 max-w-md text-sm leading-6 text-fg-muted`,children:s.needToken}),t[24]=s.needToken,t[25]=r);let i;return t[26]!==n||t[27]!==r?(i=(0,$.jsx)(`main`,{className:`min-h-0 flex-1 overflow-auto bg-surface-panel`,children:(0,$.jsxs)(`div`,{className:`flex w-full flex-col items-center px-3 py-16 text-center sm:px-5 xl:px-6`,children:[e,n,r]})}),t[26]=n,t[27]=r,t[28]=i):i=t[28],i}let ve;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsx)(de,{className:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),t[29]=ve):ve=t[29];let ye;t[30]===m?ye=t[31]:(ye=e=>m(e.target.value),t[30]=m,t[31]=ye);let xe=s.searchPlaceholder,Se;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(Se=i(`h-9 w-full rounded-lg border border-edge bg-surface-panel py-2 pl-9 pr-3 text-sm text-fg shadow-surface`,`placeholder:text-fg-subtle`,Ve.focusRingPanel),t[32]=Se):Se=t[32];let Y;t[33]!==s.searchPlaceholder||t[34]!==p||t[35]!==ye?(Y=(0,$.jsxs)(`div`,{className:`relative min-w-48 flex-1 sm:max-w-xs`,children:[ve,(0,$.jsx)(`input`,{value:p,onChange:ye,placeholder:xe,className:Se})]}),t[33]=s.searchPlaceholder,t[34]=p,t[35]=ye,t[36]=Y):Y=t[36];let Ce;t[37]!==g||t[38]!==r||t[39]!==h||t[40]!==_?(Ce=g.length>1?(0,$.jsx)(u,{value:h??``,"aria-label":`Agent`,onChange:e=>_(e.target.value),className:i(`h-9 min-w-32 rounded-lg border border-edge bg-surface-panel px-2.5 text-xs font-medium text-fg shadow-surface`,Ve.focusRingPanel),children:g.map(e=>(0,$.jsx)(Re,{value:e.id,children:Ne(e,a(r).agentsSettings)},e.id))}):null,t[37]=g,t[38]=r,t[39]=h,t[40]=_,t[41]=Ce):Ce=t[41];let we=s.boardTriggerFilterAria,Te;t[42]===x?Te=t[43]:(Te=e=>x(e.target.value),t[42]=x,t[43]=Te);let Ee;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=i(`h-9 min-w-[7.5rem] rounded-lg border border-edge bg-surface-panel px-2.5 text-xs font-medium text-fg shadow-surface`,Ve.focusRingPanel),t[44]=Ee):Ee=t[44];let De;t[45]===s.boardTriggerFilterAll?De=t[46]:(De=(0,$.jsx)(Re,{value:`all`,children:s.boardTriggerFilterAll}),t[45]=s.boardTriggerFilterAll,t[46]=De);let Oe;t[47]===s.boardTriggerFilterAutomation?Oe=t[48]:(Oe=(0,$.jsx)(Re,{value:`automation`,children:s.boardTriggerFilterAutomation}),t[47]=s.boardTriggerFilterAutomation,t[48]=Oe);let ke;t[49]===s.boardTriggerFilterWebui?ke=t[50]:(ke=(0,$.jsx)(Re,{value:`webui`,children:s.boardTriggerFilterWebui}),t[49]=s.boardTriggerFilterWebui,t[50]=ke);let Ae;t[51]===s.boardTriggerFilterChat?Ae=t[52]:(Ae=(0,$.jsx)(Re,{value:`chat`,children:s.boardTriggerFilterChat}),t[51]=s.boardTriggerFilterChat,t[52]=Ae);let je;t[53]===s.boardTriggerFilterApi?je=t[54]:(je=(0,$.jsx)(Re,{value:`api`,children:s.boardTriggerFilterApi}),t[53]=s.boardTriggerFilterApi,t[54]=je);let Me;t[55]!==s.boardTriggerFilterAria||t[56]!==Te||t[57]!==De||t[58]!==Oe||t[59]!==ke||t[60]!==Ae||t[61]!==je||t[62]!==b?(Me=(0,$.jsxs)(u,{value:b,"aria-label":we,onChange:Te,className:Ee,children:[De,Oe,ke,Ae,je]}),t[55]=s.boardTriggerFilterAria,t[56]=Te,t[57]=De,t[58]=Oe,t[59]=ke,t[60]=Ae,t[61]=je,t[62]=b,t[63]=Me):Me=t[63];let Fe=s.boardWorkflowFilterAria,Ie;t[64]===y?Ie=t[65]:(Ie=e=>y(e.target.value),t[64]=y,t[65]=Ie);let Le;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(Le=i(`h-9 min-w-40 rounded-lg border border-edge bg-surface-panel px-2.5 text-xs font-medium text-fg shadow-surface`,Ve.focusRingPanel),t[66]=Le):Le=t[66];let ze;t[67]===s.boardWorkflowFilterAll?ze=t[68]:(ze=(0,$.jsx)(Re,{value:``,children:s.boardWorkflowFilterAll}),t[67]=s.boardWorkflowFilterAll,t[68]=ze);let Be;t[69]===l?Be=t[70]:(Be=l.map(Wn),t[69]=l,t[70]=Be);let He;t[71]!==s.boardWorkflowFilterAria||t[72]!==Ie||t[73]!==ze||t[74]!==Be||t[75]!==v?(He=(0,$.jsxs)(u,{value:v,"aria-label":Fe,onChange:Ie,className:Le,children:[ze,Be]}),t[71]=s.boardWorkflowFilterAria,t[72]=Ie,t[73]=ze,t[74]=Be,t[75]=v,t[76]=He):He=t[76];let Ue=S===`operations`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:text-fg`,We;t[77]===Ue?We=t[78]:(We=i(`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors`,Ue),t[77]=Ue,t[78]=We);let X;t[79]===C?X=t[80]:(X=()=>C(`operations`),t[79]=C,t[80]=X);let Ge;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,$.jsx)(Pe,{className:`size-3.5`,"aria-hidden":!0}),t[81]=Ge):Ge=t[81];let Ke;t[82]!==s.viewModes.operations||t[83]!==We||t[84]!==X?(Ke=(0,$.jsxs)(`button`,{type:`button`,className:We,onClick:X,children:[Ge,s.viewModes.operations]}),t[82]=s.viewModes.operations,t[83]=We,t[84]=X,t[85]=Ke):Ke=t[85];let qe=S===`board`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:text-fg`,Je;t[86]===qe?Je=t[87]:(Je=i(`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors`,qe),t[86]=qe,t[87]=Je);let Ye;t[88]===C?Ye=t[89]:(Ye=()=>C(`board`),t[88]=C,t[89]=Ye);let Ze;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,$.jsx)(d,{className:`size-3.5`,"aria-hidden":!0}),t[90]=Ze):Ze=t[90];let Qe;t[91]!==s.viewModes.board||t[92]!==Je||t[93]!==Ye?(Qe=(0,$.jsxs)(`button`,{type:`button`,className:Je,onClick:Ye,children:[Ze,s.viewModes.board]}),t[91]=s.viewModes.board,t[92]=Je,t[93]=Ye,t[94]=Qe):Qe=t[94];let $e;t[95]!==Ke||t[96]!==Qe?($e=(0,$.jsxs)(`div`,{className:`flex rounded-lg bg-surface-muted p-0.5`,children:[Ke,Qe]}),t[95]=Ke,t[96]=Qe,t[97]=$e):$e=t[97];let et;t[98]!==Me||t[99]!==He||t[100]!==$e||t[101]!==Y||t[102]!==Ce?(et=(0,$.jsxs)(`section`,{className:`flex w-full flex-wrap items-center gap-2 rounded-lg border border-edge-subtle bg-surface-base px-3 py-2 shadow-surface`,children:[Y,Ce,Me,He,$e]}),t[98]=Me,t[99]=He,t[100]=$e,t[101]=Y,t[102]=Ce,t[103]=et):et=t[103];let tt;t[104]===W?tt=t[105]:(tt=W?(0,$.jsx)(`div`,{className:`w-full rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3 py-2 text-sm text-emerald-800 dark:text-emerald-200`,children:W}):null,t[104]=W,t[105]=tt);let nt;t[106]!==U||t[107]!==q?(nt=U??q?(0,$.jsx)(`div`,{className:`w-full rounded-xl border border-red-500/25 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:U??q}):null,t[106]=U,t[107]=q,t[108]=nt):nt=t[108];let rt;t[109]!==r||t[110]!==J?(rt=(0,$.jsx)(`div`,{className:`w-full`,children:(0,$.jsx)(Nn,{stats:J,language:r})}),t[109]=r,t[110]=J,t[111]=rt):rt=t[111];let it;t[112]===j?it=t[113]:(it=j?(0,$.jsx)(`div`,{className:`w-full rounded-xl border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-sm text-amber-800 dark:text-amber-200`,children:j}):null,t[112]=j,t[113]=it);let at;if(t[114]!==l||t[115]!==O?.run){let e;t[117]===O?.run?e=t[118]:(e=e=>e.id===O?.run.definitionId,t[117]=O?.run,t[118]=e),at=l.find(e),t[114]=l,t[115]=O?.run,t[116]=at}else at=t[116];let st=!!D&&A,ct;t[119]!==ae||t[120]!==D?(ct=()=>{D&&ae(D)},t[119]=ae,t[120]=D,t[121]=ct):ct=t[121];let lt;t[122]!==oe||t[123]!==D?(lt=()=>{D&&oe(D)},t[122]=oe,t[123]=D,t[124]=lt):lt=t[124];let ut;t[125]!==se||t[126]!==D?(ut=e=>{D&&se(D,e)},t[125]=se,t[126]=D,t[127]=ut):ut=t[127];let dt;t[128]!==N||t[129]!==r||t[130]!==o||t[131]!==P||t[132]!==h||t[133]!==T||t[134]!==k||t[135]!==O||t[136]!==E||t[137]!==at||t[138]!==st||t[139]!==ct||t[140]!==lt||t[141]!==ut?(dt=(0,$.jsx)(dn,{view:O,comparison:k,currentDefinition:at,loading:st,language:r,localeTag:o,activeTab:T,onTabChange:E,onCancel:ct,onRetry:lt,onReplay:ut,onOpenRunId:P,ownerAgentId:h,onClose:N}),t[128]=N,t[129]=r,t[130]=o,t[131]=P,t[132]=h,t[133]=T,t[134]=k,t[135]=O,t[136]=E,t[137]=at,t[138]=st,t[139]=ct,t[140]=lt,t[141]=ut,t[142]=dt):dt=t[142];let ft;t[143]===I?ft=t[144]:(ft=()=>I(!1),t[143]=I,t[144]=ft);let pt;t[145]!==I||t[146]!==R?(pt=e=>{I(!1),R(e)},t[145]=I,t[146]=R,t[147]=pt):pt=t[147];let mt;t[148]!==B||t[149]!==I?(mt=e=>{I(!1),B(e)},t[148]=B,t[149]=I,t[150]=mt):mt=t[150];let ht;t[151]!==l||t[152]!==r||t[153]!==ne||t[154]!==F||t[155]!==ft||t[156]!==pt||t[157]!==mt?(ht=(0,$.jsx)(rn,{open:F,definitions:l,language:r,onClose:ft,onPick:pt,onDetail:mt,onEdit:ne}),t[151]=l,t[152]=r,t[153]=ne,t[154]=F,t[155]=ft,t[156]=pt,t[157]=mt,t[158]=ht):ht=t[158];let _t=L!=null,vt;t[159]===R?vt=t[160]:(vt=()=>R(null),t[159]=R,t[160]=vt);let yt;t[161]===ie?yt=t[162]:(yt=e=>void ie(e),t[161]=ie,t[162]=yt);let bt;t[163]!==r||t[164]!==L||t[165]!==G||t[166]!==_t||t[167]!==vt||t[168]!==yt?(bt=(0,$.jsx)(Xe,{open:_t,definition:L,language:r,starting:G,onClose:vt,onStart:yt}),t[163]=r,t[164]=L,t[165]=G,t[166]=_t,t[167]=vt,t[168]=yt,t[169]=bt):bt=t[169];let xt=z!=null,St;t[170]===B?St=t[171]:(St=()=>B(null),t[170]=B,t[171]=St);let wt;t[172]!==z||t[173]!==B||t[174]!==R?(wt=()=>{z&&(B(null),R(z))},t[172]=z,t[173]=B,t[174]=R,t[175]=wt):wt=t[175];let Tt;t[176]!==z||t[177]!==r||t[178]!==xt||t[179]!==St||t[180]!==wt?(Tt=(0,$.jsx)(Kt,{open:xt,definition:z,language:r,onClose:St,onRun:wt}),t[176]=z,t[177]=r,t[178]=xt,t[179]=St,t[180]=wt,t[181]=Tt):Tt=t[181];let Et;t[182]===H?Et=t[183]:(Et=H?{mode:H.mode,name:H.initialName,script:H.initialScript,sourceTitle:H.definition.title}:null,t[182]=H,t[183]=Et);let Dt;t[184]===te?Dt=t[185]:(Dt=()=>te(!1),t[184]=te,t[185]=Dt);let kt;t[186]===ce?kt=t[187]:(kt=e=>ce(e),t[186]=ce,t[187]=kt);let At;return t[188]!==r||t[189]!==V||t[190]!==h||t[191]!==le||t[192]!==K||t[193]!==Et||t[194]!==Dt||t[195]!==kt?(At=(0,$.jsx)(Ot,{open:V,language:r,ownerAgentId:h,saving:K,initialDraft:Et,onClose:Dt,onSave:kt,onSaveAndStart:le}),t[188]=r,t[189]=V,t[190]=h,t[191]=le,t[192]=K,t[193]=Et,t[194]=Dt,t[195]=kt,t[196]=At):At=t[196],(0,$.jsxs)(`main`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden bg-surface-panel`,children:[(0,$.jsxs)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col gap-4 px-3 py-5 sm:px-5 xl:px-6`,children:[et,tt,nt,(0,$.jsx)(`section`,{className:`grid w-full gap-2 sm:grid-cols-2 xl:grid-cols-4`,"aria-label":s.subtitleBoard,children:In.map(e=>{let t=he.get(e)?.length??0;return(0,$.jsxs)(`button`,{type:`button`,className:i(`min-w-0 rounded-lg border border-edge-subtle bg-surface-base px-3 py-2 text-left shadow-surface`,`hover:bg-surface-hover/45`,Ve.focusRingPanel),onClick:()=>C(`operations`),children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`truncate text-xs font-medium text-fg-muted`,children:s.operationSections[e].title}),(0,$.jsx)(`span`,{className:`font-mono text-sm font-semibold tabular-nums text-fg`,children:t})]}),(0,$.jsx)(`p`,{className:`mt-1 truncate text-xs text-fg-subtle`,children:s.operationSections[e].description})]},e)})}),rt,it,S===`operations`?(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto pb-3`,children:(0,$.jsx)(`div`,{className:`grid w-full gap-4`,children:In.map(e=>{let t=he.get(e)??[];return(0,$.jsxs)(`section`,{className:`rounded-lg border border-edge-subtle bg-surface-base shadow-surface`,children:[(0,$.jsxs)(`header`,{className:`flex flex-wrap items-start justify-between gap-3 border-b border-edge-subtle px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:s.operationSections[e].title}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:s.operationSections[e].description})]}),(0,$.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2.5 py-1 text-xs font-semibold tabular-nums text-fg-muted`,children:t.length})]}),(0,$.jsxs)(`div`,{className:`grid gap-2 p-2.5 md:grid-cols-2 xl:grid-cols-3`,children:[re&&t.length===0?Array.from({length:3}).map(Un):t.map(e=>(0,$.jsx)(gt,{run:e,language:r,localeTag:o,nowMs:me,selected:e.id===D,onOpen:M,onOpenChat:ee,onCancel:e=>void ae(e),onRetry:e=>void oe(e)},e.id)),!re&&t.length===0?(0,$.jsx)(`div`,{className:`flex min-h-24 items-center justify-center rounded-md border border-dashed border-edge bg-surface-panel/40 px-4 py-5 text-center text-xs text-fg-subtle md:col-span-2 xl:col-span-3`,children:s.operationSections[e].empty}):null]})]},e)})})}):(0,$.jsx)(`div`,{className:`min-h-0 w-full flex-1`,children:(0,$.jsx)(Ct,{runs:f,language:r,localeTag:o,labels:{boardEmptyTitle:s.boardEmptyTitle,boardEmptyHint:s.boardEmptyHint,boardStart:s.boardStart,loading:s.loading},searchQuery:p,workflowFilterId:v,triggerFilter:b,selectedRunId:D,loading:re,onOpenRun:M,onOpenRunChat:ee,onCancelRun:e=>void ae(e),onRetryRun:e=>void oe(e),onStart:()=>I(!0)})})]}),dt,ht,bt,Tt,At]})}function Un(e,t){return(0,$.jsx)(Vn,{},t)}function Wn(e){return(0,$.jsx)(Re,{value:e.id,children:e.title},e.id)}function Gn(e){return e.clearPageHeader}function Kn(e){return e.setPageHeader}function qn(){let e=s(e=>e.language),t=a(e).workflows,n=e===`zh`?`zh-CN`:`en-US`,r=o(e=>e.token),i=!!r,l=We(),[u,d]=b(),f=u.get(`q`)??``,p=u.get(`wf`)?.trim()??``,h=u.get(`trigger`)?.trim()||`all`,_=u.get(`run`)?.trim()??``,v=u.get(`view`)?.trim()??``,y=u.get(`runTab`)?.trim()??``,x=u.get(`agent`)?.trim()??``,S=O.has(v)?v:`operations`,w=re.has(y)?y:`result`,[T,E]=(0,Z.useState)(null),[D,A]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(null),[N,P]=(0,Z.useState)(!1),[ee,F]=(0,Z.useState)(null),[I,L]=(0,Z.useState)(null),[R,z]=(0,Z.useState)(null),[B,te]=(0,Z.useState)(!1),[H,ne]=(0,Z.useState)(!1),U=c(i?[`workflow-agents`,r]:null,me,{revalidateOnFocus:!1}),G=(0,Z.useMemo)(()=>{let e=U.data?.agents??[];return x&&e.some(e=>e.id===x)||x&&e.length===0?x:U.data?.defaultId??(x||void 0)},[U.data,x]),K=c(i?[`workflow-definitions`,r]:null,Ee,{revalidateOnFocus:!1}),q=c(i&&G?[`workflow-runs`,r,G]:null,()=>xe(100,{ownerAgentId:G}),{revalidateOnFocus:!1,refreshInterval:e=>e?.length&&e.some(e=>e.status===`queued`||e.status===`running`)?3e3:0}),J=c(i&&G?[`workflow-stats`,r,G,p]:null,()=>ge(p,{ownerAgentId:G}),{revalidateOnFocus:!1});(0,Z.useEffect)(()=>{if(!R)return;let e=window.setTimeout(()=>z(null),4e3);return()=>window.clearTimeout(e)},[R]);let ae=K.data??[],oe=U.data?.agents??[],ce=q.data??[],le=_||null,de=we(le,{ownerAgentId:G}),fe=c(i&&G&&le&&de.view?.run.metadata?.replay?[`workflow-run-comparison`,r,G,le]:null,()=>pe(le,{ownerAgentId:G}),{revalidateOnFocus:!1}),he=(0,Z.useMemo)(()=>g(ae,f,`all`,`all`),[ae,f]),ve=(0,Z.useCallback)(e=>{e&&F(null),P(e)},[]),ye=(0,Z.useCallback)(e=>{let t=new Set(ae.map(e=>e.name)),n=`${e.name}_copy`;if(!t.has(n))return n;for(let e=2;e<100;e+=1){let r=`${n}_${e}`;if(!t.has(r))return r}return`${n}_${Date.now()}`},[ae]),be=(0,Z.useCallback)((e,n)=>{let r=e.runtime?.source??``;if(!r.trim()){L(t.editWorkflowSourceMissing);return}let i=n??(e.metadata.source===`user`?`edit`:`copy`),a=i===`edit`?e.name:ye(e);L(null),A(!1),F({mode:i,definition:e,initialName:a,initialScript:i===`copy`?Jn(r,a):r}),P(!0)},[ye,t.editWorkflowSourceMissing]),Y=(0,Z.useCallback)(e=>{d(t=>{let n=new URLSearchParams(t);return e(n,t),n},{replace:!0})},[d]);(0,Z.useEffect)(()=>{let e=U.data?.agents??[];!x||e.length===0||e.some(e=>e.id===x)||Y(e=>{U.data?.defaultId?e.set(m,U.data.defaultId):e.delete(m),e.delete(`run`)})},[U.data,x,Y]);let Te=(0,Z.useCallback)(e=>{Y(t=>{let n=e.trim();n?t.set(`q`,n):t.delete(`q`)})},[Y]),De=(0,Z.useCallback)(e=>{Y(t=>{let n=e.trim();n?t.set(m,n):t.delete(m),t.delete(`run`)})},[Y]),Oe=(0,Z.useCallback)(e=>{Y(t=>{let n=e.trim();n?t.set(`wf`,n):t.delete(`wf`)})},[Y]),ke=(0,Z.useCallback)(e=>{Y(t=>{let n=e.trim();n&&n!==`all`?t.set(Me,n):t.delete(Me)})},[Y]),Ae=(0,Z.useCallback)(e=>{Y(t=>{e===`operations`?t.delete(ie):t.set(ie,e)})},[Y]),je=(0,Z.useCallback)(e=>{Y(t=>{e===`result`?t.delete(C):t.set(C,e)})},[Y]),Ne=(0,Z.useCallback)(e=>{Y(t=>{G&&t.set(m,G),t.set(`run`,e.id),t.delete(C)})},[G,Y]),Pe=(0,Z.useCallback)(()=>{Y(e=>{e.delete(`run`),e.delete(C)})},[Y]),Ie=(0,Z.useCallback)(e=>{Y(t=>{G&&t.set(m,G),t.set(`run`,e),t.delete(C)})},[G,Y]),Le=(0,Z.useCallback)(e=>{let t=$e(e);t&&l(V(t))},[l]);(0,Z.useEffect)(()=>{let e=u.get(`def`),t=u.get(k)===`1`,n=u.get(W)===`1`;if(!e||!ae.length)return;let r=ae.find(t=>t.id===e||t.name===e);r&&(n?be(r,`copy`):t?E(r):M(r),Y(e=>{e.delete(`def`),e.delete(k),e.delete(W)}))},[ae,be,Y,u]),(0,Z.useEffect)(()=>{let e=()=>{q.mutate(),J.mutate()};return window.addEventListener(`workflow-event-appended`,e),window.addEventListener(`workflow-run-updated`,e),window.addEventListener(`workflow-run-error`,e),()=>{window.removeEventListener(`workflow-event-appended`,e),window.removeEventListener(`workflow-run-updated`,e),window.removeEventListener(`workflow-run-error`,e)}},[q,J]);let Re=(0,Z.useCallback)(()=>{U.mutate(),K.mutate(),q.mutate(),J.mutate()},[U,K,q,J]),ze=(0,Z.useCallback)(async e=>{if(T){te(!0),L(null);try{let n=await ue({definitionId:T.id,goal:e.goal,input:e.input,agentId:G,concurrency:e.concurrency,maxSubagents:e.maxSubagents});E(null),await q.mutate(),await J.mutate(),z(t.startSuccess),Y(e=>{G&&e.set(m,G),e.set(`run`,n.runId),e.delete(C)})}catch(e){L(e instanceof Error?e.message:t.startFailed)}finally{te(!1)}}},[t.startFailed,t.startSuccess,G,Y,q,T,J]),Be=(0,Z.useCallback)(async e=>{try{await Fe(e,{ownerAgentId:G}),await q.mutate(),await J.mutate()}catch(e){let n=e instanceof Error?e.message:t.cancelFailed;if(/not active|already finished/i.test(n)){await q.mutate(),await J.mutate();return}L(n)}},[t.cancelFailed,G,q,J]),Ve=(0,Z.useCallback)(async e=>{try{let t=await se(e,{ownerAgentId:G});await q.mutate(),await J.mutate(),Y(e=>{G&&e.set(m,G),e.set(`run`,t.runId),e.delete(C)})}catch(e){L(e instanceof Error?e.message:t.retryFailed)}},[t.retryFailed,G,Y,q,J]),Ue=(0,Z.useCallback)(async(e,n)=>{try{let t=await _e(e,n,{ownerAgentId:G});await q.mutate(),await J.mutate(),Y(e=>{G&&e.set(m,G),e.set(`run`,t.runId),e.delete(C)})}catch(e){L(e instanceof Error?e.message:t.retryFailed)}},[t.retryFailed,G,Y,q,J]),X=(0,Z.useCallback)(async e=>{ne(!0),L(null);try{let n=await He(e.name,e.script);return P(!1),F(null),await K.mutate(),z(t.saveWorkflowSuccess),n}catch(e){L(e instanceof Error?e.message:t.saveWorkflowFailed)}finally{ne(!1)}},[K,t.saveWorkflowFailed,t.saveWorkflowSuccess]),Ge=(0,Z.useCallback)(async e=>{ne(!0),L(null);try{let n=await He(e.name,e.script);await K.mutate();let r=await ue({definitionId:n.id,goal:e.goal,input:{goal:e.goal},agentId:G});P(!1),F(null),await q.mutate(),await J.mutate(),z(t.startSuccess),Y(e=>{G&&e.set(m,G),e.set(`run`,r.runId),e.delete(C)})}catch(e){L(e instanceof Error?e.message:t.startFailed)}finally{ne(!1)}},[K,t.startFailed,t.startSuccess,G,Y,q,J]),Ke=(0,Z.useCallback)(async e=>{if(e.metadata.source===`user`&&window.confirm(Se(t.deleteConfirm,{name:e.name}))){L(null);try{await Ce(e.id),await K.mutate(),z(t.deleteWorkflowSuccess)}catch(e){L(e instanceof Error?e.message:t.deleteWorkflowFailed)}}},[K,t]),qe=U.isLoading||K.isLoading||q.isLoading,Je=U.error?.message??K.error?.message??q.error?.message??null;return{language:e,localeTag:n,labels:t,hasToken:i,searchQuery:f,setSearchQuery:Te,ownerAgentId:G,agentOptions:oe,setOwnerAgentId:De,workflowFilterId:p,setWorkflowFilterId:Oe,triggerFilter:h,setTriggerFilter:ke,viewMode:S,setViewMode:Ae,runTab:w,setRunTab:je,definitions:ae,filteredDefinitions:he,runs:ce,selectedRunId:le,selectedRunView:de.view,selectedRunComparison:fe.data,selectedRunLoading:de.loading,selectedRunError:de.error?.message??fe.error?.message??null,openRunDetails:Ne,closeRunDetails:Pe,openRunDetailsById:Ie,openRunInChat:Le,pickStartOpen:D,setPickStartOpen:A,startDefinition:T,setStartDefinition:E,detailDefinition:j,setDetailDefinition:M,manageOpen:N,setManageOpen:ve,workflowEditorDraft:ee,openWorkflowEditor:be,actionError:I,actionFeedback:R,starting:B,savingWorkflow:H,loading:qe,error:Je,stats:J.data,refreshAll:Re,submitStart:ze,cancelRun:Be,retryRun:Ve,replayRun:Ue,saveCustomWorkflow:X,saveDraftAndStart:Ge,removeCustomWorkflow:Ke}}function Jn(e,t){return e.replace(/(name\s*:\s*['"`])([^'"`]+)(['"`])/,(e,n,r,i)=>`${n}${t}${i}`)}function Yn(){let e=(0,Q.c)(2),t=qn(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Hn,{vm:t}),e[0]=t,e[1]=n),n}export{Yn as WorkflowsPage};
@@ -1 +1,23 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" fill="none" aria-hidden="true" viewBox="0 0 100 100"><title>xopc app icon</title><defs><linearGradient id="bg" x1="18" x2="86" y1="8" y2="96" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#202434"/><stop offset=".46" stop-color="#0a0a0a"/><stop offset="1" stop-color="#111827"/></linearGradient><linearGradient id="rim" x1="22" x2="76" y1="8" y2="92" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff" stop-opacity=".24"/><stop offset=".42" stop-color="#fff" stop-opacity=".06"/><stop offset="1" stop-opacity=".34"/></linearGradient><linearGradient id="mark" x1="33" x2="72" y1="21" y2="80" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".58" stop-color="#f4f7ff"/><stop offset="1" stop-color="#dde6ff"/></linearGradient><radialGradient id="loopGlow" cx="0" cy="0" r="1" gradientTransform="rotate(48 -5.214 42.69)scale(74 58)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3a6bff" stop-opacity=".46"/><stop offset=".42" stop-color="#5b57ff" stop-opacity=".18"/><stop offset="1" stop-color="#2ed8ff" stop-opacity="0"/></radialGradient><radialGradient id="cyanSheen" cx="0" cy="0" r="1" gradientTransform="rotate(228 58.7 24.19)scale(62 48)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2ed8ff" stop-opacity=".3"/><stop offset=".58" stop-color="#3a6bff" stop-opacity=".08"/><stop offset="1" stop-color="#2ed8ff" stop-opacity="0"/></radialGradient><filter id="softShadow" width="140%" height="140%" x="-20%" y="-20%" color-interpolation-filters="sRGB"><feDropShadow dx="0" dy="2" flood-color="#000" flood-opacity=".42" stdDeviation="2"/></filter><filter id="grain" width="100%" height="100%" x="0" y="0" color-interpolation-filters="sRGB"><feTurbulence baseFrequency=".9" numOctaves="3" stitchTiles="stitch" type="fractalNoise"/><feColorMatrix type="saturate" values="0"/><feComponentTransfer><feFuncA tableValues="0 0.035" type="table"/></feComponentTransfer></filter><clipPath id="iconClip"><rect width="88" height="88" x="6" y="6" rx="22"/></clipPath></defs><g clip-path="url(#iconClip)"><rect width="88" height="88" x="6" y="6" fill="url(#bg)" rx="22"/><rect width="88" height="88" x="6" y="6" fill="url(#loopGlow)" rx="22"/><rect width="88" height="88" x="6" y="6" fill="url(#cyanSheen)" rx="22"/><path stroke="#fff" stroke-opacity=".16" stroke-width="1.2" d="M14 22C32 7 63 7 86 31"/><path stroke="#2ed8ff" stroke-opacity=".1" d="M12 78c22 13 55 16 78-13"/><rect width="88" height="88" x="6" y="6" filter="url(#grain)" opacity=".9" rx="22"/></g><rect width="87" height="87" x="6.5" y="6.5" stroke="url(#rim)" rx="21.5"/><g filter="url(#softShadow)" transform="matrix(.76 0 0 .76 12 12)"><g stroke="url(#mark)" stroke-linecap="round"><g stroke-width="4"><path d="M29.375 23.602a33.5 33.5 0 0 1 41.25 0"/><path d="M76.398 29.375a33.5 33.5 0 0 1 0 41.25"/><path d="M70.625 76.398a33.5 33.5 0 0 1-41.25 0"/><path d="M23.602 70.625a33.5 33.5 0 0 1 0-41.25"/></g><g stroke-width="3.2" opacity=".86"><path d="M53.989 24.814A25.5 25.5 0 0 1 75.186 46.01"/><path d="M75.186 53.989A25.5 25.5 0 0 1 53.99 75.186"/><path d="M46.011 75.186A25.5 25.5 0 0 1 24.814 53.99"/><path d="M24.814 46.011A25.5 25.5 0 0 1 46.01 24.814"/></g></g><path fill="url(#mark)" d="m61 50 .159.548.47.597.752.692.993.823 1.176.985 1.293 1.161 1.335 1.34 1.3 1.508 1.189 1.648 1.009 1.749.767 1.802.478 1.794.154 1.725-.187 1.591-.529 1.396-.853 1.147-1.147.853-1.396.529-1.591.187-1.725-.154-1.794-.478-1.802-.767-1.749-1.009-1.648-1.189-1.508-1.3-1.34-1.335-1.161-1.293-.985-1.176-.823-.993-.692-.752-.597-.47L50 61l-.548.159-.597.47-.692.752-.823.993-.985 1.176-1.161 1.293-1.34 1.335-1.508 1.3-1.648 1.189-1.749 1.009-1.802.767-1.794.478-1.725.154-1.591-.187-1.396-.529-1.147-.853-.853-1.147-.529-1.396-.187-1.591.154-1.725.478-1.794.767-1.802 1.009-1.749 1.189-1.648 1.3-1.508 1.335-1.34 1.293-1.161 1.176-.985.993-.823.752-.692.47-.597L39 50l-.159-.548-.47-.597-.752-.692-.993-.823-1.176-.985-1.293-1.161-1.335-1.34-1.3-1.508-1.189-1.648-1.009-1.749-.767-1.802-.478-1.794-.154-1.725.187-1.591.529-1.396.853-1.147 1.147-.853 1.396-.529 1.591-.187 1.725.154 1.794.478 1.802.767 1.749 1.009 1.648 1.189 1.508 1.3 1.34 1.335 1.161 1.293.985 1.176.823.993.692.752.597.47L50 39l.548-.159.597-.47.692-.752.823-.993.985-1.176 1.161-1.293 1.34-1.335 1.508-1.3 1.648-1.189 1.749-1.009 1.802-.767 1.794-.478 1.725-.154 1.591.187 1.396.529 1.147.853.853 1.147.529 1.396.187 1.591-.154 1.725-.478 1.794-.767 1.802-1.009 1.749-1.189 1.648-1.3 1.508-1.335 1.34-1.293 1.161-1.176.985-.993.823-.752.692-.47.597z" transform="matrix(.72 0 0 .72 14 14)"/></g></svg>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" fill="none">
3
+ <rect x="40" y="40" width="944" height="944" rx="216" fill="#F8FAFC" />
4
+ <rect x="41" y="41" width="942" height="942" rx="215" fill="none" stroke="#0B1020" stroke-opacity="0.14" stroke-width="2" />
5
+ <g transform="translate(512 512) scale(0.85) translate(-512 -512)">
6
+ <svg width="1024" height="1024" viewBox="-32 -32 1088 1088">
7
+ <title>xopc mark</title>
8
+ <!-- Preserve the outer circumference while making the ring thicker inward. -->
9
+ <defs>
10
+ <clipPath id="outer-circumference">
11
+ <circle cx="512" cy="512" r="512" />
12
+ </clipPath>
13
+ </defs>
14
+ <g clip-path="url(#outer-circumference)">
15
+ <g transform="translate(1.414 0) scale(0.70718232)">
16
+ <g transform="translate(0 1448) scale(.1 -.1)" fill="#111827" stroke="none">
17
+ <path d="M6170 14469 c-252 -40 -401 -67 -567 -105 -568 -127 -1089 -311 -1603 -565 -584 -288 -1094 -630 -1595 -1070 -174 -153 -463 -442 -620 -619 -800 -905 -1364 -1975 -1655 -3140 -77 -306 -130 -611 -130 -742 0 -69 26 -170 62 -242 35 -69 120 -162 188 -206 67 -43 153 -70 245 -77 192 -13 364 76 474 247 22 34 49 89 60 123 11 34 32 133 45 219 92 565 281 1151 550 1703 231 473 473 852 799 1250 370 451 850 882 1362 1222 204 135 345 218 570 334 588 303 1221 506 1897 608 76 12 163 30 193 42 116 43 222 135 280 241 32 59 65 186 65 252 0 76 -26 183 -61 255 -43 87 -136 179 -224 221 -65 31 -189 60 -250 58 -16 0 -55 -4 -85 -9z M8065 14470 c-160 -32 -300 -139 -373 -285 -59 -119 -72 -268 -32 -385 29 -86 63 -144 124 -209 62 -66 131 -111 211 -139 33 -12 142 -33 242 -47 623 -87 1212 -270 1788 -555 449 -223 870 -502 1260 -836 167 -143 455 -425 590 -579 661 -752 1127 -1626 1375 -2580 41 -158 97 -448 125 -650 14 -97 24 -135 55 -201 46 -95 113 -173 194 -226 84 -54 169 -78 276 -78 156 0 289 57 392 168 93 101 138 223 138 372 0 103 -38 369 -86 602 -119 583 -313 1138 -589 1683 -231 456 -494 866 -807 1256 -165 206 -282 341 -439 503 -425 441 -804 762 -1264 1071 -816 547 -1700 908 -2609 1065 -327 56 -474 69 -571 50z M3875 10671 c-87 -25 -159 -67 -225 -133 -100 -100 -150 -225 -150 -376 0 -90 33 -195 90 -285 30 -48 262 -279 977 -972 516 -501 1006 -976 1089 -1057 83 -82 159 -148 168 -148 27 0 268 120 389 194 199 121 487 349 487 386 0 11 -295 307 -712 717 -679 665 -1251 1223 -1513 1473 -130 125 -209 175 -321 204 -79 21 -203 19 -279 -3z M10300 10674 c-36 -7 -99 -30 -140 -50 -61 -31 -97 -60 -206 -168 -166 -165 -1199 -1216 -1873 -1906 -282 -289 -556 -567 -609 -619 -197 -189 -388 -328 -840 -607 -618 -382 -673 -425 -1126 -873 -713 -707 -1882 -1898 -1920 -1956 -47 -70 -83 -168 -91 -250 -9 -80 15 -190 60 -281 23 -47 57 -93 100 -136 104 -104 226 -158 360 -158 81 0 153 19 240 62 49 24 106 76 306 277 135 135 586 595 1003 1021 417 426 824 840 905 921 80 80 196 185 256 233 143 114 356 255 690 456 411 248 604 381 777 538 65 58 445 442 2333 2352 261 264 306 314 338 376 47 91 67 170 67 264 0 89 -20 173 -58 244 -39 74 -145 177 -221 215 -70 36 -172 61 -241 60 -25 0 -74 -7 -110 -15z M391 6764 c-84 -22 -170 -73 -236 -139 -66 -66 -114 -148 -141 -240 -14 -49 -16 -83 -11 -185 8 -156 41 -339 117 -640 156 -621 332 -1095 609 -1635 258 -502 550 -943 914 -1377 405 -485 910 -947 1427 -1307 309 -215 583 -378 915 -543 340 -170 645 -296 1000 -412 293 -95 501 -150 795 -211 404 -83 521 -92 647 -50 41 14 96 40 122 57 119 82 199 207 228 357 14 70 15 96 5 163 -15 103 -60 197 -130 270 -112 118 -201 156 -454 197 -323 53 -604 121 -918 223 -429 140 -822 317 -1228 555 -286 167 -570 366 -817 573 -276 230 -563 517 -796 795 -216 260 -448 590 -618 880 -147 250 -333 635 -428 885 -144 379 -242 733 -303 1097 -16 98 -34 209 -41 247 -17 102 -78 215 -158 295 -36 36 -93 81 -127 98 -112 60 -258 78 -373 47z M13794 6766 c-100 -23 -172 -64 -250 -141 -101 -100 -137 -179 -164 -356 -60 -397 -137 -726 -251 -1069 -202 -610 -501 -1184 -892 -1710 -194 -261 -377 -468 -638 -725 -459 -450 -974 -817 -1547 -1104 -429 -215 -822 -362 -1272 -475 -213 -54 -375 -88 -580 -120 -85 -13 -181 -34 -212 -46 -32 -12 -85 -39 -118 -61 -143 -96 -230 -260 -230 -434 0 -84 20 -169 58 -245 37 -75 142 -180 220 -219 99 -50 171 -64 287 -58 159 9 588 96 920 187 206 56 555 174 760 255 818 324 1567 789 2225 1381 156 140 483 471 616 624 276 315 547 688 761 1045 290 484 541 1048 703 1580 98 325 181 688 231 1013 21 136 22 161 11 234 -29 198 -162 358 -351 424 -86 30 -207 38 -287 20z M8565 6534 c-225 -121 -403 -225 -523 -307 -103 -70 -192 -147 -192 -167 0 -6 381 -396 848 -867 466 -470 972 -982 1124 -1138 239 -244 286 -287 346 -318 78 -41 173 -67 247 -67 71 0 169 25 235 61 121 64 211 170 258 303 20 56 25 90 25 161 -1 106 -24 188 -80 284 -31 52 -241 269 -1072 1103 -568 571 -1039 1038 -1045 1038 -6 0 -83 -39 -171 -86z" stroke="#111827" stroke-width="576" stroke-linejoin="round" />
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </svg>
22
+ </g>
23
+ </svg>
@@ -1,27 +1,23 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80" fill="none" aria-hidden="true">
2
- <title>xopc</title>
3
- <rect x="10" y="10" width="80" height="80" rx="18" fill="#ffffff" />
4
- <g transform="translate(50 50) scale(0.92) translate(-50 -50)">
5
- <!-- Goal loop: outer system boundary + inner feedback loop -->
6
- <g stroke-linecap="round" fill="none">
7
- <g stroke="#000000" stroke-width="4">
8
- <path d="M 29.375 23.602 A 33.5 33.5 0 0 1 70.625 23.602" />
9
- <path d="M 76.398 29.375 A 33.5 33.5 0 0 1 76.398 70.625" />
10
- <path d="M 70.625 76.398 A 33.5 33.5 0 0 1 29.375 76.398" />
11
- <path d="M 23.602 70.625 A 33.5 33.5 0 0 1 23.602 29.375" />
12
- </g>
13
- <g stroke="#000000" stroke-width="3.2" transform="rotate(45 50 50)">
14
- <path d="M 35.011 29.370 A 25.5 25.5 0 0 1 64.989 29.370" />
15
- <path d="M 70.630 35.011 A 25.5 25.5 0 0 1 70.630 64.989" />
16
- <path d="M 64.989 70.630 A 25.5 25.5 0 0 1 35.011 70.630" />
17
- <path d="M 29.370 64.989 A 25.5 25.5 0 0 1 29.370 35.011" />
18
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" fill="none">
3
+ <rect x="40" y="40" width="944" height="944" rx="216" fill="#F8FAFC" />
4
+ <rect x="41" y="41" width="942" height="942" rx="215" fill="none" stroke="#0B1020" stroke-opacity="0.14" stroke-width="2" />
5
+ <g transform="translate(512 512) scale(0.85) translate(-512 -512)">
6
+ <svg width="1024" height="1024" viewBox="-32 -32 1088 1088">
7
+ <title>xopc mark</title>
8
+ <!-- Preserve the outer circumference while making the ring thicker inward. -->
9
+ <defs>
10
+ <clipPath id="outer-circumference">
11
+ <circle cx="512" cy="512" r="512" />
12
+ </clipPath>
13
+ </defs>
14
+ <g clip-path="url(#outer-circumference)">
15
+ <g transform="translate(1.414 0) scale(0.70718232)">
16
+ <g transform="translate(0 1448) scale(.1 -.1)" fill="#111827" stroke="none">
17
+ <path d="M6170 14469 c-252 -40 -401 -67 -567 -105 -568 -127 -1089 -311 -1603 -565 -584 -288 -1094 -630 -1595 -1070 -174 -153 -463 -442 -620 -619 -800 -905 -1364 -1975 -1655 -3140 -77 -306 -130 -611 -130 -742 0 -69 26 -170 62 -242 35 -69 120 -162 188 -206 67 -43 153 -70 245 -77 192 -13 364 76 474 247 22 34 49 89 60 123 11 34 32 133 45 219 92 565 281 1151 550 1703 231 473 473 852 799 1250 370 451 850 882 1362 1222 204 135 345 218 570 334 588 303 1221 506 1897 608 76 12 163 30 193 42 116 43 222 135 280 241 32 59 65 186 65 252 0 76 -26 183 -61 255 -43 87 -136 179 -224 221 -65 31 -189 60 -250 58 -16 0 -55 -4 -85 -9z M8065 14470 c-160 -32 -300 -139 -373 -285 -59 -119 -72 -268 -32 -385 29 -86 63 -144 124 -209 62 -66 131 -111 211 -139 33 -12 142 -33 242 -47 623 -87 1212 -270 1788 -555 449 -223 870 -502 1260 -836 167 -143 455 -425 590 -579 661 -752 1127 -1626 1375 -2580 41 -158 97 -448 125 -650 14 -97 24 -135 55 -201 46 -95 113 -173 194 -226 84 -54 169 -78 276 -78 156 0 289 57 392 168 93 101 138 223 138 372 0 103 -38 369 -86 602 -119 583 -313 1138 -589 1683 -231 456 -494 866 -807 1256 -165 206 -282 341 -439 503 -425 441 -804 762 -1264 1071 -816 547 -1700 908 -2609 1065 -327 56 -474 69 -571 50z M3875 10671 c-87 -25 -159 -67 -225 -133 -100 -100 -150 -225 -150 -376 0 -90 33 -195 90 -285 30 -48 262 -279 977 -972 516 -501 1006 -976 1089 -1057 83 -82 159 -148 168 -148 27 0 268 120 389 194 199 121 487 349 487 386 0 11 -295 307 -712 717 -679 665 -1251 1223 -1513 1473 -130 125 -209 175 -321 204 -79 21 -203 19 -279 -3z M10300 10674 c-36 -7 -99 -30 -140 -50 -61 -31 -97 -60 -206 -168 -166 -165 -1199 -1216 -1873 -1906 -282 -289 -556 -567 -609 -619 -197 -189 -388 -328 -840 -607 -618 -382 -673 -425 -1126 -873 -713 -707 -1882 -1898 -1920 -1956 -47 -70 -83 -168 -91 -250 -9 -80 15 -190 60 -281 23 -47 57 -93 100 -136 104 -104 226 -158 360 -158 81 0 153 19 240 62 49 24 106 76 306 277 135 135 586 595 1003 1021 417 426 824 840 905 921 80 80 196 185 256 233 143 114 356 255 690 456 411 248 604 381 777 538 65 58 445 442 2333 2352 261 264 306 314 338 376 47 91 67 170 67 264 0 89 -20 173 -58 244 -39 74 -145 177 -221 215 -70 36 -172 61 -241 60 -25 0 -74 -7 -110 -15z M391 6764 c-84 -22 -170 -73 -236 -139 -66 -66 -114 -148 -141 -240 -14 -49 -16 -83 -11 -185 8 -156 41 -339 117 -640 156 -621 332 -1095 609 -1635 258 -502 550 -943 914 -1377 405 -485 910 -947 1427 -1307 309 -215 583 -378 915 -543 340 -170 645 -296 1000 -412 293 -95 501 -150 795 -211 404 -83 521 -92 647 -50 41 14 96 40 122 57 119 82 199 207 228 357 14 70 15 96 5 163 -15 103 -60 197 -130 270 -112 118 -201 156 -454 197 -323 53 -604 121 -918 223 -429 140 -822 317 -1228 555 -286 167 -570 366 -817 573 -276 230 -563 517 -796 795 -216 260 -448 590 -618 880 -147 250 -333 635 -428 885 -144 379 -242 733 -303 1097 -16 98 -34 209 -41 247 -17 102 -78 215 -158 295 -36 36 -93 81 -127 98 -112 60 -258 78 -373 47z M13794 6766 c-100 -23 -172 -64 -250 -141 -101 -100 -137 -179 -164 -356 -60 -397 -137 -726 -251 -1069 -202 -610 -501 -1184 -892 -1710 -194 -261 -377 -468 -638 -725 -459 -450 -974 -817 -1547 -1104 -429 -215 -822 -362 -1272 -475 -213 -54 -375 -88 -580 -120 -85 -13 -181 -34 -212 -46 -32 -12 -85 -39 -118 -61 -143 -96 -230 -260 -230 -434 0 -84 20 -169 58 -245 37 -75 142 -180 220 -219 99 -50 171 -64 287 -58 159 9 588 96 920 187 206 56 555 174 760 255 818 324 1567 789 2225 1381 156 140 483 471 616 624 276 315 547 688 761 1045 290 484 541 1048 703 1580 98 325 181 688 231 1013 21 136 22 161 11 234 -29 198 -162 358 -351 424 -86 30 -207 38 -287 20z M8565 6534 c-225 -121 -403 -225 -523 -307 -103 -70 -192 -147 -192 -167 0 -6 381 -396 848 -867 466 -470 972 -982 1124 -1138 239 -244 286 -287 346 -318 78 -41 173 -67 247 -67 71 0 169 25 235 61 121 64 211 170 258 303 20 56 25 90 25 161 -1 106 -24 188 -80 284 -31 52 -241 269 -1072 1103 -568 571 -1039 1038 -1045 1038 -6 0 -83 -39 -171 -86z" stroke="#111827" stroke-width="576" stroke-linejoin="round" />
19
18
  </g>
20
- <!-- Central hub -->
21
- <path
22
- fill="#000000"
23
- transform="translate(50 50) scale(0.72) translate(-50 -50)"
24
- d="M 61.000 50.000 L 61.159 50.548 L 61.629 51.145 L 62.381 51.837 L 63.374 52.660 L 64.550 53.645 L 65.843 54.806 L 67.178 56.146 L 68.478 57.654 L 69.667 59.302 L 70.676 61.051 L 71.443 62.853 L 71.921 64.647 L 72.075 66.372 L 71.888 67.963 L 71.359 69.359 L 70.506 70.506 L 69.359 71.359 L 67.963 71.888 L 66.372 72.075 L 64.647 71.921 L 62.853 71.443 L 61.051 70.676 L 59.302 69.667 L 57.654 68.478 L 56.146 67.178 L 54.806 65.843 L 53.645 64.550 L 52.660 63.374 L 51.837 62.381 L 51.145 61.629 L 50.548 61.159 L 50.000 61.000 L 49.452 61.159 L 48.855 61.629 L 48.163 62.381 L 47.340 63.374 L 46.355 64.550 L 45.194 65.843 L 43.854 67.178 L 42.346 68.478 L 40.698 69.667 L 38.949 70.676 L 37.147 71.443 L 35.353 71.921 L 33.628 72.075 L 32.037 71.888 L 30.641 71.359 L 29.494 70.506 L 28.641 69.359 L 28.112 67.963 L 27.925 66.372 L 28.079 64.647 L 28.557 62.853 L 29.324 61.051 L 30.333 59.302 L 31.522 57.654 L 32.822 56.146 L 34.157 54.806 L 35.450 53.645 L 36.626 52.660 L 37.619 51.837 L 38.371 51.145 L 38.841 50.548 L 39.000 50.000 L 38.841 49.452 L 38.371 48.855 L 37.619 48.163 L 36.626 47.340 L 35.450 46.355 L 34.157 45.194 L 32.822 43.854 L 31.522 42.346 L 30.333 40.698 L 29.324 38.949 L 28.557 37.147 L 28.079 35.353 L 27.925 33.628 L 28.112 32.037 L 28.641 30.641 L 29.494 29.494 L 30.641 28.641 L 32.037 28.112 L 33.628 27.925 L 35.353 28.079 L 37.147 28.557 L 38.949 29.324 L 40.698 30.333 L 42.346 31.522 L 43.854 32.822 L 45.194 34.157 L 46.355 35.450 L 47.340 36.626 L 48.163 37.619 L 48.855 38.371 L 49.452 38.841 L 50.000 39.000 L 50.548 38.841 L 51.145 38.371 L 51.837 37.619 L 52.660 36.626 L 53.645 35.450 L 54.806 34.157 L 56.146 32.822 L 57.654 31.522 L 59.302 30.333 L 61.051 29.324 L 62.853 28.557 L 64.647 28.079 L 66.372 27.925 L 67.963 28.112 L 69.359 28.641 L 70.506 29.494 L 71.359 30.641 L 71.888 32.037 L 72.075 33.628 L 71.921 35.353 L 71.443 37.147 L 70.676 38.949 L 69.667 40.698 L 68.478 42.346 L 67.178 43.854 L 65.843 45.194 L 64.550 46.355 L 63.374 47.340 L 62.381 48.163 L 61.629 48.855 L 61.159 49.452 L 61.000 50.000 Z"
25
- />
19
+ </g>
20
+ </g>
21
+ </svg>
26
22
  </g>
27
23
  </svg>
@@ -4,13 +4,14 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="color-scheme" content="light dark" />
7
- <link rel="icon" href="/favicon.ico?v=20260623-2" sizes="any" />
8
- <link rel="icon" type="image/svg+xml" href="/favicon.svg?v=20260623-2" />
9
- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=20260623-2" />
10
- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.pngv=20260623-2" />
11
- <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260623-2" />
7
+ <link rel="icon" href="/favicon.ico?v=20260713-1" sizes="any" />
8
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg?v=20260713-1" />
9
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=20260713-1" />
10
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=20260713-1" />
11
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
12
+ <link rel="manifest" href="/site.webmanifest?v=20260713-1" />
12
13
  <title>xopc</title>
13
- <script type="module" crossorigin src="/assets/index-C4k6QSXw.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-DOetFpTt.js"></script>
14
15
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
15
16
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
16
17
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
@@ -22,13 +23,12 @@
22
23
  <link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
23
24
  <link rel="modulepreload" crossorigin href="/assets/locale-store-Ba72bFmP.js">
24
25
  <link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
25
- <link rel="modulepreload" crossorigin href="/assets/messages-YzjnURPJ.js">
26
- <link rel="modulepreload" crossorigin href="/assets/fetch-BMjlW0g1.js">
27
- <link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CY5W2Pp4.js">
26
+ <link rel="modulepreload" crossorigin href="/assets/messages-Bq4REfIj.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/fetch-Bl7zMnmd.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CPOgTcpv.js">
28
29
  <link rel="modulepreload" crossorigin href="/assets/toast-z0toXu32.js">
29
- <link rel="modulepreload" crossorigin href="/assets/url-DFGNSBNT.js">
30
30
  <link rel="modulepreload" crossorigin href="/assets/theme-store-Bt6vAkSB.js">
31
- <link rel="stylesheet" crossorigin href="/assets/index-EKmpPvZj.css">
31
+ <link rel="stylesheet" crossorigin href="/assets/index-W4ogAiHt.css">
32
32
  </head>
33
33
  <body>
34
34
  <div id="root"></div>
@@ -1,26 +1,21 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80" fill="none" aria-hidden="true">
2
- <title>xopc</title>
3
- <g transform="translate(50 50) scale(0.92) translate(-50 -50)">
4
- <!-- Goal loop: outer system boundary + inner feedback loop -->
5
- <g stroke-linecap="round" fill="none">
6
- <g stroke="#ffffff" stroke-width="4">
7
- <path d="M 29.375 23.602 A 33.5 33.5 0 0 1 70.625 23.602" />
8
- <path d="M 76.398 29.375 A 33.5 33.5 0 0 1 76.398 70.625" />
9
- <path d="M 70.625 76.398 A 33.5 33.5 0 0 1 29.375 76.398" />
10
- <path d="M 23.602 70.625 A 33.5 33.5 0 0 1 23.602 29.375" />
11
- </g>
12
- <g stroke="#ffffff" stroke-width="3.2" transform="rotate(45 50 50)">
13
- <path d="M 35.011 29.370 A 25.5 25.5 0 0 1 64.989 29.370" />
14
- <path d="M 70.630 35.011 A 25.5 25.5 0 0 1 70.630 64.989" />
15
- <path d="M 64.989 70.630 A 25.5 25.5 0 0 1 35.011 70.630" />
16
- <path d="M 29.370 64.989 A 25.5 25.5 0 0 1 29.370 35.011" />
17
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" fill="none">
3
+ <g transform="translate(512 512) scale(1) translate(-512 -512)">
4
+ <svg width="1024" height="1024" viewBox="-32 -32 1088 1088">
5
+ <title>xopc mark</title>
6
+ <!-- Preserve the outer circumference while making the ring thicker inward. -->
7
+ <defs>
8
+ <clipPath id="outer-circumference">
9
+ <circle cx="512" cy="512" r="512" />
10
+ </clipPath>
11
+ </defs>
12
+ <g clip-path="url(#outer-circumference)">
13
+ <g transform="translate(1.414 0) scale(0.70718232)">
14
+ <g transform="translate(0 1448) scale(.1 -.1)" fill="#F8FAFC" stroke="none">
15
+ <path d="M6170 14469 c-252 -40 -401 -67 -567 -105 -568 -127 -1089 -311 -1603 -565 -584 -288 -1094 -630 -1595 -1070 -174 -153 -463 -442 -620 -619 -800 -905 -1364 -1975 -1655 -3140 -77 -306 -130 -611 -130 -742 0 -69 26 -170 62 -242 35 -69 120 -162 188 -206 67 -43 153 -70 245 -77 192 -13 364 76 474 247 22 34 49 89 60 123 11 34 32 133 45 219 92 565 281 1151 550 1703 231 473 473 852 799 1250 370 451 850 882 1362 1222 204 135 345 218 570 334 588 303 1221 506 1897 608 76 12 163 30 193 42 116 43 222 135 280 241 32 59 65 186 65 252 0 76 -26 183 -61 255 -43 87 -136 179 -224 221 -65 31 -189 60 -250 58 -16 0 -55 -4 -85 -9z M8065 14470 c-160 -32 -300 -139 -373 -285 -59 -119 -72 -268 -32 -385 29 -86 63 -144 124 -209 62 -66 131 -111 211 -139 33 -12 142 -33 242 -47 623 -87 1212 -270 1788 -555 449 -223 870 -502 1260 -836 167 -143 455 -425 590 -579 661 -752 1127 -1626 1375 -2580 41 -158 97 -448 125 -650 14 -97 24 -135 55 -201 46 -95 113 -173 194 -226 84 -54 169 -78 276 -78 156 0 289 57 392 168 93 101 138 223 138 372 0 103 -38 369 -86 602 -119 583 -313 1138 -589 1683 -231 456 -494 866 -807 1256 -165 206 -282 341 -439 503 -425 441 -804 762 -1264 1071 -816 547 -1700 908 -2609 1065 -327 56 -474 69 -571 50z M3875 10671 c-87 -25 -159 -67 -225 -133 -100 -100 -150 -225 -150 -376 0 -90 33 -195 90 -285 30 -48 262 -279 977 -972 516 -501 1006 -976 1089 -1057 83 -82 159 -148 168 -148 27 0 268 120 389 194 199 121 487 349 487 386 0 11 -295 307 -712 717 -679 665 -1251 1223 -1513 1473 -130 125 -209 175 -321 204 -79 21 -203 19 -279 -3z M10300 10674 c-36 -7 -99 -30 -140 -50 -61 -31 -97 -60 -206 -168 -166 -165 -1199 -1216 -1873 -1906 -282 -289 -556 -567 -609 -619 -197 -189 -388 -328 -840 -607 -618 -382 -673 -425 -1126 -873 -713 -707 -1882 -1898 -1920 -1956 -47 -70 -83 -168 -91 -250 -9 -80 15 -190 60 -281 23 -47 57 -93 100 -136 104 -104 226 -158 360 -158 81 0 153 19 240 62 49 24 106 76 306 277 135 135 586 595 1003 1021 417 426 824 840 905 921 80 80 196 185 256 233 143 114 356 255 690 456 411 248 604 381 777 538 65 58 445 442 2333 2352 261 264 306 314 338 376 47 91 67 170 67 264 0 89 -20 173 -58 244 -39 74 -145 177 -221 215 -70 36 -172 61 -241 60 -25 0 -74 -7 -110 -15z M391 6764 c-84 -22 -170 -73 -236 -139 -66 -66 -114 -148 -141 -240 -14 -49 -16 -83 -11 -185 8 -156 41 -339 117 -640 156 -621 332 -1095 609 -1635 258 -502 550 -943 914 -1377 405 -485 910 -947 1427 -1307 309 -215 583 -378 915 -543 340 -170 645 -296 1000 -412 293 -95 501 -150 795 -211 404 -83 521 -92 647 -50 41 14 96 40 122 57 119 82 199 207 228 357 14 70 15 96 5 163 -15 103 -60 197 -130 270 -112 118 -201 156 -454 197 -323 53 -604 121 -918 223 -429 140 -822 317 -1228 555 -286 167 -570 366 -817 573 -276 230 -563 517 -796 795 -216 260 -448 590 -618 880 -147 250 -333 635 -428 885 -144 379 -242 733 -303 1097 -16 98 -34 209 -41 247 -17 102 -78 215 -158 295 -36 36 -93 81 -127 98 -112 60 -258 78 -373 47z M13794 6766 c-100 -23 -172 -64 -250 -141 -101 -100 -137 -179 -164 -356 -60 -397 -137 -726 -251 -1069 -202 -610 -501 -1184 -892 -1710 -194 -261 -377 -468 -638 -725 -459 -450 -974 -817 -1547 -1104 -429 -215 -822 -362 -1272 -475 -213 -54 -375 -88 -580 -120 -85 -13 -181 -34 -212 -46 -32 -12 -85 -39 -118 -61 -143 -96 -230 -260 -230 -434 0 -84 20 -169 58 -245 37 -75 142 -180 220 -219 99 -50 171 -64 287 -58 159 9 588 96 920 187 206 56 555 174 760 255 818 324 1567 789 2225 1381 156 140 483 471 616 624 276 315 547 688 761 1045 290 484 541 1048 703 1580 98 325 181 688 231 1013 21 136 22 161 11 234 -29 198 -162 358 -351 424 -86 30 -207 38 -287 20z M8565 6534 c-225 -121 -403 -225 -523 -307 -103 -70 -192 -147 -192 -167 0 -6 381 -396 848 -867 466 -470 972 -982 1124 -1138 239 -244 286 -287 346 -318 78 -41 173 -67 247 -67 71 0 169 25 235 61 121 64 211 170 258 303 20 56 25 90 25 161 -1 106 -24 188 -80 284 -31 52 -241 269 -1072 1103 -568 571 -1039 1038 -1045 1038 -6 0 -83 -39 -171 -86z" stroke="#F8FAFC" stroke-width="576" stroke-linejoin="round" />
18
16
  </g>
19
- <!-- Central hub -->
20
- <path
21
- fill="#ffffff"
22
- transform="translate(50 50) scale(0.72) translate(-50 -50)"
23
- d="M 61.000 50.000 L 61.159 50.548 L 61.629 51.145 L 62.381 51.837 L 63.374 52.660 L 64.550 53.645 L 65.843 54.806 L 67.178 56.146 L 68.478 57.654 L 69.667 59.302 L 70.676 61.051 L 71.443 62.853 L 71.921 64.647 L 72.075 66.372 L 71.888 67.963 L 71.359 69.359 L 70.506 70.506 L 69.359 71.359 L 67.963 71.888 L 66.372 72.075 L 64.647 71.921 L 62.853 71.443 L 61.051 70.676 L 59.302 69.667 L 57.654 68.478 L 56.146 67.178 L 54.806 65.843 L 53.645 64.550 L 52.660 63.374 L 51.837 62.381 L 51.145 61.629 L 50.548 61.159 L 50.000 61.000 L 49.452 61.159 L 48.855 61.629 L 48.163 62.381 L 47.340 63.374 L 46.355 64.550 L 45.194 65.843 L 43.854 67.178 L 42.346 68.478 L 40.698 69.667 L 38.949 70.676 L 37.147 71.443 L 35.353 71.921 L 33.628 72.075 L 32.037 71.888 L 30.641 71.359 L 29.494 70.506 L 28.641 69.359 L 28.112 67.963 L 27.925 66.372 L 28.079 64.647 L 28.557 62.853 L 29.324 61.051 L 30.333 59.302 L 31.522 57.654 L 32.822 56.146 L 34.157 54.806 L 35.450 53.645 L 36.626 52.660 L 37.619 51.837 L 38.371 51.145 L 38.841 50.548 L 39.000 50.000 L 38.841 49.452 L 38.371 48.855 L 37.619 48.163 L 36.626 47.340 L 35.450 46.355 L 34.157 45.194 L 32.822 43.854 L 31.522 42.346 L 30.333 40.698 L 29.324 38.949 L 28.557 37.147 L 28.079 35.353 L 27.925 33.628 L 28.112 32.037 L 28.641 30.641 L 29.494 29.494 L 30.641 28.641 L 32.037 28.112 L 33.628 27.925 L 35.353 28.079 L 37.147 28.557 L 38.949 29.324 L 40.698 30.333 L 42.346 31.522 L 43.854 32.822 L 45.194 34.157 L 46.355 35.450 L 47.340 36.626 L 48.163 37.619 L 48.855 38.371 L 49.452 38.841 L 50.000 39.000 L 50.548 38.841 L 51.145 38.371 L 51.837 37.619 L 52.660 36.626 L 53.645 35.450 L 54.806 34.157 L 56.146 32.822 L 57.654 31.522 L 59.302 30.333 L 61.051 29.324 L 62.853 28.557 L 64.647 28.079 L 66.372 27.925 L 67.963 28.112 L 69.359 28.641 L 70.506 29.494 L 71.359 30.641 L 71.888 32.037 L 72.075 33.628 L 71.921 35.353 L 71.443 37.147 L 70.676 38.949 L 69.667 40.698 L 68.478 42.346 L 67.178 43.854 L 65.843 45.194 L 64.550 46.355 L 63.374 47.340 L 62.381 48.163 L 61.629 48.855 L 61.159 49.452 L 61.000 50.000 Z"
24
- />
17
+ </g>
18
+ </g>
19
+ </svg>
25
20
  </g>
26
21
  </svg>
@@ -1,27 +1,21 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80" fill="none" aria-hidden="true">
2
- <title>xopc</title>
3
- <g transform="translate(50 50) scale(0.92) translate(-50 -50)">
4
- <!-- Goal loop: outer system boundary + inner feedback loop -->
5
- <g stroke-linecap="round" fill="none">
6
- <g stroke="#111111" stroke-opacity="0.9" stroke-width="4">
7
- <path d="M 29.375 23.602 A 33.5 33.5 0 0 1 70.625 23.602" />
8
- <path d="M 76.398 29.375 A 33.5 33.5 0 0 1 76.398 70.625" />
9
- <path d="M 70.625 76.398 A 33.5 33.5 0 0 1 29.375 76.398" />
10
- <path d="M 23.602 70.625 A 33.5 33.5 0 0 1 23.602 29.375" />
11
- </g>
12
- <g stroke="#3a6bff" stroke-width="3.2" transform="rotate(45 50 50)">
13
- <path d="M 35.011 29.370 A 25.5 25.5 0 0 1 64.989 29.370" />
14
- <path d="M 70.630 35.011 A 25.5 25.5 0 0 1 70.630 64.989" />
15
- <path d="M 64.989 70.630 A 25.5 25.5 0 0 1 35.011 70.630" />
16
- <path d="M 29.370 64.989 A 25.5 25.5 0 0 1 29.370 35.011" />
17
- </g>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" fill="none">
3
+ <g transform="translate(512 512) scale(1) translate(-512 -512)">
4
+ <svg width="1024" height="1024" viewBox="-32 -32 1088 1088">
5
+ <title>xopc mark</title>
6
+ <!-- Preserve the outer circumference while making the ring thicker inward. -->
7
+ <defs>
8
+ <clipPath id="outer-circumference">
9
+ <circle cx="512" cy="512" r="512" />
10
+ </clipPath>
11
+ </defs>
12
+ <g clip-path="url(#outer-circumference)">
13
+ <g transform="translate(1.414 0) scale(0.70718232)">
14
+ <g transform="translate(0 1448) scale(.1 -.1)" fill="#111827" stroke="none">
15
+ <path d="M6170 14469 c-252 -40 -401 -67 -567 -105 -568 -127 -1089 -311 -1603 -565 -584 -288 -1094 -630 -1595 -1070 -174 -153 -463 -442 -620 -619 -800 -905 -1364 -1975 -1655 -3140 -77 -306 -130 -611 -130 -742 0 -69 26 -170 62 -242 35 -69 120 -162 188 -206 67 -43 153 -70 245 -77 192 -13 364 76 474 247 22 34 49 89 60 123 11 34 32 133 45 219 92 565 281 1151 550 1703 231 473 473 852 799 1250 370 451 850 882 1362 1222 204 135 345 218 570 334 588 303 1221 506 1897 608 76 12 163 30 193 42 116 43 222 135 280 241 32 59 65 186 65 252 0 76 -26 183 -61 255 -43 87 -136 179 -224 221 -65 31 -189 60 -250 58 -16 0 -55 -4 -85 -9z M8065 14470 c-160 -32 -300 -139 -373 -285 -59 -119 -72 -268 -32 -385 29 -86 63 -144 124 -209 62 -66 131 -111 211 -139 33 -12 142 -33 242 -47 623 -87 1212 -270 1788 -555 449 -223 870 -502 1260 -836 167 -143 455 -425 590 -579 661 -752 1127 -1626 1375 -2580 41 -158 97 -448 125 -650 14 -97 24 -135 55 -201 46 -95 113 -173 194 -226 84 -54 169 -78 276 -78 156 0 289 57 392 168 93 101 138 223 138 372 0 103 -38 369 -86 602 -119 583 -313 1138 -589 1683 -231 456 -494 866 -807 1256 -165 206 -282 341 -439 503 -425 441 -804 762 -1264 1071 -816 547 -1700 908 -2609 1065 -327 56 -474 69 -571 50z M3875 10671 c-87 -25 -159 -67 -225 -133 -100 -100 -150 -225 -150 -376 0 -90 33 -195 90 -285 30 -48 262 -279 977 -972 516 -501 1006 -976 1089 -1057 83 -82 159 -148 168 -148 27 0 268 120 389 194 199 121 487 349 487 386 0 11 -295 307 -712 717 -679 665 -1251 1223 -1513 1473 -130 125 -209 175 -321 204 -79 21 -203 19 -279 -3z M10300 10674 c-36 -7 -99 -30 -140 -50 -61 -31 -97 -60 -206 -168 -166 -165 -1199 -1216 -1873 -1906 -282 -289 -556 -567 -609 -619 -197 -189 -388 -328 -840 -607 -618 -382 -673 -425 -1126 -873 -713 -707 -1882 -1898 -1920 -1956 -47 -70 -83 -168 -91 -250 -9 -80 15 -190 60 -281 23 -47 57 -93 100 -136 104 -104 226 -158 360 -158 81 0 153 19 240 62 49 24 106 76 306 277 135 135 586 595 1003 1021 417 426 824 840 905 921 80 80 196 185 256 233 143 114 356 255 690 456 411 248 604 381 777 538 65 58 445 442 2333 2352 261 264 306 314 338 376 47 91 67 170 67 264 0 89 -20 173 -58 244 -39 74 -145 177 -221 215 -70 36 -172 61 -241 60 -25 0 -74 -7 -110 -15z M391 6764 c-84 -22 -170 -73 -236 -139 -66 -66 -114 -148 -141 -240 -14 -49 -16 -83 -11 -185 8 -156 41 -339 117 -640 156 -621 332 -1095 609 -1635 258 -502 550 -943 914 -1377 405 -485 910 -947 1427 -1307 309 -215 583 -378 915 -543 340 -170 645 -296 1000 -412 293 -95 501 -150 795 -211 404 -83 521 -92 647 -50 41 14 96 40 122 57 119 82 199 207 228 357 14 70 15 96 5 163 -15 103 -60 197 -130 270 -112 118 -201 156 -454 197 -323 53 -604 121 -918 223 -429 140 -822 317 -1228 555 -286 167 -570 366 -817 573 -276 230 -563 517 -796 795 -216 260 -448 590 -618 880 -147 250 -333 635 -428 885 -144 379 -242 733 -303 1097 -16 98 -34 209 -41 247 -17 102 -78 215 -158 295 -36 36 -93 81 -127 98 -112 60 -258 78 -373 47z M13794 6766 c-100 -23 -172 -64 -250 -141 -101 -100 -137 -179 -164 -356 -60 -397 -137 -726 -251 -1069 -202 -610 -501 -1184 -892 -1710 -194 -261 -377 -468 -638 -725 -459 -450 -974 -817 -1547 -1104 -429 -215 -822 -362 -1272 -475 -213 -54 -375 -88 -580 -120 -85 -13 -181 -34 -212 -46 -32 -12 -85 -39 -118 -61 -143 -96 -230 -260 -230 -434 0 -84 20 -169 58 -245 37 -75 142 -180 220 -219 99 -50 171 -64 287 -58 159 9 588 96 920 187 206 56 555 174 760 255 818 324 1567 789 2225 1381 156 140 483 471 616 624 276 315 547 688 761 1045 290 484 541 1048 703 1580 98 325 181 688 231 1013 21 136 22 161 11 234 -29 198 -162 358 -351 424 -86 30 -207 38 -287 20z M8565 6534 c-225 -121 -403 -225 -523 -307 -103 -70 -192 -147 -192 -167 0 -6 381 -396 848 -867 466 -470 972 -982 1124 -1138 239 -244 286 -287 346 -318 78 -41 173 -67 247 -67 71 0 169 25 235 61 121 64 211 170 258 303 20 56 25 90 25 161 -1 106 -24 188 -80 284 -31 52 -241 269 -1072 1103 -568 571 -1039 1038 -1045 1038 -6 0 -83 -39 -171 -86z" stroke="#111827" stroke-width="576" stroke-linejoin="round" />
18
16
  </g>
19
- <!-- Central hub -->
20
- <path
21
- fill="#111111"
22
- fill-opacity="0.92"
23
- transform="translate(50 50) scale(0.72) translate(-50 -50)"
24
- d="M 61.000 50.000 L 61.159 50.548 L 61.629 51.145 L 62.381 51.837 L 63.374 52.660 L 64.550 53.645 L 65.843 54.806 L 67.178 56.146 L 68.478 57.654 L 69.667 59.302 L 70.676 61.051 L 71.443 62.853 L 71.921 64.647 L 72.075 66.372 L 71.888 67.963 L 71.359 69.359 L 70.506 70.506 L 69.359 71.359 L 67.963 71.888 L 66.372 72.075 L 64.647 71.921 L 62.853 71.443 L 61.051 70.676 L 59.302 69.667 L 57.654 68.478 L 56.146 67.178 L 54.806 65.843 L 53.645 64.550 L 52.660 63.374 L 51.837 62.381 L 51.145 61.629 L 50.548 61.159 L 50.000 61.000 L 49.452 61.159 L 48.855 61.629 L 48.163 62.381 L 47.340 63.374 L 46.355 64.550 L 45.194 65.843 L 43.854 67.178 L 42.346 68.478 L 40.698 69.667 L 38.949 70.676 L 37.147 71.443 L 35.353 71.921 L 33.628 72.075 L 32.037 71.888 L 30.641 71.359 L 29.494 70.506 L 28.641 69.359 L 28.112 67.963 L 27.925 66.372 L 28.079 64.647 L 28.557 62.853 L 29.324 61.051 L 30.333 59.302 L 31.522 57.654 L 32.822 56.146 L 34.157 54.806 L 35.450 53.645 L 36.626 52.660 L 37.619 51.837 L 38.371 51.145 L 38.841 50.548 L 39.000 50.000 L 38.841 49.452 L 38.371 48.855 L 37.619 48.163 L 36.626 47.340 L 35.450 46.355 L 34.157 45.194 L 32.822 43.854 L 31.522 42.346 L 30.333 40.698 L 29.324 38.949 L 28.557 37.147 L 28.079 35.353 L 27.925 33.628 L 28.112 32.037 L 28.641 30.641 L 29.494 29.494 L 30.641 28.641 L 32.037 28.112 L 33.628 27.925 L 35.353 28.079 L 37.147 28.557 L 38.949 29.324 L 40.698 30.333 L 42.346 31.522 L 43.854 32.822 L 45.194 34.157 L 46.355 35.450 L 47.340 36.626 L 48.163 37.619 L 48.855 38.371 L 49.452 38.841 L 50.000 39.000 L 50.548 38.841 L 51.145 38.371 L 51.837 37.619 L 52.660 36.626 L 53.645 35.450 L 54.806 34.157 L 56.146 32.822 L 57.654 31.522 L 59.302 30.333 L 61.051 29.324 L 62.853 28.557 L 64.647 28.079 L 66.372 27.925 L 67.963 28.112 L 69.359 28.641 L 70.506 29.494 L 71.359 30.641 L 71.888 32.037 L 72.075 33.628 L 71.921 35.353 L 71.443 37.147 L 70.676 38.949 L 69.667 40.698 L 68.478 42.346 L 67.178 43.854 L 65.843 45.194 L 64.550 46.355 L 63.374 47.340 L 62.381 48.163 L 61.629 48.855 L 61.159 49.452 L 61.000 50.000 Z"
25
- />
17
+ </g>
18
+ </g>
19
+ </svg>
26
20
  </g>
27
21
  </svg>
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "xopc",
3
+ "short_name": "xopc",
4
+ "description": "A local-first AI system that keeps projects moving.",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#0B0D10",
8
+ "theme_color": "#0B0D10",
9
+ "icons": [
10
+ {
11
+ "src": "/pwa-192x192.png",
12
+ "sizes": "192x192",
13
+ "type": "image/png",
14
+ "purpose": "any maskable"
15
+ },
16
+ {
17
+ "src": "/pwa-512x512.png",
18
+ "sizes": "512x512",
19
+ "type": "image/png",
20
+ "purpose": "any maskable"
21
+ }
22
+ ]
23
+ }