@industry-theme/principal-view-panels 0.1.47 → 0.1.48

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutionViewerPanel.d.ts","sourceRoot":"","sources":["../../src/panels/ExecutionViewerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA4B/E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0mB9D,CAAC"}
1
+ {"version":3,"file":"ExecutionViewerPanel.d.ts","sourceRoot":"","sources":["../../src/panels/ExecutionViewerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA8B/E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkpB9D,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Event Node Mapper
3
+ *
4
+ * Maps execution events to canvas nodes based on OTEL metadata.
5
+ * Uses event schemas defined in canvas nodes to determine which node
6
+ * should be highlighted when an event is played back.
7
+ */
8
+ import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
9
+ /**
10
+ * Event from execution artifact
11
+ */
12
+ export interface ExecutionEvent {
13
+ name: string;
14
+ time: number;
15
+ attributes?: Record<string, string | number | boolean>;
16
+ }
17
+ /**
18
+ * Maps an execution event to a canvas node ID.
19
+ *
20
+ * Strategy:
21
+ * 1. Primary: Match event name to node's pv.events keys
22
+ * 2. Fallback: Match event attributes to node's pv.otel.resourceMatch
23
+ * 3. Default: Return null (no highlight)
24
+ *
25
+ * @param event - The execution event to map
26
+ * @param canvas - The canvas containing nodes with OTEL metadata
27
+ * @returns Node ID to highlight, or null if no match
28
+ */
29
+ export declare function mapEventToNodeId(event: ExecutionEvent, canvas: ExtendedCanvas | null): string | null;
30
+ /**
31
+ * Pre-builds a mapping of event names to node IDs for faster lookups.
32
+ * Useful when processing many events sequentially.
33
+ *
34
+ * @param canvas - The canvas to build the mapping from
35
+ * @returns Map of event name to node ID
36
+ */
37
+ export declare function buildEventToNodeMap(canvas: ExtendedCanvas | null): Map<string, string>;
38
+ /**
39
+ * Debug helper to show which events map to which nodes.
40
+ *
41
+ * @param canvas - The canvas to analyze
42
+ * @returns Human-readable mapping information
43
+ */
44
+ export declare function debugEventMapping(canvas: ExtendedCanvas | null): string;
45
+ //# sourceMappingURL=EventNodeMapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventNodeMapper.d.ts","sourceRoot":"","sources":["../../../src/panels/execution-viewer/EventNodeMapper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,GAAG,IAAI,GAC5B,MAAM,GAAG,IAAI,CA4Cf;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,GAAG,IAAI,GAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBrB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,MAAM,CA2BvE"}