@anvia/studio 1.1.0 → 1.1.2

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 (31) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/ui/assets/{graphs-page-D2jzO23K.js → graphs-page-vBCjLEva.js} +2 -2
  4. package/dist/ui/assets/{graphs-page-D2jzO23K.js.map → graphs-page-vBCjLEva.js.map} +1 -1
  5. package/dist/ui/assets/index-D7rMlAzl.js +61 -0
  6. package/dist/ui/assets/index-D7rMlAzl.js.map +1 -0
  7. package/dist/ui/assets/{knowledge-page-BSI_VDOp.js → knowledge-page-ZeAUXg01.js} +2 -2
  8. package/dist/ui/assets/{knowledge-page-BSI_VDOp.js.map → knowledge-page-ZeAUXg01.js.map} +1 -1
  9. package/dist/ui/assets/{mcps-page-BL1FLksQ.js → mcps-page-BSkygYJM.js} +2 -2
  10. package/dist/ui/assets/{mcps-page-BL1FLksQ.js.map → mcps-page-BSkygYJM.js.map} +1 -1
  11. package/dist/ui/assets/{memory-page-C20w55ut.js → memory-page-B2pWZ4in.js} +2 -2
  12. package/dist/ui/assets/{memory-page-C20w55ut.js.map → memory-page-B2pWZ4in.js.map} +1 -1
  13. package/dist/ui/assets/{pipelines-page-BPCS5mwc.js → pipelines-page-DAqa699J.js} +2 -2
  14. package/dist/ui/assets/{pipelines-page-BPCS5mwc.js.map → pipelines-page-DAqa699J.js.map} +1 -1
  15. package/dist/ui/assets/{renderers-CfrpUrJr.js → renderers-DRD34eUr.js} +4 -4
  16. package/dist/ui/assets/{renderers-CfrpUrJr.js.map → renderers-DRD34eUr.js.map} +1 -1
  17. package/dist/ui/assets/{status-page-B-57_iOR.js → status-page-CqmMMSo2.js} +2 -2
  18. package/dist/ui/assets/{status-page-B-57_iOR.js.map → status-page-CqmMMSo2.js.map} +1 -1
  19. package/dist/ui/assets/{style-BstB0PNS.js → style-FGiH1LIC.js} +4 -4
  20. package/dist/ui/assets/style-FGiH1LIC.js.map +1 -0
  21. package/dist/ui/assets/{tool-runner-DcuNII62.js → tool-runner-CExWna8k.js} +2 -2
  22. package/dist/ui/assets/{tool-runner-DcuNII62.js.map → tool-runner-CExWna8k.js.map} +1 -1
  23. package/dist/ui/assets/{tools-page-D4wQGPOl.js → tools-page-CdkExqNd.js} +2 -2
  24. package/dist/ui/assets/{tools-page-D4wQGPOl.js.map → tools-page-CdkExqNd.js.map} +1 -1
  25. package/dist/ui/assets/{transcript-item-B6OLwa1p.js → transcript-item-D9NWsnsD.js} +2 -2
  26. package/dist/ui/assets/{transcript-item-B6OLwa1p.js.map → transcript-item-D9NWsnsD.js.map} +1 -1
  27. package/dist/ui/index.html +1 -1
  28. package/package.json +11 -11
  29. package/dist/ui/assets/index-C0DKDUvj.js +0 -75
  30. package/dist/ui/assets/index-C0DKDUvj.js.map +0 -1
  31. package/dist/ui/assets/style-BstB0PNS.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{i as e,r as t,s as n,t as r}from"./utils-DzstcfqT.js";import{t as i}from"./button-B_AoswCu.js";import{t as a}from"./ArrowClockwise.es-5vr4h4OH.js";import{n as o,t as s}from"./icon-DyadsXLr.js";import{a as c,i as l,n as ee,r as u,t as d}from"./select-BdCBnmXx.js";import{a as f,c as te,s as ne,t as p}from"./studio-DzEdCFsX.js";import{t as m}from"./textarea-fAtCF2cf.js";import{a as h,i as g,n as _,o as v,r as y,s as b,t as re}from"./style-BstB0PNS.js";import{t as ie}from"./renderers-CfrpUrJr.js";var x=n(e(),1),ae=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z`}))]]),S=x.forwardRef((e,t)=>x.createElement(o,{ref:t,...e,weights:ae}));S.displayName=`PlayIcon`;var oe=S,C=t();function w(e){let t=E(e.metadata,e.limit),n=k(e.metadata);return t.length===0&&!n?null:(0,C.jsxs)(`div`,{className:`grid min-w-0 gap-1 text-xs leading-5 text-muted-foreground`,children:[t.length===0?null:(0,C.jsx)(`div`,{className:`flex min-w-0 flex-wrap gap-x-2 gap-y-1`,children:t.map(e=>(0,C.jsxs)(`span`,{className:r(`min-w-0 break-words`,e.tone===`error`?`text-destructive`:`text-muted-foreground`),children:[(0,C.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.key,`=`]}),e.value]},e.key))}),n?(0,C.jsxs)(`details`,{className:`group min-w-0 rounded-lg border border-border bg-muted px-2 py-1`,children:[(0,C.jsx)(`summary`,{className:`cursor-pointer select-none text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground transition group-open:text-foreground`,children:`Details`}),(0,C.jsx)(`pre`,{className:`m-0 mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs leading-4 text-muted-foreground`,children:A(e.metadata)})]}):null]})}function T(e,t){return E(e,t).map(e=>`${e.key}=${e.value}`).join(` `)}function E(e,t=6){return Object.entries(e??{}).map(([e,t])=>{let n=e===`error`?`error`:`default`;return{key:e,value:D(e,t),tone:n}}).filter(e=>e.value.length>0).slice(0,t)}function D(e,t){return t===null?`null`:typeof t==`string`||typeof t==`number`||typeof t==`boolean`?String(t):Array.isArray(t)?`[${t.length}]`:M(t)?e===`error`?O(t):j(t):``}function O(e){let t=typeof e.name==`string`&&e.name.length>0?e.name:void 0,n=typeof e.message==`string`&&e.message.length>0?e.message:void 0;return t!==void 0&&n!==void 0?`${t}: ${n}`:n===void 0?j(e):n}function k(e){return Object.values(e??{}).some(e=>Array.isArray(e)||M(e))}function A(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function j(e){try{return JSON.stringify(e)}catch{return String(e)}}function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N={pipelineStage:B},P=`var(--muted-foreground)`,F=`var(--foreground)`,I=`var(--background)`,L=`var(--muted-foreground)`,R=`var(--destructive)`,z=`var(--foreground)`;function B(e){let t=e.data.status;return(0,C.jsxs)(`article`,{className:[`group relative min-h-[74px] w-[210px] rounded-none border bg-card px-4 py-3 text-left shadow-[inset_0_1px_0_var(--sb-inset-highlight)] transition duration-200`,e.selected?`border-foreground`:`border-hair`,t===`running`?`translate-y-[-1px] border-foreground`:``,t===`completed`?`border-muted-foreground`:``,t===`failed`?`border-destructive`:``].join(` `),children:[(0,C.jsx)(g,{type:`target`,position:b.Top,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`}),(0,C.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`truncate text-sm font-semibold leading-5 tracking-tight text-foreground`,children:e.data.label}),(0,C.jsxs)(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-lg`,style:{backgroundColor:e.data.statusColor}}),(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.data.kind})]})]}),t===void 0?null:(0,C.jsx)(`span`,{className:`rounded-lg border border-hair bg-background px-1.5 py-0.5 text-xs font-semibold uppercase tracking-[0.08em]`,style:{color:e.data.statusColor},children:t})]}),e.data.branchKey===void 0?null:(0,C.jsxs)(`div`,{className:`mt-2 truncate text-xs text-muted-foreground`,children:[`branch: `,e.data.branchKey]}),(0,C.jsx)(g,{type:`source`,position:b.Bottom,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`})]})}function V(e,t){let n=new Map;if(t.length===0)return n;for(let r of e){if(r.runId!==t)continue;let e=G(r.metadata,`nodePath`);if(e===void 0)continue;let i=K(e);r.event.endsWith(`.started`)&&n.set(i,`running`),r.event.endsWith(`.completed`)&&n.set(i,`completed`),r.event.endsWith(`.failed`)&&n.set(i,`failed`)}return n}function H(e,t){let n=U(e),r=new Map,i=new Map;for(let e of n.values())i.set(e,(i.get(e)??0)+1);return{nodes:e.nodes.map(e=>{let a=K(e.path),o=n.get(a)??0,s=r.get(o)??0;r.set(o,s+1);let c=i.get(o)??1,l=t.get(a);return{id:a,type:`pipelineStage`,position:{x:(s-(c-1)/2)*280,y:o*170},sourcePosition:b.Bottom,targetPosition:b.Top,data:{label:e.label,kind:e.kind,status:l,statusColor:W(l),branchKey:e.branchKey}}}),edges:e.edges.map(e=>({id:e.id,source:K(e.source),target:K(e.target),type:`smoothstep`,className:`pipeline-flow-edge`,label:e.label,markerEnd:{type:v.ArrowClosed,width:10,height:10,color:P},style:{stroke:P,strokeWidth:1.6,opacity:.78},labelShowBg:!0,labelStyle:{fill:L,fontSize:11,fontWeight:700},labelBgStyle:{fill:I,fillOpacity:.92},labelBgPadding:[6,4],labelBgBorderRadius:2}))}}function U(e){let t=new Map;for(let n of e.nodes)t.set(K(n.path),0);for(let n=0;n<e.nodes.length;n+=1){let n=!1;for(let r of e.edges){let e=K(r.source),i=K(r.target),a=t.get(e);if(a===void 0||!t.has(i))continue;let o=a+1;o>(t.get(i)??0)&&(t.set(i,o),n=!0)}if(!n)break}return t}function W(e){switch(e){case`running`:return z;case`completed`:return P;case`failed`:return R;default:return F}}function G(e,t){let n=e?.[t];return Array.isArray(n)&&n.every(e=>typeof e==`string`)?n:void 0}function K(e){return JSON.stringify(e)}function se(e){let[t,n]=(0,x.useState)(),r=e.detail?.graph,i=r?.nodes.find(e=>K(e.path)===t)??r?.nodes[0]??void 0,a=(0,x.useMemo)(()=>V(e.logs,e.activeRunId),[e.logs,e.activeRunId]),o=(0,x.useMemo)(()=>r===void 0?{nodes:[],edges:[]}:H(r,a),[r,a]);return!e.enabled||!e.detailLoading&&e.pipelines.length===0?(0,C.jsx)(f,{"aria-label":`Pipelines`,children:(0,C.jsx)(p,{title:e.enabled?`No pipelines`:`Pipelines unavailable`,text:e.enabled?`No pipeline records are available in this Studio runtime.`:`This Studio runtime does not expose pipelines.`})}):(0,C.jsx)(f,{children:(0,C.jsx)(`div`,{className:`grid min-h-0 min-w-0 pb-6 pr-6`,children:(0,C.jsxs)(ne,{className:`grid grid-cols-[minmax(0,2fr)_minmax(0,1fr)] max-lg:grid-cols-1`,children:[(0,C.jsxs)(`div`,{className:`relative min-h-0 min-w-0 overflow-hidden border-r border-hair bg-card max-lg:border-b max-lg:border-r-0`,children:[e.detailLoading&&r===void 0?(0,C.jsx)(`div`,{className:`grid h-full min-h-96 place-items-center p-6`,children:(0,C.jsxs)(`div`,{className:`grid w-full max-w-lg gap-3`,children:[(0,C.jsx)(`div`,{className:`h-4 w-40 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-16 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-16 w-4/5 animate-pulse rounded-lg bg-muted`})]})}):null,!e.detailLoading&&r===void 0?(0,C.jsx)(p,{className:`h-full`,title:e.pipelines.length===0?`No pipelines`:`No pipeline selected`,text:e.pipelines.length===0?`No pipeline records are available in this Studio runtime.`:`Choose a registered pipeline to inspect its graph and runtime logs.`}):null,r===void 0?null:(0,C.jsxs)(h,{nodes:o.nodes,edges:o.edges,className:`pipeline-flow`,style:{"--xy-edge-stroke":`var(--muted-foreground)`,"--xy-edge-stroke-width":`1.6`,"--xy-edge-stroke-selected":`var(--foreground)`},fitView:!0,fitViewOptions:{padding:.18,maxZoom:.96},minZoom:.48,maxZoom:1.35,colorMode:e.theme,nodeTypes:N,proOptions:{hideAttribution:!0},defaultEdgeOptions:{type:`smoothstep`,focusable:!0},onNodeClick:(e,t)=>n(t.id),children:[(0,C.jsx)(re,{variant:_.Dots,gap:14,size:1.8,color:L,className:`opacity-35`}),(0,C.jsx)(y,{showInteractive:!1})]})]}),(0,C.jsx)(ce,{pipelines:e.pipelines,selectedPipelineId:e.selectedPipelineId,detail:e.detail,logs:e.logs,runs:e.runs,logsLoading:e.logsLoading,runsLoading:e.runsLoading,runState:e.runState,runInput:e.runInput,runOutput:e.runOutput,activeTab:e.activeTab,selectedNode:i,selectedNodeStatus:i?.id===void 0?void 0:a.get(i.id),onSelectPipeline:t=>{n(void 0),e.onSelectPipeline(t)},onRunInputChange:e.onRunInputChange,onRun:e.onRun,onTabChange:e.onTabChange,onReplayRun:e.onReplayRun})]})})})}function ce(e){let t=e.detail?.graph,n=t===void 0?void 0:{nodes:t.nodes.length,edges:t.edges.length,agents:t.nodes.filter(e=>e.kind===`agent`).length,extractors:t.nodes.filter(e=>e.kind===`extractor`).length,parallel:t.nodes.some(e=>e.kind===`parallel`)?`yes`:`no`};return(0,C.jsxs)(`aside`,{className:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background`,children:[(0,C.jsxs)(`header`,{className:`grid gap-3 bg-card px-4 py-4`,children:[(0,C.jsxs)(`div`,{className:`grid gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`h1`,{className:`m-0 truncate text-base font-semibold tracking-tight text-foreground`,children:e.detail?.name??`Pipeline`}),e.detail?.description===void 0?null:(0,C.jsx)(`p`,{className:`m-0 mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground`,children:e.detail.description})]}),(0,C.jsx)(`span`,{className:`shrink-0 text-xs font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,C.jsxs)(d,{value:e.selectedPipelineId,onValueChange:e.onSelectPipeline,children:[(0,C.jsx)(l,{className:`h-8 w-full rounded-lg border-hair bg-background text-xs hover:border-foreground focus:border-foreground focus:ring-ring`,children:(0,C.jsx)(c,{placeholder:`Select pipeline`})}),(0,C.jsx)(ee,{children:e.pipelines.map(e=>(0,C.jsx)(u,{value:e.id,children:e.name??e.id},e.id))})]})]}),(0,C.jsx)(ue,{activeTab:e.activeTab,onChange:e.onTabChange})]}),(0,C.jsxs)(`div`,{className:[`min-h-0 min-w-0 px-5 py-5`,e.activeTab===`logs`?`grid overflow-hidden`:`overflow-auto`].join(` `),children:[e.activeTab===`input`?(0,C.jsx)(`div`,{"aria-labelledby":q(`input`),id:J(`input`),role:`tabpanel`,children:(0,C.jsx)(de,{runInput:e.runInput,runState:e.runState,disabled:e.detail===void 0,onRunInputChange:e.onRunInputChange,onRun:e.onRun})}):null,e.activeTab===`metadata`?(0,C.jsx)(`div`,{"aria-labelledby":q(`metadata`),id:J(`metadata`),role:`tabpanel`,children:(0,C.jsx)(fe,{graphStats:n,selectedNode:e.selectedNode,selectedNodeStatus:e.selectedNodeStatus})}):null,e.activeTab===`runs`?(0,C.jsx)(`div`,{"aria-labelledby":q(`runs`),id:J(`runs`),role:`tabpanel`,children:(0,C.jsx)(pe,{runs:e.runs,runOutput:e.runOutput,runState:e.runState,loading:e.runsLoading,onReplayRun:e.onReplayRun})}):null,e.activeTab===`logs`?(0,C.jsx)(`div`,{"aria-labelledby":q(`logs`),id:J(`logs`),role:`tabpanel`,children:(0,C.jsx)(ye,{logs:e.logs,selectedPipelineId:e.selectedPipelineId,loading:e.logsLoading})}):null]})]})}var le=[{id:`input`,label:`Input`},{id:`metadata`,label:`Metadata`},{id:`runs`,label:`Runs`},{id:`logs`,label:`Logs`}];function ue(e){return(0,C.jsx)(te,{className:`grid-cols-4`,role:`tablist`,"aria-label":`Pipeline sidebar`,children:le.map(t=>(0,C.jsx)(`button`,{"aria-controls":J(t.id),"aria-selected":e.activeTab===t.id,className:[`h-8 rounded-lg px-2 text-xs font-semibold uppercase tracking-[0.1em] transition duration-200`,e.activeTab===t.id?`bg-foreground text-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`].join(` `),id:q(t.id),onClick:()=>e.onChange(t.id),role:`tab`,type:`button`,children:t.label},t.id))})}function q(e){return`pipeline-tab-${e}`}function J(e){return`pipeline-panel-${e}`}function Y(e){return(0,C.jsxs)(`div`,{className:`min-w-0 rounded-lg bg-background px-2.5 py-2.5`,children:[(0,C.jsx)(`div`,{className:`truncate text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.label}),(0,C.jsx)(`div`,{className:`mt-1 truncate text-base font-semibold tabular-nums text-foreground`,children:e.value})]})}function de(e){return(0,C.jsxs)(`section`,{className:`grid gap-4`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline input`}),(0,C.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Provide JSON-compatible input for this pipeline run.`})]}),(0,C.jsxs)(i,{className:`h-8 shrink-0 gap-1.5 rounded-lg border border-primary bg-primary px-3 text-xs font-semibold text-primary-foreground shadow-none hover:border-action-hover hover:bg-action-hover hover:text-primary-foreground disabled:border-border disabled:bg-muted disabled:text-muted-foreground [&_svg]:!size-3`,disabled:e.runState===`running`||e.disabled,onClick:e.onRun,variant:`ghost`,children:[(0,C.jsx)(s,{icon:oe,"aria-hidden":`true`}),e.runState===`running`?`Running`:`Run`]})]}),(0,C.jsxs)(`label`,{className:`grid gap-2`,htmlFor:`pipeline-run-input`,children:[(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:`JSON`}),(0,C.jsx)(m,{id:`pipeline-run-input`,value:e.runInput,onChange:t=>e.onRunInputChange(t.target.value),className:`min-h-44 resize-y rounded-lg border-border bg-card text-xs leading-5 text-foreground`,spellCheck:!1})]})]})}function fe(e){return(0,C.jsxs)(`section`,{className:`grid gap-5`,children:[e.graphStats===void 0?null:(0,C.jsxs)(`div`,{className:`grid grid-cols-5 gap-2`,children:[(0,C.jsx)(Y,{label:`Nodes`,value:String(e.graphStats.nodes)}),(0,C.jsx)(Y,{label:`Edges`,value:String(e.graphStats.edges)}),(0,C.jsx)(Y,{label:`Agents`,value:String(e.graphStats.agents)}),(0,C.jsx)(Y,{label:`Extractors`,value:String(e.graphStats.extractors)}),(0,C.jsx)(Y,{label:`Parallel`,value:e.graphStats.parallel})]}),(0,C.jsx)(ve,{node:e.selectedNode,status:e.selectedNodeStatus})]})}function pe(e){return(0,C.jsxs)(`section`,{className:`grid gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Runs`}),(0,C.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Persisted pipeline executions.`})]}),(0,C.jsx)(Q,{children:e.runState})]}),e.runOutput.length>0&&e.runs.length===0?(0,C.jsx)(X,{title:`Latest output`,output:e.runOutput}):null,(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[e.loading&&e.runs.length===0?(0,C.jsxs)(`div`,{className:`grid gap-2 py-3`,children:[(0,C.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-56 max-w-full animate-pulse rounded-lg bg-muted`})]}):null,!e.loading&&e.runs.length===0?(0,C.jsx)(p,{size:`compact`,title:`No saved pipeline runs`,text:`Run this pipeline to create its first persisted execution.`}):null,e.runs.map(t=>(0,C.jsx)(me,{disabled:e.runState===`running`,run:t,onReplayRun:e.onReplayRun},t.runId))]})]})}function me(e){let t=he(e.run);return(0,C.jsxs)(`article`,{className:`rounded-none border border-hair bg-background px-4 py-4`,children:[(0,C.jsxs)(`div`,{className:`grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,C.jsx)(`span`,{className:[`rounded-md border border-hair bg-card px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em]`,_e(e.run.status)].join(` `),children:e.run.status}),(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-foreground`,children:e.run.runId})]}),(0,C.jsxs)(`div`,{className:`mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[(0,C.jsx)(`time`,{children:$(e.run.startedAt)}),e.run.durationMs===void 0?null:(0,C.jsxs)(`span`,{className:`tabular-nums`,children:[e.run.durationMs,`ms`]})]})]}),(0,C.jsxs)(i,{className:`h-8 gap-1.5 rounded-lg border border-hair bg-muted px-2.5 text-xs font-semibold text-foreground shadow-none hover:border-foreground hover:bg-transparent hover:text-foreground [&_svg]:!size-3`,disabled:e.disabled||e.run.status===`running`,onClick:()=>e.onReplayRun(e.run.runId),title:`Rerun this pipeline with its saved input`,variant:`ghost`,children:[(0,C.jsx)(s,{icon:a,"aria-hidden":`true`}),`Rerun`]})]}),(0,C.jsx)(X,{title:`Output`,output:t})]})}function X(e){return(0,C.jsxs)(`div`,{className:`mt-4 border-t border-hair pt-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:e.title}),(0,C.jsxs)(`span`,{className:` text-xs font-medium tabular-nums text-muted-foreground`,children:[e.output.length,` chars`]})]}),(0,C.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-card p-3 text-sm leading-6 text-foreground`,children:e.output.length>0?(0,C.jsx)(Z,{text:e.output}):`No output saved.`})]})}function he(e){return e.output===void 0?e.error===void 0?``:JSON.stringify(e.error,null,2):typeof e.output==`string`?e.output:JSON.stringify(e.output,null,2)}function Z(e){return ge(e.text)?(0,C.jsx)(ie,{text:e.text}):e.text}function ge(e){let t=e.trim();return t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`)}function _e(e){switch(e){case`success`:return`text-foreground`;case`error`:return`text-destructive`;case`running`:return`text-muted-foreground`}}function ve(e){if(e.node===void 0)return(0,C.jsx)(`section`,{className:`text-sm font-medium text-muted-foreground`,children:`Select a node for details.`});let t=Object.entries(e.node.metadata??{});return(0,C.jsxs)(`section`,{className:`grid content-start gap-5`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Selected node`}),(0,C.jsx)(`h2`,{className:`m-0 mt-2 text-lg font-semibold tracking-tight text-foreground`,children:e.node.label}),(0,C.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,C.jsx)(Q,{children:e.node.kind}),e.status===void 0?null:(0,C.jsx)(Q,{children:e.status}),e.node.branchKey===void 0?null:(0,C.jsx)(Q,{children:e.node.branchKey})]})]}),e.node.description===void 0?null:(0,C.jsx)(`p`,{className:`m-0 rounded-lg bg-muted px-3 py-2 text-sm leading-6 text-muted-foreground`,children:e.node.description}),(0,C.jsx)(xe,{items:[[`ID`,e.node.id],[`Agent`,e.node.agentId],[`Pipeline`,e.node.pipelineId]]}),t.length>0?(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Metadata`}),(0,C.jsx)(`div`,{className:`grid gap-1`,children:t.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,C.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:Se(t)})]},e))})]}):null]})}function ye(e){let t=(0,x.useRef)(null),n=(0,x.useRef)(!0);(0,x.useEffect)(()=>{let e=t.current;e===null||!n.current||(e.scrollTop=e.scrollHeight)});function r(){let e=t.current;e!==null&&(n.current=e.scrollHeight-e.scrollTop-e.clientHeight<24)}return(0,C.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline logs`}),(0,C.jsx)(`div`,{className:`mt-1 truncate text-xs font-medium text-muted-foreground`,children:e.selectedPipelineId.length===0?`No active pipeline`:e.selectedPipelineId})]}),(0,C.jsx)(`span`,{className:` text-xs font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,C.jsxs)(`div`,{className:`min-h-0 overflow-auto border-t bg-background p-2`,ref:t,onScroll:r,children:[e.selectedPipelineId.length===0?(0,C.jsx)(p,{size:`compact`,title:`No pipeline selected`,text:`Choose a pipeline to view its runtime logs.`}):null,e.selectedPipelineId.length>0&&e.loading&&e.logs.length===0?(0,C.jsxs)(`div`,{className:`grid gap-2 py-4`,children:[(0,C.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-64 max-w-full animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-52 max-w-full animate-pulse rounded-lg bg-muted`})]}):null,e.selectedPipelineId.length>0&&!e.loading&&e.logs.length===0?(0,C.jsx)(p,{size:`compact`,title:`No logs yet`,text:`Run the pipeline to populate this console.`}):null,e.logs.map(e=>(0,C.jsx)(be,{log:e},e.id))]})]})}function be(e){let t=T(e.log.metadata,4),n=[$(e.log.timestamp),e.log.level.toUpperCase().padEnd(5,` `),e.log.message,`${e.log.category}/${e.log.event}`,t].filter(e=>e.trim().length>0).join(` `);return(0,C.jsxs)(`article`,{className:[`min-w-full rounded-lg px-3 py-1.5 text-xs leading-5 transition duration-200 hover:bg-transparent hover:text-foreground`].join(` `),title:n,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,C.jsx)(`time`,{className:`shrink-0 text-muted-foreground`,children:$(e.log.timestamp)}),(0,C.jsx)(`span`,{className:[`shrink-0 font-semibold`,Ce(e.log.level)].join(` `),children:e.log.level.toUpperCase().padEnd(5,` `)}),(0,C.jsx)(`span`,{className:`min-w-0 break-words font-medium text-foreground`,children:e.log.message})]}),(0,C.jsxs)(`div`,{className:`mt-1 min-w-0 break-words text-muted-foreground`,children:[e.log.category,`/`,e.log.event]}),(0,C.jsx)(w,{metadata:e.log.metadata,limit:4})]})}function xe(e){let t=e.items.filter(([,e])=>e!==void 0&&e.length>0);return t.length===0?null:(0,C.jsx)(`div`,{className:`grid gap-2 rounded-none bg-background p-3`,children:t.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,C.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:t})]},e))})}function Q(e){return(0,C.jsx)(`span`,{className:`rounded-lg border border-hair bg-background px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e.children})}function $(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Se(e){return e===null?`null`:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`[${e.length}]`:typeof e==`object`&&e?`{...}`:``}function Ce(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-muted-foreground`;case`debug`:return`text-muted-foreground`;case`info`:return`text-foreground`}}export{se as PipelinesPage};
2
- //# sourceMappingURL=pipelines-page-BPCS5mwc.js.map
1
+ import{i as e,r as t,s as n,t as r}from"./utils-DzstcfqT.js";import{t as i}from"./button-B_AoswCu.js";import{t as a}from"./ArrowClockwise.es-5vr4h4OH.js";import{n as o,t as s}from"./icon-DyadsXLr.js";import{a as c,i as l,n as ee,r as u,t as d}from"./select-BdCBnmXx.js";import{a as f,c as te,s as ne,t as p}from"./studio-DzEdCFsX.js";import{t as m}from"./textarea-fAtCF2cf.js";import{a as h,i as g,n as _,o as v,r as y,s as b,t as re}from"./style-FGiH1LIC.js";import{t as ie}from"./renderers-DRD34eUr.js";var x=n(e(),1),ae=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z`}))]]),S=x.forwardRef((e,t)=>x.createElement(o,{ref:t,...e,weights:ae}));S.displayName=`PlayIcon`;var oe=S,C=t();function w(e){let t=E(e.metadata,e.limit),n=k(e.metadata);return t.length===0&&!n?null:(0,C.jsxs)(`div`,{className:`grid min-w-0 gap-1 text-xs leading-5 text-muted-foreground`,children:[t.length===0?null:(0,C.jsx)(`div`,{className:`flex min-w-0 flex-wrap gap-x-2 gap-y-1`,children:t.map(e=>(0,C.jsxs)(`span`,{className:r(`min-w-0 break-words`,e.tone===`error`?`text-destructive`:`text-muted-foreground`),children:[(0,C.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.key,`=`]}),e.value]},e.key))}),n?(0,C.jsxs)(`details`,{className:`group min-w-0 rounded-lg border border-border bg-muted px-2 py-1`,children:[(0,C.jsx)(`summary`,{className:`cursor-pointer select-none text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground transition group-open:text-foreground`,children:`Details`}),(0,C.jsx)(`pre`,{className:`m-0 mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs leading-4 text-muted-foreground`,children:A(e.metadata)})]}):null]})}function T(e,t){return E(e,t).map(e=>`${e.key}=${e.value}`).join(` `)}function E(e,t=6){return Object.entries(e??{}).map(([e,t])=>{let n=e===`error`?`error`:`default`;return{key:e,value:D(e,t),tone:n}}).filter(e=>e.value.length>0).slice(0,t)}function D(e,t){return t===null?`null`:typeof t==`string`||typeof t==`number`||typeof t==`boolean`?String(t):Array.isArray(t)?`[${t.length}]`:M(t)?e===`error`?O(t):j(t):``}function O(e){let t=typeof e.name==`string`&&e.name.length>0?e.name:void 0,n=typeof e.message==`string`&&e.message.length>0?e.message:void 0;return t!==void 0&&n!==void 0?`${t}: ${n}`:n===void 0?j(e):n}function k(e){return Object.values(e??{}).some(e=>Array.isArray(e)||M(e))}function A(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function j(e){try{return JSON.stringify(e)}catch{return String(e)}}function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N={pipelineStage:B},P=`var(--muted-foreground)`,F=`var(--foreground)`,I=`var(--background)`,L=`var(--muted-foreground)`,R=`var(--destructive)`,z=`var(--foreground)`;function B(e){let t=e.data.status;return(0,C.jsxs)(`article`,{className:[`group relative min-h-[74px] w-[210px] rounded-none border bg-card px-4 py-3 text-left shadow-[inset_0_1px_0_var(--sb-inset-highlight)] transition duration-200`,e.selected?`border-foreground`:`border-hair`,t===`running`?`translate-y-[-1px] border-foreground`:``,t===`completed`?`border-muted-foreground`:``,t===`failed`?`border-destructive`:``].join(` `),children:[(0,C.jsx)(g,{type:`target`,position:b.Top,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`}),(0,C.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`truncate text-sm font-semibold leading-5 tracking-tight text-foreground`,children:e.data.label}),(0,C.jsxs)(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-lg`,style:{backgroundColor:e.data.statusColor}}),(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.data.kind})]})]}),t===void 0?null:(0,C.jsx)(`span`,{className:`rounded-lg border border-hair bg-background px-1.5 py-0.5 text-xs font-semibold uppercase tracking-[0.08em]`,style:{color:e.data.statusColor},children:t})]}),e.data.branchKey===void 0?null:(0,C.jsxs)(`div`,{className:`mt-2 truncate text-xs text-muted-foreground`,children:[`branch: `,e.data.branchKey]}),(0,C.jsx)(g,{type:`source`,position:b.Bottom,className:`!h-0 !w-0 !border-0 !bg-transparent !opacity-0`})]})}function V(e,t){let n=new Map;if(t.length===0)return n;for(let r of e){if(r.runId!==t)continue;let e=G(r.metadata,`nodePath`);if(e===void 0)continue;let i=K(e);r.event.endsWith(`.started`)&&n.set(i,`running`),r.event.endsWith(`.completed`)&&n.set(i,`completed`),r.event.endsWith(`.failed`)&&n.set(i,`failed`)}return n}function H(e,t){let n=U(e),r=new Map,i=new Map;for(let e of n.values())i.set(e,(i.get(e)??0)+1);return{nodes:e.nodes.map(e=>{let a=K(e.path),o=n.get(a)??0,s=r.get(o)??0;r.set(o,s+1);let c=i.get(o)??1,l=t.get(a);return{id:a,type:`pipelineStage`,position:{x:(s-(c-1)/2)*280,y:o*170},sourcePosition:b.Bottom,targetPosition:b.Top,data:{label:e.label,kind:e.kind,status:l,statusColor:W(l),branchKey:e.branchKey}}}),edges:e.edges.map(e=>({id:e.id,source:K(e.source),target:K(e.target),type:`smoothstep`,className:`pipeline-flow-edge`,label:e.label,markerEnd:{type:v.ArrowClosed,width:10,height:10,color:P},style:{stroke:P,strokeWidth:1.6,opacity:.78},labelShowBg:!0,labelStyle:{fill:L,fontSize:11,fontWeight:700},labelBgStyle:{fill:I,fillOpacity:.92},labelBgPadding:[6,4],labelBgBorderRadius:2}))}}function U(e){let t=new Map;for(let n of e.nodes)t.set(K(n.path),0);for(let n=0;n<e.nodes.length;n+=1){let n=!1;for(let r of e.edges){let e=K(r.source),i=K(r.target),a=t.get(e);if(a===void 0||!t.has(i))continue;let o=a+1;o>(t.get(i)??0)&&(t.set(i,o),n=!0)}if(!n)break}return t}function W(e){switch(e){case`running`:return z;case`completed`:return P;case`failed`:return R;default:return F}}function G(e,t){let n=e?.[t];return Array.isArray(n)&&n.every(e=>typeof e==`string`)?n:void 0}function K(e){return JSON.stringify(e)}function se(e){let[t,n]=(0,x.useState)(),r=e.detail?.graph,i=r?.nodes.find(e=>K(e.path)===t)??r?.nodes[0]??void 0,a=(0,x.useMemo)(()=>V(e.logs,e.activeRunId),[e.logs,e.activeRunId]),o=(0,x.useMemo)(()=>r===void 0?{nodes:[],edges:[]}:H(r,a),[r,a]);return!e.enabled||!e.detailLoading&&e.pipelines.length===0?(0,C.jsx)(f,{"aria-label":`Pipelines`,children:(0,C.jsx)(p,{title:e.enabled?`No pipelines`:`Pipelines unavailable`,text:e.enabled?`No pipeline records are available in this Studio runtime.`:`This Studio runtime does not expose pipelines.`})}):(0,C.jsx)(f,{children:(0,C.jsx)(`div`,{className:`grid min-h-0 min-w-0 pb-6 pr-6`,children:(0,C.jsxs)(ne,{className:`grid grid-cols-[minmax(0,2fr)_minmax(0,1fr)] max-lg:grid-cols-1`,children:[(0,C.jsxs)(`div`,{className:`relative min-h-0 min-w-0 overflow-hidden border-r border-hair bg-card max-lg:border-b max-lg:border-r-0`,children:[e.detailLoading&&r===void 0?(0,C.jsx)(`div`,{className:`grid h-full min-h-96 place-items-center p-6`,children:(0,C.jsxs)(`div`,{className:`grid w-full max-w-lg gap-3`,children:[(0,C.jsx)(`div`,{className:`h-4 w-40 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-16 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-16 w-4/5 animate-pulse rounded-lg bg-muted`})]})}):null,!e.detailLoading&&r===void 0?(0,C.jsx)(p,{className:`h-full`,title:e.pipelines.length===0?`No pipelines`:`No pipeline selected`,text:e.pipelines.length===0?`No pipeline records are available in this Studio runtime.`:`Choose a registered pipeline to inspect its graph and runtime logs.`}):null,r===void 0?null:(0,C.jsxs)(h,{nodes:o.nodes,edges:o.edges,className:`pipeline-flow`,style:{"--xy-edge-stroke":`var(--muted-foreground)`,"--xy-edge-stroke-width":`1.6`,"--xy-edge-stroke-selected":`var(--foreground)`},fitView:!0,fitViewOptions:{padding:.18,maxZoom:.96},minZoom:.48,maxZoom:1.35,colorMode:e.theme,nodeTypes:N,proOptions:{hideAttribution:!0},defaultEdgeOptions:{type:`smoothstep`,focusable:!0},onNodeClick:(e,t)=>n(t.id),children:[(0,C.jsx)(re,{variant:_.Dots,gap:14,size:1.8,color:L,className:`opacity-35`}),(0,C.jsx)(y,{showInteractive:!1})]})]}),(0,C.jsx)(ce,{pipelines:e.pipelines,selectedPipelineId:e.selectedPipelineId,detail:e.detail,logs:e.logs,runs:e.runs,logsLoading:e.logsLoading,runsLoading:e.runsLoading,runState:e.runState,runInput:e.runInput,runOutput:e.runOutput,activeTab:e.activeTab,selectedNode:i,selectedNodeStatus:i?.id===void 0?void 0:a.get(i.id),onSelectPipeline:t=>{n(void 0),e.onSelectPipeline(t)},onRunInputChange:e.onRunInputChange,onRun:e.onRun,onTabChange:e.onTabChange,onReplayRun:e.onReplayRun})]})})})}function ce(e){let t=e.detail?.graph,n=t===void 0?void 0:{nodes:t.nodes.length,edges:t.edges.length,agents:t.nodes.filter(e=>e.kind===`agent`).length,extractors:t.nodes.filter(e=>e.kind===`extractor`).length,parallel:t.nodes.some(e=>e.kind===`parallel`)?`yes`:`no`};return(0,C.jsxs)(`aside`,{className:`grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background`,children:[(0,C.jsxs)(`header`,{className:`grid gap-3 bg-card px-4 py-4`,children:[(0,C.jsxs)(`div`,{className:`grid gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`h1`,{className:`m-0 truncate text-base font-semibold tracking-tight text-foreground`,children:e.detail?.name??`Pipeline`}),e.detail?.description===void 0?null:(0,C.jsx)(`p`,{className:`m-0 mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground`,children:e.detail.description})]}),(0,C.jsx)(`span`,{className:`shrink-0 text-xs font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,C.jsxs)(d,{value:e.selectedPipelineId,onValueChange:e.onSelectPipeline,children:[(0,C.jsx)(l,{className:`h-8 w-full rounded-lg border-hair bg-background text-xs hover:border-foreground focus:border-foreground focus:ring-ring`,children:(0,C.jsx)(c,{placeholder:`Select pipeline`})}),(0,C.jsx)(ee,{children:e.pipelines.map(e=>(0,C.jsx)(u,{value:e.id,children:e.name??e.id},e.id))})]})]}),(0,C.jsx)(ue,{activeTab:e.activeTab,onChange:e.onTabChange})]}),(0,C.jsxs)(`div`,{className:[`min-h-0 min-w-0 px-5 py-5`,e.activeTab===`logs`?`grid overflow-hidden`:`overflow-auto`].join(` `),children:[e.activeTab===`input`?(0,C.jsx)(`div`,{"aria-labelledby":q(`input`),id:J(`input`),role:`tabpanel`,children:(0,C.jsx)(de,{runInput:e.runInput,runState:e.runState,disabled:e.detail===void 0,onRunInputChange:e.onRunInputChange,onRun:e.onRun})}):null,e.activeTab===`metadata`?(0,C.jsx)(`div`,{"aria-labelledby":q(`metadata`),id:J(`metadata`),role:`tabpanel`,children:(0,C.jsx)(fe,{graphStats:n,selectedNode:e.selectedNode,selectedNodeStatus:e.selectedNodeStatus})}):null,e.activeTab===`runs`?(0,C.jsx)(`div`,{"aria-labelledby":q(`runs`),id:J(`runs`),role:`tabpanel`,children:(0,C.jsx)(pe,{runs:e.runs,runOutput:e.runOutput,runState:e.runState,loading:e.runsLoading,onReplayRun:e.onReplayRun})}):null,e.activeTab===`logs`?(0,C.jsx)(`div`,{"aria-labelledby":q(`logs`),id:J(`logs`),role:`tabpanel`,children:(0,C.jsx)(ye,{logs:e.logs,selectedPipelineId:e.selectedPipelineId,loading:e.logsLoading})}):null]})]})}var le=[{id:`input`,label:`Input`},{id:`metadata`,label:`Metadata`},{id:`runs`,label:`Runs`},{id:`logs`,label:`Logs`}];function ue(e){return(0,C.jsx)(te,{className:`grid-cols-4`,role:`tablist`,"aria-label":`Pipeline sidebar`,children:le.map(t=>(0,C.jsx)(`button`,{"aria-controls":J(t.id),"aria-selected":e.activeTab===t.id,className:[`h-8 rounded-lg px-2 text-xs font-semibold uppercase tracking-[0.1em] transition duration-200`,e.activeTab===t.id?`bg-foreground text-background`:`text-muted-foreground hover:bg-transparent hover:text-foreground`].join(` `),id:q(t.id),onClick:()=>e.onChange(t.id),role:`tab`,type:`button`,children:t.label},t.id))})}function q(e){return`pipeline-tab-${e}`}function J(e){return`pipeline-panel-${e}`}function Y(e){return(0,C.jsxs)(`div`,{className:`min-w-0 rounded-lg bg-background px-2.5 py-2.5`,children:[(0,C.jsx)(`div`,{className:`truncate text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground`,children:e.label}),(0,C.jsx)(`div`,{className:`mt-1 truncate text-base font-semibold tabular-nums text-foreground`,children:e.value})]})}function de(e){return(0,C.jsxs)(`section`,{className:`grid gap-4`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline input`}),(0,C.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Provide JSON-compatible input for this pipeline run.`})]}),(0,C.jsxs)(i,{className:`h-8 shrink-0 gap-1.5 rounded-lg border border-primary bg-primary px-3 text-xs font-semibold text-primary-foreground shadow-none hover:border-action-hover hover:bg-action-hover hover:text-primary-foreground disabled:border-border disabled:bg-muted disabled:text-muted-foreground [&_svg]:!size-3`,disabled:e.runState===`running`||e.disabled,onClick:e.onRun,variant:`ghost`,children:[(0,C.jsx)(s,{icon:oe,"aria-hidden":`true`}),e.runState===`running`?`Running`:`Run`]})]}),(0,C.jsxs)(`label`,{className:`grid gap-2`,htmlFor:`pipeline-run-input`,children:[(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:`JSON`}),(0,C.jsx)(m,{id:`pipeline-run-input`,value:e.runInput,onChange:t=>e.onRunInputChange(t.target.value),className:`min-h-44 resize-y rounded-lg border-border bg-card text-xs leading-5 text-foreground`,spellCheck:!1})]})]})}function fe(e){return(0,C.jsxs)(`section`,{className:`grid gap-5`,children:[e.graphStats===void 0?null:(0,C.jsxs)(`div`,{className:`grid grid-cols-5 gap-2`,children:[(0,C.jsx)(Y,{label:`Nodes`,value:String(e.graphStats.nodes)}),(0,C.jsx)(Y,{label:`Edges`,value:String(e.graphStats.edges)}),(0,C.jsx)(Y,{label:`Agents`,value:String(e.graphStats.agents)}),(0,C.jsx)(Y,{label:`Extractors`,value:String(e.graphStats.extractors)}),(0,C.jsx)(Y,{label:`Parallel`,value:e.graphStats.parallel})]}),(0,C.jsx)(ve,{node:e.selectedNode,status:e.selectedNodeStatus})]})}function pe(e){return(0,C.jsxs)(`section`,{className:`grid gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Runs`}),(0,C.jsx)(`p`,{className:`m-0 mt-1 text-xs leading-5 text-muted-foreground`,children:`Persisted pipeline executions.`})]}),(0,C.jsx)(Q,{children:e.runState})]}),e.runOutput.length>0&&e.runs.length===0?(0,C.jsx)(X,{title:`Latest output`,output:e.runOutput}):null,(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[e.loading&&e.runs.length===0?(0,C.jsxs)(`div`,{className:`grid gap-2 py-3`,children:[(0,C.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-56 max-w-full animate-pulse rounded-lg bg-muted`})]}):null,!e.loading&&e.runs.length===0?(0,C.jsx)(p,{size:`compact`,title:`No saved pipeline runs`,text:`Run this pipeline to create its first persisted execution.`}):null,e.runs.map(t=>(0,C.jsx)(me,{disabled:e.runState===`running`,run:t,onReplayRun:e.onReplayRun},t.runId))]})]})}function me(e){let t=he(e.run);return(0,C.jsxs)(`article`,{className:`rounded-none border border-hair bg-background px-4 py-4`,children:[(0,C.jsxs)(`div`,{className:`grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,C.jsx)(`span`,{className:[`rounded-md border border-hair bg-card px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em]`,_e(e.run.status)].join(` `),children:e.run.status}),(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-foreground`,children:e.run.runId})]}),(0,C.jsxs)(`div`,{className:`mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[(0,C.jsx)(`time`,{children:$(e.run.startedAt)}),e.run.durationMs===void 0?null:(0,C.jsxs)(`span`,{className:`tabular-nums`,children:[e.run.durationMs,`ms`]})]})]}),(0,C.jsxs)(i,{className:`h-8 gap-1.5 rounded-lg border border-hair bg-muted px-2.5 text-xs font-semibold text-foreground shadow-none hover:border-foreground hover:bg-transparent hover:text-foreground [&_svg]:!size-3`,disabled:e.disabled||e.run.status===`running`,onClick:()=>e.onReplayRun(e.run.runId),title:`Rerun this pipeline with its saved input`,variant:`ghost`,children:[(0,C.jsx)(s,{icon:a,"aria-hidden":`true`}),`Rerun`]})]}),(0,C.jsx)(X,{title:`Output`,output:t})]})}function X(e){return(0,C.jsxs)(`div`,{className:`mt-4 border-t border-hair pt-3`,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,C.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground`,children:e.title}),(0,C.jsxs)(`span`,{className:` text-xs font-medium tabular-nums text-muted-foreground`,children:[e.output.length,` chars`]})]}),(0,C.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-card p-3 text-sm leading-6 text-foreground`,children:e.output.length>0?(0,C.jsx)(Z,{text:e.output}):`No output saved.`})]})}function he(e){return e.output===void 0?e.error===void 0?``:JSON.stringify(e.error,null,2):typeof e.output==`string`?e.output:JSON.stringify(e.output,null,2)}function Z(e){return ge(e.text)?(0,C.jsx)(ie,{text:e.text}):e.text}function ge(e){let t=e.trim();return t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`)}function _e(e){switch(e){case`success`:return`text-foreground`;case`error`:return`text-destructive`;case`running`:return`text-muted-foreground`}}function ve(e){if(e.node===void 0)return(0,C.jsx)(`section`,{className:`text-sm font-medium text-muted-foreground`,children:`Select a node for details.`});let t=Object.entries(e.node.metadata??{});return(0,C.jsxs)(`section`,{className:`grid content-start gap-5`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Selected node`}),(0,C.jsx)(`h2`,{className:`m-0 mt-2 text-lg font-semibold tracking-tight text-foreground`,children:e.node.label}),(0,C.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,C.jsx)(Q,{children:e.node.kind}),e.status===void 0?null:(0,C.jsx)(Q,{children:e.status}),e.node.branchKey===void 0?null:(0,C.jsx)(Q,{children:e.node.branchKey})]})]}),e.node.description===void 0?null:(0,C.jsx)(`p`,{className:`m-0 rounded-lg bg-muted px-3 py-2 text-sm leading-6 text-muted-foreground`,children:e.node.description}),(0,C.jsx)(xe,{items:[[`ID`,e.node.id],[`Agent`,e.node.agentId],[`Pipeline`,e.node.pipelineId]]}),t.length>0?(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Metadata`}),(0,C.jsx)(`div`,{className:`grid gap-1`,children:t.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,C.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:Se(t)})]},e))})]}):null]})}function ye(e){let t=(0,x.useRef)(null),n=(0,x.useRef)(!0);(0,x.useEffect)(()=>{let e=t.current;e===null||!n.current||(e.scrollTop=e.scrollHeight)});function r(){let e=t.current;e!==null&&(n.current=e.scrollHeight-e.scrollTop-e.clientHeight<24)}return(0,C.jsxs)(`section`,{className:`grid min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Pipeline logs`}),(0,C.jsx)(`div`,{className:`mt-1 truncate text-xs font-medium text-muted-foreground`,children:e.selectedPipelineId.length===0?`No active pipeline`:e.selectedPipelineId})]}),(0,C.jsx)(`span`,{className:` text-xs font-semibold tabular-nums text-muted-foreground`,children:e.logs.length})]}),(0,C.jsxs)(`div`,{className:`min-h-0 overflow-auto border-t bg-background p-2`,ref:t,onScroll:r,children:[e.selectedPipelineId.length===0?(0,C.jsx)(p,{size:`compact`,title:`No pipeline selected`,text:`Choose a pipeline to view its runtime logs.`}):null,e.selectedPipelineId.length>0&&e.loading&&e.logs.length===0?(0,C.jsxs)(`div`,{className:`grid gap-2 py-4`,children:[(0,C.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-64 max-w-full animate-pulse rounded-lg bg-muted`}),(0,C.jsx)(`div`,{className:`h-4 w-52 max-w-full animate-pulse rounded-lg bg-muted`})]}):null,e.selectedPipelineId.length>0&&!e.loading&&e.logs.length===0?(0,C.jsx)(p,{size:`compact`,title:`No logs yet`,text:`Run the pipeline to populate this console.`}):null,e.logs.map(e=>(0,C.jsx)(be,{log:e},e.id))]})]})}function be(e){let t=T(e.log.metadata,4),n=[$(e.log.timestamp),e.log.level.toUpperCase().padEnd(5,` `),e.log.message,`${e.log.category}/${e.log.event}`,t].filter(e=>e.trim().length>0).join(` `);return(0,C.jsxs)(`article`,{className:[`min-w-full rounded-lg px-3 py-1.5 text-xs leading-5 transition duration-200 hover:bg-transparent hover:text-foreground`].join(` `),title:n,children:[(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,C.jsx)(`time`,{className:`shrink-0 text-muted-foreground`,children:$(e.log.timestamp)}),(0,C.jsx)(`span`,{className:[`shrink-0 font-semibold`,Ce(e.log.level)].join(` `),children:e.log.level.toUpperCase().padEnd(5,` `)}),(0,C.jsx)(`span`,{className:`min-w-0 break-words font-medium text-foreground`,children:e.log.message})]}),(0,C.jsxs)(`div`,{className:`mt-1 min-w-0 break-words text-muted-foreground`,children:[e.log.category,`/`,e.log.event]}),(0,C.jsx)(w,{metadata:e.log.metadata,limit:4})]})}function xe(e){let t=e.items.filter(([,e])=>e!==void 0&&e.length>0);return t.length===0?null:(0,C.jsx)(`div`,{className:`grid gap-2 rounded-none bg-background p-3`,children:t.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,C.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:t})]},e))})}function Q(e){return(0,C.jsx)(`span`,{className:`rounded-lg border border-hair bg-background px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e.children})}function $(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Se(e){return e===null?`null`:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`[${e.length}]`:typeof e==`object`&&e?`{...}`:``}function Ce(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-muted-foreground`;case`debug`:return`text-muted-foreground`;case`info`:return`text-foreground`}}export{se as PipelinesPage};
2
+ //# sourceMappingURL=pipelines-page-DAqa699J.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipelines-page-BPCS5mwc.js","names":["a","t","m"],"sources":["../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/Play.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/Play.es.js","../../../src/ui/app/modules/shared/log-metadata.tsx","../../../src/ui/app/modules/pipelines/pipeline-flow.tsx","../../../src/ui/app/modules/pipelines/pipelines-page.tsx"],"sourcesContent":["import * as e from \"react\";\nconst a = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\n \"path\",\n {\n d: \"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ e.createElement(\"path\", { d: \"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z\" }))\n ]\n]);\nexport {\n a as default\n};\n","import * as o from \"react\";\nimport t from \"../lib/IconBase.es.js\";\nimport m from \"../defs/Play.es.js\";\nconst a = o.forwardRef((e, r) => /* @__PURE__ */ o.createElement(t, { ref: r, ...e, weights: m }));\na.displayName = \"PlayIcon\";\nconst n = a;\nexport {\n n as Play,\n a as PlayIcon\n};\n","import { cn } from \"../../lib/utils\";\n\ntype MetadataValue = unknown;\n\ntype InlineMetadataItem = {\n key: string;\n value: string;\n tone: \"default\" | \"error\";\n};\n\nexport function LogMetadata(props: {\n metadata?: Record<string, MetadataValue> | undefined;\n limit?: number;\n}) {\n const items = inlineMetadataItems(props.metadata, props.limit);\n const hasStructuredDetails = hasStructuredMetadata(props.metadata);\n if (items.length === 0 && !hasStructuredDetails) {\n return null;\n }\n return (\n <div className=\"grid min-w-0 gap-1 text-xs leading-5 text-muted-foreground\">\n {items.length === 0 ? null : (\n <div className=\"flex min-w-0 flex-wrap gap-x-2 gap-y-1\">\n {items.map((item) => (\n <span\n className={cn(\n \"min-w-0 break-words\",\n item.tone === \"error\" ? \"text-destructive\" : \"text-muted-foreground\",\n )}\n key={item.key}\n >\n <span className=\"text-muted-foreground\">{item.key}=</span>\n {item.value}\n </span>\n ))}\n </div>\n )}\n {hasStructuredDetails ? (\n <details className=\"group min-w-0 rounded-lg border border-border bg-muted px-2 py-1\">\n <summary className=\"cursor-pointer select-none text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground transition group-open:text-foreground\">\n Details\n </summary>\n <pre className=\"m-0 mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs leading-4 text-muted-foreground\">\n {formatStructuredDetails(props.metadata)}\n </pre>\n </details>\n ) : null}\n </div>\n );\n}\n\nexport function formatLogMetadataText(\n metadata?: Record<string, MetadataValue>,\n limit?: number,\n): string {\n return inlineMetadataItems(metadata, limit)\n .map((item) => `${item.key}=${item.value}`)\n .join(\" \");\n}\n\nfunction inlineMetadataItems(\n metadata?: Record<string, MetadataValue>,\n limit = 6,\n): InlineMetadataItem[] {\n return Object.entries(metadata ?? {})\n .map(([key, value]): InlineMetadataItem => {\n const tone: InlineMetadataItem[\"tone\"] = key === \"error\" ? \"error\" : \"default\";\n return {\n key,\n value: formatInlineMetadataValue(key, value),\n tone,\n };\n })\n .filter((item) => item.value.length > 0)\n .slice(0, limit);\n}\n\nfunction formatInlineMetadataValue(key: string, value: MetadataValue): string {\n if (value === null) {\n return \"null\";\n }\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (Array.isArray(value)) {\n return `[${value.length}]`;\n }\n if (isRecord(value)) {\n if (key === \"error\") {\n return formatErrorMetadata(value);\n }\n return compactJson(value);\n }\n return \"\";\n}\n\nfunction formatErrorMetadata(value: Record<string, MetadataValue>): string {\n const name = typeof value.name === \"string\" && value.name.length > 0 ? value.name : undefined;\n const message =\n typeof value.message === \"string\" && value.message.length > 0 ? value.message : undefined;\n if (name !== undefined && message !== undefined) {\n return `${name}: ${message}`;\n }\n if (message !== undefined) {\n return message;\n }\n return compactJson(value);\n}\n\nfunction hasStructuredMetadata(metadata?: Record<string, MetadataValue>): boolean {\n return Object.values(metadata ?? {}).some((value) => Array.isArray(value) || isRecord(value));\n}\n\nfunction formatStructuredDetails(metadata?: Record<string, MetadataValue>): string {\n if (metadata === undefined) {\n return \"\";\n }\n try {\n return JSON.stringify(metadata, null, 2);\n } catch {\n return String(metadata);\n }\n}\n\nfunction compactJson(value: MetadataValue): string {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\nfunction isRecord(value: MetadataValue): value is Record<string, MetadataValue> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n","import { type Edge, Handle, MarkerType, type Node, type NodeProps, Position } from \"@xyflow/react\";\nimport type { StudioPipelineDetail, StudioPipelineLogEntry } from \"../../../../types\";\n\nexport const nodeTypes = {\n pipelineStage: PipelineStageNode,\n};\n\nexport type PipelineFlow = { nodes: Node[]; edges: Edge[] };\n\nconst flowEdgeColor = \"var(--muted-foreground)\";\nconst flowSelectedColor = \"var(--foreground)\";\nconst flowBackgroundColor = \"var(--background)\";\nexport const flowMutedForegroundColor = \"var(--muted-foreground)\";\nconst flowDestructiveColor = \"var(--destructive)\";\nconst flowRunningColor = \"var(--foreground)\";\n\ntype PipelineNodeData = {\n label: string;\n kind: StudioPipelineDetail[\"graph\"][\"nodes\"][number][\"kind\"];\n status: NodeStatus | undefined;\n statusColor: string;\n branchKey: string | undefined;\n};\n\nfunction PipelineStageNode(props: NodeProps<Node<PipelineNodeData>>) {\n const status = props.data.status;\n return (\n <article\n className={[\n \"group relative min-h-[74px] w-[210px] rounded-none border bg-card px-4 py-3 text-left shadow-[inset_0_1px_0_var(--sb-inset-highlight)] transition duration-200\",\n props.selected ? \"border-foreground\" : \"border-hair\",\n status === \"running\" ? \"translate-y-[-1px] border-foreground\" : \"\",\n status === \"completed\" ? \"border-muted-foreground\" : \"\",\n status === \"failed\" ? \"border-destructive\" : \"\",\n ].join(\" \")}\n >\n <Handle\n type=\"target\"\n position={Position.Top}\n className=\"!h-0 !w-0 !border-0 !bg-transparent !opacity-0\"\n />\n <div className=\"flex min-w-0 items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold leading-5 tracking-tight text-foreground\">\n {props.data.label}\n </div>\n <div className=\"mt-1 flex items-center gap-1.5\">\n <span\n className=\"h-1.5 w-1.5 rounded-lg\"\n style={{ backgroundColor: props.data.statusColor }}\n />\n <span className=\" text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {props.data.kind}\n </span>\n </div>\n </div>\n {status === undefined ? null : (\n <span\n className=\"rounded-lg border border-hair bg-background px-1.5 py-0.5 text-xs font-semibold uppercase tracking-[0.08em]\"\n style={{ color: props.data.statusColor }}\n >\n {status}\n </span>\n )}\n </div>\n {props.data.branchKey === undefined ? null : (\n <div className=\"mt-2 truncate text-xs text-muted-foreground\">\n branch: {props.data.branchKey}\n </div>\n )}\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!h-0 !w-0 !border-0 !bg-transparent !opacity-0\"\n />\n </article>\n );\n}\n\nexport type NodeStatus = \"running\" | \"completed\" | \"failed\";\n\nexport function nodeStatusFromLogs(\n logs: StudioPipelineLogEntry[],\n activeRunId: string,\n): Map<string, NodeStatus> {\n const statuses = new Map<string, NodeStatus>();\n if (activeRunId.length === 0) {\n return statuses;\n }\n for (const log of logs) {\n if (log.runId !== activeRunId) {\n continue;\n }\n const nodePath = metadataPath(log.metadata, \"nodePath\");\n if (nodePath === undefined) {\n continue;\n }\n const nodeId = pipelineNodeKey(nodePath);\n if (log.event.endsWith(\".started\")) {\n statuses.set(nodeId, \"running\");\n }\n if (log.event.endsWith(\".completed\")) {\n statuses.set(nodeId, \"completed\");\n }\n if (log.event.endsWith(\".failed\")) {\n statuses.set(nodeId, \"failed\");\n }\n }\n return statuses;\n}\n\nexport function toFlow(\n graph: StudioPipelineDetail[\"graph\"],\n statuses: Map<string, NodeStatus>,\n): PipelineFlow {\n const depths = nodeDepths(graph);\n const depthSlots = new Map<number, number>();\n const depthCounts = new Map<number, number>();\n for (const depth of depths.values()) {\n depthCounts.set(depth, (depthCounts.get(depth) ?? 0) + 1);\n }\n\n const nodes: Node[] = graph.nodes.map((node) => {\n const nodeId = pipelineNodeKey(node.path);\n const depth = depths.get(nodeId) ?? 0;\n const slot = depthSlots.get(depth) ?? 0;\n depthSlots.set(depth, slot + 1);\n const count = depthCounts.get(depth) ?? 1;\n const status = statuses.get(nodeId);\n return {\n id: nodeId,\n type: \"pipelineStage\",\n position: {\n x: (slot - (count - 1) / 2) * 280,\n y: depth * 170,\n },\n sourcePosition: Position.Bottom,\n targetPosition: Position.Top,\n data: {\n label: node.label,\n kind: node.kind,\n status,\n statusColor: statusColor(status),\n branchKey: node.branchKey,\n },\n };\n });\n\n const edges: Edge[] = graph.edges.map((edge) => ({\n id: edge.id,\n source: pipelineNodeKey(edge.source),\n target: pipelineNodeKey(edge.target),\n type: \"smoothstep\",\n className: \"pipeline-flow-edge\",\n label: edge.label,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 10,\n height: 10,\n color: flowEdgeColor,\n },\n style: {\n stroke: flowEdgeColor,\n strokeWidth: 1.6,\n opacity: 0.78,\n },\n labelShowBg: true,\n labelStyle: {\n fill: flowMutedForegroundColor,\n fontSize: 11,\n fontWeight: 700,\n },\n labelBgStyle: {\n fill: flowBackgroundColor,\n fillOpacity: 0.92,\n },\n labelBgPadding: [6, 4],\n labelBgBorderRadius: 2,\n }));\n\n return { nodes, edges };\n}\n\nfunction nodeDepths(graph: StudioPipelineDetail[\"graph\"]): Map<string, number> {\n const depths = new Map<string, number>();\n for (const node of graph.nodes) {\n depths.set(pipelineNodeKey(node.path), 0);\n }\n\n for (let index = 0; index < graph.nodes.length; index += 1) {\n let changed = false;\n for (const edge of graph.edges) {\n const source = pipelineNodeKey(edge.source);\n const target = pipelineNodeKey(edge.target);\n const sourceDepth = depths.get(source);\n if (sourceDepth === undefined || !depths.has(target)) {\n continue;\n }\n const nextDepth = sourceDepth + 1;\n if (nextDepth > (depths.get(target) ?? 0)) {\n depths.set(target, nextDepth);\n changed = true;\n }\n }\n if (!changed) {\n break;\n }\n }\n return depths;\n}\n\nfunction statusColor(status: NodeStatus | undefined): string {\n switch (status) {\n case \"running\":\n return flowRunningColor;\n case \"completed\":\n return flowEdgeColor;\n case \"failed\":\n return flowDestructiveColor;\n default:\n return flowSelectedColor;\n }\n}\n\nfunction metadataPath(\n metadata: StudioPipelineLogEntry[\"metadata\"],\n key: string,\n): string[] | undefined {\n const value = metadata?.[key];\n return Array.isArray(value) && value.every((segment) => typeof segment === \"string\")\n ? value\n : undefined;\n}\n\nexport function pipelineNodeKey(path: readonly string[]): string {\n return JSON.stringify(path);\n}\n","import { Background, BackgroundVariant, Controls, ReactFlow } from \"@xyflow/react\";\nimport \"@xyflow/react/dist/style.css\";\nimport { ArrowClockwise, Play } from \"@phosphor-icons/react\";\nimport { type CSSProperties, useEffect, useMemo, useRef, useState } from \"react\";\nimport type {\n StudioConfig,\n StudioPipelineDetail,\n StudioPipelineLogEntry,\n StudioPipelineRunRecord,\n} from \"../../../../types\";\nimport { Button } from \"../../components/ui/button\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/ui/select\";\nimport {\n StudioEmptyState,\n StudioPageShell,\n StudioSurface,\n StudioTabs,\n} from \"../../components/ui/studio\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport { formatLogMetadataText, LogMetadata } from \"../shared/log-metadata\";\nimport { JsonSyntax } from \"../shared/renderers\";\nimport {\n flowMutedForegroundColor,\n type NodeStatus,\n nodeStatusFromLogs,\n nodeTypes,\n type PipelineFlow,\n pipelineNodeKey,\n toFlow,\n} from \"./pipeline-flow\";\n\nexport function PipelinesPage(props: {\n pipelines: StudioConfig[\"pipelines\"];\n selectedPipelineId: string;\n detail: StudioPipelineDetail | undefined;\n logs: StudioPipelineLogEntry[];\n activeRunId: string;\n runs: StudioPipelineRunRecord[];\n enabled: boolean;\n detailLoading: boolean;\n logsLoading: boolean;\n runsLoading: boolean;\n runState: \"idle\" | \"running\";\n runInput: string;\n runOutput: string;\n theme: \"light\" | \"dark\";\n activeTab: PipelineSidebarTab;\n onSelectPipeline: (pipelineId: string) => void;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n onTabChange: (tab: PipelineSidebarTab) => void;\n onReplayRun: (runId: string) => void;\n}) {\n const [selectedNodeId, setSelectedNodeId] = useState<string | undefined>();\n const graph = props.detail?.graph;\n const selectedNode =\n graph?.nodes.find((node) => pipelineNodeKey(node.path) === selectedNodeId) ??\n graph?.nodes[0] ??\n undefined;\n const nodeStatuses = useMemo(\n () => nodeStatusFromLogs(props.logs, props.activeRunId),\n [props.logs, props.activeRunId],\n );\n const flow = useMemo(() => {\n if (graph === undefined) {\n return { nodes: [], edges: [] } satisfies PipelineFlow;\n }\n return toFlow(graph, nodeStatuses);\n }, [graph, nodeStatuses]);\n\n if (!props.enabled || (!props.detailLoading && props.pipelines.length === 0)) {\n return (\n <StudioPageShell aria-label=\"Pipelines\">\n <StudioEmptyState\n title={props.enabled ? \"No pipelines\" : \"Pipelines unavailable\"}\n text={\n props.enabled\n ? \"No pipeline records are available in this Studio runtime.\"\n : \"This Studio runtime does not expose pipelines.\"\n }\n />\n </StudioPageShell>\n );\n }\n\n return (\n <StudioPageShell>\n <div className=\"grid min-h-0 min-w-0 pb-6 pr-6\">\n <StudioSurface className=\"grid grid-cols-[minmax(0,2fr)_minmax(0,1fr)] max-lg:grid-cols-1\">\n <div className=\"relative min-h-0 min-w-0 overflow-hidden border-r border-hair bg-card max-lg:border-b max-lg:border-r-0\">\n {props.detailLoading && graph === undefined ? (\n <div className=\"grid h-full min-h-96 place-items-center p-6\">\n <div className=\"grid w-full max-w-lg gap-3\">\n <div className=\"h-4 w-40 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-16 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-16 w-4/5 animate-pulse rounded-lg bg-muted\" />\n </div>\n </div>\n ) : null}\n {!props.detailLoading && graph === undefined ? (\n <StudioEmptyState\n className=\"h-full\"\n title={props.pipelines.length === 0 ? \"No pipelines\" : \"No pipeline selected\"}\n text={\n props.pipelines.length === 0\n ? \"No pipeline records are available in this Studio runtime.\"\n : \"Choose a registered pipeline to inspect its graph and runtime logs.\"\n }\n />\n ) : null}\n {graph !== undefined ? (\n <ReactFlow\n nodes={flow.nodes}\n edges={flow.edges}\n className=\"pipeline-flow\"\n style={\n {\n \"--xy-edge-stroke\": \"var(--muted-foreground)\",\n \"--xy-edge-stroke-width\": \"1.6\",\n \"--xy-edge-stroke-selected\": \"var(--foreground)\",\n } as CSSProperties\n }\n fitView\n fitViewOptions={{ padding: 0.18, maxZoom: 0.96 }}\n minZoom={0.48}\n maxZoom={1.35}\n colorMode={props.theme}\n nodeTypes={nodeTypes}\n proOptions={{ hideAttribution: true }}\n defaultEdgeOptions={{\n type: \"smoothstep\",\n focusable: true,\n }}\n onNodeClick={(_, node) => setSelectedNodeId(node.id)}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={14}\n size={1.8}\n color={flowMutedForegroundColor}\n className=\"opacity-35\"\n />\n <Controls showInteractive={false} />\n </ReactFlow>\n ) : null}\n </div>\n <PipelineInspectorSidebar\n pipelines={props.pipelines}\n selectedPipelineId={props.selectedPipelineId}\n detail={props.detail}\n logs={props.logs}\n runs={props.runs}\n logsLoading={props.logsLoading}\n runsLoading={props.runsLoading}\n runState={props.runState}\n runInput={props.runInput}\n runOutput={props.runOutput}\n activeTab={props.activeTab}\n selectedNode={selectedNode}\n selectedNodeStatus={\n selectedNode?.id === undefined ? undefined : nodeStatuses.get(selectedNode.id)\n }\n onSelectPipeline={(pipelineId) => {\n setSelectedNodeId(undefined);\n props.onSelectPipeline(pipelineId);\n }}\n onRunInputChange={props.onRunInputChange}\n onRun={props.onRun}\n onTabChange={props.onTabChange}\n onReplayRun={props.onReplayRun}\n />\n </StudioSurface>\n </div>\n </StudioPageShell>\n );\n}\n\nfunction PipelineInspectorSidebar(props: {\n pipelines: StudioConfig[\"pipelines\"];\n selectedPipelineId: string;\n detail: StudioPipelineDetail | undefined;\n logs: StudioPipelineLogEntry[];\n runs: StudioPipelineRunRecord[];\n logsLoading: boolean;\n runsLoading: boolean;\n runState: \"idle\" | \"running\";\n runInput: string;\n runOutput: string;\n activeTab: PipelineSidebarTab;\n selectedNode: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n selectedNodeStatus: NodeStatus | undefined;\n onSelectPipeline: (pipelineId: string) => void;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n onTabChange: (tab: PipelineSidebarTab) => void;\n onReplayRun: (runId: string) => void;\n}) {\n const graph = props.detail?.graph;\n const graphStats =\n graph === undefined\n ? undefined\n : {\n nodes: graph.nodes.length,\n edges: graph.edges.length,\n agents: graph.nodes.filter((node) => node.kind === \"agent\").length,\n extractors: graph.nodes.filter((node) => node.kind === \"extractor\").length,\n parallel: graph.nodes.some((node) => node.kind === \"parallel\") ? \"yes\" : \"no\",\n };\n\n return (\n <aside className=\"grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background\">\n <header className=\"grid gap-3 bg-card px-4 py-4\">\n <div className=\"grid gap-3\">\n <div className=\"flex min-w-0 items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h1 className=\"m-0 truncate text-base font-semibold tracking-tight text-foreground\">\n {props.detail?.name ?? \"Pipeline\"}\n </h1>\n {props.detail?.description === undefined ? null : (\n <p className=\"m-0 mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground\">\n {props.detail.description}\n </p>\n )}\n </div>\n <span className=\"shrink-0 text-xs font-semibold tabular-nums text-muted-foreground\">\n {props.logs.length}\n </span>\n </div>\n <Select value={props.selectedPipelineId} onValueChange={props.onSelectPipeline}>\n <SelectTrigger className=\"h-8 w-full rounded-lg border-hair bg-background text-xs hover:border-foreground focus:border-foreground focus:ring-ring\">\n <SelectValue placeholder=\"Select pipeline\" />\n </SelectTrigger>\n <SelectContent>\n {props.pipelines.map((pipeline) => (\n <SelectItem key={pipeline.id} value={pipeline.id}>\n {pipeline.name ?? pipeline.id}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <PipelineSidebarTabs activeTab={props.activeTab} onChange={props.onTabChange} />\n </header>\n <div\n className={[\n \"min-h-0 min-w-0 px-5 py-5\",\n props.activeTab === \"logs\" ? \"grid overflow-hidden\" : \"overflow-auto\",\n ].join(\" \")}\n >\n {props.activeTab === \"input\" ? (\n <div\n aria-labelledby={pipelineTabId(\"input\")}\n id={pipelinePanelId(\"input\")}\n role=\"tabpanel\"\n >\n <PipelineInputPanel\n runInput={props.runInput}\n runState={props.runState}\n disabled={props.detail === undefined}\n onRunInputChange={props.onRunInputChange}\n onRun={props.onRun}\n />\n </div>\n ) : null}\n {props.activeTab === \"metadata\" ? (\n <div\n aria-labelledby={pipelineTabId(\"metadata\")}\n id={pipelinePanelId(\"metadata\")}\n role=\"tabpanel\"\n >\n <PipelineMetadataPanel\n graphStats={graphStats}\n selectedNode={props.selectedNode}\n selectedNodeStatus={props.selectedNodeStatus}\n />\n </div>\n ) : null}\n {props.activeTab === \"runs\" ? (\n <div aria-labelledby={pipelineTabId(\"runs\")} id={pipelinePanelId(\"runs\")} role=\"tabpanel\">\n <PipelineRunsPanel\n runs={props.runs}\n runOutput={props.runOutput}\n runState={props.runState}\n loading={props.runsLoading}\n onReplayRun={props.onReplayRun}\n />\n </div>\n ) : null}\n {props.activeTab === \"logs\" ? (\n <div aria-labelledby={pipelineTabId(\"logs\")} id={pipelinePanelId(\"logs\")} role=\"tabpanel\">\n <PipelineLogsSection\n logs={props.logs}\n selectedPipelineId={props.selectedPipelineId}\n loading={props.logsLoading}\n />\n </div>\n ) : null}\n </div>\n </aside>\n );\n}\n\nexport type PipelineSidebarTab = \"input\" | \"metadata\" | \"runs\" | \"logs\";\n\nconst pipelineSidebarTabs: Array<{ id: PipelineSidebarTab; label: string }> = [\n { id: \"input\", label: \"Input\" },\n { id: \"metadata\", label: \"Metadata\" },\n { id: \"runs\", label: \"Runs\" },\n { id: \"logs\", label: \"Logs\" },\n];\n\nfunction PipelineSidebarTabs(props: {\n activeTab: PipelineSidebarTab;\n onChange: (tab: PipelineSidebarTab) => void;\n}) {\n return (\n <StudioTabs className=\"grid-cols-4\" role=\"tablist\" aria-label=\"Pipeline sidebar\">\n {pipelineSidebarTabs.map((tab) => (\n <button\n aria-controls={pipelinePanelId(tab.id)}\n aria-selected={props.activeTab === tab.id}\n className={[\n \"h-8 rounded-lg px-2 text-xs font-semibold uppercase tracking-[0.1em] transition duration-200\",\n props.activeTab === tab.id\n ? \"bg-foreground text-background\"\n : \"text-muted-foreground hover:bg-transparent hover:text-foreground\",\n ].join(\" \")}\n key={tab.id}\n id={pipelineTabId(tab.id)}\n onClick={() => props.onChange(tab.id)}\n role=\"tab\"\n type=\"button\"\n >\n {tab.label}\n </button>\n ))}\n </StudioTabs>\n );\n}\n\nfunction pipelineTabId(tab: PipelineSidebarTab): string {\n return `pipeline-tab-${tab}`;\n}\n\nfunction pipelinePanelId(tab: PipelineSidebarTab): string {\n return `pipeline-panel-${tab}`;\n}\n\nfunction Metric(props: { label: string; value: string }) {\n return (\n <div className=\"min-w-0 rounded-lg bg-background px-2.5 py-2.5\">\n <div className=\"truncate text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {props.label}\n </div>\n <div className=\"mt-1 truncate text-base font-semibold tabular-nums text-foreground\">\n {props.value}\n </div>\n </div>\n );\n}\n\nfunction PipelineInputPanel(props: {\n runInput: string;\n runState: \"idle\" | \"running\";\n disabled: boolean;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n}) {\n return (\n <section className=\"grid gap-4\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Pipeline input\n </div>\n <p className=\"m-0 mt-1 text-xs leading-5 text-muted-foreground\">\n Provide JSON-compatible input for this pipeline run.\n </p>\n </div>\n <Button\n className=\"h-8 shrink-0 gap-1.5 rounded-lg border border-primary bg-primary px-3 text-xs font-semibold text-primary-foreground shadow-none hover:border-action-hover hover:bg-action-hover hover:text-primary-foreground disabled:border-border disabled:bg-muted disabled:text-muted-foreground [&_svg]:!size-3\"\n disabled={props.runState === \"running\" || props.disabled}\n onClick={props.onRun}\n variant=\"ghost\"\n >\n <StudioIcon icon={Play} aria-hidden=\"true\" />\n {props.runState === \"running\" ? \"Running\" : \"Run\"}\n </Button>\n </div>\n <label className=\"grid gap-2\" htmlFor=\"pipeline-run-input\">\n <span className=\" text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n JSON\n </span>\n <Textarea\n id=\"pipeline-run-input\"\n value={props.runInput}\n onChange={(event) => props.onRunInputChange(event.target.value)}\n className=\"min-h-44 resize-y rounded-lg border-border bg-card text-xs leading-5 text-foreground\"\n spellCheck={false}\n />\n </label>\n </section>\n );\n}\n\nfunction PipelineMetadataPanel(props: {\n graphStats:\n | {\n nodes: number;\n edges: number;\n agents: number;\n extractors: number;\n parallel: string;\n }\n | undefined;\n selectedNode: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n selectedNodeStatus: NodeStatus | undefined;\n}) {\n return (\n <section className=\"grid gap-5\">\n {props.graphStats === undefined ? null : (\n <div className=\"grid grid-cols-5 gap-2\">\n <Metric label=\"Nodes\" value={String(props.graphStats.nodes)} />\n <Metric label=\"Edges\" value={String(props.graphStats.edges)} />\n <Metric label=\"Agents\" value={String(props.graphStats.agents)} />\n <Metric label=\"Extractors\" value={String(props.graphStats.extractors)} />\n <Metric label=\"Parallel\" value={props.graphStats.parallel} />\n </div>\n )}\n <NodeInspector node={props.selectedNode} status={props.selectedNodeStatus} />\n </section>\n );\n}\n\nfunction PipelineRunsPanel(props: {\n runs: StudioPipelineRunRecord[];\n runOutput: string;\n runState: \"idle\" | \"running\";\n loading: boolean;\n onReplayRun: (runId: string) => void;\n}) {\n return (\n <section className=\"grid gap-3\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Runs\n </div>\n <p className=\"m-0 mt-1 text-xs leading-5 text-muted-foreground\">\n Persisted pipeline executions.\n </p>\n </div>\n <Badge>{props.runState}</Badge>\n </div>\n {props.runOutput.length > 0 && props.runs.length === 0 ? (\n <PipelineRunOutputBlock title=\"Latest output\" output={props.runOutput} />\n ) : null}\n <div className=\"grid gap-2\">\n {props.loading && props.runs.length === 0 ? (\n <div className=\"grid gap-2 py-3\">\n <div className=\"h-4 w-32 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-56 max-w-full animate-pulse rounded-lg bg-muted\" />\n </div>\n ) : null}\n {!props.loading && props.runs.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No saved pipeline runs\"\n text=\"Run this pipeline to create its first persisted execution.\"\n />\n ) : null}\n {props.runs.map((run) => (\n <PipelineRunRow\n disabled={props.runState === \"running\"}\n run={run}\n key={run.runId}\n onReplayRun={props.onReplayRun}\n />\n ))}\n </div>\n </section>\n );\n}\n\nfunction PipelineRunRow(props: {\n run: StudioPipelineRunRecord;\n disabled: boolean;\n onReplayRun: (runId: string) => void;\n}) {\n const output = pipelineRunOutputText(props.run);\n return (\n <article className=\"rounded-none border border-hair bg-background px-4 py-4\">\n <div className=\"grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start\">\n <div className=\"min-w-0\">\n <div className=\"flex min-w-0 flex-wrap items-center gap-2\">\n <span\n className={[\n \"rounded-md border border-hair bg-card px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em]\",\n pipelineRunStatusClass(props.run.status),\n ].join(\" \")}\n >\n {props.run.status}\n </span>\n <span className=\"min-w-0 truncate text-xs font-semibold text-foreground\">\n {props.run.runId}\n </span>\n </div>\n <div className=\"mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <time>{formatLogTime(props.run.startedAt)}</time>\n {props.run.durationMs === undefined ? null : (\n <span className=\"tabular-nums\">{props.run.durationMs}ms</span>\n )}\n </div>\n </div>\n <Button\n className=\"h-8 gap-1.5 rounded-lg border border-hair bg-muted px-2.5 text-xs font-semibold text-foreground shadow-none hover:border-foreground hover:bg-transparent hover:text-foreground [&_svg]:!size-3\"\n disabled={props.disabled || props.run.status === \"running\"}\n onClick={() => props.onReplayRun(props.run.runId)}\n title=\"Rerun this pipeline with its saved input\"\n variant=\"ghost\"\n >\n <StudioIcon icon={ArrowClockwise} aria-hidden=\"true\" />\n Rerun\n </Button>\n </div>\n <PipelineRunOutputBlock title=\"Output\" output={output} />\n </article>\n );\n}\n\nfunction PipelineRunOutputBlock(props: { title: string; output: string }) {\n return (\n <div className=\"mt-4 border-t border-hair pt-3\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\" text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n {props.title}\n </span>\n <span className=\" text-xs font-medium tabular-nums text-muted-foreground\">\n {props.output.length} chars\n </span>\n </div>\n <pre className=\"mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-card p-3 text-sm leading-6 text-foreground\">\n {props.output.length > 0 ? <PipelineOutputText text={props.output} /> : \"No output saved.\"}\n </pre>\n </div>\n );\n}\n\nfunction pipelineRunOutputText(run: StudioPipelineRunRecord): string {\n if (run.output !== undefined) {\n return typeof run.output === \"string\" ? run.output : JSON.stringify(run.output, null, 2);\n }\n if (run.error !== undefined) {\n return JSON.stringify(run.error, null, 2);\n }\n return \"\";\n}\n\nfunction PipelineOutputText(props: { text: string }) {\n return isStructuredOutput(props.text) ? <JsonSyntax text={props.text} /> : props.text;\n}\n\nfunction isStructuredOutput(text: string): boolean {\n const trimmed = text.trim();\n return (\n (trimmed.startsWith(\"{\") && trimmed.endsWith(\"}\")) ||\n (trimmed.startsWith(\"[\") && trimmed.endsWith(\"]\"))\n );\n}\n\nfunction pipelineRunStatusClass(status: StudioPipelineRunRecord[\"status\"]): string {\n switch (status) {\n case \"success\":\n return \"text-foreground\";\n case \"error\":\n return \"text-destructive\";\n case \"running\":\n return \"text-muted-foreground\";\n }\n}\n\nfunction NodeInspector(props: {\n node: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n status: NodeStatus | undefined;\n}) {\n if (props.node === undefined) {\n return (\n <section className=\"text-sm font-medium text-muted-foreground\">\n Select a node for details.\n </section>\n );\n }\n\n const metadata = Object.entries(props.node.metadata ?? {});\n return (\n <section className=\"grid content-start gap-5\">\n <div>\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Selected node\n </div>\n <h2 className=\"m-0 mt-2 text-lg font-semibold tracking-tight text-foreground\">\n {props.node.label}\n </h2>\n <div className=\"mt-2 flex flex-wrap gap-1.5\">\n <Badge>{props.node.kind}</Badge>\n {props.status === undefined ? null : <Badge>{props.status}</Badge>}\n {props.node.branchKey === undefined ? null : <Badge>{props.node.branchKey}</Badge>}\n </div>\n </div>\n {props.node.description === undefined ? null : (\n <p className=\"m-0 rounded-lg bg-muted px-3 py-2 text-sm leading-6 text-muted-foreground\">\n {props.node.description}\n </p>\n )}\n <DetailList\n items={[\n [\"ID\", props.node.id],\n [\"Agent\", props.node.agentId],\n [\"Pipeline\", props.node.pipelineId],\n ]}\n />\n {metadata.length > 0 ? (\n <div className=\"grid gap-2\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Metadata\n </div>\n <div className=\"grid gap-1\">\n {metadata.map(([key, value]) => (\n <div className=\"grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs\" key={key}>\n <span className=\"truncate text-muted-foreground\">{key}</span>\n <span className=\"truncate font-medium text-foreground\">\n {formatMetadataValue(value)}\n </span>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </section>\n );\n}\n\nfunction PipelineLogsSection(props: {\n logs: StudioPipelineLogEntry[];\n selectedPipelineId: string;\n loading: boolean;\n}) {\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const stickToBottomRef = useRef(true);\n\n useEffect(() => {\n const node = scrollerRef.current;\n if (node === null || !stickToBottomRef.current) {\n return;\n }\n node.scrollTop = node.scrollHeight;\n });\n\n function updateStickiness() {\n const node = scrollerRef.current;\n if (node === null) {\n return;\n }\n stickToBottomRef.current = node.scrollHeight - node.scrollTop - node.clientHeight < 24;\n }\n\n return (\n <section className=\"grid min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Pipeline logs\n </div>\n <div className=\"mt-1 truncate text-xs font-medium text-muted-foreground\">\n {props.selectedPipelineId.length === 0\n ? \"No active pipeline\"\n : props.selectedPipelineId}\n </div>\n </div>\n <span className=\" text-xs font-semibold tabular-nums text-muted-foreground\">\n {props.logs.length}\n </span>\n </div>\n <div\n className=\"min-h-0 overflow-auto border-t bg-background p-2\"\n ref={scrollerRef}\n onScroll={updateStickiness}\n >\n {props.selectedPipelineId.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No pipeline selected\"\n text=\"Choose a pipeline to view its runtime logs.\"\n />\n ) : null}\n {props.selectedPipelineId.length > 0 && props.loading && props.logs.length === 0 ? (\n <div className=\"grid gap-2 py-4\">\n <div className=\"h-4 w-32 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-64 max-w-full animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-52 max-w-full animate-pulse rounded-lg bg-muted\" />\n </div>\n ) : null}\n {props.selectedPipelineId.length > 0 && !props.loading && props.logs.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No logs yet\"\n text=\"Run the pipeline to populate this console.\"\n />\n ) : null}\n {props.logs.map((log) => (\n <PipelineLogRow log={log} key={log.id} />\n ))}\n </div>\n </section>\n );\n}\n\nfunction PipelineLogRow(props: { log: StudioPipelineLogEntry }) {\n const metadataText = formatLogMetadataText(props.log.metadata, 4);\n const line = [\n formatLogTime(props.log.timestamp),\n props.log.level.toUpperCase().padEnd(5, \" \"),\n props.log.message,\n `${props.log.category}/${props.log.event}`,\n metadataText,\n ]\n .filter((item) => item.trim().length > 0)\n .join(\" \");\n return (\n <article\n className={[\n \"min-w-full rounded-lg px-3 py-1.5 text-xs leading-5 transition duration-200 hover:bg-transparent hover:text-foreground\",\n ].join(\" \")}\n title={line}\n >\n <div className=\"flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1\">\n <time className=\"shrink-0 text-muted-foreground\">{formatLogTime(props.log.timestamp)}</time>\n <span className={[\"shrink-0 font-semibold\", logLevelTextClass(props.log.level)].join(\" \")}>\n {props.log.level.toUpperCase().padEnd(5, \" \")}\n </span>\n <span className=\"min-w-0 break-words font-medium text-foreground\">{props.log.message}</span>\n </div>\n <div className=\"mt-1 min-w-0 break-words text-muted-foreground\">\n {props.log.category}/{props.log.event}\n </div>\n <LogMetadata metadata={props.log.metadata} limit={4} />\n </article>\n );\n}\n\nfunction DetailList(props: { items: Array<[string, string | undefined]> }) {\n const items = props.items.filter(([, value]) => value !== undefined && value.length > 0);\n if (items.length === 0) {\n return null;\n }\n return (\n <div className=\"grid gap-2 rounded-none bg-background p-3\">\n {items.map(([label, value]) => (\n <div className=\"grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs\" key={label}>\n <span className=\"truncate text-muted-foreground\">{label}</span>\n <span className=\"truncate font-medium text-foreground\">{value}</span>\n </div>\n ))}\n </div>\n );\n}\n\nfunction Badge(props: { children: string }) {\n return (\n <span className=\"rounded-lg border border-hair bg-background px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground\">\n {props.children}\n </span>\n );\n}\n\nfunction formatLogTime(value: string): string {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return \"\";\n }\n return date.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n });\n}\n\nfunction formatMetadataValue(value: unknown): string {\n if (value === null) {\n return \"null\";\n }\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (Array.isArray(value)) {\n return `[${value.length}]`;\n }\n if (typeof value === \"object\" && value !== null) {\n return \"{...}\";\n }\n return \"\";\n}\n\nfunction logLevelTextClass(level: StudioPipelineLogEntry[\"level\"]): string {\n switch (level) {\n case \"error\":\n return \"text-destructive\";\n case \"warn\":\n return \"text-muted-foreground\";\n case \"debug\":\n return \"text-muted-foreground\";\n case \"info\":\n return \"text-foreground\";\n }\n}\n"],"x_google_ignoreList":[0,1],"mappings":"wgBACMA,GAAoB,IAAI,IAAI,CAChC,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,oJAAqJ,CAAC,CAAC,CACxP,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAClE,OACA,CACE,EAAG,yHACH,QAAS,KACX,CACF,EAAmB,EAAE,cAAc,OAAQ,CAAE,EAAG,mMAAoM,CAAC,CAAC,CACxP,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,gMAAiM,CAAC,CAAC,CACpS,EACA,CACE,QACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,mVAAoV,CAAC,CAAC,CACvb,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,mMAAoM,CAAC,CAAC,CACvS,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE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AU,UAAY,OAAO,GAAU,UAAY,OAAO,GAAU,UACtE,OAAO,CAAK,EAEjB,MAAM,QAAQ,CAAK,EACd,IAAI,EAAM,OAAO,GAEtB,OAAO,GAAU,UAAY,EACxB,QAEF,EACT,CAEA,SAAS,GAAkB,EAAgD,CACzE,OAAQ,EAAR,CACE,IAAK,QACH,MAAO,mBACT,IAAK,OACH,MAAO,wBACT,IAAK,QACH,MAAO,wBACT,IAAK,OACH,MAAO,iBACX,CACF"}
1
+ {"version":3,"file":"pipelines-page-DAqa699J.js","names":["a","t","m"],"sources":["../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/Play.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/Play.es.js","../../../src/ui/app/modules/shared/log-metadata.tsx","../../../src/ui/app/modules/pipelines/pipeline-flow.tsx","../../../src/ui/app/modules/pipelines/pipelines-page.tsx"],"sourcesContent":["import * as e from \"react\";\nconst a = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\n \"path\",\n {\n d: \"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ e.createElement(\"path\", { d: \"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z\" }))\n ]\n]);\nexport {\n a as default\n};\n","import * as o from \"react\";\nimport t from \"../lib/IconBase.es.js\";\nimport m from \"../defs/Play.es.js\";\nconst a = o.forwardRef((e, r) => /* @__PURE__ */ o.createElement(t, { ref: r, ...e, weights: m }));\na.displayName = \"PlayIcon\";\nconst n = a;\nexport {\n n as Play,\n a as PlayIcon\n};\n","import { cn } from \"../../lib/utils\";\n\ntype MetadataValue = unknown;\n\ntype InlineMetadataItem = {\n key: string;\n value: string;\n tone: \"default\" | \"error\";\n};\n\nexport function LogMetadata(props: {\n metadata?: Record<string, MetadataValue> | undefined;\n limit?: number;\n}) {\n const items = inlineMetadataItems(props.metadata, props.limit);\n const hasStructuredDetails = hasStructuredMetadata(props.metadata);\n if (items.length === 0 && !hasStructuredDetails) {\n return null;\n }\n return (\n <div className=\"grid min-w-0 gap-1 text-xs leading-5 text-muted-foreground\">\n {items.length === 0 ? null : (\n <div className=\"flex min-w-0 flex-wrap gap-x-2 gap-y-1\">\n {items.map((item) => (\n <span\n className={cn(\n \"min-w-0 break-words\",\n item.tone === \"error\" ? \"text-destructive\" : \"text-muted-foreground\",\n )}\n key={item.key}\n >\n <span className=\"text-muted-foreground\">{item.key}=</span>\n {item.value}\n </span>\n ))}\n </div>\n )}\n {hasStructuredDetails ? (\n <details className=\"group min-w-0 rounded-lg border border-border bg-muted px-2 py-1\">\n <summary className=\"cursor-pointer select-none text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground transition group-open:text-foreground\">\n Details\n </summary>\n <pre className=\"m-0 mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs leading-4 text-muted-foreground\">\n {formatStructuredDetails(props.metadata)}\n </pre>\n </details>\n ) : null}\n </div>\n );\n}\n\nexport function formatLogMetadataText(\n metadata?: Record<string, MetadataValue>,\n limit?: number,\n): string {\n return inlineMetadataItems(metadata, limit)\n .map((item) => `${item.key}=${item.value}`)\n .join(\" \");\n}\n\nfunction inlineMetadataItems(\n metadata?: Record<string, MetadataValue>,\n limit = 6,\n): InlineMetadataItem[] {\n return Object.entries(metadata ?? {})\n .map(([key, value]): InlineMetadataItem => {\n const tone: InlineMetadataItem[\"tone\"] = key === \"error\" ? \"error\" : \"default\";\n return {\n key,\n value: formatInlineMetadataValue(key, value),\n tone,\n };\n })\n .filter((item) => item.value.length > 0)\n .slice(0, limit);\n}\n\nfunction formatInlineMetadataValue(key: string, value: MetadataValue): string {\n if (value === null) {\n return \"null\";\n }\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (Array.isArray(value)) {\n return `[${value.length}]`;\n }\n if (isRecord(value)) {\n if (key === \"error\") {\n return formatErrorMetadata(value);\n }\n return compactJson(value);\n }\n return \"\";\n}\n\nfunction formatErrorMetadata(value: Record<string, MetadataValue>): string {\n const name = typeof value.name === \"string\" && value.name.length > 0 ? value.name : undefined;\n const message =\n typeof value.message === \"string\" && value.message.length > 0 ? value.message : undefined;\n if (name !== undefined && message !== undefined) {\n return `${name}: ${message}`;\n }\n if (message !== undefined) {\n return message;\n }\n return compactJson(value);\n}\n\nfunction hasStructuredMetadata(metadata?: Record<string, MetadataValue>): boolean {\n return Object.values(metadata ?? {}).some((value) => Array.isArray(value) || isRecord(value));\n}\n\nfunction formatStructuredDetails(metadata?: Record<string, MetadataValue>): string {\n if (metadata === undefined) {\n return \"\";\n }\n try {\n return JSON.stringify(metadata, null, 2);\n } catch {\n return String(metadata);\n }\n}\n\nfunction compactJson(value: MetadataValue): string {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\nfunction isRecord(value: MetadataValue): value is Record<string, MetadataValue> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n","import { type Edge, Handle, MarkerType, type Node, type NodeProps, Position } from \"@xyflow/react\";\nimport type { StudioPipelineDetail, StudioPipelineLogEntry } from \"../../../../types\";\n\nexport const nodeTypes = {\n pipelineStage: PipelineStageNode,\n};\n\nexport type PipelineFlow = { nodes: Node[]; edges: Edge[] };\n\nconst flowEdgeColor = \"var(--muted-foreground)\";\nconst flowSelectedColor = \"var(--foreground)\";\nconst flowBackgroundColor = \"var(--background)\";\nexport const flowMutedForegroundColor = \"var(--muted-foreground)\";\nconst flowDestructiveColor = \"var(--destructive)\";\nconst flowRunningColor = \"var(--foreground)\";\n\ntype PipelineNodeData = {\n label: string;\n kind: StudioPipelineDetail[\"graph\"][\"nodes\"][number][\"kind\"];\n status: NodeStatus | undefined;\n statusColor: string;\n branchKey: string | undefined;\n};\n\nfunction PipelineStageNode(props: NodeProps<Node<PipelineNodeData>>) {\n const status = props.data.status;\n return (\n <article\n className={[\n \"group relative min-h-[74px] w-[210px] rounded-none border bg-card px-4 py-3 text-left shadow-[inset_0_1px_0_var(--sb-inset-highlight)] transition duration-200\",\n props.selected ? \"border-foreground\" : \"border-hair\",\n status === \"running\" ? \"translate-y-[-1px] border-foreground\" : \"\",\n status === \"completed\" ? \"border-muted-foreground\" : \"\",\n status === \"failed\" ? \"border-destructive\" : \"\",\n ].join(\" \")}\n >\n <Handle\n type=\"target\"\n position={Position.Top}\n className=\"!h-0 !w-0 !border-0 !bg-transparent !opacity-0\"\n />\n <div className=\"flex min-w-0 items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold leading-5 tracking-tight text-foreground\">\n {props.data.label}\n </div>\n <div className=\"mt-1 flex items-center gap-1.5\">\n <span\n className=\"h-1.5 w-1.5 rounded-lg\"\n style={{ backgroundColor: props.data.statusColor }}\n />\n <span className=\" text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {props.data.kind}\n </span>\n </div>\n </div>\n {status === undefined ? null : (\n <span\n className=\"rounded-lg border border-hair bg-background px-1.5 py-0.5 text-xs font-semibold uppercase tracking-[0.08em]\"\n style={{ color: props.data.statusColor }}\n >\n {status}\n </span>\n )}\n </div>\n {props.data.branchKey === undefined ? null : (\n <div className=\"mt-2 truncate text-xs text-muted-foreground\">\n branch: {props.data.branchKey}\n </div>\n )}\n <Handle\n type=\"source\"\n position={Position.Bottom}\n className=\"!h-0 !w-0 !border-0 !bg-transparent !opacity-0\"\n />\n </article>\n );\n}\n\nexport type NodeStatus = \"running\" | \"completed\" | \"failed\";\n\nexport function nodeStatusFromLogs(\n logs: StudioPipelineLogEntry[],\n activeRunId: string,\n): Map<string, NodeStatus> {\n const statuses = new Map<string, NodeStatus>();\n if (activeRunId.length === 0) {\n return statuses;\n }\n for (const log of logs) {\n if (log.runId !== activeRunId) {\n continue;\n }\n const nodePath = metadataPath(log.metadata, \"nodePath\");\n if (nodePath === undefined) {\n continue;\n }\n const nodeId = pipelineNodeKey(nodePath);\n if (log.event.endsWith(\".started\")) {\n statuses.set(nodeId, \"running\");\n }\n if (log.event.endsWith(\".completed\")) {\n statuses.set(nodeId, \"completed\");\n }\n if (log.event.endsWith(\".failed\")) {\n statuses.set(nodeId, \"failed\");\n }\n }\n return statuses;\n}\n\nexport function toFlow(\n graph: StudioPipelineDetail[\"graph\"],\n statuses: Map<string, NodeStatus>,\n): PipelineFlow {\n const depths = nodeDepths(graph);\n const depthSlots = new Map<number, number>();\n const depthCounts = new Map<number, number>();\n for (const depth of depths.values()) {\n depthCounts.set(depth, (depthCounts.get(depth) ?? 0) + 1);\n }\n\n const nodes: Node[] = graph.nodes.map((node) => {\n const nodeId = pipelineNodeKey(node.path);\n const depth = depths.get(nodeId) ?? 0;\n const slot = depthSlots.get(depth) ?? 0;\n depthSlots.set(depth, slot + 1);\n const count = depthCounts.get(depth) ?? 1;\n const status = statuses.get(nodeId);\n return {\n id: nodeId,\n type: \"pipelineStage\",\n position: {\n x: (slot - (count - 1) / 2) * 280,\n y: depth * 170,\n },\n sourcePosition: Position.Bottom,\n targetPosition: Position.Top,\n data: {\n label: node.label,\n kind: node.kind,\n status,\n statusColor: statusColor(status),\n branchKey: node.branchKey,\n },\n };\n });\n\n const edges: Edge[] = graph.edges.map((edge) => ({\n id: edge.id,\n source: pipelineNodeKey(edge.source),\n target: pipelineNodeKey(edge.target),\n type: \"smoothstep\",\n className: \"pipeline-flow-edge\",\n label: edge.label,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 10,\n height: 10,\n color: flowEdgeColor,\n },\n style: {\n stroke: flowEdgeColor,\n strokeWidth: 1.6,\n opacity: 0.78,\n },\n labelShowBg: true,\n labelStyle: {\n fill: flowMutedForegroundColor,\n fontSize: 11,\n fontWeight: 700,\n },\n labelBgStyle: {\n fill: flowBackgroundColor,\n fillOpacity: 0.92,\n },\n labelBgPadding: [6, 4],\n labelBgBorderRadius: 2,\n }));\n\n return { nodes, edges };\n}\n\nfunction nodeDepths(graph: StudioPipelineDetail[\"graph\"]): Map<string, number> {\n const depths = new Map<string, number>();\n for (const node of graph.nodes) {\n depths.set(pipelineNodeKey(node.path), 0);\n }\n\n for (let index = 0; index < graph.nodes.length; index += 1) {\n let changed = false;\n for (const edge of graph.edges) {\n const source = pipelineNodeKey(edge.source);\n const target = pipelineNodeKey(edge.target);\n const sourceDepth = depths.get(source);\n if (sourceDepth === undefined || !depths.has(target)) {\n continue;\n }\n const nextDepth = sourceDepth + 1;\n if (nextDepth > (depths.get(target) ?? 0)) {\n depths.set(target, nextDepth);\n changed = true;\n }\n }\n if (!changed) {\n break;\n }\n }\n return depths;\n}\n\nfunction statusColor(status: NodeStatus | undefined): string {\n switch (status) {\n case \"running\":\n return flowRunningColor;\n case \"completed\":\n return flowEdgeColor;\n case \"failed\":\n return flowDestructiveColor;\n default:\n return flowSelectedColor;\n }\n}\n\nfunction metadataPath(\n metadata: StudioPipelineLogEntry[\"metadata\"],\n key: string,\n): string[] | undefined {\n const value = metadata?.[key];\n return Array.isArray(value) && value.every((segment) => typeof segment === \"string\")\n ? value\n : undefined;\n}\n\nexport function pipelineNodeKey(path: readonly string[]): string {\n return JSON.stringify(path);\n}\n","import { Background, BackgroundVariant, Controls, ReactFlow } from \"@xyflow/react\";\nimport \"@xyflow/react/dist/style.css\";\nimport { ArrowClockwise, Play } from \"@phosphor-icons/react\";\nimport { type CSSProperties, useEffect, useMemo, useRef, useState } from \"react\";\nimport type {\n StudioConfig,\n StudioPipelineDetail,\n StudioPipelineLogEntry,\n StudioPipelineRunRecord,\n} from \"../../../../types\";\nimport { Button } from \"../../components/ui/button\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/ui/select\";\nimport {\n StudioEmptyState,\n StudioPageShell,\n StudioSurface,\n StudioTabs,\n} from \"../../components/ui/studio\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport { formatLogMetadataText, LogMetadata } from \"../shared/log-metadata\";\nimport { JsonSyntax } from \"../shared/renderers\";\nimport {\n flowMutedForegroundColor,\n type NodeStatus,\n nodeStatusFromLogs,\n nodeTypes,\n type PipelineFlow,\n pipelineNodeKey,\n toFlow,\n} from \"./pipeline-flow\";\n\nexport function PipelinesPage(props: {\n pipelines: StudioConfig[\"pipelines\"];\n selectedPipelineId: string;\n detail: StudioPipelineDetail | undefined;\n logs: StudioPipelineLogEntry[];\n activeRunId: string;\n runs: StudioPipelineRunRecord[];\n enabled: boolean;\n detailLoading: boolean;\n logsLoading: boolean;\n runsLoading: boolean;\n runState: \"idle\" | \"running\";\n runInput: string;\n runOutput: string;\n theme: \"light\" | \"dark\";\n activeTab: PipelineSidebarTab;\n onSelectPipeline: (pipelineId: string) => void;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n onTabChange: (tab: PipelineSidebarTab) => void;\n onReplayRun: (runId: string) => void;\n}) {\n const [selectedNodeId, setSelectedNodeId] = useState<string | undefined>();\n const graph = props.detail?.graph;\n const selectedNode =\n graph?.nodes.find((node) => pipelineNodeKey(node.path) === selectedNodeId) ??\n graph?.nodes[0] ??\n undefined;\n const nodeStatuses = useMemo(\n () => nodeStatusFromLogs(props.logs, props.activeRunId),\n [props.logs, props.activeRunId],\n );\n const flow = useMemo(() => {\n if (graph === undefined) {\n return { nodes: [], edges: [] } satisfies PipelineFlow;\n }\n return toFlow(graph, nodeStatuses);\n }, [graph, nodeStatuses]);\n\n if (!props.enabled || (!props.detailLoading && props.pipelines.length === 0)) {\n return (\n <StudioPageShell aria-label=\"Pipelines\">\n <StudioEmptyState\n title={props.enabled ? \"No pipelines\" : \"Pipelines unavailable\"}\n text={\n props.enabled\n ? \"No pipeline records are available in this Studio runtime.\"\n : \"This Studio runtime does not expose pipelines.\"\n }\n />\n </StudioPageShell>\n );\n }\n\n return (\n <StudioPageShell>\n <div className=\"grid min-h-0 min-w-0 pb-6 pr-6\">\n <StudioSurface className=\"grid grid-cols-[minmax(0,2fr)_minmax(0,1fr)] max-lg:grid-cols-1\">\n <div className=\"relative min-h-0 min-w-0 overflow-hidden border-r border-hair bg-card max-lg:border-b max-lg:border-r-0\">\n {props.detailLoading && graph === undefined ? (\n <div className=\"grid h-full min-h-96 place-items-center p-6\">\n <div className=\"grid w-full max-w-lg gap-3\">\n <div className=\"h-4 w-40 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-16 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-16 w-4/5 animate-pulse rounded-lg bg-muted\" />\n </div>\n </div>\n ) : null}\n {!props.detailLoading && graph === undefined ? (\n <StudioEmptyState\n className=\"h-full\"\n title={props.pipelines.length === 0 ? \"No pipelines\" : \"No pipeline selected\"}\n text={\n props.pipelines.length === 0\n ? \"No pipeline records are available in this Studio runtime.\"\n : \"Choose a registered pipeline to inspect its graph and runtime logs.\"\n }\n />\n ) : null}\n {graph !== undefined ? (\n <ReactFlow\n nodes={flow.nodes}\n edges={flow.edges}\n className=\"pipeline-flow\"\n style={\n {\n \"--xy-edge-stroke\": \"var(--muted-foreground)\",\n \"--xy-edge-stroke-width\": \"1.6\",\n \"--xy-edge-stroke-selected\": \"var(--foreground)\",\n } as CSSProperties\n }\n fitView\n fitViewOptions={{ padding: 0.18, maxZoom: 0.96 }}\n minZoom={0.48}\n maxZoom={1.35}\n colorMode={props.theme}\n nodeTypes={nodeTypes}\n proOptions={{ hideAttribution: true }}\n defaultEdgeOptions={{\n type: \"smoothstep\",\n focusable: true,\n }}\n onNodeClick={(_, node) => setSelectedNodeId(node.id)}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={14}\n size={1.8}\n color={flowMutedForegroundColor}\n className=\"opacity-35\"\n />\n <Controls showInteractive={false} />\n </ReactFlow>\n ) : null}\n </div>\n <PipelineInspectorSidebar\n pipelines={props.pipelines}\n selectedPipelineId={props.selectedPipelineId}\n detail={props.detail}\n logs={props.logs}\n runs={props.runs}\n logsLoading={props.logsLoading}\n runsLoading={props.runsLoading}\n runState={props.runState}\n runInput={props.runInput}\n runOutput={props.runOutput}\n activeTab={props.activeTab}\n selectedNode={selectedNode}\n selectedNodeStatus={\n selectedNode?.id === undefined ? undefined : nodeStatuses.get(selectedNode.id)\n }\n onSelectPipeline={(pipelineId) => {\n setSelectedNodeId(undefined);\n props.onSelectPipeline(pipelineId);\n }}\n onRunInputChange={props.onRunInputChange}\n onRun={props.onRun}\n onTabChange={props.onTabChange}\n onReplayRun={props.onReplayRun}\n />\n </StudioSurface>\n </div>\n </StudioPageShell>\n );\n}\n\nfunction PipelineInspectorSidebar(props: {\n pipelines: StudioConfig[\"pipelines\"];\n selectedPipelineId: string;\n detail: StudioPipelineDetail | undefined;\n logs: StudioPipelineLogEntry[];\n runs: StudioPipelineRunRecord[];\n logsLoading: boolean;\n runsLoading: boolean;\n runState: \"idle\" | \"running\";\n runInput: string;\n runOutput: string;\n activeTab: PipelineSidebarTab;\n selectedNode: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n selectedNodeStatus: NodeStatus | undefined;\n onSelectPipeline: (pipelineId: string) => void;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n onTabChange: (tab: PipelineSidebarTab) => void;\n onReplayRun: (runId: string) => void;\n}) {\n const graph = props.detail?.graph;\n const graphStats =\n graph === undefined\n ? undefined\n : {\n nodes: graph.nodes.length,\n edges: graph.edges.length,\n agents: graph.nodes.filter((node) => node.kind === \"agent\").length,\n extractors: graph.nodes.filter((node) => node.kind === \"extractor\").length,\n parallel: graph.nodes.some((node) => node.kind === \"parallel\") ? \"yes\" : \"no\",\n };\n\n return (\n <aside className=\"grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-background\">\n <header className=\"grid gap-3 bg-card px-4 py-4\">\n <div className=\"grid gap-3\">\n <div className=\"flex min-w-0 items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h1 className=\"m-0 truncate text-base font-semibold tracking-tight text-foreground\">\n {props.detail?.name ?? \"Pipeline\"}\n </h1>\n {props.detail?.description === undefined ? null : (\n <p className=\"m-0 mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground\">\n {props.detail.description}\n </p>\n )}\n </div>\n <span className=\"shrink-0 text-xs font-semibold tabular-nums text-muted-foreground\">\n {props.logs.length}\n </span>\n </div>\n <Select value={props.selectedPipelineId} onValueChange={props.onSelectPipeline}>\n <SelectTrigger className=\"h-8 w-full rounded-lg border-hair bg-background text-xs hover:border-foreground focus:border-foreground focus:ring-ring\">\n <SelectValue placeholder=\"Select pipeline\" />\n </SelectTrigger>\n <SelectContent>\n {props.pipelines.map((pipeline) => (\n <SelectItem key={pipeline.id} value={pipeline.id}>\n {pipeline.name ?? pipeline.id}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <PipelineSidebarTabs activeTab={props.activeTab} onChange={props.onTabChange} />\n </header>\n <div\n className={[\n \"min-h-0 min-w-0 px-5 py-5\",\n props.activeTab === \"logs\" ? \"grid overflow-hidden\" : \"overflow-auto\",\n ].join(\" \")}\n >\n {props.activeTab === \"input\" ? (\n <div\n aria-labelledby={pipelineTabId(\"input\")}\n id={pipelinePanelId(\"input\")}\n role=\"tabpanel\"\n >\n <PipelineInputPanel\n runInput={props.runInput}\n runState={props.runState}\n disabled={props.detail === undefined}\n onRunInputChange={props.onRunInputChange}\n onRun={props.onRun}\n />\n </div>\n ) : null}\n {props.activeTab === \"metadata\" ? (\n <div\n aria-labelledby={pipelineTabId(\"metadata\")}\n id={pipelinePanelId(\"metadata\")}\n role=\"tabpanel\"\n >\n <PipelineMetadataPanel\n graphStats={graphStats}\n selectedNode={props.selectedNode}\n selectedNodeStatus={props.selectedNodeStatus}\n />\n </div>\n ) : null}\n {props.activeTab === \"runs\" ? (\n <div aria-labelledby={pipelineTabId(\"runs\")} id={pipelinePanelId(\"runs\")} role=\"tabpanel\">\n <PipelineRunsPanel\n runs={props.runs}\n runOutput={props.runOutput}\n runState={props.runState}\n loading={props.runsLoading}\n onReplayRun={props.onReplayRun}\n />\n </div>\n ) : null}\n {props.activeTab === \"logs\" ? (\n <div aria-labelledby={pipelineTabId(\"logs\")} id={pipelinePanelId(\"logs\")} role=\"tabpanel\">\n <PipelineLogsSection\n logs={props.logs}\n selectedPipelineId={props.selectedPipelineId}\n loading={props.logsLoading}\n />\n </div>\n ) : null}\n </div>\n </aside>\n );\n}\n\nexport type PipelineSidebarTab = \"input\" | \"metadata\" | \"runs\" | \"logs\";\n\nconst pipelineSidebarTabs: Array<{ id: PipelineSidebarTab; label: string }> = [\n { id: \"input\", label: \"Input\" },\n { id: \"metadata\", label: \"Metadata\" },\n { id: \"runs\", label: \"Runs\" },\n { id: \"logs\", label: \"Logs\" },\n];\n\nfunction PipelineSidebarTabs(props: {\n activeTab: PipelineSidebarTab;\n onChange: (tab: PipelineSidebarTab) => void;\n}) {\n return (\n <StudioTabs className=\"grid-cols-4\" role=\"tablist\" aria-label=\"Pipeline sidebar\">\n {pipelineSidebarTabs.map((tab) => (\n <button\n aria-controls={pipelinePanelId(tab.id)}\n aria-selected={props.activeTab === tab.id}\n className={[\n \"h-8 rounded-lg px-2 text-xs font-semibold uppercase tracking-[0.1em] transition duration-200\",\n props.activeTab === tab.id\n ? \"bg-foreground text-background\"\n : \"text-muted-foreground hover:bg-transparent hover:text-foreground\",\n ].join(\" \")}\n key={tab.id}\n id={pipelineTabId(tab.id)}\n onClick={() => props.onChange(tab.id)}\n role=\"tab\"\n type=\"button\"\n >\n {tab.label}\n </button>\n ))}\n </StudioTabs>\n );\n}\n\nfunction pipelineTabId(tab: PipelineSidebarTab): string {\n return `pipeline-tab-${tab}`;\n}\n\nfunction pipelinePanelId(tab: PipelineSidebarTab): string {\n return `pipeline-panel-${tab}`;\n}\n\nfunction Metric(props: { label: string; value: string }) {\n return (\n <div className=\"min-w-0 rounded-lg bg-background px-2.5 py-2.5\">\n <div className=\"truncate text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {props.label}\n </div>\n <div className=\"mt-1 truncate text-base font-semibold tabular-nums text-foreground\">\n {props.value}\n </div>\n </div>\n );\n}\n\nfunction PipelineInputPanel(props: {\n runInput: string;\n runState: \"idle\" | \"running\";\n disabled: boolean;\n onRunInputChange: (value: string) => void;\n onRun: () => void;\n}) {\n return (\n <section className=\"grid gap-4\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Pipeline input\n </div>\n <p className=\"m-0 mt-1 text-xs leading-5 text-muted-foreground\">\n Provide JSON-compatible input for this pipeline run.\n </p>\n </div>\n <Button\n className=\"h-8 shrink-0 gap-1.5 rounded-lg border border-primary bg-primary px-3 text-xs font-semibold text-primary-foreground shadow-none hover:border-action-hover hover:bg-action-hover hover:text-primary-foreground disabled:border-border disabled:bg-muted disabled:text-muted-foreground [&_svg]:!size-3\"\n disabled={props.runState === \"running\" || props.disabled}\n onClick={props.onRun}\n variant=\"ghost\"\n >\n <StudioIcon icon={Play} aria-hidden=\"true\" />\n {props.runState === \"running\" ? \"Running\" : \"Run\"}\n </Button>\n </div>\n <label className=\"grid gap-2\" htmlFor=\"pipeline-run-input\">\n <span className=\" text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n JSON\n </span>\n <Textarea\n id=\"pipeline-run-input\"\n value={props.runInput}\n onChange={(event) => props.onRunInputChange(event.target.value)}\n className=\"min-h-44 resize-y rounded-lg border-border bg-card text-xs leading-5 text-foreground\"\n spellCheck={false}\n />\n </label>\n </section>\n );\n}\n\nfunction PipelineMetadataPanel(props: {\n graphStats:\n | {\n nodes: number;\n edges: number;\n agents: number;\n extractors: number;\n parallel: string;\n }\n | undefined;\n selectedNode: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n selectedNodeStatus: NodeStatus | undefined;\n}) {\n return (\n <section className=\"grid gap-5\">\n {props.graphStats === undefined ? null : (\n <div className=\"grid grid-cols-5 gap-2\">\n <Metric label=\"Nodes\" value={String(props.graphStats.nodes)} />\n <Metric label=\"Edges\" value={String(props.graphStats.edges)} />\n <Metric label=\"Agents\" value={String(props.graphStats.agents)} />\n <Metric label=\"Extractors\" value={String(props.graphStats.extractors)} />\n <Metric label=\"Parallel\" value={props.graphStats.parallel} />\n </div>\n )}\n <NodeInspector node={props.selectedNode} status={props.selectedNodeStatus} />\n </section>\n );\n}\n\nfunction PipelineRunsPanel(props: {\n runs: StudioPipelineRunRecord[];\n runOutput: string;\n runState: \"idle\" | \"running\";\n loading: boolean;\n onReplayRun: (runId: string) => void;\n}) {\n return (\n <section className=\"grid gap-3\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Runs\n </div>\n <p className=\"m-0 mt-1 text-xs leading-5 text-muted-foreground\">\n Persisted pipeline executions.\n </p>\n </div>\n <Badge>{props.runState}</Badge>\n </div>\n {props.runOutput.length > 0 && props.runs.length === 0 ? (\n <PipelineRunOutputBlock title=\"Latest output\" output={props.runOutput} />\n ) : null}\n <div className=\"grid gap-2\">\n {props.loading && props.runs.length === 0 ? (\n <div className=\"grid gap-2 py-3\">\n <div className=\"h-4 w-32 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-56 max-w-full animate-pulse rounded-lg bg-muted\" />\n </div>\n ) : null}\n {!props.loading && props.runs.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No saved pipeline runs\"\n text=\"Run this pipeline to create its first persisted execution.\"\n />\n ) : null}\n {props.runs.map((run) => (\n <PipelineRunRow\n disabled={props.runState === \"running\"}\n run={run}\n key={run.runId}\n onReplayRun={props.onReplayRun}\n />\n ))}\n </div>\n </section>\n );\n}\n\nfunction PipelineRunRow(props: {\n run: StudioPipelineRunRecord;\n disabled: boolean;\n onReplayRun: (runId: string) => void;\n}) {\n const output = pipelineRunOutputText(props.run);\n return (\n <article className=\"rounded-none border border-hair bg-background px-4 py-4\">\n <div className=\"grid min-w-0 gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start\">\n <div className=\"min-w-0\">\n <div className=\"flex min-w-0 flex-wrap items-center gap-2\">\n <span\n className={[\n \"rounded-md border border-hair bg-card px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em]\",\n pipelineRunStatusClass(props.run.status),\n ].join(\" \")}\n >\n {props.run.status}\n </span>\n <span className=\"min-w-0 truncate text-xs font-semibold text-foreground\">\n {props.run.runId}\n </span>\n </div>\n <div className=\"mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <time>{formatLogTime(props.run.startedAt)}</time>\n {props.run.durationMs === undefined ? null : (\n <span className=\"tabular-nums\">{props.run.durationMs}ms</span>\n )}\n </div>\n </div>\n <Button\n className=\"h-8 gap-1.5 rounded-lg border border-hair bg-muted px-2.5 text-xs font-semibold text-foreground shadow-none hover:border-foreground hover:bg-transparent hover:text-foreground [&_svg]:!size-3\"\n disabled={props.disabled || props.run.status === \"running\"}\n onClick={() => props.onReplayRun(props.run.runId)}\n title=\"Rerun this pipeline with its saved input\"\n variant=\"ghost\"\n >\n <StudioIcon icon={ArrowClockwise} aria-hidden=\"true\" />\n Rerun\n </Button>\n </div>\n <PipelineRunOutputBlock title=\"Output\" output={output} />\n </article>\n );\n}\n\nfunction PipelineRunOutputBlock(props: { title: string; output: string }) {\n return (\n <div className=\"mt-4 border-t border-hair pt-3\">\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\" text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n {props.title}\n </span>\n <span className=\" text-xs font-medium tabular-nums text-muted-foreground\">\n {props.output.length} chars\n </span>\n </div>\n <pre className=\"mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-card p-3 text-sm leading-6 text-foreground\">\n {props.output.length > 0 ? <PipelineOutputText text={props.output} /> : \"No output saved.\"}\n </pre>\n </div>\n );\n}\n\nfunction pipelineRunOutputText(run: StudioPipelineRunRecord): string {\n if (run.output !== undefined) {\n return typeof run.output === \"string\" ? run.output : JSON.stringify(run.output, null, 2);\n }\n if (run.error !== undefined) {\n return JSON.stringify(run.error, null, 2);\n }\n return \"\";\n}\n\nfunction PipelineOutputText(props: { text: string }) {\n return isStructuredOutput(props.text) ? <JsonSyntax text={props.text} /> : props.text;\n}\n\nfunction isStructuredOutput(text: string): boolean {\n const trimmed = text.trim();\n return (\n (trimmed.startsWith(\"{\") && trimmed.endsWith(\"}\")) ||\n (trimmed.startsWith(\"[\") && trimmed.endsWith(\"]\"))\n );\n}\n\nfunction pipelineRunStatusClass(status: StudioPipelineRunRecord[\"status\"]): string {\n switch (status) {\n case \"success\":\n return \"text-foreground\";\n case \"error\":\n return \"text-destructive\";\n case \"running\":\n return \"text-muted-foreground\";\n }\n}\n\nfunction NodeInspector(props: {\n node: NonNullable<StudioPipelineDetail[\"graph\"][\"nodes\"][number]> | undefined;\n status: NodeStatus | undefined;\n}) {\n if (props.node === undefined) {\n return (\n <section className=\"text-sm font-medium text-muted-foreground\">\n Select a node for details.\n </section>\n );\n }\n\n const metadata = Object.entries(props.node.metadata ?? {});\n return (\n <section className=\"grid content-start gap-5\">\n <div>\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Selected node\n </div>\n <h2 className=\"m-0 mt-2 text-lg font-semibold tracking-tight text-foreground\">\n {props.node.label}\n </h2>\n <div className=\"mt-2 flex flex-wrap gap-1.5\">\n <Badge>{props.node.kind}</Badge>\n {props.status === undefined ? null : <Badge>{props.status}</Badge>}\n {props.node.branchKey === undefined ? null : <Badge>{props.node.branchKey}</Badge>}\n </div>\n </div>\n {props.node.description === undefined ? null : (\n <p className=\"m-0 rounded-lg bg-muted px-3 py-2 text-sm leading-6 text-muted-foreground\">\n {props.node.description}\n </p>\n )}\n <DetailList\n items={[\n [\"ID\", props.node.id],\n [\"Agent\", props.node.agentId],\n [\"Pipeline\", props.node.pipelineId],\n ]}\n />\n {metadata.length > 0 ? (\n <div className=\"grid gap-2\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Metadata\n </div>\n <div className=\"grid gap-1\">\n {metadata.map(([key, value]) => (\n <div className=\"grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs\" key={key}>\n <span className=\"truncate text-muted-foreground\">{key}</span>\n <span className=\"truncate font-medium text-foreground\">\n {formatMetadataValue(value)}\n </span>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </section>\n );\n}\n\nfunction PipelineLogsSection(props: {\n logs: StudioPipelineLogEntry[];\n selectedPipelineId: string;\n loading: boolean;\n}) {\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const stickToBottomRef = useRef(true);\n\n useEffect(() => {\n const node = scrollerRef.current;\n if (node === null || !stickToBottomRef.current) {\n return;\n }\n node.scrollTop = node.scrollHeight;\n });\n\n function updateStickiness() {\n const node = scrollerRef.current;\n if (node === null) {\n return;\n }\n stickToBottomRef.current = node.scrollHeight - node.scrollTop - node.clientHeight < 24;\n }\n\n return (\n <section className=\"grid min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <div className=\" text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Pipeline logs\n </div>\n <div className=\"mt-1 truncate text-xs font-medium text-muted-foreground\">\n {props.selectedPipelineId.length === 0\n ? \"No active pipeline\"\n : props.selectedPipelineId}\n </div>\n </div>\n <span className=\" text-xs font-semibold tabular-nums text-muted-foreground\">\n {props.logs.length}\n </span>\n </div>\n <div\n className=\"min-h-0 overflow-auto border-t bg-background p-2\"\n ref={scrollerRef}\n onScroll={updateStickiness}\n >\n {props.selectedPipelineId.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No pipeline selected\"\n text=\"Choose a pipeline to view its runtime logs.\"\n />\n ) : null}\n {props.selectedPipelineId.length > 0 && props.loading && props.logs.length === 0 ? (\n <div className=\"grid gap-2 py-4\">\n <div className=\"h-4 w-32 animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-64 max-w-full animate-pulse rounded-lg bg-muted\" />\n <div className=\"h-4 w-52 max-w-full animate-pulse rounded-lg bg-muted\" />\n </div>\n ) : null}\n {props.selectedPipelineId.length > 0 && !props.loading && props.logs.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"No logs yet\"\n text=\"Run the pipeline to populate this console.\"\n />\n ) : null}\n {props.logs.map((log) => (\n <PipelineLogRow log={log} key={log.id} />\n ))}\n </div>\n </section>\n );\n}\n\nfunction PipelineLogRow(props: { log: StudioPipelineLogEntry }) {\n const metadataText = formatLogMetadataText(props.log.metadata, 4);\n const line = [\n formatLogTime(props.log.timestamp),\n props.log.level.toUpperCase().padEnd(5, \" \"),\n props.log.message,\n `${props.log.category}/${props.log.event}`,\n metadataText,\n ]\n .filter((item) => item.trim().length > 0)\n .join(\" \");\n return (\n <article\n className={[\n \"min-w-full rounded-lg px-3 py-1.5 text-xs leading-5 transition duration-200 hover:bg-transparent hover:text-foreground\",\n ].join(\" \")}\n title={line}\n >\n <div className=\"flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1\">\n <time className=\"shrink-0 text-muted-foreground\">{formatLogTime(props.log.timestamp)}</time>\n <span className={[\"shrink-0 font-semibold\", logLevelTextClass(props.log.level)].join(\" \")}>\n {props.log.level.toUpperCase().padEnd(5, \" \")}\n </span>\n <span className=\"min-w-0 break-words font-medium text-foreground\">{props.log.message}</span>\n </div>\n <div className=\"mt-1 min-w-0 break-words text-muted-foreground\">\n {props.log.category}/{props.log.event}\n </div>\n <LogMetadata metadata={props.log.metadata} limit={4} />\n </article>\n );\n}\n\nfunction DetailList(props: { items: Array<[string, string | undefined]> }) {\n const items = props.items.filter(([, value]) => value !== undefined && value.length > 0);\n if (items.length === 0) {\n return null;\n }\n return (\n <div className=\"grid gap-2 rounded-none bg-background p-3\">\n {items.map(([label, value]) => (\n <div className=\"grid grid-cols-[82px_minmax(0,1fr)] gap-2 text-xs\" key={label}>\n <span className=\"truncate text-muted-foreground\">{label}</span>\n <span className=\"truncate font-medium text-foreground\">{value}</span>\n </div>\n ))}\n </div>\n );\n}\n\nfunction Badge(props: { children: string }) {\n return (\n <span className=\"rounded-lg border border-hair bg-background px-2 py-1 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground\">\n {props.children}\n </span>\n );\n}\n\nfunction formatLogTime(value: string): string {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return \"\";\n }\n return date.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n });\n}\n\nfunction formatMetadataValue(value: unknown): string {\n if (value === null) {\n return \"null\";\n }\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (Array.isArray(value)) {\n return `[${value.length}]`;\n }\n if (typeof value === \"object\" && value !== null) {\n return \"{...}\";\n }\n return \"\";\n}\n\nfunction logLevelTextClass(level: StudioPipelineLogEntry[\"level\"]): string {\n switch (level) {\n case \"error\":\n return \"text-destructive\";\n case \"warn\":\n return \"text-muted-foreground\";\n case \"debug\":\n return \"text-muted-foreground\";\n case \"info\":\n return \"text-foreground\";\n }\n}\n"],"x_google_ignoreList":[0,1],"mappings":"wgBACMA,GAAoB,IAAI,IAAI,CAChC,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,oJAAqJ,CAAC,CAAC,CACxP,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAClE,OACA,CACE,EAAG,yHACH,QAAS,KACX,CACF,EAAmB,EAAE,cAAc,OAAQ,CAAE,EAAG,mMAAoM,CAAC,CAAC,CACxP,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,gMAAiM,CAAC,CAAC,CACpS,EACA,CACE,QACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,mVAAoV,CAAC,CAAC,CACvb,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,mMAAoM,CAAC,CAAC,CACvS,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,6UAA8U,CAAC,CAAC,CACjb,CACF,CAAC,EC7BK,EAAA,EAAM,YAAY,EAAG,IAAsB,EAAE,cAAcC,EAAG,CAAE,IAAK,EAAG,GAAG,EAAG,QAASC,EAAE,CAAC,CAAC,EACjG,EAAE,YAAc,WAChB,IAAM,GAAI,QCKV,SAAgB,EAAY,EAGzB,CACD,IAAM,EAAQ,EAAoB,EAAM,SAAU,EAAM,KAAK,EACvD,EAAuB,EAAsB,EAAM,QAAQ,EAIjE,OAHI,EAAM,SAAW,GAAK,CAAC,EAClB,MAGP,EA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