@swestash/agent-lens 0.11.1 → 0.13.0

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.
@@ -1 +0,0 @@
1
- import{r as m,e as ie,h as P,B as ne,x as ae,j as e,G as p,F as le,H as y,E as re,m as ce,S as $,P as oe,w as de,L as ue}from"./index-0iQ2t2WR.js";import{S as he,a as me}from"./severity-FT-qpBVJ.js";function W(t,n){const[l,a]=m.useState(n),[N,d]=m.useState(t);return N!==t&&(d(t),a(n)),[l,a]}const M=50,pe={total:0,findings:[]},je=new Set;function ke(){const{get:t,set:n,clear:l}=ie(),a=P("/sources",[]),N=P("/projects",[]),[d,S]=m.useState(!1),[j,Q]=m.useState(0),{sort:r,toggle:_}=ne("severity","desc"),b=t("severity"),v=t("category"),k=t("rule"),w=t("session"),R=t("source"),F=t("project"),T=t("from"),A=t("to"),u=t("status","open"),C=m.useMemo(()=>{const s=new URLSearchParams;for(const[c,h]of Object.entries({severity:b,category:v,rule:k,session:w,source:R,project:F,from:T,to:A,status:u}))h&&s.set(c,h);return s},[b,v,k,w,R,F,T,A,u]),i=P("/security/summary",null,[j]),I=P(p?null:"/security/mutes",[],[j]),K=`${C.toString()}|${r.key}|${r.dir}`,[E,U]=W(K,1),[o,L]=W(`${K}|${E}|${j}`,je),f=new URLSearchParams(C);f.set("sort",r.key),f.set("dir",r.dir),f.set("limit",String(M)),f.set("offset",String((E-1)*M));const{data:V,loading:D,error:Y}=ae("/security/findings?"+f.toString(),{deps:[j]}),[q,B]=W(`${K}|${E}|${j}`,null),J=q??Y,{total:g,findings:O}=V??pe,x=m.useCallback(async s=>{S(!0),B(null);try{await s(),Q(c=>c+1)}catch(c){B(String(c))}finally{S(!1)}},[]),X=m.useMemo(()=>new Map(((i==null?void 0:i.by_severity)??[]).map(s=>[s.severity,s.n])),[i]),G=m.useMemo(()=>((i==null?void 0:i.by_rule)??[]).filter(s=>!v||s.category===v),[i,v]),Z=Math.max(1,Math.ceil(g/M)),ee=[...C.keys()].some(s=>s!=="status")||u!=="open",z=O.map(s=>s.id),se=z.length>0&&z.every(s=>o.has(s)),te=s=>L(c=>{const h=new Set(c);return h.has(s)?h.delete(s):h.add(s),h});return e.jsxs("div",{children:[e.jsxs("div",{className:"detail-head",children:[e.jsx("h1",{children:"Security findings"}),e.jsxs("p",{className:"muted page-intro",children:["Risky operations the agent performed, flagged after the fact by deterministic rules over each tool call. Counts show ",e.jsx("strong",{children:"open"})," findings — mark benign ones safe or mute a noisy rule so a real one stands out. agent-lens is retrospective; it surfaces what ",e.jsx("em",{children:"happened"}),", it doesn't block."]})]}),p&&e.jsxs("div",{className:"demo-note",role:"note",children:["📦 This is a static demo over synthetic sessions. Browse the findings and reference below —"," ",e.jsx("strong",{children:"triage"})," (mark safe, mute rules) and live filtering run in the local app on your own data."]}),e.jsxs("div",{className:"kpi-row sev-kpis",role:"group","aria-label":"Open findings by severity",children:[e.jsxs("button",{type:"button",className:"kpi kpi-btn"+(b?"":" is-active"),onClick:()=>n({severity:""}),children:[e.jsx("div",{className:"kpi-label",children:"Open findings"}),e.jsx("div",{className:"kpi-value",children:(i==null?void 0:i.total)??"—"}),e.jsxs("div",{className:"kpi-sub",children:[(i==null?void 0:i.sessions_flagged)??0," sessions flagged"]})]}),he.map(s=>e.jsxs("button",{type:"button",className:"kpi kpi-btn sev-kpi sev-"+s+(b===s?" is-active":""),onClick:()=>n({severity:b===s?"":s}),"aria-pressed":b===s,children:[e.jsx("div",{className:"kpi-label",children:s}),e.jsx("div",{className:"kpi-value",children:X.get(s)??0})]},s))]}),i&&(i.dismissed>0||i.muted>0)&&e.jsxs("div",{className:"triage-counts muted small",children:[e.jsxs("button",{type:"button",className:"linkish",onClick:()=>n({status:"dismissed",severity:""}),children:[i.dismissed," dismissed"]})," · ",e.jsxs("button",{type:"button",className:"linkish",onClick:()=>n({status:"muted",severity:""}),children:[i.muted," muted by rule"]})]}),e.jsxs("div",{className:"filters",children:[e.jsxs("select",{"aria-label":"Filter by status",value:u,onChange:s=>n({status:s.target.value}),children:[e.jsx("option",{value:"open",children:"open"}),e.jsx("option",{value:"dismissed",children:"dismissed"}),e.jsx("option",{value:"muted",children:"muted"}),e.jsx("option",{value:"all",children:"all"})]}),e.jsxs("select",{"aria-label":"Filter by category",value:v,onChange:s=>{const c=s.target.value,h=!k||G.some(H=>H.rule_id===k&&(!c||H.category===c));n({category:c,rule:h?k:""})},children:[e.jsx("option",{value:"",children:"all categories"}),((i==null?void 0:i.categories)??[]).map(s=>e.jsx("option",{value:s.key,children:s.title},s.key))]}),e.jsxs("select",{"aria-label":"Filter by rule",value:k,onChange:s=>n({rule:s.target.value}),children:[e.jsx("option",{value:"",children:"all rules"}),G.map(s=>e.jsxs("option",{value:s.rule_id,children:[s.rule_id," (",s.n,")"]},s.rule_id))]}),e.jsxs("select",{"aria-label":"Filter by source",value:R,onChange:s=>n({source:s.target.value}),children:[e.jsx("option",{value:"",children:"all sources"}),a.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))]}),e.jsx(le,{ariaLabel:"Filter by project",searchPlaceholder:"Find project…",value:F,onChange:s=>n({project:s}),options:[{value:"",label:"all projects"},...N.map(s=>({value:s.id,label:s.path.replace(/^.*\//,"")}))]}),e.jsxs("label",{className:"ctl",children:["from ",e.jsx("input",{type:"date",value:T,onChange:s=>n({from:s.target.value})})]}),e.jsxs("label",{className:"ctl",children:["to ",e.jsx("input",{type:"date",value:A,onChange:s=>n({to:s.target.value})})]}),w&&e.jsxs("span",{className:"tag filter-chip",children:["session ",w.slice(0,8),"… ",e.jsx("button",{type:"button",className:"linkish",onClick:()=>n({session:""}),children:"✕"})]}),ee&&e.jsx("button",{type:"button",className:"ghost",onClick:l,children:"clear filters"})]}),!p&&(o.size>0||u==="open"&&g>0)&&e.jsxs("div",{className:"triage-bar",role:"group","aria-label":"Triage actions",children:[o.size>0&&u!=="dismissed"&&e.jsxs("button",{type:"button",disabled:d,onClick:()=>x(()=>y("/security/dismiss",{ids:[...o]})),children:["✓ Mark ",o.size," safe"]}),o.size>0&&u==="dismissed"&&e.jsxs("button",{type:"button",disabled:d,onClick:()=>x(()=>y("/security/reopen",{ids:[...o]})),children:["↩ Reopen ",o.size]}),o.size>0&&e.jsx("button",{type:"button",className:"ghost",onClick:()=>L(new Set),children:"clear selection"}),u==="open"&&g>0&&e.jsxs("button",{type:"button",className:"ghost",disabled:d,onClick:()=>{confirm(`Dismiss all ${g} open findings matching the current filter as safe?`)&&x(()=>y("/security/dismiss-matching",{filter:Object.fromEntries(C)}))},title:"Mark every open finding matching the current filter as safe",children:["Dismiss all ",g," matching"]})]}),e.jsx(re,{error:J}),D?e.jsx(ce,{}):O.length===0?e.jsx("div",{className:"muted pad",role:"status",children:i&&i.total===0&&u==="open"?"No open security findings — nothing risky is awaiting review.":"No findings match these filters."}):e.jsxs("table",{className:"sessions findings-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[!p&&e.jsx("th",{className:"check-col",children:e.jsx("input",{type:"checkbox","aria-label":"Select all on this page",checked:se,onChange:s=>L(s.target.checked?new Set(z):new Set)})}),e.jsx($,{label:"Severity",sortKey:"severity",active:r.key,dir:r.dir,onSort:_}),e.jsx("th",{children:"Finding"}),e.jsx($,{label:"Category",sortKey:"category",active:r.key,dir:r.dir,onSort:_}),e.jsx("th",{children:"Evidence"}),e.jsx($,{label:"When",sortKey:"time",active:r.key,dir:r.dir,onSort:_}),e.jsx($,{label:"Session",sortKey:"session",active:r.key,dir:r.dir,onSort:_}),!p&&e.jsx("th",{children:"Actions"})]})}),e.jsx("tbody",{children:O.map(s=>e.jsx(ge,{f:s,selected:o.has(s.id),onToggle:()=>te(s.id),busy:d,onDismiss:()=>x(()=>y("/security/dismiss",{ids:[s.id]})),onReopen:()=>x(()=>y("/security/reopen",{ids:[s.id]})),onMute:()=>x(()=>y("/security/mute",{rule_id:s.rule_id,scope:"global"}))},s.id))})]}),!D&&g>M&&e.jsx(oe,{page:E,pages:Z,total:g,unit:"findings",onPage:U}),!p&&I.length>0&&e.jsx(xe,{mutes:I,busy:d,onUnmute:s=>x(()=>y("/security/unmute",{rule_id:s.rule_id,scope:s.scope,scope_id:s.scope_id}))}),i&&i.categories.length>0&&e.jsx(ye,{summary:i})]})}function ge({f:t,selected:n,onToggle:l,busy:a,onDismiss:N,onReopen:d,onMute:S}){const j=`/session/${t.session_id}${t.event_uuid?`#ev-${t.event_uuid}`:""}`;return e.jsxs("tr",{className:t.dismissed?"is-dismissed":"",children:[!p&&e.jsx("td",{className:"check-col",children:e.jsx("input",{type:"checkbox","aria-label":"Select finding",checked:n,onChange:l})}),e.jsxs("td",{children:[e.jsx(me,{severity:t.severity}),t.dismissed?e.jsx("span",{className:"tag dismissed",title:t.dismiss_note??"",children:"safe"}):null]}),e.jsxs("td",{children:[e.jsx("div",{className:"finding-title",children:t.title??t.rule_id}),e.jsxs("div",{className:"muted small",children:[e.jsx("code",{children:t.rule_id}),t.framework_ref&&e.jsx("span",{className:"tag framework",children:t.framework_ref})]})]}),e.jsx("td",{className:"small",children:t.category}),e.jsxs("td",{className:"finding-evidence-cell",children:[t.tool_name&&e.jsx("span",{className:"tag tool-tag",title:"Tool the finding fired on",children:t.tool_name}),e.jsx("code",{title:t.evidence??"",children:t.evidence})]}),e.jsx("td",{className:"small muted",title:t.started_at??"",children:de(t.started_at??null)}),e.jsxs("td",{className:"small",children:[e.jsx(ue,{to:j,className:"title",children:t.session_title||t.session_id.slice(0,12)}),t.is_sidechain?e.jsx("span",{className:"tag subagent",children:"subagent"}):null,t.project_path&&e.jsx("div",{className:"muted path",children:t.project_path.replace(/^.*\//,"")})]}),!p&&e.jsxs("td",{className:"finding-actions small",children:[t.dismissed?e.jsx("button",{type:"button",className:"linkish",disabled:a,onClick:d,children:"reopen"}):e.jsx("button",{type:"button",className:"linkish",disabled:a,onClick:N,children:"safe"}),e.jsx("button",{type:"button",className:"linkish",disabled:a,onClick:S,title:`Mute rule ${t.rule_id} everywhere`,children:"mute rule"})]})]})}function xe({mutes:t,busy:n,onUnmute:l}){return e.jsxs("details",{className:"card muted-rules",children:[e.jsx("summary",{children:e.jsxs("span",{className:"sec-ref-title",children:["Muted rules (",t.length,")"]})}),e.jsx("ul",{className:"muted-rules-list",children:t.map(a=>e.jsxs("li",{children:[e.jsx("code",{children:a.rule_id}),e.jsxs("span",{className:"tag mute-scope",children:[a.scope,a.scope_id?`: ${a.scope_id}`:""]}),a.note&&e.jsx("span",{className:"muted small mute-note",children:a.note}),e.jsx("button",{type:"button",className:"linkish unmute",disabled:n,onClick:()=>l(a),children:"unmute"})]},`${a.rule_id}:${a.scope}:${a.scope_id}`))})]})}function ye({summary:t}){const n=new Map(t.by_category.map(l=>[l.category,l.n]));return e.jsxs("section",{className:"sec-reference",children:[e.jsx("h2",{children:"Risk categories"}),e.jsx("p",{className:"muted small sec-reference-intro",children:"What each category means and why it matters, anchored to OWASP Top 10 for Agentic Apps and MITRE ATLAS."}),e.jsx("div",{className:"sec-ref-grid",children:t.categories.map(l=>e.jsxs("details",{className:"card sec-ref",children:[e.jsxs("summary",{children:[e.jsx("span",{className:"sec-ref-title",children:l.title}),e.jsxs("a",{className:"tag framework",href:l.framework_url,target:"_blank",rel:"noreferrer",onClick:a=>a.stopPropagation(),children:[l.framework_ref," ↗"]}),e.jsxs("span",{className:"muted small",children:[n.get(l.key)??0," open"]})]}),e.jsxs("dl",{className:"sec-ref-body",children:[e.jsx("dt",{children:"What"}),e.jsx("dd",{children:l.what}),e.jsx("dt",{children:"Why it matters"}),e.jsx("dd",{children:l.why}),e.jsx("dt",{children:"What to do"}),e.jsx("dd",{children:l.remediation})]})]},l.key))})]})}export{ke as default};
@@ -1,12 +0,0 @@
1
- import{p as os,j as s,q as O,r as m,L as _,f as cs,t as ds,b as us,v as ms,c as C,w as W,s as hs,x as ps,i as R,n as D,l as xs,y as fs,z as js,E as gs,m as Ns}from"./index-0iQ2t2WR.js";import{S as I,a as V}from"./severity-FT-qpBVJ.js";import{A as F,C as y,p as k}from"./jsonish-Bvk9aoZ9.js";import{M as ws,r as _s}from"./index-DWa5WNaY.js";function ks({id:e}){const n=os();return s.jsxs("details",{className:"export-menu col-customizer",ref:n,children:[s.jsx("summary",{className:"export",title:"Export this session as Markdown",children:"⬇ Export Markdown"}),s.jsxs("div",{className:"col-menu",role:"group","aria-label":"Export options",children:[s.jsxs("a",{href:O(e),download:!0,children:["Redacted ",s.jsx("span",{className:"muted small",children:"(secrets masked)"})]}),s.jsxs("a",{href:O(e,"structure"),download:!0,children:["Structure only ",s.jsx("span",{className:"muted small",children:"(scrubbed)"})]}),s.jsxs("a",{className:"export-verbatim",href:O(e,"off"),download:!0,children:["Verbatim ",s.jsx("span",{className:"muted small",children:"(unredacted)"})]})]})]})}function ys({c:e}){var r;const[n,t]=m.useState(!1),a=m.useId(),l=(r=e.signals)==null?void 0:r.loc;return s.jsxs("div",{className:"classification",children:[s.jsx("span",{className:"tag cat cat-"+(e.category??"none"),children:e.category??"unclassified"}),e.complexity_band&&s.jsxs("span",{className:"tag complexity",children:[e.complexity_band," · ",e.complexity_score]}),l&&s.jsxs("span",{className:"muted small",children:["+",l.added,"/−",l.removed," LoC · ",l.files," files"]}),s.jsxs("button",{className:"ghost small","aria-expanded":n,"aria-controls":a,onClick:()=>t(i=>!i),children:["why ",n?"▾":"▸"]}),n&&(e.signals?s.jsx(vs,{id:a,s:e.signals,category:e.category}):s.jsx("div",{id:a,className:"muted small pad",children:"No signals recorded for this session."}))]})}const bs={loc:"Lines changed",files:"Files touched",turns:"Turns",tokens:"Work tokens",duration:"Duration",subagents:"Subagents"},L=e=>`${Math.max(0,Math.min(1,e))*100}%`;function P({counts:e}){const n=Object.entries(e).sort((t,a)=>a[1]-t[1]);return n.length===0?s.jsx("span",{className:"muted",children:"—"}):s.jsx("span",{className:"sig-chips",children:n.map(([t,a])=>s.jsxs("span",{className:"sig-chip",children:[t," ",s.jsxs("span",{className:"muted",children:["×",a]})]},t))})}function vs({id:e,s:n,category:t}){const[a,l]=m.useState(!1),r=m.useId(),i=n.complexity_weights??{},o=n.complexity_subscores??{},c=Object.keys(i).map(d=>({key:d,weight:i[d],subscore:o[d]??0,pts:i[d]*(o[d]??0)*100})).sort((d,N)=>N.pts-d.pts),u=Math.max(...c.map(d=>d.pts),1e-4),p=Object.entries(n.category_scores??{}).map(([d,N])=>({k:d,v:N})).sort((d,N)=>N.v-d.v),j=Math.max(...p.map(d=>d.v),1e-4),x=p.filter(d=>d.v>.02||d.k===t),f=n.skills&&Object.keys(n.skills).length>0;return s.jsxs("div",{id:e,className:"signals-panel",children:[c.length>0&&s.jsxs("section",{className:"sig-section",children:[s.jsxs("h4",{className:"sig-h",children:["Complexity breakdown ",s.jsx("span",{className:"muted",children:"— what built the score"})]}),s.jsx("ul",{className:"sig-bars",children:c.map(d=>s.jsxs("li",{className:"sig-bar-row",children:[s.jsx("span",{className:"sig-bar-label",children:bs[d.key]??d.key}),s.jsx("span",{className:"sig-bar","aria-hidden":"true",children:s.jsx("span",{className:"sig-bar-fill",style:{width:L(d.pts/u)}})}),s.jsxs("span",{className:"sig-bar-val",children:[d.pts.toFixed(1)," pts"]}),s.jsxs("span",{className:"sig-bar-sub muted",children:[Math.round(d.subscore*100),"% intensity · weight ",Math.round(d.weight*100),"%"]})]},d.key))})]}),x.length>0&&s.jsxs("section",{className:"sig-section",children:[s.jsxs("h4",{className:"sig-h",children:["Category scores ",s.jsxs("span",{className:"muted",children:["— why “",t,"” won"]})]}),s.jsx("ul",{className:"sig-bars",children:x.map(d=>s.jsxs("li",{className:"sig-bar-row"+(d.k===t?" is-win":""),children:[s.jsx("span",{className:"sig-bar-label",children:d.k}),s.jsx("span",{className:"sig-bar","aria-hidden":"true",children:s.jsx("span",{className:"sig-bar-fill",style:{width:L(d.v/j)}})}),s.jsx("span",{className:"sig-bar-val",children:d.v.toFixed(2)})]},d.k))})]}),s.jsxs("section",{className:"sig-section",children:[s.jsx("h4",{className:"sig-h",children:"Evidence"}),s.jsxs("dl",{className:"sig-grid",children:[n.tool_counts&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Tools"}),s.jsx("dd",{children:s.jsx(P,{counts:n.tool_counts})})]}),f&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Skills"}),s.jsx("dd",{children:s.jsx(P,{counts:n.skills})})]}),n.subagent_role&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Subagent role"}),s.jsx("dd",{children:n.subagent_role})]}),n.files&&n.files.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("dt",{children:["Files (",n.files.length,")"]}),s.jsx("dd",{className:"sig-files",children:n.files.join(", ")})]})]})]}),s.jsx("button",{className:"ghost small","aria-expanded":a,"aria-controls":r,onClick:()=>l(d=>!d),children:a?"Hide raw JSON ▴":"View raw JSON ▾"}),a&&s.jsx("pre",{id:r,className:"code signals",children:JSON.stringify(n,null,2)})]})}function Ss({f:e}){var i;const[n,t]=m.useState(!1),a=m.useId(),l=((i=e.signals)==null?void 0:i.modifiers)??{},r=Object.keys(l).filter(o=>l[o]!==!1&&l[o]!=null&&l[o]!=="");return s.jsxs("div",{className:"finding sev-border-"+e.severity,children:[s.jsxs("button",{className:"finding-head","aria-expanded":n,"aria-controls":a,onClick:()=>t(o=>!o),children:[s.jsx(V,{severity:e.severity}),s.jsx("span",{className:"finding-title",children:e.title??e.rule_id}),e.framework_ref&&s.jsx("span",{className:"tag framework",children:e.framework_ref}),s.jsx("span",{className:"chev",children:n?"▾":"▸"})]}),n&&s.jsxs("div",{className:"finding-body",id:a,children:[e.evidence&&s.jsx("div",{className:"code-block",children:s.jsx("pre",{className:"code finding-evidence",children:e.evidence})}),s.jsxs("dl",{className:"sig-grid",children:[s.jsx("dt",{children:"Rule"}),s.jsx("dd",{children:s.jsx("code",{children:e.rule_id})}),s.jsx("dt",{children:"Category"}),s.jsx("dd",{children:e.category}),r.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Context"}),s.jsx("dd",{children:r.map(o=>s.jsxs("span",{className:"sig-chip",children:[o,l[o]!==!0?s.jsxs("span",{className:"muted",children:[" ",String(l[o])]}):null]},o))})]})]}),s.jsxs(_,{className:"subagent-link small",to:`/security?rule=${encodeURIComponent(e.rule_id)}`,children:["see all “",e.rule_id,"” findings →"]})]})]})}function Cs({findings:e}){if(!e.length)return null;const n=[...e].sort((t,a)=>I.indexOf(t.severity)-I.indexOf(a.severity));return s.jsx("div",{className:"tool-findings",children:n.map(t=>s.jsx(Ss,{f:t},t.id))})}function Is({findings:e,sessionId:n}){const t=new Map;for(const l of e)t.set(l.severity,(t.get(l.severity)??0)+1);const a=I.find(l=>t.has(l))??"info";return s.jsxs("div",{className:"security-banner sev-border-"+a,role:"status",children:[s.jsx("span",{className:"security-banner-icon","aria-hidden":"true",children:"🛡"}),s.jsxs("span",{className:"security-banner-text",children:[e.length," security ",e.length===1?"finding":"findings"," in this session"]}),s.jsx("span",{className:"security-banner-sevs",children:I.filter(l=>t.has(l)).map(l=>s.jsx(V,{severity:l,count:t.get(l)},l))}),s.jsx(_,{className:"subagent-link small",to:`/security?session=${encodeURIComponent(n)}`,children:"view on Security page →"})]})}function Ts(e){const n={dirs:new Map,files:[]};for(const a of e){const l=a.display.startsWith("/"),r=(l?a.display.slice(1):a.display).split("/");l&&r.length>0&&(r[0]="/"+r[0]);let i=n;for(const o of r.slice(0,-1))i=i.dirs.get(o)??i.dirs.set(o,{dirs:new Map,files:[]}).get(o);i.files.push({name:r[r.length-1],path:a.path,list:a.list})}const t=a=>{for(const[l,r]of[...a.dirs.entries()])if(t(r),r.files.length===0&&r.dirs.size===1){const[i,o]=[...r.dirs.entries()][0];a.dirs.delete(l),a.dirs.set(l+"/"+i,o)}};return t(n),n}function Q({node:e,depth:n}){const t={paddingLeft:`${.4+n*1.1}rem`};return s.jsxs(s.Fragment,{children:[[...e.dirs.entries()].sort(([a],[l])=>a.localeCompare(l)).map(([a,l])=>s.jsxs(m.Fragment,{children:[s.jsx("tr",{children:s.jsx("td",{colSpan:3,style:t,children:s.jsxs("span",{className:"muted",children:["📁 ",a,"/"]})})}),s.jsx(Q,{node:l,depth:n+1})]},a)),[...e.files].sort((a,l)=>a.name.localeCompare(l.name)).map(a=>{const l=a.list.find(o=>o.event_uuid),r=a.list.reduce((o,c)=>o+(c.lines_added??0),0),i=a.list.reduce((o,c)=>o+(c.lines_removed??0),0);return s.jsxs("tr",{children:[s.jsx("td",{style:t,children:l!=null&&l.event_uuid?s.jsx("a",{href:`#ev-${l.event_uuid}`,className:"title",title:a.path+" — jump to the first change",children:a.name}):s.jsx("span",{title:a.path,children:a.name})}),s.jsxs("td",{className:"num",children:[a.list.length,"× ",s.jsxs("span",{className:"muted",children:["(+",r," −",i,")"]})]}),s.jsx("td",{children:s.jsx(_,{className:"subagent-link small",to:`/file?path=${encodeURIComponent(a.path)}`,children:"history →"})})]},a.path)})]})}function Os({changes:e,projectPath:n}){const t=new Map;for(const r of e)(t.get(r.file_path)??t.set(r.file_path,[]).get(r.file_path)).push(r);const a=r=>n&&r.startsWith(n.replace(/\/$/,"")+"/")?r.slice(n.replace(/\/$/,"").length+1):r,l=Ts([...t.entries()].map(([r,i])=>({display:a(r),path:r,list:i})));return s.jsxs("details",{className:"wf-run files-changed",children:[s.jsxs("summary",{children:["📄 ",t.size," ",t.size===1?"file":"files"," changed · ",e.length," ",e.length===1?"edit":"edits"]}),s.jsx("table",{className:"sessions",children:s.jsx("tbody",{children:s.jsx(Q,{node:l,depth:0})})})]})}function Fs({d:e}){var t;const n=e.session;return s.jsxs("div",{className:"detail-head",children:[s.jsx(_,{to:"/",className:"back",children:"← all sessions"}),s.jsx("h1",{children:n.title||n.id.slice(0,12)}),s.jsxs("div",{className:"detail-meta",children:[s.jsx("span",{children:s.jsx("b",{children:n.source_id})}),s.jsx("span",{className:"path",children:n.project_path}),n.is_sidechain?s.jsx("span",{className:"tag subagent",children:"subagent"}):null,e.parent&&s.jsxs("span",{className:"spawned-by",children:["↖ spawned by"," ",s.jsx(_,{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:[e.turns.length," turns"]}),s.jsxs("span",{children:[n.event_count," events"]}),s.jsxs("span",{title:ds(n.token_split),children:[cs(n.tokens)," tok"]}),s.jsxs("span",{title:ms(n.unpriced_models),children:[us(n.cost),(t=n.unpriced_models)!=null&&t.length?s.jsx("span",{className:"warn-tag",children:" ⚠"}):null]}),n.tool_call_count>0&&s.jsxs("span",{className:n.tool_failure_count>0?"tool-err-stat":"muted",title:"Tool calls that returned is_error, of "+n.tool_call_count+". Failures = the agent's tool errored; declined/blocked = you rejected it or a guardrail blocked it (heuristic split from the result text — not an API-reported distinction).",children:[n.tool_failure_count," failed",n.tool_rejection_count>0?` · ${n.tool_rejection_count} declined/blocked`:"",` of ${n.tool_call_count} tool calls`]}),s.jsx("span",{children:C(n.duration_ms)}),s.jsx("span",{className:"muted",children:W(n.started_at)}),s.jsx(ks,{id:n.id})]}),e.classification&&s.jsx(ys,{c:e.classification}),e.findings&&e.findings.length>0&&s.jsx(Is,{findings:e.findings,sessionId:n.id}),e.file_changes&&e.file_changes.length>0&&s.jsx(Os,{changes:e.file_changes,projectPath:n.project_path??null})]})}function Es({turnCount:e,anyOpen:n,onToggleAll:t,hideTools:a,onToggleHideTools:l,format:r,onChooseFormat:i}){return s.jsxs("div",{className:"transcript-tools",children:[e>1&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"muted small",children:[e," turns"]}),s.jsx("button",{className:"ghost small",onClick:t,children:n?"Collapse all":"Expand all"})]}),s.jsxs("button",{className:"ghost small"+(a?" is-active":""),"aria-pressed":a,onClick:l,title:"Hide Bash/Edit/Skill and other tool calls — show only assistant answers, plans and questions",children:[a?"☑ ":"☐ ","Hide tool messages"]}),s.jsxs("div",{className:"format-toggle",role:"group","aria-label":"Message format",children:[s.jsx("button",{className:"ghost small"+(r==="markdown"?" is-active":""),"aria-pressed":r==="markdown",onClick:()=>i("markdown"),children:"Markdown"}),s.jsx("button",{className:"ghost small"+(r==="raw"?" is-active":""),"aria-pressed":r==="raw",onClick:()=>i("raw"),children:"Raw"})]})]})}function Ms({d:e}){const n=e.workflow_runs??[],t=e.children.filter(l=>!l.workflow_run_id),a=n.length>0;return s.jsxs("div",{className:"subagents",children:[s.jsxs("h2",{children:["Spawned subagents (",e.children.length,")"]}),n.map(l=>{const r=e.children.filter(i=>i.workflow_run_id===l.run_id);return s.jsxs("details",{className:"wf-run",children:[s.jsxs("summary",{children:[s.jsxs(_,{className:"wf-run-name",to:`/workflow/${l.run_id}`,onClick:i=>i.stopPropagation(),children:["🔀 ",l.name||"workflow"," →"]}),l.status&&s.jsx("span",{className:"tag task-status task-status-"+l.status.toLowerCase(),children:l.status}),s.jsxs("span",{className:"muted small",children:[r.length," agent",r.length===1?"":"s",l.turn_seq!=null?` · turn ${l.turn_seq+1}`:""," · ",s.jsx("code",{children:l.run_id})]})]}),s.jsx("ul",{children:r.map(i=>s.jsx(F,{a:i},i.id))})]},l.run_id)}),t.length>0&&(a?s.jsxs("details",{className:"wf-run",open:!0,children:[s.jsxs("summary",{children:[s.jsx("span",{className:"wf-run-name",children:"Task / Agent"}),s.jsxs("span",{className:"muted small",children:[t.length," subagent",t.length===1?"":"s"]})]}),s.jsx("ul",{children:t.map(l=>s.jsx(F,{a:l},l.id))})]}):s.jsx("ul",{children:t.map(l=>s.jsx(F,{a:l},l.id))}))]})}function H(e,n){const t=e===""?[]:e.split(`
2
- `),a=n===""?[]:n.split(`
3
- `),l=t.length,r=a.length;if(l*r>25e4)return[...t.map(p=>({type:"del",text:p})),...a.map(p=>({type:"add",text:p}))];const i=Array.from({length:l+1},()=>new Array(r+1).fill(0));for(let p=l-1;p>=0;p--)for(let j=r-1;j>=0;j--)i[p][j]=t[p]===a[j]?i[p+1][j+1]+1:Math.max(i[p+1][j],i[p][j+1]);const o=[];let c=0,u=0;for(;c<l&&u<r;)t[c]===a[u]?(o.push({type:"ctx",text:t[c]}),c++,u++):i[c+1][u]>=i[c][u+1]?(o.push({type:"del",text:t[c]}),c++):(o.push({type:"add",text:a[u]}),u++);for(;c<l;)o.push({type:"del",text:t[c++]});for(;u<r;)o.push({type:"add",text:a[u++]});return o}function z(e){if(!e)return null;try{const n=JSON.parse(e).plan;return typeof n=="string"&&n.trim()?n:null}catch{return null}}function $s(e){if(!e)return[];try{const n=JSON.parse(e).questions;return Array.isArray(n)?n:[]}catch{return[]}}function As(e){if(!e)return{answers:{},annotations:{}};try{const n=JSON.parse(e);if(n&&typeof n=="object"&&n.answers)return{answers:n.answers,annotations:n.annotations??{}}}catch{}return{answers:{},annotations:{}}}function qs(e){if(!e)return null;try{const n=JSON.parse(e);if(!n||typeof n!="object")return null;const t=typeof n.command=="string"?n.command:"";return t.trim()?{command:t,description:typeof n.description=="string"?n.description:void 0,timeout:typeof n.timeout=="number"?n.timeout:void 0,run_in_background:n.run_in_background===!0,restart:n.restart===!0}:null}catch{return null}}function Bs(e,n){if(!n)return null;try{const t=JSON.parse(n);if(!t||typeof t!="object"||typeof t.file_path!="string")return null;let a;if(e==="Write"){if(typeof t.content!="string")return null;a=[t.content===""?[]:t.content.split(`
4
- `).map(i=>({type:"add",text:i}))]}else if(e==="MultiEdit"){if(!Array.isArray(t.edits)||(a=t.edits.filter(i=>{const o=i;return!!o&&typeof o.old_string=="string"&&typeof o.new_string=="string"}).map(i=>H(i.old_string,i.new_string)),a.length===0))return null}else{if(typeof t.old_string!="string"||typeof t.new_string!="string")return null;a=[H(t.old_string,t.new_string)]}let l=0,r=0;for(const i of a)for(const o of i)o.type==="add"?l++:o.type==="del"&&r++;return{file_path:t.file_path,kind:e,hunks:a,adds:l,dels:r}}catch{return null}}function Rs(e){const n=e.lastIndexOf("/");return n>=0?{dir:e.slice(0,n+1),base:e.slice(n+1)}:{dir:"",base:e}}function K(e){var a,l,r,i,o;const n=(l=(a=e.match(/<command-name>([^<]*)<\/command-name>/))==null?void 0:a[1])==null?void 0:l.trim();if(n){const c=((i=(r=e.match(/<command-args>([^<]*)<\/command-args>/))==null?void 0:r[1])==null?void 0:i.trim())??"";return{kind:"invocation",name:n.startsWith("/")?n:`/${n}`,args:c}}const t=(o=e.match(/<(?:local-command-stdout|command-output|local-command-stderr)>([\s\S]*?)<\/(?:local-command-stdout|command-output|local-command-stderr)>/))==null?void 0:o[1];return t!=null?{kind:"output",stdout:t.trim()}:/<local-command-caveat>/.test(e)?{kind:"caveat"}:null}function Y(e){if(!/<task-notification>/.test(e))return null;const n=t=>{var a,l;return((l=(a=e.match(new RegExp(`<${t}>([\\s\\S]*?)</${t}>`)))==null?void 0:a[1])==null?void 0:l.trim())??null};return{taskId:n("task-id"),toolUseId:n("tool-use-id"),status:n("status"),summary:n("summary")}}function Ls(e){const n=K(e);if((n==null?void 0:n.kind)==="invocation")return`⌘ ${n.name}${n.args?" "+n.args:""}`;if((n==null?void 0:n.kind)==="output")return"⌘ command output";if((n==null?void 0:n.kind)==="caveat")return"⌘ local command";const t=Y(e);return t?`🔔 task ${t.status??"notification"}`:e}const G=m.createContext("markdown"),X=m.createContext(new Map),Z=m.createContext(!1),ss=m.createContext(null);function Ps({cmd:e}){return e.kind==="invocation"?s.jsxs("div",{className:"cmd",children:[s.jsxs("span",{className:"cmd-chip",title:"Slash command",children:["⌘ ",e.name]}),e.args&&s.jsx("code",{className:"cmd-args",children:e.args})]}):e.kind==="output"?s.jsx("div",{className:"cmd-out",children:e.stdout&&e.stdout!=="(no content)"?e.stdout:s.jsx("span",{className:"muted",children:"no output"})}):s.jsx("div",{className:"cmd-note muted small",children:"⌘ local command context"})}function Hs({n:e}){const n=m.useContext(X),t=e.toolUseId?n.get(e.toolUseId):void 0,a=(e.status??"").toLowerCase();return s.jsxs("div",{className:"task-notif",children:[s.jsxs("div",{className:"task-notif-head",children:[s.jsx("span",{className:"task-notif-icon","aria-hidden":"true",children:"🔔"}),e.status&&s.jsx("span",{className:"tag task-status task-status-"+a,children:e.status}),e.taskId&&s.jsxs("code",{className:"task-notif-id",children:["task ",e.taskId]}),t&&s.jsx(_,{className:"subagent-link small",to:`/workflow/${t}`,children:"view workflow →"})]}),e.summary&&s.jsx("div",{className:"task-notif-summary",children:e.summary})]})}function J({text:e,id:n}){return m.useContext(G)==="raw"?s.jsx("div",{className:"text",id:n,children:e}):s.jsx("div",{className:"text md",id:n,children:s.jsx(ws,{remarkPlugins:[_s],components:Js,children:e})})}const Js={a:({node:e,...n})=>s.jsx("a",{...n,target:"_blank",rel:"noopener noreferrer"})};function es({text:e}){const n=e.length>1400||e.split(`
5
- `).length>18,[t,a]=m.useState(!1),l=m.useId();return n?s.jsxs("div",{className:"text-wrap"+(t?"":" is-clamped"),children:[s.jsx(J,{text:e,id:l}),s.jsx("button",{className:"ghost small show-more","aria-expanded":t,"aria-controls":l,onClick:()=>a(r=>!r),children:t?"Show less ▴":"Show more ▾"})]}):s.jsx(J,{text:e})}function ns({t:e}){const[n,t]=m.useState(!1),[a,l]=m.useState(!1),r=m.useId(),i=e.skill_name?`Skill · ${e.skill_name}`:e.tool_name==="Workflow"&&e.workflow_name?`Workflow · ${e.workflow_name}`:e.agent_type?`${e.tool_name} → ${e.agent_type}`:e.tool_name;return s.jsxs("div",{className:"tool "+(e.status==="error"?"tool-err":""),children:[s.jsxs("button",{className:"tool-head","aria-expanded":n,"aria-controls":r,onClick:()=>t(o=>!o),children:[s.jsxs("span",{className:"tool-name",children:["🔧 ",i]}),e.status&&s.jsx("span",{className:"tool-status",children:e.status}),e.total_duration_ms?s.jsx("span",{className:"muted",children:C(e.total_duration_ms)}):null,s.jsx("span",{className:"chev",children:n?"▾":"▸"})]}),e.spawned_session_id&&s.jsx(_,{className:"subagent-link small",to:`/session/${e.spawned_session_id}`,children:"view subagent transcript →"}),e.workflow_run_id&&s.jsxs(_,{className:"subagent-link small",to:`/workflow/${e.workflow_run_id}`,children:["🔀 launched ",e.workflow_agent_count??0," agent",e.workflow_agent_count===1?"":"s"," · ",s.jsx("code",{children:e.workflow_run_id})," →"]}),e.skill_name&&s.jsxs(_,{className:"subagent-link small",to:`/skill/${encodeURIComponent(e.skill_name)}${e.skill_id?`?v=${e.skill_id}`:""}`,children:["📖 view skill",e.skill_id?" version":""," →"]}),n&&s.jsxs("div",{className:"tool-body",id:r,children:[e.input_json&&e.input_json!=="{}"&&s.jsxs("div",{className:"code-block",children:[s.jsx(y,{text:k(e.input_json),className:"copy-corner",title:"Copy tool input JSON"}),s.jsx("pre",{className:"code",children:k(e.input_json)})]}),e.result_summary&&s.jsx("div",{className:"result",children:e.result_summary}),e.full_result&&s.jsxs("div",{className:"full-result",children:[s.jsxs("button",{type:"button",className:"ghost small show-full","aria-expanded":a,onClick:()=>l(o=>!o),children:[a?"Hide":"Show"," full result (",(e.full_result.bytes/1024).toFixed(1)," KB)"]}),a&&s.jsxs("div",{className:"code-block",children:[s.jsx(y,{text:e.full_result.text,className:"copy-corner",title:"Copy full tool result"}),s.jsx("pre",{className:"code",children:e.full_result.text})]})]})]})]})}function Us({plan:e}){return s.jsxs("div",{className:"plan-card",children:[s.jsx("div",{className:"plan-card-head",children:"📋 Approved plan"}),s.jsx(es,{text:e})]})}function Ws({t:e}){const[n,t]=m.useState(!1),a=m.useId(),l=$s(e.input_json),{answers:r,annotations:i}=As(e.result_summary);return l.length===0?s.jsx(ns,{t:e}):s.jsxs("div",{className:"qa-card",children:[s.jsxs("div",{className:"qa-card-head",children:["🙋 Question",l.length===1?"":"s"," for the user"]}),l.map((o,c)=>{var N;const u=r[o.question],p=Array.isArray(u)?u:u!=null?[u]:[],j=new Set(p),x=new Set(o.options.map(g=>g.label)),f=p.filter(g=>!x.has(g)),d=(N=i[o.question])==null?void 0:N.notes;return s.jsxs("div",{className:"qa-q",children:[s.jsxs("div",{className:"qa-q-head",children:[o.header&&s.jsx("span",{className:"tag",children:o.header}),o.multiSelect&&s.jsx("span",{className:"muted small",children:"multi-select"})]}),s.jsx("div",{className:"qa-question",children:o.question}),s.jsxs("ul",{className:"qa-options",children:[o.options.map((g,v)=>{const S=j.has(g.label);return s.jsxs("li",{className:"qa-opt"+(S?" is-selected":""),children:[s.jsx("span",{className:"qa-mark","aria-hidden":"true",children:S?"☑":"☐"}),s.jsxs("span",{className:"qa-opt-body",children:[s.jsx("span",{className:"qa-opt-label",children:g.label}),g.description&&s.jsx("span",{className:"qa-opt-desc muted",children:g.description})]})]},v)}),f.map((g,v)=>s.jsxs("li",{className:"qa-opt is-selected",children:[s.jsx("span",{className:"qa-mark","aria-hidden":"true",children:"☑"}),s.jsxs("span",{className:"qa-opt-body",children:[s.jsx("span",{className:"qa-opt-label",children:g}),s.jsx("span",{className:"qa-opt-desc muted",children:"custom answer"})]})]},"c"+v))]}),d&&s.jsxs("div",{className:"qa-note",children:["📝 ",d]})]},c)}),s.jsxs("div",{className:"launch-actions",children:[s.jsx("button",{className:"ghost small","aria-expanded":n,"aria-controls":a,onClick:()=>t(o=>!o),children:n?"Hide raw JSON ▴":"View raw JSON ▾"}),s.jsx(y,{text:k(e.input_json??"{}")+(e.result_summary?`
6
-
7
- `+k(e.result_summary):""),label:"JSON",title:"Copy raw question JSON"})]}),n&&s.jsxs("pre",{id:a,className:"code",children:[k(e.input_json??"{}"),e.result_summary?`
8
-
9
- `+k(e.result_summary):""]})]})}function Ds({t:e}){const n=e.workflow_name?`Workflow · ${e.workflow_name}`:"Workflow";return s.jsxs("div",{className:"tool launch-tool",children:[s.jsxs("div",{className:"launch-tool-head",children:[s.jsxs("span",{className:"tool-name",children:["🔀 ",n]}),e.status&&s.jsx("span",{className:"tool-status",children:e.status})]}),e.workflow_run_id&&s.jsxs(_,{className:"subagent-link small",to:`/workflow/${e.workflow_run_id}`,children:["🔀 launched ",e.workflow_agent_count??0," agent",e.workflow_agent_count===1?"":"s"," · ",s.jsx("code",{children:e.workflow_run_id})," →"]}),e.result_summary&&s.jsx("div",{className:"result",children:e.result_summary})]})}function U(e,n,t){let a=n+2,l=!1;for(e[a]==="-"&&(l=!0,a++);e[a]===" "||e[a]===" ";)a++;let r="";(e[a]==="'"||e[a]==='"')&&(r=e[a],a++);let i="";if(r){for(;a<e.length&&e[a]!==r;)i+=e[a++];e[a]===r&&a++}else for(;a<e.length&&/[A-Za-z0-9_]/.test(e[a]);)i+=e[a++];return i&&t.push({delim:i,strip:l}),a-1}function Vs(e){const n=e.split(`
10
- `),t=[];let a="NORMAL",l=0;const r=[];let i=!1;for(const o of n){if(r.length>0){t.push({text:o,cont:!0});const c=r[0];(c.strip?o.replace(/^\t+/,""):o).trimEnd()===c.delim&&r.shift();continue}t.push({text:o,cont:a!=="NORMAL"||l>0||i}),i=!1;for(let c=0;c<o.length;c++){const u=o[c];if(a==="SQUOTE"){u==="'"&&(a="NORMAL");continue}if(a==="DQUOTE"){u==="\\"?c++:u==='"'?a="NORMAL":u==="$"&&o[c+1]==="("?(l++,c++):u===")"?l>0&&l--:u==="<"&&o[c+1]==="<"&&o[c+2]!=="<"&&o[c-1]!=="<"&&(c=U(o,c,r));continue}if(u==="\\")c++;else if(u==="'")a="SQUOTE";else if(u==='"')a="DQUOTE";else{if(u==="#"&&(c===0||/\s/.test(o[c-1])))break;u==="$"&&o[c+1]==="("?(l++,c++):u==="("?l++:u===")"?l>0&&l--:u==="<"&&o[c+1]==="<"&&o[c+2]!=="<"&&o[c-1]!=="<"&&(c=U(o,c,r))}}if(a==="NORMAL"&&l===0&&r.length===0){const c=o.replace(/\s+$/,""),u=c.match(/\\+$/);(u&&u[0].length%2===1||/(&&|\|\||\|)$/.test(c))&&(i=!0)}}return t}function Qs({t:e,bash:n}){const[t,a]=m.useState(!1),[l,r]=m.useState(!1),[i,o]=m.useState(!1),c=m.useId(),u=m.useId(),p=n.command.split(`
11
- `)[0],j=Vs(n.command);return s.jsxs("div",{className:"tool "+(e.status==="error"?"tool-err":""),children:[s.jsxs("button",{className:"tool-head","aria-expanded":t,"aria-controls":c,onClick:()=>a(x=>!x),children:[s.jsx("span",{className:"tool-name",children:"🖥 Bash"}),n.description?s.jsxs("span",{className:"bash-desc",children:["# ",n.description]}):!t&&s.jsx("span",{className:"bash-preview",children:p}),e.status&&s.jsx("span",{className:"tool-status",children:e.status}),e.total_duration_ms?s.jsx("span",{className:"muted",children:C(e.total_duration_ms)}):null,s.jsx("span",{className:"chev",children:t?"▾":"▸"})]}),t&&s.jsxs("div",{className:"tool-body",id:c,children:[s.jsxs("div",{className:"shell code-block",children:[s.jsx(y,{text:n.command,className:"copy-corner",title:"Copy command"}),s.jsx("pre",{className:"shell-cmd",children:j.map((x,f)=>s.jsxs("span",{children:[s.jsx("span",{className:"shell-gutter"+(x.cont?" cont":""),"aria-hidden":"true",children:x.cont?" ":"$ "}),x.text,f<j.length-1?`
12
- `:""]},f))})]}),(n.run_in_background||n.restart||n.timeout!=null)&&s.jsxs("div",{className:"bash-badges",children:[n.run_in_background&&s.jsx("span",{className:"bash-badge",children:"background"}),n.restart&&s.jsx("span",{className:"bash-badge",children:"restart"}),n.timeout!=null&&s.jsxs("span",{className:"bash-badge",children:["timeout ",Math.round(n.timeout/1e3),"s"]})]}),e.result_summary&&s.jsx("pre",{className:"shell-out",children:e.result_summary}),e.full_result&&s.jsxs("div",{className:"full-result",children:[s.jsxs("button",{type:"button",className:"ghost small show-full","aria-expanded":l,onClick:()=>r(x=>!x),children:[l?"Hide":"Show"," full result (",(e.full_result.bytes/1024).toFixed(1)," KB)"]}),l&&s.jsxs("div",{className:"code-block",children:[s.jsx(y,{text:e.full_result.text,className:"copy-corner",title:"Copy full tool result"}),s.jsx("pre",{className:"code",children:e.full_result.text})]})]}),s.jsxs("div",{className:"launch-actions",children:[s.jsx("button",{className:"ghost small","aria-expanded":i,"aria-controls":u,onClick:()=>o(x=>!x),children:i?"Hide raw JSON ▴":"View raw JSON ▾"}),s.jsx(y,{text:k(e.input_json??"{}"),label:"JSON",title:"Copy raw tool input JSON"})]}),i&&s.jsx("pre",{id:u,className:"code",children:k(e.input_json??"{}")})]})]})}const zs={Edit:"✏️",MultiEdit:"✏️",Write:"📄"},E=400;function Ks({t:e,edit:n}){const[t,a]=m.useState(!1),[l,r]=m.useState(!1),[i,o]=m.useState(!1),c=m.useId(),u=m.useId(),{dir:p,base:j}=Rs(n.file_path);return s.jsxs("div",{className:"tool "+(e.status==="error"?"tool-err":""),children:[s.jsxs("button",{className:"tool-head","aria-expanded":t,"aria-controls":c,onClick:()=>a(x=>!x),children:[s.jsxs("span",{className:"tool-name",children:[zs[n.kind]??"✏️"," ",n.kind]}),s.jsxs("span",{className:"edit-path",children:[s.jsx("span",{className:"base",children:j}),p&&s.jsx("span",{className:"dir",children:p.replace(/\/$/,"")})]}),s.jsxs("span",{className:"diff-stat",children:[n.adds>0&&s.jsxs("span",{className:"add",children:["+",n.adds]}),n.dels>0&&s.jsxs("span",{className:"del",children:["−",n.dels]})]}),e.status&&s.jsx("span",{className:"tool-status",children:e.status}),e.total_duration_ms?s.jsx("span",{className:"muted",children:C(e.total_duration_ms)}):null,s.jsx("span",{className:"chev",children:t?"▾":"▸"})]}),t&&s.jsxs("div",{className:"tool-body",id:c,children:[n.hunks.map((x,f)=>s.jsxs("div",{className:"diff",children:[n.hunks.length>1&&s.jsxs("div",{className:"diff-hunk-sep",children:["edit ",f+1]}),x.slice(0,E).map((d,N)=>s.jsxs("div",{className:"diff-line "+d.type,children:[s.jsx("span",{className:"diff-sign","aria-hidden":"true",children:d.type==="add"?"+":d.type==="del"?"−":" "}),s.jsx("span",{className:"diff-text",children:d.text===""?" ":d.text})]},N)),x.length>E&&s.jsxs("div",{className:"diff-more",children:["… ",x.length-E," more lines — View raw JSON for the rest"]})]},f)),e.result_summary&&s.jsx("pre",{className:"shell-out",children:e.result_summary}),e.full_result&&s.jsxs("div",{className:"full-result",children:[s.jsxs("button",{type:"button",className:"ghost small show-full","aria-expanded":l,onClick:()=>r(x=>!x),children:[l?"Hide":"Show"," full result (",(e.full_result.bytes/1024).toFixed(1)," KB)"]}),l&&s.jsxs("div",{className:"code-block",children:[s.jsx(y,{text:e.full_result.text,className:"copy-corner",title:"Copy full tool result"}),s.jsx("pre",{className:"code",children:e.full_result.text})]})]}),s.jsxs("div",{className:"launch-actions",children:[s.jsx("button",{className:"ghost small","aria-expanded":i,"aria-controls":u,onClick:()=>o(x=>!x),children:i?"Hide raw JSON ▴":"View raw JSON ▾"}),s.jsx(y,{text:k(e.input_json??"{}"),label:"JSON",title:"Copy raw tool input JSON"})]}),i&&s.jsx("pre",{id:u,className:"code",children:k(e.input_json??"{}")})]})]})}function Ys({t:e,hideTools:n}){const t=e.findings??[],a=n&&t.length===0,l=Gs(e,a);return t.length===0?l:s.jsxs(s.Fragment,{children:[l,s.jsx(Cs,{findings:t})]})}function Gs(e,n){if(e.tool_name==="ExitPlanMode"){const t=z(e.input_json);if(t)return s.jsx(Us,{plan:t})}if(e.tool_name==="AskUserQuestion")return s.jsx(Ws,{t:e});if(e.tool_name==="Workflow")return s.jsx(Ds,{t:e});if(e.tool_name==="Bash"){const t=qs(e.input_json);if(t)return n?null:s.jsx(Qs,{t:e,bash:t})}if(e.tool_name==="Edit"||e.tool_name==="MultiEdit"||e.tool_name==="Write"){const t=Bs(e.tool_name,e.input_json);if(t)return n?null:s.jsx(Ks,{t:e,edit:t})}return n?null:s.jsx(ns,{t:e})}function Xs(e,n){return e.findings&&e.findings.length||e.tool_name==="AskUserQuestion"||e.tool_name==="Workflow"||e.tool_name==="ExitPlanMode"&&z(e.input_json)?!0:!n}function ts({e}){const[n,t]=m.useState(!1),a=m.useId(),l=m.useContext(Z),r=m.useContext(ss),i=e.role||e.type,o=i==="user"?"👤":i==="assistant"?"🤖":"⚙️",c=e.toolCalls.filter(f=>Xs(f,l));if(!(e.text||e.thinking||c.length))return null;const p=e.text?K(e.text):null,j=e.text&&!p?Y(e.text):null,x=e.text||e.thinking||"";return s.jsxs("div",{id:"ev-"+e.uuid,className:"event ev-"+i+(r===e.uuid?" ev-flagged":""),children:[s.jsxs("div",{className:"ev-meta",children:[s.jsxs("span",{className:"ev-who",children:[o," ",i]}),e.model&&s.jsx("span",{className:"tag",children:hs(e.model)}),e.is_sidechain?s.jsx("span",{className:"tag subagent",children:"subagent"}):null,s.jsx("span",{className:"muted ev-time",children:W(e.timestamp)}),x&&s.jsx(y,{text:x,className:"ev-copy copy-hover",title:"Copy message"})]}),e.thinking&&s.jsxs("div",{className:"thinking",children:[s.jsxs("button",{className:"thinking-toggle","aria-expanded":n,"aria-controls":a,onClick:()=>t(f=>!f),children:["🧠 thinking ",n?"▾":"▸"]}),n&&s.jsxs("div",{className:"code-block",children:[s.jsx(y,{text:e.thinking,className:"copy-corner",title:"Copy thinking"}),s.jsx("pre",{id:a,className:"thinking-body",children:e.thinking})]})]}),e.text&&(p?s.jsx(Ps,{cmd:p}):j?s.jsx(Hs,{n:j}):s.jsx(es,{text:e.text})),c.map((f,d)=>s.jsx(Ys,{t:f,hideTools:l},d))]})}function Zs({turn:e,events:n,open:t,onToggle:a}){const l=m.useId();return s.jsxs("section",{className:"turn"+(t?" is-open":""),children:[s.jsxs("button",{className:"turn-head","aria-expanded":t,"aria-controls":l,onClick:a,children:[s.jsx("span",{className:"chev turn-chev","aria-hidden":"true",children:t?"▾":"▸"}),s.jsxs("span",{className:"turn-no",children:["turn ",e.seq+1]}),e.prompt_preview?s.jsx("span",{className:"turn-preview",children:Ls(e.prompt_preview)}):null,s.jsxs("span",{className:"turn-stats muted",children:[n.length," msg",n.length===1?"":"s",e.duration_ms?" · "+C(e.duration_ms):""]})]}),s.jsx("div",{id:l,className:"turn-body",role:"region","aria-label":`turn ${e.seq+1} messages`,children:t&&n.map(r=>s.jsx(ts,{e:r},r.uuid))})]})}function se(e,n){const t=new Map(n.map(l=>[l.id,l])),a=[];for(const l of e){const r=l.turn_id??null,i=a[a.length-1];i&&i.turnId===r?i.events.push(l):a.push({turnId:r,turn:r?t.get(r)??null:null,events:[l]})}return a}function ee(e){const{data:n,error:t}=ps("/sessions/"+e,{reset:!0}),a=m.useMemo(()=>{const l=new Map;for(const r of(n==null?void 0:n.events)??[])for(const i of r.toolCalls)i.tool_name==="Workflow"&&i.id&&i.workflow_run_id&&l.set(i.id,i.workflow_run_id);return l},[n]);return{d:n,error:t,wfMap:a}}const M="msgFormat",$="hideTools";function as(e){const n=xs(e,null);if(n!=null)return n;try{return localStorage.getItem("agentlens."+e)}catch{return null}}const ls=e=>e==="raw"?"raw":"markdown",rs=e=>e===!0||e===1||e==="1";function ne(){return ls(as(M))}function te(){return rs(as($))}function ae(e){D(M,e)}function le(e){D($,e)}async function re(){const[e,n]=await Promise.all([R(M),R($)]);return{...e!=null?{format:ls(e)}:{},...n!=null?{hideTools:rs(n)}:{}}}function ue(){var q;const{id:e}=fs(),{hash:n}=js(),{d:t,error:a,wfMap:l}=ee(e),[r,i]=m.useState(new Set),[o,c]=m.useState(ne),[u,p]=m.useState(te);m.useEffect(()=>i(new Set),[e]),m.useEffect(()=>{re().then(h=>{h.format!==void 0&&c(h.format),h.hideTools!==void 0&&p(h.hideTools)})},[]);const j=h=>{c(h),ae(h)},x=()=>p(h=>(le(!h),!h)),f=((q=/^#ev-(.+)$/.exec(n))==null?void 0:q[1])??null,[d,N]=m.useState(null);m.useEffect(()=>{var b;const h=f?(b=t==null?void 0:t.events.find(w=>w.uuid===f))==null?void 0:b.turn_id:null;h&&i(w=>{if(!w.has(h))return w;const B=new Set(w);return B.delete(h),B})},[t,f]);const g=m.useRef(null);if(m.useEffect(()=>{if(!t||!f){g.current=null;return}if(g.current===n)return;const h=document.getElementById("ev-"+f);if(!h)return;g.current=n,h.scrollIntoView({block:"center",behavior:"smooth"}),N(f);const b=window.setTimeout(()=>N(null),3e3);return()=>window.clearTimeout(b)},[t,n,f,r]),a)return s.jsx(gs,{error:a});if(!t)return s.jsx(Ns,{});const v=t.events.filter(h=>h.text||h.thinking||h.toolCalls.length),S=se(v,t.turns),T=S.filter(h=>h.turn).map(h=>h.turnId),A=T.some(h=>!r.has(h)),is=h=>i(b=>{const w=new Set(b);return w.has(h)?w.delete(h):w.add(h),w});return s.jsxs("div",{className:"detail",children:[s.jsx(Fs,{d:t}),t.children&&t.children.length>0&&s.jsx(Ms,{d:t}),s.jsx(Es,{turnCount:T.length,anyOpen:A,onToggleAll:()=>i(A?new Set(T):new Set),hideTools:u,onToggleHideTools:x,format:o,onChooseFormat:j}),s.jsx(X.Provider,{value:l,children:s.jsx(G.Provider,{value:o,children:s.jsx(Z.Provider,{value:u,children:s.jsx(ss.Provider,{value:d,children:s.jsxs("div",{className:"transcript",children:[v.length===0&&s.jsx("div",{className:"muted pad",role:"status",children:"This session has no rendered messages."}),S.map((h,b)=>h.turn?s.jsx(Zs,{turn:h.turn,events:h.events,open:!r.has(h.turnId),onToggle:()=>is(h.turnId)},h.turnId):s.jsx("div",{className:"unturned",children:h.events.map(w=>s.jsx(ts,{e:w},w.uuid))},"unturned-"+b))]})})})})})]})}export{ue as default};
@@ -1 +0,0 @@
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;--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;--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}.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)}.export{margin-left:auto;border:1px solid var(--border);border-radius:6px;padding:6px 12px}.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,.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}.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-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{border-radius:0}.format-toggle button:first-child{border-radius:6px 0 0 6px}.format-toggle button:last-child{border-radius:0 6px 6px 0;margin-left:-1px}.format-toggle button.is-active{background:var(--panel2);color:var(--text);border-color:var(--accent);z-index:1}.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;margin-bottom:18px}.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}.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)}.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)}.dash-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:10px}.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:900px){.skill-cards{grid-template-columns:1fr}}.skill-body{max-height:70vh;overflow:auto}.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}.copy-btn{font-size:11px;padding:2px 7px;line-height:1.4;color:var(--muted);flex:none}.copy-btn:hover:not(:disabled){color:var(--text)}.copy-hover{opacity:0;transition:opacity .12s}.event:hover .copy-hover,.copy-hover:focus-visible{opacity:1}.ev-copy{margin-left:auto}.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}.sev-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--muted);flex:none}.sev-dot.sev-critical{background:#ff8f8f}.sev-dot.sev-high{background:#f0a860}.sev-dot.sev-medium{background:#e0b85a}.sev-dot.sev-low{background:#79c0ff}.sev-dot.sev-info{background:var(--muted)}:root[data-theme=light] .sev-dot.sev-critical{background:#b12626}:root[data-theme=light] .sev-dot.sev-high{background:#b5651d}:root[data-theme=light] .sev-dot.sev-medium{background:#8a6d1f}:root[data-theme=light] .sev-dot.sev-low{background:#1a5fa8}.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;max-width:760px}.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}
@@ -1 +0,0 @@
1
- import{j as i}from"./index-0iQ2t2WR.js";const n=["critical","high","medium","low","info"];function r({severity:s,count:a}){return i.jsxs("span",{className:"tag sev sev-"+s,children:[s,a!=null?` ${a}`:""]})}export{n as S,r as a};