agentfootprint-lens 0.6.1 → 0.7.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/core.d.cts +31 -165
- package/dist/core.d.ts +31 -165
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/react.d.cts +5 -3
- package/dist/react.d.ts +5 -3
- package/package.json +5 -1
package/dist/core.d.cts
CHANGED
|
@@ -1,161 +1,36 @@
|
|
|
1
|
+
import { AgentTimeline as AgentTimeline$1 } from 'agentfootprint';
|
|
2
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
interface AgentMessage {
|
|
8
|
-
readonly role: "system" | "user" | "assistant" | "tool";
|
|
9
|
-
readonly content: string;
|
|
10
|
-
readonly toolCalls?: readonly AgentToolCallStub[];
|
|
11
|
-
readonly toolCallId?: string;
|
|
12
|
-
}
|
|
13
|
-
/** A tool call as it appears on an assistant message (reference only). */
|
|
14
|
-
interface AgentToolCallStub {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly arguments: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
/** A resolved tool invocation with args + result + timing. */
|
|
20
|
-
interface AgentToolInvocation {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly name: string;
|
|
23
|
-
readonly arguments: Record<string, unknown>;
|
|
24
|
-
readonly result: string;
|
|
25
|
-
readonly error?: boolean;
|
|
26
|
-
readonly decisionUpdate?: Record<string, unknown>;
|
|
27
|
-
/** Iteration within the turn this invocation belongs to. 1-based. */
|
|
28
|
-
readonly iterationIndex: number;
|
|
29
|
-
/** Turn index (0-based). */
|
|
30
|
-
readonly turnIndex: number;
|
|
31
|
-
/** Duration in ms, or undefined if the recorder didn't capture it. */
|
|
32
|
-
readonly durationMs?: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A single context injection captured on this iteration — e.g. RAG
|
|
36
|
-
* adding chunks to Messages, a Skill activating a prompt, Memory
|
|
37
|
-
* re-injecting prior turns, Instructions firing per-tool guidance.
|
|
5
|
+
* Lens type surface — re-exports the canonical agent-shaped types from
|
|
6
|
+
* agentfootprint so Lens and any other UI consumer share one source of
|
|
7
|
+
* truth.
|
|
8
|
+
*
|
|
9
|
+
* Why not define these in Lens:
|
|
38
10
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
11
|
+
* The agent-shaped narrative (turns → iterations → tool calls +
|
|
12
|
+
* context injections + ledger) is the DATA CONTRACT, not a UI
|
|
13
|
+
* concept. Defining it in Lens would mean every other UI library
|
|
14
|
+
* (Grafana panels, CLI debuggers, replay viewers) re-implements the
|
|
15
|
+
* same translation from emit events. Mirrors how footprintjs owns
|
|
16
|
+
* `NarrativeEntry` and every shell consumes it.
|
|
45
17
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
18
|
+
* Lens only adds UI-leaning types that don't belong in the data
|
|
19
|
+
* library:
|
|
20
|
+
* • `LensSkill` — UI skill detail card with raw-JSON escape hatch
|
|
21
|
+
* • `AgentTimeline` — extends the agentfootprint base with an
|
|
22
|
+
* optional `rawSnapshot` field the snapshot-import adapter uses
|
|
49
23
|
*/
|
|
50
|
-
|
|
51
|
-
/** Short source name — `rag`, `skill`, `memory`, `instructions`, etc. */
|
|
52
|
-
readonly source: string;
|
|
53
|
-
/** Which Agent slot this injection targets. */
|
|
54
|
-
readonly slot: "system-prompt" | "messages" | "tools";
|
|
55
|
-
/** Short human label for the Lens tag — e.g. "3 chunks · top 0.95". */
|
|
56
|
-
readonly label: string;
|
|
57
|
-
/**
|
|
58
|
-
* Wire-level LLM role of the injected content when it lands in the
|
|
59
|
-
* `messages` slot. `system` for classical RAG, `tool` for agentic
|
|
60
|
-
* RAG tool results, `user` for rare pre-pend patterns, undefined for
|
|
61
|
-
* system-prompt / tools slot targets (those have no role — they
|
|
62
|
-
* mutate the slot directly).
|
|
63
|
-
*/
|
|
64
|
-
readonly role?: "system" | "user" | "assistant" | "tool";
|
|
65
|
-
/**
|
|
66
|
-
* Index in `messages[]` where the injected message landed — lets the
|
|
67
|
-
* "Inspect messages" drill-down jump straight to the row. Only set
|
|
68
|
-
* for messages-slot injections.
|
|
69
|
-
*/
|
|
70
|
-
readonly targetIndex?: number;
|
|
71
|
-
/**
|
|
72
|
-
* Per-slot count deltas this injection contributed. Drives the
|
|
73
|
-
* per-iteration ledger shown on the Agent card ("system +2,
|
|
74
|
-
* tools +3"). Keys are intentionally open — new injection sources
|
|
75
|
-
* can introduce new counters without a schema change.
|
|
76
|
-
*/
|
|
77
|
-
readonly deltaCount?: Record<string, number | boolean>;
|
|
78
|
-
/** Raw payload from the emit event — available in the expand-drawer. */
|
|
79
|
-
readonly payload: Record<string, unknown>;
|
|
80
|
-
}
|
|
24
|
+
|
|
81
25
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* Keys are open-ended (match deltaCount shape); standard keys the UI
|
|
88
|
-
* knows about today: `system` | `user` | `assistant` | `tool`
|
|
89
|
-
* (message-role counters), `systemPromptChars` (char growth),
|
|
90
|
-
* `tools` (tool-slot additions).
|
|
26
|
+
* Lens-flavored AgentTimeline. Adds the optional `rawSnapshot` escape
|
|
27
|
+
* hatch used by the snapshot-import adapter (`fromAgentSnapshot`) —
|
|
28
|
+
* consumers who already have a runtime snapshot pass it through for
|
|
29
|
+
* advanced panels (custom extensions reading `sharedState` directly).
|
|
30
|
+
* The live-recorder path leaves this undefined; no cost when unused.
|
|
91
31
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
interface AgentIteration {
|
|
95
|
-
readonly index: number;
|
|
96
|
-
readonly inputTokens?: number;
|
|
97
|
-
readonly outputTokens?: number;
|
|
98
|
-
readonly model?: string;
|
|
99
|
-
readonly durationMs?: number;
|
|
100
|
-
readonly stopReason?: string;
|
|
101
|
-
/** Raw assistant text (may be empty when tool calls are present). */
|
|
102
|
-
readonly assistantContent: string;
|
|
103
|
-
/** Tool calls the LLM requested in this iteration. */
|
|
104
|
-
readonly toolCalls: readonly AgentToolInvocation[];
|
|
105
|
-
/** Decision scope observed at the start of this iteration. */
|
|
106
|
-
readonly decisionAtStart: Record<string, unknown>;
|
|
107
|
-
/** Instruction ids that matched on this iteration (if captured). */
|
|
108
|
-
readonly matchedInstructions?: readonly string[];
|
|
109
|
-
/** Tool names visible to the LLM on this iteration. */
|
|
110
|
-
readonly visibleTools: readonly string[];
|
|
111
|
-
/**
|
|
112
|
-
* Context injections that shaped this iteration's prompt —
|
|
113
|
-
* RAG chunks, skill activations, memory writes, instructions fired.
|
|
114
|
-
* Empty when the iteration ran with just the static base context.
|
|
115
|
-
*/
|
|
116
|
-
readonly contextInjections: readonly AgentContextInjection[];
|
|
117
|
-
/**
|
|
118
|
-
* Accumulated ledger for this iteration — sum of every injection's
|
|
119
|
-
* `deltaCount`. Drives the per-slot counter badges on the Agent card
|
|
120
|
-
* (e.g. "system +2" on the Messages slot, "+1200 chars" on System
|
|
121
|
-
* Prompt). Empty object when the iteration had no injections.
|
|
122
|
-
*/
|
|
123
|
-
readonly contextLedger: AgentContextLedger;
|
|
124
|
-
/**
|
|
125
|
-
* Number of messages in the conversation at the moment `llm_start`
|
|
126
|
-
* fired. `timeline.messages.slice(0, messagesSentCount)` yields
|
|
127
|
-
* exactly what the LLM saw on this iteration (minus system prompt +
|
|
128
|
-
* tool list — those come from a future richer llm_start event).
|
|
129
|
-
* Enables the "What Neo saw" expander in MessagesPanel.
|
|
130
|
-
*/
|
|
131
|
-
readonly messagesSentCount: number;
|
|
132
|
-
}
|
|
133
|
-
/** One `.run()` call. Multi-turn conversations stack these. */
|
|
134
|
-
interface AgentTurn {
|
|
135
|
-
readonly index: number;
|
|
136
|
-
readonly userPrompt: string;
|
|
137
|
-
readonly iterations: readonly AgentIteration[];
|
|
138
|
-
/** Final assistant content after the last iteration. */
|
|
139
|
-
readonly finalContent: string;
|
|
140
|
-
readonly totalInputTokens: number;
|
|
141
|
-
readonly totalOutputTokens: number;
|
|
142
|
-
readonly totalDurationMs: number;
|
|
143
|
-
/**
|
|
144
|
-
* All context injections that fired during this turn, in emission
|
|
145
|
-
* order — flat union of every iteration's `contextInjections`.
|
|
146
|
-
* Surfaces "what context engineering happened this turn" without
|
|
147
|
-
* requiring the user to scrub to a specific iteration. AskCard reads
|
|
148
|
-
* this when the focused stage isn't bound to an iter (e.g. the
|
|
149
|
-
* initial User → Agent edge before iter 1 fires).
|
|
150
|
-
*/
|
|
151
|
-
readonly contextInjections: readonly AgentContextInjection[];
|
|
152
|
-
/**
|
|
153
|
-
* Turn-level accumulated ledger — sum of every iteration's
|
|
154
|
-
* `contextLedger`. Drives the turn-summary chips on the StageFlow
|
|
155
|
-
* Agent card when no iter is active, so users always see the
|
|
156
|
-
* cumulative context-engineering picture for the current turn.
|
|
157
|
-
*/
|
|
158
|
-
readonly contextLedger: AgentContextLedger;
|
|
32
|
+
interface AgentTimeline extends AgentTimeline$1 {
|
|
33
|
+
readonly rawSnapshot?: any;
|
|
159
34
|
}
|
|
160
35
|
/**
|
|
161
36
|
* A skill as it reaches Lens. Consumers pass these in from their
|
|
@@ -163,6 +38,9 @@ interface AgentTurn {
|
|
|
163
38
|
* required — everything else is best-effort, and extra fields pass
|
|
164
39
|
* through via the index signature so the raw-JSON view is useful for
|
|
165
40
|
* debugging even when skills carry custom metadata.
|
|
41
|
+
*
|
|
42
|
+
* Lens-only (no agentfootprint equivalent) because "a skill with a
|
|
43
|
+
* raw-JSON debug view" is specifically a UI concern.
|
|
166
44
|
*/
|
|
167
45
|
interface LensSkill {
|
|
168
46
|
readonly id: string;
|
|
@@ -177,18 +55,6 @@ interface LensSkill {
|
|
|
177
55
|
/** Everything else on the skill object passes through for raw-JSON view. */
|
|
178
56
|
readonly [key: string]: unknown;
|
|
179
57
|
}
|
|
180
|
-
/** The full picture: every turn stitched together. */
|
|
181
|
-
interface AgentTimeline {
|
|
182
|
-
readonly turns: readonly AgentTurn[];
|
|
183
|
-
/** Full message array, flat — convenient for the Messages panel. */
|
|
184
|
-
readonly messages: readonly AgentMessage[];
|
|
185
|
-
/** Flat tool invocation list across all turns — for the Inspector. */
|
|
186
|
-
readonly tools: readonly AgentToolInvocation[];
|
|
187
|
-
/** Final decision scope at end of run. */
|
|
188
|
-
readonly finalDecision: Record<string, unknown>;
|
|
189
|
-
/** The raw runtime snapshot — escape hatch for advanced panels. */
|
|
190
|
-
readonly rawSnapshot: any;
|
|
191
|
-
}
|
|
192
58
|
|
|
193
59
|
/**
|
|
194
60
|
* LiveTimelineBuilder — ingests agentfootprint emit events AS THEY HAPPEN
|
|
@@ -481,4 +347,4 @@ interface Stage {
|
|
|
481
347
|
}
|
|
482
348
|
declare function deriveStages(timeline: AgentTimeline): Stage[];
|
|
483
349
|
|
|
484
|
-
export { type
|
|
350
|
+
export { type AgentTimeline, type LensSkill, LiveTimelineBuilder, type Stage, type StageMutations, type StageNodeId, type StagePrimitive, deriveStages, fromAgentSnapshot };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,161 +1,36 @@
|
|
|
1
|
+
import { AgentTimeline as AgentTimeline$1 } from 'agentfootprint';
|
|
2
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
interface AgentMessage {
|
|
8
|
-
readonly role: "system" | "user" | "assistant" | "tool";
|
|
9
|
-
readonly content: string;
|
|
10
|
-
readonly toolCalls?: readonly AgentToolCallStub[];
|
|
11
|
-
readonly toolCallId?: string;
|
|
12
|
-
}
|
|
13
|
-
/** A tool call as it appears on an assistant message (reference only). */
|
|
14
|
-
interface AgentToolCallStub {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly arguments: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
/** A resolved tool invocation with args + result + timing. */
|
|
20
|
-
interface AgentToolInvocation {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly name: string;
|
|
23
|
-
readonly arguments: Record<string, unknown>;
|
|
24
|
-
readonly result: string;
|
|
25
|
-
readonly error?: boolean;
|
|
26
|
-
readonly decisionUpdate?: Record<string, unknown>;
|
|
27
|
-
/** Iteration within the turn this invocation belongs to. 1-based. */
|
|
28
|
-
readonly iterationIndex: number;
|
|
29
|
-
/** Turn index (0-based). */
|
|
30
|
-
readonly turnIndex: number;
|
|
31
|
-
/** Duration in ms, or undefined if the recorder didn't capture it. */
|
|
32
|
-
readonly durationMs?: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A single context injection captured on this iteration — e.g. RAG
|
|
36
|
-
* adding chunks to Messages, a Skill activating a prompt, Memory
|
|
37
|
-
* re-injecting prior turns, Instructions firing per-tool guidance.
|
|
5
|
+
* Lens type surface — re-exports the canonical agent-shaped types from
|
|
6
|
+
* agentfootprint so Lens and any other UI consumer share one source of
|
|
7
|
+
* truth.
|
|
8
|
+
*
|
|
9
|
+
* Why not define these in Lens:
|
|
38
10
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
11
|
+
* The agent-shaped narrative (turns → iterations → tool calls +
|
|
12
|
+
* context injections + ledger) is the DATA CONTRACT, not a UI
|
|
13
|
+
* concept. Defining it in Lens would mean every other UI library
|
|
14
|
+
* (Grafana panels, CLI debuggers, replay viewers) re-implements the
|
|
15
|
+
* same translation from emit events. Mirrors how footprintjs owns
|
|
16
|
+
* `NarrativeEntry` and every shell consumes it.
|
|
45
17
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
18
|
+
* Lens only adds UI-leaning types that don't belong in the data
|
|
19
|
+
* library:
|
|
20
|
+
* • `LensSkill` — UI skill detail card with raw-JSON escape hatch
|
|
21
|
+
* • `AgentTimeline` — extends the agentfootprint base with an
|
|
22
|
+
* optional `rawSnapshot` field the snapshot-import adapter uses
|
|
49
23
|
*/
|
|
50
|
-
|
|
51
|
-
/** Short source name — `rag`, `skill`, `memory`, `instructions`, etc. */
|
|
52
|
-
readonly source: string;
|
|
53
|
-
/** Which Agent slot this injection targets. */
|
|
54
|
-
readonly slot: "system-prompt" | "messages" | "tools";
|
|
55
|
-
/** Short human label for the Lens tag — e.g. "3 chunks · top 0.95". */
|
|
56
|
-
readonly label: string;
|
|
57
|
-
/**
|
|
58
|
-
* Wire-level LLM role of the injected content when it lands in the
|
|
59
|
-
* `messages` slot. `system` for classical RAG, `tool` for agentic
|
|
60
|
-
* RAG tool results, `user` for rare pre-pend patterns, undefined for
|
|
61
|
-
* system-prompt / tools slot targets (those have no role — they
|
|
62
|
-
* mutate the slot directly).
|
|
63
|
-
*/
|
|
64
|
-
readonly role?: "system" | "user" | "assistant" | "tool";
|
|
65
|
-
/**
|
|
66
|
-
* Index in `messages[]` where the injected message landed — lets the
|
|
67
|
-
* "Inspect messages" drill-down jump straight to the row. Only set
|
|
68
|
-
* for messages-slot injections.
|
|
69
|
-
*/
|
|
70
|
-
readonly targetIndex?: number;
|
|
71
|
-
/**
|
|
72
|
-
* Per-slot count deltas this injection contributed. Drives the
|
|
73
|
-
* per-iteration ledger shown on the Agent card ("system +2,
|
|
74
|
-
* tools +3"). Keys are intentionally open — new injection sources
|
|
75
|
-
* can introduce new counters without a schema change.
|
|
76
|
-
*/
|
|
77
|
-
readonly deltaCount?: Record<string, number | boolean>;
|
|
78
|
-
/** Raw payload from the emit event — available in the expand-drawer. */
|
|
79
|
-
readonly payload: Record<string, unknown>;
|
|
80
|
-
}
|
|
24
|
+
|
|
81
25
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* Keys are open-ended (match deltaCount shape); standard keys the UI
|
|
88
|
-
* knows about today: `system` | `user` | `assistant` | `tool`
|
|
89
|
-
* (message-role counters), `systemPromptChars` (char growth),
|
|
90
|
-
* `tools` (tool-slot additions).
|
|
26
|
+
* Lens-flavored AgentTimeline. Adds the optional `rawSnapshot` escape
|
|
27
|
+
* hatch used by the snapshot-import adapter (`fromAgentSnapshot`) —
|
|
28
|
+
* consumers who already have a runtime snapshot pass it through for
|
|
29
|
+
* advanced panels (custom extensions reading `sharedState` directly).
|
|
30
|
+
* The live-recorder path leaves this undefined; no cost when unused.
|
|
91
31
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
interface AgentIteration {
|
|
95
|
-
readonly index: number;
|
|
96
|
-
readonly inputTokens?: number;
|
|
97
|
-
readonly outputTokens?: number;
|
|
98
|
-
readonly model?: string;
|
|
99
|
-
readonly durationMs?: number;
|
|
100
|
-
readonly stopReason?: string;
|
|
101
|
-
/** Raw assistant text (may be empty when tool calls are present). */
|
|
102
|
-
readonly assistantContent: string;
|
|
103
|
-
/** Tool calls the LLM requested in this iteration. */
|
|
104
|
-
readonly toolCalls: readonly AgentToolInvocation[];
|
|
105
|
-
/** Decision scope observed at the start of this iteration. */
|
|
106
|
-
readonly decisionAtStart: Record<string, unknown>;
|
|
107
|
-
/** Instruction ids that matched on this iteration (if captured). */
|
|
108
|
-
readonly matchedInstructions?: readonly string[];
|
|
109
|
-
/** Tool names visible to the LLM on this iteration. */
|
|
110
|
-
readonly visibleTools: readonly string[];
|
|
111
|
-
/**
|
|
112
|
-
* Context injections that shaped this iteration's prompt —
|
|
113
|
-
* RAG chunks, skill activations, memory writes, instructions fired.
|
|
114
|
-
* Empty when the iteration ran with just the static base context.
|
|
115
|
-
*/
|
|
116
|
-
readonly contextInjections: readonly AgentContextInjection[];
|
|
117
|
-
/**
|
|
118
|
-
* Accumulated ledger for this iteration — sum of every injection's
|
|
119
|
-
* `deltaCount`. Drives the per-slot counter badges on the Agent card
|
|
120
|
-
* (e.g. "system +2" on the Messages slot, "+1200 chars" on System
|
|
121
|
-
* Prompt). Empty object when the iteration had no injections.
|
|
122
|
-
*/
|
|
123
|
-
readonly contextLedger: AgentContextLedger;
|
|
124
|
-
/**
|
|
125
|
-
* Number of messages in the conversation at the moment `llm_start`
|
|
126
|
-
* fired. `timeline.messages.slice(0, messagesSentCount)` yields
|
|
127
|
-
* exactly what the LLM saw on this iteration (minus system prompt +
|
|
128
|
-
* tool list — those come from a future richer llm_start event).
|
|
129
|
-
* Enables the "What Neo saw" expander in MessagesPanel.
|
|
130
|
-
*/
|
|
131
|
-
readonly messagesSentCount: number;
|
|
132
|
-
}
|
|
133
|
-
/** One `.run()` call. Multi-turn conversations stack these. */
|
|
134
|
-
interface AgentTurn {
|
|
135
|
-
readonly index: number;
|
|
136
|
-
readonly userPrompt: string;
|
|
137
|
-
readonly iterations: readonly AgentIteration[];
|
|
138
|
-
/** Final assistant content after the last iteration. */
|
|
139
|
-
readonly finalContent: string;
|
|
140
|
-
readonly totalInputTokens: number;
|
|
141
|
-
readonly totalOutputTokens: number;
|
|
142
|
-
readonly totalDurationMs: number;
|
|
143
|
-
/**
|
|
144
|
-
* All context injections that fired during this turn, in emission
|
|
145
|
-
* order — flat union of every iteration's `contextInjections`.
|
|
146
|
-
* Surfaces "what context engineering happened this turn" without
|
|
147
|
-
* requiring the user to scrub to a specific iteration. AskCard reads
|
|
148
|
-
* this when the focused stage isn't bound to an iter (e.g. the
|
|
149
|
-
* initial User → Agent edge before iter 1 fires).
|
|
150
|
-
*/
|
|
151
|
-
readonly contextInjections: readonly AgentContextInjection[];
|
|
152
|
-
/**
|
|
153
|
-
* Turn-level accumulated ledger — sum of every iteration's
|
|
154
|
-
* `contextLedger`. Drives the turn-summary chips on the StageFlow
|
|
155
|
-
* Agent card when no iter is active, so users always see the
|
|
156
|
-
* cumulative context-engineering picture for the current turn.
|
|
157
|
-
*/
|
|
158
|
-
readonly contextLedger: AgentContextLedger;
|
|
32
|
+
interface AgentTimeline extends AgentTimeline$1 {
|
|
33
|
+
readonly rawSnapshot?: any;
|
|
159
34
|
}
|
|
160
35
|
/**
|
|
161
36
|
* A skill as it reaches Lens. Consumers pass these in from their
|
|
@@ -163,6 +38,9 @@ interface AgentTurn {
|
|
|
163
38
|
* required — everything else is best-effort, and extra fields pass
|
|
164
39
|
* through via the index signature so the raw-JSON view is useful for
|
|
165
40
|
* debugging even when skills carry custom metadata.
|
|
41
|
+
*
|
|
42
|
+
* Lens-only (no agentfootprint equivalent) because "a skill with a
|
|
43
|
+
* raw-JSON debug view" is specifically a UI concern.
|
|
166
44
|
*/
|
|
167
45
|
interface LensSkill {
|
|
168
46
|
readonly id: string;
|
|
@@ -177,18 +55,6 @@ interface LensSkill {
|
|
|
177
55
|
/** Everything else on the skill object passes through for raw-JSON view. */
|
|
178
56
|
readonly [key: string]: unknown;
|
|
179
57
|
}
|
|
180
|
-
/** The full picture: every turn stitched together. */
|
|
181
|
-
interface AgentTimeline {
|
|
182
|
-
readonly turns: readonly AgentTurn[];
|
|
183
|
-
/** Full message array, flat — convenient for the Messages panel. */
|
|
184
|
-
readonly messages: readonly AgentMessage[];
|
|
185
|
-
/** Flat tool invocation list across all turns — for the Inspector. */
|
|
186
|
-
readonly tools: readonly AgentToolInvocation[];
|
|
187
|
-
/** Final decision scope at end of run. */
|
|
188
|
-
readonly finalDecision: Record<string, unknown>;
|
|
189
|
-
/** The raw runtime snapshot — escape hatch for advanced panels. */
|
|
190
|
-
readonly rawSnapshot: any;
|
|
191
|
-
}
|
|
192
58
|
|
|
193
59
|
/**
|
|
194
60
|
* LiveTimelineBuilder — ingests agentfootprint emit events AS THEY HAPPEN
|
|
@@ -481,4 +347,4 @@ interface Stage {
|
|
|
481
347
|
}
|
|
482
348
|
declare function deriveStages(timeline: AgentTimeline): Stage[];
|
|
483
349
|
|
|
484
|
-
export { type
|
|
350
|
+
export { type AgentTimeline, type LensSkill, LiveTimelineBuilder, type Stage, type StageMutations, type StageNodeId, type StagePrimitive, deriveStages, fromAgentSnapshot };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { AgentTimeline, LensSkill, LiveTimelineBuilder, Stage, StageMutations, StageNodeId, StagePrimitive, deriveStages, fromAgentSnapshot } from './core.cjs';
|
|
2
2
|
export { AgentLens, AgentLensProps, AskCard, AskCardProps, FillParent, FillParentProps, FocusRegion, FocusRegionProps, FocusState, IterationStrip, IterationStripProps, Lens, LensProps, LensRunner, LensTheme, MessagesPanel, MessagesPanelProps, RunSummary, RunSummaryProps, Scroller, ScrollerProps, SelfSizingRoot, SelfSizingRootProps, SkillsPanel, SkillsPanelProps, Stack, StackProps, StageFlow, StageFlowProps, Surface, SurfacePalette, SurfaceProps, SurfaceVariant, TabDef, Table, TableColumn, TableProps, Tabs, TabsProps, TimeTravel, TimeTravelProps, ToolCallInspector, ToolCallInspectorProps, UseLiveTimelineResult, resolveLensTheme, useFocusTracking, useLens, useLensTheme, useLiveTimeline } from './react.cjs';
|
|
3
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import 'footprint-explainable-ui';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { AgentTimeline, LensSkill, LiveTimelineBuilder, Stage, StageMutations, StageNodeId, StagePrimitive, deriveStages, fromAgentSnapshot } from './core.js';
|
|
2
2
|
export { AgentLens, AgentLensProps, AskCard, AskCardProps, FillParent, FillParentProps, FocusRegion, FocusRegionProps, FocusState, IterationStrip, IterationStripProps, Lens, LensProps, LensRunner, LensTheme, MessagesPanel, MessagesPanelProps, RunSummary, RunSummaryProps, Scroller, ScrollerProps, SelfSizingRoot, SelfSizingRootProps, SkillsPanel, SkillsPanelProps, Stack, StackProps, StageFlow, StageFlowProps, Surface, SurfacePalette, SurfaceProps, SurfaceVariant, TabDef, Table, TableColumn, TableProps, Tabs, TabsProps, TimeTravel, TimeTravelProps, ToolCallInspector, ToolCallInspectorProps, UseLiveTimelineResult, resolveLensTheme, useFocusTracking, useLens, useLensTheme, useLiveTimeline } from './react.js';
|
|
3
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import 'footprint-explainable-ui';
|
package/dist/react.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { AgentTimeline,
|
|
2
|
-
export {
|
|
1
|
+
import { AgentTimeline, LensSkill, Stage, LiveTimelineBuilder } from './core.cjs';
|
|
2
|
+
export { StageMutations, StageNodeId, StagePrimitive, deriveStages, fromAgentSnapshot } from './core.cjs';
|
|
3
|
+
import { AgentToolInvocation } from 'agentfootprint';
|
|
4
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
import { ReactNode, CSSProperties, RefObject } from 'react';
|
|
5
7
|
import { NarrativeEntry, ThemeTokens } from 'footprint-explainable-ui';
|
|
@@ -600,4 +602,4 @@ declare function useLensTheme(): LensTheme;
|
|
|
600
602
|
/** Pure mapping — exported for unit tests + non-hook call sites. */
|
|
601
603
|
declare function resolve(tokens: ThemeTokens | undefined): LensTheme;
|
|
602
604
|
|
|
603
|
-
export { AgentLens, type AgentLensProps, AgentTimeline,
|
|
605
|
+
export { AgentLens, type AgentLensProps, AgentTimeline, AskCard, type AskCardProps, FillParent, type FillParentProps, FocusRegion, type FocusRegionProps, type FocusState, IterationStrip, type IterationStripProps, Lens, type LensProps, type LensRunner, LensSkill, type LensTheme, LiveTimelineBuilder, MessagesPanel, type MessagesPanelProps, RunSummary, type RunSummaryProps, Scroller, type ScrollerProps, SelfSizingRoot, type SelfSizingRootProps, SkillsPanel, type SkillsPanelProps, Stack, type StackProps, Stage, StageFlow, type StageFlowProps, Surface, type SurfacePalette, type SurfaceProps, type SurfaceVariant, type TabDef, Table, type TableColumn, type TableProps, Tabs, type TabsProps, TimeTravel, type TimeTravelProps, ToolCallInspector, type ToolCallInspectorProps, type UseLiveTimelineResult, resolve as resolveLensTheme, useFocusTracking, useLens, useLensTheme, useLiveTimeline };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { AgentTimeline,
|
|
2
|
-
export {
|
|
1
|
+
import { AgentTimeline, LensSkill, Stage, LiveTimelineBuilder } from './core.js';
|
|
2
|
+
export { StageMutations, StageNodeId, StagePrimitive, deriveStages, fromAgentSnapshot } from './core.js';
|
|
3
|
+
import { AgentToolInvocation } from 'agentfootprint';
|
|
4
|
+
export { AgentIteration, AgentMessage, AgentToolCallStub, AgentToolInvocation, AgentTurn } from 'agentfootprint';
|
|
3
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
6
|
import { ReactNode, CSSProperties, RefObject } from 'react';
|
|
5
7
|
import { NarrativeEntry, ThemeTokens } from 'footprint-explainable-ui';
|
|
@@ -600,4 +602,4 @@ declare function useLensTheme(): LensTheme;
|
|
|
600
602
|
/** Pure mapping — exported for unit tests + non-hook call sites. */
|
|
601
603
|
declare function resolve(tokens: ThemeTokens | undefined): LensTheme;
|
|
602
604
|
|
|
603
|
-
export { AgentLens, type AgentLensProps, AgentTimeline,
|
|
605
|
+
export { AgentLens, type AgentLensProps, AgentTimeline, AskCard, type AskCardProps, FillParent, type FillParentProps, FocusRegion, type FocusRegionProps, type FocusState, IterationStrip, type IterationStripProps, Lens, type LensProps, type LensRunner, LensSkill, type LensTheme, LiveTimelineBuilder, MessagesPanel, type MessagesPanelProps, RunSummary, type RunSummaryProps, Scroller, type ScrollerProps, SelfSizingRoot, type SelfSizingRootProps, SkillsPanel, type SkillsPanelProps, Stack, type StackProps, Stage, StageFlow, type StageFlowProps, Surface, type SurfacePalette, type SurfaceProps, type SurfaceVariant, type TabDef, Table, type TableColumn, type TableProps, Tabs, type TabsProps, TimeTravel, type TimeTravelProps, ToolCallInspector, type ToolCallInspectorProps, type UseLiveTimelineResult, resolve as resolveLensTheme, useFocusTracking, useLens, useLensTheme, useLiveTimeline };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint-lens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "See through your agent's decisions. React components for debugging agentfootprint runs — messages, prompts, tool calls, decision scope, cost.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -58,7 +58,9 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@xyflow/react": "^12.0.0",
|
|
61
|
+
"agentfootprint": ">=1.19.0",
|
|
61
62
|
"footprint-explainable-ui": "^0.18.1",
|
|
63
|
+
"footprintjs": ">=4.14.0",
|
|
62
64
|
"react": "^18.0.0 || ^19.0.0",
|
|
63
65
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
64
66
|
},
|
|
@@ -72,6 +74,8 @@
|
|
|
72
74
|
"@xyflow/react": "^12.10.2",
|
|
73
75
|
"footprint-explainable-ui": "^0.18.0",
|
|
74
76
|
"jsdom": "^29.0.2",
|
|
77
|
+
"agentfootprint": "^1.19.0",
|
|
78
|
+
"footprintjs": "^4.14.0",
|
|
75
79
|
"react": "^18.3.1",
|
|
76
80
|
"react-dom": "^18.3.1",
|
|
77
81
|
"tsup": "^8.0.0",
|