@swestash/agent-lens 0.17.1 → 0.17.3
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.
- package/dist/agent-lens.js +229 -100
- package/dist/agent-lens.js.map +1 -1
- package/package.json +1 -1
- package/web/404.html +2 -2
- package/web/assets/{AboutView-Crn85usU.js → AboutView-CUWj_rU_.js} +1 -1
- package/web/assets/{Dashboard-CH8nv5ZK.js → Dashboard-DNignR_W.js} +1 -1
- package/web/assets/{FileView-CtovgU1g.js → FileView-B7B7lrWB.js} +1 -1
- package/web/assets/{FilesView-38qLTWbj.js → FilesView-BxaV2-YJ.js} +1 -1
- package/web/assets/{SecurityView-CmKLXZP9.js → SecurityView-BkWmmke4.js} +1 -1
- package/web/assets/{SessionView-Bt-NmoU3.js → SessionView-DdxaD2e2.js} +2 -2
- package/web/assets/{SkillView-DQEklf89.js → SkillView-CxQL_Y9l.js} +1 -1
- package/web/assets/{SkillsView-CNX1nAkf.js → SkillsView-CFPNRSKa.js} +1 -1
- package/web/assets/{WorkflowView-CtFEKBzS.js → WorkflowView-C0qUousN.js} +1 -1
- package/web/assets/index-7p3QjWYa.css +1 -0
- package/web/assets/{index-DYCDqLKI.js → index-C47tPE_R.js} +2 -2
- package/web/assets/{index-C5nCASCF.js → index-CCufgBAx.js} +1 -1
- package/web/assets/{jsonish-iCEt12Ty.js → jsonish-BNBt84Kn.js} +1 -1
- package/web/assets/{theme-DzMGF9VA.js → theme-DdWxlWl0.js} +1 -1
- package/web/assets/{useResetOn-Bvmnyxvw.js → useResetOn-MIt0o_vE.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-DN9qB28e.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,r as C,y as B,p as G,D as K,L as T,s as L,f as W,a as q,b as Y,w as z}from"./index-DYCDqLKI.js";import{s as E,d as v,l as M,a as H,C as V,p as S,A as Q}from"./jsonish-iCEt12Ty.js";import{M as F,r as J}from"./index-C5nCASCF.js";const N=e=>e===null||typeof e!="object",R=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function A({v:e}){if(e==null)return s.jsx("span",{className:"json-null",children:"—"});const r=typeof e;return r==="boolean"?s.jsx("span",{className:e?"rv-true":"rv-false",children:e?"✓ true":"✗ false"}):r==="number"?s.jsx("span",{className:"json-number",children:String(e)}):s.jsx("span",{className:"rv-str",children:String(e)})}function P({v:e}){return N(e)?s.jsx(A,{v:e}):Array.isArray(e)?e.every(N)?s.jsx("span",{className:"rv-str",children:e.map(String).join(", ")||"—"}):s.jsxs("span",{className:"muted",children:["[",e.length,"]"]}):s.jsx("span",{className:"muted",children:`{${Object.keys(e).length}}`})}function D(e){const r=[],a=new Set;for(const l of e)for(const n of Object.keys(l??{}))a.has(n)||(a.add(n),r.push(n));return r}function U({rows:e}){const r=D(e);return s.jsx("div",{className:"rv-table-wrap",children:s.jsxs("table",{className:"rv-table",children:[s.jsx("thead",{children:s.jsx("tr",{children:r.map(a=>s.jsx("th",{children:a},a))})}),s.jsx("tbody",{children:e.map((a,l)=>s.jsx("tr",{children:r.map(n=>s.jsx("td",{children:s.jsx(P,{v:a[n]})},n))},l))})]})})}function X({obj:e}){const r=Object.entries(e),a=D(r.map(([,l])=>l));return s.jsx("div",{className:"rv-table-wrap",children:s.jsxs("table",{className:"rv-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"key"}),a.map(l=>s.jsx("th",{children:l},l))]})}),s.jsx("tbody",{children:r.map(([l,n])=>s.jsxs("tr",{children:[s.jsx("td",{className:"rv-rowkey",children:l}),a.map(t=>s.jsx("td",{children:s.jsx(P,{v:n[t]})},t))]},l))})]})})}function Z({name:e,value:r,depth:a}){const[l,n]=C.useState(a<1),t=Array.isArray(r)?`[${r.length}]`:`{${Object.keys(r).length}}`;return s.jsxs("div",{className:"rv-section",children:[s.jsxs("button",{className:"rv-sec-head","aria-expanded":l,onClick:()=>n(i=>!i),children:[s.jsx("span",{className:"json-chev","aria-hidden":"true",children:l?"▾":"▸"}),s.jsx("span",{className:"rv-sec-name",children:e}),s.jsx("span",{className:"muted small",children:t})]}),l&&s.jsx("div",{className:"rv-sec-body",children:s.jsx(I,{value:r,depth:a+1})})]})}function I({value:e,depth:r=0}){if(N(e))return s.jsx(A,{v:e});if(Array.isArray(e))return e.length===0?s.jsx("span",{className:"muted",children:"empty"}):e.every(R)?s.jsx(U,{rows:e}):s.jsx("ul",{className:"rv-list",children:e.map((t,i)=>s.jsx("li",{children:s.jsx(P,{v:t})},i))});const a=Object.entries(e);if(a.length===0)return s.jsx("span",{className:"muted",children:"empty"});if(a.every(([,t])=>R(t)))return s.jsx(X,{obj:e});const l=a.filter(([,t])=>N(t)),n=a.filter(([,t])=>!N(t));return s.jsxs("div",{className:"rv-obj",children:[l.length>0&&s.jsx("div",{className:"rv-metrics",children:l.map(([t,i])=>s.jsxs("div",{className:"rv-metric",children:[s.jsx("span",{className:"rv-mkey",children:t}),s.jsx("span",{className:"rv-mval",children:s.jsx(A,{v:i})})]},t))}),n.map(([t,i])=>s.jsx(Z,{name:t,value:i,depth:r},t))]})}function k({value:e}){return s.jsx("div",{className:"rv-root",children:s.jsx(I,{value:e,depth:0})})}const f=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),_=e=>e===null||typeof e!="object",ss=new Set(["script","scriptPath","description"]),es=["skill","name","id","title"];function as({v:e}){return e==null?s.jsx("span",{className:"muted",children:"—"}):typeof e=="string"?s.jsx("span",{className:"launch-text",children:e}):_(e)?s.jsx("span",{className:"json-number",children:String(e)}):Array.isArray(e)?e.every(_)?s.jsx("ol",{className:"launch-list",children:e.map((r,a)=>s.jsx("li",{children:r===null?"—":String(r)},a))}):s.jsx(k,{value:e}):s.jsx(k,{value:e})}function ns({rec:e,index:r}){const a=es.find(t=>typeof e[t]=="string"),l=a?String(e[a]):`task ${r+1}`,n=Object.entries(e).filter(([t])=>t!==a);return s.jsxs("div",{className:"launch-card",children:[s.jsxs("div",{className:"launch-card-head",children:[s.jsx("span",{className:"launch-card-idx",children:r+1}),s.jsx("span",{className:"launch-card-title",children:l})]}),s.jsx("dl",{className:"launch-fields",children:n.map(([t,i])=>s.jsxs("div",{className:"launch-field",children:[s.jsx("dt",{children:t}),s.jsx("dd",{children:s.jsx(as,{v:i})})]},t))})]})}function $({raw:e}){const[r,a]=C.useState(!1),{body:l,note:n}=E(v(e)),{value:t,repaired:i}=M(l);if(t===void 0)return s.jsx("div",{className:"launch",children:s.jsx("pre",{className:"code",children:e})});const d=H(t),x=f(d)?Object.entries(d):[["",d]],y=x.filter(([o,c])=>_(c)&&o!=="script"),g=x.filter(([,o])=>!_(o)),h=f(d)&&typeof d.script=="string"?d.script:null,u=f(d)&&typeof d.scriptPath=="string"?d.scriptPath:null,m=f(d)&&typeof d.description=="string"?d.description:null,p=y.filter(([o])=>!ss.has(o)),w=m||u||h||p.length>0,b=o=>Array.isArray(o)&&o.length>0&&o.every(f);return s.jsxs("div",{className:"launch",children:[w&&s.jsxs("div",{className:"launch-meta",children:[m&&s.jsx("div",{className:"launch-desc",children:m}),u&&s.jsxs("div",{className:"launch-metaline",children:[s.jsx("span",{className:"muted",children:"script"})," ",s.jsx("code",{children:u})]}),p.map(([o,c])=>s.jsxs("div",{className:"launch-metaline",children:[s.jsx("span",{className:"muted",children:o})," ",s.jsx("code",{children:String(c)})]},o)),h&&s.jsxs("details",{className:"launch-src",children:[s.jsxs("summary",{children:["script source · ",h.length.toLocaleString()," chars"]}),s.jsx("pre",{className:"code",children:h})]})]}),g.map(([o,c])=>b(c)?s.jsxs("div",{className:"launch-tasks",children:[s.jsxs("div",{className:"launch-tasks-head",children:[c.length," ",o||(c.length===1?"task":"tasks")," ",s.jsx("span",{className:"muted",children:"launched"})]}),c.map((j,O)=>s.jsx(ns,{rec:j,index:O},O))]},o||"tasks"):s.jsxs("div",{className:"launch-section",children:[o&&s.jsx("div",{className:"launch-tasks-head",children:o}),s.jsx(k,{value:c})]},o||"value")),(n||i)&&s.jsxs("div",{className:"muted small wf-trunc",children:["⚠ ",n??"Payload was truncated; showing the recoverable portion."]}),s.jsxs("div",{className:"launch-actions",children:[s.jsx("button",{type:"button",className:"ghost small","aria-expanded":r,onClick:()=>a(o=>!o),children:r?"Hide raw JSON ▴":"View raw JSON ▾"}),s.jsx(V,{text:S(l),label:"JSON",title:"Copy raw launch JSON"})]}),r&&s.jsx("pre",{className:"code launch-raw",children:S(l)})]})}function ts({raw:e}){const{body:r,note:a}=E(v(e)),l=/^\s*[[{]/.test(r),{value:n,repaired:t}=l?M(r):{value:void 0,repaired:!1},i=n!==void 0;return s.jsxs(s.Fragment,{children:[i?s.jsx("div",{className:"wf-result-body",children:s.jsx(k,{value:n})}):s.jsx("div",{className:"text md wf-result-body",children:s.jsx(F,{remarkPlugins:[J],children:r})}),(a||t)&&s.jsxs("div",{className:"muted small wf-trunc",children:["⚠ ",a??"Result was truncated; showing the recoverable portion."]}),s.jsx("div",{className:"launch-actions",children:s.jsx(V,{text:i?S(r):r,label:"result",title:"Copy the returned result"})})]})}function rs(e,r){if(e&&e.length){const a=new Map,l=(n,t)=>{let i=a.get(n);return i?t&&(i.title=t):(i={title:t||`Phase ${n}`,agentCount:0,models:[]},a.set(n,i)),i};for(const n of e)n.type==="workflow_phase"&&l(n.index,n.title);for(const n of e)if(n.type==="workflow_agent"&&n.phaseIndex!=null){const t=l(n.phaseIndex,n.phaseTitle);t.agentCount++,n.model&&!t.models.includes(n.model)&&t.models.push(n.model)}if(a.size)return[...a.keys()].sort((n,t)=>n-t).map(n=>a.get(n))}return r.map(a=>({title:a,agentCount:0,models:[]}))}function ds(){const{run_id:e}=B(),r=G("/workflows/"+e,{reset:!0});return s.jsx(K,{state:r,children:a=>s.jsx(ls,{d:a})})}function ls({d:e}){var x,y,g,h,u,m,p,w,b,o;const r=(e.status??"").toLowerCase(),a=((x=e.run)==null?void 0:x.agent_count)??e.stats.agent_count,l=((y=e.run)==null?void 0:y.total_tokens)??e.stats.total_tokens,n=((g=e.run)==null?void 0:g.duration_ms)??e.stats.duration_ms,t=(((h=e.run)==null?void 0:h.phases)??[]).map(c=>c==null?void 0:c.title).filter(c=>!!c),i=rs((u=e.run)==null?void 0:u.progress,t),d=((m=e.run)==null?void 0:m.logs)??[];return s.jsxs("div",{className:"detail",children:[s.jsxs("div",{className:"detail-head",children:[s.jsx(T,{to:"/",className:"back",children:"← all sessions"}),s.jsxs("h1",{children:["🔀 ",e.name||"workflow"]}),s.jsxs("div",{className:"detail-meta",children:[s.jsx("code",{children:e.run_id}),e.status&&s.jsx("span",{className:"tag task-status task-status-"+r,children:e.status}),((p=e.run)==null?void 0:p.default_model)&&s.jsx("span",{className:"tag",children:L(e.run.default_model)}),((w=e.parent)==null?void 0:w.id)&&s.jsxs("span",{className:"spawned-by",children:["↖ launched from"," ",s.jsx(T,{to:`/session/${e.parent.id}`,children:e.parent.title||e.parent.id.slice(0,12)}),e.parent.turn_seq!=null?` · turn ${e.parent.turn_seq+1}`:""]}),s.jsxs("span",{children:[a," agent",a===1?"":"s"]}),s.jsxs("span",{children:[W(l)," tok"]}),((b=e.run)==null?void 0:b.total_tool_calls)!=null&&s.jsxs("span",{children:[e.run.total_tool_calls," tool calls"]}),s.jsx("span",{"data-tip":"Estimated from ingested agent transcripts at API list prices (cache-aware)",children:q(e.stats.total_cost)}),s.jsx("span",{children:Y(n)}),s.jsx("span",{className:"muted",children:z(((o=e.run)==null?void 0:o.started_at)??e.stats.started_at)})]}),i.length>0&&s.jsx("div",{className:"wf-phases","aria-label":"workflow phases",children:i.map((c,j)=>s.jsxs(C.Fragment,{children:[j>0&&s.jsx("span",{className:"wf-phase-arrow","aria-hidden":"true",children:"→"}),s.jsxs("div",{className:"wf-phase-chip",children:[s.jsx("span",{className:"wf-phase-title",children:c.title}),c.agentCount>0&&s.jsxs("span",{className:"wf-phase-desc",children:[c.agentCount," agent",c.agentCount===1?"":"s",c.models.length?` · ${c.models.map(L).join(", ")}`:""]})]})]},j))})]}),e.completion&&s.jsxs("div",{className:"wf-result",children:[s.jsxs("h2",{children:["Returned result",e.completion.status&&s.jsx("span",{className:"tag task-status task-status-"+e.completion.status.toLowerCase(),children:e.completion.status})]}),e.completion.summary&&s.jsx("p",{className:"wf-result-summary",children:v(e.completion.summary)}),e.completion.result?s.jsx(ts,{raw:e.completion.result}):s.jsx("div",{className:"muted small",children:"Completed with no returned payload."}),e.completion.failures&&s.jsxs("details",{className:"wf-failures",children:[s.jsx("summary",{children:"failures"}),s.jsx("pre",{className:"code wf-result-body",children:v(e.completion.failures)})]})]}),d.length>0&&s.jsxs("details",{className:"wf-logs",open:d.length<=20,children:[s.jsxs("summary",{children:["Run log · ",d.length," line",d.length===1?"":"s"]}),s.jsx("ul",{className:"wf-log-list",children:d.map((c,j)=>s.jsx("li",{children:c},j))})]}),e.input_json?s.jsx("div",{className:"wf-result wf-launch",children:e.completion?s.jsxs("details",{children:[s.jsx("summary",{children:s.jsx("h2",{children:"Launch payload"})}),s.jsx($,{raw:e.input_json})]}):s.jsxs(s.Fragment,{children:[s.jsx("h2",{children:"Launch payload"}),r==="async_launched"&&s.jsx("p",{className:"wf-result-summary muted",children:"Launched asynchronously — results will appear here once the run reports back."}),s.jsx($,{raw:e.input_json})]})}):!e.completion&&e.result_summary?s.jsxs("div",{className:"wf-result",children:[s.jsx("h2",{children:"Workflow launch"}),s.jsx("div",{className:"text md",children:s.jsx(F,{remarkPlugins:[J],children:e.result_summary})})]}):null,s.jsxs("div",{className:"subagents",children:[s.jsxs("h2",{children:["Agents (",e.agents.length,")"]}),e.agents.length===0?s.jsx("div",{className:"muted pad",role:"status",children:"No agent transcripts ingested for this run yet."}):s.jsx("ul",{children:e.agents.map(c=>s.jsx(Q,{a:c},c.id))})]})]})}export{ds as default};
|
|
1
|
+
import{j as s,r as C,y as B,p as G,D as K,L as T,s as L,f as W,a as q,b as Y,w as z}from"./index-C47tPE_R.js";import{s as E,d as v,l as M,a as H,C as V,p as S,A as Q}from"./jsonish-BNBt84Kn.js";import{M as F,r as J}from"./index-CCufgBAx.js";const N=e=>e===null||typeof e!="object",R=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function A({v:e}){if(e==null)return s.jsx("span",{className:"json-null",children:"—"});const r=typeof e;return r==="boolean"?s.jsx("span",{className:e?"rv-true":"rv-false",children:e?"✓ true":"✗ false"}):r==="number"?s.jsx("span",{className:"json-number",children:String(e)}):s.jsx("span",{className:"rv-str",children:String(e)})}function P({v:e}){return N(e)?s.jsx(A,{v:e}):Array.isArray(e)?e.every(N)?s.jsx("span",{className:"rv-str",children:e.map(String).join(", ")||"—"}):s.jsxs("span",{className:"muted",children:["[",e.length,"]"]}):s.jsx("span",{className:"muted",children:`{${Object.keys(e).length}}`})}function D(e){const r=[],a=new Set;for(const l of e)for(const n of Object.keys(l??{}))a.has(n)||(a.add(n),r.push(n));return r}function U({rows:e}){const r=D(e);return s.jsx("div",{className:"rv-table-wrap",children:s.jsxs("table",{className:"rv-table",children:[s.jsx("thead",{children:s.jsx("tr",{children:r.map(a=>s.jsx("th",{children:a},a))})}),s.jsx("tbody",{children:e.map((a,l)=>s.jsx("tr",{children:r.map(n=>s.jsx("td",{children:s.jsx(P,{v:a[n]})},n))},l))})]})})}function X({obj:e}){const r=Object.entries(e),a=D(r.map(([,l])=>l));return s.jsx("div",{className:"rv-table-wrap",children:s.jsxs("table",{className:"rv-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"key"}),a.map(l=>s.jsx("th",{children:l},l))]})}),s.jsx("tbody",{children:r.map(([l,n])=>s.jsxs("tr",{children:[s.jsx("td",{className:"rv-rowkey",children:l}),a.map(t=>s.jsx("td",{children:s.jsx(P,{v:n[t]})},t))]},l))})]})})}function Z({name:e,value:r,depth:a}){const[l,n]=C.useState(a<1),t=Array.isArray(r)?`[${r.length}]`:`{${Object.keys(r).length}}`;return s.jsxs("div",{className:"rv-section",children:[s.jsxs("button",{className:"rv-sec-head","aria-expanded":l,onClick:()=>n(i=>!i),children:[s.jsx("span",{className:"json-chev","aria-hidden":"true",children:l?"▾":"▸"}),s.jsx("span",{className:"rv-sec-name",children:e}),s.jsx("span",{className:"muted small",children:t})]}),l&&s.jsx("div",{className:"rv-sec-body",children:s.jsx(I,{value:r,depth:a+1})})]})}function I({value:e,depth:r=0}){if(N(e))return s.jsx(A,{v:e});if(Array.isArray(e))return e.length===0?s.jsx("span",{className:"muted",children:"empty"}):e.every(R)?s.jsx(U,{rows:e}):s.jsx("ul",{className:"rv-list",children:e.map((t,i)=>s.jsx("li",{children:s.jsx(P,{v:t})},i))});const a=Object.entries(e);if(a.length===0)return s.jsx("span",{className:"muted",children:"empty"});if(a.every(([,t])=>R(t)))return s.jsx(X,{obj:e});const l=a.filter(([,t])=>N(t)),n=a.filter(([,t])=>!N(t));return s.jsxs("div",{className:"rv-obj",children:[l.length>0&&s.jsx("div",{className:"rv-metrics",children:l.map(([t,i])=>s.jsxs("div",{className:"rv-metric",children:[s.jsx("span",{className:"rv-mkey",children:t}),s.jsx("span",{className:"rv-mval",children:s.jsx(A,{v:i})})]},t))}),n.map(([t,i])=>s.jsx(Z,{name:t,value:i,depth:r},t))]})}function k({value:e}){return s.jsx("div",{className:"rv-root",children:s.jsx(I,{value:e,depth:0})})}const f=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),_=e=>e===null||typeof e!="object",ss=new Set(["script","scriptPath","description"]),es=["skill","name","id","title"];function as({v:e}){return e==null?s.jsx("span",{className:"muted",children:"—"}):typeof e=="string"?s.jsx("span",{className:"launch-text",children:e}):_(e)?s.jsx("span",{className:"json-number",children:String(e)}):Array.isArray(e)?e.every(_)?s.jsx("ol",{className:"launch-list",children:e.map((r,a)=>s.jsx("li",{children:r===null?"—":String(r)},a))}):s.jsx(k,{value:e}):s.jsx(k,{value:e})}function ns({rec:e,index:r}){const a=es.find(t=>typeof e[t]=="string"),l=a?String(e[a]):`task ${r+1}`,n=Object.entries(e).filter(([t])=>t!==a);return s.jsxs("div",{className:"launch-card",children:[s.jsxs("div",{className:"launch-card-head",children:[s.jsx("span",{className:"launch-card-idx",children:r+1}),s.jsx("span",{className:"launch-card-title",children:l})]}),s.jsx("dl",{className:"launch-fields",children:n.map(([t,i])=>s.jsxs("div",{className:"launch-field",children:[s.jsx("dt",{children:t}),s.jsx("dd",{children:s.jsx(as,{v:i})})]},t))})]})}function $({raw:e}){const[r,a]=C.useState(!1),{body:l,note:n}=E(v(e)),{value:t,repaired:i}=M(l);if(t===void 0)return s.jsx("div",{className:"launch",children:s.jsx("pre",{className:"code",children:e})});const d=H(t),x=f(d)?Object.entries(d):[["",d]],y=x.filter(([o,c])=>_(c)&&o!=="script"),g=x.filter(([,o])=>!_(o)),h=f(d)&&typeof d.script=="string"?d.script:null,u=f(d)&&typeof d.scriptPath=="string"?d.scriptPath:null,m=f(d)&&typeof d.description=="string"?d.description:null,p=y.filter(([o])=>!ss.has(o)),w=m||u||h||p.length>0,b=o=>Array.isArray(o)&&o.length>0&&o.every(f);return s.jsxs("div",{className:"launch",children:[w&&s.jsxs("div",{className:"launch-meta",children:[m&&s.jsx("div",{className:"launch-desc",children:m}),u&&s.jsxs("div",{className:"launch-metaline",children:[s.jsx("span",{className:"muted",children:"script"})," ",s.jsx("code",{children:u})]}),p.map(([o,c])=>s.jsxs("div",{className:"launch-metaline",children:[s.jsx("span",{className:"muted",children:o})," ",s.jsx("code",{children:String(c)})]},o)),h&&s.jsxs("details",{className:"launch-src",children:[s.jsxs("summary",{children:["script source · ",h.length.toLocaleString()," chars"]}),s.jsx("pre",{className:"code",children:h})]})]}),g.map(([o,c])=>b(c)?s.jsxs("div",{className:"launch-tasks",children:[s.jsxs("div",{className:"launch-tasks-head",children:[c.length," ",o||(c.length===1?"task":"tasks")," ",s.jsx("span",{className:"muted",children:"launched"})]}),c.map((j,O)=>s.jsx(ns,{rec:j,index:O},O))]},o||"tasks"):s.jsxs("div",{className:"launch-section",children:[o&&s.jsx("div",{className:"launch-tasks-head",children:o}),s.jsx(k,{value:c})]},o||"value")),(n||i)&&s.jsxs("div",{className:"muted small wf-trunc",children:["⚠ ",n??"Payload was truncated; showing the recoverable portion."]}),s.jsxs("div",{className:"launch-actions",children:[s.jsx("button",{type:"button",className:"ghost small","aria-expanded":r,onClick:()=>a(o=>!o),children:r?"Hide raw JSON ▴":"View raw JSON ▾"}),s.jsx(V,{text:S(l),label:"JSON",title:"Copy raw launch JSON"})]}),r&&s.jsx("pre",{className:"code launch-raw",children:S(l)})]})}function ts({raw:e}){const{body:r,note:a}=E(v(e)),l=/^\s*[[{]/.test(r),{value:n,repaired:t}=l?M(r):{value:void 0,repaired:!1},i=n!==void 0;return s.jsxs(s.Fragment,{children:[i?s.jsx("div",{className:"wf-result-body",children:s.jsx(k,{value:n})}):s.jsx("div",{className:"text md wf-result-body",children:s.jsx(F,{remarkPlugins:[J],children:r})}),(a||t)&&s.jsxs("div",{className:"muted small wf-trunc",children:["⚠ ",a??"Result was truncated; showing the recoverable portion."]}),s.jsx("div",{className:"launch-actions",children:s.jsx(V,{text:i?S(r):r,label:"result",title:"Copy the returned result"})})]})}function rs(e,r){if(e&&e.length){const a=new Map,l=(n,t)=>{let i=a.get(n);return i?t&&(i.title=t):(i={title:t||`Phase ${n}`,agentCount:0,models:[]},a.set(n,i)),i};for(const n of e)n.type==="workflow_phase"&&l(n.index,n.title);for(const n of e)if(n.type==="workflow_agent"&&n.phaseIndex!=null){const t=l(n.phaseIndex,n.phaseTitle);t.agentCount++,n.model&&!t.models.includes(n.model)&&t.models.push(n.model)}if(a.size)return[...a.keys()].sort((n,t)=>n-t).map(n=>a.get(n))}return r.map(a=>({title:a,agentCount:0,models:[]}))}function ds(){const{run_id:e}=B(),r=G("/workflows/"+e,{reset:!0});return s.jsx(K,{state:r,children:a=>s.jsx(ls,{d:a})})}function ls({d:e}){var x,y,g,h,u,m,p,w,b,o;const r=(e.status??"").toLowerCase(),a=((x=e.run)==null?void 0:x.agent_count)??e.stats.agent_count,l=((y=e.run)==null?void 0:y.total_tokens)??e.stats.total_tokens,n=((g=e.run)==null?void 0:g.duration_ms)??e.stats.duration_ms,t=(((h=e.run)==null?void 0:h.phases)??[]).map(c=>c==null?void 0:c.title).filter(c=>!!c),i=rs((u=e.run)==null?void 0:u.progress,t),d=((m=e.run)==null?void 0:m.logs)??[];return s.jsxs("div",{className:"detail",children:[s.jsxs("div",{className:"detail-head",children:[s.jsx(T,{to:"/",className:"back",children:"← all sessions"}),s.jsxs("h1",{children:["🔀 ",e.name||"workflow"]}),s.jsxs("div",{className:"detail-meta",children:[s.jsx("code",{children:e.run_id}),e.status&&s.jsx("span",{className:"tag task-status task-status-"+r,children:e.status}),((p=e.run)==null?void 0:p.default_model)&&s.jsx("span",{className:"tag",children:L(e.run.default_model)}),((w=e.parent)==null?void 0:w.id)&&s.jsxs("span",{className:"spawned-by",children:["↖ launched from"," ",s.jsx(T,{to:`/session/${e.parent.id}`,children:e.parent.title||e.parent.id.slice(0,12)}),e.parent.turn_seq!=null?` · turn ${e.parent.turn_seq+1}`:""]}),s.jsxs("span",{children:[a," agent",a===1?"":"s"]}),s.jsxs("span",{children:[W(l)," tok"]}),((b=e.run)==null?void 0:b.total_tool_calls)!=null&&s.jsxs("span",{children:[e.run.total_tool_calls," tool calls"]}),s.jsx("span",{"data-tip":"Estimated from ingested agent transcripts at API list prices (cache-aware)",children:q(e.stats.total_cost)}),s.jsx("span",{children:Y(n)}),s.jsx("span",{className:"muted",children:z(((o=e.run)==null?void 0:o.started_at)??e.stats.started_at)})]}),i.length>0&&s.jsx("div",{className:"wf-phases","aria-label":"workflow phases",children:i.map((c,j)=>s.jsxs(C.Fragment,{children:[j>0&&s.jsx("span",{className:"wf-phase-arrow","aria-hidden":"true",children:"→"}),s.jsxs("div",{className:"wf-phase-chip",children:[s.jsx("span",{className:"wf-phase-title",children:c.title}),c.agentCount>0&&s.jsxs("span",{className:"wf-phase-desc",children:[c.agentCount," agent",c.agentCount===1?"":"s",c.models.length?` · ${c.models.map(L).join(", ")}`:""]})]})]},j))})]}),e.completion&&s.jsxs("div",{className:"wf-result",children:[s.jsxs("h2",{children:["Returned result",e.completion.status&&s.jsx("span",{className:"tag task-status task-status-"+e.completion.status.toLowerCase(),children:e.completion.status})]}),e.completion.summary&&s.jsx("p",{className:"wf-result-summary",children:v(e.completion.summary)}),e.completion.result?s.jsx(ts,{raw:e.completion.result}):s.jsx("div",{className:"muted small",children:"Completed with no returned payload."}),e.completion.failures&&s.jsxs("details",{className:"wf-failures",children:[s.jsx("summary",{children:"failures"}),s.jsx("pre",{className:"code wf-result-body",children:v(e.completion.failures)})]})]}),d.length>0&&s.jsxs("details",{className:"wf-logs",open:d.length<=20,children:[s.jsxs("summary",{children:["Run log · ",d.length," line",d.length===1?"":"s"]}),s.jsx("ul",{className:"wf-log-list",children:d.map((c,j)=>s.jsx("li",{children:c},j))})]}),e.input_json?s.jsx("div",{className:"wf-result wf-launch",children:e.completion?s.jsxs("details",{children:[s.jsx("summary",{children:s.jsx("h2",{children:"Launch payload"})}),s.jsx($,{raw:e.input_json})]}):s.jsxs(s.Fragment,{children:[s.jsx("h2",{children:"Launch payload"}),r==="async_launched"&&s.jsx("p",{className:"wf-result-summary muted",children:"Launched asynchronously — results will appear here once the run reports back."}),s.jsx($,{raw:e.input_json})]})}):!e.completion&&e.result_summary?s.jsxs("div",{className:"wf-result",children:[s.jsx("h2",{children:"Workflow launch"}),s.jsx("div",{className:"text md",children:s.jsx(F,{remarkPlugins:[J],children:e.result_summary})})]}):null,s.jsxs("div",{className:"subagents",children:[s.jsxs("h2",{children:["Agents (",e.agents.length,")"]}),e.agents.length===0?s.jsx("div",{className:"muted pad",role:"status",children:"No agent transcripts ingested for this run yet."}):s.jsx("ul",{children:e.agents.map(c=>s.jsx(Q,{a:c},c.id))})]})]})}export{ds as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bg: #0f1115;--panel: #171a21;--panel2: #1e222b;--border: #2a2f3a;--text: #e6e8ec;--muted: #8b93a3;--accent: #6ea8fe;--user: #7ee0a0;--assistant: #6ea8fe;--tag: #2a2f3a;--err: #ff6b6b;--ok: #7ee0a0;--gold: #e0b85a;--violet: #b98cff;--teal: #4fd1c5;--tl-user: #3fa270;--tl-assistant: #058dfa;--tl-thinking: #b343ad;--tl-tool: #a86819;--burn-1: #48515b;--burn-2: #536478;--burn-3: #5d7896;--burn-4: #688cb6;--burn-5: #72a1d6;--burn-6: #7cb6f7;--burn-7: #96ccff;--code-bg: var(--bg)}:root[data-theme=light]{--bg: #ffffff;--panel: #f6f7f9;--panel2: #eceef2;--border: #d5d9e0;--text: #1b1f27;--muted: #5b6472;--accent: #2563eb;--user: #0f9d58;--assistant: #2563eb;--tag: #e4e7ec;--err: #d32f2f;--ok: #15803d;--gold: #b7791f;--violet: #7c3aed;--teal: #0d9488;--tl-user: #226929;--tl-assistant: #2649c0;--tl-thinking: #8d1a89;--tl-tool: #a1790c;--burn-1: #a4aeb9;--burn-2: #859ab3;--burn-3: #6787ac;--burn-4: #4874a4;--burn-5: #26609c;--burn-6: #004c93;--burn-7: #003979;--code-bg: #eef1f5}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer}button:hover:not(:disabled){border-color:var(--accent)}button:disabled{opacity:.4;cursor:default}button.ghost{background:transparent}select,input{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 10px}input:focus,select:focus{border-color:var(--accent)}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;left:8px;top:-40px;z-index:10;background:var(--panel2);border:1px solid var(--accent);border-radius:6px;padding:6px 12px;transition:top .15s ease}.skip-link:focus{top:8px;text-decoration:none}.topbar{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--panel);position:sticky;top:0;z-index:5}.brand{font-weight:700;font-size:16px;color:var(--text);display:inline-flex;align-items:center;gap:8px}.brand-logo{height:22px;width:auto;display:block}.tagline{color:var(--muted);font-size:12px}.version-badge{color:var(--muted);font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;padding:2px 6px;border:1px solid var(--border);border-radius:10px;margin-left:-4px;white-space:nowrap}a.version-badge:hover{color:var(--text);border-color:var(--muted)}.topbar-actions{margin-left:auto;display:inline-flex;align-items:center;gap:8px}.theme-toggle{font-size:15px;line-height:1;padding:5px 9px}.refresh-btn{font-size:13px;line-height:1;padding:5px 10px;display:inline-flex;align-items:center;gap:4px}.refresh-btn[disabled]{opacity:.65;cursor:default}.refresh-icon{display:inline-block}.refresh-icon.spinning{animation:agentlens-spin .8s linear infinite}@keyframes agentlens-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.refresh-icon.spinning{animation:none}}.content{max-width:1100px;margin:0 auto;padding:20px}.content.wide{max-width:min(1600px,94vw)}.filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}.col-th{width:1%;white-space:nowrap;text-align:right}.col-td{width:1%}.col-customizer{position:relative;display:inline-block}.col-customizer>summary{cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none;padding:2px 6px;border-radius:6px;color:var(--muted);font-size:15px;line-height:1}.col-customizer>summary:hover{background:var(--panel2);color:var(--text)}.col-customizer[open]>summary{background:var(--panel2);color:var(--text)}.col-customizer>summary::-webkit-details-marker{display:none}.col-menu{position:absolute;z-index:20;top:calc(100% + 4px);right:0;background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:8px;min-width:150px;box-shadow:0 6px 20px #00000047}.col-menu label{display:flex;align-items:center;gap:8px;padding:4px 6px;font-size:13px;white-space:nowrap;cursor:pointer}.col-menu .ms-clear{margin-top:6px}.multi-select{position:relative}.multi-select>summary{cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none;padding:7px 10px;border:1px solid var(--border);border-radius:6px;background:var(--panel2);font-size:14px}.multi-select>summary::-webkit-details-marker{display:none}.multi-select[open]>summary{border-color:var(--accent)}.multi-select>.col-menu{left:0;right:auto}.search{display:flex;gap:6px;flex:1;min-width:280px}.search input{flex:1;min-width:0}.search button{flex:none}.filters>select,.filters .search input,.filters .search button,.filters .filter-select-btn,.filters .multi-select>summary{height:36px;box-sizing:border-box;font-size:13px;font-family:inherit}.filters .filter-select-btn,.filters .multi-select>summary{display:inline-flex;align-items:center;padding:0 10px}.muted{color:var(--muted)}.pad{padding:24px 0}.error{color:var(--err);padding:12px;border:1px solid var(--err);border-radius:6px;margin-bottom:12px}table.sessions{width:100%;border-collapse:collapse}.sessions th{text-align:left;font-weight:600;font-size:12px;color:var(--muted);padding:8px;border-bottom:1px solid var(--border)}.sessions th.num,.sessions td.num{text-align:right;font-variant-numeric:tabular-nums}.sessions td{padding:10px 8px;border-bottom:1px solid var(--border);vertical-align:top}.sessions tr:hover td{background:var(--panel)}.title{font-weight:600}.sub{margin-top:4px;display:flex;gap:4px;flex-wrap:wrap}.path{color:var(--muted)}.tag{font-size:11px;background:var(--tag);color:var(--muted);border-radius:4px;padding:1px 6px}.tag.subagent{background:#3a2f10;color:#e0b85a}.tag.meta-type,.tag.meta-depth{margin-left:6px}.tag.meta-depth{background:var(--tag);color:var(--muted)}.schema-banner{background:#3a2f10;color:#e0b85a;border-bottom:1px solid var(--border);padding:8px 16px;font-size:13px;text-align:center}.schema-banner code{background:#0000004d;padding:1px 5px;border-radius:4px}:root[data-theme=light] .schema-banner{background:#fbe9c8;color:#8a5a0f}.pager{display:flex;align-items:center;gap:16px;justify-content:center;margin-top:18px}.page-jump{display:inline-flex;align-items:center}.page-jump select{padding:6px 8px;font-size:13px}.detail-head{margin-bottom:18px}.back{font-size:13px}.detail-head h1{font-size:20px;margin:8px 0}.detail-meta{display:flex;flex-wrap:wrap;gap:14px;align-items:center;color:var(--text);font-size:13px}.detail-meta .path,.spawned-by{color:var(--muted)}.copy-archive-path{margin-left:auto}.copy-archive-path+.export-menu{margin-left:0}.export-menu{margin-left:auto}.export-menu>summary.export{display:inline-block;list-style:none;cursor:pointer}.export-menu>summary.export::-webkit-details-marker{display:none}.export-menu .col-menu a{display:block;padding:5px 8px;border-radius:4px;white-space:nowrap;text-decoration:none;color:var(--text)}.export-menu .col-menu a:hover{background:var(--panel2)}.export-menu .col-menu a.export-verbatim{color:var(--warn, #c9772b)}.subagent-link{display:inline-block;font-size:12px;margin:0 0 4px 10px}.subagents{margin:0 0 18px;padding:12px 14px;border:1px solid var(--border);border-radius:8px}.subagents h2{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0 0 8px}.subagents ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.subagents li{font-size:13px}.wf-run{border:1px solid var(--border);border-radius:6px;margin-top:8px;background:var(--panel2)}.wf-run>summary{cursor:pointer;padding:7px 10px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;list-style:none}.wf-run>summary::-webkit-details-marker{display:none}.wf-run>summary:before{content:"▸";color:var(--muted);font-size:11px}.wf-run[open]>summary:before{content:"▾"}.wf-run-name{font-weight:600;font-size:13px}.wf-run>ul{padding:0 10px 10px 24px}.wf-run code{font-size:11px;color:var(--muted)}.cmd{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:4px 0}.cmd-chip{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;font-weight:600;color:var(--accent);border:1px solid var(--accent);border-radius:6px;padding:2px 9px;background:color-mix(in srgb,var(--accent) 10%,transparent)}.cmd-args{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--muted)}.cmd-out{margin:4px 0 0;padding:6px 10px;border-left:2px solid var(--border);color:var(--muted);font-size:12px;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.cmd-note{margin:2px 0}.bash-desc,.bash-preview{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}.bash-preview{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.shell{margin-top:6px;background:var(--code-bg);border:1px solid var(--border);border-radius:6px;padding:10px}.shell-cmd{margin:0;white-space:pre-wrap;word-break:break-word;overflow-x:auto;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px}.shell-gutter{color:var(--accent);-webkit-user-select:none;user-select:none}.shell-gutter.cont{color:transparent}.shell-out{margin:6px 0 0;padding:8px 10px;white-space:pre-wrap;word-break:break-word;overflow-x:auto;background:var(--code-bg);border-radius:6px;color:var(--muted);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px}.bash-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}.bash-badge{font-size:11px;color:var(--muted);background:var(--tag);border-radius:6px;padding:1px 7px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.edit-path{flex:1;min-width:0;display:flex;gap:8px;align-items:baseline;overflow:hidden;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.edit-path .base{font-weight:600;flex:none}.edit-path .dir{color:var(--muted);font-size:11px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.diff-stat{flex:none;display:inline-flex;gap:6px;font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.diff-stat .add{color:var(--ok)}.diff-stat .del{color:var(--err)}.diff{margin-top:6px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--code-bg)}.diff-line{display:flex;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.5}.diff-sign{width:2ch;flex:none;text-align:center;-webkit-user-select:none;user-select:none;color:var(--muted)}.diff-text{flex:1;min-width:0;white-space:pre-wrap;word-break:break-word;padding-right:8px}.diff-line.add{background:color-mix(in srgb,var(--ok) 15%,transparent)}.diff-line.add .diff-sign{color:var(--ok)}.diff-line.del{background:color-mix(in srgb,var(--err) 15%,transparent)}.diff-line.del .diff-sign{color:var(--err)}.diff-line.ctx{color:var(--muted)}.diff-hunk-sep{padding:2px 8px;font-size:11px;color:var(--muted);background:var(--panel2);border-bottom:1px solid var(--border)}.diff-more{padding:4px 8px;font-size:11px;color:var(--muted);font-style:italic}.task-notif{margin:4px 0;padding:7px 10px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:6px;background:var(--panel2)}.task-notif-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.task-notif-id{font-size:11px;color:var(--muted)}.task-notif-summary{margin-top:4px;font-size:13px;color:var(--muted)}.task-status{text-transform:lowercase}.task-status-completed{color:var(--ok, #2e7d32);border-color:var(--ok, #2e7d32)}.task-status-failed,.task-status-error{color:var(--err, #c62828);border-color:var(--err, #c62828)}.wf-result{margin-top:14px}.wf-result h2{margin-bottom:6px;display:flex;align-items:baseline;gap:8px}.wf-result-summary{margin:0 0 8px;font-size:14px}.wf-result-body{max-height:520px;overflow:auto}.wf-failures{margin-top:8px}.wf-failures>summary{cursor:pointer;color:var(--muted);font-size:13px}.wf-trunc{margin-top:6px}.rv-root{font-size:13px;line-height:1.55}.json-chev{color:var(--muted);display:inline-block;width:1.1em}.json-number{color:#f0a868}.json-null{color:var(--muted)}.rv-str{overflow-wrap:anywhere}.rv-true{color:var(--user)}.rv-false{color:var(--err)}.rv-metrics{display:flex;flex-wrap:wrap;gap:4px 20px;margin:4px 0 10px}.rv-metric{display:flex;gap:7px;align-items:baseline}.rv-mkey{color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.rv-mval{font-weight:600}.rv-list{margin:4px 0;padding-left:18px}.rv-section{margin:3px 0}.rv-sec-head{background:none;border:none;border-radius:0;padding:3px 0;margin:0;cursor:pointer;font:inherit;color:var(--text);text-align:left;width:100%;display:flex;gap:6px;align-items:baseline}.rv-sec-head:hover{text-decoration:none}.rv-sec-name{color:var(--accent);font-weight:600}.rv-sec-body{padding-left:12px;margin-left:4px;border-left:1px solid var(--border)}.rv-table-wrap{max-height:360px;overflow:auto;border:1px solid var(--border);border-radius:6px;margin:4px 0}.rv-table{border-collapse:collapse;width:100%;font-size:12.5px}.rv-table th{position:sticky;top:0;background:var(--panel2);text-align:left;padding:5px 9px;color:var(--muted);font-weight:600;border-bottom:1px solid var(--border);white-space:nowrap}.rv-table td{padding:4px 9px;border-bottom:1px solid var(--border);vertical-align:top}.rv-table tr:last-child td{border-bottom:none}.rv-rowkey{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--accent);white-space:nowrap}.transcript{display:flex;flex-direction:column;gap:10px}.transcript-tools{display:flex;align-items:center;gap:12px;margin-bottom:2px}.unturned{display:flex;flex-direction:column;gap:10px}.transcript-search{display:flex;align-items:center;gap:6px;margin-bottom:6px}.transcript-search input{flex:1;min-width:0;max-width:420px}.transcript-search .ts-icon{flex:none;opacity:.7}.transcript-search .ts-count{flex:none;min-width:116px}.to-top{position:fixed;right:18px;bottom:18px;z-index:19;width:38px;height:38px;border-radius:50%;border:1px solid var(--border);background:var(--panel2);color:var(--text);font-size:16px;line-height:1;cursor:pointer;box-shadow:0 4px 14px #0000004d}.to-top:hover{background:var(--tag)}.to-top:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app:has(.search-nav) .to-top{bottom:68px}.search-nav{position:fixed;right:18px;bottom:18px;z-index:20;display:flex;align-items:center;gap:6px;max-width:calc(100vw - 36px);padding:6px 8px;background:var(--panel2);border:1px solid var(--border);border-radius:999px;box-shadow:0 4px 16px #00000047}.search-nav .sn-term{display:flex;align-items:center;gap:8px;min-width:0;padding:2px 2px 2px 0;font-size:12px}.search-nav .sn-q{color:var(--muted);max-width:22ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-nav .sn-pos{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}:root{--hl-bg: #e0b85a;--hl-fg: #0f1115}:root[data-theme=light]{--hl-bg: #ffe08a;--hl-fg: #1b1f27}::highlight(al-search){background-color:var(--hl-bg);color:var(--hl-fg)}.turn-matches{flex:none;font-size:11px;font-weight:600;color:var(--hl-fg);background:var(--hl-bg);border-radius:999px;padding:1px 7px}.turn{display:flex;flex-direction:column;gap:10px}.turn-head{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:transparent;border:none;border-top:1px dashed var(--border);border-radius:0;padding:8px 4px 4px;font-size:12px;color:var(--accent);position:sticky;top:0;z-index:1;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.turn-head:hover:not(:disabled){border-color:var(--accent)}.turn-head .turn-chev{margin-left:0;color:var(--muted)}.turn-no{font-weight:600}.turn-preview{color:var(--muted);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.turn-stats{margin-left:auto;flex:none}.turn-body{display:flex;flex-direction:column;gap:10px}.turn-body:empty{display:none}.event{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:12px;scroll-margin-top:16px}.transcript .event{content-visibility:auto;contain-intrinsic-size:auto 90px}.event.ev-user{border-left:3px solid var(--user)}.event.ev-assistant{border-left:3px solid var(--assistant)}.event.ev-flagged{animation:agentlens-flag 3s ease-out;position:relative;z-index:1}@keyframes agentlens-flag{0%,45%{box-shadow:inset 6px 0 0 var(--gold),0 0 0 2px var(--gold),0 0 22px 2px color-mix(in srgb,var(--gold) 45%,transparent);background:color-mix(in srgb,var(--gold) 22%,var(--panel))}to{box-shadow:inset 0 0 0 0 transparent,0 0 0 0 transparent,0 0 0 0 transparent;background:var(--panel)}}@media(prefers-reduced-motion:reduce){.event.ev-flagged{animation:none;box-shadow:inset 6px 0 0 var(--gold),0 0 0 2px var(--gold);background:color-mix(in srgb,var(--gold) 18%,var(--panel))}}.ev-meta{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:12px}.ev-who{font-weight:600}.ev-tokens{white-space:nowrap}.ev-time{margin-left:auto}.text{white-space:pre-wrap;word-break:break-word}.text-wrap{position:relative}.text-wrap.is-clamped .text{max-height:22em;overflow:hidden}.text-wrap.is-clamped:after{content:"";position:absolute;left:0;right:0;top:calc(22em - 48px);height:48px;background:linear-gradient(transparent,var(--panel));pointer-events:none}.show-more{margin-top:6px;position:relative}.transcript-tools .format-toggle{margin-left:auto;display:flex;gap:0}.format-toggle button,.view-toggle button{border-radius:0;position:relative}.format-toggle button:first-child,.view-toggle button:first-child{border-radius:6px 0 0 6px}.format-toggle button:last-child,.view-toggle button:last-child{border-radius:0 6px 6px 0}.format-toggle button:not(:first-child),.view-toggle button:not(:first-child){margin-left:-1px}.format-toggle button.is-active,.view-toggle button.is-active{background:var(--panel2);color:var(--text);border-color:var(--accent);z-index:1}.format-toggle button:hover:not(:disabled),.view-toggle button:hover:not(:disabled){z-index:2}.text.md{white-space:normal}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md p{margin:0 0 .7em}.md h1,.md h2,.md h3,.md h4,.md h5,.md h6{margin:1em 0 .4em;line-height:1.25;font-weight:600}.md h1{font-size:1.3em}.md h2{font-size:1.18em}.md h3{font-size:1.08em}.md h4,.md h5,.md h6{font-size:1em}.md ul,.md ol{margin:0 0 .7em;padding-left:1.4em}.md li{margin:.15em 0}.md li>ul,.md li>ol{margin-bottom:0}.md a{color:var(--accent);text-decoration:underline}.md code{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:.88em;background:var(--code-bg);border:1px solid var(--border);border-radius:4px;padding:.1em .35em}.md pre{background:var(--code-bg);border:1px solid var(--border);border-radius:6px;padding:10px;overflow-x:auto;margin:0 0 .7em}.md pre code{background:none;border:none;padding:0;font-size:.85em}.md blockquote{margin:0 0 .7em;padding:.1em 0 .1em .9em;border-left:3px solid var(--border);color:var(--muted)}.md hr{border:none;border-top:1px solid var(--border);margin:1em 0}.md table{border-collapse:collapse;margin:0 0 .7em;display:block;overflow-x:auto}.md th,.md td{border:1px solid var(--border);padding:5px 9px;text-align:left}.md th{background:var(--panel2)}.md img{max-width:100%}.thinking{margin:4px 0}.thinking-toggle{font-size:12px;padding:2px 8px;color:var(--muted)}.thinking-body{white-space:pre-wrap;word-break:break-word;background:var(--panel2);border-radius:6px;padding:10px;margin:6px 0;color:var(--muted);font-size:13px}.tool{margin-top:6px;border:1px solid var(--border);border-radius:6px;background:var(--panel2)}.tool-err{border-color:var(--err)}.tool-err-stat{color:var(--err)}.tool-head{display:flex;align-items:center;gap:10px;width:100%;background:transparent;border:none;text-align:left}.tool-name{font-weight:600;font-size:13px}.tool-status{font-size:11px;color:var(--muted)}.chev{margin-left:auto;color:var(--muted)}.tool-body{padding:0 10px 10px}.code,.result{white-space:pre-wrap;word-break:break-word;background:var(--code-bg);border-radius:6px;padding:10px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;overflow-x:auto}.result{color:var(--muted);margin-top:6px;font-family:inherit}.full-result{margin-top:6px}.full-result .show-full{font-size:12px;color:var(--accent);border:1px solid var(--border);border-radius:6px;padding:2px 8px;cursor:pointer}.full-result .code-block{margin-top:6px}.full-result .code{max-height:420px;overflow:auto}.nav{display:flex;gap:4px}.nav-link{color:var(--muted);font-size:13px;padding:4px 10px;border-radius:6px}.nav-link:hover{text-decoration:none;color:var(--text);background:var(--panel2)}.nav-link.active{color:var(--text);background:var(--panel2)}.ctl{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px}.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.kpi{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:12px 14px}.kpi-label{font-size:12px;color:var(--muted)}.kpi-value{font-size:22px;font-weight:700;margin:4px 0;font-variant-numeric:tabular-nums}.kpi-sub{font-size:11px;color:var(--muted)}.kpi-bd{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:5px}.kpi-bd li{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:8px;font-size:13px}.kpi-bd-dot{width:9px;height:9px;border-radius:2px}.kpi-bd-name{color:var(--muted)}.kpi-bd-val{font-variant-numeric:tabular-nums;font-weight:600}.kpi-bd-pct{font-variant-numeric:tabular-nums;color:var(--muted);min-width:32px;text-align:right}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:14px}.card{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:14px;min-width:0;display:flex;flex-direction:column;position:relative}.card-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px;flex-wrap:wrap}.card-head h3{margin:0;font-size:14px}.card-hint{font-size:11px;color:var(--muted)}.lat-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;font-size:12px}.lat-chip{display:inline-flex;align-items:center;gap:5px;background:none;border:1px solid transparent;border-radius:5px;padding:1px 5px;cursor:pointer;font:inherit;line-height:1.4}.lat-chip:hover{border-color:var(--border)}.lat-chip:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.lat-key{display:inline-flex;align-items:center;gap:5px;padding-left:4px}.card-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.link-btn{background:none;border:none;color:var(--accent);font-size:11px;cursor:pointer;padding:0;white-space:nowrap}.link-btn:hover{text-decoration:underline}.chart-body{height:var(--chart-h, 240px)}.seg{display:inline-flex;border:1px solid var(--border);border-radius:6px;overflow:hidden}.seg button{background:none;border:none;color:var(--muted);font-size:11px;padding:2px 8px;cursor:pointer}.seg button+button{border-left:1px solid var(--border)}.seg button.on{background:var(--panel2);color:var(--text)}.views{display:flex;margin-bottom:14px}.dash-strip{margin-bottom:18px}.strip-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.strip-head h2{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0}.strip-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.strip-menu{min-width:210px}.strip-row{display:flex;align-items:center;gap:2px}.strip-row label{flex:1}.strip-row .move{background:none;border:none;color:var(--muted);cursor:pointer;padding:2px 5px;font-size:12px;line-height:1;border-radius:4px}.strip-row .move:hover:not(:disabled){background:var(--panel2);color:var(--text)}.strip-row .move:disabled{opacity:.3;cursor:default}.axis-link{fill:var(--muted);cursor:pointer}.axis-link:hover{fill:var(--accent);text-decoration:underline}.empty{color:var(--muted);font-size:13px;padding:24px 8px}.empty code{background:var(--panel2);padding:1px 5px;border-radius:4px}.classification{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.tag.complexity{background:#2c2440;color:#b98cff}.tag.cat{color:var(--text);background:#243}.tag.cat-feature{background:#173a2a;color:#7ee0a0}.tag.cat-bugfix{background:#3a1d1d;color:#ff9b9b}.tag.cat-refactor{background:#233247;color:#6ea8fe}.tag.cat-docs{background:#2f2a16;color:#e0b85a}.tag.cat-ops{background:#232a33;color:#79c0ff}.tag.cat-review{background:#2c2440;color:#b98cff}.tag.cat-chore{background:var(--tag);color:var(--muted)}.small{font-size:12px}button.small{padding:2px 8px;font-size:12px}.signals{margin-top:8px;max-height:320px;overflow:auto;width:100%}.signals-panel{width:100%;margin-top:8px;padding:12px 14px;background:var(--panel);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;gap:14px}.sig-section{display:flex;flex-direction:column;gap:7px}.sig-h{margin:0;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--text)}.sig-h .muted{font-weight:400;text-transform:none;letter-spacing:0}.sig-bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px}.sig-bar-row{display:grid;grid-template-columns:110px 1fr auto;align-items:center;gap:10px;font-size:12px}.sig-bar-label{color:var(--text);text-transform:capitalize}.sig-bar{height:8px;background:var(--code-bg);border-radius:4px;overflow:hidden}.sig-bar-fill{display:block;height:100%;background:var(--accent);border-radius:4px;min-width:2px}.sig-bar-val{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}.sig-bar-sub{grid-column:2 / -1;font-size:11px;margin-top:-2px}.sig-bar-row.is-win .sig-bar-fill{background:var(--user)}.sig-bar-row.is-win .sig-bar-label{color:var(--user);font-weight:600}.sig-grid{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:0;font-size:12px}.sig-grid dt{color:var(--muted)}.sig-grid dd{margin:0;color:var(--text)}.sig-chips{display:inline-flex;flex-wrap:wrap;gap:4px 6px}.sig-chip{background:var(--panel2);border:1px solid var(--border);border-radius:4px;padding:1px 6px}.sig-files{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--muted);word-break:break-all;max-height:140px;overflow:auto}.skill-head{margin:8px 0 14px}.skill-head h1{margin:0 0 4px;font-size:1.5em}.skill-head-meta{font-size:13px}.skill-version-bar{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-bottom:14px}.skill-version-bar select{max-width:460px}.skill-cards{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:14px;align-items:start}@media(max-width:1200px){.skill-cards{grid-template-columns:1fr}}.skill-body{max-height:70vh;overflow:auto}.file-view .card{margin-top:14px}.skill-body-card,.skill-sessions-card{min-width:0}.skill-sessions-card table{width:100%}.sessions th .sort-th{display:inline-flex;align-items:center;gap:4px;background:none;border:none;padding:0;margin:0;font:inherit;font-weight:600;font-size:12px;color:var(--muted);cursor:pointer}.sessions th .sort-th:hover:not(:disabled){color:var(--text);border:none}.sessions th .sort-th.is-active{color:var(--text)}.sort-ind{font-size:9px;opacity:.6}.sessions th .sort-th.is-active .sort-ind{color:var(--accent);opacity:1}.filter-select{position:relative;display:inline-block}.filter-select-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;min-width:180px;max-width:280px;text-align:left;padding:6px 10px}.filter-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filter-select .chev{color:var(--muted);font-size:10px}.filter-select-pop{position:absolute;z-index:20;top:calc(100% + 4px);left:0;min-width:240px;max-width:380px;background:var(--panel2);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px #0000004d;padding:6px}.filter-select-search{width:100%;margin-bottom:6px}.filter-select-list{list-style:none;margin:0;padding:0;max-height:260px;overflow-y:auto}.filter-select-opt{padding:6px 8px;border-radius:5px;cursor:pointer;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filter-select-opt.is-active{background:var(--panel)}.filter-select-opt.is-selected{color:var(--accent);font-weight:600}.filter-select-empty{padding:8px;font-size:13px}.plan-card{margin-top:6px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:6px;background:var(--panel2);padding:8px 12px}.plan-card-head{font-weight:600;font-size:13px;margin-bottom:4px}.qa-card{margin-top:6px;border:1px solid var(--border);border-left:3px solid var(--user);border-radius:6px;background:var(--panel2);padding:8px 12px}.qa-card-head{font-weight:600;font-size:13px;margin-bottom:6px}.qa-q{margin:8px 0}.qa-q+.qa-q{border-top:1px solid var(--border);padding-top:8px}.qa-q-head{display:flex;gap:8px;align-items:baseline;margin-bottom:2px}.qa-question{font-weight:600;font-size:13px;margin-bottom:6px}.qa-options{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.qa-opt{display:flex;gap:8px;align-items:baseline;padding:5px 8px;border:1px solid var(--border);border-radius:5px}.qa-opt.is-selected{border-color:var(--ok);background:var(--panel)}.qa-mark{font-size:13px;line-height:1.3}.qa-opt.is-selected .qa-mark{color:var(--ok)}.qa-opt-body{display:flex;flex-direction:column;gap:2px;min-width:0}.qa-opt-label{font-weight:600;font-size:13px}.qa-opt-desc{font-size:12px}.qa-note{margin-top:6px;font-size:13px;color:var(--muted);border-left:2px solid var(--border);padding-left:8px}button.copy-btn,summary.export{font-family:inherit;font-size:12px;padding:2px 8px;line-height:1.4;color:var(--muted);background:transparent;border:1px solid var(--border);border-radius:6px;cursor:pointer;flex:none}button.copy-btn:hover:not(:disabled),summary.export:hover,.export-menu[open]>summary.export{color:var(--text);border-color:var(--accent)}.copy-hover{opacity:0;transition:opacity .12s}.event:hover .copy-hover,.copy-hover:focus-visible{opacity:1}.ev-copy{margin-left:auto}.ev-copy+.ev-time{margin-left:0}.code-block{position:relative}.code-block .copy-corner{position:absolute;top:6px;right:6px;z-index:1;background:var(--panel2);opacity:0;transition:opacity .12s}.code-block:hover .copy-corner,.code-block .copy-corner:focus-visible{opacity:1}.launch{margin-top:6px;font-size:13px}.launch-meta{margin-bottom:10px;display:flex;flex-direction:column;gap:4px}.launch-desc{font-size:13px}.launch-metaline{font-size:12px}.launch-metaline code{font-size:11px;color:var(--muted);word-break:break-all}.launch-src>summary{cursor:pointer;font-size:12px;color:var(--muted)}.launch-src pre{margin-top:6px;max-height:320px;overflow:auto}.launch-tasks-head{font-size:12px;color:var(--muted);font-weight:600;margin:4px 0 8px}.launch-card{border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:6px;background:var(--panel2);padding:8px 12px;margin-bottom:8px}.launch-card-head{display:flex;align-items:baseline;gap:8px;font-weight:600;font-size:13px;margin-bottom:6px}.launch-card-idx{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--tag);color:var(--muted);font-size:11px;font-weight:600;display:inline-flex;align-items:center;justify-content:center}.launch-card-title{word-break:break-word}.launch-fields{margin:0;display:flex;flex-direction:column;gap:8px}.launch-field>dt{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:2px}.launch-field>dd{margin:0}.launch-text{white-space:pre-wrap;word-break:break-word}.launch-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:3px}.launch-list>li{padding-left:2px}.launch-actions{display:flex;align-items:center;gap:8px;margin-top:8px}.launch-raw{max-height:420px;overflow:auto;margin-top:6px}.wf-launch details>summary{cursor:pointer;list-style:none}.wf-launch details>summary::-webkit-details-marker{display:none}.wf-launch details>summary h2{display:inline-flex;align-items:baseline;gap:6px}.wf-launch details>summary h2:before{content:"▸";color:var(--muted);font-size:12px}.wf-launch details[open]>summary h2:before{content:"▾"}.launch-tool{border-left:3px solid var(--accent);padding:8px 12px}.launch-tool-head{display:flex;align-items:baseline;gap:10px;margin-bottom:2px}.wf-phases{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin-top:10px}.wf-phase-chip{display:flex;flex-direction:column;gap:2px;font-size:12px;padding:6px 12px;border:1px solid var(--border);border-radius:10px;background:var(--panel2);min-width:88px}.wf-phase-title{font-weight:600}.wf-phase-desc{color:var(--muted);font-size:11px}.wf-phase-arrow{align-self:center;color:var(--muted);font-size:15px}.wf-logs{margin-top:14px}.wf-logs>summary{cursor:pointer;font-size:13px;font-weight:600}.wf-log-list{margin:8px 0 0;padding-left:0;list-style:none;display:flex;flex-direction:column;gap:2px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px}.wf-log-list>li{padding:3px 8px;border-radius:4px;background:var(--panel2);white-space:pre-wrap;word-break:break-word}:root[data-theme=light] .brand-logo{filter:brightness(.5) saturate(1.8)}:root[data-theme=light] .tag.subagent{background:#f6e6c8;color:#8a6d1f}:root[data-theme=light] .tag.complexity{background:#ece4fb;color:#6d28d9}:root[data-theme=light] .tag.cat{background:#dff0e6;color:#10633a}:root[data-theme=light] .tag.cat-feature{background:#d8f3e3;color:#0f7a44}:root[data-theme=light] .tag.cat-bugfix{background:#fbe0e0;color:#b12626}:root[data-theme=light] .tag.cat-refactor{background:#dbe8fb;color:#1d4ed8}:root[data-theme=light] .tag.cat-docs{background:#f6ecd0;color:#8a6d1f}:root[data-theme=light] .tag.cat-ops{background:#dceaf8;color:#1a5fa8}:root[data-theme=light] .tag.cat-review{background:#ece4fb;color:#6d28d9}:root[data-theme=light] .json-number{color:#b45309}.tag.sev{font-weight:600;text-transform:capitalize}.sev-critical{background:#3a1a1a;color:#ff8f8f}.sev-high{background:#3a2a12;color:#f0a860}.sev-medium{background:#2f2a16;color:#e0b85a}.sev-low{background:#23303f;color:#79c0ff}.sev-info{background:var(--tag);color:var(--muted)}.sec-count{display:inline-flex;align-items:center;gap:6px;justify-content:flex-end}:root{--sev-c-critical: #ff8f8f;--sev-c-high: #f0a860;--sev-c-medium: #e0b85a;--sev-c-low: #79c0ff}:root[data-theme=light]{--sev-c-critical: #b12626;--sev-c-high: #b5651d;--sev-c-medium: #8a6d1f;--sev-c-low: #1a5fa8}.sev-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--muted);flex:none}.sev-dot.sev-critical{background:var(--sev-c-critical)}.sev-dot.sev-high{background:var(--sev-c-high)}.sev-dot.sev-medium{background:var(--sev-c-medium)}.sev-dot.sev-low{background:var(--sev-c-low)}.sev-dot.sev-info{background:var(--muted)}.tag.framework{background:transparent;border:1px solid var(--border);color:var(--muted)}.sev-border-critical{border-left:3px solid var(--err)}.sev-border-high{border-left:3px solid #e0873a}.sev-border-medium{border-left:3px solid var(--gold)}.sev-border-low{border-left:3px solid var(--accent)}.sev-border-info{border-left:3px solid var(--border)}.tool-findings{display:flex;flex-direction:column;gap:6px;margin:4px 0 10px}.finding{background:var(--panel);border:1px solid var(--border);border-radius:6px}.finding-head{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;padding:7px 10px;text-align:left;cursor:pointer}.finding-head:hover:not(:disabled){border-color:transparent}.finding-title{font-weight:600;font-size:13px}.finding-head .chev{margin-left:auto;color:var(--muted)}.finding-body{padding:0 10px 10px;display:flex;flex-direction:column;gap:8px}.finding-evidence{white-space:pre-wrap;word-break:break-word}.security-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;padding:8px 12px;background:var(--panel);border:1px solid var(--border);border-radius:8px}.security-banner-text{font-weight:600;font-size:13px}.security-banner-sevs{display:flex;gap:5px;flex-wrap:wrap}.kpi-row{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}.sev-kpis .kpi{min-width:108px}.kpi-btn{display:block;text-align:left;cursor:pointer;color:inherit;font:inherit;text-decoration:none}.kpi-btn:hover{border-color:var(--accent);text-decoration:none}.kpi-btn.is-active{border-color:var(--accent);outline:2px solid var(--accent)}.sev-kpi.sev-critical .kpi-value{color:#ff8f8f}.sev-kpi.sev-high .kpi-value{color:#f0a860}.sev-kpi.sev-medium .kpi-value{color:#e0b85a}.sev-kpi.sev-low .kpi-value{color:#79c0ff}.finding-evidence-cell code{white-space:pre-wrap;word-break:break-word;font-size:12px;color:var(--muted)}.findings-table td{vertical-align:top}.linkish{background:none;border:none;color:var(--accent);cursor:pointer;padding:0 2px;font:inherit}.sec-reference{margin-top:28px}.sec-reference h2{font-size:16px;margin-bottom:4px}.sec-ref-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px;margin-top:10px}.sec-ref>summary{display:flex;align-items:center;gap:10px;cursor:pointer;flex-wrap:wrap;list-style:none}.sec-ref>summary::-webkit-details-marker{display:none}.sec-ref>summary:before{content:"▸";color:var(--muted)}.sec-ref[open]>summary:before{content:"▾"}.sec-ref-title{font-weight:600}.sec-ref-body{margin:10px 0 0;display:grid;grid-template-columns:auto 1fr;gap:6px 12px}.sec-ref-body dt{color:var(--muted);font-size:12px}.sec-ref-body dd{margin:0;font-size:13px;line-height:1.45}.demo-note{margin:0 0 16px;padding:9px 13px;border-radius:8px;font-size:13px;background:var(--panel);border:1px solid var(--border);color:var(--muted)}.demo-note strong{color:var(--text)}.triage-counts{margin:-6px 0 12px}.triage-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;padding:8px 12px;background:var(--panel);border:1px solid var(--border);border-radius:8px}.triage-bar button{font-size:13px}.check-col{width:28px;text-align:center}.findings-table .check-col input{cursor:pointer}tr.is-dismissed{opacity:.6}.finding-evidence-cell .tool-tag{margin-right:6px;vertical-align:middle}.finding-actions{white-space:nowrap}.finding-actions .linkish{margin-right:8px}.muted-rules{margin-top:20px}.muted-rules>summary{cursor:pointer;list-style:none}.muted-rules>summary::-webkit-details-marker{display:none}.muted-rules>summary:before{content:"▸ ";color:var(--muted)}.muted-rules[open]>summary:before{content:"▾ "}.muted-rules-list{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}.muted-rules-list li{display:flex;align-items:center;gap:4px;font-size:13px;flex-wrap:wrap}:root[data-theme=light] .sev-critical{background:#fbe0e0;color:#b12626}:root[data-theme=light] .sev-high{background:#f7e2c8;color:#b5651d}:root[data-theme=light] .sev-medium{background:#f6ecd0;color:#8a6d1f}:root[data-theme=light] .sev-low{background:#dceaf8;color:#1a5fa8}:root[data-theme=light] .sev-kpi.sev-critical .kpi-value{color:#b12626}:root[data-theme=light] .sev-kpi.sev-high .kpi-value{color:#b5651d}:root[data-theme=light] .sev-kpi.sev-medium .kpi-value{color:#8a6d1f}:root[data-theme=light] .sev-kpi.sev-low .kpi-value{color:#1a5fa8}.page-intro{margin:4px 0 0}.filter-chip{align-self:center}.tag.dismissed{margin-left:4px}.tag.framework,.findings-table .tag.subagent,.tag.mute-scope,.mute-note{margin-left:6px}.linkish.unmute{margin-left:8px}.sec-reference-intro{margin-top:0}.about{max-width:900px}.about h1{margin-bottom:4px}.about>p.muted{margin-top:0}.about section{margin-top:28px}.about h2{font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:8px}table.kv{width:100%;border-collapse:collapse}table.kv th[scope=row]{text-align:left;font-weight:500;color:var(--muted);padding:8px 16px 8px 0;vertical-align:top;white-space:nowrap;width:1%}table.kv td{padding:8px 0;vertical-align:top}table.kv tr+tr th,table.kv tr+tr td{border-top:1px solid var(--border)}table.kv .muted{font-size:12px;margin-top:4px}.about code.path{word-break:break-all}.origin-tag{font-size:11px;color:var(--muted);background:var(--tag);border-radius:8px;padding:1px 6px;white-space:nowrap}.warn-tag{font-size:11px;color:#e0b85a;background:#3a2f10;border-radius:8px;padding:1px 6px;white-space:nowrap}.timeline{border:1px solid var(--border);border-radius:8px;background:var(--panel);padding:8px 10px 6px;margin:10px 0}.tl-head{display:flex;align-items:center;gap:10px;font-size:12px;margin-bottom:4px}.tl-caption{margin-left:auto}.tl-ctl select{font:inherit;background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:5px;padding:1px 4px}.tl-axis{font-variant-numeric:tabular-nums}.tl-svg{display:block;width:100%}.tl-break rect{fill:var(--panel2);stroke:var(--border);stroke-dasharray:2 2}.tl-mark{shape-rendering:crispEdges}.tl-context{fill:none;stroke:var(--muted);stroke-width:1.25;stroke-opacity:.65;pointer-events:none}.tl-swatch.is-line{height:2px;border-radius:1px;background:var(--muted);opacity:.65;align-self:center}.tl-expanded{cursor:zoom-out}.tl-expanded rect{fill:var(--panel2);stroke:var(--border);stroke-dasharray:2 2;opacity:.75}.tl-err{fill:var(--err)}.tl-file,.tl-spawn{fill:var(--muted)}.tl-find.sev-critical{fill:var(--sev-c-critical)}.tl-find.sev-high{fill:var(--sev-c-high)}.tl-find.sev-medium{fill:var(--sev-c-medium)}.tl-find.sev-low{fill:var(--sev-c-low)}.tl-find.sev-info{fill:var(--muted)}.tl-svg{cursor:crosshair}.tl-svg.is-dragging{cursor:ew-resize}.tl-break{cursor:zoom-in}.tl-cursor{fill:var(--text);opacity:0;pointer-events:none}.tl-svg:focus-visible .tl-cursor{opacity:.9}.tl-svg:focus{outline:none}.tl-svg:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.tl-sel-shade{fill:var(--bg);opacity:.62;pointer-events:none}.tl-sel-box{fill:var(--accent);opacity:.1;pointer-events:none}.tl-sel-handle{fill:var(--accent);pointer-events:none}.tl-pill{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;border:1px solid var(--border);border-radius:8px;background:var(--panel);padding:5px 10px;margin:-4px 0 10px}.tl-pill-range{font-weight:600;font-variant-numeric:tabular-nums}.tl-hover{fill:var(--text);opacity:.28;pointer-events:none}.timeline{position:relative}.tl-tip{position:absolute;bottom:52px;z-index:5;pointer-events:none;min-width:140px;max-width:260px;padding:6px 9px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);box-shadow:0 6px 18px #00000059;font-size:12px;line-height:1.45}.tl-tip.is-right{text-align:right}.tl-tip-head{display:flex;gap:6px;align-items:baseline;font-weight:600}.tl-tip.is-right .tl-tip-head{justify-content:flex-end}.tl-tip-turn{color:var(--muted);font-weight:500}.tl-tip-row{font-variant-numeric:tabular-nums;display:flex;gap:6px;flex-wrap:wrap}.tl-tip.is-right .tl-tip-row{justify-content:flex-end}.tl-tip-flag{border-radius:4px;background:var(--tag);padding:0 5px;font-size:11px}.tl-tip-flag.is-err{background:color-mix(in srgb,var(--err) 22%,transparent);color:var(--err)}.tl-tip-flag.sev-critical{background:color-mix(in srgb,var(--sev-c-critical) 22%,transparent);color:var(--sev-c-critical)}.tl-tip-flag.sev-high{background:color-mix(in srgb,var(--sev-c-high) 22%,transparent);color:var(--sev-c-high)}.tl-tip-flag.sev-medium{background:color-mix(in srgb,var(--sev-c-medium) 22%,transparent);color:var(--sev-c-medium)}.tl-tip-flag.sev-low{background:color-mix(in srgb,var(--sev-c-low) 22%,transparent);color:var(--sev-c-low)}.tl-legend{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;color:var(--muted);margin-top:4px}.tl-key{display:inline-flex;align-items:center;gap:4px}.tl-swatch{width:8px;height:8px;border-radius:2px;display:inline-block}.burn{display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center}.burn-grid{display:flex;flex-direction:column;gap:2px}.burn-row{display:flex;align-items:center;gap:2px}.burn-day{width:30px;flex:none;font-size:11px;color:var(--muted)}.burn-cell{flex:1 1 0;height:14px;border-radius:2px}.burn-tick{flex:1 1 0;font-size:10px;color:var(--muted);font-style:normal;text-align:left}.burn-hours{margin-top:2px}.burn-lg .burn-cell{height:40px}.burn-lg .burn-day,.burn-lg .burn-tick{font-size:12px}.burn-lg .burn-day{width:36px}.burn-legend{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--muted)}.burn-legend-cap{align-self:flex-start}.burn-bar{height:10px;border-radius:2px}.burn-ticks{position:relative;height:12px}.burn-ticks span{position:absolute;transform:translate(-50%);font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap}.burn-ticks span:first-child{transform:none}.burn-ticks span:last-child{transform:translate(-100%)}.chart-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#0009;display:flex;align-items:center;justify-content:center;padding:24px}.chart-modal{position:relative;width:min(1100px,100%);max-height:100%;overflow:auto}.chart-modal>.card{margin:0}.chart-modal-close{position:absolute;top:10px;right:10px;background:none;border:none;color:var(--muted);font-size:14px;line-height:1;cursor:pointer;padding:4px 6px;border-radius:4px}.chart-modal-close:hover{color:var(--text);background:var(--tag)}.chart-body-lg{height:min(70vh,720px)}.chart-body-lg:has(.burn){height:auto}.card-expand{background:none;border:none;color:var(--muted);font-size:12px;line-height:1;cursor:pointer;padding:2px 4px;border-radius:4px}.card-expand:hover{color:var(--accent);background:var(--tag)}.chart-moved{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);font-size:12px}.card-guide{margin-left:2px}.card-guide>summary{list-style:none;cursor:help;color:var(--muted);font-size:12px;border-radius:50%;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;line-height:1}.card-guide>summary::-webkit-details-marker{display:none}.card-guide>summary:hover,.card-guide[open]>summary{color:var(--accent);background:var(--tag)}.card-guide-body{position:absolute;z-index:6;top:40px;left:10px;right:10px;padding:10px 12px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);box-shadow:0 6px 18px #00000059;font-size:12px;line-height:1.5;color:var(--text);font-weight:400}.card-guide-body p{margin:0 0 7px}.card-guide-body p:last-child{margin-bottom:0}.card-guide-body dt{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em}.card-guide-body dd{margin:1px 0 7px}.card-guide-body dd:last-child{margin-bottom:0}.app-tip{position:fixed;z-index:60;pointer-events:none;max-width:320px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;background:var(--panel2);color:var(--text);box-shadow:0 6px 18px #00000059;font-size:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}.burn{position:relative}.burn-tip{position:absolute;z-index:6;pointer-events:none;padding:5px 8px;border:1px solid var(--border);border-radius:6px;background:var(--panel2);box-shadow:0 6px 18px #00000059;font-size:12px;line-height:1.45;white-space:nowrap}.burn-tip-head{font-weight:600}.burn-tip-row{color:var(--muted);font-variant-numeric:tabular-nums}.files-rework{margin:.4rem 0 .2rem;padding-left:.4rem;font-size:12px}.burn-tip-support{font-size:11px;opacity:.8}.burn-cell{cursor:default}.burn-cell:hover{outline:2px solid var(--text);outline-offset:-1px}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-DNignR_W.js","assets/theme-DdWxlWl0.js","assets/SessionView-DdxaD2e2.js","assets/jsonish-BNBt84Kn.js","assets/useResetOn-MIt0o_vE.js","assets/index-CCufgBAx.js","assets/WorkflowView-C0qUousN.js","assets/SkillView-CxQL_Y9l.js","assets/FileView-B7B7lrWB.js","assets/FilesView-BxaV2-YJ.js","assets/SecurityView-BkWmmke4.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var ep=Object.defineProperty;var tp=(i,a,u)=>a in i?ep(i,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[a]=u;var cc=(i,a,u)=>tp(i,typeof a!="symbol"?a+"":a,u);function np(i,a){for(var u=0;u<a.length;u++){const c=a[u];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in i)){const m=Object.getOwnPropertyDescriptor(c,d);m&&Object.defineProperty(i,d,m.get?m:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const g of m.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function u(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=u(d);fetch(d.href,m)}})();const rp="modulepreload",lp=function(i){return"/"+i},fc={},zt=function(a,u,c){let d=Promise.resolve();if(u&&u.length>0){let g=function(P){return Promise.all(P.map(R=>Promise.resolve(R).then(E=>({status:"fulfilled",value:E}),E=>({status:"rejected",reason:E}))))};document.getElementsByTagName("link");const x=document.querySelector("meta[property=csp-nonce]"),_=(x==null?void 0:x.nonce)||(x==null?void 0:x.getAttribute("nonce"));d=g(u.map(P=>{if(P=lp(P),P in fc)return;fc[P]=!0;const R=P.endsWith(".css"),E=R?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${P}"]${E}`))return;const O=document.createElement("link");if(O.rel=R?"stylesheet":rp,R||(O.as="script"),O.crossOrigin="",O.href=P,_&&O.setAttribute("nonce",_),document.head.appendChild(O),R)return new Promise((Q,V)=>{O.addEventListener("load",Q),O.addEventListener("error",()=>V(new Error(`Unable to preload CSS for ${P}`)))})}))}function m(g){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=g,window.dispatchEvent(x),!x.defaultPrevented)throw g}return d.then(g=>{for(const x of g||[])x.status==="rejected"&&m(x.reason);return a().catch(m)})};var gm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function op(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ji={exports:{}},Lr={},Zi={exports:{}},ee={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -66,4 +66,4 @@ Error generating stack: `+o.message+`
|
|
|
66
66
|
*
|
|
67
67
|
* @license MIT
|
|
68
68
|
*/function Jl(){return Jl=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var c in u)({}).hasOwnProperty.call(u,c)&&(i[c]=u[c])}return i},Jl.apply(null,arguments)}function Kc(i,a){if(i==null)return{};var u={};for(var c in i)if({}.hasOwnProperty.call(i,c)){if(a.indexOf(c)!==-1)continue;u[c]=i[c]}return u}function sh(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function ah(i,a){return i.button===0&&(!a||a==="_self")&&!sh(i)}function su(i){return i===void 0&&(i=""),new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((a,u)=>{let c=i[u];return a.concat(Array.isArray(c)?c.map(d=>[u,d]):[[u,c]])},[]))}function ch(i,a){let u=su(i);return a&&a.forEach((c,d)=>{u.has(d)||a.getAll(d).forEach(m=>{u.append(d,m)})}),u}const fh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],dh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ph="6";try{window.__reactRouterVersion=ph}catch{}const hh=C.createContext({isTransitioning:!1}),mh="startTransition",Nc=ap[mh];function vh(i){let{basename:a,children:u,future:c,window:d}=i,m=C.useRef();m.current==null&&(m.current=mp({window:d,v5Compat:!0}));let g=m.current,[x,_]=C.useState({action:g.action,location:g.location}),{v7_startTransition:P}=c||{},R=C.useCallback(E=>{P&&Nc?Nc(()=>_(E)):_(E)},[_,P]);return C.useLayoutEffect(()=>g.listen(R),[g,R]),C.useEffect(()=>lh(c),[c]),C.createElement(ih,{basename:a,children:u,location:x.location,navigationType:x.action,navigator:g,future:c})}const gh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zl=C.forwardRef(function(a,u){let{onClick:c,relative:d,reloadDocument:m,replace:g,state:x,target:_,to:P,preventScrollReset:R,viewTransition:E}=a,O=Kc(a,fh),{basename:Q}=C.useContext(tn),V,B=!1;if(typeof P=="string"&&yh.test(P)&&(V=P,gh))try{let D=new URL(window.location.href),Y=P.startsWith("//")?new URL(D.protocol+P):new URL(P),ae=Wn(Y.pathname,Q);Y.origin===D.origin&&ae!=null?P=ae+Y.search+Y.hash:B=!0}catch{}let N=Vp(P,{relative:d}),ne=Sh(P,{replace:g,state:x,target:_,preventScrollReset:R,relative:d,viewTransition:E});function q(D){c&&c(D),D.defaultPrevented||ne(D)}return C.createElement("a",Jl({},O,{href:V||N,onClick:B||m?c:q,ref:u,target:_}))}),Tr=C.forwardRef(function(a,u){let{"aria-current":c="page",caseSensitive:d=!1,className:m="",end:g=!1,style:x,to:_,viewTransition:P,children:R}=a,E=Kc(a,dh),O=eo(_,{relative:E.relative}),Q=gn(),V=C.useContext($c),{navigator:B,basename:N}=C.useContext(tn),ne=V!=null&&xh(O)&&P===!0,q=B.encodeLocation?B.encodeLocation(O).pathname:O.pathname,D=Q.pathname,Y=V&&V.navigation&&V.navigation.location?V.navigation.location.pathname:null;d||(D=D.toLowerCase(),Y=Y?Y.toLowerCase():null,q=q.toLowerCase()),Y&&N&&(Y=Wn(Y,N)||Y);const ae=q!=="/"&&q.endsWith("/")?q.length-1:q.length;let ke=D===q||!g&&D.startsWith(q)&&D.charAt(ae)==="/",Pe=Y!=null&&(Y===q||!g&&Y.startsWith(q)&&Y.charAt(q.length)==="/"),Ne={isActive:ke,isPending:Pe,isTransitioning:ne},U=ke?c:void 0,Ce;typeof m=="function"?Ce=m(Ne):Ce=[m,ke?"active":null,Pe?"pending":null,ne?"transitioning":null].filter(Boolean).join(" ");let at=typeof x=="function"?x(Ne):x;return C.createElement(Zl,Jl({},E,{"aria-current":U,className:Ce,ref:u,style:at,to:_,viewTransition:P}),typeof R=="function"?R(Ne):R)});var au;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(au||(au={}));var jc;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(jc||(jc={}));function wh(i){let a=C.useContext(ql);return a||Se(!1),a}function Sh(i,a){let{target:u,replace:c,state:d,preventScrollReset:m,relative:g,viewTransition:x}=a===void 0?{}:a,_=Bc(),P=gn(),R=eo(i,{relative:g});return C.useCallback(E=>{if(ah(E,u)){E.preventDefault();let O=c!==void 0?c:Xl(P)===Xl(R);_(i,{replace:O,state:d,preventScrollReset:m,relative:g,viewTransition:x})}},[P,_,R,c,d,u,i,m,g,x])}function kh(i){let a=C.useRef(su(i)),u=C.useRef(!1),c=gn(),d=C.useMemo(()=>ch(c.search,u.current?null:a.current),[c.search]),m=Bc(),g=C.useCallback((x,_)=>{const P=su(typeof x=="function"?x(d):x);u.current=!0,m("?"+P,_)},[m,d]);return[d,g]}function xh(i,a){a===void 0&&(a={});let u=C.useContext(hh);u==null&&Se(!1);let{basename:c}=wh(au.useViewTransitionState),d=eo(i,{relative:a.relative});if(!u.isTransitioning)return!1;let m=Wn(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=Wn(u.nextLocation.pathname,c)||u.nextLocation.pathname;return iu(d.pathname,g)!=null||iu(d.pathname,m)!=null}const Eh=700;function Ch(){const[i,a]=C.useState(!1);if(C.useEffect(()=>{const c=()=>a(window.scrollY>Eh);return c(),window.addEventListener("scroll",c,{passive:!0}),()=>window.removeEventListener("scroll",c)},[]),!i)return null;const u=()=>{var d,m;const c=((d=window.matchMedia)==null?void 0:d.call(window,"(prefers-reduced-motion: reduce)").matches)??!1;window.scrollTo({top:0,behavior:c?"auto":"smooth"}),(m=document.getElementById("main"))==null||m.focus({preventScroll:!0})};return v.jsxs("button",{type:"button",className:"to-top",onClick:u,"data-tip":"Back to top",children:[v.jsx("span",{"aria-hidden":"true",children:"↑"}),v.jsx("span",{className:"sr-only",children:"Back to top"})]})}const _h=350,nu=8,Yl=8;function Ph(){const[i,a]=C.useState(null),u=C.useRef(null),c=C.useRef(null),d=C.useRef(null);return C.useEffect(()=>{const m=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null},g=()=>{m();const E=c.current;E&&E.getAttribute("aria-describedby")==="app-tooltip"&&E.removeAttribute("aria-describedby"),c.current=null,a(null)},x=(E,O)=>{const Q=E.getAttribute("data-tip");if(!Q||c.current===E)return;g(),c.current=E;const V=()=>{E.setAttribute("aria-describedby","app-tooltip");const B=E.getBoundingClientRect();a({text:Q,x:B.left+B.width/2,y:B.top,placed:!1})};O?V():d.current=window.setTimeout(V,_h)},_=E=>{var Q,V;const O=(V=(Q=E.target)==null?void 0:Q.closest)==null?void 0:V.call(Q,"[data-tip]");O?x(O,!1):c.current&&g()},P=E=>{var Q,V;const O=(V=(Q=E.target)==null?void 0:Q.closest)==null?void 0:V.call(Q,"[data-tip]");O&&x(O,!0)},R=E=>E.key==="Escape"&&g();return document.addEventListener("mouseover",_),document.addEventListener("focusin",P),document.addEventListener("focusout",g),document.addEventListener("keydown",R),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{document.removeEventListener("mouseover",_),document.removeEventListener("focusin",P),document.removeEventListener("focusout",g),document.removeEventListener("keydown",R),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),m()}},[]),C.useEffect(()=>{const m=u.current,g=c.current;if(!i||i.placed||!m||!g)return;const x=g.getBoundingClientRect(),_=m.offsetWidth,P=m.offsetHeight,R=x.top-P-nu<Yl?x.bottom+nu:x.top-P-nu,E=Math.min(Math.max(x.left+x.width/2-_/2,Yl),Math.max(Yl,window.innerWidth-_-Yl));a({...i,x:E,y:R,placed:!0})},[i]),i?v.jsx("div",{id:"app-tooltip",role:"tooltip",ref:u,className:"app-tip",style:{left:i.x,top:i.y,visibility:i.placed?"visible":"hidden"},children:i.text}):null}const Nh="/assets/logo-Cd7Wsq5o.png",ru={},vn=(ru==null?void 0:ru.VITE_SNAPSHOT)==="1",cu="/";function jh(i){if(!vn)return"/api"+i;const[a,u]=i.split("?"),c=a.replace(/^\//,"");if(c==="file"){const d=new URLSearchParams(u??"");return`${cu}snapshot/file/${Rh(d.get("path")??"",d.get("project"))}.json`}return`${cu}snapshot/${c}.json`}function Rh(i,a){const u=`${a??""}
|
|
69
|
-
${i}`;let c=3735928559,d=1103547991;for(let m=0;m<u.length;m++){const g=u.charCodeAt(m);c=Math.imul(c^g,2654435761),d=Math.imul(d^g,1597334677)}return c=Math.imul(c^c>>>16,2246822507)^Math.imul(d^d>>>13,3266489909),d=Math.imul(d^d>>>16,2246822507)^Math.imul(c^c>>>13,3266489909),(4294967296*(2097151&d)+(c>>>0)).toString(36)}function Sm(i,a){return vn?`${cu}snapshot/sessions/${i}.export.md`:`/api/sessions/${i}/export.md${a?`?redact=${a}`:""}`}async function to(i){const a=await fetch(jh(i));if(!a.ok)throw new Error(`${a.status} ${await a.text()}`);return a.json()}async function Lh(i,a){const u=await fetch("/api"+i,{method:"POST",...a!==void 0?{headers:{"content-type":"application/json"},body:JSON.stringify(a)}:{}});if(!u.ok)throw new Error(`${u.status} ${await u.text()}`);return u.json()}const Yc="agentlens.theme";function Th(){if(typeof document<"u"){const i=document.documentElement.dataset.theme;if(i==="light"||i==="dark")return i}try{const i=localStorage.getItem(Yc);if(i==="light"||i==="dark")return i}catch{}return"dark"}const Gc=C.createContext({theme:"dark",toggle:()=>{}});function zh({children:i}){const[a,u]=C.useState(Th);typeof document<"u"&&(document.documentElement.dataset.theme=a),C.useEffect(()=>{try{localStorage.setItem(Yc,a)}catch{}},[a]);const c=()=>u(d=>d==="dark"?"light":"dark");return v.jsx(Gc.Provider,{value:{theme:a,toggle:c},children:i})}function Oh(){return C.useContext(Gc)}function Ih(i){const a=Math.round((Date.now()-new Date(i).getTime())/1e3);if(a<45)return"just now";const u=Math.round(a/60);if(u<60)return`${u}m ago`;const c=Math.round(u/60);return c<24?`${c}h ago`:`${Math.round(c/24)}d ago`}function Dh(){const{theme:i,toggle:a}=Oh(),[u,c]=C.useState(null),[d,m]=C.useState(!1),[g,x]=C.useState(null),_=C.useCallback(()=>{to("/health").then(N=>{c(N.last_ingested??null),m(!!N.schema_stale),x(N.version??null)}).catch(()=>{})},[]);C.useEffect(()=>{_();const N=setInterval(_,6e4);return()=>clearInterval(N)},[_]);const[P,R]=C.useState(!1),[E,O]=C.useState(null),Q=C.useCallback(async()=>{R(!0),O(null);try{await Lh("/refresh"),window.location.reload()}catch(N){O(String((N==null?void 0:N.message)??N).slice(0,200)),R(!1)}},[]),{pathname:V}=gn(),B=V==="/dashboard"||V==="/security"||V.startsWith("/skill/")||V==="/file";return v.jsxs("div",{className:"app",children:[v.jsx(Ph,{}),v.jsx("a",{className:"skip-link",href:"#main",children:"Skip to content"}),v.jsxs("header",{className:"topbar",children:[v.jsxs(Zl,{to:"/",className:"brand",children:[v.jsx("img",{src:Nh,alt:"",className:"brand-logo"})," Agent Lens"]}),g&&(vn?v.jsx("span",{className:"version-badge","data-tip":`Agent Lens ${g}`,children:g}):v.jsx(Zl,{to:"/about",className:"version-badge","data-tip":`Agent Lens ${g} — open diagnostics`,children:g})),v.jsxs("nav",{className:"nav",children:[v.jsx(Tr,{to:"/",end:!0,className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Sessions"}),v.jsx(Tr,{to:"/files",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Files"}),v.jsx(Tr,{to:"/skills",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Skills"}),v.jsx(Tr,{to:"/security",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Security"}),v.jsx(Tr,{to:"/dashboard",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Dashboard"})]}),u?v.jsxs("span",{className:"tagline","data-tip":`Data last ingested ${new Date(u).toLocaleString()}`,children:["updated ",Ih(u)]}):v.jsx("span",{className:"tagline",children:"local agent session explorer"}),v.jsxs("div",{className:"topbar-actions",children:[!vn&&v.jsxs("button",{type:"button",className:"ghost refresh-btn",onClick:Q,disabled:P,"aria-label":"Refresh data — collect new transcripts and rebuild","data-tip":E?`Refresh failed: ${E}`:"Collect new transcripts and rebuild the data (runs on the host)",children:[v.jsx("span",{className:P?"refresh-icon spinning":"refresh-icon","aria-hidden":"true",children:"⟳"})," ",P?"Refreshing…":E?"Retry":"Refresh"]}),v.jsx("button",{type:"button",className:"ghost theme-toggle",onClick:a,"aria-label":"Toggle light or dark theme","aria-pressed":i==="light","data-tip":i==="dark"?"Switch to light theme":"Switch to dark theme",children:i==="dark"?"☀":"☾"})]})]}),d&&v.jsxs("div",{className:"schema-banner",role:"status",children:["⚠ Data schema is out of date — run ",v.jsx("code",{children:"agent-lens ingest --full"})," on the host to rebuild. The ",v.jsx("em",{children:"Refresh"})," button only does an incremental ingest and won't fix this."]}),v.jsx("main",{className:"content"+(B?" wide":""),id:"main",tabIndex:-1,children:v.jsx(oh,{})}),v.jsx(Ch,{})]})}function Xc(i,a,u={}){const[c,d]=C.useState({data:null,loading:!0,error:null});return C.useEffect(()=>{const m=i();if(!m){d(x=>({...x,loading:!1,error:null}));return}d(x=>({data:u.reset?null:x.data,loading:!0,error:null}));let g=!1;return m.then(x=>!g&&d({data:x,loading:!1,error:null}),x=>!g&&d(_=>({data:_.data,loading:!1,error:String(x)}))),()=>{g=!0}},a),c}function Mh(i,a){return Xc(()=>i===null?null:to(i),[i,...(a==null?void 0:a.deps)??[]],a)}function lu(i,a,u=[]){const[c]=C.useState(a),{data:d}=Xc(()=>i===null?null:to(i),[i,...u]);return d??c}function Fh(i=[]){const[a,u]=kh(),c=i.join(","),d=C.useCallback((_,P="")=>a.get(_)??P,[a]),m=C.useCallback((_,P)=>{const R=new URLSearchParams(a);for(const[E,O]of Object.entries(_))O?R.set(E,O):R.delete(E);for(const E of c?c.split(","):[])E in _||R.delete(E);u(R,P!=null&&P.replace?{replace:!0}:void 0)},[a,u,c]),g=C.useCallback(_=>{const P=new URLSearchParams;for(const R of _){const E=a.get(R);E&&P.set(R,E)}return P},[a]),x=C.useCallback(()=>u(new URLSearchParams),[u]);return{params:a,get:d,set:m,pick:g,clear:x}}function st(){return v.jsx("div",{className:"muted pad",role:"status","aria-live":"polite",children:"Loading…"})}function Jc({error:i}){return i?v.jsx("div",{className:"error",role:"alert",children:i}):null}function km({state:i,empty:a,children:u}){return i.error?v.jsx(Jc,{error:i.error}):i.loading?v.jsx(st,{}):i.data?v.jsx(v.Fragment,{children:u(i.data)}):v.jsx(v.Fragment,{children:a??v.jsx(st,{})})}function Zc(i,a=!0){const u=C.useRef(null),c=C.useRef(i);return c.current=i,C.useEffect(()=>{if(!a)return;const d=m=>{const g=u.current;g&&!g.contains(m.target)&&c.current()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[a]),u}function qc(){const i=Zc(()=>{var a;(a=i.current)!=null&&a.open&&(i.current.open=!1)});return i}const Uh={label:"clear",to:[]},$h=(i,a)=>i.length===a.length&&a.every(u=>i.includes(u));function Rc({label:i,options:a,selected:u,onChange:c,reset:d=Uh,disabled:m,tip:g}){function x(E,O){const Q=new Set(u);O?Q.add(E):Q.delete(E),c(a.map(V=>V.value).filter(V=>Q.has(V)))}const _=qc(),P=$h(u,d.to),R=E=>u.length===1&&u[0]===E&&d.to.length>0;return v.jsxs("details",{className:"multi-select",ref:_,"data-tip":g,children:[v.jsxs("summary",{"aria-label":i,children:[i,P?"":` (${u.length})`," ▾"]}),v.jsxs("div",{className:"col-menu",role:"group","aria-label":i,children:[a.map(E=>v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",checked:u.includes(E.value),disabled:m||R(E.value),onChange:O=>x(E.value,O.target.checked)}),E.label]},E.value)),!P&&v.jsx("button",{type:"button",className:"ghost small ms-clear",onClick:()=>c(d.to),children:d.label})]})]})}function Ah(i){if(!i||i<0)return"—";const a=Math.round(i/1e3);if(a<60)return`${a}s`;const u=Math.round(a/60);return u<60?`${u}m`:`${Math.floor(u/60)}h ${u%60}m`}function zr(i){return i>=1e9?(i/1e9).toFixed(1)+"B":i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"k":String(i)}function Vh(i){return i>=.01?"$"+i.toFixed(2):i>0?"<$0.01":"$0"}const Bh="Estimated at API list prices (cache-aware)";function Wh(i){return i!=null&&i.length?`No list price for ${i.join(", ")} — this total is incomplete. Add rates under "pricing" in agent-lens.config.json, or upgrade for an updated table.`:Bh}function Hh(i){return i?`input ${zr(i.input)} · output ${zr(i.output)} · cache-write ${zr(i.cache_creation)} · cache-read ${zr(i.cache_read)}`:""}function xm(i){return i?i.input+i.output+i.cache_creation:0}function Em(i){return new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Qh(i){if(!i)return"—";const a=new Date(i);return isNaN(a.getTime())?i:a.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function bc(i){return i?i==="<synthetic>"?"local":i.replace(/^claude-/,"").replace(/-\d{8}$/,""):""}function Kh({value:i,options:a,onChange:u,ariaLabel:c,searchPlaceholder:d="Filter…"}){const[m,g]=C.useState(!1),[x,_]=C.useState(""),[P,R]=C.useState(0),E=Zc(()=>g(!1),m),O=C.useRef(null),Q=C.useId(),V=D=>`${Q}-opt-${D}`,B=a.find(D=>D.value===i)??a[0]??{value:"",label:""},N=C.useMemo(()=>{const D=x.trim().toLowerCase();return D?a.filter(Y=>Y.label.toLowerCase().includes(D)):a},[a,x]);C.useEffect(()=>{var Y;if(!m)return;_(""),(Y=O.current)==null||Y.focus();const D=N.findIndex(ae=>ae.value===i);R(D>=0?D:0)},[m]),C.useEffect(()=>{R(D=>Math.min(D,Math.max(0,N.length-1)))},[N.length]);function ne(D){D&&(u(D.value),g(!1))}function q(D){if(D.key==="ArrowDown"){if(D.preventDefault(),!m)return g(!0);R(Y=>Math.min(Y+1,N.length-1))}else D.key==="ArrowUp"?(D.preventDefault(),R(Y=>Math.max(Y-1,0))):D.key==="Enter"?(D.preventDefault(),ne(N[P])):D.key==="Escape"&&(D.preventDefault(),g(!1))}return v.jsxs("div",{className:"filter-select",ref:E,children:[v.jsxs("button",{type:"button",className:"filter-select-btn","aria-label":c,"aria-haspopup":"listbox","aria-expanded":m,onClick:()=>g(D=>!D),children:[v.jsx("span",{className:"filter-select-value"+(B.value?"":" muted"),children:B.label}),v.jsx("span",{className:"chev","aria-hidden":"true",children:"▾"})]}),m&&v.jsxs("div",{className:"filter-select-pop",children:[v.jsx("input",{ref:O,type:"text",role:"combobox","aria-expanded":"true","aria-controls":Q,"aria-activedescendant":N.length?V(P):void 0,"aria-label":c,className:"filter-select-search",placeholder:d,value:x,onChange:D=>_(D.target.value),onKeyDown:q}),v.jsx("ul",{className:"filter-select-list",role:"listbox",id:Q,"aria-label":c,children:N.length===0?v.jsx("li",{className:"filter-select-empty muted",role:"presentation",children:"No matches"}):N.map((D,Y)=>v.jsx("li",{id:V(Y),role:"option","aria-selected":D.value===i,className:"filter-select-opt"+(Y===P?" is-active":"")+(D.value===i?" is-selected":""),onMouseEnter:()=>R(Y),onMouseDown:ae=>{ae.preventDefault(),ne(D)},children:D.value?D.label:v.jsx("span",{className:"muted",children:D.label})},D.value||"__all__"))})]})]})}function Yh({page:i,pages:a,total:u,unit:c,onPage:d}){return v.jsxs("div",{className:"pager",children:[v.jsx("button",{disabled:i<=1,onClick:()=>d(i-1),children:"← Prev"}),v.jsxs("span",{className:"muted",children:["page ",i," / ",a," · ",u," ",c]}),v.jsx("button",{disabled:i>=a,onClick:()=>d(i+1),children:"Next →"}),a>1&&v.jsxs("label",{className:"page-jump",children:[v.jsx("span",{className:"sr-only",children:"Jump to page"}),v.jsx("select",{value:i,onChange:m=>d(Number(m.target.value)),children:Array.from({length:a},(m,g)=>g+1).map(m=>v.jsxs("option",{value:m,children:["page ",m," / ",a]},m))})]})]})}function Cm(i,a,u){const c=u==="asc"?1:-1;return i.map((d,m)=>({row:d,i:m})).sort((d,m)=>{const g=a(d.row),x=a(m.row);if(g==null&&x==null)return d.i-m.i;if(g==null)return 1;if(x==null)return-1;const _=typeof g=="number"&&typeof x=="number"?g-x:String(g).localeCompare(String(x),void 0,{numeric:!0,sensitivity:"base"});return _!==0?_*c:d.i-m.i}).map(d=>d.row)}function _m(i,a){const[u,c]=C.useState({key:i,dir:a});return{sort:u,toggle:(m,g="desc")=>c(x=>x.key===m?{key:m,dir:x.dir==="asc"?"desc":"asc"}:{key:m,dir:g})}}function Gh({label:i,sortKey:a,active:u,dir:c,onSort:d,defaultDir:m="desc",className:g}){const x=u===a;return v.jsx("th",{className:g,"aria-sort":x?c==="asc"?"ascending":"descending":"none",children:v.jsxs("button",{type:"button",className:"sort-th"+(x?" is-active":""),onClick:()=>d(a,m),children:[v.jsx("span",{children:i}),v.jsx("span",{className:"sort-ind","aria-hidden":"true",children:x?c==="asc"?"▲":"▼":"↕"})]})})}const ef="agentlens.";function Xh(i,a){try{const u=localStorage.getItem(ef+i);return u==null?a:JSON.parse(u)}catch{return a}}async function Jh(i){if(vn)return null;try{return(await to(`/prefs/${encodeURIComponent(i)}`)).value??null}catch{return null}}function Zh(i,a){try{localStorage.setItem(ef+i,JSON.stringify(a))}catch{}vn||fetch(`/api/prefs/${encodeURIComponent(i)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({value:a})}).catch(()=>{})}const tf=[{id:"session",label:"Session",toggleable:!1,defaultVisible:!0,sortKey:"title",sortDefaultDir:"asc",cell:(i,a)=>v.jsxs("td",{children:[v.jsx(Zl,{to:`/session/${i.id}${a?`?q=${encodeURIComponent(a)}`:""}`,className:"title",children:i.title||v.jsx("span",{className:"muted",children:i.id.slice(0,12)})}),v.jsxs("div",{className:"sub",children:[i.is_sidechain?v.jsx("span",{className:"tag subagent",children:"subagent"}):null,(i.models??"").split(",").filter(Boolean).slice(0,3).map(u=>v.jsx("span",{className:"tag",children:bc(u)},u))]})]})},{id:"source",label:"Source",toggleable:!0,defaultVisible:!0,cell:i=>v.jsx("td",{children:i.source_id})},{id:"project",label:"Project",toggleable:!0,defaultVisible:!0,cell:i=>{var a;return v.jsx("td",{className:"path",children:((a=i.project_path)==null?void 0:a.replace(/^.*\//,""))??"—"})}},{id:"turns",label:"Turns",toggleable:!0,defaultVisible:!0,sortKey:"turns",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:i.turn_count})},{id:"tokens",label:"Tokens",toggleable:!0,defaultVisible:!0,sortKey:"tokens",thClassName:"num",cell:i=>v.jsx("td",{className:"num","data-tip":Hh(i.token_split),children:zr(i.tokens)})},{id:"security",label:"Security",toggleable:!0,defaultVisible:!0,sortKey:"security",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:i.finding_count>0&&i.worst_severity?v.jsxs("span",{className:"sec-count","aria-label":`${i.finding_count} finding${i.finding_count===1?"":"s"}, highest severity ${i.worst_severity}`,"data-tip":`${i.finding_count} finding${i.finding_count===1?"":"s"} · highest severity: ${i.worst_severity}`,children:[v.jsx("span",{className:"sev-dot sev-"+i.worst_severity,"aria-hidden":"true"}),i.finding_count]}):v.jsx("span",{className:"muted",children:"—"})})},{id:"errors",label:"Errors",toggleable:!0,defaultVisible:!0,sortKey:"errors",thClassName:"num",cell:i=>v.jsx("td",{className:"num","data-tip":i.tool_call_count>0?`${i.tool_error_count}/${i.tool_call_count} tool calls returned an error (includes user-rejected/guardrail-blocked; see the session for the failure vs declined split)`:"no tool calls",children:i.tool_error_count>0?v.jsx("span",{className:"tool-err-stat",children:i.tool_error_count}):v.jsx("span",{className:"muted",children:"—"})})},{id:"duration",label:"Duration",toggleable:!0,defaultVisible:!0,sortKey:"duration",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:Ah(i.duration_ms)})},{id:"cost",label:"Cost",toggleable:!0,defaultVisible:!1,sortKey:"cost",thClassName:"num",cell:i=>{var a;return v.jsxs("td",{className:"num","data-tip":Wh(i.unpriced_models),children:[Vh(i.cost),(a=i.unpriced_models)!=null&&a.length?v.jsx("span",{className:"warn-tag",children:" ⚠"}):null]})}},{id:"started",label:"Started",toggleable:!0,defaultVisible:!0,sortKey:"started",cell:i=>v.jsx("td",{children:Qh(i.started_at)})}],fu=tf.filter(i=>i.toggleable),du="sessions.columns";function nf(i){if(!Array.isArray(i))return new Set(fu.filter(u=>u.defaultVisible).map(u=>u.id));const a=new Set(fu.map(u=>u.id));return new Set(i.filter(u=>typeof u=="string"&&a.has(u)))}function qh(){return nf(Xh(du,null))}const Gl=50,bh={total:0,sessions:[]},em=[{value:"critical",label:"critical"},{value:"high",label:"high"},{value:"medium",label:"medium"},{value:"low",label:"low"},{value:"info",label:"info"}],tm=[{value:"command-failed",label:"command failed"},{value:"file-state",label:"file state"},{value:"string-not-found",label:"string not found"},{value:"token-limit",label:"token limit"},{value:"other",label:"other"},{value:"user-rejected",label:"user rejected"},{value:"guardrail-blocked",label:"guardrail blocked"}];function nm({visible:i,onToggle:a}){const u=qc();return v.jsxs("details",{className:"col-customizer",ref:u,children:[v.jsx("summary",{"aria-label":"Show or hide columns","data-tip":"Show/hide columns",children:"⚙"}),v.jsx("div",{className:"col-menu",role:"group","aria-label":"Toggle columns",children:fu.map(c=>v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",checked:i.has(c.id),onChange:d=>a(c.id,d.target.checked)}),c.label]},c.id))})]})}function rm(){const{get:i,set:a,pick:u}=Fh(["offset"]),c=lu("/sources",[]),d=lu("/projects",[]),m=lu("/models",[]),[g,x]=C.useState(i("q")),[_,P]=C.useState(qh),R=Number(i("offset","0"));C.useEffect(()=>{Jh(du).then(U=>U!=null&&P(nf(U)))},[]);const E=u(["source","project","model","q","sort","dir","severity","error_type"]);E.set("kind",i("kind")||"main"),E.set("limit",String(Gl)),E.set("offset",String(R));const{data:O,loading:Q,error:V}=Mh("/sessions?"+E.toString()),{total:B,sessions:N}=O??bh;function ne(U){U.preventDefault(),a({q:g.trim()})}function q(U,Ce){P(at=>{const $e=new Set(at);return Ce?$e.add(U):$e.delete(U),Zh(du,[...$e]),$e})}const D=i("sort","started"),Y=i("dir")==="asc"?"asc":"desc";function ae(U,Ce){a({sort:U,dir:D===U?Y==="asc"?"desc":"asc":Ce})}const ke=Math.floor(R/Gl)+1,Pe=Math.max(1,Math.ceil(B/Gl)),Ne=tf.filter(U=>!U.toggleable||_.has(U.id));return v.jsxs("div",{children:[v.jsx("h1",{className:"sr-only",children:"Sessions"}),v.jsxs("div",{className:"filters",children:[v.jsxs("form",{onSubmit:ne,className:"search",role:"search",children:[v.jsx("input",{type:"search","aria-label":"Search session names, projects and transcripts",placeholder:"Search names, projects & transcripts…",value:g,onChange:U=>x(U.target.value)}),v.jsx("button",{type:"submit",children:"Search"}),i("q")&&v.jsx("button",{type:"button",className:"ghost",onClick:()=>(x(""),a({q:""})),children:"clear"})]}),v.jsxs("select",{"aria-label":"Filter by source",value:i("source"),onChange:U=>a({source:U.target.value}),children:[v.jsx("option",{value:"",children:"all sources"}),c.map(U=>v.jsxs("option",{value:U.id,children:[U.label," (",U.session_count,")"]},U.id))]}),v.jsx(Kh,{ariaLabel:"Filter by project",searchPlaceholder:"Find project…",value:i("project"),onChange:U=>a({project:U}),options:[{value:"",label:"all projects"},...d.map(U=>({value:U.id,label:`${U.path.replace(/^.*\//,"")} (${U.session_count})`}))]}),v.jsxs("select",{"aria-label":"Filter by model",value:i("model"),onChange:U=>a({model:U.target.value}),children:[v.jsx("option",{value:"",children:"all models"}),m.map(U=>v.jsx("option",{value:U,children:bc(U)},U))]}),v.jsxs("select",{"aria-label":"Filter by kind",value:i("kind")||"main",onChange:U=>a({kind:U.target.value}),children:[v.jsx("option",{value:"main",children:"main only"}),v.jsx("option",{value:"all",children:"main + subagents"}),v.jsx("option",{value:"subagent",children:"subagents only"})]}),v.jsx(Rc,{label:"Security",options:em,selected:i("severity").split(",").filter(Boolean),onChange:U=>a({severity:U.join(",")})}),v.jsx(Rc,{label:"Errors",options:tm,selected:i("error_type").split(",").filter(Boolean),onChange:U=>a({error_type:U.join(",")})})]}),v.jsx(Jc,{error:V}),Q?v.jsx(st,{}):N.length===0?v.jsx("div",{className:"muted pad",role:"status",children:"No sessions match."}):v.jsxs("table",{className:"sessions",children:[v.jsx("thead",{children:v.jsxs("tr",{children:[Ne.map(U=>U.sortKey?v.jsx(Gh,{label:U.label,sortKey:U.sortKey,active:D,dir:Y,onSort:ae,defaultDir:U.sortDefaultDir??"desc",className:U.thClassName},U.id):v.jsx("th",{className:U.thClassName,children:U.label},U.id)),v.jsx("th",{className:"col-th","aria-label":"Columns",children:v.jsx(nm,{visible:_,onToggle:q})})]})}),v.jsx("tbody",{children:N.map(U=>v.jsxs("tr",{children:[Ne.map(Ce=>v.jsx(C.Fragment,{children:Ce.cell(U,i("q"))},Ce.id)),v.jsx("td",{className:"col-td"})]},U.id))})]}),v.jsx(Yh,{page:ke,pages:Pe,total:B,unit:"sessions",onPage:U=>a({offset:String((U-1)*Gl)})})]})}function Lc(i){const a=String((i==null?void 0:i.message)??i??"");return/dynamically imported module/i.test(a)||/Importing a module script failed/i.test(a)||/Failed to load module script/i.test(a)}const Tc="agent-lens:stale-chunk-reload";function lm(){try{const i=Number(sessionStorage.getItem(Tc));return i&&Date.now()-i<6e4?!1:(sessionStorage.setItem(Tc,String(Date.now())),!0)}catch{return!1}}class om extends hu.Component{constructor(){super(...arguments);cc(this,"state",{error:null,stale:!1})}static getDerivedStateFromError(u){return{error:u,stale:Lc(u)}}componentDidCatch(u){Lc(u)&&lm()&&window.location.reload()}render(){const{error:u,stale:c}=this.state;return u?v.jsxs("div",{className:"pad",role:"alert",children:[v.jsx("div",{className:"error",children:c?"This page was loaded from an older build of Agent Lens and part of it is no longer on the server.":`Something went wrong rendering this view: ${u.message}`}),v.jsx("button",{type:"button",className:"ghost",onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}const im=C.lazy(()=>zt(()=>import("./Dashboard-CH8nv5ZK.js"),__vite__mapDeps([0,1]))),um=C.lazy(()=>zt(()=>import("./SessionView-Bt-NmoU3.js"),__vite__mapDeps([2,3,4,5,1]))),sm=C.lazy(()=>zt(()=>import("./WorkflowView-CtFEKBzS.js"),__vite__mapDeps([6,3,5]))),am=C.lazy(()=>zt(()=>import("./SkillsView-CNX1nAkf.js"),[])),cm=C.lazy(()=>zt(()=>import("./SkillView-DQEklf89.js"),__vite__mapDeps([7,5]))),fm=C.lazy(()=>zt(()=>import("./FilesView-38qLTWbj.js"),[])),dm=C.lazy(()=>zt(()=>import("./FileView-CtovgU1g.js"),__vite__mapDeps([8,9]))),pm=C.lazy(()=>zt(()=>import("./SecurityView-CmKLXZP9.js"),__vite__mapDeps([10,4]))),hm=C.lazy(()=>zt(()=>import("./AboutView-Crn85usU.js"),[])),mm="/".replace(/\/$/,"");hp.createRoot(document.getElementById("root")).render(v.jsx(hu.StrictMode,{children:v.jsx(zh,{children:v.jsx(om,{children:v.jsx(vh,{basename:mm,children:v.jsx(uh,{children:v.jsxs(ut,{path:"/",element:v.jsx(Dh,{}),children:[v.jsx(ut,{index:!0,element:v.jsx(rm,{})}),v.jsx(ut,{path:"dashboard",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(im,{})})}),v.jsx(ut,{path:"session/:id",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(um,{})})}),v.jsx(ut,{path:"workflow/:run_id",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(sm,{})})}),v.jsx(ut,{path:"files",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(fm,{})})}),v.jsx(ut,{path:"file",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(dm,{})})}),v.jsx(ut,{path:"skills",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(am,{})})}),v.jsx(ut,{path:"skill/:name",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(cm,{})})}),v.jsx(ut,{path:"security",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(pm,{})})}),!vn&&v.jsx(ut,{path:"about",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(hm,{})})})]})})})})})}));export{Em as A,ym as B,Oh as C,km as D,Jc as E,_m as F,Cm as G,Kh as H,Gh as I,kh as J,Lh as K,Zl as L,Rc as M,Yh as P,hu as R,vn as S,Vh as a,Ah as b,gm as c,qc as d,Jh as e,zr as f,op as g,Zh as h,Fh as i,v as j,lu as k,Xh as l,Xc as m,st as n,to as o,Mh as p,Sm as q,C as r,bc as s,Hh as t,Bc as u,Wh as v,Qh as w,xm as x,wm as y,gn as z};
|
|
69
|
+
${i}`;let c=3735928559,d=1103547991;for(let m=0;m<u.length;m++){const g=u.charCodeAt(m);c=Math.imul(c^g,2654435761),d=Math.imul(d^g,1597334677)}return c=Math.imul(c^c>>>16,2246822507)^Math.imul(d^d>>>13,3266489909),d=Math.imul(d^d>>>16,2246822507)^Math.imul(c^c>>>13,3266489909),(4294967296*(2097151&d)+(c>>>0)).toString(36)}function Sm(i,a){return vn?`${cu}snapshot/sessions/${i}.export.md`:`/api/sessions/${i}/export.md${a?`?redact=${a}`:""}`}async function to(i){const a=await fetch(jh(i));if(!a.ok)throw new Error(`${a.status} ${await a.text()}`);return a.json()}async function Lh(i,a){const u=await fetch("/api"+i,{method:"POST",...a!==void 0?{headers:{"content-type":"application/json"},body:JSON.stringify(a)}:{}});if(!u.ok)throw new Error(`${u.status} ${await u.text()}`);return u.json()}const Yc="agentlens.theme";function Th(){if(typeof document<"u"){const i=document.documentElement.dataset.theme;if(i==="light"||i==="dark")return i}try{const i=localStorage.getItem(Yc);if(i==="light"||i==="dark")return i}catch{}return"dark"}const Gc=C.createContext({theme:"dark",toggle:()=>{}});function zh({children:i}){const[a,u]=C.useState(Th);typeof document<"u"&&(document.documentElement.dataset.theme=a),C.useEffect(()=>{try{localStorage.setItem(Yc,a)}catch{}},[a]);const c=()=>u(d=>d==="dark"?"light":"dark");return v.jsx(Gc.Provider,{value:{theme:a,toggle:c},children:i})}function Oh(){return C.useContext(Gc)}function Ih(i){const a=Math.round((Date.now()-new Date(i).getTime())/1e3);if(a<45)return"just now";const u=Math.round(a/60);if(u<60)return`${u}m ago`;const c=Math.round(u/60);return c<24?`${c}h ago`:`${Math.round(c/24)}d ago`}function Dh(){const{theme:i,toggle:a}=Oh(),[u,c]=C.useState(null),[d,m]=C.useState(!1),[g,x]=C.useState(null),_=C.useCallback(()=>{to("/health").then(N=>{c(N.last_ingested??null),m(!!N.schema_stale),x(N.version??null)}).catch(()=>{})},[]);C.useEffect(()=>{_();const N=setInterval(_,6e4);return()=>clearInterval(N)},[_]);const[P,R]=C.useState(!1),[E,O]=C.useState(null),Q=C.useCallback(async()=>{R(!0),O(null);try{await Lh("/refresh"),window.location.reload()}catch(N){O(String((N==null?void 0:N.message)??N).slice(0,200)),R(!1)}},[]),{pathname:V}=gn(),B=V==="/dashboard"||V==="/security"||V.startsWith("/skill/")||V==="/file";return v.jsxs("div",{className:"app",children:[v.jsx(Ph,{}),v.jsx("a",{className:"skip-link",href:"#main",children:"Skip to content"}),v.jsxs("header",{className:"topbar",children:[v.jsxs(Zl,{to:"/",className:"brand",children:[v.jsx("img",{src:Nh,alt:"",className:"brand-logo"})," Agent Lens"]}),g&&(vn?v.jsx("span",{className:"version-badge","data-tip":`Agent Lens ${g}`,children:g}):v.jsx(Zl,{to:"/about",className:"version-badge","data-tip":`Agent Lens ${g} — open diagnostics`,children:g})),v.jsxs("nav",{className:"nav",children:[v.jsx(Tr,{to:"/",end:!0,className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Sessions"}),v.jsx(Tr,{to:"/files",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Files"}),v.jsx(Tr,{to:"/skills",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Skills"}),v.jsx(Tr,{to:"/security",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Security"}),v.jsx(Tr,{to:"/dashboard",className:({isActive:N})=>N?"nav-link active":"nav-link",children:"Dashboard"})]}),u?v.jsxs("span",{className:"tagline","data-tip":`Data last ingested ${new Date(u).toLocaleString()}`,children:["updated ",Ih(u)]}):v.jsx("span",{className:"tagline",children:"local agent session explorer"}),v.jsxs("div",{className:"topbar-actions",children:[!vn&&v.jsxs("button",{type:"button",className:"ghost refresh-btn",onClick:Q,disabled:P,"aria-label":"Refresh data — collect new transcripts and rebuild","data-tip":E?`Refresh failed: ${E}`:"Collect new transcripts and rebuild the data (runs on the host)",children:[v.jsx("span",{className:P?"refresh-icon spinning":"refresh-icon","aria-hidden":"true",children:"⟳"})," ",P?"Refreshing…":E?"Retry":"Refresh"]}),v.jsx("button",{type:"button",className:"ghost theme-toggle",onClick:a,"aria-label":"Toggle light or dark theme","aria-pressed":i==="light","data-tip":i==="dark"?"Switch to light theme":"Switch to dark theme",children:i==="dark"?"☀":"☾"})]})]}),d&&v.jsxs("div",{className:"schema-banner",role:"status",children:["⚠ Data schema is out of date — run ",v.jsx("code",{children:"agent-lens ingest --full"})," on the host to rebuild. The ",v.jsx("em",{children:"Refresh"})," button only does an incremental ingest and won't fix this."]}),v.jsx("main",{className:"content"+(B?" wide":""),id:"main",tabIndex:-1,children:v.jsx(oh,{})}),v.jsx(Ch,{})]})}function Xc(i,a,u={}){const[c,d]=C.useState({data:null,loading:!0,error:null});return C.useEffect(()=>{const m=i();if(!m){d(x=>({...x,loading:!1,error:null}));return}d(x=>({data:u.reset?null:x.data,loading:!0,error:null}));let g=!1;return m.then(x=>!g&&d({data:x,loading:!1,error:null}),x=>!g&&d(_=>({data:_.data,loading:!1,error:String(x)}))),()=>{g=!0}},a),c}function Mh(i,a){return Xc(()=>i===null?null:to(i),[i,...(a==null?void 0:a.deps)??[]],a)}function lu(i,a,u=[]){const[c]=C.useState(a),{data:d}=Xc(()=>i===null?null:to(i),[i,...u]);return d??c}function Fh(i=[]){const[a,u]=kh(),c=i.join(","),d=C.useCallback((_,P="")=>a.get(_)??P,[a]),m=C.useCallback((_,P)=>{const R=new URLSearchParams(a);for(const[E,O]of Object.entries(_))O?R.set(E,O):R.delete(E);for(const E of c?c.split(","):[])E in _||R.delete(E);u(R,P!=null&&P.replace?{replace:!0}:void 0)},[a,u,c]),g=C.useCallback(_=>{const P=new URLSearchParams;for(const R of _){const E=a.get(R);E&&P.set(R,E)}return P},[a]),x=C.useCallback(()=>u(new URLSearchParams),[u]);return{params:a,get:d,set:m,pick:g,clear:x}}function st(){return v.jsx("div",{className:"muted pad",role:"status","aria-live":"polite",children:"Loading…"})}function Jc({error:i}){return i?v.jsx("div",{className:"error",role:"alert",children:i}):null}function km({state:i,empty:a,children:u}){return i.error?v.jsx(Jc,{error:i.error}):i.loading?v.jsx(st,{}):i.data?v.jsx(v.Fragment,{children:u(i.data)}):v.jsx(v.Fragment,{children:a??v.jsx(st,{})})}function Zc(i,a=!0){const u=C.useRef(null),c=C.useRef(i);return c.current=i,C.useEffect(()=>{if(!a)return;const d=m=>{const g=u.current;g&&!g.contains(m.target)&&c.current()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[a]),u}function qc(){const i=Zc(()=>{var a;(a=i.current)!=null&&a.open&&(i.current.open=!1)});return i}const Uh={label:"clear",to:[]},$h=(i,a)=>i.length===a.length&&a.every(u=>i.includes(u));function Rc({label:i,options:a,selected:u,onChange:c,reset:d=Uh,disabled:m,tip:g}){function x(E,O){const Q=new Set(u);O?Q.add(E):Q.delete(E),c(a.map(V=>V.value).filter(V=>Q.has(V)))}const _=qc(),P=$h(u,d.to),R=E=>u.length===1&&u[0]===E&&d.to.length>0;return v.jsxs("details",{className:"multi-select",ref:_,"data-tip":g,children:[v.jsxs("summary",{"aria-label":i,children:[i,P?"":` (${u.length})`," ▾"]}),v.jsxs("div",{className:"col-menu",role:"group","aria-label":i,children:[a.map(E=>v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",checked:u.includes(E.value),disabled:m||R(E.value),onChange:O=>x(E.value,O.target.checked)}),E.label]},E.value)),!P&&v.jsx("button",{type:"button",className:"ghost small ms-clear",onClick:()=>c(d.to),children:d.label})]})]})}function Ah(i){if(!i||i<0)return"—";const a=Math.round(i/1e3);if(a<60)return`${a}s`;const u=Math.round(a/60);return u<60?`${u}m`:`${Math.floor(u/60)}h ${u%60}m`}function zr(i){return i>=1e9?(i/1e9).toFixed(1)+"B":i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"k":String(i)}function Vh(i){return i>=.01?"$"+i.toFixed(2):i>0?"<$0.01":"$0"}const Bh="Estimated at API list prices (cache-aware)";function Wh(i){return i!=null&&i.length?`No list price for ${i.join(", ")} — this total is incomplete. Add rates under "pricing" in agent-lens.config.json, or upgrade for an updated table.`:Bh}function Hh(i){return i?`input ${zr(i.input)} · output ${zr(i.output)} · cache-write ${zr(i.cache_creation)} · cache-read ${zr(i.cache_read)}`:""}function xm(i){return i?i.input+i.output+i.cache_creation:0}function Em(i){return new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Qh(i){if(!i)return"—";const a=new Date(i);return isNaN(a.getTime())?i:a.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function bc(i){return i?i==="<synthetic>"?"local":i.replace(/^claude-/,"").replace(/-\d{8}$/,""):""}function Kh({value:i,options:a,onChange:u,ariaLabel:c,searchPlaceholder:d="Filter…"}){const[m,g]=C.useState(!1),[x,_]=C.useState(""),[P,R]=C.useState(0),E=Zc(()=>g(!1),m),O=C.useRef(null),Q=C.useId(),V=D=>`${Q}-opt-${D}`,B=a.find(D=>D.value===i)??a[0]??{value:"",label:""},N=C.useMemo(()=>{const D=x.trim().toLowerCase();return D?a.filter(Y=>Y.label.toLowerCase().includes(D)):a},[a,x]);C.useEffect(()=>{var Y;if(!m)return;_(""),(Y=O.current)==null||Y.focus();const D=N.findIndex(ae=>ae.value===i);R(D>=0?D:0)},[m]),C.useEffect(()=>{R(D=>Math.min(D,Math.max(0,N.length-1)))},[N.length]);function ne(D){D&&(u(D.value),g(!1))}function q(D){if(D.key==="ArrowDown"){if(D.preventDefault(),!m)return g(!0);R(Y=>Math.min(Y+1,N.length-1))}else D.key==="ArrowUp"?(D.preventDefault(),R(Y=>Math.max(Y-1,0))):D.key==="Enter"?(D.preventDefault(),ne(N[P])):D.key==="Escape"&&(D.preventDefault(),g(!1))}return v.jsxs("div",{className:"filter-select",ref:E,children:[v.jsxs("button",{type:"button",className:"filter-select-btn","aria-label":c,"aria-haspopup":"listbox","aria-expanded":m,onClick:()=>g(D=>!D),children:[v.jsx("span",{className:"filter-select-value"+(B.value?"":" muted"),children:B.label}),v.jsx("span",{className:"chev","aria-hidden":"true",children:"▾"})]}),m&&v.jsxs("div",{className:"filter-select-pop",children:[v.jsx("input",{ref:O,type:"text",role:"combobox","aria-expanded":"true","aria-controls":Q,"aria-activedescendant":N.length?V(P):void 0,"aria-label":c,className:"filter-select-search",placeholder:d,value:x,onChange:D=>_(D.target.value),onKeyDown:q}),v.jsx("ul",{className:"filter-select-list",role:"listbox",id:Q,"aria-label":c,children:N.length===0?v.jsx("li",{className:"filter-select-empty muted",role:"presentation",children:"No matches"}):N.map((D,Y)=>v.jsx("li",{id:V(Y),role:"option","aria-selected":D.value===i,className:"filter-select-opt"+(Y===P?" is-active":"")+(D.value===i?" is-selected":""),onMouseEnter:()=>R(Y),onMouseDown:ae=>{ae.preventDefault(),ne(D)},children:D.value?D.label:v.jsx("span",{className:"muted",children:D.label})},D.value||"__all__"))})]})]})}function Yh({page:i,pages:a,total:u,unit:c,onPage:d}){return v.jsxs("div",{className:"pager",children:[v.jsx("button",{disabled:i<=1,onClick:()=>d(i-1),children:"← Prev"}),v.jsxs("span",{className:"muted",children:["page ",i," / ",a," · ",u," ",c]}),v.jsx("button",{disabled:i>=a,onClick:()=>d(i+1),children:"Next →"}),a>1&&v.jsxs("label",{className:"page-jump",children:[v.jsx("span",{className:"sr-only",children:"Jump to page"}),v.jsx("select",{value:i,onChange:m=>d(Number(m.target.value)),children:Array.from({length:a},(m,g)=>g+1).map(m=>v.jsxs("option",{value:m,children:["page ",m," / ",a]},m))})]})]})}function Cm(i,a,u){const c=u==="asc"?1:-1;return i.map((d,m)=>({row:d,i:m})).sort((d,m)=>{const g=a(d.row),x=a(m.row);if(g==null&&x==null)return d.i-m.i;if(g==null)return 1;if(x==null)return-1;const _=typeof g=="number"&&typeof x=="number"?g-x:String(g).localeCompare(String(x),void 0,{numeric:!0,sensitivity:"base"});return _!==0?_*c:d.i-m.i}).map(d=>d.row)}function _m(i,a){const[u,c]=C.useState({key:i,dir:a});return{sort:u,toggle:(m,g="desc")=>c(x=>x.key===m?{key:m,dir:x.dir==="asc"?"desc":"asc"}:{key:m,dir:g})}}function Gh({label:i,sortKey:a,active:u,dir:c,onSort:d,defaultDir:m="desc",className:g}){const x=u===a;return v.jsx("th",{className:g,"aria-sort":x?c==="asc"?"ascending":"descending":"none",children:v.jsxs("button",{type:"button",className:"sort-th"+(x?" is-active":""),onClick:()=>d(a,m),children:[v.jsx("span",{children:i}),v.jsx("span",{className:"sort-ind","aria-hidden":"true",children:x?c==="asc"?"▲":"▼":"↕"})]})})}const ef="agentlens.";function Xh(i,a){try{const u=localStorage.getItem(ef+i);return u==null?a:JSON.parse(u)}catch{return a}}async function Jh(i){if(vn)return null;try{return(await to(`/prefs/${encodeURIComponent(i)}`)).value??null}catch{return null}}function Zh(i,a){try{localStorage.setItem(ef+i,JSON.stringify(a))}catch{}vn||fetch(`/api/prefs/${encodeURIComponent(i)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({value:a})}).catch(()=>{})}const tf=[{id:"session",label:"Session",toggleable:!1,defaultVisible:!0,sortKey:"title",sortDefaultDir:"asc",cell:(i,a)=>v.jsxs("td",{children:[v.jsx(Zl,{to:`/session/${i.id}${a?`?q=${encodeURIComponent(a)}`:""}`,className:"title",children:i.title||v.jsx("span",{className:"muted",children:i.id.slice(0,12)})}),v.jsxs("div",{className:"sub",children:[i.is_sidechain?v.jsx("span",{className:"tag subagent",children:"subagent"}):null,(i.models??"").split(",").filter(Boolean).slice(0,3).map(u=>v.jsx("span",{className:"tag",children:bc(u)},u))]})]})},{id:"source",label:"Source",toggleable:!0,defaultVisible:!0,cell:i=>v.jsx("td",{children:i.source_id})},{id:"project",label:"Project",toggleable:!0,defaultVisible:!0,cell:i=>{var a;return v.jsx("td",{className:"path",children:((a=i.project_path)==null?void 0:a.replace(/^.*\//,""))??"—"})}},{id:"turns",label:"Turns",toggleable:!0,defaultVisible:!0,sortKey:"turns",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:i.turn_count})},{id:"tokens",label:"Tokens",toggleable:!0,defaultVisible:!0,sortKey:"tokens",thClassName:"num",cell:i=>v.jsx("td",{className:"num","data-tip":Hh(i.token_split),children:zr(i.tokens)})},{id:"security",label:"Security",toggleable:!0,defaultVisible:!0,sortKey:"security",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:i.finding_count>0&&i.worst_severity?v.jsxs("span",{className:"sec-count","aria-label":`${i.finding_count} finding${i.finding_count===1?"":"s"}, highest severity ${i.worst_severity}`,"data-tip":`${i.finding_count} finding${i.finding_count===1?"":"s"} · highest severity: ${i.worst_severity}`,children:[v.jsx("span",{className:"sev-dot sev-"+i.worst_severity,"aria-hidden":"true"}),i.finding_count]}):v.jsx("span",{className:"muted",children:"—"})})},{id:"errors",label:"Errors",toggleable:!0,defaultVisible:!0,sortKey:"errors",thClassName:"num",cell:i=>v.jsx("td",{className:"num","data-tip":i.tool_call_count>0?`${i.tool_error_count}/${i.tool_call_count} tool calls returned an error (includes user-rejected/guardrail-blocked; see the session for the failure vs declined split)`:"no tool calls",children:i.tool_error_count>0?v.jsx("span",{className:"tool-err-stat",children:i.tool_error_count}):v.jsx("span",{className:"muted",children:"—"})})},{id:"duration",label:"Duration",toggleable:!0,defaultVisible:!0,sortKey:"duration",thClassName:"num",cell:i=>v.jsx("td",{className:"num",children:Ah(i.duration_ms)})},{id:"cost",label:"Cost",toggleable:!0,defaultVisible:!1,sortKey:"cost",thClassName:"num",cell:i=>{var a;return v.jsxs("td",{className:"num","data-tip":Wh(i.unpriced_models),children:[Vh(i.cost),(a=i.unpriced_models)!=null&&a.length?v.jsx("span",{className:"warn-tag",children:" ⚠"}):null]})}},{id:"started",label:"Started",toggleable:!0,defaultVisible:!0,sortKey:"started",cell:i=>v.jsx("td",{children:Qh(i.started_at)})}],fu=tf.filter(i=>i.toggleable),du="sessions.columns";function nf(i){if(!Array.isArray(i))return new Set(fu.filter(u=>u.defaultVisible).map(u=>u.id));const a=new Set(fu.map(u=>u.id));return new Set(i.filter(u=>typeof u=="string"&&a.has(u)))}function qh(){return nf(Xh(du,null))}const Gl=50,bh={total:0,sessions:[]},em=[{value:"critical",label:"critical"},{value:"high",label:"high"},{value:"medium",label:"medium"},{value:"low",label:"low"},{value:"info",label:"info"}],tm=[{value:"command-failed",label:"command failed"},{value:"file-state",label:"file state"},{value:"string-not-found",label:"string not found"},{value:"token-limit",label:"token limit"},{value:"other",label:"other"},{value:"user-rejected",label:"user rejected"},{value:"guardrail-blocked",label:"guardrail blocked"}];function nm({visible:i,onToggle:a}){const u=qc();return v.jsxs("details",{className:"col-customizer",ref:u,children:[v.jsx("summary",{"aria-label":"Show or hide columns","data-tip":"Show/hide columns",children:"⚙"}),v.jsx("div",{className:"col-menu",role:"group","aria-label":"Toggle columns",children:fu.map(c=>v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",checked:i.has(c.id),onChange:d=>a(c.id,d.target.checked)}),c.label]},c.id))})]})}function rm(){const{get:i,set:a,pick:u}=Fh(["offset"]),c=lu("/sources",[]),d=lu("/projects",[]),m=lu("/models",[]),[g,x]=C.useState(i("q")),[_,P]=C.useState(qh),R=Number(i("offset","0"));C.useEffect(()=>{Jh(du).then(U=>U!=null&&P(nf(U)))},[]);const E=u(["source","project","model","q","sort","dir","severity","error_type"]);E.set("kind",i("kind")||"main"),E.set("limit",String(Gl)),E.set("offset",String(R));const{data:O,loading:Q,error:V}=Mh("/sessions?"+E.toString()),{total:B,sessions:N}=O??bh;function ne(U){U.preventDefault(),a({q:g.trim()})}function q(U,Ce){P(at=>{const $e=new Set(at);return Ce?$e.add(U):$e.delete(U),Zh(du,[...$e]),$e})}const D=i("sort","started"),Y=i("dir")==="asc"?"asc":"desc";function ae(U,Ce){a({sort:U,dir:D===U?Y==="asc"?"desc":"asc":Ce})}const ke=Math.floor(R/Gl)+1,Pe=Math.max(1,Math.ceil(B/Gl)),Ne=tf.filter(U=>!U.toggleable||_.has(U.id));return v.jsxs("div",{children:[v.jsx("h1",{className:"sr-only",children:"Sessions"}),v.jsxs("div",{className:"filters",children:[v.jsxs("form",{onSubmit:ne,className:"search",role:"search",children:[v.jsx("input",{type:"search","aria-label":"Search session names, projects and transcripts",placeholder:"Search names, projects & transcripts…",value:g,onChange:U=>x(U.target.value)}),v.jsx("button",{type:"submit",children:"Search"}),i("q")&&v.jsx("button",{type:"button",className:"ghost",onClick:()=>(x(""),a({q:""})),children:"clear"})]}),v.jsxs("select",{"aria-label":"Filter by source",value:i("source"),onChange:U=>a({source:U.target.value}),children:[v.jsx("option",{value:"",children:"all sources"}),c.map(U=>v.jsxs("option",{value:U.id,children:[U.label," (",U.session_count,")"]},U.id))]}),v.jsx(Kh,{ariaLabel:"Filter by project",searchPlaceholder:"Find project…",value:i("project"),onChange:U=>a({project:U}),options:[{value:"",label:"all projects"},...d.map(U=>({value:U.id,label:`${U.path.replace(/^.*\//,"")} (${U.session_count})`}))]}),v.jsxs("select",{"aria-label":"Filter by model",value:i("model"),onChange:U=>a({model:U.target.value}),children:[v.jsx("option",{value:"",children:"all models"}),m.map(U=>v.jsx("option",{value:U,children:bc(U)},U))]}),v.jsxs("select",{"aria-label":"Filter by kind",value:i("kind")||"main",onChange:U=>a({kind:U.target.value}),children:[v.jsx("option",{value:"main",children:"main only"}),v.jsx("option",{value:"all",children:"main + subagents"}),v.jsx("option",{value:"subagent",children:"subagents only"})]}),v.jsx(Rc,{label:"Security",options:em,selected:i("severity").split(",").filter(Boolean),onChange:U=>a({severity:U.join(",")})}),v.jsx(Rc,{label:"Errors",options:tm,selected:i("error_type").split(",").filter(Boolean),onChange:U=>a({error_type:U.join(",")})})]}),v.jsx(Jc,{error:V}),Q?v.jsx(st,{}):N.length===0?v.jsx("div",{className:"muted pad",role:"status",children:"No sessions match."}):v.jsxs("table",{className:"sessions",children:[v.jsx("thead",{children:v.jsxs("tr",{children:[Ne.map(U=>U.sortKey?v.jsx(Gh,{label:U.label,sortKey:U.sortKey,active:D,dir:Y,onSort:ae,defaultDir:U.sortDefaultDir??"desc",className:U.thClassName},U.id):v.jsx("th",{className:U.thClassName,children:U.label},U.id)),v.jsx("th",{className:"col-th","aria-label":"Columns",children:v.jsx(nm,{visible:_,onToggle:q})})]})}),v.jsx("tbody",{children:N.map(U=>v.jsxs("tr",{children:[Ne.map(Ce=>v.jsx(C.Fragment,{children:Ce.cell(U,i("q"))},Ce.id)),v.jsx("td",{className:"col-td"})]},U.id))})]}),v.jsx(Yh,{page:ke,pages:Pe,total:B,unit:"sessions",onPage:U=>a({offset:String((U-1)*Gl)})})]})}function Lc(i){const a=String((i==null?void 0:i.message)??i??"");return/dynamically imported module/i.test(a)||/Importing a module script failed/i.test(a)||/Failed to load module script/i.test(a)}const Tc="agent-lens:stale-chunk-reload";function lm(){try{const i=Number(sessionStorage.getItem(Tc));return i&&Date.now()-i<6e4?!1:(sessionStorage.setItem(Tc,String(Date.now())),!0)}catch{return!1}}class om extends hu.Component{constructor(){super(...arguments);cc(this,"state",{error:null,stale:!1})}static getDerivedStateFromError(u){return{error:u,stale:Lc(u)}}componentDidCatch(u){Lc(u)&&lm()&&window.location.reload()}render(){const{error:u,stale:c}=this.state;return u?v.jsxs("div",{className:"pad",role:"alert",children:[v.jsx("div",{className:"error",children:c?"This page was loaded from an older build of Agent Lens and part of it is no longer on the server.":`Something went wrong rendering this view: ${u.message}`}),v.jsx("button",{type:"button",className:"ghost",onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}const im=C.lazy(()=>zt(()=>import("./Dashboard-DNignR_W.js"),__vite__mapDeps([0,1]))),um=C.lazy(()=>zt(()=>import("./SessionView-DdxaD2e2.js"),__vite__mapDeps([2,3,4,5,1]))),sm=C.lazy(()=>zt(()=>import("./WorkflowView-C0qUousN.js"),__vite__mapDeps([6,3,5]))),am=C.lazy(()=>zt(()=>import("./SkillsView-CFPNRSKa.js"),[])),cm=C.lazy(()=>zt(()=>import("./SkillView-CxQL_Y9l.js"),__vite__mapDeps([7,5]))),fm=C.lazy(()=>zt(()=>import("./FilesView-BxaV2-YJ.js"),[])),dm=C.lazy(()=>zt(()=>import("./FileView-B7B7lrWB.js"),__vite__mapDeps([8,9]))),pm=C.lazy(()=>zt(()=>import("./SecurityView-BkWmmke4.js"),__vite__mapDeps([10,4]))),hm=C.lazy(()=>zt(()=>import("./AboutView-CUWj_rU_.js"),[])),mm="/".replace(/\/$/,"");hp.createRoot(document.getElementById("root")).render(v.jsx(hu.StrictMode,{children:v.jsx(zh,{children:v.jsx(om,{children:v.jsx(vh,{basename:mm,children:v.jsx(uh,{children:v.jsxs(ut,{path:"/",element:v.jsx(Dh,{}),children:[v.jsx(ut,{index:!0,element:v.jsx(rm,{})}),v.jsx(ut,{path:"dashboard",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(im,{})})}),v.jsx(ut,{path:"session/:id",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(um,{})})}),v.jsx(ut,{path:"workflow/:run_id",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(sm,{})})}),v.jsx(ut,{path:"files",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(fm,{})})}),v.jsx(ut,{path:"file",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(dm,{})})}),v.jsx(ut,{path:"skills",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(am,{})})}),v.jsx(ut,{path:"skill/:name",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(cm,{})})}),v.jsx(ut,{path:"security",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(pm,{})})}),!vn&&v.jsx(ut,{path:"about",element:v.jsx(C.Suspense,{fallback:v.jsx(st,{}),children:v.jsx(hm,{})})})]})})})})})}));export{Em as A,ym as B,Oh as C,km as D,Jc as E,_m as F,Cm as G,Kh as H,Gh as I,kh as J,Lh as K,Zl as L,Rc as M,Yh as P,hu as R,vn as S,Vh as a,Ah as b,gm as c,qc as d,Jh as e,zr as f,op as g,Zh as h,Fh as i,v as j,lu as k,Xh as l,Xc as m,st as n,to as o,Mh as p,Sm as q,C as r,bc as s,Hh as t,Bc as u,Wh as v,Qh as w,xm as x,wm as y,gn as z};
|