agentfootprint-lens 0.53.3 → 0.53.4
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/{chunk-SJKOL3IK.js → chunk-KGDSDNJI.js} +2 -2
- package/dist/{chunk-45QIXKMD.js → chunk-S4KD5E4C.js} +12 -3
- package/dist/chunk-S4KD5E4C.js.map +1 -0
- package/dist/context.cjs +12 -3
- package/dist/context.cjs.map +1 -1
- package/dist/context.js +2 -2
- package/dist/core.cjs +15 -6
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +23 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-45QIXKMD.js.map +0 -1
- /package/dist/{chunk-SJKOL3IK.js.map → chunk-KGDSDNJI.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contextAt
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S4KD5E4C.js";
|
|
4
4
|
import {
|
|
5
5
|
Badge
|
|
6
6
|
} from "./chunk-35DQLVDZ.js";
|
|
@@ -315,4 +315,4 @@ export {
|
|
|
315
315
|
MILESTONE_AXIS,
|
|
316
316
|
ContextView
|
|
317
317
|
};
|
|
318
|
-
//# sourceMappingURL=chunk-
|
|
318
|
+
//# sourceMappingURL=chunk-KGDSDNJI.js.map
|
|
@@ -6,7 +6,16 @@ import {
|
|
|
6
6
|
} from "./chunk-47W3TQT6.js";
|
|
7
7
|
|
|
8
8
|
// src/core/context/contextAt.ts
|
|
9
|
-
import
|
|
9
|
+
import * as trace from "footprintjs/trace";
|
|
10
|
+
import { stateAt } from "footprintjs/trace";
|
|
11
|
+
function firstSegment(path) {
|
|
12
|
+
const helper = trace.pathSegments;
|
|
13
|
+
if (typeof helper === "function") return helper(path)[0];
|
|
14
|
+
const unit = path.indexOf("");
|
|
15
|
+
if (unit >= 0) return path.slice(0, unit);
|
|
16
|
+
const dot = path.indexOf(".");
|
|
17
|
+
return dot >= 0 ? path.slice(0, dot) : path;
|
|
18
|
+
}
|
|
10
19
|
function logOf(snapshot) {
|
|
11
20
|
const s = snapshot;
|
|
12
21
|
return Array.isArray(s?.commitLog) ? s.commitLog : [];
|
|
@@ -19,7 +28,7 @@ function writersUpTo(log, commitIdx) {
|
|
|
19
28
|
if (bundle === void 0 || typeof bundle.runtimeStageId !== "string" || !Array.isArray(bundle.trace))
|
|
20
29
|
continue;
|
|
21
30
|
for (const row of bundle.trace) {
|
|
22
|
-
const key =
|
|
31
|
+
const key = firstSegment(row.path);
|
|
23
32
|
if (key === void 0) continue;
|
|
24
33
|
const prior = out.get(key);
|
|
25
34
|
out.set(key, {
|
|
@@ -130,4 +139,4 @@ function contextAt(recording, cursor, options = {}) {
|
|
|
130
139
|
export {
|
|
131
140
|
contextAt
|
|
132
141
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-S4KD5E4C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/context/contextAt.ts"],"sourcesContent":["/**\n * core/context/contextAt — the context object at a stop, with who wrote each\n * key, what moved since the previous stop, and what was served beside it.\n *\n * THE JOIN, nothing more. Three records already exist and this file writes\n * none of its own:\n *\n * 1. the COMMIT LOG — `stateAt(snapshot, commitIdx)` is the object at the\n * stop; the trace rows of the bundles up to it name, per top-level key,\n * the stage that last wrote it (`runtimeStageId`) and the first that\n * did; the bundle's own rows are the DELTA of the stop;\n * 2. the RECEIPT at the stop's epoch — `servedRowAt` (the Served tab's own\n * core) says what crossed into the model call and what the catalogue\n * withheld; it is handed through untouched, never re-derived;\n * 3. the EVENT STREAM — entries stamped with the stages that wrote this\n * stop's delta, or with the stop's own stage, are the \"why\" beside the\n * keys; names only, no sentence.\n *\n * Join keys: `runtimeStageId` (commit log ⟂ events), `epoch` (commit log ⟂\n * receipt, through `servedRowAt`). A key the fold holds with no writer row —\n * the run's initial state, or a row the log lost — is `wroteBy: undefined`:\n * UNATTRIBUTED, never guessed (the reads law: omit, never deny). Owners are\n * stage ids, because that is what the record says; a word like \"host\" or\n * \"model\" is a reader's mapping, not this file's.\n *\n * Pure; frozen returns; no React. Consumers with their own UI read this.\n */\nimport * as trace from 'footprintjs/trace';\nimport { stateAt } from 'footprintjs/trace';\nimport type { FoldSource, FoldedState } from 'footprintjs/trace';\n\nimport type { EventLogEntry } from '../types.js';\nimport { servedRowAt, servedRowForEpoch } from '../served/servedRowAt.js';\nimport { sincePrevious, type SincePrevious } from '../served/sincePrevious.js';\nimport { verify, type ServedVerification } from '../served/verify.js';\nimport type { ServedCursor, ServedRow } from '../served/types.js';\n\n/** The slice of a footprintjs commit bundle this file reads — narrowed per row, never trusted whole. */\ninterface TraceRow {\n readonly path: string;\n readonly verb: string;\n}\ninterface CommitBundle {\n readonly idx?: number;\n readonly runtimeStageId: string;\n readonly trace?: readonly TraceRow[];\n}\n\n/** One top-level key of the context object at the stop. */\nexport interface ContextKey {\n readonly path: string;\n readonly value: unknown;\n /** The stage that LAST wrote the key, from its trace row; absent = unattributed. */\n readonly wroteBy?: string;\n /** The commit index of that last write. */\n readonly wroteAt?: number;\n /** The first commit that wrote the key — when it ENTERED the context. */\n readonly enteredAt?: number;\n /** The verb of the last write, from the trace row. */\n readonly verb?: string;\n /** How the key moved since the previous stop (absent when no previous stop was given). */\n readonly since?: 'entered' | 'changed' | 'unchanged';\n}\n\n/** What is served beside the object at this stop — the Served tab's own row, handed through. */\nexport interface ContextServed {\n readonly row: ServedRow;\n readonly checks: ServedVerification;\n readonly since?: SincePrevious;\n}\n\nexport interface ContextAt {\n readonly cursor: ServedCursor;\n /** Every top-level key of the fold at the stop, in the fold's key order. */\n readonly keys: readonly ContextKey[];\n /** Keys the previous stop held that this one does not (only with a previous stop). */\n readonly left: readonly string[];\n /** The trace rows the stop's own bundle wrote — its delta as the log spells it. */\n readonly rows: readonly { readonly path: string; readonly verb: string }[];\n /** The fold's honesty facts, as `stateAt` reports them. */\n readonly basis?: FoldedState['basis'];\n readonly redacted: boolean;\n readonly skipped?: readonly number[];\n readonly foldError?: string;\n /** The served side at this stop's epoch, when the stop is at or after a model call. */\n readonly served?: ContextServed;\n /** The Served core refused this snapshot — its message, verbatim; `served` is then absent. */\n readonly servedError?: string;\n /** Event names raised by the stages that wrote this stop's delta, or by its own stage. */\n readonly why: readonly {\n readonly seq: number;\n readonly name: string;\n readonly runtimeStageId: string;\n }[];\n}\n\nexport interface ContextAtOptions {\n /** The previous stop on the reader's axis — enables `since` and `left`. */\n readonly previous?: ServedCursor;\n /** The recording's event stream, when the reader has one (a replay's `getEntries()`). */\n readonly events?: readonly EventLogEntry[];\n}\n\n/**\n * The top-level key a trace-row path names. footprintjs 9.22.0 exports\n * `pathSegments` (its paths are joined with U+001F since then); the lens's\n * peer floor is 9.17.0, whose paths are dotted and which has no such export —\n * so the helper is read at call time, the way `tagStops` is, and a floor\n * substrate gets the split it used (0.53.4: a consumer on 9.21.1 could not\n * even bundle the lens while this was a static import).\n */\nexport function firstSegment(path: string): string | undefined {\n const helper = (trace as { pathSegments?: (p: string) => string[] }).pathSegments;\n if (typeof helper === 'function') return helper(path)[0];\n const unit = path.indexOf('\\u001F');\n if (unit >= 0) return path.slice(0, unit);\n const dot = path.indexOf('.');\n return dot >= 0 ? path.slice(0, dot) : path;\n}\n\ninterface WriterFacts {\n readonly wroteBy: string;\n readonly wroteAt: number;\n readonly enteredAt: number;\n readonly verb: string;\n}\n\nfunction logOf(snapshot: unknown): readonly CommitBundle[] {\n const s = snapshot as { commitLog?: unknown } | null | undefined;\n return Array.isArray(s?.commitLog) ? (s.commitLog as CommitBundle[]) : [];\n}\n\n/** Per top-level key, the first and last trace rows up to `commitIdx` (inclusive). */\nfunction writersUpTo(log: readonly CommitBundle[], commitIdx: number): ReadonlyMap<string, WriterFacts> {\n const out = new Map<string, WriterFacts>();\n const last = Math.min(commitIdx, log.length - 1);\n for (let i = 0; i <= last; i++) {\n const bundle = log[i];\n if (bundle === undefined || typeof bundle.runtimeStageId !== 'string' || !Array.isArray(bundle.trace))\n continue;\n for (const row of bundle.trace) {\n const key = firstSegment(row.path);\n if (key === undefined) continue;\n const prior = out.get(key);\n out.set(key, {\n wroteBy: bundle.runtimeStageId,\n wroteAt: i,\n enteredAt: prior?.enteredAt ?? i,\n verb: row.verb,\n });\n }\n }\n return out;\n}\n\nfunction foldAt(snapshot: unknown, commitIdx: number): FoldedState | { readonly error: string } {\n const source: FoldSource | undefined =\n typeof snapshot === 'object' && snapshot !== null ? (snapshot as FoldSource) : undefined;\n try {\n return stateAt(source, commitIdx);\n } catch (e) {\n return { error: e instanceof Error ? e.message : String(e) };\n }\n}\n\nconst same = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n\nfunction servedFor(\n snapshot: unknown,\n cursor: ServedCursor,\n): { readonly served?: ContextServed; readonly servedError?: string } {\n try {\n const row = servedRowAt(snapshot, cursor);\n if (row === undefined) return {};\n const checks = verify(row.view, row.receipt, row.receipt?.basis.runId ?? '', row.receiptCause);\n const previous =\n row.previousEpoch !== undefined ? servedRowForEpoch(snapshot, row.previousEpoch) : undefined;\n const since = previous !== undefined ? sincePrevious(row, previous) : undefined;\n return {\n served: Object.freeze({\n row,\n checks,\n ...(since !== undefined ? { since } : {}),\n }),\n };\n } catch (e) {\n return { servedError: e instanceof Error ? e.message : String(e) };\n }\n}\n\nfunction whyFor(events: readonly EventLogEntry[] | undefined, stages: ReadonlySet<string>): ContextAt['why'] {\n if (events === undefined || stages.size === 0) return Object.freeze([]);\n const out: { seq: number; name: string; runtimeStageId: string }[] = [];\n for (const entry of events) {\n const id = entry.runtimeStageId;\n if (id === undefined || !stages.has(id)) continue;\n out.push({ seq: entry.seq, name: entry.event.type, runtimeStageId: id });\n }\n return Object.freeze(out);\n}\n\n/**\n * The context at `cursor`: the fold's keys with their writers, the delta\n * since `options.previous`, the served side at this epoch, and the events\n * beside the delta. Returns a frozen object; a fold that cannot be replayed\n * reports `foldError` with no keys rather than an empty object pretending to\n * be one.\n */\nexport function contextAt(\n recording: unknown,\n cursor: ServedCursor,\n options: ContextAtOptions = {},\n): ContextAt {\n const log = logOf(recording);\n const folded = foldAt(recording, cursor.commitIdx);\n if ('error' in folded) {\n return Object.freeze({\n cursor,\n keys: Object.freeze([]),\n left: Object.freeze([]),\n rows: Object.freeze([]),\n redacted: false,\n foldError: folded.error,\n why: Object.freeze([]),\n });\n }\n const writers = writersUpTo(log, cursor.commitIdx);\n const previous = options.previous !== undefined ? foldAt(recording, options.previous.commitIdx) : undefined;\n const previousState = previous !== undefined && !('error' in previous) ? previous.state : undefined;\n\n const keys: ContextKey[] = [];\n for (const [path, value] of Object.entries(folded.state)) {\n const w = writers.get(path);\n const since: ContextKey['since'] | undefined =\n previousState === undefined\n ? undefined\n : !(path in previousState)\n ? 'entered'\n : same(previousState[path], value)\n ? 'unchanged'\n : 'changed';\n keys.push(\n Object.freeze({\n path,\n value,\n ...(w !== undefined\n ? {\n wroteBy: w.wroteBy,\n wroteAt: w.wroteAt,\n enteredAt: w.enteredAt,\n verb: w.verb,\n }\n : {}),\n ...(since !== undefined ? { since } : {}),\n }),\n );\n }\n const left =\n previousState === undefined ? [] : Object.keys(previousState).filter((k) => !(k in folded.state));\n\n const bundle = log[cursor.commitIdx];\n const rows = Array.isArray(bundle?.trace)\n ? bundle.trace.map((r: TraceRow) => Object.freeze({ path: r.path, verb: r.verb }))\n : [];\n\n const stages = new Set<string>();\n if (bundle !== undefined && typeof bundle.runtimeStageId === 'string') stages.add(bundle.runtimeStageId);\n for (const k of keys)\n if (k.since !== undefined && k.since !== 'unchanged' && k.wroteBy !== undefined) stages.add(k.wroteBy);\n\n const skipped =\n folded.skipped !== undefined && folded.skipped.length > 0\n ? folded.skipped.map((g) => g.index)\n : undefined;\n const { served, servedError } = servedFor(recording, cursor);\n\n return Object.freeze({\n cursor,\n keys: Object.freeze(keys),\n left: Object.freeze(left),\n rows: Object.freeze(rows),\n basis: folded.basis,\n redacted: folded.redacted,\n ...(skipped !== undefined ? { skipped: Object.freeze(skipped) } : {}),\n ...(served !== undefined ? { served } : {}),\n ...(servedError !== undefined ? { servedError } : {}),\n why: whyFor(options.events, stages),\n });\n}\n"],"mappings":";;;;;;;;AA2BA,YAAY,WAAW;AACvB,SAAS,eAAe;AAmFjB,SAAS,aAAa,MAAkC;AAC7D,QAAM,SAA+D;AACrE,MAAI,OAAO,WAAW,WAAY,QAAO,OAAO,IAAI,EAAE,CAAC;AACvD,QAAM,OAAO,KAAK,QAAQ,GAAQ;AAClC,MAAI,QAAQ,EAAG,QAAO,KAAK,MAAM,GAAG,IAAI;AACxC,QAAM,MAAM,KAAK,QAAQ,GAAG;AAC5B,SAAO,OAAO,IAAI,KAAK,MAAM,GAAG,GAAG,IAAI;AACzC;AASA,SAAS,MAAM,UAA4C;AACzD,QAAM,IAAI;AACV,SAAO,MAAM,QAAQ,GAAG,SAAS,IAAK,EAAE,YAA+B,CAAC;AAC1E;AAGA,SAAS,YAAY,KAA8B,WAAqD;AACtG,QAAM,MAAM,oBAAI,IAAyB;AACzC,QAAM,OAAO,KAAK,IAAI,WAAW,IAAI,SAAS,CAAC;AAC/C,WAAS,IAAI,GAAG,KAAK,MAAM,KAAK;AAC9B,UAAM,SAAS,IAAI,CAAC;AACpB,QAAI,WAAW,UAAa,OAAO,OAAO,mBAAmB,YAAY,CAAC,MAAM,QAAQ,OAAO,KAAK;AAClG;AACF,eAAW,OAAO,OAAO,OAAO;AAC9B,YAAM,MAAM,aAAa,IAAI,IAAI;AACjC,UAAI,QAAQ,OAAW;AACvB,YAAM,QAAQ,IAAI,IAAI,GAAG;AACzB,UAAI,IAAI,KAAK;AAAA,QACX,SAAS,OAAO;AAAA,QAChB,SAAS;AAAA,QACT,WAAW,OAAO,aAAa;AAAA,QAC/B,MAAM,IAAI;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;AAEA,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CAAC,MAAM,EAAE,KAAK,OAAO,MAAM;AAElG,QAAM,SAAS,IAAI,OAAO,SAAS;AACnC,QAAM,OAAO,MAAM,QAAQ,QAAQ,KAAK,IACpC,OAAO,MAAM,IAAI,CAAC,MAAgB,OAAO,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,EAAE,KAAK,CAAC,CAAC,IAC/E,CAAC;AAEL,QAAM,SAAS,oBAAI,IAAY;AAC/B,MAAI,WAAW,UAAa,OAAO,OAAO,mBAAmB,SAAU,QAAO,IAAI,OAAO,cAAc;AACvG,aAAW,KAAK;AACd,QAAI,EAAE,UAAU,UAAa,EAAE,UAAU,eAAe,EAAE,YAAY,OAAW,QAAO,IAAI,EAAE,OAAO;AAEvG,QAAM,UACJ,OAAO,YAAY,UAAa,OAAO,QAAQ,SAAS,IACpD,OAAO,QAAQ,IAAI,CAAC,MAAM,EAAE,KAAK,IACjC;AACN,QAAM,EAAE,QAAQ,YAAY,IAAI,UAAU,WAAW,MAAM;AAE3D,SAAO,OAAO,OAAO;AAAA,IACnB;AAAA,IACA,MAAM,OAAO,OAAO,IAAI;AAAA,IACxB,MAAM,OAAO,OAAO,IAAI;AAAA,IACxB,MAAM,OAAO,OAAO,IAAI;AAAA,IACxB,OAAO,OAAO;AAAA,IACd,UAAU,OAAO;AAAA,IACjB,GAAI,YAAY,SAAY,EAAE,SAAS,OAAO,OAAO,OAAO,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,WAAW,SAAY,EAAE,OAAO,IAAI,CAAC;AAAA,IACzC,GAAI,gBAAgB,SAAY,EAAE,YAAY,IAAI,CAAC;AAAA,IACnD,KAAK,OAAO,QAAQ,QAAQ,MAAM;AAAA,EACpC,CAAC;AACH;","names":[]}
|
package/dist/context.cjs
CHANGED
|
@@ -41,6 +41,7 @@ module.exports = __toCommonJS(context_exports);
|
|
|
41
41
|
var import_react = require("react");
|
|
42
42
|
|
|
43
43
|
// src/core/context/contextAt.ts
|
|
44
|
+
var trace = __toESM(require("footprintjs/trace"), 1);
|
|
44
45
|
var import_trace = require("footprintjs/trace");
|
|
45
46
|
|
|
46
47
|
// src/core/served/servedRowAt.ts
|
|
@@ -526,6 +527,14 @@ function verify(view, receipt, runId, cause) {
|
|
|
526
527
|
}
|
|
527
528
|
|
|
528
529
|
// src/core/context/contextAt.ts
|
|
530
|
+
function firstSegment(path) {
|
|
531
|
+
const helper = trace.pathSegments;
|
|
532
|
+
if (typeof helper === "function") return helper(path)[0];
|
|
533
|
+
const unit = path.indexOf("");
|
|
534
|
+
if (unit >= 0) return path.slice(0, unit);
|
|
535
|
+
const dot = path.indexOf(".");
|
|
536
|
+
return dot >= 0 ? path.slice(0, dot) : path;
|
|
537
|
+
}
|
|
529
538
|
function logOf(snapshot) {
|
|
530
539
|
const s = snapshot;
|
|
531
540
|
return Array.isArray(s?.commitLog) ? s.commitLog : [];
|
|
@@ -538,7 +547,7 @@ function writersUpTo(log, commitIdx) {
|
|
|
538
547
|
if (bundle === void 0 || typeof bundle.runtimeStageId !== "string" || !Array.isArray(bundle.trace))
|
|
539
548
|
continue;
|
|
540
549
|
for (const row of bundle.trace) {
|
|
541
|
-
const key = (
|
|
550
|
+
const key = firstSegment(row.path);
|
|
542
551
|
if (key === void 0) continue;
|
|
543
552
|
const prior = out.get(key);
|
|
544
553
|
out.set(key, {
|
|
@@ -763,10 +772,10 @@ function lensCursorFrom(positions, step, moveTo) {
|
|
|
763
772
|
}
|
|
764
773
|
|
|
765
774
|
// src/core/tags/tagAxis.ts
|
|
766
|
-
var
|
|
775
|
+
var trace2 = __toESM(require("footprintjs/trace"), 1);
|
|
767
776
|
var agentfootprint2 = __toESM(require("agentfootprint"), 1);
|
|
768
777
|
function tagStopsStrategy() {
|
|
769
|
-
const fn =
|
|
778
|
+
const fn = trace2.tagStops;
|
|
770
779
|
return typeof fn === "function" ? fn : void 0;
|
|
771
780
|
}
|
|
772
781
|
function milestoneOf(meta) {
|