@swestash/agent-lens 0.14.0 → 0.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swestash/agent-lens",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "type": "module",
5
5
  "description": "Local-only tool that passively collects, browses, and analyzes Claude Code CLI session traces.",
6
6
  "license": "MIT",
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-DAAJAs1W.js"></script>
20
- <link rel="stylesheet" crossorigin href="/assets/index-BPS7n4_B.css">
19
+ <script type="module" crossorigin src="/assets/index-CNg3TICd.js"></script>
20
+ <link rel="stylesheet" crossorigin href="/assets/index-BNr_gy9h.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
@@ -1 +1 @@
1
- import{x as j,j as e,A as g}from"./index-DAAJAs1W.js";const c="v0.13.3-1-g6ea5953";function d(r){if(r==null)return"unknown";if(r<1e3)return`${r} B`;const s=["kB","MB","GB","TB"];let n=r/1e3,t=0;for(;n>=1e3&&t<s.length-1;)n/=1e3,t++;return`${n<10?n.toFixed(1):Math.round(n)} ${s[t]}`}function i({label:r,children:s}){return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",children:r}),e.jsx("td",{children:s})]})}function a({info:r}){return e.jsxs(e.Fragment,{children:[e.jsx("code",{className:"path",children:r.path})," ",e.jsx("span",{className:"origin-tag",title:l(r.origin),children:r.origin})]})}function l(r){switch(r){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:r,v:s,what:n,rerun:t}){const h=s.in_data.filter(x=>x<s.expected);return e.jsxs(i,{label:r,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 ",n," stored yet."]}):s.stale?e.jsxs(e.Fragment,{children:["Stored ",n," came from v",h.join(", v")," — re-run ",e.jsx("code",{children:t})," to relabel with v",s.expected,"."]}):e.jsxs(e.Fragment,{children:["All stored ",n," came from v",s.in_data.join(", v"),"."]})})]})}function m(){const r=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(g,{state:r,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"]})]}),c!==s.versions.app&&e.jsxs(i,{label:"Web build",children:[c," ",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:l(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:"Pricing"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsxs(i,{label:"Models priced",children:[s.pricing.models," ",e.jsx("span",{className:"origin-tag",title:l(s.pricing.origin),children:s.pricing.origin}),e.jsxs("div",{className:"muted",children:["Cost is estimated from token counts at API list prices — never read from the transcripts, which do not record it. Override or add rates with a"," ",e.jsx("code",{children:"pricing"})," block in the config file."]})]}),s.pricing.applied.length>0&&e.jsx(i,{label:"Overrides",children:s.pricing.applied.map(n=>e.jsx("code",{className:"path",children:n},n))}),s.pricing.invalid.length>0&&e.jsxs(i,{label:"Ignored",children:[e.jsx("span",{className:"warn-tag",children:"malformed"})," ",s.pricing.invalid.map(n=>e.jsx("code",{className:"path",children:n},n)),e.jsxs("div",{className:"muted",children:["Each entry needs numeric ",e.jsx("code",{children:"input"})," and ",e.jsx("code",{children:"output"})," rates. These kept their built-in rate."]})]}),e.jsx(i,{label:"Unpriced models",children:s.pricing.unpriced.length===0?e.jsx("span",{className:"muted",children:"None — every model in this store has a rate"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"warn-tag",role:"status",children:"cost understated"})," ",s.pricing.unpriced.map(n=>e.jsx("code",{className:"path",children:n},n)),e.jsxs("div",{className:"muted",children:["These have token usage but no rate, so they contribute $0 to every cost shown. Upgrade for an updated table, or add rates under ",e.jsx("code",{children:"pricing"})," in the config file."]})]})})]})})]}),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(n=>e.jsxs(i,{label:n.label,children:[e.jsx("code",{className:"path",children:n.config_dir})," ",e.jsx("span",{className:"origin-tag",children:n.agent})]},n.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:d(s.storage.db_bytes)}),e.jsxs(i,{label:"Ingested",children:[d(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
+ import{x as j,j as e,A as g}from"./index-CNg3TICd.js";const c="v0.14.0-1-g7ed39da";function d(r){if(r==null)return"unknown";if(r<1e3)return`${r} B`;const s=["kB","MB","GB","TB"];let n=r/1e3,t=0;for(;n>=1e3&&t<s.length-1;)n/=1e3,t++;return`${n<10?n.toFixed(1):Math.round(n)} ${s[t]}`}function i({label:r,children:s}){return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",children:r}),e.jsx("td",{children:s})]})}function a({info:r}){return e.jsxs(e.Fragment,{children:[e.jsx("code",{className:"path",children:r.path})," ",e.jsx("span",{className:"origin-tag",title:l(r.origin),children:r.origin})]})}function l(r){switch(r){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:r,v:s,what:n,rerun:t}){const h=s.in_data.filter(x=>x<s.expected);return e.jsxs(i,{label:r,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 ",n," stored yet."]}):s.stale?e.jsxs(e.Fragment,{children:["Stored ",n," came from v",h.join(", v")," — re-run ",e.jsx("code",{children:t})," to relabel with v",s.expected,"."]}):e.jsxs(e.Fragment,{children:["All stored ",n," came from v",s.in_data.join(", v"),"."]})})]})}function m(){const r=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(g,{state:r,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"]})]}),c!==s.versions.app&&e.jsxs(i,{label:"Web build",children:[c," ",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:l(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:"Pricing"}),e.jsx("table",{className:"kv",children:e.jsxs("tbody",{children:[e.jsxs(i,{label:"Models priced",children:[s.pricing.models," ",e.jsx("span",{className:"origin-tag",title:l(s.pricing.origin),children:s.pricing.origin}),e.jsxs("div",{className:"muted",children:["Cost is estimated from token counts at API list prices — never read from the transcripts, which do not record it. Override or add rates with a"," ",e.jsx("code",{children:"pricing"})," block in the config file."]})]}),s.pricing.applied.length>0&&e.jsx(i,{label:"Overrides",children:s.pricing.applied.map(n=>e.jsx("code",{className:"path",children:n},n))}),s.pricing.invalid.length>0&&e.jsxs(i,{label:"Ignored",children:[e.jsx("span",{className:"warn-tag",children:"malformed"})," ",s.pricing.invalid.map(n=>e.jsx("code",{className:"path",children:n},n)),e.jsxs("div",{className:"muted",children:["Each entry needs numeric ",e.jsx("code",{children:"input"})," and ",e.jsx("code",{children:"output"})," rates. These kept their built-in rate."]})]}),e.jsx(i,{label:"Unpriced models",children:s.pricing.unpriced.length===0?e.jsx("span",{className:"muted",children:"None — every model in this store has a rate"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"warn-tag",role:"status",children:"cost understated"})," ",s.pricing.unpriced.map(n=>e.jsx("code",{className:"path",children:n},n)),e.jsxs("div",{className:"muted",children:["These have token usage but no rate, so they contribute $0 to every cost shown. Upgrade for an updated table, or add rates under ",e.jsx("code",{children:"pricing"})," in the config file."]})]})})]})})]}),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(n=>e.jsxs(i,{label:n.label,children:[e.jsx("code",{className:"path",children:n.config_dir})," ",e.jsx("span",{className:"origin-tag",children:n.agent})]},n.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:d(s.storage.db_bytes)}),e.jsxs(i,{label:"Ingested",children:[d(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};