@principal-ai/subsystems-core 0.29.0 → 0.31.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.
Files changed (558) hide show
  1. package/README.md +15 -110
  2. package/dist/index.d.ts +7 -75
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +21 -205
  5. package/dist/index.js.map +1 -1
  6. package/dist/node.d.ts +5 -61
  7. package/dist/node.d.ts.map +1 -1
  8. package/dist/node.js +9 -131
  9. package/dist/node.js.map +1 -1
  10. package/dist/types/index.d.ts +3 -348
  11. package/dist/types/index.d.ts.map +1 -1
  12. package/dist/types/index.js +3 -19
  13. package/dist/types/index.js.map +1 -1
  14. package/dist/types/subsystem-model.d.ts +34 -3
  15. package/dist/types/subsystem-model.d.ts.map +1 -1
  16. package/dist/types/subsystem-model.js.map +1 -1
  17. package/package.json +7 -24
  18. package/schemas/subsystem-model.schema.json +52 -1
  19. package/src/index.ts +7 -580
  20. package/src/node.ts +21 -262
  21. package/src/types/index.ts +3 -456
  22. package/src/types/subsystem-model.ts +39 -3
  23. package/dist/ConfigurationLoader.d.ts +0 -76
  24. package/dist/ConfigurationLoader.d.ts.map +0 -1
  25. package/dist/ConfigurationLoader.js +0 -148
  26. package/dist/ConfigurationLoader.js.map +0 -1
  27. package/dist/ConfigurationValidator.d.ts +0 -31
  28. package/dist/ConfigurationValidator.d.ts.map +0 -1
  29. package/dist/ConfigurationValidator.js +0 -239
  30. package/dist/ConfigurationValidator.js.map +0 -1
  31. package/dist/EventProcessor.d.ts +0 -49
  32. package/dist/EventProcessor.d.ts.map +0 -1
  33. package/dist/EventProcessor.js +0 -220
  34. package/dist/EventProcessor.js.map +0 -1
  35. package/dist/EventRecorderService.d.ts +0 -305
  36. package/dist/EventRecorderService.d.ts.map +0 -1
  37. package/dist/EventRecorderService.js +0 -467
  38. package/dist/EventRecorderService.js.map +0 -1
  39. package/dist/LibraryLoader.d.ts +0 -65
  40. package/dist/LibraryLoader.d.ts.map +0 -1
  41. package/dist/LibraryLoader.js +0 -197
  42. package/dist/LibraryLoader.js.map +0 -1
  43. package/dist/PathBasedEventProcessor.d.ts +0 -77
  44. package/dist/PathBasedEventProcessor.d.ts.map +0 -1
  45. package/dist/PathBasedEventProcessor.js +0 -136
  46. package/dist/PathBasedEventProcessor.js.map +0 -1
  47. package/dist/SessionManager.d.ts +0 -194
  48. package/dist/SessionManager.d.ts.map +0 -1
  49. package/dist/SessionManager.js +0 -302
  50. package/dist/SessionManager.js.map +0 -1
  51. package/dist/ValidationEngine.d.ts +0 -31
  52. package/dist/ValidationEngine.d.ts.map +0 -1
  53. package/dist/ValidationEngine.js +0 -162
  54. package/dist/ValidationEngine.js.map +0 -1
  55. package/dist/auxiliary/AuxiliaryManifestValidator.d.ts +0 -41
  56. package/dist/auxiliary/AuxiliaryManifestValidator.d.ts.map +0 -1
  57. package/dist/auxiliary/AuxiliaryManifestValidator.js +0 -100
  58. package/dist/auxiliary/AuxiliaryManifestValidator.js.map +0 -1
  59. package/dist/auxiliary/index.d.ts +0 -9
  60. package/dist/auxiliary/index.d.ts.map +0 -1
  61. package/dist/auxiliary/index.js +0 -14
  62. package/dist/auxiliary/index.js.map +0 -1
  63. package/dist/auxiliary/validateAreaScopeDisjoint.d.ts +0 -24
  64. package/dist/auxiliary/validateAreaScopeDisjoint.d.ts.map +0 -1
  65. package/dist/auxiliary/validateAreaScopeDisjoint.js +0 -61
  66. package/dist/auxiliary/validateAreaScopeDisjoint.js.map +0 -1
  67. package/dist/cli/codegen.d.ts +0 -41
  68. package/dist/cli/codegen.d.ts.map +0 -1
  69. package/dist/cli/codegen.js +0 -257
  70. package/dist/cli/codegen.js.map +0 -1
  71. package/dist/codegen/type-generator.d.ts +0 -123
  72. package/dist/codegen/type-generator.d.ts.map +0 -1
  73. package/dist/codegen/type-generator.js +0 -433
  74. package/dist/codegen/type-generator.js.map +0 -1
  75. package/dist/codegen/usage-example.d.ts +0 -103
  76. package/dist/codegen/usage-example.d.ts.map +0 -1
  77. package/dist/codegen/usage-example.js +0 -258
  78. package/dist/codegen/usage-example.js.map +0 -1
  79. package/dist/dashboard/DashboardValidator.d.ts +0 -85
  80. package/dist/dashboard/DashboardValidator.d.ts.map +0 -1
  81. package/dist/dashboard/DashboardValidator.js +0 -775
  82. package/dist/dashboard/DashboardValidator.js.map +0 -1
  83. package/dist/dashboard/index.d.ts +0 -6
  84. package/dist/dashboard/index.d.ts.map +0 -1
  85. package/dist/dashboard/index.js +0 -10
  86. package/dist/dashboard/index.js.map +0 -1
  87. package/dist/discovery/CanvasDiscovery.d.ts +0 -160
  88. package/dist/discovery/CanvasDiscovery.d.ts.map +0 -1
  89. package/dist/discovery/CanvasDiscovery.js +0 -865
  90. package/dist/discovery/CanvasDiscovery.js.map +0 -1
  91. package/dist/discovery/CanvasFileManifest.d.ts +0 -86
  92. package/dist/discovery/CanvasFileManifest.d.ts.map +0 -1
  93. package/dist/discovery/CanvasFileManifest.js +0 -338
  94. package/dist/discovery/CanvasFileManifest.js.map +0 -1
  95. package/dist/discovery/LibraryDiscovery.d.ts +0 -108
  96. package/dist/discovery/LibraryDiscovery.d.ts.map +0 -1
  97. package/dist/discovery/LibraryDiscovery.js +0 -263
  98. package/dist/discovery/LibraryDiscovery.js.map +0 -1
  99. package/dist/discovery/types.d.ts +0 -403
  100. package/dist/discovery/types.d.ts.map +0 -1
  101. package/dist/discovery/types.js +0 -6
  102. package/dist/discovery/types.js.map +0 -1
  103. package/dist/events/EventsCanvasValidator.d.ts +0 -139
  104. package/dist/events/EventsCanvasValidator.d.ts.map +0 -1
  105. package/dist/events/EventsCanvasValidator.js +0 -281
  106. package/dist/events/EventsCanvasValidator.js.map +0 -1
  107. package/dist/events/NamespacePathIndex.d.ts +0 -61
  108. package/dist/events/NamespacePathIndex.d.ts.map +0 -1
  109. package/dist/events/NamespacePathIndex.js +0 -74
  110. package/dist/events/NamespacePathIndex.js.map +0 -1
  111. package/dist/events/OtelEventPathsValidator.d.ts +0 -75
  112. package/dist/events/OtelEventPathsValidator.d.ts.map +0 -1
  113. package/dist/events/OtelEventPathsValidator.js +0 -126
  114. package/dist/events/OtelEventPathsValidator.js.map +0 -1
  115. package/dist/events/ScopeEventsValidator.d.ts +0 -68
  116. package/dist/events/ScopeEventsValidator.d.ts.map +0 -1
  117. package/dist/events/ScopeEventsValidator.js +0 -91
  118. package/dist/events/ScopeEventsValidator.js.map +0 -1
  119. package/dist/events/index.d.ts +0 -9
  120. package/dist/events/index.d.ts.map +0 -1
  121. package/dist/events/index.js +0 -12
  122. package/dist/events/index.js.map +0 -1
  123. package/dist/events/path-helpers.d.ts +0 -33
  124. package/dist/events/path-helpers.d.ts.map +0 -1
  125. package/dist/events/path-helpers.js +0 -59
  126. package/dist/events/path-helpers.js.map +0 -1
  127. package/dist/execution/ExecutionLoader.d.ts +0 -135
  128. package/dist/execution/ExecutionLoader.d.ts.map +0 -1
  129. package/dist/execution/ExecutionLoader.js +0 -266
  130. package/dist/execution/ExecutionLoader.js.map +0 -1
  131. package/dist/execution/ExecutionValidator.d.ts +0 -94
  132. package/dist/execution/ExecutionValidator.d.ts.map +0 -1
  133. package/dist/execution/ExecutionValidator.js +0 -503
  134. package/dist/execution/ExecutionValidator.js.map +0 -1
  135. package/dist/generated/graph-converter-execution.types.d.ts +0 -177
  136. package/dist/generated/graph-converter-execution.types.d.ts.map +0 -1
  137. package/dist/generated/graph-converter-execution.types.js +0 -12
  138. package/dist/generated/graph-converter-execution.types.js.map +0 -1
  139. package/dist/helpers/GraphInstrumentationHelper.d.ts +0 -93
  140. package/dist/helpers/GraphInstrumentationHelper.d.ts.map +0 -1
  141. package/dist/helpers/GraphInstrumentationHelper.js +0 -252
  142. package/dist/helpers/GraphInstrumentationHelper.js.map +0 -1
  143. package/dist/matchers/SpanMatcher.d.ts +0 -107
  144. package/dist/matchers/SpanMatcher.d.ts.map +0 -1
  145. package/dist/matchers/SpanMatcher.js +0 -274
  146. package/dist/matchers/SpanMatcher.js.map +0 -1
  147. package/dist/orchestration/TraceOrchestrator.d.ts +0 -71
  148. package/dist/orchestration/TraceOrchestrator.d.ts.map +0 -1
  149. package/dist/orchestration/TraceOrchestrator.js +0 -416
  150. package/dist/orchestration/TraceOrchestrator.js.map +0 -1
  151. package/dist/parsers/OtlpTraceParser.d.ts +0 -131
  152. package/dist/parsers/OtlpTraceParser.d.ts.map +0 -1
  153. package/dist/parsers/OtlpTraceParser.js +0 -310
  154. package/dist/parsers/OtlpTraceParser.js.map +0 -1
  155. package/dist/registry/CompositeRegistry.d.ts +0 -71
  156. package/dist/registry/CompositeRegistry.d.ts.map +0 -1
  157. package/dist/registry/CompositeRegistry.js +0 -113
  158. package/dist/registry/CompositeRegistry.js.map +0 -1
  159. package/dist/registry/EventRegistry.d.ts +0 -79
  160. package/dist/registry/EventRegistry.d.ts.map +0 -1
  161. package/dist/registry/EventRegistry.js +0 -165
  162. package/dist/registry/EventRegistry.js.map +0 -1
  163. package/dist/registry/LocalRegistry.d.ts +0 -111
  164. package/dist/registry/LocalRegistry.d.ts.map +0 -1
  165. package/dist/registry/LocalRegistry.js +0 -335
  166. package/dist/registry/LocalRegistry.js.map +0 -1
  167. package/dist/registry/RemoteRegistry.d.ts +0 -122
  168. package/dist/registry/RemoteRegistry.d.ts.map +0 -1
  169. package/dist/registry/RemoteRegistry.js +0 -399
  170. package/dist/registry/RemoteRegistry.js.map +0 -1
  171. package/dist/registry/VersionRegistry.d.ts +0 -51
  172. package/dist/registry/VersionRegistry.d.ts.map +0 -1
  173. package/dist/registry/VersionRegistry.js +0 -105
  174. package/dist/registry/VersionRegistry.js.map +0 -1
  175. package/dist/rules/config.d.ts +0 -57
  176. package/dist/rules/config.d.ts.map +0 -1
  177. package/dist/rules/config.js +0 -382
  178. package/dist/rules/config.js.map +0 -1
  179. package/dist/rules/engine.d.ts +0 -70
  180. package/dist/rules/engine.d.ts.map +0 -1
  181. package/dist/rules/engine.js +0 -373
  182. package/dist/rules/engine.js.map +0 -1
  183. package/dist/rules/implementations/connection-type-references.d.ts +0 -7
  184. package/dist/rules/implementations/connection-type-references.d.ts.map +0 -1
  185. package/dist/rules/implementations/connection-type-references.js +0 -107
  186. package/dist/rules/implementations/connection-type-references.js.map +0 -1
  187. package/dist/rules/implementations/dead-end-states.d.ts +0 -17
  188. package/dist/rules/implementations/dead-end-states.d.ts.map +0 -1
  189. package/dist/rules/implementations/dead-end-states.js +0 -75
  190. package/dist/rules/implementations/dead-end-states.js.map +0 -1
  191. package/dist/rules/implementations/index.d.ts +0 -23
  192. package/dist/rules/implementations/index.d.ts.map +0 -1
  193. package/dist/rules/implementations/index.js +0 -73
  194. package/dist/rules/implementations/index.js.map +0 -1
  195. package/dist/rules/implementations/minimum-node-sources.d.ts +0 -24
  196. package/dist/rules/implementations/minimum-node-sources.d.ts.map +0 -1
  197. package/dist/rules/implementations/minimum-node-sources.js +0 -59
  198. package/dist/rules/implementations/minimum-node-sources.js.map +0 -1
  199. package/dist/rules/implementations/no-unknown-fields.d.ts +0 -7
  200. package/dist/rules/implementations/no-unknown-fields.d.ts.map +0 -1
  201. package/dist/rules/implementations/no-unknown-fields.js +0 -216
  202. package/dist/rules/implementations/no-unknown-fields.js.map +0 -1
  203. package/dist/rules/implementations/orphaned-edge-types.d.ts +0 -7
  204. package/dist/rules/implementations/orphaned-edge-types.d.ts.map +0 -1
  205. package/dist/rules/implementations/orphaned-edge-types.js +0 -50
  206. package/dist/rules/implementations/orphaned-edge-types.js.map +0 -1
  207. package/dist/rules/implementations/orphaned-node-types.d.ts +0 -7
  208. package/dist/rules/implementations/orphaned-node-types.d.ts.map +0 -1
  209. package/dist/rules/implementations/orphaned-node-types.js +0 -53
  210. package/dist/rules/implementations/orphaned-node-types.js.map +0 -1
  211. package/dist/rules/implementations/required-metadata.d.ts +0 -7
  212. package/dist/rules/implementations/required-metadata.d.ts.map +0 -1
  213. package/dist/rules/implementations/required-metadata.js +0 -48
  214. package/dist/rules/implementations/required-metadata.js.map +0 -1
  215. package/dist/rules/implementations/state-transition-references.d.ts +0 -7
  216. package/dist/rules/implementations/state-transition-references.d.ts.map +0 -1
  217. package/dist/rules/implementations/state-transition-references.js +0 -138
  218. package/dist/rules/implementations/state-transition-references.js.map +0 -1
  219. package/dist/rules/implementations/unreachable-states.d.ts +0 -7
  220. package/dist/rules/implementations/unreachable-states.d.ts.map +0 -1
  221. package/dist/rules/implementations/unreachable-states.js +0 -83
  222. package/dist/rules/implementations/unreachable-states.js.map +0 -1
  223. package/dist/rules/implementations/valid-action-patterns.d.ts +0 -17
  224. package/dist/rules/implementations/valid-action-patterns.d.ts.map +0 -1
  225. package/dist/rules/implementations/valid-action-patterns.js +0 -112
  226. package/dist/rules/implementations/valid-action-patterns.js.map +0 -1
  227. package/dist/rules/implementations/valid-color-format.d.ts +0 -7
  228. package/dist/rules/implementations/valid-color-format.d.ts.map +0 -1
  229. package/dist/rules/implementations/valid-color-format.js +0 -94
  230. package/dist/rules/implementations/valid-color-format.js.map +0 -1
  231. package/dist/rules/implementations/valid-edge-types.d.ts +0 -7
  232. package/dist/rules/implementations/valid-edge-types.d.ts.map +0 -1
  233. package/dist/rules/implementations/valid-edge-types.js +0 -248
  234. package/dist/rules/implementations/valid-edge-types.js.map +0 -1
  235. package/dist/rules/implementations/valid-node-types.d.ts +0 -7
  236. package/dist/rules/implementations/valid-node-types.d.ts.map +0 -1
  237. package/dist/rules/implementations/valid-node-types.js +0 -187
  238. package/dist/rules/implementations/valid-node-types.js.map +0 -1
  239. package/dist/rules/index.d.ts +0 -28
  240. package/dist/rules/index.d.ts.map +0 -1
  241. package/dist/rules/index.js +0 -70
  242. package/dist/rules/index.js.map +0 -1
  243. package/dist/rules/types.d.ts +0 -309
  244. package/dist/rules/types.d.ts.map +0 -1
  245. package/dist/rules/types.js +0 -40
  246. package/dist/rules/types.js.map +0 -1
  247. package/dist/scopes/ScopePathIndex.d.ts +0 -56
  248. package/dist/scopes/ScopePathIndex.d.ts.map +0 -1
  249. package/dist/scopes/ScopePathIndex.js +0 -67
  250. package/dist/scopes/ScopePathIndex.js.map +0 -1
  251. package/dist/scopes/ScopesCanvasValidator.d.ts +0 -76
  252. package/dist/scopes/ScopesCanvasValidator.d.ts.map +0 -1
  253. package/dist/scopes/ScopesCanvasValidator.js +0 -221
  254. package/dist/scopes/ScopesCanvasValidator.js.map +0 -1
  255. package/dist/scopes/index.d.ts +0 -12
  256. package/dist/scopes/index.d.ts.map +0 -1
  257. package/dist/scopes/index.js +0 -30
  258. package/dist/scopes/index.js.map +0 -1
  259. package/dist/scopes/utils.d.ts +0 -85
  260. package/dist/scopes/utils.d.ts.map +0 -1
  261. package/dist/scopes/utils.js +0 -143
  262. package/dist/scopes/utils.js.map +0 -1
  263. package/dist/scopes/validateScopeNamespaceNesting.d.ts +0 -38
  264. package/dist/scopes/validateScopeNamespaceNesting.d.ts.map +0 -1
  265. package/dist/scopes/validateScopeNamespaceNesting.js +0 -69
  266. package/dist/scopes/validateScopeNamespaceNesting.js.map +0 -1
  267. package/dist/spans/index.d.ts +0 -12
  268. package/dist/spans/index.d.ts.map +0 -1
  269. package/dist/spans/index.js +0 -25
  270. package/dist/spans/index.js.map +0 -1
  271. package/dist/spans/utils.d.ts +0 -70
  272. package/dist/spans/utils.d.ts.map +0 -1
  273. package/dist/spans/utils.js +0 -205
  274. package/dist/spans/utils.js.map +0 -1
  275. package/dist/storyboard/builder.d.ts +0 -135
  276. package/dist/storyboard/builder.d.ts.map +0 -1
  277. package/dist/storyboard/builder.js +0 -235
  278. package/dist/storyboard/builder.js.map +0 -1
  279. package/dist/storyboard/index.d.ts +0 -9
  280. package/dist/storyboard/index.d.ts.map +0 -1
  281. package/dist/storyboard/index.js +0 -18
  282. package/dist/storyboard/index.js.map +0 -1
  283. package/dist/storyboard/types.d.ts +0 -101
  284. package/dist/storyboard/types.d.ts.map +0 -1
  285. package/dist/storyboard/types.js +0 -10
  286. package/dist/storyboard/types.js.map +0 -1
  287. package/dist/telemetry/coverage.d.ts +0 -92
  288. package/dist/telemetry/coverage.d.ts.map +0 -1
  289. package/dist/telemetry/coverage.js +0 -335
  290. package/dist/telemetry/coverage.js.map +0 -1
  291. package/dist/telemetry/event-validator.d.ts +0 -86
  292. package/dist/telemetry/event-validator.d.ts.map +0 -1
  293. package/dist/telemetry/event-validator.js +0 -257
  294. package/dist/telemetry/event-validator.js.map +0 -1
  295. package/dist/types/audit.d.ts +0 -236
  296. package/dist/types/audit.d.ts.map +0 -1
  297. package/dist/types/audit.js +0 -53
  298. package/dist/types/audit.js.map +0 -1
  299. package/dist/types/auxiliary.d.ts +0 -54
  300. package/dist/types/auxiliary.d.ts.map +0 -1
  301. package/dist/types/auxiliary.js +0 -27
  302. package/dist/types/auxiliary.js.map +0 -1
  303. package/dist/types/canvas-scope.d.ts +0 -156
  304. package/dist/types/canvas-scope.d.ts.map +0 -1
  305. package/dist/types/canvas-scope.js +0 -62
  306. package/dist/types/canvas-scope.js.map +0 -1
  307. package/dist/types/canvas.d.ts +0 -1138
  308. package/dist/types/canvas.d.ts.map +0 -1
  309. package/dist/types/canvas.js +0 -178
  310. package/dist/types/canvas.js.map +0 -1
  311. package/dist/types/dashboard.d.ts +0 -170
  312. package/dist/types/dashboard.d.ts.map +0 -1
  313. package/dist/types/dashboard.js +0 -14
  314. package/dist/types/dashboard.js.map +0 -1
  315. package/dist/types/library.d.ts +0 -227
  316. package/dist/types/library.d.ts.map +0 -1
  317. package/dist/types/library.js +0 -16
  318. package/dist/types/library.js.map +0 -1
  319. package/dist/types/otel.d.ts +0 -465
  320. package/dist/types/otel.d.ts.map +0 -1
  321. package/dist/types/otel.js +0 -163
  322. package/dist/types/otel.js.map +0 -1
  323. package/dist/types/path-based-config.d.ts +0 -235
  324. package/dist/types/path-based-config.d.ts.map +0 -1
  325. package/dist/types/path-based-config.js +0 -11
  326. package/dist/types/path-based-config.js.map +0 -1
  327. package/dist/types/registered-trace.d.ts +0 -337
  328. package/dist/types/registered-trace.d.ts.map +0 -1
  329. package/dist/types/registered-trace.js +0 -16
  330. package/dist/types/registered-trace.js.map +0 -1
  331. package/dist/types/resource-match.d.ts +0 -207
  332. package/dist/types/resource-match.d.ts.map +0 -1
  333. package/dist/types/resource-match.js +0 -74
  334. package/dist/types/resource-match.js.map +0 -1
  335. package/dist/types/version-registry.d.ts +0 -137
  336. package/dist/types/version-registry.d.ts.map +0 -1
  337. package/dist/types/version-registry.js +0 -10
  338. package/dist/types/version-registry.js.map +0 -1
  339. package/dist/utils/CanvasConverter.d.ts +0 -148
  340. package/dist/utils/CanvasConverter.d.ts.map +0 -1
  341. package/dist/utils/CanvasConverter.js +0 -530
  342. package/dist/utils/CanvasConverter.js.map +0 -1
  343. package/dist/utils/GraphConverter.d.ts +0 -18
  344. package/dist/utils/GraphConverter.d.ts.map +0 -1
  345. package/dist/utils/GraphConverter.js +0 -80
  346. package/dist/utils/GraphConverter.js.map +0 -1
  347. package/dist/utils/PathMatcher.d.ts +0 -55
  348. package/dist/utils/PathMatcher.d.ts.map +0 -1
  349. package/dist/utils/PathMatcher.js +0 -178
  350. package/dist/utils/PathMatcher.js.map +0 -1
  351. package/dist/utils/TraceToCanvas.d.ts +0 -83
  352. package/dist/utils/TraceToCanvas.d.ts.map +0 -1
  353. package/dist/utils/TraceToCanvas.js +0 -336
  354. package/dist/utils/TraceToCanvas.js.map +0 -1
  355. package/dist/utils/YamlParser.d.ts +0 -36
  356. package/dist/utils/YamlParser.d.ts.map +0 -1
  357. package/dist/utils/YamlParser.js +0 -92
  358. package/dist/utils/YamlParser.js.map +0 -1
  359. package/dist/utils/registeredTraceHelpers.d.ts +0 -76
  360. package/dist/utils/registeredTraceHelpers.d.ts.map +0 -1
  361. package/dist/utils/registeredTraceHelpers.js +0 -203
  362. package/dist/utils/registeredTraceHelpers.js.map +0 -1
  363. package/dist/utils/traceAggregation.d.ts +0 -25
  364. package/dist/utils/traceAggregation.d.ts.map +0 -1
  365. package/dist/utils/traceAggregation.js +0 -140
  366. package/dist/utils/traceAggregation.js.map +0 -1
  367. package/dist/validation/OtelCanvasValidator.d.ts +0 -40
  368. package/dist/validation/OtelCanvasValidator.d.ts.map +0 -1
  369. package/dist/validation/OtelCanvasValidator.js +0 -59
  370. package/dist/validation/OtelCanvasValidator.js.map +0 -1
  371. package/dist/validation/index.d.ts +0 -8
  372. package/dist/validation/index.d.ts.map +0 -1
  373. package/dist/validation/index.js +0 -13
  374. package/dist/validation/index.js.map +0 -1
  375. package/dist/validation/libraryValidation.d.ts +0 -53
  376. package/dist/validation/libraryValidation.d.ts.map +0 -1
  377. package/dist/validation/libraryValidation.js +0 -115
  378. package/dist/validation/libraryValidation.js.map +0 -1
  379. package/dist/workflow/edge-derivation.d.ts +0 -111
  380. package/dist/workflow/edge-derivation.d.ts.map +0 -1
  381. package/dist/workflow/edge-derivation.js +0 -174
  382. package/dist/workflow/edge-derivation.js.map +0 -1
  383. package/dist/workflow/edge-validation.d.ts +0 -170
  384. package/dist/workflow/edge-validation.d.ts.map +0 -1
  385. package/dist/workflow/edge-validation.js +0 -332
  386. package/dist/workflow/edge-validation.js.map +0 -1
  387. package/dist/workflow/example.d.ts +0 -11
  388. package/dist/workflow/example.d.ts.map +0 -1
  389. package/dist/workflow/example.js +0 -310
  390. package/dist/workflow/example.js.map +0 -1
  391. package/dist/workflow/index.d.ts +0 -20
  392. package/dist/workflow/index.d.ts.map +0 -1
  393. package/dist/workflow/index.js +0 -49
  394. package/dist/workflow/index.js.map +0 -1
  395. package/dist/workflow/scenario-matcher.d.ts +0 -63
  396. package/dist/workflow/scenario-matcher.d.ts.map +0 -1
  397. package/dist/workflow/scenario-matcher.js +0 -215
  398. package/dist/workflow/scenario-matcher.js.map +0 -1
  399. package/dist/workflow/template-parser.d.ts +0 -73
  400. package/dist/workflow/template-parser.d.ts.map +0 -1
  401. package/dist/workflow/template-parser.js +0 -280
  402. package/dist/workflow/template-parser.js.map +0 -1
  403. package/dist/workflow/template-renderer.d.ts +0 -45
  404. package/dist/workflow/template-renderer.d.ts.map +0 -1
  405. package/dist/workflow/template-renderer.js +0 -401
  406. package/dist/workflow/template-renderer.js.map +0 -1
  407. package/dist/workflow/types.d.ts +0 -393
  408. package/dist/workflow/types.d.ts.map +0 -1
  409. package/dist/workflow/types.js +0 -40
  410. package/dist/workflow/types.js.map +0 -1
  411. package/dist/workflow/validator.d.ts +0 -363
  412. package/dist/workflow/validator.d.ts.map +0 -1
  413. package/dist/workflow/validator.js +0 -2283
  414. package/dist/workflow/validator.js.map +0 -1
  415. package/schemas/auxiliary.manifest.schema.json +0 -56
  416. package/src/ConfigurationLoader.test.ts +0 -466
  417. package/src/ConfigurationLoader.ts +0 -184
  418. package/src/ConfigurationValidator.test.ts +0 -200
  419. package/src/ConfigurationValidator.ts +0 -273
  420. package/src/EventProcessor.test.ts +0 -405
  421. package/src/EventProcessor.ts +0 -256
  422. package/src/EventRecorderService.test.ts +0 -543
  423. package/src/EventRecorderService.ts +0 -741
  424. package/src/LibraryLoader.ts +0 -194
  425. package/src/PathBasedEventProcessor.test.ts +0 -336
  426. package/src/PathBasedEventProcessor.ts +0 -196
  427. package/src/SessionManager.test.ts +0 -424
  428. package/src/SessionManager.ts +0 -471
  429. package/src/ValidationEngine.test.ts +0 -520
  430. package/src/ValidationEngine.ts +0 -200
  431. package/src/auxiliary/AuxiliaryManifestValidator.test.ts +0 -93
  432. package/src/auxiliary/AuxiliaryManifestValidator.ts +0 -132
  433. package/src/auxiliary/index.ts +0 -18
  434. package/src/auxiliary/validateAreaScopeDisjoint.test.ts +0 -85
  435. package/src/auxiliary/validateAreaScopeDisjoint.ts +0 -72
  436. package/src/cli/codegen.ts +0 -286
  437. package/src/codegen/type-generator.test.ts +0 -219
  438. package/src/codegen/type-generator.ts +0 -560
  439. package/src/codegen/usage-example.ts +0 -357
  440. package/src/dashboard/DashboardValidator.ts +0 -904
  441. package/src/dashboard/index.ts +0 -14
  442. package/src/discovery/CanvasDiscovery.test.ts +0 -691
  443. package/src/discovery/CanvasDiscovery.ts +0 -1114
  444. package/src/discovery/CanvasFileManifest.test.ts +0 -521
  445. package/src/discovery/CanvasFileManifest.ts +0 -419
  446. package/src/discovery/LibraryDiscovery.test.ts +0 -329
  447. package/src/discovery/LibraryDiscovery.ts +0 -386
  448. package/src/discovery/types.ts +0 -453
  449. package/src/events/EventsCanvasValidator.test.ts +0 -191
  450. package/src/events/EventsCanvasValidator.ts +0 -428
  451. package/src/events/NamespacePathIndex.test.ts +0 -97
  452. package/src/events/NamespacePathIndex.ts +0 -100
  453. package/src/events/OtelEventPathsValidator.test.ts +0 -243
  454. package/src/events/OtelEventPathsValidator.ts +0 -191
  455. package/src/events/ScopeEventsValidator.test.ts +0 -173
  456. package/src/events/ScopeEventsValidator.ts +0 -158
  457. package/src/events/index.ts +0 -27
  458. package/src/events/path-helpers.ts +0 -53
  459. package/src/execution/ExecutionLoader.test.ts +0 -378
  460. package/src/execution/ExecutionLoader.ts +0 -331
  461. package/src/execution/ExecutionValidator.test.ts +0 -503
  462. package/src/execution/ExecutionValidator.ts +0 -617
  463. package/src/generated/graph-converter-execution.types.ts +0 -193
  464. package/src/helpers/GraphInstrumentationHelper.test.ts +0 -364
  465. package/src/helpers/GraphInstrumentationHelper.ts +0 -323
  466. package/src/matchers/SpanMatcher.test.ts +0 -1105
  467. package/src/matchers/SpanMatcher.ts +0 -381
  468. package/src/orchestration/TraceOrchestrator.ts +0 -560
  469. package/src/orchestration/__tests__/TraceOrchestrator.test.ts +0 -1098
  470. package/src/parsers/OtlpTraceParser.ts +0 -401
  471. package/src/parsers/__tests__/OtlpTraceParser.test.ts +0 -197
  472. package/src/registry/CompositeRegistry.ts +0 -140
  473. package/src/registry/EventRegistry.test.ts +0 -387
  474. package/src/registry/EventRegistry.ts +0 -191
  475. package/src/registry/LocalRegistry.ts +0 -416
  476. package/src/registry/RemoteRegistry.ts +0 -499
  477. package/src/registry/VersionRegistry.test.ts +0 -223
  478. package/src/registry/VersionRegistry.ts +0 -121
  479. package/src/rules/config.test.ts +0 -277
  480. package/src/rules/config.ts +0 -450
  481. package/src/rules/engine.test.ts +0 -331
  482. package/src/rules/engine.ts +0 -448
  483. package/src/rules/implementations/connection-type-references.ts +0 -117
  484. package/src/rules/implementations/dead-end-states.ts +0 -101
  485. package/src/rules/implementations/index.ts +0 -66
  486. package/src/rules/implementations/minimum-node-sources.ts +0 -84
  487. package/src/rules/implementations/no-unknown-fields.ts +0 -372
  488. package/src/rules/implementations/orphaned-edge-types.ts +0 -55
  489. package/src/rules/implementations/orphaned-node-types.ts +0 -58
  490. package/src/rules/implementations/required-metadata.ts +0 -52
  491. package/src/rules/implementations/state-transition-references.ts +0 -155
  492. package/src/rules/implementations/unreachable-states.ts +0 -94
  493. package/src/rules/implementations/valid-action-patterns.ts +0 -140
  494. package/src/rules/implementations/valid-color-format.ts +0 -152
  495. package/src/rules/implementations/valid-edge-types.ts +0 -273
  496. package/src/rules/implementations/valid-node-types.ts +0 -200
  497. package/src/rules/index.ts +0 -92
  498. package/src/rules/types.ts +0 -426
  499. package/src/scopes/ScopePathIndex.test.ts +0 -94
  500. package/src/scopes/ScopePathIndex.ts +0 -89
  501. package/src/scopes/ScopesCanvasValidator.test.ts +0 -127
  502. package/src/scopes/ScopesCanvasValidator.ts +0 -305
  503. package/src/scopes/__tests__/utils.test.ts +0 -383
  504. package/src/scopes/index.ts +0 -42
  505. package/src/scopes/utils.ts +0 -182
  506. package/src/scopes/validateScopeNamespaceNesting.test.ts +0 -127
  507. package/src/scopes/validateScopeNamespaceNesting.ts +0 -88
  508. package/src/spans/index.ts +0 -24
  509. package/src/spans/utils.ts +0 -249
  510. package/src/storyboard/builder.ts +0 -308
  511. package/src/storyboard/index.ts +0 -26
  512. package/src/storyboard/types.ts +0 -117
  513. package/src/telemetry/coverage.ts +0 -480
  514. package/src/telemetry/event-validator.ts +0 -312
  515. package/src/types/audit.ts +0 -314
  516. package/src/types/auxiliary.ts +0 -63
  517. package/src/types/canvas-scope.ts +0 -190
  518. package/src/types/canvas.test.ts +0 -199
  519. package/src/types/canvas.ts +0 -1395
  520. package/src/types/dashboard.ts +0 -257
  521. package/src/types/library.ts +0 -283
  522. package/src/types/otel.test.ts +0 -219
  523. package/src/types/otel.ts +0 -620
  524. package/src/types/path-based-config.ts +0 -285
  525. package/src/types/registered-trace.ts +0 -432
  526. package/src/types/resource-match.ts +0 -263
  527. package/src/types/version-registry.ts +0 -150
  528. package/src/utils/CanvasConverter.ts +0 -670
  529. package/src/utils/GraphConverter.test.ts +0 -322
  530. package/src/utils/GraphConverter.ts +0 -84
  531. package/src/utils/PathMatcher.test.ts +0 -139
  532. package/src/utils/PathMatcher.ts +0 -185
  533. package/src/utils/TraceToCanvas.test.ts +0 -310
  534. package/src/utils/TraceToCanvas.ts +0 -510
  535. package/src/utils/YamlParser.ts +0 -77
  536. package/src/utils/registeredTraceHelpers.ts +0 -251
  537. package/src/utils/traceAggregation.test.ts +0 -385
  538. package/src/utils/traceAggregation.ts +0 -173
  539. package/src/validation/OtelCanvasValidator.ts +0 -86
  540. package/src/validation/index.ts +0 -17
  541. package/src/validation/libraryValidation.ts +0 -206
  542. package/src/workflow/README.md +0 -408
  543. package/src/workflow/__tests__/edge-derivation.test.ts +0 -449
  544. package/src/workflow/__tests__/edge-validation.test.ts +0 -417
  545. package/src/workflow/__tests__/scenario-matcher.test.ts +0 -225
  546. package/src/workflow/__tests__/template-parser.test.ts +0 -276
  547. package/src/workflow/__tests__/template-renderer.test.ts +0 -509
  548. package/src/workflow/__tests__/types.test.ts +0 -187
  549. package/src/workflow/__tests__/validator.test.ts +0 -3225
  550. package/src/workflow/edge-derivation.ts +0 -265
  551. package/src/workflow/edge-validation.ts +0 -503
  552. package/src/workflow/example.ts +0 -330
  553. package/src/workflow/index.ts +0 -86
  554. package/src/workflow/scenario-matcher.ts +0 -253
  555. package/src/workflow/template-parser.ts +0 -350
  556. package/src/workflow/template-renderer.ts +0 -453
  557. package/src/workflow/types.ts +0 -511
  558. package/src/workflow/validator.ts +0 -2737
