@principal-ai/principal-view-react 0.7.14 → 0.7.16

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.
Files changed (138) hide show
  1. package/README.md +9 -24
  2. package/dist/components/ConfigurationSelector.d.ts +1 -1
  3. package/dist/components/ConfigurationSelector.d.ts.map +1 -1
  4. package/dist/components/ConfigurationSelector.js +6 -10
  5. package/dist/components/ConfigurationSelector.js.map +1 -1
  6. package/dist/components/EdgeInfoPanel.d.ts +1 -1
  7. package/dist/components/EdgeInfoPanel.d.ts.map +1 -1
  8. package/dist/components/EdgeInfoPanel.js +14 -18
  9. package/dist/components/EdgeInfoPanel.js.map +1 -1
  10. package/dist/components/GraphRenderer.d.ts +1 -1
  11. package/dist/components/GraphRenderer.d.ts.map +1 -1
  12. package/dist/components/GraphRenderer.js +89 -92
  13. package/dist/components/GraphRenderer.js.map +1 -1
  14. package/dist/components/NarrativeRenderer.d.ts +19 -0
  15. package/dist/components/NarrativeRenderer.d.ts.map +1 -0
  16. package/dist/components/NarrativeRenderer.js +103 -0
  17. package/dist/components/NarrativeRenderer.js.map +1 -0
  18. package/dist/components/NodeInfoPanel.d.ts +1 -1
  19. package/dist/components/NodeInfoPanel.d.ts.map +1 -1
  20. package/dist/components/NodeInfoPanel.js +33 -37
  21. package/dist/components/NodeInfoPanel.js.map +1 -1
  22. package/dist/components/NodeTooltip.js +15 -19
  23. package/dist/components/NodeTooltip.js.map +1 -1
  24. package/dist/components/SelectionSidebar.d.ts +1 -1
  25. package/dist/components/SelectionSidebar.d.ts.map +1 -1
  26. package/dist/components/SelectionSidebar.js +26 -30
  27. package/dist/components/SelectionSidebar.js.map +1 -1
  28. package/dist/components/TestEventPanel.d.ts +6 -0
  29. package/dist/components/TestEventPanel.d.ts.map +1 -1
  30. package/dist/components/TestEventPanel.js +157 -160
  31. package/dist/components/TestEventPanel.js.map +1 -1
  32. package/dist/edges/CustomEdge.d.ts +1 -1
  33. package/dist/edges/CustomEdge.d.ts.map +1 -1
  34. package/dist/edges/CustomEdge.js +18 -22
  35. package/dist/edges/CustomEdge.js.map +1 -1
  36. package/dist/edges/GenericEdge.d.ts +1 -1
  37. package/dist/edges/GenericEdge.d.ts.map +1 -1
  38. package/dist/edges/GenericEdge.js +3 -7
  39. package/dist/edges/GenericEdge.js.map +1 -1
  40. package/dist/hooks/usePathBasedEvents.d.ts +1 -1
  41. package/dist/hooks/usePathBasedEvents.d.ts.map +1 -1
  42. package/dist/hooks/usePathBasedEvents.js +14 -18
  43. package/dist/hooks/usePathBasedEvents.js.map +1 -1
  44. package/dist/index.d.ts +1 -5
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +12 -33
  47. package/dist/index.js.map +1 -1
  48. package/dist/nodes/CustomNode.d.ts +1 -1
  49. package/dist/nodes/CustomNode.d.ts.map +1 -1
  50. package/dist/nodes/CustomNode.js +22 -26
  51. package/dist/nodes/CustomNode.js.map +1 -1
  52. package/dist/nodes/GenericNode.d.ts +1 -1
  53. package/dist/nodes/GenericNode.d.ts.map +1 -1
  54. package/dist/nodes/GenericNode.js +4 -8
  55. package/dist/nodes/GenericNode.js.map +1 -1
  56. package/dist/utils/animationMapping.d.ts +1 -1
  57. package/dist/utils/animationMapping.d.ts.map +1 -1
  58. package/dist/utils/animationMapping.js +6 -13
  59. package/dist/utils/animationMapping.js.map +1 -1
  60. package/dist/utils/graphConverter.d.ts +1 -1
  61. package/dist/utils/graphConverter.d.ts.map +1 -1
  62. package/dist/utils/graphConverter.js +4 -8
  63. package/dist/utils/graphConverter.js.map +1 -1
  64. package/dist/utils/iconResolver.js +7 -45
  65. package/dist/utils/iconResolver.js.map +1 -1
  66. package/dist/utils/narrative-converter.d.ts +45 -0
  67. package/dist/utils/narrative-converter.d.ts.map +1 -0
  68. package/dist/utils/narrative-converter.js +113 -0
  69. package/dist/utils/narrative-converter.js.map +1 -0
  70. package/dist/utils/narrative-loader.d.ts +53 -0
  71. package/dist/utils/narrative-loader.d.ts.map +1 -0
  72. package/dist/utils/narrative-loader.js +163 -0
  73. package/dist/utils/narrative-loader.js.map +1 -0
  74. package/package.json +22 -25
  75. package/src/components/ConfigurationSelector.tsx +1 -1
  76. package/src/components/EdgeInfoPanel.tsx +1 -1
  77. package/src/components/GraphRenderer.test.tsx +1 -1
  78. package/src/components/GraphRenderer.tsx +2 -2
  79. package/src/components/NarrativeRenderer.tsx +171 -0
  80. package/src/components/NodeInfoPanel.tsx +1 -1
  81. package/src/components/NodeTooltip.tsx +3 -3
  82. package/src/components/PendingChanges.test.tsx +1 -1
  83. package/src/components/SelectionSidebar.tsx +1 -1
  84. package/src/components/TestEventPanel.tsx +145 -121
  85. package/src/edges/CustomEdge.tsx +1 -1
  86. package/src/edges/GenericEdge.tsx +1 -1
  87. package/src/hooks/usePathBasedEvents.ts +1 -1
  88. package/src/index.ts +1 -7
  89. package/src/nodes/CustomNode.tsx +1 -1
  90. package/src/nodes/GenericNode.tsx +1 -1
  91. package/src/stories/AnimationWorkshop.stories.tsx +1 -1
  92. package/src/stories/CanvasEdgeTypes.stories.tsx +1 -1
  93. package/src/stories/CanvasNodeTypes.stories.tsx +1 -1
  94. package/src/stories/ColorPriority.stories.tsx +1 -1
  95. package/src/stories/EventDrivenAnimations.stories.tsx +1 -1
  96. package/src/stories/GraphRenderer.stories.tsx +1 -1
  97. package/src/stories/Introduction.mdx +4 -21
  98. package/src/stories/MultiConfig.stories.tsx +1 -1
  99. package/src/stories/MultiDirectionalConnections.stories.tsx +1 -1
  100. package/src/stories/NodeFieldsAudit.stories.tsx +1 -1
  101. package/src/stories/NodeShapes.stories.tsx +1 -1
  102. package/src/stories/OtelComponents.stories.tsx +1 -1
  103. package/src/stories/RealTestExecution.stories.tsx +111 -1
  104. package/src/stories/TraceViewer.stories.tsx +1 -1
  105. package/src/stories/ValidatedExecution.stories.tsx +1 -1
  106. package/src/stories/data/graph-converter-test-execution.json +204 -326
  107. package/src/stories/data/graph-converter-test.narrative.json +106 -0
  108. package/src/stories/data/graph-converter-validated-execution.json +6 -6
  109. package/src/utils/animationMapping.ts +1 -1
  110. package/src/utils/graphConverter.ts +1 -1
  111. package/src/utils/narrative-converter.ts +147 -0
  112. package/src/utils/narrative-loader.ts +172 -0
  113. package/dist/components/EventLog.d.ts +0 -20
  114. package/dist/components/EventLog.d.ts.map +0 -1
  115. package/dist/components/EventLog.js +0 -13
  116. package/dist/components/EventLog.js.map +0 -1
  117. package/dist/components/EventLog.test.d.ts +0 -2
  118. package/dist/components/EventLog.test.d.ts.map +0 -1
  119. package/dist/components/EventLog.test.js +0 -73
  120. package/dist/components/EventLog.test.js.map +0 -1
  121. package/dist/components/GraphRenderer.test.d.ts +0 -2
  122. package/dist/components/GraphRenderer.test.d.ts.map +0 -1
  123. package/dist/components/GraphRenderer.test.js +0 -88
  124. package/dist/components/GraphRenderer.test.js.map +0 -1
  125. package/dist/components/LayerPanel.d.ts +0 -31
  126. package/dist/components/LayerPanel.d.ts.map +0 -1
  127. package/dist/components/LayerPanel.js +0 -207
  128. package/dist/components/LayerPanel.js.map +0 -1
  129. package/dist/components/MetricsDashboard.d.ts +0 -14
  130. package/dist/components/MetricsDashboard.d.ts.map +0 -1
  131. package/dist/components/MetricsDashboard.js +0 -13
  132. package/dist/components/MetricsDashboard.js.map +0 -1
  133. package/src/components/EventLog.test.tsx +0 -85
  134. package/src/components/EventLog.tsx +0 -51
  135. package/src/components/MetricsDashboard.tsx +0 -40
  136. package/src/stories/EventLog.stories.tsx +0 -161
  137. package/src/stories/IndustryThemes.stories.tsx +0 -483
  138. package/src/stories/MetricsDashboard.stories.tsx +0 -227
