@swestash/agent-lens 0.9.5 → 0.10.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.
- package/dist/agent-lens.js +229 -92
- package/dist/agent-lens.js.map +1 -1
- package/package.json +1 -1
- package/web/404.html +2 -2
- package/web/assets/AboutView-Bngkx739.js +1 -0
- package/web/assets/{Dashboard-BkRLAY2N.js → Dashboard-B9-O6UM7.js} +1 -1
- package/web/assets/{FileView-BbPK6hx9.js → FileView-D4iZxHta.js} +1 -1
- package/web/assets/{FilesView-D0gm4_XO.js → FilesView-bjBm-f1c.js} +1 -1
- package/web/assets/{SecurityView-92YGEb3-.js → SecurityView-DNgbLbZ2.js} +1 -1
- package/web/assets/{SessionView-Dy0ELjaS.js → SessionView-BCz9AnOz.js} +1 -1
- package/web/assets/{SkillView-Te5jcVBw.js → SkillView-D6egSywk.js} +1 -1
- package/web/assets/{SkillsView-FtrADGqR.js → SkillsView-Dvke2ty1.js} +1 -1
- package/web/assets/{WorkflowView-D45UzOuV.js → WorkflowView-BadGoeGI.js} +1 -1
- package/web/assets/index-CeW4iDDs.css +1 -0
- package/web/assets/{index-DYY0_SmQ.js → index-CqWARNqS.js} +13 -13
- package/web/assets/{index-Bgxu3c84.js → index-DxkiGVr3.js} +1 -1
- package/web/assets/{jsonish-Dd3X-MG6.js → jsonish-SimOVe9L.js} +1 -1
- package/web/assets/{severity-CoO1IKlD.js → severity-DJTsjBgl.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-DBaa9asK.css +0 -1
package/package.json
CHANGED
package/web/404.html
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
document.documentElement.dataset.theme = "dark";
|
|
17
17
|
}
|
|
18
18
|
</script>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
20
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-CqWARNqS.js"></script>
|
|
20
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CeW4iDDs.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
23
23
|
<div id="root"></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as j,j as e,A as u}from"./index-CqWARNqS.js";const l="v0.9.6-2-gb594b92";function c(n){if(n==null)return"unknown";if(n<1e3)return`${n} B`;const s=["kB","MB","GB","TB"];let t=n/1e3,r=0;for(;t>=1e3&&r<s.length-1;)t/=1e3,r++;return`${t<10?t.toFixed(1):Math.round(t)} ${s[r]}`}function i({label:n,children:s}){return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",children:n}),e.jsx("td",{children:s})]})}function a({info:n}){return e.jsxs(e.Fragment,{children:[e.jsx("code",{className:"path",children:n.path})," ",e.jsx("span",{className:"origin-tag",title:d(n.origin),children:n.origin})]})}function d(n){switch(n){case"env":return"Set by an environment variable";case"flag":return"Set by a command-line flag";case"file":return"Set in the config file";case"fixed":return"Not independently relocatable — move the whole data dir (ADR-021)";default:return"Built-in default"}}function o({label:n,v:s,what:t,rerun:r}){const h=s.in_data.filter(x=>x<s.expected);return e.jsxs(i,{label:n,children:["v",s.expected,s.stale&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{className:"warn-tag",children:"data is older"})]}),e.jsx("div",{className:"muted",children:s.in_data.length===0?e.jsxs(e.Fragment,{children:["No ",t," stored yet."]}):s.stale?e.jsxs(e.Fragment,{children:["Stored ",t," came from v",h.join(", v")," — re-run ",e.jsx("code",{children:r})," to relabel with v",s.expected,"."]}):e.jsxs(e.Fragment,{children:["All stored ",t," came from v",s.in_data.join(", v"),"."]})})]})}function m(){const n=j("/about");return e.jsxs("div",{className:"about",children:[e.jsx("h1",{children:"About"}),e.jsxs("p",{className:"muted",children:["Diagnostics for this install. Configuration is shown read-only — it resolves"," ",e.jsx("code",{children:"flag > env > config file > default"}),", so change it with"," ",e.jsx("code",{children:"agent-lens config"}),", an env var, or the config file."]}),e.jsx(u,{state:n,children:s=>e.jsxs(e.Fragment,{children:[e.jsxs("section",{children:[e.jsx("h2",{children:"Versions"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsxs(i,{label:"Agent Lens",children:[s.versions.app," ",e.jsx("span",{className:"origin-tag",children:s.versions.app_source}),s.versions.app_source==="unknown"&&e.jsxs("span",{className:"muted",children:[" ","— no npm metadata and no git tag reachable; this is an unreleased or archive build"]})]}),l!==s.versions.app&&e.jsxs(i,{label:"Web build",children:[l," ",e.jsx("span",{className:"warn-tag",role:"status",children:"differs from the server"}),e.jsx("div",{className:"muted",children:"The page you are looking at was built from a different revision than the server serving it — usually a service still running an older install. Restart it, or rebuild the UI."})]}),e.jsxs(i,{label:"Schema",children:[s.versions.schema??"unstamped",s.versions.schema_stale&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{className:"warn-tag",children:"stale"}),e.jsxs("div",{className:"muted",children:["Written by an older build (this one expects ",s.versions.schema_expected,"). Run"," ",e.jsx("code",{children:"agent-lens ingest --full"}),"."]})]})]}),e.jsx(o,{label:"Detector",v:s.versions.detector,what:"security findings",rerun:"agent-lens ingest --full"}),e.jsx(o,{label:"Classifier",v:s.versions.classifier,what:"session categories",rerun:"agent-lens metrics"})]})})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"Paths"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsx(i,{label:"Config file",children:s.paths.config_file?e.jsx("code",{className:"path",children:s.paths.config_file}):e.jsx("span",{className:"muted",children:"none — using built-in defaults"})}),e.jsx(i,{label:"Data dir",children:e.jsx(a,{info:s.paths.data_dir})}),e.jsx(i,{label:"Archive",children:e.jsx(a,{info:s.paths.archive})}),e.jsx(i,{label:"Database",children:e.jsx(a,{info:s.paths.db})}),e.jsx(i,{label:"Triage store",children:e.jsx(a,{info:s.paths.triage_db})})]})})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"Server"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsx(i,{label:"Bound to",children:e.jsxs("code",{children:[s.server.host,":",s.server.port]})}),e.jsx(i,{label:"Network",children:s.server.loopback_only?"Loopback only — not reachable from other machines":e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"warn-tag",children:"non-loopback bind"}),e.jsx("div",{className:"muted",children:"Reachable from other machines on this network. The API is unauthenticated."})]})})]})})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"Retention"}),e.jsx("table",{className:"kv",children:e.jsx("tbody",{children:e.jsxs(i,{label:"Keep .versions",children:[s.retention.versions_keep_days," day",s.retention.versions_keep_days===1?"":"s"," ",e.jsx("span",{className:"origin-tag",title:d(s.retention.origin),children:s.retention.origin}),e.jsxs("div",{className:"muted",children:["How long superseded transcript snapshots are kept before ",e.jsx("code",{children:"scripts/prune.sh"})," ","removes them. Does not affect the database."]})]})})})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"Sources"}),s.sources.length===0?e.jsx("p",{className:"muted",children:"No sources configured."}):e.jsx("table",{className:"kv",children:e.jsx("tbody",{children:s.sources.map(t=>e.jsxs(i,{label:t.label,children:[e.jsx("code",{className:"path",children:t.config_dir})," ",e.jsx("span",{className:"origin-tag",children:t.agent})]},t.label))})})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"Storage"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsx(i,{label:"Database",children:c(s.storage.db_bytes)}),e.jsxs(i,{label:"Ingested",children:[c(s.storage.archive_bytes)," across ",s.storage.archive_files.toLocaleString()," file",s.storage.archive_files===1?"":"s",e.jsxs("div",{className:"muted",children:["Transcript bytes read into the database",s.storage.last_ingested?`, as of the last ingest (${new Date(s.storage.last_ingested).toLocaleString()})`:"",". Excludes anything in the archive that has not been ingested, such as"," ",e.jsx("code",{children:".versions/"})," retention snapshots — so it is not the archive folder’s size on disk."]})]})]})})]})]})})]})}export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as q,j,u as zw,a as jb,f as Lt,s as Eb,b as Pn,c as xi,L as Ww,d as wi,g as ce,R as A,e as Uw,h as Wh,l as Kw,i as Hw,k as Gw,E as Vw,m as Xw,n as Yw,o as ho}from"./index-DYY0_SmQ.js";const po=8,Zw=26;function Jw(){const[e,t]=q.useState(new Set),r=o=>t(u=>{const s=new Set(u);return s.has(o)?s.delete(o):s.add(o),s});return{topN:(o,u)=>e.has(u)?o:o.slice(0,po),expandHeight:(o,u,s=Zw)=>e.has(o)?Math.max(240,u*s):void 0,expandBtn:(o,u)=>{if(!(u<=po))return j.jsx("button",{type:"button",className:"link-btn",onClick:()=>r(o),children:e.has(o)?`show top ${po}`:`show all (${u})`})}}}function Be(){const{theme:e}=zw();return q.useMemo(()=>{const t=getComputedStyle(document.documentElement),r=c=>t.getPropertyValue(c).trim(),n={bg:r("--bg"),panel:r("--panel"),panel2:r("--panel2"),border:r("--border"),text:r("--text"),muted:r("--muted"),accent:r("--accent"),green:r("--user"),gold:r("--gold"),red:r("--err"),violet:r("--violet"),teal:r("--teal")},i={input:n.green,output:n.accent,cache_creation:n.gold,cache_read:n.muted},a=[n.accent,n.green,n.gold,n.violet,n.teal,n.red,n.muted,"#d98c5f","#5f9ed9"],o={stroke:n.muted,tick:{fill:n.muted,fontSize:11},tickLine:!1},u={stroke:n.border,strokeDasharray:"3 3",vertical:!1},s={contentStyle:{background:n.panel2,border:`1px solid ${n.border}`,borderRadius:6,fontSize:12},labelStyle:{color:n.text},itemStyle:{color:n.text}};return{C:n,TOKEN_COLORS:i,PALETTE:a,axisProps:o,gridProps:u,tooltipStyle:s}},[e])}function ct({title:e,hint:t,actions:r,bodyHeight:n,hidden:i,children:a}){return i?null:j.jsxs("div",{className:"card",children:[j.jsxs("div",{className:"card-head",children:[j.jsx("h3",{children:e}),t&&j.jsx("span",{className:"card-hint",children:t}),r&&j.jsx("span",{className:"card-actions",children:r})]}),j.jsx("div",{className:"chart-body",style:n!=null?{height:n}:void 0,children:a})]})}function Ge({label:e,value:t,sub:r,title:n}){return j.jsxs("div",{className:"kpi",title:n,children:[j.jsx("div",{className:"kpi-label",children:e}),j.jsx("div",{className:"kpi-value",children:t}),r!=null&&j.jsx("div",{className:"kpi-sub",children:r})]})}function Mb(e,t){var n;const r=((n=e==null?void 0:e.payload)==null?void 0:n[t])??(e==null?void 0:e[t]);return typeof r=="string"&&r!==""?r:null}function Qw({active:e,payload:t,versionsByName:r}){var s,c,f,l;const{C:n,tooltipStyle:i}=Be();if(!e||!(t!=null&&t.length))return null;const a=String(((c=(s=t[0])==null?void 0:s.payload)==null?void 0:c.name)??""),o=Number(((l=(f=t[0])==null?void 0:f.payload)==null?void 0:l.n)??0),u=r.get(a)??[];return j.jsxs("div",{style:{...i.contentStyle,padding:"8px 10px",maxWidth:280},children:[j.jsx("div",{style:{color:n.text,fontWeight:600,marginBottom:4},children:a}),j.jsxs("div",{style:{color:n.muted,marginBottom:u.length?6:0},children:[o," firing",o===1?"":"s"," total"]}),u.map(h=>j.jsxs("div",{style:{color:n.text,display:"flex",justifyContent:"space-between",gap:12},children:[j.jsx("span",{style:{color:n.muted},children:h.version_id.slice(0,8)}),j.jsx("span",{children:h.n})]},h.version_id)),u.length>0&&j.jsx("div",{style:{color:n.muted,marginTop:6,fontSize:11},children:"click to open skill →"})]})}function Nf({x:e,y:t,payload:r,onSelect:n,title:i}){return j.jsxs("text",{x:e,y:t,dy:4,textAnchor:"end",className:"axis-link",fontSize:11,onClick:()=>(r==null?void 0:r.value)&&n(r.value),children:[i&&j.jsx("title",{children:i}),r==null?void 0:r.value]})}function eO(){const e=jb(),t=(n,i)=>{i!=null&&i!==""&&e(`/?${n}=${encodeURIComponent(i)}`)};return{drillFilter:t,drillTo:(n,i)=>a=>t(n,Mb(a,i))}}function tO({s:e}){const t=new Map(e.by_severity.map(a=>[a.severity,a.n])),r=t.get("critical")??0,n=t.get("high")??0,i=e.total===0?"—":`${r} / ${n}`;return j.jsxs(Ww,{className:"kpi kpi-btn"+(r>0?" sev-critical":n>0?" sev-high":""),to:"/security",title:"Security findings — critical / high. Opens the Security page.",children:[j.jsx("div",{className:"kpi-label",children:"Security findings"}),j.jsx("div",{className:"kpi-value",children:i}),j.jsx("div",{className:"kpi-sub",children:e.total===0?"no open findings":`critical / high · ${e.total} open in ${e.sessions_flagged} sessions`})]})}function rO({t:e}){const{TOKEN_COLORS:t}=Be(),r=e.input+e.output+e.cache_creation+e.cache_read,n=[{name:"Input",v:e.input,c:t.input},{name:"Output",v:e.output,c:t.output},{name:"Cache write",v:e.cache_creation,c:t.cache_creation},{name:"Cache read",v:e.cache_read,c:t.cache_read}];return j.jsxs("div",{className:"kpi",title:"Token totals by type: input · output · cache-write · cache-read",children:[j.jsx("div",{className:"kpi-label",children:"Token breakdown"}),j.jsx("ul",{className:"kpi-bd",children:n.map(i=>j.jsxs("li",{children:[j.jsx("span",{className:"kpi-bd-dot",style:{background:i.c},"aria-hidden":"true"}),j.jsx("span",{className:"kpi-bd-name",children:i.name}),j.jsx("span",{className:"kpi-bd-val",children:Lt(i.v)}),j.jsxs("span",{className:"kpi-bd-pct",children:[r?Math.round(i.v/r*100):0,"%"]})]},i.name))})]})}function nO({overview:e,bd:t,security:r}){var s,c;const n=((s=t==null?void 0:t.error_types)==null?void 0:s.failures)??0,i=((c=t==null?void 0:t.error_types)==null?void 0:c.rejections)??0,a=e.tool_calls??0,o=a?n/a*100:0,u=a?i/a*100:0;return j.jsxs("div",{className:"kpis",children:[j.jsx(Ge,{label:"Sessions",value:e.sessions_main,sub:`+${e.sessions_subagent.toLocaleString()} subagent runs`}),j.jsx(Ge,{label:"Projects",value:e.projects,sub:"distinct project paths"}),j.jsx(Ge,{label:"Turns",value:e.turns,sub:`${e.tool_calls.toLocaleString()} tool calls`}),j.jsx(Ge,{label:"Tool error rate",value:a?o.toFixed(1)+"%":"—",title:"Genuine tool failures as a share of all tool calls (rejections/blocks excluded — see the rejection rate).",sub:`${n.toLocaleString()} failed of ${a.toLocaleString()} calls`}),j.jsx(Ge,{label:"Rejection rate",value:a?u.toFixed(1)+"%":"—",title:"User-rejected + guardrail-blocked tool calls as a share of all tool calls. Not agent failures.",sub:`${i.toLocaleString()} rejected/blocked`}),j.jsx(Ge,{label:"Workflow runs",value:e.workflows.total||"—",title:"Async workflow runs in range. Success rate is over decided runs (completed vs failed); in-flight runs are excluded from the rate.",sub:e.workflows.total?`${Math.round(e.workflows.success_rate*100)}% success · ${Lt(e.workflows.total_tokens)}`:"no workflow runs"}),j.jsx(Ge,{label:"Est. cost (API-equiv.)",value:Pn(e.cost),title:"Estimated at API list prices for this usage (cache reads/writes included at their discounted cache rates).",sub:e.unpriced_models.length?`⚠ unpriced: ${e.unpriced_models.map(Eb).join(", ")}`:"API list price estimate"}),j.jsx(Ge,{label:"Cost / session",value:e.sessions_main?Pn(e.cost/e.sessions_main):"—",title:"Estimated API-equivalent cost divided by main sessions in range.",sub:"API-equiv. per main session"}),j.jsx(Ge,{label:"Cache-read ratio",value:(e.cache_read_ratio*100).toFixed(1)+"%",sub:"of all tokens are cached replays — excluded from “work”"}),j.jsx(Ge,{label:"Turn duration p50 / p95",value:`${xi(e.turn_duration_ms.p50)} / ${xi(e.turn_duration_ms.p95)}`,sub:`${e.turn_duration_ms.count} turns`}),j.jsx(Ge,{label:"Session duration p50 / p95",value:`${xi(e.session_duration_ms.p50)} / ${xi(e.session_duration_ms.p95)}`,title:"End-to-end wall-clock length of main sessions (subagents excluded).",sub:`${e.session_duration_ms.count} sessions`}),j.jsx(Ge,{label:"Total tokens",value:Lt(e.total_tokens),sub:`${Lt(e.tokens.input+e.tokens.output)} non-cache`}),j.jsx(rO,{t:e.tokens}),r&&j.jsx(tO,{s:r})]})}function Cb(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cb(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ee(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cb(e))&&(n&&(n+=" "),n+=t);return n}var vo,Uh;function Fe(){if(Uh)return vo;Uh=1;var e=Array.isArray;return vo=e,vo}var yo,Kh;function $b(){if(Kh)return yo;Kh=1;var e=typeof wi=="object"&&wi&&wi.Object===Object&&wi;return yo=e,yo}var mo,Hh;function mt(){if(Hh)return mo;Hh=1;var e=$b(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return mo=r,mo}var go,Gh;function si(){if(Gh)return go;Gh=1;var e=mt(),t=e.Symbol;return go=t,go}var bo,Vh;function iO(){if(Vh)return bo;Vh=1;var e=si(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return bo=a,bo}var xo,Xh;function aO(){if(Xh)return xo;Xh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return xo=r,xo}var wo,Yh;function Mt(){if(Yh)return wo;Yh=1;var e=si(),t=iO(),r=aO(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return wo=o,wo}var Oo,Zh;function Ct(){if(Zh)return Oo;Zh=1;function e(t){return t!=null&&typeof t=="object"}return Oo=e,Oo}var _o,Jh;function Qr(){if(Jh)return _o;Jh=1;var e=Mt(),t=Ct(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return _o=n,_o}var So,Qh;function Rf(){if(Qh)return So;Qh=1;var e=Fe(),t=Qr(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return So=i,So}var Ao,ep;function Ft(){if(ep)return Ao;ep=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ao=e,Ao}var Po,tp;function Df(){if(tp)return Po;tp=1;var e=Mt(),t=Ft(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return Po=o,Po}var To,rp;function oO(){if(rp)return To;rp=1;var e=mt(),t=e["__core-js_shared__"];return To=t,To}var jo,np;function uO(){if(np)return jo;np=1;var e=oO(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return jo=r,jo}var Eo,ip;function Ib(){if(ip)return Eo;ip=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Eo=r,Eo}var Mo,ap;function sO(){if(ap)return Mo;ap=1;var e=Df(),t=uO(),r=Ft(),n=Ib(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(h){if(!r(h)||t(h))return!1;var d=e(h)?f:a;return d.test(n(h))}return Mo=l,Mo}var Co,op;function cO(){if(op)return Co;op=1;function e(t,r){return t==null?void 0:t[r]}return Co=e,Co}var $o,up;function fr(){if(up)return $o;up=1;var e=sO(),t=cO();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return $o=r,$o}var Io,sp;function Na(){if(sp)return Io;sp=1;var e=fr(),t=e(Object,"create");return Io=t,Io}var ko,cp;function lO(){if(cp)return ko;cp=1;var e=Na();function t(){this.__data__=e?e(null):{},this.size=0}return ko=t,ko}var No,lp;function fO(){if(lp)return No;lp=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return No=e,No}var Ro,fp;function hO(){if(fp)return Ro;fp=1;var e=Na(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return Ro=i,Ro}var Do,hp;function pO(){if(hp)return Do;hp=1;var e=Na(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return Do=n,Do}var qo,pp;function dO(){if(pp)return qo;pp=1;var e=Na(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return qo=r,qo}var Lo,dp;function vO(){if(dp)return Lo;dp=1;var e=lO(),t=fO(),r=hO(),n=pO(),i=dO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Lo=a,Lo}var Bo,vp;function yO(){if(vp)return Bo;vp=1;function e(){this.__data__=[],this.size=0}return Bo=e,Bo}var Fo,yp;function qf(){if(yp)return Fo;yp=1;function e(t,r){return t===r||t!==t&&r!==r}return Fo=e,Fo}var zo,mp;function Ra(){if(mp)return zo;mp=1;var e=qf();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return zo=t,zo}var Wo,gp;function mO(){if(gp)return Wo;gp=1;var e=Ra(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Wo=n,Wo}var Uo,bp;function gO(){if(bp)return Uo;bp=1;var e=Ra();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Uo=t,Uo}var Ko,xp;function bO(){if(xp)return Ko;xp=1;var e=Ra();function t(r){return e(this.__data__,r)>-1}return Ko=t,Ko}var Ho,wp;function xO(){if(wp)return Ho;wp=1;var e=Ra();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ho=t,Ho}var Go,Op;function Da(){if(Op)return Go;Op=1;var e=yO(),t=mO(),r=gO(),n=bO(),i=xO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Go=a,Go}var Vo,_p;function Lf(){if(_p)return Vo;_p=1;var e=fr(),t=mt(),r=e(t,"Map");return Vo=r,Vo}var Xo,Sp;function wO(){if(Sp)return Xo;Sp=1;var e=vO(),t=Da(),r=Lf();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Xo=n,Xo}var Yo,Ap;function OO(){if(Ap)return Yo;Ap=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Yo=e,Yo}var Zo,Pp;function qa(){if(Pp)return Zo;Pp=1;var e=OO();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Zo=t,Zo}var Jo,Tp;function _O(){if(Tp)return Jo;Tp=1;var e=qa();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Jo=t,Jo}var Qo,jp;function SO(){if(jp)return Qo;jp=1;var e=qa();function t(r){return e(this,r).get(r)}return Qo=t,Qo}var eu,Ep;function AO(){if(Ep)return eu;Ep=1;var e=qa();function t(r){return e(this,r).has(r)}return eu=t,eu}var tu,Mp;function PO(){if(Mp)return tu;Mp=1;var e=qa();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return tu=t,tu}var ru,Cp;function Bf(){if(Cp)return ru;Cp=1;var e=wO(),t=_O(),r=SO(),n=AO(),i=PO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ru=a,ru}var nu,$p;function kb(){if($p)return nu;$p=1;var e=Bf(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,nu=r,nu}var iu,Ip;function TO(){if(Ip)return iu;Ip=1;var e=kb(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return iu=r,iu}var au,kp;function jO(){if(kp)return au;kp=1;var e=TO(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return au=n,au}var ou,Np;function Ff(){if(Np)return ou;Np=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return ou=e,ou}var uu,Rp;function EO(){if(Rp)return uu;Rp=1;var e=si(),t=Ff(),r=Fe(),n=Qr(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return uu=o,uu}var su,Dp;function Nb(){if(Dp)return su;Dp=1;var e=EO();function t(r){return r==null?"":e(r)}return su=t,su}var cu,qp;function Rb(){if(qp)return cu;qp=1;var e=Fe(),t=Rf(),r=jO(),n=Nb();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return cu=i,cu}var lu,Lp;function La(){if(Lp)return lu;Lp=1;var e=Qr();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return lu=t,lu}var fu,Bp;function zf(){if(Bp)return fu;Bp=1;var e=Rb(),t=La();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return fu=r,fu}var hu,Fp;function Db(){if(Fp)return hu;Fp=1;var e=zf();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return hu=t,hu}var MO=Db();const Je=ce(MO);var pu,zp;function CO(){if(zp)return pu;zp=1;function e(t){return t==null}return pu=e,pu}var $O=CO();const Q=ce($O);var du,Wp;function IO(){if(Wp)return du;Wp=1;var e=Mt(),t=Fe(),r=Ct(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return du=i,du}var kO=IO();const or=ce(kO);var NO=Df();const X=ce(NO);var RO=Ft();const en=ce(RO);var vu={exports:{}},ne={};/**
|
|
1
|
+
import{r as q,j,u as zw,a as jb,f as Lt,s as Eb,b as Pn,c as xi,L as Ww,d as wi,g as ce,R as A,e as Uw,h as Wh,l as Kw,i as Hw,k as Gw,E as Vw,m as Xw,n as Yw,o as ho}from"./index-CqWARNqS.js";const po=8,Zw=26;function Jw(){const[e,t]=q.useState(new Set),r=o=>t(u=>{const s=new Set(u);return s.has(o)?s.delete(o):s.add(o),s});return{topN:(o,u)=>e.has(u)?o:o.slice(0,po),expandHeight:(o,u,s=Zw)=>e.has(o)?Math.max(240,u*s):void 0,expandBtn:(o,u)=>{if(!(u<=po))return j.jsx("button",{type:"button",className:"link-btn",onClick:()=>r(o),children:e.has(o)?`show top ${po}`:`show all (${u})`})}}}function Be(){const{theme:e}=zw();return q.useMemo(()=>{const t=getComputedStyle(document.documentElement),r=c=>t.getPropertyValue(c).trim(),n={bg:r("--bg"),panel:r("--panel"),panel2:r("--panel2"),border:r("--border"),text:r("--text"),muted:r("--muted"),accent:r("--accent"),green:r("--user"),gold:r("--gold"),red:r("--err"),violet:r("--violet"),teal:r("--teal")},i={input:n.green,output:n.accent,cache_creation:n.gold,cache_read:n.muted},a=[n.accent,n.green,n.gold,n.violet,n.teal,n.red,n.muted,"#d98c5f","#5f9ed9"],o={stroke:n.muted,tick:{fill:n.muted,fontSize:11},tickLine:!1},u={stroke:n.border,strokeDasharray:"3 3",vertical:!1},s={contentStyle:{background:n.panel2,border:`1px solid ${n.border}`,borderRadius:6,fontSize:12},labelStyle:{color:n.text},itemStyle:{color:n.text}};return{C:n,TOKEN_COLORS:i,PALETTE:a,axisProps:o,gridProps:u,tooltipStyle:s}},[e])}function ct({title:e,hint:t,actions:r,bodyHeight:n,hidden:i,children:a}){return i?null:j.jsxs("div",{className:"card",children:[j.jsxs("div",{className:"card-head",children:[j.jsx("h3",{children:e}),t&&j.jsx("span",{className:"card-hint",children:t}),r&&j.jsx("span",{className:"card-actions",children:r})]}),j.jsx("div",{className:"chart-body",style:n!=null?{height:n}:void 0,children:a})]})}function Ge({label:e,value:t,sub:r,title:n}){return j.jsxs("div",{className:"kpi",title:n,children:[j.jsx("div",{className:"kpi-label",children:e}),j.jsx("div",{className:"kpi-value",children:t}),r!=null&&j.jsx("div",{className:"kpi-sub",children:r})]})}function Mb(e,t){var n;const r=((n=e==null?void 0:e.payload)==null?void 0:n[t])??(e==null?void 0:e[t]);return typeof r=="string"&&r!==""?r:null}function Qw({active:e,payload:t,versionsByName:r}){var s,c,f,l;const{C:n,tooltipStyle:i}=Be();if(!e||!(t!=null&&t.length))return null;const a=String(((c=(s=t[0])==null?void 0:s.payload)==null?void 0:c.name)??""),o=Number(((l=(f=t[0])==null?void 0:f.payload)==null?void 0:l.n)??0),u=r.get(a)??[];return j.jsxs("div",{style:{...i.contentStyle,padding:"8px 10px",maxWidth:280},children:[j.jsx("div",{style:{color:n.text,fontWeight:600,marginBottom:4},children:a}),j.jsxs("div",{style:{color:n.muted,marginBottom:u.length?6:0},children:[o," firing",o===1?"":"s"," total"]}),u.map(h=>j.jsxs("div",{style:{color:n.text,display:"flex",justifyContent:"space-between",gap:12},children:[j.jsx("span",{style:{color:n.muted},children:h.version_id.slice(0,8)}),j.jsx("span",{children:h.n})]},h.version_id)),u.length>0&&j.jsx("div",{style:{color:n.muted,marginTop:6,fontSize:11},children:"click to open skill →"})]})}function Nf({x:e,y:t,payload:r,onSelect:n,title:i}){return j.jsxs("text",{x:e,y:t,dy:4,textAnchor:"end",className:"axis-link",fontSize:11,onClick:()=>(r==null?void 0:r.value)&&n(r.value),children:[i&&j.jsx("title",{children:i}),r==null?void 0:r.value]})}function eO(){const e=jb(),t=(n,i)=>{i!=null&&i!==""&&e(`/?${n}=${encodeURIComponent(i)}`)};return{drillFilter:t,drillTo:(n,i)=>a=>t(n,Mb(a,i))}}function tO({s:e}){const t=new Map(e.by_severity.map(a=>[a.severity,a.n])),r=t.get("critical")??0,n=t.get("high")??0,i=e.total===0?"—":`${r} / ${n}`;return j.jsxs(Ww,{className:"kpi kpi-btn"+(r>0?" sev-critical":n>0?" sev-high":""),to:"/security",title:"Security findings — critical / high. Opens the Security page.",children:[j.jsx("div",{className:"kpi-label",children:"Security findings"}),j.jsx("div",{className:"kpi-value",children:i}),j.jsx("div",{className:"kpi-sub",children:e.total===0?"no open findings":`critical / high · ${e.total} open in ${e.sessions_flagged} sessions`})]})}function rO({t:e}){const{TOKEN_COLORS:t}=Be(),r=e.input+e.output+e.cache_creation+e.cache_read,n=[{name:"Input",v:e.input,c:t.input},{name:"Output",v:e.output,c:t.output},{name:"Cache write",v:e.cache_creation,c:t.cache_creation},{name:"Cache read",v:e.cache_read,c:t.cache_read}];return j.jsxs("div",{className:"kpi",title:"Token totals by type: input · output · cache-write · cache-read",children:[j.jsx("div",{className:"kpi-label",children:"Token breakdown"}),j.jsx("ul",{className:"kpi-bd",children:n.map(i=>j.jsxs("li",{children:[j.jsx("span",{className:"kpi-bd-dot",style:{background:i.c},"aria-hidden":"true"}),j.jsx("span",{className:"kpi-bd-name",children:i.name}),j.jsx("span",{className:"kpi-bd-val",children:Lt(i.v)}),j.jsxs("span",{className:"kpi-bd-pct",children:[r?Math.round(i.v/r*100):0,"%"]})]},i.name))})]})}function nO({overview:e,bd:t,security:r}){var s,c;const n=((s=t==null?void 0:t.error_types)==null?void 0:s.failures)??0,i=((c=t==null?void 0:t.error_types)==null?void 0:c.rejections)??0,a=e.tool_calls??0,o=a?n/a*100:0,u=a?i/a*100:0;return j.jsxs("div",{className:"kpis",children:[j.jsx(Ge,{label:"Sessions",value:e.sessions_main,sub:`+${e.sessions_subagent.toLocaleString()} subagent runs`}),j.jsx(Ge,{label:"Projects",value:e.projects,sub:"distinct project paths"}),j.jsx(Ge,{label:"Turns",value:e.turns,sub:`${e.tool_calls.toLocaleString()} tool calls`}),j.jsx(Ge,{label:"Tool error rate",value:a?o.toFixed(1)+"%":"—",title:"Genuine tool failures as a share of all tool calls (rejections/blocks excluded — see the rejection rate).",sub:`${n.toLocaleString()} failed of ${a.toLocaleString()} calls`}),j.jsx(Ge,{label:"Rejection rate",value:a?u.toFixed(1)+"%":"—",title:"User-rejected + guardrail-blocked tool calls as a share of all tool calls. Not agent failures.",sub:`${i.toLocaleString()} rejected/blocked`}),j.jsx(Ge,{label:"Workflow runs",value:e.workflows.total||"—",title:"Async workflow runs in range. Success rate is over decided runs (completed vs failed); in-flight runs are excluded from the rate.",sub:e.workflows.total?`${Math.round(e.workflows.success_rate*100)}% success · ${Lt(e.workflows.total_tokens)}`:"no workflow runs"}),j.jsx(Ge,{label:"Est. cost (API-equiv.)",value:Pn(e.cost),title:"Estimated at API list prices for this usage (cache reads/writes included at their discounted cache rates).",sub:e.unpriced_models.length?`⚠ unpriced: ${e.unpriced_models.map(Eb).join(", ")}`:"API list price estimate"}),j.jsx(Ge,{label:"Cost / session",value:e.sessions_main?Pn(e.cost/e.sessions_main):"—",title:"Estimated API-equivalent cost divided by main sessions in range.",sub:"API-equiv. per main session"}),j.jsx(Ge,{label:"Cache-read ratio",value:(e.cache_read_ratio*100).toFixed(1)+"%",sub:"of all tokens are cached replays — excluded from “work”"}),j.jsx(Ge,{label:"Turn duration p50 / p95",value:`${xi(e.turn_duration_ms.p50)} / ${xi(e.turn_duration_ms.p95)}`,sub:`${e.turn_duration_ms.count} turns`}),j.jsx(Ge,{label:"Session duration p50 / p95",value:`${xi(e.session_duration_ms.p50)} / ${xi(e.session_duration_ms.p95)}`,title:"End-to-end wall-clock length of main sessions (subagents excluded).",sub:`${e.session_duration_ms.count} sessions`}),j.jsx(Ge,{label:"Total tokens",value:Lt(e.total_tokens),sub:`${Lt(e.tokens.input+e.tokens.output)} non-cache`}),j.jsx(rO,{t:e.tokens}),r&&j.jsx(tO,{s:r})]})}function Cb(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cb(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ee(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cb(e))&&(n&&(n+=" "),n+=t);return n}var vo,Uh;function Fe(){if(Uh)return vo;Uh=1;var e=Array.isArray;return vo=e,vo}var yo,Kh;function $b(){if(Kh)return yo;Kh=1;var e=typeof wi=="object"&&wi&&wi.Object===Object&&wi;return yo=e,yo}var mo,Hh;function mt(){if(Hh)return mo;Hh=1;var e=$b(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return mo=r,mo}var go,Gh;function si(){if(Gh)return go;Gh=1;var e=mt(),t=e.Symbol;return go=t,go}var bo,Vh;function iO(){if(Vh)return bo;Vh=1;var e=si(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return bo=a,bo}var xo,Xh;function aO(){if(Xh)return xo;Xh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return xo=r,xo}var wo,Yh;function Mt(){if(Yh)return wo;Yh=1;var e=si(),t=iO(),r=aO(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return wo=o,wo}var Oo,Zh;function Ct(){if(Zh)return Oo;Zh=1;function e(t){return t!=null&&typeof t=="object"}return Oo=e,Oo}var _o,Jh;function Qr(){if(Jh)return _o;Jh=1;var e=Mt(),t=Ct(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return _o=n,_o}var So,Qh;function Rf(){if(Qh)return So;Qh=1;var e=Fe(),t=Qr(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return So=i,So}var Ao,ep;function Ft(){if(ep)return Ao;ep=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ao=e,Ao}var Po,tp;function Df(){if(tp)return Po;tp=1;var e=Mt(),t=Ft(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return Po=o,Po}var To,rp;function oO(){if(rp)return To;rp=1;var e=mt(),t=e["__core-js_shared__"];return To=t,To}var jo,np;function uO(){if(np)return jo;np=1;var e=oO(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return jo=r,jo}var Eo,ip;function Ib(){if(ip)return Eo;ip=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Eo=r,Eo}var Mo,ap;function sO(){if(ap)return Mo;ap=1;var e=Df(),t=uO(),r=Ft(),n=Ib(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(h){if(!r(h)||t(h))return!1;var d=e(h)?f:a;return d.test(n(h))}return Mo=l,Mo}var Co,op;function cO(){if(op)return Co;op=1;function e(t,r){return t==null?void 0:t[r]}return Co=e,Co}var $o,up;function fr(){if(up)return $o;up=1;var e=sO(),t=cO();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return $o=r,$o}var Io,sp;function Na(){if(sp)return Io;sp=1;var e=fr(),t=e(Object,"create");return Io=t,Io}var ko,cp;function lO(){if(cp)return ko;cp=1;var e=Na();function t(){this.__data__=e?e(null):{},this.size=0}return ko=t,ko}var No,lp;function fO(){if(lp)return No;lp=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return No=e,No}var Ro,fp;function hO(){if(fp)return Ro;fp=1;var e=Na(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return Ro=i,Ro}var Do,hp;function pO(){if(hp)return Do;hp=1;var e=Na(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return Do=n,Do}var qo,pp;function dO(){if(pp)return qo;pp=1;var e=Na(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return qo=r,qo}var Lo,dp;function vO(){if(dp)return Lo;dp=1;var e=lO(),t=fO(),r=hO(),n=pO(),i=dO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Lo=a,Lo}var Bo,vp;function yO(){if(vp)return Bo;vp=1;function e(){this.__data__=[],this.size=0}return Bo=e,Bo}var Fo,yp;function qf(){if(yp)return Fo;yp=1;function e(t,r){return t===r||t!==t&&r!==r}return Fo=e,Fo}var zo,mp;function Ra(){if(mp)return zo;mp=1;var e=qf();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return zo=t,zo}var Wo,gp;function mO(){if(gp)return Wo;gp=1;var e=Ra(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Wo=n,Wo}var Uo,bp;function gO(){if(bp)return Uo;bp=1;var e=Ra();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Uo=t,Uo}var Ko,xp;function bO(){if(xp)return Ko;xp=1;var e=Ra();function t(r){return e(this.__data__,r)>-1}return Ko=t,Ko}var Ho,wp;function xO(){if(wp)return Ho;wp=1;var e=Ra();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ho=t,Ho}var Go,Op;function Da(){if(Op)return Go;Op=1;var e=yO(),t=mO(),r=gO(),n=bO(),i=xO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Go=a,Go}var Vo,_p;function Lf(){if(_p)return Vo;_p=1;var e=fr(),t=mt(),r=e(t,"Map");return Vo=r,Vo}var Xo,Sp;function wO(){if(Sp)return Xo;Sp=1;var e=vO(),t=Da(),r=Lf();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Xo=n,Xo}var Yo,Ap;function OO(){if(Ap)return Yo;Ap=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Yo=e,Yo}var Zo,Pp;function qa(){if(Pp)return Zo;Pp=1;var e=OO();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Zo=t,Zo}var Jo,Tp;function _O(){if(Tp)return Jo;Tp=1;var e=qa();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Jo=t,Jo}var Qo,jp;function SO(){if(jp)return Qo;jp=1;var e=qa();function t(r){return e(this,r).get(r)}return Qo=t,Qo}var eu,Ep;function AO(){if(Ep)return eu;Ep=1;var e=qa();function t(r){return e(this,r).has(r)}return eu=t,eu}var tu,Mp;function PO(){if(Mp)return tu;Mp=1;var e=qa();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return tu=t,tu}var ru,Cp;function Bf(){if(Cp)return ru;Cp=1;var e=wO(),t=_O(),r=SO(),n=AO(),i=PO();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ru=a,ru}var nu,$p;function kb(){if($p)return nu;$p=1;var e=Bf(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,nu=r,nu}var iu,Ip;function TO(){if(Ip)return iu;Ip=1;var e=kb(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return iu=r,iu}var au,kp;function jO(){if(kp)return au;kp=1;var e=TO(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return au=n,au}var ou,Np;function Ff(){if(Np)return ou;Np=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return ou=e,ou}var uu,Rp;function EO(){if(Rp)return uu;Rp=1;var e=si(),t=Ff(),r=Fe(),n=Qr(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return uu=o,uu}var su,Dp;function Nb(){if(Dp)return su;Dp=1;var e=EO();function t(r){return r==null?"":e(r)}return su=t,su}var cu,qp;function Rb(){if(qp)return cu;qp=1;var e=Fe(),t=Rf(),r=jO(),n=Nb();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return cu=i,cu}var lu,Lp;function La(){if(Lp)return lu;Lp=1;var e=Qr();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return lu=t,lu}var fu,Bp;function zf(){if(Bp)return fu;Bp=1;var e=Rb(),t=La();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return fu=r,fu}var hu,Fp;function Db(){if(Fp)return hu;Fp=1;var e=zf();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return hu=t,hu}var MO=Db();const Je=ce(MO);var pu,zp;function CO(){if(zp)return pu;zp=1;function e(t){return t==null}return pu=e,pu}var $O=CO();const Q=ce($O);var du,Wp;function IO(){if(Wp)return du;Wp=1;var e=Mt(),t=Fe(),r=Ct(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return du=i,du}var kO=IO();const or=ce(kO);var NO=Df();const X=ce(NO);var RO=Ft();const en=ce(RO);var vu={exports:{}},ne={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-is.production.min.js
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as d,w as h,j as e,A as o,L as r,v as t}from"./index-
|
|
1
|
+
import{C as d,w as h,j as e,A as o,L as r,v as t}from"./index-CqWARNqS.js";import{relPath as m,LinesDelta as p}from"./FilesView-bjBm-f1c.js";function v(){const[i]=d(),l=i.get("path")??"",a=i.get("project")??"",n=new URLSearchParams({path:l});a&&n.set("project",a);const s=h(l?"/file?"+n.toString():null);return e.jsx(o,{state:s,empty:e.jsx("div",{className:"muted pad",children:"Not found."}),children:c=>e.jsx(j,{data:c})})}function j({data:i}){return e.jsxs("div",{className:"file-view",children:[e.jsx(r,{to:"/files",className:"back",children:"← all files"}),e.jsxs("header",{className:"skill-head",children:[e.jsxs("h1",{children:["📄 ",m(i.file_path,i.project_path)]}),e.jsxs("div",{className:"skill-head-meta muted",children:[e.jsx("span",{title:i.file_path,children:i.file_path}),i.project_path?e.jsxs(e.Fragment,{children:[" · in ",i.project_path.replace(/^.*\//,"")]}):null]})]}),e.jsxs("div",{className:"kpis",children:[e.jsxs("div",{className:"kpi",children:[e.jsx("div",{className:"kpi-label",children:"sessions"}),e.jsx("div",{className:"kpi-value",children:i.sessions_count.toLocaleString()})]}),e.jsxs("div",{className:"kpi",children:[e.jsx("div",{className:"kpi-label",children:"changes"}),e.jsx("div",{className:"kpi-value",children:i.changes_count.toLocaleString()})]}),e.jsxs("div",{className:"kpi",children:[e.jsx("div",{className:"kpi-label",children:"lines + / −"}),e.jsxs("div",{className:"kpi-value",children:["+",i.lines_added.toLocaleString()," −",i.lines_removed.toLocaleString()]})]}),e.jsxs("div",{className:"kpi",children:[e.jsx("div",{className:"kpi-label",children:"first · last touched"}),e.jsxs("div",{className:"kpi-value kpi-sub",children:[t(i.first_ts)," · ",t(i.last_ts)]})]})]}),i.sessions.map(l=>{var n;const a=(n=l.changes.find(s=>s.event_uuid))==null?void 0:n.event_uuid;return e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"card-head",children:[e.jsx("h3",{children:e.jsx(r,{to:`/session/${l.session_id}${a?`#ev-${a}`:""}`,className:"title",title:a?"Open the session at this file's first change":void 0,children:l.title||e.jsx("span",{className:"muted",children:l.session_id.slice(0,12)})})}),e.jsxs("span",{className:"card-hint",children:[l.category&&e.jsx("span",{className:`tag cat-${l.category}`,children:l.category}),l.source_id&&e.jsx("span",{className:"tag",children:l.source_id})," ",t(l.started_at)]})]}),e.jsxs("table",{className:"sessions",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Turn"}),e.jsx("th",{children:"Tool"}),e.jsx("th",{className:"num",children:"+ / −"}),e.jsx("th",{children:"Prompt"}),e.jsx("th",{children:"When"})]})}),e.jsx("tbody",{children:l.changes.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.event_uuid?e.jsxs(r,{to:`/session/${l.session_id}#ev-${s.event_uuid}`,className:"title",title:"Jump to this change in the transcript",children:["turn ",s.turn_seq!=null?s.turn_seq+1:"?"]}):e.jsxs("span",{className:"muted",children:["turn ",s.turn_seq!=null?s.turn_seq+1:"?"]})}),e.jsx("td",{children:e.jsx("span",{className:"tag",children:s.tool_name})}),e.jsx("td",{className:"num",children:e.jsx(p,{added:s.lines_added,removed:s.lines_removed})}),e.jsx("td",{className:"muted",title:s.prompt_preview??void 0,children:s.prompt_preview?s.prompt_preview.length>80?s.prompt_preview.slice(0,79)+"…":s.prompt_preview:"—"}),e.jsx("td",{children:t(s.timestamp)})]},s.id))})]})]},l.session_id)}),e.jsx("p",{className:"muted pad",children:"Tracked from Edit/Write tool calls — changes made via shell commands or outside sessions aren’t captured."})]})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as q,h as x,r as E,w as C,j as e,F as P,E as D,m as K,S as n,L as $,v as k,P as I}from"./index-
|
|
1
|
+
import{e as q,h as x,r as E,w as C,j as e,F as P,E as D,m as K,S as n,L as $,v as k,P as I}from"./index-CqWARNqS.js";const i=50,M={total:0,files:[]};function A(t,a){return a&&t.startsWith(a.replace(/\/$/,"")+"/")?t.slice(a.replace(/\/$/,"").length+1):t}function R({added:t,removed:a}){return t==null&&a==null?e.jsx("span",{className:"muted",children:"—"}):e.jsxs("span",{className:"sub",children:[t!=null&&e.jsxs("span",{className:"tag",children:["+",t.toLocaleString()]}),a!=null&&e.jsxs("span",{className:"tag",children:["−",a.toLocaleString()]})]})}function G(){const{get:t,set:a,pick:g}=q(["offset"]),f=x("/sources",[]),b=x("/projects",[]),[h,u]=E.useState(t("q")),p=Number(t("offset","0")),o=g(["source","project","q","sort","dir"]);o.set("limit",String(i)),o.set("offset",String(p));const{data:N,loading:j,error:S}=C("/files?"+o.toString()),{total:d,files:m}=N??M;function v(s){s.preventDefault(),a({q:h.trim()})}const l=t("sort","last_ts"),r=t("dir")==="asc"?"asc":"desc";function c(s,F){a({sort:s,dir:l===s?r==="asc"?"desc":"asc":F})}const _=Math.floor(p/i)+1,y=Math.max(1,Math.ceil(d/i)),L=!!(t("q")||t("source")||t("project"));return e.jsxs("div",{children:[e.jsx("h1",{className:"sr-only",children:"Files"}),e.jsxs("div",{className:"filters",children:[e.jsxs("form",{onSubmit:v,className:"search",role:"search",children:[e.jsx("input",{type:"search","aria-label":"Search files by path",placeholder:"Search file paths…",value:h,onChange:s=>u(s.target.value)}),e.jsx("button",{type:"submit",children:"Search"}),t("q")&&e.jsx("button",{type:"button",className:"ghost",onClick:()=>(u(""),a({q:""})),children:"clear"})]}),e.jsxs("select",{"aria-label":"Filter by source",value:t("source"),onChange:s=>a({source:s.target.value}),children:[e.jsx("option",{value:"",children:"all sources"}),f.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))]}),e.jsx(P,{ariaLabel:"Filter by project",searchPlaceholder:"Find project…",value:t("project"),onChange:s=>a({project:s}),options:[{value:"",label:"all projects"},...b.map(s=>({value:s.id,label:s.path.replace(/^.*\//,"")}))]})]}),e.jsx(D,{error:S}),j?e.jsx(K,{}):m.length===0?e.jsx("div",{className:"muted pad",role:"status",children:L?"No files match the filter.":"No file changes ingested yet — run agent-lens refresh (or ingest) first."}):e.jsxs("table",{className:"sessions",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(n,{label:"File",sortKey:"path",active:l,dir:r,onSort:c,defaultDir:"asc"}),e.jsx("th",{children:"Project"}),e.jsx(n,{label:"Sessions",sortKey:"sessions",active:l,dir:r,onSort:c,className:"num"}),e.jsx(n,{label:"Changes",sortKey:"changes",active:l,dir:r,onSort:c,className:"num"}),e.jsx("th",{className:"num",children:"+ / −"}),e.jsx(n,{label:"Last touched",sortKey:"last_ts",active:l,dir:r,onSort:c})]})}),e.jsx("tbody",{children:m.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx($,{to:`/file?path=${encodeURIComponent(s.file_path)}${s.project_id?`&project=${encodeURIComponent(s.project_id)}`:""}`,className:"title",title:s.file_path,children:A(s.file_path,s.project_path)})}),e.jsx("td",{children:s.project_path?e.jsx("span",{className:"tag",title:s.project_path,children:s.project_path.replace(/^.*\//,"")}):e.jsx("span",{className:"muted",children:"—"})}),e.jsx("td",{className:"num",children:s.sessions.toLocaleString()}),e.jsx("td",{className:"num",children:s.changes.toLocaleString()}),e.jsx("td",{className:"num",children:e.jsx(R,{added:s.lines_added,removed:s.lines_removed})}),e.jsx("td",{children:k(s.last_ts)})]},(s.project_id??"")+"\0"+s.file_path))})]}),!j&&d>0&&e.jsx(I,{page:_,pages:y,total:d,unit:"files",onPage:s=>a({offset:String((s-1)*i)})}),e.jsx("p",{className:"muted pad",children:"Tracked from Edit/Write tool calls — changes made via shell commands or outside sessions aren’t captured."})]})}export{R as LinesDelta,G as default,A as relPath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,e as ie,h as P,z as ne,w as ae,j as e,D as p,F as le,G as y,E as re,m as ce,S as $,P as oe,v as de,L as ue}from"./index-DYY0_SmQ.js";import{S as he,a as me}from"./severity-CoO1IKlD.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,V]=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]),D=P(p?null:"/security/mutes",[],[j]),K=`${C.toString()}|${r.key}|${r.dir}`,[E,B]=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:H,loading:I,error:Y}=ae("/security/findings?"+f.toString(),{deps:[j]}),[q,G]=W(`${K}|${E}|${j}`,null),J=q??Y,{total:g,findings:O}=H??pe,x=m.useCallback(async s=>{S(!0),G(null);try{await s(),V(c=>c+1)}catch(c){G(String(c))}finally{S(!1)}},[]),X=m.useMemo(()=>new Map(((i==null?void 0:i.by_severity)??[]).map(s=>[s.severity,s.n])),[i]),Q=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||Q.some(U=>U.rule_id===k&&(!c||U.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"}),Q.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}),I?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))})]}),!I&&g>M&&e.jsx(oe,{page:E,pages:Z,total:g,unit:"findings",onPage:B}),!p&&D.length>0&&e.jsx(xe,{mutes:D,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
|
+
import{r as m,e as ie,h as P,z as ne,w as ae,j as e,D as p,F as le,G as y,E as re,m as ce,S as $,P as oe,v as de,L as ue}from"./index-CqWARNqS.js";import{S as he,a as me}from"./severity-DJTsjBgl.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,V]=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]),D=P(p?null:"/security/mutes",[],[j]),K=`${C.toString()}|${r.key}|${r.dir}`,[E,B]=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:H,loading:I,error:Y}=ae("/security/findings?"+f.toString(),{deps:[j]}),[q,G]=W(`${K}|${E}|${j}`,null),J=q??Y,{total:g,findings:O}=H??pe,x=m.useCallback(async s=>{S(!0),G(null);try{await s(),V(c=>c+1)}catch(c){G(String(c))}finally{S(!1)}},[]),X=m.useMemo(()=>new Map(((i==null?void 0:i.by_severity)??[]).map(s=>[s.severity,s.n])),[i]),Q=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||Q.some(U=>U.rule_id===k&&(!c||U.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"}),Q.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}),I?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))})]}),!I&&g>M&&e.jsx(oe,{page:E,pages:Z,total:g,unit:"findings",onPage:B}),!p&&D.length>0&&e.jsx(xe,{mutes:D,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,4 +1,4 @@
|
|
|
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,c as C,v as W,s as ms,w as hs,i as R,n as D,l as ps,x as xs,y as fs,E as js,m as gs}from"./index-DYY0_SmQ.js";import{S as I,a as V}from"./severity-CoO1IKlD.js";import{A as E,C as y,p as k}from"./jsonish-Dd3X-MG6.js";import{M as Ns,r as ws}from"./index-Bgxu3c84.js";function _s({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 ks({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(bs,{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 ys={loc:"Lines changed",files:"Files touched",turns:"Turns",tokens:"Work tokens",duration:"Duration",subagents:"Subagents"},P=e=>`${Math.max(0,Math.min(1,e))*100}%`;function L({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 bs({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:ys[d.key]??d.key}),s.jsx("span",{className:"sig-bar","aria-hidden":"true",children:s.jsx("span",{className:"sig-bar-fill",style:{width:P(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:P(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(L,{counts:n.tool_counts})})]}),f&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Skills"}),s.jsx("dd",{children:s.jsx(L,{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 vs({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 Ss({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(vs,{f:t},t.id))})}function Cs({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 Is(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 Ts({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=Is([...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 Os({d:e}){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.jsx("span",{title:"Estimated at API list prices (cache-aware)",children:us(n.cost)}),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(_s,{id:n.id})]}),e.classification&&s.jsx(ks,{c:e.classification}),e.findings&&e.findings.length>0&&s.jsx(Cs,{findings:e.findings,sessionId:n.id}),e.file_changes&&e.file_changes.length>0&&s.jsx(Ts,{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 Fs({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(E,{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(E,{a:l},l.id))})]}):s.jsx("ul",{children:t.map(l=>s.jsx(E,{a:l},l.id))}))]})}function H(e,n){const t=e===""?[]:e.split(`
|
|
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,c as C,v as W,s as ms,w as hs,i as R,n as D,l as ps,x as xs,y as fs,E as js,m as gs}from"./index-CqWARNqS.js";import{S as I,a as V}from"./severity-DJTsjBgl.js";import{A as E,C as y,p as k}from"./jsonish-SimOVe9L.js";import{M as Ns,r as ws}from"./index-DxkiGVr3.js";function _s({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 ks({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(bs,{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 ys={loc:"Lines changed",files:"Files touched",turns:"Turns",tokens:"Work tokens",duration:"Duration",subagents:"Subagents"},P=e=>`${Math.max(0,Math.min(1,e))*100}%`;function L({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 bs({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:ys[d.key]??d.key}),s.jsx("span",{className:"sig-bar","aria-hidden":"true",children:s.jsx("span",{className:"sig-bar-fill",style:{width:P(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:P(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(L,{counts:n.tool_counts})})]}),f&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Skills"}),s.jsx("dd",{children:s.jsx(L,{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 vs({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 Ss({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(vs,{f:t},t.id))})}function Cs({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 Is(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 Ts({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=Is([...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 Os({d:e}){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.jsx("span",{title:"Estimated at API list prices (cache-aware)",children:us(n.cost)}),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(_s,{id:n.id})]}),e.classification&&s.jsx(ks,{c:e.classification}),e.findings&&e.findings.length>0&&s.jsx(Cs,{findings:e.findings,sessionId:n.id}),e.file_changes&&e.file_changes.length>0&&s.jsx(Ts,{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 Fs({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(E,{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(E,{a:l},l.id))})]}):s.jsx("ul",{children:t.map(l=>s.jsx(E,{a:l},l.id))}))]})}function H(e,n){const t=e===""?[]:e.split(`
|
|
2
2
|
`),a=n===""?[]:n.split(`
|
|
3
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 K(e){if(!e)return null;try{const n=JSON.parse(e).plan;return typeof n=="string"&&n.trim()?n:null}catch{return null}}function Ms(e){if(!e)return[];try{const n=JSON.parse(e).questions;return Array.isArray(n)?n:[]}catch{return[]}}function $s(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 As(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 qs(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
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 Bs(e){const n=e.lastIndexOf("/");return n>=0?{dir:e.slice(0,n+1),base:e.slice(n+1)}:{dir:"",base:e}}function z(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 Rs(e){const n=z(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 Ls({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(Ns,{remarkPlugins:[ws],components:Hs,children:e})})}const Hs={a:({node:e,...n})=>s.jsx("a",{...n,target:"_blank",rel:"noopener noreferrer"})};function es({text:e}){const n=e.length>1400||e.split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x,w as j,j as s,A as v,e as f,r as d,L as m,v as c}from"./index-
|
|
1
|
+
import{x,w as j,j as s,A as v,e as f,r as d,L as m,v as c}from"./index-CqWARNqS.js";import{M as N,r as p}from"./index-DxkiGVr3.js";function k(e){return!e||e<0?"—":e>=1024?(e/1024).toFixed(1)+" KB":e+" B"}function y(e,l){return`${e.slice(0,8)} · ${c(l)}`}function S(){const{name:e=""}=x(),l=j("/skills/"+encodeURIComponent(e),{reset:!0});return s.jsx(v,{state:l,empty:s.jsx("div",{className:"muted pad",children:"Not found."}),children:t=>s.jsx(b,{data:t})})}function b({data:e}){const{get:l,set:t}=f(),o=l("v"),n=d.useMemo(()=>e.versions.length?e.versions.find(i=>i.id===o)??e.versions[0]:null,[e,o]),a=d.useMemo(()=>n?e.sessions.filter(i=>i.version_id===n.id):[],[e,n]),h=d.useMemo(()=>e.sessions.filter(i=>!i.version_id).length,[e]);function u(i){t({v:i})}return s.jsxs("div",{className:"skill-view",children:[s.jsx(m,{to:"/skills",className:"back",children:"← all skills"}),s.jsxs("header",{className:"skill-head",children:[s.jsxs("h1",{children:["📖 ",e.name]}),s.jsxs("div",{className:"skill-head-meta muted",children:[e.call_count.toLocaleString()," firing",e.call_count===1?"":"s"," ·"," ",e.versions.length," version",e.versions.length===1?"":"s",n!=null&&n.summary?s.jsxs(s.Fragment,{children:[" · ",n.summary]}):null]})]}),e.versions.length===0?s.jsxs("div",{className:"empty",children:["This skill fired ",e.call_count.toLocaleString()," time(s) but no SKILL.md body was captured in the transcripts, so there is no version content to show."]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"skill-version-bar",children:[s.jsxs("label",{className:"ctl",children:["version"," ",s.jsx("select",{"aria-label":"Skill version",value:(n==null?void 0:n.id)??"",onChange:i=>u(i.target.value),children:e.versions.map((i,r)=>s.jsxs("option",{value:i.id,children:[y(i.id,i.last_seen)," · ",i.call_count," fire",i.call_count===1?"":"s",r===0?" (latest)":""]},i.id))})]}),n&&s.jsxs("span",{className:"muted small",children:["first seen ",c(n.first_seen)," · last seen ",c(n.last_seen)," ·"," ",k(n.body_bytes)]})]}),n&&s.jsxs("div",{className:"cards skill-cards",children:[s.jsxs("div",{className:"card skill-body-card",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("h3",{children:"Skill body"}),s.jsxs("span",{className:"card-hint",children:["version ",n.id.slice(0,8)]})]}),s.jsx("div",{className:"md skill-body",children:s.jsx(N,{remarkPlugins:[p],children:n.body})})]}),s.jsxs("div",{className:"card skill-sessions-card",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("h3",{children:"Sessions that fired this version"}),s.jsx("span",{className:"card-hint",children:a.length})]}),a.length===0?s.jsx("div",{className:"empty",children:"No sessions fired this version."}):s.jsxs("table",{className:"sessions",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Session"}),s.jsx("th",{children:"Source"}),s.jsx("th",{children:"Project"}),s.jsx("th",{className:"num",children:"Fires"}),s.jsx("th",{children:"When"})]})}),s.jsx("tbody",{children:a.map(i=>{var r;return s.jsxs("tr",{children:[s.jsx("td",{children:s.jsx(m,{to:`/session/${i.id}`,className:"title",children:i.title||s.jsx("span",{className:"muted",children:i.id.slice(0,12)})})}),s.jsx("td",{children:i.source_id}),s.jsx("td",{className:"path",children:((r=i.project_path)==null?void 0:r.replace(/^.*\//,""))??"—"}),s.jsx("td",{className:"num",children:i.fire_count}),s.jsx("td",{children:c(i.fired_at)})]},i.id)})})]}),h>0&&s.jsxs("div",{className:"muted small pad",children:[h," firing(s) had no captured body and aren’t attributed to a version."]})]})]})]})]})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as q,h as v,r as c,z as F,w as E,B as C,j as e,F as R,E as w,m as I,S as d,L as K,v as M,P as D}from"./index-
|
|
1
|
+
import{e as q,h as v,r as c,z as F,w as E,B as C,j as e,F as R,E as w,m as I,S as d,L as K,v as M,P as D}from"./index-CqWARNqS.js";const u=50,$={name:t=>t.name,fired:t=>t.call_count,last_fired:t=>t.last_fired};function Q(){const{params:t,get:r,set:n,pick:f}=q(),k=v("/sources",[]),y=v("/projects",[]),[h,m]=c.useState(r("q")),{sort:a,toggle:i}=F("fired","desc"),[N,j]=c.useState(1),p=f(["source","project","q"]),{data:x,loading:g,error:_}=E("/skills"+(p.toString()?"?"+p:""));function L(s){s.preventDefault(),n({q:h.trim()})}c.useEffect(()=>j(1),[t,a.key,a.dir]);const l=c.useMemo(()=>C(x??[],$[a.key],a.dir),[x,a.key,a.dir]),b=Math.max(1,Math.ceil(l.length/u)),o=Math.min(N,b),P=l.slice((o-1)*u,o*u);return e.jsxs("div",{children:[e.jsx("h1",{className:"sr-only",children:"Skills"}),e.jsxs("div",{className:"filters",children:[e.jsxs("form",{onSubmit:L,className:"search",role:"search",children:[e.jsx("input",{type:"search","aria-label":"Search skills by name and body",placeholder:"Search skill names & bodies…",value:h,onChange:s=>m(s.target.value)}),e.jsx("button",{type:"submit",children:"Search"}),r("q")&&e.jsx("button",{type:"button",className:"ghost",onClick:()=>(m(""),n({q:""})),children:"clear"})]}),e.jsxs("select",{"aria-label":"Filter by source",value:r("source"),onChange:s=>n({source:s.target.value}),children:[e.jsx("option",{value:"",children:"all sources"}),k.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))]}),e.jsx(R,{ariaLabel:"Filter by project",searchPlaceholder:"Find project…",value:r("project"),onChange:s=>n({project:s}),options:[{value:"",label:"all projects"},...y.map(s=>({value:s.id,label:s.path.replace(/^.*\//,"")}))]})]}),e.jsx(w,{error:_}),g?e.jsx(I,{}):l.length===0?e.jsx("div",{className:"muted pad",role:"status",children:"No skills fired match."}):e.jsxs("table",{className:"sessions",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(d,{label:"Skill",sortKey:"name",active:a.key,dir:a.dir,onSort:i,defaultDir:"asc"}),e.jsx(d,{label:"Fired",sortKey:"fired",active:a.key,dir:a.dir,onSort:i,className:"num"}),e.jsx("th",{className:"num",children:"Versions"}),e.jsx("th",{children:"Sources"}),e.jsx(d,{label:"Last fired",sortKey:"last_fired",active:a.key,dir:a.dir,onSort:i})]})}),e.jsx("tbody",{children:P.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(K,{to:`/skill/${encodeURIComponent(s.name)}`,className:"title",children:s.name})}),e.jsx("td",{className:"num",children:s.call_count.toLocaleString()}),e.jsx("td",{className:"num",title:`${s.version_count} distinct captured ${s.version_count===1?"version":"versions"}`,children:s.version_count||e.jsx("span",{className:"muted",children:"—"})}),e.jsx("td",{children:e.jsx("span",{className:"sub",children:s.sources.map(S=>e.jsx("span",{className:"tag",children:S},S))})}),e.jsx("td",{children:M(s.last_fired)})]},s.name))})]}),!g&&l.length>0&&e.jsx(D,{page:o,pages:b,total:l.length,unit:"skills",onPage:j})]})}export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,r as C,x as D,w as G,A as K,L as T,s as L,f as W,b as q,c as Y,v as z}from"./index-DYY0_SmQ.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-Dd3X-MG6.js";import{M as F,r as J}from"./index-Bgxu3c84.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 I(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=I(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=I(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(B,{value:r,depth:a+1})})]})}function B({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(B,{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]],g=x.filter(([o,c])=>_(c)&&o!=="script"),y=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=g.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})]})]}),y.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}=D(),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,g,y,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=((g=e.run)==null?void 0:g.total_tokens)??e.stats.total_tokens,n=((y=e.run)==null?void 0:y.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",{title:"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,x as D,w as G,A as K,L as T,s as L,f as W,b as q,c as Y,v as z}from"./index-CqWARNqS.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-SimOVe9L.js";import{M as F,r as J}from"./index-DxkiGVr3.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 I(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=I(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=I(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(B,{value:r,depth:a+1})})]})}function B({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(B,{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]],g=x.filter(([o,c])=>_(c)&&o!=="script"),y=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=g.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})]})]}),y.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}=D(),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,g,y,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=((g=e.run)==null?void 0:g.total_tokens)??e.stats.total_tokens,n=((y=e.run)==null?void 0:y.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",{title:"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;--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}
|