agentfootprint-lens 0.23.10 → 0.26.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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # agentfootprint-lens
2
2
 
3
+ _Part of the **[footprintjs ecosystem](https://footprintjs.github.io/)** — the self-explaining stack._
4
+
3
5
  > **See the context engineering as it happens.**
4
6
  >
5
7
  > React components for watching agents built on [`agentfootprint`](https://www.npmjs.com/package/agentfootprint). Every injection into the Agent's slots (RAG, Memory, Skills, Instructions, Tools) is tagged inline — students and engineers see exactly what was put into the prompt, by whom, on which iteration. No hidden abstractions.
@@ -296,6 +298,20 @@ This is the observer pattern, applied consistently across every agentfootprint r
296
298
 
297
299
  ---
298
300
 
301
+ ## The footprintjs ecosystem
302
+
303
+ The self-explaining stack — from backend pipelines to AI agents. → **[overview](https://footprintjs.github.io/)**
304
+
305
+ | Project | Role |
306
+ |---|---|
307
+ | [footprintjs](https://footprintjs.github.io/footPrint/) | the flowchart pattern (core engine) |
308
+ | [agentfootprint](https://footprintjs.github.io/agentfootprint/) | build self-explaining AI agents |
309
+ | [Explainable UI](https://footprintjs.github.io/explainable-ui/) | visualize a footprintjs run |
310
+ | **Lens** ← you are here | debug an agentfootprint run |
311
+ | [Thinking UI](https://footprintjs.github.io/agentThinkingUI/) | replay an agent run for non-devs |
312
+
313
+ ---
314
+
299
315
  ## License
300
316
 
301
317
  MIT
@@ -5,9 +5,7 @@ import {
5
5
  // src/core/LensRecorder.ts
6
6
  import { isDevMode } from "footprintjs";
7
7
  import { SequenceStore } from "footprintjs/trace";
8
- import {
9
- ALL_EVENT_TYPES
10
- } from "agentfootprint";
8
+ import { ALL_EVENT_TYPES } from "agentfootprint/events";
11
9
  import { LiveStateRecorder, BoundaryRecorder } from "agentfootprint/observe";
12
10
  import {
13
11
  createTraceRuntimeOverlay
@@ -2135,10 +2133,10 @@ function slotKindForLocalId(localId) {
2135
2133
  if (localId === "sf-tools") return "tools";
2136
2134
  return void 0;
2137
2135
  }
2138
- function structureGraphFromRunner(runner) {
2139
- return structureGraphFromSpec(runner.getSpec().buildTimeStructure);
2136
+ function structureGraphFromRunner(runner, opts) {
2137
+ return structureGraphFromSpec(runner.getSpec().buildTimeStructure, opts);
2140
2138
  }
2141
- function structureGraphFromSpec(buildTimeStructure) {
2139
+ function structureGraphFromSpec(buildTimeStructure, opts) {
2142
2140
  const trace = createTraceStructureRecorder();
2143
2141
  const recorder = trace.recorder;
2144
2142
  const spec = buildTimeStructure;
@@ -2197,22 +2195,24 @@ function structureGraphFromSpec(buildTimeStructure) {
2197
2195
  ...baseGraph.edges,
2198
2196
  ...internal.edges.filter((e) => !seenEdges.has(e.id))
2199
2197
  ];
2200
- for (const node of nodes) {
2201
- const role = stageRole(node.id);
2202
- const data = node.data;
2203
- const { localStageId } = splitStageId(node.id);
2204
- const emphasis = emphasisForRole(role);
2205
- if (emphasis !== void 0) data.emphasis = emphasis;
2206
- if (data.icon === void 0) {
2207
- const icon = iconForRole(localStageId, role);
2208
- if (icon !== void 0) data.icon = icon;
2209
- }
2210
- const size = sizeForRole(role);
2211
- if (size !== void 0) data.size = size;
2212
- if (role === "hero-slot") {
2213
- node.type = "slotPill";
2214
- const slotKind = slotKindForLocalId(localStageId);
2215
- if (slotKind !== void 0) data.slotKind = slotKind;
2198
+ if (opts?.decorate !== false) {
2199
+ for (const node of nodes) {
2200
+ const role = stageRole(node.id);
2201
+ const data = node.data;
2202
+ const { localStageId } = splitStageId(node.id);
2203
+ const emphasis = emphasisForRole(role);
2204
+ if (emphasis !== void 0) data.emphasis = emphasis;
2205
+ if (data.icon === void 0) {
2206
+ const icon = iconForRole(localStageId, role);
2207
+ if (icon !== void 0) data.icon = icon;
2208
+ }
2209
+ const size = sizeForRole(role);
2210
+ if (size !== void 0) data.size = size;
2211
+ if (role === "hero-slot") {
2212
+ node.type = "slotPill";
2213
+ const slotKind = slotKindForLocalId(localStageId);
2214
+ if (slotKind !== void 0) data.slotKind = slotKind;
2215
+ }
2216
2216
  }
2217
2217
  }
2218
2218
  return { ...baseGraph, nodes, edges };
@@ -2282,6 +2282,16 @@ function expandSubflowInternals(subflows) {
2282
2282
  return { nodes, edges };
2283
2283
  }
2284
2284
 
2285
+ // src/core/explainableShellProps.ts
2286
+ function explainableShellPropsFromRunner(agent, recorder) {
2287
+ return {
2288
+ runtimeSnapshot: agent.getLastSnapshot() ?? null,
2289
+ narrativeEntries: [...agent.getLastNarrativeEntries()],
2290
+ traceGraph: structureGraphFromRunner(agent),
2291
+ runtimeOverlay: recorder.runtime.getOverlay()
2292
+ };
2293
+ }
2294
+
2285
2295
  // src/core/render/toReactFlow.ts
2286
2296
  var DEFAULT_STAGE_SIZE = { width: 180, height: 56 };
2287
2297
  var DEFAULT_GROUP_SIZE = { width: 260, height: 120 };
@@ -2514,8 +2524,9 @@ export {
2514
2524
  lensGroupTranslator,
2515
2525
  structureGraphFromRunner,
2516
2526
  structureGraphFromSpec,
2527
+ explainableShellPropsFromRunner,
2517
2528
  toReactFlow,
2518
2529
  defaultSize,
2519
2530
  layoutLensGraph
2520
2531
  };
2521
- //# sourceMappingURL=chunk-ZJKD43L7.js.map
2532
+ //# sourceMappingURL=chunk-GIYBC66K.js.map