@@ -1,347 +1,225 @@
1
- {
2
- "metadata": {
3
- "exportedAt": "2026-01-11T00:32:48.199Z",
4
- "framework": "bun",
5
- "spanCount": 3,
6
- "logCount": 8
7
- },
8
- "spans": [
9
- {
10
- "id": "span-1",
11
- "name": "should convert simple config to nodes and edges",
12
- "startTime": 1768091568197,
13
- "attributes": {
14
- "span.kind": "test.case",
15
- "test.name": "should convert simple config to nodes and edges",
16
- "test.framework": "bun",
17
- "test.file": "GraphConverter.test.ts",
18
- "test.suite": "GraphConverter",
19
- "test.result": "pass"
20
- },
21
- "events": [
22
- {
23
- "time": 1768091568197,
24
- "name": "setup.started",
25
- "attributes": {
26
- "code.filepath": "GraphConverter.test.ts",
27
- "code.lineno": 36,
28
- "description": "Creating test configuration with 2 nodes and 1 edge"
29
- }
30
- },
31
- {
32
- "time": 1768091568197,
33
- "name": "setup.complete",
34
- "attributes": {
35
- "code.filepath": "GraphConverter.test.ts",
36
- "code.lineno": 84,
37
- "config.nodes": 2,
38
- "config.edges": 1
39
- }
40
- },
41
- {
42
- "time": 1768091568197,
43
- "name": "execution.started",
44
- "attributes": {
45
- "code.filepath": "GraphConverter.ts",
46
- "code.lineno": 15,
47
- "action": "GraphConverter.configToGraph()"
48
- }
49
- },
50
- {
51
- "time": 1768091568197,
52
- "name": "execution.complete",
53
- "attributes": {
54
- "code.filepath": "GraphConverter.ts",
55
- "code.lineno": 43,
56
- "result.nodes.count": 2,
57
- "result.edges.count": 1
58
- }
59
- },
60
- {
61
- "time": 1768091568197,
62
- "name": "assertion.started",
63
- "attributes": {
64
- "code.filepath": "GraphConverter.test.ts",
65
- "code.lineno": 133,
66
- "assertions": "Verifying nodes and edges structure"
67
- }
68
- },
69
- {
70
- "time": 1768091568198,
71
- "name": "assertion.complete",
72
- "attributes": {
73
- "code.filepath": "GraphConverter.test.ts",
74
- "code.lineno": 163,
75
- "assertions.passed": 11,
76
- "assertions.failed": 0
77
- }
78
- }
79
- ],
80
- "status": "OK",
81
- "endTime": 1768091568198,
82
- "duration": 1
1
+ [
2
+ {
3
+ "id": "span-1",
4
+ "name": "should convert simple config to nodes and edges",
5
+ "startTime": 1768578318249,
6
+ "attributes": {
7
+ "span.kind": "test.case",
8
+ "test.name": "should convert simple config to nodes and edges",
9
+ "test.framework": "bun",
10
+ "test.file": "GraphConverter.test.ts",
11
+ "test.suite": "GraphConverter",
12
+ "test.result": "pass"
83
13
  },
84
- {
85
- "id": "span-2",
86
- "name": "should extract manual positions from node types",
87
- "startTime": 1768091568198,
88
- "attributes": {
89
- "span.kind": "test.case",
90
- "test.name": "should extract manual positions from node types",
91
- "test.framework": "bun",
92
- "test.file": "GraphConverter.test.ts",
93
- "test.suite": "GraphConverter",
94
- "test.result": "pass"
14
+ "events": [
15
+ {
16
+ "time": 1768578318249,
17
+ "name": "setup.started",
18
+ "attributes": {
19
+ "code.filepath": "GraphConverter.test.ts",
20
+ "code.lineno": 28,
21
+ "description": "Creating test configuration with 2 nodes and 1 edge"
22
+ }
95
23
  },
96
- "events": [
97
- {
98
- "time": 1768091568198,
99
- "name": "setup.started",
100
- "attributes": {
101
- "code.filepath": "GraphConverter.test.ts",
102
- "code.lineno": 217,
103
- "description": "Creating config with manual node positions"
104
- }
105
- },
106
- {
107
- "time": 1768091568198,
108
- "name": "setup.complete",
109
- "attributes": {
110
- "code.filepath": "GraphConverter.test.ts",
111
- "code.lineno": 244,
112
- "config.nodes": 2,
113
- "positions.defined": true
114
- }
115
- },
116
- {
117
- "time": 1768091568198,
118
- "name": "execution.started",
119
- "attributes": {
120
- "code.filepath": "GraphConverter.ts",
121
- "code.lineno": 15,
122
- "action": "GraphConverter.configToGraph()"
123
- }
124
- },
125
- {
126
- "time": 1768091568198,
127
- "name": "execution.complete",
128
- "attributes": {
129
- "code.filepath": "GraphConverter.ts",
130
- "code.lineno": 43,
131
- "result.nodes.count": 2
132
- }
133
- },
134
- {
135
- "time": 1768091568198,
136
- "name": "assertion.started",
137
- "attributes": {
138
- "code.filepath": "GraphConverter.test.ts",
139
- "code.lineno": 263,
140
- "assertions": "Verifying positions preserved"
141
- }
142
- },
143
- {
144
- "time": 1768091568198,
145
- "name": "assertion.complete",
146
- "attributes": {
147
- "code.filepath": "GraphConverter.test.ts",
148
- "code.lineno": 270,
149
- "assertions.passed": 2,
150
- "assertions.failed": 0
151
- }
24
+ {
25
+ "time": 1768578318249,
26
+ "name": "setup.complete",
27
+ "attributes": {
28
+ "code.filepath": "GraphConverter.test.ts",
29
+ "code.lineno": 68,
30
+ "config.nodes": 2,
31
+ "config.edges": 1
152
32
  }
153
- ],
154
- "status": "OK",
155
- "endTime": 1768091568198,
156
- "duration": 0
157
- },
158
- {
159
- "id": "span-3",
160
- "name": "should handle nodes without positions",
161
- "startTime": 1768091568198,
162
- "attributes": {
163
- "span.kind": "test.case",
164
- "test.name": "should handle nodes without positions",
165
- "test.framework": "bun",
166
- "test.file": "GraphConverter.test.ts",
167
- "test.suite": "GraphConverter",
168
- "test.result": "pass"
169
33
  },
170
- "events": [
171
- {
172
- "time": 1768091568198,
173
- "name": "setup.started",
174
- "attributes": {
175
- "code.filepath": "GraphConverter.test.ts",
176
- "code.lineno": 294,
177
- "description": "Creating config without positions"
178
- }
179
- },
180
- {
181
- "time": 1768091568198,
182
- "name": "setup.complete",
183
- "attributes": {
184
- "code.filepath": "GraphConverter.test.ts",
185
- "code.lineno": 314,
186
- "config.nodes": 1,
187
- "positions.defined": false
188
- }
189
- },
190
- {
191
- "time": 1768091568198,
192
- "name": "execution.started",
193
- "attributes": {
194
- "code.filepath": "GraphConverter.ts",
195
- "code.lineno": 15,
196
- "action": "GraphConverter.configToGraph()"
197
- }
198
- },
199
- {
200
- "time": 1768091568198,
201
- "name": "execution.complete",
202
- "attributes": {
203
- "code.filepath": "GraphConverter.ts",
204
- "code.lineno": 43,
205
- "result.nodes.count": 1
206
- }
207
- },
208
- {
209
- "time": 1768091568198,
210
- "name": "assertion.started",
211
- "attributes": {
212
- "code.filepath": "GraphConverter.test.ts",
213
- "code.lineno": 333,
214
- "assertions": "Verifying position is undefined"
215
- }
216
- },
217
- {
218
- "time": 1768091568198,
219
- "name": "assertion.complete",
220
- "attributes": {
221
- "code.filepath": "GraphConverter.test.ts",
222
- "code.lineno": 339,
223
- "assertions.passed": 1,
224
- "assertions.failed": 0
225
- }
34
+ {
35
+ "time": 1768578318249,
36
+ "name": "execution.started",
37
+ "attributes": {
38
+ "code.filepath": "GraphConverter.ts",
39
+ "code.lineno": 15,
40
+ "action": "GraphConverter.configToGraph()"
226
41
  }
227
- ],
228
- "status": "OK",
229
- "endTime": 1768091568198,
230
- "duration": 0
231
- }
232
- ],
233
- "logs": [
234
- {
235
- "timestamp": 1768091568197,
236
- "severity": "TRACE",
237
- "body": "Entering test case for simple config conversion",
238
- "resource": {
239
- "service.name": "graph-converter-service",
240
- "service.version": "1.0.0"
241
42
  },
242
- "traceId": "span-1",
243
- "spanId": "span-1"
244
- },
245
- {
246
- "timestamp": 1768091568197,
247
- "severity": "INFO",
248
- "body": "Initializing test configuration",
249
- "resource": {
250
- "service.name": "graph-converter-service"
43
+ {
44
+ "time": 1768578318249,
45
+ "name": "execution.complete",
46
+ "attributes": {
47
+ "code.filepath": "GraphConverter.ts",
48
+ "code.lineno": 43,
49
+ "result.nodes.count": 2,
50
+ "result.edges.count": 1
51
+ }
251
52
  },
252
- "attributes": {
253
- "config.nodeCount": 2,
254
- "config.edgeCount": 1
53
+ {
54
+ "time": 1768578318249,
55
+ "name": "assertion.started",
56
+ "attributes": {
57
+ "code.filepath": "GraphConverter.test.ts",
58
+ "code.lineno": 91,
59
+ "assertions": "Verifying nodes and edges structure"
60
+ }
255
61
  },
256
- "traceId": "span-1",
257
- "spanId": "span-1"
62
+ {
63
+ "time": 1768578318249,
64
+ "name": "assertion.complete",
65
+ "attributes": {
66
+ "code.filepath": "GraphConverter.test.ts",
67
+ "code.lineno": 114,
68
+ "assertions.passed": 11,
69
+ "assertions.failed": 0
70
+ }
71
+ }
72
+ ],
73
+ "status": "OK",
74
+ "endTime": 1768578318249,
75
+ "duration": 0
76
+ },
77
+ {
78
+ "id": "span-2",
79
+ "name": "should extract manual positions from node types",
80
+ "startTime": 1768578318249,
81
+ "attributes": {
82
+ "span.kind": "test.case",
83
+ "test.name": "should extract manual positions from node types",
84
+ "test.framework": "bun",
85
+ "test.file": "GraphConverter.test.ts",
86
+ "test.suite": "GraphConverter",
87
+ "test.result": "pass"
258
88
  },
259
- {
260
- "timestamp": 1768091568197,
261
- "severity": "DEBUG",
262
- "body": {
263
- "phase": "setup-complete",
264
- "nodeTypes": [
265
- "node-a",
266
- "node-b"
267
- ],
268
- "edgeTypes": [
269
- "connection"
270
- ]
271
- },
272
- "resource": {
273
- "service.name": "graph-converter-service"
89
+ "events": [
90
+ {
91
+ "time": 1768578318249,
92
+ "name": "setup.started",
93
+ "attributes": {
94
+ "code.filepath": "GraphConverter.test.ts",
95
+ "code.lineno": 138,
96
+ "description": "Creating config with manual node positions"
97
+ }
274
98
  },
275
- "traceId": "span-1",
276
- "spanId": "span-1"
277
- },
278
- {
279
- "timestamp": 1768091568197,
280
- "severity": "INFO",
281
- "body": "Starting graph conversion process",
282
- "resource": {
283
- "service.name": "graph-converter-service"
99
+ {
100
+ "time": 1768578318249,
101
+ "name": "setup.complete",
102
+ "attributes": {
103
+ "code.filepath": "GraphConverter.test.ts",
104
+ "code.lineno": 165,
105
+ "config.nodes": 2,
106
+ "positions.defined": true
107
+ }
284
108
  },
285
- "attributes": {
286
- "operation": "configToGraph",
287
- "inputSize.bytes": 387
109
+ {
110
+ "time": 1768578318249,
111
+ "name": "execution.started",
112
+ "attributes": {
113
+ "code.filepath": "GraphConverter.ts",
114
+ "code.lineno": 15,
115
+ "action": "GraphConverter.configToGraph()"
116
+ }
288
117
  },
289
- "traceId": "span-1",
290
- "spanId": "span-1"
291
- },
292
- {
293
- "timestamp": 1768091568197,
294
- "severity": "DEBUG",
295
- "body": "Conversion completed successfully",
296
- "resource": {
297
- "service.name": "graph-converter-service"
118
+ {
119
+ "time": 1768578318249,
120
+ "name": "execution.complete",
121
+ "attributes": {
122
+ "code.filepath": "GraphConverter.ts",
123
+ "code.lineno": 43,
124
+ "result.nodes.count": 2
125
+ }
298
126
  },
299
- "attributes": {
300
- "output.nodeCount": 2,
301
- "output.edgeCount": 1,
302
- "processingTime.ms": 5
127
+ {
128
+ "time": 1768578318249,
129
+ "name": "assertion.started",
130
+ "attributes": {
131
+ "code.filepath": "GraphConverter.test.ts",
132
+ "code.lineno": 184,
133
+ "assertions": "Verifying positions preserved"
134
+ }
303
135
  },
304
- "traceId": "span-1",
305
- "spanId": "span-1"
136
+ {
137
+ "time": 1768578318249,
138
+ "name": "assertion.complete",
139
+ "attributes": {
140
+ "code.filepath": "GraphConverter.test.ts",
141
+ "code.lineno": 191,
142
+ "assertions.passed": 2,
143
+ "assertions.failed": 0
144
+ }
145
+ }
146
+ ],
147
+ "status": "OK",
148
+ "endTime": 1768578318249,
149
+ "duration": 0
150
+ },
151
+ {
152
+ "id": "span-3",
153
+ "name": "should handle nodes without positions",
154
+ "startTime": 1768578318249,
155
+ "attributes": {
156
+ "span.kind": "test.case",
157
+ "test.name": "should handle nodes without positions",
158
+ "test.framework": "bun",
159
+ "test.file": "GraphConverter.test.ts",
160
+ "test.suite": "GraphConverter",
161
+ "test.result": "pass"
306
162
  },
307
- {
308
- "timestamp": 1768091568197,
309
- "severity": "INFO",
310
- "body": "Running assertions on converted graph",
311
- "resource": {
312
- "service.name": "graph-converter-service"
163
+ "events": [
164
+ {
165
+ "time": 1768578318249,
166
+ "name": "setup.started",
167
+ "attributes": {
168
+ "code.filepath": "GraphConverter.test.ts",
169
+ "code.lineno": 215,
170
+ "description": "Creating config without positions"
171
+ }
313
172
  },
314
- "attributes": {
315
- "totalAssertions": 11
173
+ {
174
+ "time": 1768578318249,
175
+ "name": "setup.complete",
176
+ "attributes": {
177
+ "code.filepath": "GraphConverter.test.ts",
178
+ "code.lineno": 235,
179
+ "config.nodes": 1,
180
+ "positions.defined": false
181
+ }
316
182
  },
317
- "traceId": "span-1",
318
- "spanId": "span-1"
319
- },
320
- {
321
- "timestamp": 1768091568198,
322
- "severity": "INFO",
323
- "body": "All assertions passed - test successful",
324
- "resource": {
325
- "service.name": "graph-converter-service"
183
+ {
184
+ "time": 1768578318249,
185
+ "name": "execution.started",
186
+ "attributes": {
187
+ "code.filepath": "GraphConverter.ts",
188
+ "code.lineno": 15,
189
+ "action": "GraphConverter.configToGraph()"
190
+ }
326
191
  },
327
- "attributes": {
328
- "test.status": "passed",
329
- "test.duration.ms": 1
192
+ {
193
+ "time": 1768578318249,
194
+ "name": "execution.complete",
195
+ "attributes": {
196
+ "code.filepath": "GraphConverter.ts",
197
+ "code.lineno": 43,
198
+ "result.nodes.count": 1
199
+ }
330
200
  },
331
- "traceId": "span-1",
332
- "spanId": "span-1"
333
- },
334
- {
335
- "timestamp": 1768091568198,
336
- "severity": "DEBUG",
337
- "body": "Test cleanup completed",
338
- "resource": {
339
- "service.name": "test-cleanup-service",
340
- "cleanup.type": "post-test"
201
+ {
202
+ "time": 1768578318249,
203
+ "name": "assertion.started",
204
+ "attributes": {
205
+ "code.filepath": "GraphConverter.test.ts",
206
+ "code.lineno": 254,
207
+ "assertions": "Verifying position is undefined"
208
+ }
341
209
  },
342
- "attributes": {
343
- "test.name": "should convert simple config to nodes and edges"
210
+ {
211
+ "time": 1768578318249,
212
+ "name": "assertion.complete",
213
+ "attributes": {
214
+ "code.filepath": "GraphConverter.test.ts",
215
+ "code.lineno": 260,
216
+ "assertions.passed": 1,
217
+ "assertions.failed": 0
218
+ }
344
219
  }
345
- }
346
- ]
347
- }
220
+ ],
221
+ "status": "OK",
222
+ "endTime": 1768578318249,
223
+ "duration": 0
224
+ }
225
+ ]
@@ -0,0 +1,106 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "canvas": "graph-converter-test.otel.canvas",
4
+ "name": "Graph Converter Test Narrative",
5
+ "description": "Human-readable narrative for graph converter test execution",
6
+ "mode": "span-tree",
7
+ "scenarioSelection": "first-match",
8
+ "showLogsPerSpan": true,
9
+ "scenarios": [
10
+ {
11
+ "id": "test-failed",
12
+ "priority": 1,
13
+ "description": "Test failed with assertion failures",
14
+ "condition": {
15
+ "requires": ["assertion.complete"],
16
+ "assertions": {
17
+ "assertions.failed": { "$gt": 0 }
18
+ }
19
+ },
20
+ "template": {
21
+ "introduction": "❌ Graph Converter Test - FAILED\n{'━'.repeat(50)}",
22
+ "span": "→ {span.name}",
23
+ "children": "recurse",
24
+ "events": {
25
+ "setup.started": " 🔧 Setting up test: {description ? description : 'test configuration'}",
26
+ "setup.complete": " ✅ Setup complete\n • Nodes: {config.nodes ? config.nodes : 'N/A'}\n • Edges: {config.edges ? config.edges : 'N/A'}\n • Positions: {positions.defined === true ? 'defined' : 'not defined'}",
27
+ "execution.started": " 🔄 Executing: {action}",
28
+ "execution.complete": " ✅ Execution complete\n • Generated nodes: {result.nodes.count}\n • Generated edges: {result.edges.count ? result.edges.count : 'N/A'}",
29
+ "assertion.started": " 🔍 Verifying: {assertions}",
30
+ "assertion.complete": " ❌ Assertions: {assertions.passed} passed, {assertions.failed} failed"
31
+ },
32
+ "logs": {
33
+ "error": " ❌ {log.body}",
34
+ "warn": " ⚠️ {log.body}",
35
+ "info": " ℹ️ {log.body}",
36
+ "debug": " 🔍 {log.body}"
37
+ },
38
+ "summary": "{'━'.repeat(50)}\n\n❌ TEST FAILED\n\nAssertion Results:\n • Passed: {assertions.passed}\n • Failed: {assertions.failed}"
39
+ }
40
+ },
41
+ {
42
+ "id": "test-passed",
43
+ "priority": 2,
44
+ "description": "Test passed all assertions",
45
+ "condition": {
46
+ "requires": ["assertion.complete"],
47
+ "assertions": {
48
+ "assertions.failed": { "$eq": 0 }
49
+ }
50
+ },
51
+ "template": {
52
+ "introduction": "✅ Graph Converter Test - PASSED\n{'━'.repeat(50)}",
53
+ "span": "→ {span.name}",
54
+ "children": "recurse",
55
+ "events": {
56
+ "setup.started": " 🔧 Setting up test: {description ? description : 'test configuration'}",
57
+ "setup.complete": " ✅ Setup complete\n • Nodes: {config.nodes ? config.nodes : 'N/A'}\n • Edges: {config.edges ? config.edges : 'N/A'}\n • Positions: {positions.defined === true ? 'defined' : 'not defined'}",
58
+ "execution.started": " 🔄 Executing: {action}",
59
+ "execution.complete": " ✅ Execution complete\n • Generated nodes: {result.nodes.count}\n • Generated edges: {result.edges.count ? result.edges.count : 'N/A'}",
60
+ "assertion.started": " 🔍 Verifying: {assertions}",
61
+ "assertion.complete": " ✅ All {assertions.passed} assertions passed!"
62
+ },
63
+ "logs": {
64
+ "error": " ❌ {log.body}",
65
+ "warn": " ⚠️ {log.body}",
66
+ "info": " ℹ️ {log.body}",
67
+ "debug": " 🔍 {log.body}"
68
+ },
69
+ "summary": "{'━'.repeat(50)}\n\n✅ TEST PASSED\n\nAll {assertions.passed} assertions passed successfully.\n\nResults:\n • Nodes generated: {result.nodes.count}\n • Edges generated: {result.edges.count ? result.edges.count : 'N/A'}"
70
+ }
71
+ },
72
+ {
73
+ "id": "default",
74
+ "priority": 99,
75
+ "description": "Default fallback scenario",
76
+ "condition": {
77
+ "default": true
78
+ },
79
+ "template": {
80
+ "introduction": "📋 Graph Converter Test\n{'━'.repeat(50)}",
81
+ "span": "→ {span.name}",
82
+ "children": "recurse",
83
+ "events": {
84
+ "setup.started": " 🔧 Setup started",
85
+ "setup.complete": " ✅ Setup complete",
86
+ "execution.started": " 🔄 Execution started: {action}",
87
+ "execution.complete": " ✅ Execution complete",
88
+ "assertion.started": " 🔍 Assertions started",
89
+ "assertion.complete": " ✅ Assertions complete"
90
+ },
91
+ "logs": {
92
+ "error": " ❌ {log.body}",
93
+ "warn": " ⚠️ {log.body}",
94
+ "info": " ℹ️ {log.body}",
95
+ "debug": " 🔍 {log.body}"
96
+ },
97
+ "summary": "{'━'.repeat(50)}\n\nTest execution completed."
98
+ }
99
+ }
100
+ ],
101
+ "formatting": {
102
+ "indentSize": 2,
103
+ "showTimestamps": false,
104
+ "emptyLinesBetweenSections": 1
105
+ }
106
+ }