@@ -1,1138 +0,0 @@
1
- /**
2
- * JSON Canvas Extended Types
3
- *
4
- * This module defines types that extend the JSON Canvas spec (https://jsoncanvas.org/spec/1.0/)
5
- * with Principal View Framework extensions.
6
- *
7
- * Design principle: Extensions use top-level fields where possible (name, markdown, edgeType)
8
- * for simplicity. Node-level extensions use a `pv` field for complex metadata.
9
- *
10
- * DEPRECATION: Canvas-level `pv` field and edge-level `pv` field are deprecated.
11
- * Use top-level `name`, `markdown` fields on canvas, and `edgeType` field on edges.
12
- *
13
- * This allows:
14
- * 1. Authoring layouts visually in Obsidian or other canvas tools
15
- * 2. Rendering with rich animations and states in React Flow
16
- * 3. Round-trip editing without data loss
17
- */
18
- import type { CanvasScope, CanvasAuditConfig } from './canvas-scope';
19
- import type { ResourceMatch } from './resource-match';
20
- import type { JsonValue } from './index';
21
- /**
22
- * Canvas color - either a hex string or preset number (1-6)
23
- * Presets: 1=red, 2=orange, 3=yellow, 4=green, 5=cyan, 6=purple
24
- *
25
- * Note: Obsidian Canvas saves numeric presets as strings ("1"-"6"),
26
- * so we accept both number and string formats.
27
- */
28
- export type CanvasColor = string | 1 | 2 | 3 | 4 | 5 | 6;
29
- /**
30
- * Side of a node for edge connections
31
- */
32
- export type CanvasSide = 'top' | 'right' | 'bottom' | 'left';
33
- /**
34
- * Edge endpoint shape
35
- */
36
- export type CanvasEndpoint = 'none' | 'arrow';
37
- /**
38
- * Background style for group nodes
39
- */
40
- export type CanvasBackgroundStyle = 'cover' | 'ratio' | 'repeat';
41
- /**
42
- * Base node properties (common to all node types)
43
- */
44
- export interface CanvasNodeBase {
45
- /** Unique identifier */
46
- id: string;
47
- /** X position in pixels */
48
- x: number;
49
- /** Y position in pixels */
50
- y: number;
51
- /** Width in pixels */
52
- width: number;
53
- /** Height in pixels */
54
- height: number;
55
- /** Optional color */
56
- color?: CanvasColor;
57
- }
58
- /**
59
- * Text node - stores plain text or markdown
60
- */
61
- export interface CanvasTextNode extends CanvasNodeBase {
62
- type: 'text';
63
- /** Markdown-formatted text content */
64
- text: string;
65
- }
66
- /**
67
- * File node - references an external file
68
- */
69
- export interface CanvasFileNode extends CanvasNodeBase {
70
- type: 'file';
71
- /** Path to the file */
72
- file: string;
73
- /** Optional subpath (heading or block link) */
74
- subpath?: string;
75
- }
76
- /**
77
- * Link node - references a URL
78
- */
79
- export interface CanvasLinkNode extends CanvasNodeBase {
80
- type: 'link';
81
- /** URL to link to */
82
- url: string;
83
- }
84
- /**
85
- * Group node - visual container for other nodes
86
- */
87
- export interface CanvasGroupNode extends CanvasNodeBase {
88
- type: 'group';
89
- /** Optional label for the group */
90
- label?: string;
91
- /** Optional background image path */
92
- background?: string;
93
- /** Background image style */
94
- backgroundStyle?: CanvasBackgroundStyle;
95
- }
96
- /**
97
- * Union of all standard canvas node types
98
- */
99
- export type CanvasNode = CanvasTextNode | CanvasFileNode | CanvasLinkNode | CanvasGroupNode;
100
- /**
101
- * Canvas edge connecting two nodes
102
- */
103
- export interface CanvasEdge {
104
- /** Unique identifier */
105
- id: string;
106
- /** Source node ID */
107
- fromNode: string;
108
- /** Target node ID */
109
- toNode: string;
110
- /** Side of source node */
111
- fromSide?: CanvasSide;
112
- /** Side of target node */
113
- toSide?: CanvasSide;
114
- /** Endpoint shape at source (default: 'none') */
115
- fromEnd?: CanvasEndpoint;
116
- /** Endpoint shape at target (default: 'arrow') */
117
- toEnd?: CanvasEndpoint;
118
- /** Edge color */
119
- color?: CanvasColor;
120
- /** Edge label */
121
- label?: string;
122
- }
123
- /**
124
- * Standard JSON Canvas document
125
- */
126
- export interface Canvas {
127
- /** Array of nodes (ordered by z-index ascending) */
128
- nodes?: CanvasNode[];
129
- /** Array of edges */
130
- edges?: CanvasEdge[];
131
- }
132
- /**
133
- * Animation types for edges
134
- */
135
- export type PVAnimationType = 'flow' | 'pulse' | 'particle' | 'glow';
136
- /**
137
- * Animation direction
138
- */
139
- export type PVAnimationDirection = 'forward' | 'backward' | 'bidirectional';
140
- /**
141
- * Node shape for rendering
142
- */
143
- export type PVNodeShape = 'circle' | 'rectangle' | 'hexagon' | 'diamond' | 'custom';
144
- /**
145
- * Edge line style
146
- */
147
- export type PVEdgeStyle = 'solid' | 'dashed' | 'dotted' | 'animated';
148
- /**
149
- * Log level for path-based association
150
- */
151
- export type PVLogLevel = 'debug' | 'info' | 'warn' | 'error';
152
- /**
153
- * State definition for a node
154
- */
155
- export interface PVNodeState {
156
- /** Color when in this state */
157
- color?: string;
158
- /** Icon when in this state */
159
- icon?: string;
160
- /** Display label */
161
- label?: string;
162
- }
163
- /**
164
- * OTEL node classification
165
- *
166
- * @deprecated Use `pv.nodeType` instead. Will be removed in a future version.
167
- * For example, use `nodeType: "scope"` instead of `otel.kind: "type"`.
168
- */
169
- export type PVOtelKind = 'type' | 'service' | 'instance';
170
- /**
171
- * OTEL category for type nodes
172
- *
173
- * @deprecated Use `pv.nodeType` instead. Will be removed in a future version.
174
- * For example, use `nodeType: "span-convention"` instead of `otel.category: "span"`.
175
- */
176
- export type PVOtelCategory = 'log' | 'resource' | 'span' | 'scope' | 'match' | 'audit' | 'config' | 'router' | 'collector';
177
- /**
178
- * OTel SpanKind values for span conventions
179
- *
180
- * Describes the relationship between a span and its remote parent/children.
181
- * Standard OTel concept - these values are fixed by the OTel spec.
182
- *
183
- * @see https://opentelemetry.io/docs/specs/otel/trace/api/#spankind
184
- */
185
- export type PVOtelSpanKind = 'UNSPECIFIED' | 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
186
- import type { OtelSpanKind } from './otel';
187
- /**
188
- * OTEL span matching criteria
189
- *
190
- * Defines rules for matching incoming OTEL spans to this canvas node.
191
- * Multiple criteria are combined with AND logic (all must match).
192
- */
193
- export interface PVOtelSpanMatch {
194
- /**
195
- * Match span name
196
- *
197
- * Supports:
198
- * - Exact string: "validateUser"
199
- * - Array of options: ["GET /api/users", "POST /api/users"]
200
- * - Glob patterns: "GET /api/*", "*.checkout"
201
- *
202
- * @example "validateUser"
203
- * @example ["GET /api/users", "POST /api/users"]
204
- * @example "*.checkout"
205
- */
206
- name?: string | string[];
207
- /**
208
- * Match span kind
209
- *
210
- * @example "SPAN_KIND_SERVER"
211
- * @example "SPAN_KIND_CLIENT"
212
- */
213
- kind?: OtelSpanKind | OtelSpanKind[];
214
- /**
215
- * Match span attributes
216
- *
217
- * All specified attributes must match (AND logic).
218
- * Supports exact values and wildcards.
219
- *
220
- * @example
221
- * {
222
- * "http.route": "/api/checkout",
223
- * "http.method": "POST"
224
- * }
225
- *
226
- * @example
227
- * {
228
- * "db.system": "postgresql",
229
- * "db.operation": "*" // Any operation
230
- * }
231
- */
232
- attributes?: Record<string, string | string[]>;
233
- /**
234
- * Match span events
235
- *
236
- * If specified, span must contain at least one event matching these criteria.
237
- *
238
- * @example
239
- * {
240
- * name: "exception",
241
- * attributes: { "exception.type": "ValidationError" }
242
- * }
243
- */
244
- event?: {
245
- name?: string | string[];
246
- attributes?: Record<string, string | string[]>;
247
- };
248
- }
249
- /**
250
- * OTEL resource matching criteria
251
- *
252
- * Matches against OTEL resource attributes (service.name, deployment.environment, etc.).
253
- * Multiple attributes are combined with AND logic.
254
- */
255
- export interface PVOtelResourceMatch {
256
- /**
257
- * Resource attribute patterns to match
258
- *
259
- * Supports:
260
- * - Exact match: { "service.name": "checkout-api" }
261
- * - Wildcard: { "service.name": "*-api" }
262
- * - Array of options: { "service.name": ["api-1", "api-2"] }
263
- *
264
- * @example
265
- * {
266
- * "service.name": "checkout-service",
267
- * "deployment.environment": "production"
268
- * }
269
- */
270
- [attributeKey: string]: string | string[];
271
- }
272
- /**
273
- * OTEL-specific node extension
274
- *
275
- * Used to mark nodes as representing OTEL concepts in architectural diagrams
276
- * and to define runtime span matching criteria.
277
- */
278
- export interface PVOtelExtension {
279
- /**
280
- * Kind of OTEL node
281
- * - `type`: Represents a TypeScript type/interface (e.g., OtelLog, ResourceMatch)
282
- * - `service`: Represents a runtime service (e.g., LogRouter, AuditCollector)
283
- * - `instance`: Represents an actual runtime instance (e.g., a specific pod)
284
- *
285
- * @deprecated Use `pv.nodeType` instead. Will be removed in a future version.
286
- */
287
- kind?: PVOtelKind;
288
- /**
289
- * Category within OTEL domain
290
- *
291
- * @deprecated Use `pv.nodeType` instead. Will be removed in a future version.
292
- */
293
- category?: PVOtelCategory;
294
- /**
295
- * Span pattern for span convention nodes
296
- *
297
- * Defines the naming pattern for spans that match this convention.
298
- * Supports wildcards (e.g., "validate.*", "task.create").
299
- *
300
- * Used in architecture.spans.canvas to define the vocabulary of operations.
301
- *
302
- * @example "validate.*"
303
- * @example "task.create"
304
- * @example "http.request"
305
- */
306
- spanPattern?: string;
307
- /**
308
- * OTel SpanKind for span convention nodes
309
- *
310
- * Specifies what kind of span this convention represents.
311
- * Implementers should use this when creating spans.
312
- *
313
- * @example "SERVER" - for entry points handling incoming requests
314
- * @example "INTERNAL" - for internal operations
315
- * @example "CLIENT" - for outgoing calls to external services
316
- */
317
- spanKind?: PVOtelSpanKind;
318
- /**
319
- * Resource matching criteria
320
- *
321
- * When specified, this node will highlight when spans are received
322
- * from resources with matching attributes.
323
- */
324
- resourceMatch?: PVOtelResourceMatch;
325
- /**
326
- * Span matching criteria
327
- *
328
- * When specified, this node will highlight when spans matching
329
- * these criteria are received.
330
- */
331
- spanMatch?: PVOtelSpanMatch;
332
- /**
333
- * Files where this event is instrumented
334
- *
335
- * Specifies the exact file paths where this OTEL event should be emitted.
336
- * Used by coverage tools to validate that events are properly instrumented.
337
- *
338
- * @example ["src/app/api/auth/callback/route.ts"]
339
- */
340
- files?: string[];
341
- /**
342
- * Instrumentation scope that emits this event
343
- *
344
- * Identifies which tracer/instrumentation library creates this span or event.
345
- * Maps to `getTracer('scope-name')` in the instrumented code.
346
- *
347
- * Required when the parent node's status is 'approved' or 'implemented'.
348
- * Should match an entry in the library.yaml `owned-scopes` list.
349
- *
350
- * @example "terminal-activity"
351
- * @example "auth"
352
- * @example "quality-panel"
353
- */
354
- scope?: string;
355
- /** Allow additional properties */
356
- [key: string]: JsonValue | PVOtelResourceMatch | PVOtelSpanMatch | string[] | undefined;
357
- }
358
- /**
359
- * Event field schema definition
360
- */
361
- export interface PVEventFieldSchema {
362
- /** Field data type */
363
- type: 'string' | 'number' | 'boolean' | 'object' | 'array';
364
- /** Whether this field is required */
365
- required?: boolean;
366
- /** Description of what this field represents */
367
- description?: string;
368
- /**
369
- * Whether this attribute is intended for template display.
370
- * Set to false for telemetry/analytics-only attributes.
371
- * Defaults to true.
372
- */
373
- display?: boolean;
374
- }
375
- /**
376
- * Event schema definition for a specific event type
377
- */
378
- export interface PVEventSchema {
379
- /** Event name (e.g., 'conversion.started', 'user.login') */
380
- name: string;
381
- /** Description of what this event represents */
382
- description: string;
383
- /** Expected attributes/fields for this event */
384
- attributes: Record<string, PVEventFieldSchema>;
385
- }
386
- /**
387
- * Node implementation status
388
- *
389
- * Tracks the lifecycle of a node from design to implementation.
390
- */
391
- export type PVNodeStatus = 'draft' | 'approved' | 'implemented';
392
- /**
393
- * Direction of boundary interaction
394
- */
395
- export type PVBoundaryDirection = 'outbound' | 'inbound';
396
- /**
397
- * Node query criteria for boundary resolution
398
- *
399
- * Defines what the corresponding node looks like in the external system's traces.
400
- * Used for cross-repo resolution and live trace correlation.
401
- */
402
- export interface PVBoundaryNodeQuery {
403
- /** Event name to match in external system */
404
- 'pv.event.name'?: string;
405
- /** Event namespace to match */
406
- 'pv.event.namespace'?: string;
407
- /** Additional attribute matches */
408
- [key: string]: string | undefined;
409
- }
410
- /**
411
- * Boundary extension for nodes representing external system interfaces
412
- *
413
- * Boundaries define interaction points where control crosses system edges.
414
- * The `node` field specifies what the corresponding node looks like in the
415
- * external system, enabling cross-repo resolution and trace correlation.
416
- *
417
- * @example Outbound host callback
418
- * ```typescript
419
- * boundary: {
420
- * direction: 'outbound',
421
- * node: {
422
- * 'pv.event.name': 'host.batch-layout-initialized',
423
- * 'pv.event.namespace': 'collection-host'
424
- * }
425
- * }
426
- * ```
427
- *
428
- * @example Inbound webhook
429
- * ```typescript
430
- * boundary: {
431
- * direction: 'inbound',
432
- * node: {
433
- * 'pv.event.name': 'webhook.repository-created',
434
- * 'pv.event.namespace': 'github'
435
- * }
436
- * }
437
- * ```
438
- */
439
- export interface PVBoundaryExtension {
440
- /**
441
- * Direction of the boundary interaction
442
- *
443
- * - `outbound`: This system calls out to external system
444
- * - `inbound`: External system calls into this system
445
- */
446
- direction: PVBoundaryDirection;
447
- /**
448
- * Node query for resolving the corresponding node in external system
449
- *
450
- * Specifies the expected shape of the matching node for registry lookup
451
- * and live trace correlation.
452
- */
453
- node: PVBoundaryNodeQuery;
454
- }
455
- /**
456
- * Principal View node extensions
457
- */
458
- export interface PVNodeExtension {
459
- /** Custom node type identifier */
460
- nodeType: string;
461
- /**
462
- * Display name for this node
463
- *
464
- * Preferred over parsing the `text` field. Use this for the node label.
465
- */
466
- name?: string;
467
- /**
468
- * Description of what this node represents
469
- *
470
- * Shown in tooltips or detail panels.
471
- */
472
- description?: string;
473
- /**
474
- * Implementation status of this node
475
- *
476
- * - `draft`: Design/proposal phase (requires pv.otel.files if known, otherwise pv.references)
477
- * - `approved`: Design finalized, ready for implementation (requires pv.otel.files)
478
- * - `implemented`: Code exists with instrumentation (requires pv.otel.files and events in code)
479
- *
480
- * Used by coverage tools to determine validation requirements and coverage tracking.
481
- */
482
- status?: PVNodeStatus;
483
- /**
484
- * OTEL-specific metadata
485
- *
486
- * Used when this node represents an OTEL concept (type, service, or instance).
487
- */
488
- otel?: PVOtelExtension;
489
- /** Visual shape */
490
- shape?: PVNodeShape;
491
- /** Icon identifier (Lucide icons) */
492
- icon?: string;
493
- /** Fill color (hex string) - takes priority over node.color */
494
- fill?: string;
495
- /** Stroke/border color (hex string) */
496
- stroke?: string;
497
- /** State definitions */
498
- states?: Record<string, PVNodeState>;
499
- /**
500
- * Origin of the code this node represents
501
- *
502
- * - `internal` (default): Code exists in this repository, file paths in `pv.otel.files` will be validated
503
- * - `external`: Code exists in external packages/libraries, file existence validation is skipped
504
- *
505
- * Use `external` for:
506
- * - npm dependencies (e.g., `@logfire/pydantic-ai`)
507
- * - Auto-instrumented events from observability libraries
508
- * - Third-party APIs or services
509
- * - Cross-repository references
510
- *
511
- * When `origin: "external"`, the `references` field is required to document
512
- * what external package or service this node represents.
513
- *
514
- * @example "external"
515
- */
516
- origin?: 'internal' | 'external';
517
- /**
518
- * Auxiliary references and related documentation
519
- *
520
- * Use for documenting related packages, external dependencies, or supplementary notes.
521
- * Required when `origin: "external"` to document what external package/service this represents.
522
- *
523
- * @example ["@logfire/pydantic-ai"] // external package reference
524
- * @example ["https://docs.pydantic.dev/logfire/"] // documentation link
525
- */
526
- references?: string[];
527
- /**
528
- * @deprecated Use `references` instead. Will be removed in a future version.
529
- */
530
- sources?: string[];
531
- /**
532
- * Resource-based matching for OTEL logs
533
- *
534
- * When specified, logs with matching OTEL resource attributes
535
- * will be routed to this node. Takes priority over sources.
536
- *
537
- * @example
538
- * ```typescript
539
- * resourceMatch: {
540
- * 'service.name': 'checkout-api',
541
- * 'deployment.environment': 'production'
542
- * }
543
- * ```
544
- */
545
- resourceMatch?: ResourceMatch;
546
- /**
547
- * Event schema for type-safe telemetry validation (inline definition)
548
- *
549
- * Defines the single event that this node emits during execution.
550
- * Used for compile-time and runtime validation of telemetry events.
551
- * Each node should emit exactly one event type.
552
- *
553
- * Use this for one-off events specific to this node.
554
- * For reusable events, use `eventRef` to reference library event schemas.
555
- *
556
- * @example
557
- * ```typescript
558
- * event: {
559
- * name: 'conversion.started',
560
- * description: 'Graph conversion begins',
561
- * attributes: {
562
- * 'config.nodeTypes': { type: 'number', required: true },
563
- * 'config.edgeTypes': { type: 'number', required: true }
564
- * }
565
- * }
566
- * ```
567
- */
568
- event?: PVEventSchema;
569
- /**
570
- * Reference to a library event schema
571
- *
572
- * References an event schema defined in library.yaml's `eventSchemas` section.
573
- * This promotes reusability and consistency across canvases.
574
- *
575
- * NOTE: A node cannot have both `event` and `eventRef` - choose one.
576
- * Validators will flag nodes that have both as an error.
577
- *
578
- * @example
579
- * ```typescript
580
- * eventRef: 'auth.callback.started'
581
- * ```
582
- */
583
- eventRef?: string;
584
- /** Data schema for typed fields */
585
- dataSchema?: Record<string, {
586
- type: 'string' | 'number' | 'boolean' | 'object' | 'array';
587
- required?: boolean;
588
- displayInLabel?: boolean;
589
- /**
590
- * Human-readable description of what this field represents.
591
- * Required in .otel.canvas files (enforced by validator).
592
- */
593
- description?: string;
594
- /**
595
- * Example value for UI previews, mock traces, and testing.
596
- * Required in .otel.canvas files (enforced by validator).
597
- */
598
- placeholder?: unknown;
599
- }>;
600
- /** Layout hints */
601
- layout?: {
602
- layer?: number;
603
- cluster?: string;
604
- };
605
- /**
606
- * Boundary extension for nodes representing external system interfaces
607
- *
608
- * When `nodeType` is `"boundary"`, this field defines the boundary details.
609
- * Boundary nodes represent interface points where control crosses system edges.
610
- * The `node` field specifies what the corresponding node looks like in the
611
- * external system, enabling cross-repo resolution and trace correlation.
612
- *
613
- * When a node has `nodeType: "boundary"`, it does NOT require `event` or `eventRef`
614
- * fields since the boundary is external and doesn't emit telemetry from our code.
615
- *
616
- * @example
617
- * ```typescript
618
- * {
619
- * nodeType: "boundary",
620
- * boundary: {
621
- * direction: "outbound",
622
- * node: {
623
- * "pv.event.name": "host.batch-layout-initialized",
624
- * "pv.event.namespace": "collection-host"
625
- * }
626
- * }
627
- * }
628
- * ```
629
- */
630
- boundary?: PVBoundaryExtension;
631
- }
632
- /**
633
- * Principal View edge extensions
634
- */
635
- export interface PVEdgeExtension {
636
- /** Custom edge type identifier */
637
- edgeType: string;
638
- /** Line style */
639
- style?: PVEdgeStyle;
640
- /** Line width in pixels */
641
- width?: number;
642
- /** Default animation */
643
- animation?: {
644
- type: PVAnimationType;
645
- duration?: number;
646
- color?: string;
647
- };
648
- }
649
- /**
650
- * Path-based configuration options
651
- */
652
- export interface PVPathConfig {
653
- /** Project root for path normalization */
654
- projectRoot?: string;
655
- /** Enable source capture from stack traces */
656
- captureSource?: boolean;
657
- /** Enable action pattern matching */
658
- enableActionPatterns?: boolean;
659
- /** Minimum log level to process */
660
- logLevel?: PVLogLevel;
661
- /** Ignore logs without source info */
662
- ignoreUnsourced?: boolean;
663
- }
664
- /**
665
- * Display configuration
666
- */
667
- export interface PVDisplayConfig {
668
- /** Layout algorithm (manual uses canvas positions) */
669
- layout?: 'hierarchical' | 'force-directed' | 'circular' | 'manual';
670
- /** Color theme */
671
- theme?: {
672
- primary?: string;
673
- success?: string;
674
- warning?: string;
675
- danger?: string;
676
- info?: string;
677
- };
678
- /** Animation settings */
679
- animations?: {
680
- enabled?: boolean;
681
- speed?: number;
682
- };
683
- }
684
- /**
685
- * Node type definition (stored at canvas level in pv.nodeTypes)
686
- */
687
- export interface PVNodeTypeDefinition {
688
- /** Display label */
689
- label?: string;
690
- /** Description of this node type (required) */
691
- description: string;
692
- /** Fill color (hex string) */
693
- color?: string;
694
- /** Icon identifier (Lucide icons) */
695
- icon?: string;
696
- /** Visual shape */
697
- shape?: PVNodeShape;
698
- }
699
- /**
700
- * Edge type definition (stored at canvas level)
701
- */
702
- export interface PVEdgeTypeDefinition {
703
- /** Display label */
704
- label?: string;
705
- /** Line style */
706
- style?: PVEdgeStyle;
707
- /** Line color */
708
- color?: string;
709
- /** Line width */
710
- width?: number;
711
- /** Whether edge is directed */
712
- directed?: boolean;
713
- /** Default animation */
714
- animation?: {
715
- type: PVAnimationType;
716
- duration?: number;
717
- color?: string;
718
- };
719
- /** Label configuration (for dynamic labels) */
720
- labelConfig?: {
721
- field?: string;
722
- position?: 'start' | 'middle' | 'end';
723
- };
724
- }
725
- /**
726
- * Canvas-level Principal View extensions
727
- *
728
- * @deprecated The `pv` field is fully deprecated. All fields have been moved to top-level.
729
- * This interface will be removed in a future version.
730
- *
731
- * Migration - move all fields to top-level:
732
- * - `pv.name` → `name`
733
- * - `pv.markdown` → `markdown`
734
- * - `pv.description` → `description`
735
- * - `pv.nodeTypes` → `nodeTypes`
736
- * - `pv.edgeTypes` → `edgeTypes`
737
- * - `pv.display` → `display`
738
- * - `pv.pathConfig` → `pathConfig`
739
- * - `pv.scope` → `scope`
740
- * - `pv.audit` → `audit`
741
- * - `pv.version` → removed (not used)
742
- */
743
- export interface PVCanvasExtension {
744
- /** @deprecated Use top-level `name` field instead */
745
- name?: string;
746
- /** @deprecated Use top-level `description` field instead */
747
- description?: string;
748
- /** @deprecated Use top-level `markdown` field instead */
749
- markdown?: string;
750
- /** @deprecated Use top-level `nodeTypes` field instead */
751
- nodeTypes?: Record<string, PVNodeTypeDefinition>;
752
- /** @deprecated Use top-level `edgeTypes` field instead */
753
- edgeTypes?: Record<string, PVEdgeTypeDefinition>;
754
- /** @deprecated Use top-level `pathConfig` field instead */
755
- pathConfig?: PVPathConfig;
756
- /** @deprecated Use top-level `display` field instead */
757
- display?: PVDisplayConfig;
758
- /** @deprecated Use top-level `scope` field instead */
759
- scope?: CanvasScope;
760
- /** @deprecated Use top-level `audit` field instead */
761
- audit?: CanvasAuditConfig;
762
- }
763
- /**
764
- * Extended text node with PV extensions
765
- */
766
- export interface ExtendedCanvasTextNode extends CanvasTextNode {
767
- pv?: PVNodeExtension;
768
- }
769
- /**
770
- * Extended file node with PV extensions
771
- */
772
- export interface ExtendedCanvasFileNode extends CanvasFileNode {
773
- pv?: PVNodeExtension;
774
- }
775
- /**
776
- * Extended link node with PV extensions
777
- */
778
- export interface ExtendedCanvasLinkNode extends CanvasLinkNode {
779
- pv?: PVNodeExtension;
780
- }
781
- /**
782
- * Extended group node with PV extensions
783
- */
784
- export interface ExtendedCanvasGroupNode extends CanvasGroupNode {
785
- pv?: PVNodeExtension;
786
- }
787
- /**
788
- * Base interface for all OTEL node types
789
- *
790
- * These are custom node types that extend JSON Canvas for OpenTelemetry concepts.
791
- * Standard canvas tools will not recognize these types.
792
- */
793
- export interface OtelNodeBase extends CanvasNodeBase {
794
- /** Display label shown on canvas node (required) */
795
- label: string;
796
- /** Icon identifier (Lucide icons) */
797
- icon?: string;
798
- /** Fill color (hex string) */
799
- fill?: string;
800
- /** Stroke/border color (hex string) */
801
- stroke?: string;
802
- /** Visual shape */
803
- shape?: PVNodeShape;
804
- }
805
- /**
806
- * Shared OTEL instrumentation metadata
807
- *
808
- * Common fields for tracking implementation status and code location.
809
- */
810
- export interface OtelMetadata {
811
- /** Implementation status */
812
- status?: PVNodeStatus;
813
- /** Instrumentation scope (maps to getTracer('scope-name')) */
814
- scope?: string;
815
- /** Files where this is instrumented */
816
- files?: string[];
817
- /**
818
- * Origin of the code
819
- * - 'internal': Code exists in this repository (default)
820
- * - 'external': Code exists in external packages/libraries
821
- */
822
- origin?: 'internal' | 'external';
823
- /** References/documentation for external code */
824
- references?: string[];
825
- }
826
- /**
827
- * OTEL Event Node
828
- *
829
- * Represents a telemetry event emitted during workflow execution.
830
- * The event schema defines the structure of the telemetry data.
831
- */
832
- /**
833
- * OTEL Event Node - represents a telemetry event
834
- *
835
- * @remarks
836
- * IMPORTANT: Event nodes should NOT use fill or color fields.
837
- * Event nodes use scope-based coloring exclusively for consistency.
838
- * Set the scope in otel.scope and define scope colors in library.yaml.
839
- * Using fill or color fields will cause validation errors.
840
- */
841
- export interface OtelEventNode extends OtelNodeBase {
842
- type: 'otel-event';
843
- /** Inline event schema definition */
844
- event?: PVEventSchema;
845
- /** Reference to a library event schema */
846
- eventRef?: string;
847
- /** Data schema for typed fields in templates */
848
- dataSchema?: Record<string, {
849
- type: 'string' | 'number' | 'boolean' | 'object' | 'array';
850
- required?: boolean;
851
- description?: string;
852
- placeholder?: unknown;
853
- }>;
854
- /** OTEL instrumentation metadata */
855
- otel?: OtelMetadata;
856
- }
857
- /**
858
- * Workflow chip displayed on span convention nodes
859
- * Shows which workflow.json scenarios reference this span
860
- */
861
- export interface WorkflowChip {
862
- /** Workflow scenario ID for selection/filtering */
863
- id: string;
864
- /** Display label (may be truncated) */
865
- label: string;
866
- /** Optional color for the chip */
867
- color?: string;
868
- }
869
- /**
870
- * OTEL Span Convention Node
871
- *
872
- * Defines a span naming convention/pattern for consistent instrumentation.
873
- */
874
- export interface OtelSpanConventionNode extends OtelNodeBase {
875
- type: 'otel-span-convention';
876
- /** Short description of this span convention */
877
- description?: string;
878
- /** OTEL metadata including span-specific fields */
879
- otel: OtelMetadata & {
880
- /** Span naming pattern (e.g., "validate.*", "http.request") */
881
- spanPattern: string;
882
- /** OTel SpanKind */
883
- spanKind?: PVOtelSpanKind;
884
- /** Span matching criteria for runtime correlation */
885
- spanMatch?: PVOtelSpanMatch;
886
- };
887
- /** Workflow chips showing which workflow.json scenarios use this span */
888
- workflowChips?: WorkflowChip[];
889
- }
890
- /**
891
- * OTEL Scope Node
892
- *
893
- * Represents an instrumentation scope (tracer instance).
894
- */
895
- export interface OtelScopeNode extends OtelNodeBase {
896
- type: 'otel-scope';
897
- /** Short description of this instrumentation scope */
898
- description?: string;
899
- /**
900
- * Optional source paths that define this scope's code region.
901
- * Each entry may be a folder (covers all descendants) or a specific file.
902
- * When present, events under this scope may only originate from files
903
- * covered by one of these paths, and every `event-namespace` declared in
904
- * this scope's events canvas must have its own `paths` nested inside this
905
- * region. Scopes without `paths` remain unenforced — enforcement is opt-in
906
- * per scope.
907
- *
908
- * Semantics are "ownership / partition", distinct from `otel.files` on
909
- * `otel-event` nodes (which lists specific emission sites). Across scopes,
910
- * paths must be disjoint except for strict parent-child nesting by
911
- * dotted-scope name (longest-prefix wins).
912
- */
913
- paths?: string[];
914
- /** OTEL metadata - scope name is required */
915
- otel: OtelMetadata & {
916
- /** Scope name (required - maps to getTracer('scope-name')) */
917
- scope: string;
918
- };
919
- }
920
- /**
921
- * OTEL Resource Node
922
- *
923
- * Represents a service or deployment resource identified by OTEL resource attributes.
924
- */
925
- export interface OtelResourceNode extends OtelNodeBase {
926
- type: 'otel-resource';
927
- /** Short description of this resource */
928
- description?: string;
929
- /** OTEL metadata including resource matching criteria */
930
- otel: OtelMetadata & {
931
- /** Resource attribute matching criteria */
932
- resourceMatch: PVOtelResourceMatch;
933
- };
934
- }
935
- /**
936
- * OTEL Boundary Node
937
- *
938
- * Represents an interface point with an external system.
939
- */
940
- export interface OtelBoundaryNode extends OtelNodeBase {
941
- type: 'otel-boundary';
942
- /** Short description of this boundary */
943
- description?: string;
944
- /** OTEL instrumentation metadata */
945
- otel?: OtelMetadata;
946
- /** Boundary configuration (required) */
947
- boundary: PVBoundaryExtension;
948
- }
949
- /**
950
- * Union of all OTEL node types
951
- */
952
- export type OtelNode = OtelEventNode | OtelSpanConventionNode | OtelScopeNode | OtelResourceNode | OtelBoundaryNode;
953
- /**
954
- * Union of all extended node types (JSON Canvas + OTEL extensions)
955
- */
956
- export type ExtendedCanvasNode = ExtendedCanvasTextNode | ExtendedCanvasFileNode | ExtendedCanvasLinkNode | ExtendedCanvasGroupNode | OtelEventNode | OtelSpanConventionNode | OtelScopeNode | OtelResourceNode | OtelBoundaryNode;
957
- /**
958
- * Extended edge with PV extensions
959
- */
960
- export interface ExtendedCanvasEdge extends CanvasEdge {
961
- /**
962
- * Custom edge type identifier
963
- *
964
- * Used to categorize edges (e.g., "data-flow", "control-flow", "dependency").
965
- * Replaces the deprecated `pv.edgeType` field.
966
- *
967
- * @example "data-flow"
968
- * @example "control-flow"
969
- */
970
- edgeType?: string;
971
- /**
972
- * @deprecated Use top-level `edgeType` field instead.
973
- * Validation will error if this field is present.
974
- *
975
- * Migration:
976
- * ```json
977
- * // Before (deprecated):
978
- * { "id": "e1", "fromNode": "a", "toNode": "b", "pv": { "edgeType": "data-flow" } }
979
- *
980
- * // After:
981
- * { "id": "e1", "fromNode": "a", "toNode": "b", "edgeType": "data-flow" }
982
- * ```
983
- */
984
- pv?: PVEdgeExtension;
985
- }
986
- /**
987
- * Extended Canvas document with Principal View support
988
- *
989
- * This is the primary type for .canvas files used with the Principal View Framework.
990
- * It supports both standard JSON Canvas node types (text, file, link, group) and
991
- * custom OTEL node types (otel-event, otel-span-convention, etc.).
992
- *
993
- * Standard canvas tools will only recognize the JSON Canvas node types.
994
- */
995
- export interface ExtendedCanvas {
996
- /**
997
- * Canvas display name
998
- *
999
- * Human-readable name for this canvas, shown in UIs and listings.
1000
- *
1001
- * @example "Service Resources"
1002
- * @example "Checkout Flow"
1003
- */
1004
- name?: string;
1005
- /**
1006
- * Associated markdown documentation file
1007
- *
1008
- * Path to a markdown file that documents this canvas.
1009
- * For .otel.canvas files, this field is required.
1010
- * The path must be relative to the git repository root.
1011
- *
1012
- * Convention: If not specified, defaults to same basename as canvas file.
1013
- * e.g., `resources.canvas` → `resources.md`
1014
- *
1015
- * @example ".principal-views/resources.md"
1016
- * @example "docs/architecture/checkout-flow.md"
1017
- */
1018
- markdown?: string;
1019
- /** Canvas description */
1020
- description?: string;
1021
- /** Node type definitions (shared across nodes) */
1022
- nodeTypes?: Record<string, PVNodeTypeDefinition>;
1023
- /** Edge type definitions (shared across edges) */
1024
- edgeTypes?: Record<string, PVEdgeTypeDefinition>;
1025
- /** Path-based configuration */
1026
- pathConfig?: PVPathConfig;
1027
- /** Display configuration */
1028
- display?: PVDisplayConfig;
1029
- /**
1030
- * Canvas scope for log filtering
1031
- *
1032
- * Only logs matching this scope will be considered for node routing.
1033
- * If not specified, all logs are in scope.
1034
- *
1035
- * @example
1036
- * ```typescript
1037
- * scope: {
1038
- * 'deployment.environment': 'production',
1039
- * 'service.namespace': 'checkout'
1040
- * }
1041
- * ```
1042
- */
1043
- scope?: CanvasScope;
1044
- /**
1045
- * Audit configuration for log coverage tracking
1046
- *
1047
- * When enabled, tracks which logs are routed vs orphaned,
1048
- * detects silent nodes, and generates coverage reports.
1049
- */
1050
- audit?: CanvasAuditConfig;
1051
- /** Nodes - JSON Canvas types and/or OTEL node types */
1052
- nodes?: ExtendedCanvasNode[];
1053
- /** Edges with optional PV extensions */
1054
- edges?: ExtendedCanvasEdge[];
1055
- /**
1056
- * @deprecated The `pv` field is fully deprecated. All fields have been moved to top-level.
1057
- * Validation will error if this field is present.
1058
- *
1059
- * Migration:
1060
- * - `pv.name` → `name` (top-level)
1061
- * - `pv.markdown` → `markdown` (top-level)
1062
- * - `pv.description` → `description` (top-level)
1063
- * - `pv.nodeTypes` → `nodeTypes` (top-level)
1064
- * - `pv.edgeTypes` → `edgeTypes` (top-level)
1065
- * - `pv.display` → `display` (top-level)
1066
- * - `pv.pathConfig` → `pathConfig` (top-level)
1067
- * - `pv.scope` → `scope` (top-level)
1068
- * - `pv.audit` → `audit` (top-level)
1069
- * - `pv.version` → removed (not used)
1070
- */
1071
- pv?: PVCanvasExtension;
1072
- }
1073
- /**
1074
- * Type guard for text nodes
1075
- */
1076
- export declare function isTextNode(node: CanvasNode | ExtendedCanvasNode): node is CanvasTextNode | ExtendedCanvasTextNode;
1077
- /**
1078
- * Type guard for file nodes
1079
- */
1080
- export declare function isFileNode(node: CanvasNode | ExtendedCanvasNode): node is CanvasFileNode | ExtendedCanvasFileNode;
1081
- /**
1082
- * Type guard for link nodes
1083
- */
1084
- export declare function isLinkNode(node: CanvasNode | ExtendedCanvasNode): node is CanvasLinkNode | ExtendedCanvasLinkNode;
1085
- /**
1086
- * Type guard for group nodes
1087
- */
1088
- export declare function isGroupNode(node: CanvasNode | ExtendedCanvasNode): node is CanvasGroupNode | ExtendedCanvasGroupNode;
1089
- /**
1090
- * Type guard for extended nodes (with PV extension)
1091
- */
1092
- export declare function hasPVExtension(node: CanvasNode | ExtendedCanvasNode): node is ExtendedCanvasNode;
1093
- /**
1094
- * Type guard for OTEL event nodes
1095
- */
1096
- export declare function isOtelEventNode(node: ExtendedCanvasNode): node is OtelEventNode;
1097
- /**
1098
- * Type guard for OTEL span convention nodes
1099
- */
1100
- export declare function isOtelSpanConventionNode(node: ExtendedCanvasNode): node is OtelSpanConventionNode;
1101
- /**
1102
- * Type guard for OTEL scope nodes
1103
- */
1104
- export declare function isOtelScopeNode(node: ExtendedCanvasNode): node is OtelScopeNode;
1105
- /**
1106
- * Type guard for OTEL resource nodes
1107
- */
1108
- export declare function isOtelResourceNode(node: ExtendedCanvasNode): node is OtelResourceNode;
1109
- /**
1110
- * Type guard for OTEL boundary nodes
1111
- */
1112
- export declare function isOtelBoundaryNode(node: ExtendedCanvasNode): node is OtelBoundaryNode;
1113
- /**
1114
- * Type guard for any OTEL node type
1115
- */
1116
- export declare function isOtelNode(node: ExtendedCanvasNode): node is OtelNode;
1117
- /**
1118
- * Type guard for standard canvas nodes (that may have pv extensions)
1119
- */
1120
- export declare function isStandardCanvasNode(node: ExtendedCanvasNode): node is ExtendedCanvasTextNode | ExtendedCanvasFileNode | ExtendedCanvasLinkNode | ExtendedCanvasGroupNode;
1121
- /**
1122
- * Get the identifier for an OTEL node (shown below the label)
1123
- */
1124
- export declare function getOtelNodeIdentifier(node: OtelNode): string | undefined;
1125
- /**
1126
- * Color preset mapping
1127
- */
1128
- export declare const CANVAS_COLOR_PRESETS: Record<number, string>;
1129
- /**
1130
- * Resolve a canvas color to a hex string
1131
- *
1132
- * Supports:
1133
- * - Hex strings: "#22c55e" or "#3f6"
1134
- * - Numeric presets: 1-6
1135
- * - Numeric string presets: "1"-"6" (Obsidian Canvas format)
1136
- */
1137
- export declare function resolveCanvasColor(color: CanvasColor | undefined): string | undefined;
1138
- //# sourceMappingURL=canvas.d.ts.map