@warlock.js/ai-panoptic 4.4.0 → 4.5.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/CHANGELOG.md +39 -31
- package/cjs/index.cjs +2393 -31
- package/cjs/index.cjs.map +1 -1
- package/esm/collector/collector.d.mts +19 -2
- package/esm/collector/collector.d.mts.map +1 -1
- package/esm/collector/collector.mjs +40 -6
- package/esm/collector/collector.mjs.map +1 -1
- package/esm/collector/content-capture.type.d.mts +10 -0
- package/esm/collector/content-capture.type.d.mts.map +1 -1
- package/esm/collector/extract-span-attributes.d.mts.map +1 -1
- package/esm/collector/extract-span-attributes.mjs +3 -0
- package/esm/collector/extract-span-attributes.mjs.map +1 -1
- package/esm/collector/index.d.mts +1 -1
- package/esm/collector/index.mjs +7 -0
- package/esm/collector/normalize-error.d.mts.map +1 -1
- package/esm/collector/normalize-error.mjs +6 -3
- package/esm/collector/normalize-error.mjs.map +1 -1
- package/esm/collector/report-to-span.mjs +31 -10
- package/esm/collector/report-to-span.mjs.map +1 -1
- package/esm/collector/report-to-trace.d.mts +8 -5
- package/esm/collector/report-to-trace.d.mts.map +1 -1
- package/esm/collector/report-to-trace.mjs +8 -5
- package/esm/collector/report-to-trace.mjs.map +1 -1
- package/esm/config/apply-panoptic-config.d.mts +27 -0
- package/esm/config/apply-panoptic-config.d.mts.map +1 -0
- package/esm/config/apply-panoptic-config.mjs +89 -0
- package/esm/config/apply-panoptic-config.mjs.map +1 -0
- package/esm/config/index.d.mts +2 -0
- package/esm/config/index.mjs +3 -0
- package/esm/config/panoptic-config.type.d.mts +84 -0
- package/esm/config/panoptic-config.type.d.mts.map +1 -0
- package/esm/contracts/trace.type.d.mts +9 -2
- package/esm/contracts/trace.type.d.mts.map +1 -1
- package/esm/dashboard/dashboard.d.mts +32 -0
- package/esm/dashboard/dashboard.d.mts.map +1 -0
- package/esm/dashboard/dashboard.mjs +132 -0
- package/esm/dashboard/dashboard.mjs.map +1 -0
- package/esm/dashboard/dashboard.type.d.mts +63 -0
- package/esm/dashboard/dashboard.type.d.mts.map +1 -0
- package/esm/dashboard/index.d.mts +3 -0
- package/esm/dashboard/parse-query.d.mts +1 -0
- package/esm/dashboard/parse-query.mjs +54 -0
- package/esm/dashboard/parse-query.mjs.map +1 -0
- package/esm/dashboard/serve.d.mts +1 -0
- package/esm/dashboard/serve.mjs +111 -0
- package/esm/dashboard/serve.mjs.map +1 -0
- package/esm/dashboard/trace-filter.d.mts +187 -0
- package/esm/dashboard/trace-filter.d.mts.map +1 -0
- package/esm/dashboard/trace-filter.mjs +270 -0
- package/esm/dashboard/trace-filter.mjs.map +1 -0
- package/esm/dashboard/ui.html.mjs +1330 -0
- package/esm/dashboard/ui.html.mjs.map +1 -0
- package/esm/dashboard/warlock-logo.mjs +13 -0
- package/esm/dashboard/warlock-logo.mjs.map +1 -0
- package/esm/exporters/file/file-exporter.mjs +5 -2
- package/esm/exporters/file/file-exporter.mjs.map +1 -1
- package/esm/exporters/langfuse/langfuse-exporter.d.mts.map +1 -1
- package/esm/exporters/langfuse/langfuse-exporter.mjs +5 -2
- package/esm/exporters/langfuse/langfuse-exporter.mjs.map +1 -1
- package/esm/exporters/langfuse/langfuse-exporter.type.d.mts +3 -1
- package/esm/exporters/langfuse/langfuse-exporter.type.d.mts.map +1 -1
- package/esm/exporters/otel/otel-api.shim.type.d.mts +60 -0
- package/esm/exporters/otel/otel-api.shim.type.d.mts.map +1 -0
- package/esm/exporters/otel/otel-exporter.d.mts.map +1 -1
- package/esm/exporters/otel/otel-exporter.mjs.map +1 -1
- package/esm/exporters/otel/otel-exporter.type.d.mts +7 -3
- package/esm/exporters/otel/otel-exporter.type.d.mts.map +1 -1
- package/esm/index.d.mts +9 -2
- package/esm/index.mjs +9 -1
- package/esm/panoptic/index.mjs +4 -0
- package/esm/panoptic/panoptic.d.mts.map +1 -1
- package/esm/panoptic/panoptic.mjs +6 -1
- package/esm/panoptic/panoptic.mjs.map +1 -1
- package/esm/panoptic/panoptic.type.d.mts +15 -0
- package/esm/panoptic/panoptic.type.d.mts.map +1 -1
- package/esm/register.mjs +12 -0
- package/esm/register.mjs.map +1 -0
- package/esm/store/cache-trace-store.d.mts +81 -0
- package/esm/store/cache-trace-store.d.mts.map +1 -0
- package/esm/store/cache-trace-store.mjs +290 -0
- package/esm/store/cache-trace-store.mjs.map +1 -0
- package/esm/store/in-memory-trace-store.mjs +9 -2
- package/esm/store/in-memory-trace-store.mjs.map +1 -1
- package/esm/store/index.d.mts +1 -0
- package/esm/store/index.mjs +1 -0
- package/llms-full.txt +351 -4
- package/llms.txt +4 -3
- package/package.json +6 -2
- package/skills/README.md +7 -3
- package/skills/export-traces/SKILL.md +33 -1
- package/skills/observe-with-panoptic/SKILL.md +49 -2
- package/skills/query-traces/SKILL.md +52 -1
- package/skills/use-local-dashboard/SKILL.md +213 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,15 +4,42 @@ All notable changes to `@warlock.js/ai-panoptic` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 4.5.0 - 2026-07-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Zero-setup local dashboard** — `dashboard(store, options)` serves a loopback-only mini-Langfuse (default `127.0.0.1:4319`) with no Docker and no account: light / dark / system theme, a two-pane drawer (nested call tree / detail), a metadata panel, colour-coded Title-case type labels, arrow-coded token rollups (`↓input · ↑output · total`), per-node rollup cost, and the Warlock logo.
|
|
12
|
+
- **Dashboard search / filter / grouping** — client-side free-text search, status / type / session / prompt filter chips, an errors-only toggle, and group-by Session / Prompt / Type with a per-type aggregate-stats panel (count, failure rate, p50 / p95 latency, tokens, cost).
|
|
13
|
+
- **Cost heatmap, timeline view, and deep-links** — each node carries a cost-tinted accent; the drawer toggles between the call tree and a Gantt timeline (critical path highlighted); the open trace + span are reflected in the URL hash for shareable views.
|
|
14
|
+
- **Prompt-version linkage** — agent spans stamp `agent.promptName` / `agent.promptVersion`; the dashboard filters and groups by the resolved `name@version` key.
|
|
15
|
+
- **Cache-backed persistent trace store** — `createCacheTraceStore(cache, options)` persists traces through any `@warlock.js/cache` driver, serves reads from an in-memory mirror, and re-hydrates on `ready()` so traces survive a restart; `ai.config({ panoptic: { cache } })` wires it.
|
|
16
|
+
- **Declarative `ai.config({ panoptic })`** — configure panoptic once; it registers on core's observer registry and starts the dashboard. Per-flow `observe` + `observeAll` opt flows into observation.
|
|
17
|
+
- **`ContentCaptureOptions.fullHistory`** — capture the agent's complete message history on the span; agent content is emitted as a `[system, user]` chat array; Langfuse gets trace-level `input` / `output`.
|
|
18
|
+
- **`onError` hook** — handle isolated exporter failures on `panoptic()` / `createCollector()`.
|
|
19
|
+
- **Pure trace-list helpers** exported from the package root (`filterTraces` / `groupBySession` / `groupByPrompt` / `groupByType` / `aggregateByType` / `rollupCost` / …) so your own views mirror the dashboard's rules.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **Title-case status & type labels** across rows, drawer, chips, and group headers (underlying filter keys stay lowercase); `team` is a first-class dashboard type; type chips show only present types; drawer metadata keys are humanized; the group-by toggles became a single `Group` dropdown.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **Isolated exporter failures no longer fail silently** — a failing exporter still never crashes the run, but now warns once (or calls `onError`).
|
|
28
|
+
|
|
29
|
+
### Security
|
|
30
|
+
|
|
31
|
+
- **Dashboard hardening** — bearer-token auth (`authToken`, required when binding off-loopback), a `Host`-header allowlist (DNS-rebinding guard), and security response headers (`nosniff` / `X-Frame-Options: DENY` / locked-down CSP) on every response.
|
|
32
|
+
- **Error redaction** — captured error `message` / `stack` are scrubbed of secrets (Bearer tokens, API keys) and a retained `cause` is deep-redacted (auth / cookie headers stripped) before a trace is stored or exported.
|
|
33
|
+
|
|
7
34
|
## 4.4.0 - 2026-06-21
|
|
8
35
|
|
|
9
36
|
### Added
|
|
10
37
|
|
|
11
|
-
- **Opt-in content capture.** `
|
|
38
|
+
- **Opt-in content capture.** `panoptic({ captureContent, redactContent })` copies the agent prompt / response and each tool's args / result onto spans, surfaced by the console (`io`), file, OTel (`gen_ai.prompt` / `gen_ai.completion`), and Langfuse exporters. Off by default; a `ContentRedactor` masks each value.
|
|
12
39
|
|
|
13
40
|
### Fixed
|
|
14
41
|
|
|
15
|
-
- **Langfuse token accounting
|
|
42
|
+
- **Langfuse token accounting** — generations now meter their own usage (rolled-up minus children) and the root execution is metered, so the trace total no longer double-counts nested spans.
|
|
16
43
|
|
|
17
44
|
## 4.3.0 - 2026-06-21
|
|
18
45
|
|
|
@@ -20,36 +47,17 @@ Initial release — observability collector + exporters for `@warlock.js/ai`.
|
|
|
20
47
|
|
|
21
48
|
### Added
|
|
22
49
|
|
|
23
|
-
- `panoptic()` — the one-call subscriber factory
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `scripts/generate-llms.mjs` and the generated `llms.txt` / `llms-full.txt` projections of `skills/`
|
|
28
|
-
- `skills/observe-with-panoptic/SKILL.md` — wiring the subscriber into a run
|
|
29
|
-
- `consoleExporter()` — zero-dep exporter printing trace summary or full span tree
|
|
30
|
-
- `fileExporter()` — zero-dep buffered JSON-Lines exporter with `flushEvery`
|
|
31
|
-
- `otelExporter()` — OpenTelemetry exporter mapping spans to GenAI semantic conventions (`gen_ai.*`)
|
|
32
|
-
- `langfuseExporter()` — Langfuse exporter mapping spans to traces, generations, and spans
|
|
33
|
-
- `toGenAiAttributes()` / `walkSpans()` / `totalCostUsd()` exporter utilities
|
|
34
|
-
- Optional peers `@opentelemetry/api` and `langfuse` are lazily imported by their exporters
|
|
35
|
-
- `createCollector()` — consumes the core `BaseReport` tree, projects it to a `Trace`, fans out to exporters
|
|
36
|
-
- `reportToTrace()` / `reportToSpan()` pure projections of a report node to spans
|
|
37
|
-
- `createInMemoryTraceStore()` — queryable in-memory store, doubles as an `ExporterContract`
|
|
38
|
-
- `TraceStoreContract` with `query` / `aggregate` by runId, sessionId, status, and time window
|
|
39
|
-
- `TraceQuery` and `TraceAggregate` types for slicing and rolling up usage + cost
|
|
40
|
-
- `sumUsage()` usage + cost rollup across stored traces, backed by core `accumulateCost`
|
|
41
|
-
- optional `capacity` cap on the in-memory store with FIFO eviction
|
|
42
|
-
- contract surface: `CollectorContract`, `ExporterContract`, and the vendor-neutral trace types `Trace` / `TraceSpan` / `TraceSpanError`, derived 1:1 from the core `BaseReport` tree and event stream
|
|
43
|
-
- `@opentelemetry/api`, `@opentelemetry/sdk-trace-base`, and `langfuse` declared as OPTIONAL peer dependencies (lazily imported by the exporters that need them)
|
|
44
|
-
- `skills/query-traces/SKILL.md` — dedicated skill for the in-memory queryable trace store (`createInMemoryTraceStore`, `query` / `aggregate`, `TraceQuery` / `TraceAggregate`, `capacity` FIFO eviction, `sumUsage` / `emptyUsage` / `matchTrace` helpers)
|
|
50
|
+
- `panoptic()` — the one-call subscriber factory: builds a collector, registers exporters, and feeds traces via `attach()`, `middleware()`, or `collect()`.
|
|
51
|
+
- Exporters — `consoleExporter()`, `fileExporter()` (JSON-Lines), `otelExporter()` (GenAI semantic conventions), and `langfuseExporter()`. `@opentelemetry/*` and `langfuse` are optional peers, lazily imported.
|
|
52
|
+
- `createInMemoryTraceStore()` — a queryable in-memory trace store (`query` / `aggregate` by runId, sessionId, status, time window; optional `capacity` FIFO cap) that doubles as an exporter.
|
|
53
|
+
- Vendor-neutral trace contracts (`Trace` / `TraceSpan` / `CollectorContract` / `ExporterContract`) derived 1:1 from the core `BaseReport` tree, plus skills for observing, exporting, and querying traces.
|
|
45
54
|
|
|
46
|
-
###
|
|
55
|
+
### Fixed
|
|
47
56
|
|
|
48
|
-
-
|
|
57
|
+
- **Failed root runs now carry their error in every export** (threaded from the result envelope onto the root span).
|
|
58
|
+
- **Per-span exporters now receive every span** (the collector walks the finalized tree).
|
|
59
|
+
- **`panoptic().middleware()` now works on a supervisor** (the middleware declares a `supervisor` hook map).
|
|
49
60
|
|
|
50
|
-
|
|
61
|
+
## 4.1.15
|
|
51
62
|
|
|
52
|
-
-
|
|
53
|
-
- **Per-span exporters now receive every span** — the collector's `dispatch` walks the finalized tree (`walkSpans`), invoking `exportSpan` once per node (a post-completion per-span projection, not live streaming)
|
|
54
|
-
- **`panoptic().middleware()` now works on a supervisor** — the middleware declares a `supervisor` hook map (not only `execute`), so `ai.supervisor({ middleware: [observe.middleware()] })` collects a trace
|
|
55
|
-
- `totalCostUsd()` folds in `cost.reasoning`; the Langfuse exporter `end()`s every observation; the OTel exporter maps `max-iterations` / `awaiting-input` to `UNSET` (a hit cap no longer reads as clean success)
|
|
63
|
+
- Baseline — per-package changelog tracking starts at this version.
|