@principal-ai/subsystems-core 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/ConfigurationLoader.d.ts +76 -0
- package/dist/ConfigurationLoader.d.ts.map +1 -0
- package/dist/ConfigurationLoader.js +148 -0
- package/dist/ConfigurationLoader.js.map +1 -0
- package/dist/ConfigurationValidator.d.ts +31 -0
- package/dist/ConfigurationValidator.d.ts.map +1 -0
- package/dist/ConfigurationValidator.js +239 -0
- package/dist/ConfigurationValidator.js.map +1 -0
- package/dist/EventProcessor.d.ts +49 -0
- package/dist/EventProcessor.d.ts.map +1 -0
- package/dist/EventProcessor.js +220 -0
- package/dist/EventProcessor.js.map +1 -0
- package/dist/EventRecorderService.d.ts +305 -0
- package/dist/EventRecorderService.d.ts.map +1 -0
- package/dist/EventRecorderService.js +467 -0
- package/dist/EventRecorderService.js.map +1 -0
- package/dist/LibraryLoader.d.ts +65 -0
- package/dist/LibraryLoader.d.ts.map +1 -0
- package/dist/LibraryLoader.js +197 -0
- package/dist/LibraryLoader.js.map +1 -0
- package/dist/PathBasedEventProcessor.d.ts +77 -0
- package/dist/PathBasedEventProcessor.d.ts.map +1 -0
- package/dist/PathBasedEventProcessor.js +136 -0
- package/dist/PathBasedEventProcessor.js.map +1 -0
- package/dist/SessionManager.d.ts +194 -0
- package/dist/SessionManager.d.ts.map +1 -0
- package/dist/SessionManager.js +302 -0
- package/dist/SessionManager.js.map +1 -0
- package/dist/ValidationEngine.d.ts +31 -0
- package/dist/ValidationEngine.d.ts.map +1 -0
- package/dist/ValidationEngine.js +162 -0
- package/dist/ValidationEngine.js.map +1 -0
- package/dist/agent-sessions/fixture.d.ts +80 -0
- package/dist/agent-sessions/fixture.d.ts.map +1 -0
- package/dist/agent-sessions/fixture.js +130 -0
- package/dist/agent-sessions/fixture.js.map +1 -0
- package/dist/agent-sessions/index.d.ts +3 -0
- package/dist/agent-sessions/index.d.ts.map +1 -0
- package/dist/agent-sessions/index.js +6 -0
- package/dist/agent-sessions/index.js.map +1 -0
- package/dist/auxiliary/AuxiliaryManifestValidator.d.ts +41 -0
- package/dist/auxiliary/AuxiliaryManifestValidator.d.ts.map +1 -0
- package/dist/auxiliary/AuxiliaryManifestValidator.js +100 -0
- package/dist/auxiliary/AuxiliaryManifestValidator.js.map +1 -0
- package/dist/auxiliary/index.d.ts +9 -0
- package/dist/auxiliary/index.d.ts.map +1 -0
- package/dist/auxiliary/index.js +14 -0
- package/dist/auxiliary/index.js.map +1 -0
- package/dist/auxiliary/validateAreaScopeDisjoint.d.ts +24 -0
- package/dist/auxiliary/validateAreaScopeDisjoint.d.ts.map +1 -0
- package/dist/auxiliary/validateAreaScopeDisjoint.js +61 -0
- package/dist/auxiliary/validateAreaScopeDisjoint.js.map +1 -0
- package/dist/cli/codegen.d.ts +41 -0
- package/dist/cli/codegen.d.ts.map +1 -0
- package/dist/cli/codegen.js +257 -0
- package/dist/cli/codegen.js.map +1 -0
- package/dist/codegen/type-generator.d.ts +123 -0
- package/dist/codegen/type-generator.d.ts.map +1 -0
- package/dist/codegen/type-generator.js +433 -0
- package/dist/codegen/type-generator.js.map +1 -0
- package/dist/codegen/usage-example.d.ts +103 -0
- package/dist/codegen/usage-example.d.ts.map +1 -0
- package/dist/codegen/usage-example.js +258 -0
- package/dist/codegen/usage-example.js.map +1 -0
- package/dist/dashboard/DashboardValidator.d.ts +85 -0
- package/dist/dashboard/DashboardValidator.d.ts.map +1 -0
- package/dist/dashboard/DashboardValidator.js +775 -0
- package/dist/dashboard/DashboardValidator.js.map +1 -0
- package/dist/dashboard/index.d.ts +6 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +10 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/discovery/CanvasDiscovery.d.ts +160 -0
- package/dist/discovery/CanvasDiscovery.d.ts.map +1 -0
- package/dist/discovery/CanvasDiscovery.js +865 -0
- package/dist/discovery/CanvasDiscovery.js.map +1 -0
- package/dist/discovery/CanvasFileManifest.d.ts +86 -0
- package/dist/discovery/CanvasFileManifest.d.ts.map +1 -0
- package/dist/discovery/CanvasFileManifest.js +338 -0
- package/dist/discovery/CanvasFileManifest.js.map +1 -0
- package/dist/discovery/LibraryDiscovery.d.ts +108 -0
- package/dist/discovery/LibraryDiscovery.d.ts.map +1 -0
- package/dist/discovery/LibraryDiscovery.js +263 -0
- package/dist/discovery/LibraryDiscovery.js.map +1 -0
- package/dist/discovery/types.d.ts +403 -0
- package/dist/discovery/types.d.ts.map +1 -0
- package/dist/discovery/types.js +6 -0
- package/dist/discovery/types.js.map +1 -0
- package/dist/events/EventsCanvasValidator.d.ts +139 -0
- package/dist/events/EventsCanvasValidator.d.ts.map +1 -0
- package/dist/events/EventsCanvasValidator.js +281 -0
- package/dist/events/EventsCanvasValidator.js.map +1 -0
- package/dist/events/NamespacePathIndex.d.ts +61 -0
- package/dist/events/NamespacePathIndex.d.ts.map +1 -0
- package/dist/events/NamespacePathIndex.js +74 -0
- package/dist/events/NamespacePathIndex.js.map +1 -0
- package/dist/events/OtelEventPathsValidator.d.ts +75 -0
- package/dist/events/OtelEventPathsValidator.d.ts.map +1 -0
- package/dist/events/OtelEventPathsValidator.js +126 -0
- package/dist/events/OtelEventPathsValidator.js.map +1 -0
- package/dist/events/ScopeEventsValidator.d.ts +68 -0
- package/dist/events/ScopeEventsValidator.d.ts.map +1 -0
- package/dist/events/ScopeEventsValidator.js +91 -0
- package/dist/events/ScopeEventsValidator.js.map +1 -0
- package/dist/events/index.d.ts +9 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +12 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/path-helpers.d.ts +33 -0
- package/dist/events/path-helpers.d.ts.map +1 -0
- package/dist/events/path-helpers.js +59 -0
- package/dist/events/path-helpers.js.map +1 -0
- package/dist/execution/ExecutionLoader.d.ts +135 -0
- package/dist/execution/ExecutionLoader.d.ts.map +1 -0
- package/dist/execution/ExecutionLoader.js +266 -0
- package/dist/execution/ExecutionLoader.js.map +1 -0
- package/dist/execution/ExecutionValidator.d.ts +94 -0
- package/dist/execution/ExecutionValidator.d.ts.map +1 -0
- package/dist/execution/ExecutionValidator.js +503 -0
- package/dist/execution/ExecutionValidator.js.map +1 -0
- package/dist/generated/graph-converter-execution.types.d.ts +177 -0
- package/dist/generated/graph-converter-execution.types.d.ts.map +1 -0
- package/dist/generated/graph-converter-execution.types.js +12 -0
- package/dist/generated/graph-converter-execution.types.js.map +1 -0
- package/dist/helpers/GraphInstrumentationHelper.d.ts +93 -0
- package/dist/helpers/GraphInstrumentationHelper.d.ts.map +1 -0
- package/dist/helpers/GraphInstrumentationHelper.js +252 -0
- package/dist/helpers/GraphInstrumentationHelper.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +214 -0
- package/dist/index.js.map +1 -0
- package/dist/matchers/SpanMatcher.d.ts +107 -0
- package/dist/matchers/SpanMatcher.d.ts.map +1 -0
- package/dist/matchers/SpanMatcher.js +274 -0
- package/dist/matchers/SpanMatcher.js.map +1 -0
- package/dist/node.d.ts +78 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +177 -0
- package/dist/node.js.map +1 -0
- package/dist/opencode/OpenCodeEventStore.d.ts +25 -0
- package/dist/opencode/OpenCodeEventStore.d.ts.map +1 -0
- package/dist/opencode/OpenCodeEventStore.js +182 -0
- package/dist/opencode/OpenCodeEventStore.js.map +1 -0
- package/dist/opencode/agent-sessions.d.ts +46 -0
- package/dist/opencode/agent-sessions.d.ts.map +1 -0
- package/dist/opencode/agent-sessions.js +302 -0
- package/dist/opencode/agent-sessions.js.map +1 -0
- package/dist/opencode/index.d.ts +6 -0
- package/dist/opencode/index.d.ts.map +1 -0
- package/dist/opencode/index.js +15 -0
- package/dist/opencode/index.js.map +1 -0
- package/dist/opencode/node-path-adapter.d.ts +25 -0
- package/dist/opencode/node-path-adapter.d.ts.map +1 -0
- package/dist/opencode/node-path-adapter.js +188 -0
- package/dist/opencode/node-path-adapter.js.map +1 -0
- package/dist/opencode/pipeline.d.ts +42 -0
- package/dist/opencode/pipeline.d.ts.map +1 -0
- package/dist/opencode/pipeline.js +90 -0
- package/dist/opencode/pipeline.js.map +1 -0
- package/dist/opencode/types.d.ts +39 -0
- package/dist/opencode/types.d.ts.map +1 -0
- package/dist/opencode/types.js +3 -0
- package/dist/opencode/types.js.map +1 -0
- package/dist/orchestration/TraceOrchestrator.d.ts +71 -0
- package/dist/orchestration/TraceOrchestrator.d.ts.map +1 -0
- package/dist/orchestration/TraceOrchestrator.js +416 -0
- package/dist/orchestration/TraceOrchestrator.js.map +1 -0
- package/dist/parsers/OtlpTraceParser.d.ts +131 -0
- package/dist/parsers/OtlpTraceParser.d.ts.map +1 -0
- package/dist/parsers/OtlpTraceParser.js +310 -0
- package/dist/parsers/OtlpTraceParser.js.map +1 -0
- package/dist/registry/CompositeRegistry.d.ts +71 -0
- package/dist/registry/CompositeRegistry.d.ts.map +1 -0
- package/dist/registry/CompositeRegistry.js +113 -0
- package/dist/registry/CompositeRegistry.js.map +1 -0
- package/dist/registry/EventRegistry.d.ts +79 -0
- package/dist/registry/EventRegistry.d.ts.map +1 -0
- package/dist/registry/EventRegistry.js +165 -0
- package/dist/registry/EventRegistry.js.map +1 -0
- package/dist/registry/LocalRegistry.d.ts +111 -0
- package/dist/registry/LocalRegistry.d.ts.map +1 -0
- package/dist/registry/LocalRegistry.js +335 -0
- package/dist/registry/LocalRegistry.js.map +1 -0
- package/dist/registry/RemoteRegistry.d.ts +122 -0
- package/dist/registry/RemoteRegistry.d.ts.map +1 -0
- package/dist/registry/RemoteRegistry.js +399 -0
- package/dist/registry/RemoteRegistry.js.map +1 -0
- package/dist/registry/VersionRegistry.d.ts +51 -0
- package/dist/registry/VersionRegistry.d.ts.map +1 -0
- package/dist/registry/VersionRegistry.js +105 -0
- package/dist/registry/VersionRegistry.js.map +1 -0
- package/dist/rules/config.d.ts +57 -0
- package/dist/rules/config.d.ts.map +1 -0
- package/dist/rules/config.js +382 -0
- package/dist/rules/config.js.map +1 -0
- package/dist/rules/engine.d.ts +70 -0
- package/dist/rules/engine.d.ts.map +1 -0
- package/dist/rules/engine.js +373 -0
- package/dist/rules/engine.js.map +1 -0
- package/dist/rules/implementations/connection-type-references.d.ts +7 -0
- package/dist/rules/implementations/connection-type-references.d.ts.map +1 -0
- package/dist/rules/implementations/connection-type-references.js +107 -0
- package/dist/rules/implementations/connection-type-references.js.map +1 -0
- package/dist/rules/implementations/dead-end-states.d.ts +17 -0
- package/dist/rules/implementations/dead-end-states.d.ts.map +1 -0
- package/dist/rules/implementations/dead-end-states.js +75 -0
- package/dist/rules/implementations/dead-end-states.js.map +1 -0
- package/dist/rules/implementations/index.d.ts +23 -0
- package/dist/rules/implementations/index.d.ts.map +1 -0
- package/dist/rules/implementations/index.js +73 -0
- package/dist/rules/implementations/index.js.map +1 -0
- package/dist/rules/implementations/minimum-node-sources.d.ts +24 -0
- package/dist/rules/implementations/minimum-node-sources.d.ts.map +1 -0
- package/dist/rules/implementations/minimum-node-sources.js +59 -0
- package/dist/rules/implementations/minimum-node-sources.js.map +1 -0
- package/dist/rules/implementations/no-unknown-fields.d.ts +7 -0
- package/dist/rules/implementations/no-unknown-fields.d.ts.map +1 -0
- package/dist/rules/implementations/no-unknown-fields.js +216 -0
- package/dist/rules/implementations/no-unknown-fields.js.map +1 -0
- package/dist/rules/implementations/orphaned-edge-types.d.ts +7 -0
- package/dist/rules/implementations/orphaned-edge-types.d.ts.map +1 -0
- package/dist/rules/implementations/orphaned-edge-types.js +50 -0
- package/dist/rules/implementations/orphaned-edge-types.js.map +1 -0
- package/dist/rules/implementations/orphaned-node-types.d.ts +7 -0
- package/dist/rules/implementations/orphaned-node-types.d.ts.map +1 -0
- package/dist/rules/implementations/orphaned-node-types.js +53 -0
- package/dist/rules/implementations/orphaned-node-types.js.map +1 -0
- package/dist/rules/implementations/required-metadata.d.ts +7 -0
- package/dist/rules/implementations/required-metadata.d.ts.map +1 -0
- package/dist/rules/implementations/required-metadata.js +48 -0
- package/dist/rules/implementations/required-metadata.js.map +1 -0
- package/dist/rules/implementations/state-transition-references.d.ts +7 -0
- package/dist/rules/implementations/state-transition-references.d.ts.map +1 -0
- package/dist/rules/implementations/state-transition-references.js +138 -0
- package/dist/rules/implementations/state-transition-references.js.map +1 -0
- package/dist/rules/implementations/unreachable-states.d.ts +7 -0
- package/dist/rules/implementations/unreachable-states.d.ts.map +1 -0
- package/dist/rules/implementations/unreachable-states.js +83 -0
- package/dist/rules/implementations/unreachable-states.js.map +1 -0
- package/dist/rules/implementations/valid-action-patterns.d.ts +17 -0
- package/dist/rules/implementations/valid-action-patterns.d.ts.map +1 -0
- package/dist/rules/implementations/valid-action-patterns.js +112 -0
- package/dist/rules/implementations/valid-action-patterns.js.map +1 -0
- package/dist/rules/implementations/valid-color-format.d.ts +7 -0
- package/dist/rules/implementations/valid-color-format.d.ts.map +1 -0
- package/dist/rules/implementations/valid-color-format.js +94 -0
- package/dist/rules/implementations/valid-color-format.js.map +1 -0
- package/dist/rules/implementations/valid-edge-types.d.ts +7 -0
- package/dist/rules/implementations/valid-edge-types.d.ts.map +1 -0
- package/dist/rules/implementations/valid-edge-types.js +248 -0
- package/dist/rules/implementations/valid-edge-types.js.map +1 -0
- package/dist/rules/implementations/valid-node-types.d.ts +7 -0
- package/dist/rules/implementations/valid-node-types.d.ts.map +1 -0
- package/dist/rules/implementations/valid-node-types.js +187 -0
- package/dist/rules/implementations/valid-node-types.js.map +1 -0
- package/dist/rules/index.d.ts +28 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +70 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/types.d.ts +309 -0
- package/dist/rules/types.d.ts.map +1 -0
- package/dist/rules/types.js +40 -0
- package/dist/rules/types.js.map +1 -0
- package/dist/scopes/ScopePathIndex.d.ts +56 -0
- package/dist/scopes/ScopePathIndex.d.ts.map +1 -0
- package/dist/scopes/ScopePathIndex.js +67 -0
- package/dist/scopes/ScopePathIndex.js.map +1 -0
- package/dist/scopes/ScopesCanvasValidator.d.ts +76 -0
- package/dist/scopes/ScopesCanvasValidator.d.ts.map +1 -0
- package/dist/scopes/ScopesCanvasValidator.js +221 -0
- package/dist/scopes/ScopesCanvasValidator.js.map +1 -0
- package/dist/scopes/index.d.ts +12 -0
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/index.js +30 -0
- package/dist/scopes/index.js.map +1 -0
- package/dist/scopes/utils.d.ts +85 -0
- package/dist/scopes/utils.d.ts.map +1 -0
- package/dist/scopes/utils.js +143 -0
- package/dist/scopes/utils.js.map +1 -0
- package/dist/scopes/validateScopeNamespaceNesting.d.ts +38 -0
- package/dist/scopes/validateScopeNamespaceNesting.d.ts.map +1 -0
- package/dist/scopes/validateScopeNamespaceNesting.js +69 -0
- package/dist/scopes/validateScopeNamespaceNesting.js.map +1 -0
- package/dist/spans/index.d.ts +12 -0
- package/dist/spans/index.d.ts.map +1 -0
- package/dist/spans/index.js +25 -0
- package/dist/spans/index.js.map +1 -0
- package/dist/spans/utils.d.ts +70 -0
- package/dist/spans/utils.d.ts.map +1 -0
- package/dist/spans/utils.js +205 -0
- package/dist/spans/utils.js.map +1 -0
- package/dist/storage/topic-types.d.ts +203 -0
- package/dist/storage/topic-types.d.ts.map +1 -0
- package/dist/storage/topic-types.js +60 -0
- package/dist/storage/topic-types.js.map +1 -0
- package/dist/storage/topicStore.d.ts +135 -0
- package/dist/storage/topicStore.d.ts.map +1 -0
- package/dist/storage/topicStore.js +389 -0
- package/dist/storage/topicStore.js.map +1 -0
- package/dist/storyboard/builder.d.ts +135 -0
- package/dist/storyboard/builder.d.ts.map +1 -0
- package/dist/storyboard/builder.js +235 -0
- package/dist/storyboard/builder.js.map +1 -0
- package/dist/storyboard/index.d.ts +9 -0
- package/dist/storyboard/index.d.ts.map +1 -0
- package/dist/storyboard/index.js +18 -0
- package/dist/storyboard/index.js.map +1 -0
- package/dist/storyboard/types.d.ts +101 -0
- package/dist/storyboard/types.d.ts.map +1 -0
- package/dist/storyboard/types.js +10 -0
- package/dist/storyboard/types.js.map +1 -0
- package/dist/telemetry/coverage.d.ts +92 -0
- package/dist/telemetry/coverage.d.ts.map +1 -0
- package/dist/telemetry/coverage.js +335 -0
- package/dist/telemetry/coverage.js.map +1 -0
- package/dist/telemetry/event-validator.d.ts +86 -0
- package/dist/telemetry/event-validator.d.ts.map +1 -0
- package/dist/telemetry/event-validator.js +257 -0
- package/dist/telemetry/event-validator.js.map +1 -0
- package/dist/types/audit.d.ts +236 -0
- package/dist/types/audit.d.ts.map +1 -0
- package/dist/types/audit.js +53 -0
- package/dist/types/audit.js.map +1 -0
- package/dist/types/auxiliary.d.ts +54 -0
- package/dist/types/auxiliary.d.ts.map +1 -0
- package/dist/types/auxiliary.js +27 -0
- package/dist/types/auxiliary.js.map +1 -0
- package/dist/types/canvas-scope.d.ts +156 -0
- package/dist/types/canvas-scope.d.ts.map +1 -0
- package/dist/types/canvas-scope.js +62 -0
- package/dist/types/canvas-scope.js.map +1 -0
- package/dist/types/canvas.d.ts +1138 -0
- package/dist/types/canvas.d.ts.map +1 -0
- package/dist/types/canvas.js +178 -0
- package/dist/types/canvas.js.map +1 -0
- package/dist/types/dashboard.d.ts +170 -0
- package/dist/types/dashboard.d.ts.map +1 -0
- package/dist/types/dashboard.js +14 -0
- package/dist/types/dashboard.js.map +1 -0
- package/dist/types/index.d.ts +352 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +39 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/library.d.ts +227 -0
- package/dist/types/library.d.ts.map +1 -0
- package/dist/types/library.js +16 -0
- package/dist/types/library.js.map +1 -0
- package/dist/types/otel.d.ts +465 -0
- package/dist/types/otel.d.ts.map +1 -0
- package/dist/types/otel.js +163 -0
- package/dist/types/otel.js.map +1 -0
- package/dist/types/path-based-config.d.ts +235 -0
- package/dist/types/path-based-config.d.ts.map +1 -0
- package/dist/types/path-based-config.js +11 -0
- package/dist/types/path-based-config.js.map +1 -0
- package/dist/types/registered-trace.d.ts +337 -0
- package/dist/types/registered-trace.d.ts.map +1 -0
- package/dist/types/registered-trace.js +16 -0
- package/dist/types/registered-trace.js.map +1 -0
- package/dist/types/resource-match.d.ts +207 -0
- package/dist/types/resource-match.d.ts.map +1 -0
- package/dist/types/resource-match.js +74 -0
- package/dist/types/resource-match.js.map +1 -0
- package/dist/types/subsystem-model.d.ts +265 -0
- package/dist/types/subsystem-model.d.ts.map +1 -0
- package/dist/types/subsystem-model.js +35 -0
- package/dist/types/subsystem-model.js.map +1 -0
- package/dist/types/version-registry.d.ts +137 -0
- package/dist/types/version-registry.d.ts.map +1 -0
- package/dist/types/version-registry.js +10 -0
- package/dist/types/version-registry.js.map +1 -0
- package/dist/utils/CanvasConverter.d.ts +148 -0
- package/dist/utils/CanvasConverter.d.ts.map +1 -0
- package/dist/utils/CanvasConverter.js +530 -0
- package/dist/utils/CanvasConverter.js.map +1 -0
- package/dist/utils/GraphConverter.d.ts +18 -0
- package/dist/utils/GraphConverter.d.ts.map +1 -0
- package/dist/utils/GraphConverter.js +80 -0
- package/dist/utils/GraphConverter.js.map +1 -0
- package/dist/utils/PathMatcher.d.ts +55 -0
- package/dist/utils/PathMatcher.d.ts.map +1 -0
- package/dist/utils/PathMatcher.js +178 -0
- package/dist/utils/PathMatcher.js.map +1 -0
- package/dist/utils/TraceToCanvas.d.ts +83 -0
- package/dist/utils/TraceToCanvas.d.ts.map +1 -0
- package/dist/utils/TraceToCanvas.js +336 -0
- package/dist/utils/TraceToCanvas.js.map +1 -0
- package/dist/utils/YamlParser.d.ts +36 -0
- package/dist/utils/YamlParser.d.ts.map +1 -0
- package/dist/utils/YamlParser.js +92 -0
- package/dist/utils/YamlParser.js.map +1 -0
- package/dist/utils/registeredTraceHelpers.d.ts +76 -0
- package/dist/utils/registeredTraceHelpers.d.ts.map +1 -0
- package/dist/utils/registeredTraceHelpers.js +203 -0
- package/dist/utils/registeredTraceHelpers.js.map +1 -0
- package/dist/utils/traceAggregation.d.ts +25 -0
- package/dist/utils/traceAggregation.d.ts.map +1 -0
- package/dist/utils/traceAggregation.js +140 -0
- package/dist/utils/traceAggregation.js.map +1 -0
- package/dist/validation/OtelCanvasValidator.d.ts +40 -0
- package/dist/validation/OtelCanvasValidator.d.ts.map +1 -0
- package/dist/validation/OtelCanvasValidator.js +59 -0
- package/dist/validation/OtelCanvasValidator.js.map +1 -0
- package/dist/validation/index.d.ts +8 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +13 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/libraryValidation.d.ts +53 -0
- package/dist/validation/libraryValidation.d.ts.map +1 -0
- package/dist/validation/libraryValidation.js +115 -0
- package/dist/validation/libraryValidation.js.map +1 -0
- package/dist/workflow/edge-derivation.d.ts +111 -0
- package/dist/workflow/edge-derivation.d.ts.map +1 -0
- package/dist/workflow/edge-derivation.js +174 -0
- package/dist/workflow/edge-derivation.js.map +1 -0
- package/dist/workflow/edge-validation.d.ts +170 -0
- package/dist/workflow/edge-validation.d.ts.map +1 -0
- package/dist/workflow/edge-validation.js +332 -0
- package/dist/workflow/edge-validation.js.map +1 -0
- package/dist/workflow/example.d.ts +11 -0
- package/dist/workflow/example.d.ts.map +1 -0
- package/dist/workflow/example.js +310 -0
- package/dist/workflow/example.js.map +1 -0
- package/dist/workflow/index.d.ts +20 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +49 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/scenario-matcher.d.ts +63 -0
- package/dist/workflow/scenario-matcher.d.ts.map +1 -0
- package/dist/workflow/scenario-matcher.js +215 -0
- package/dist/workflow/scenario-matcher.js.map +1 -0
- package/dist/workflow/template-parser.d.ts +73 -0
- package/dist/workflow/template-parser.d.ts.map +1 -0
- package/dist/workflow/template-parser.js +280 -0
- package/dist/workflow/template-parser.js.map +1 -0
- package/dist/workflow/template-renderer.d.ts +45 -0
- package/dist/workflow/template-renderer.d.ts.map +1 -0
- package/dist/workflow/template-renderer.js +401 -0
- package/dist/workflow/template-renderer.js.map +1 -0
- package/dist/workflow/types.d.ts +393 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +40 -0
- package/dist/workflow/types.js.map +1 -0
- package/dist/workflow/validator.d.ts +363 -0
- package/dist/workflow/validator.d.ts.map +1 -0
- package/dist/workflow/validator.js +2283 -0
- package/dist/workflow/validator.js.map +1 -0
- package/package.json +84 -0
- package/schemas/auxiliary.manifest.schema.json +56 -0
- package/schemas/subsystem-model.schema.json +767 -0
- package/src/ConfigurationLoader.test.ts +466 -0
- package/src/ConfigurationLoader.ts +184 -0
- package/src/ConfigurationValidator.test.ts +200 -0
- package/src/ConfigurationValidator.ts +273 -0
- package/src/EventProcessor.test.ts +405 -0
- package/src/EventProcessor.ts +256 -0
- package/src/EventRecorderService.test.ts +543 -0
- package/src/EventRecorderService.ts +741 -0
- package/src/LibraryLoader.ts +194 -0
- package/src/PathBasedEventProcessor.test.ts +336 -0
- package/src/PathBasedEventProcessor.ts +196 -0
- package/src/SessionManager.test.ts +424 -0
- package/src/SessionManager.ts +471 -0
- package/src/ValidationEngine.test.ts +520 -0
- package/src/ValidationEngine.ts +200 -0
- package/src/agent-sessions/fixture.ts +225 -0
- package/src/agent-sessions/index.ts +10 -0
- package/src/auxiliary/AuxiliaryManifestValidator.test.ts +93 -0
- package/src/auxiliary/AuxiliaryManifestValidator.ts +132 -0
- package/src/auxiliary/index.ts +18 -0
- package/src/auxiliary/validateAreaScopeDisjoint.test.ts +85 -0
- package/src/auxiliary/validateAreaScopeDisjoint.ts +72 -0
- package/src/browser-safety.test.ts +170 -0
- package/src/cli/codegen.ts +286 -0
- package/src/codegen/type-generator.test.ts +219 -0
- package/src/codegen/type-generator.ts +560 -0
- package/src/codegen/usage-example.ts +357 -0
- package/src/dashboard/DashboardValidator.ts +904 -0
- package/src/dashboard/index.ts +14 -0
- package/src/discovery/CanvasDiscovery.test.ts +691 -0
- package/src/discovery/CanvasDiscovery.ts +1114 -0
- package/src/discovery/CanvasFileManifest.test.ts +521 -0
- package/src/discovery/CanvasFileManifest.ts +419 -0
- package/src/discovery/LibraryDiscovery.test.ts +329 -0
- package/src/discovery/LibraryDiscovery.ts +386 -0
- package/src/discovery/types.ts +453 -0
- package/src/events/EventsCanvasValidator.test.ts +191 -0
- package/src/events/EventsCanvasValidator.ts +428 -0
- package/src/events/NamespacePathIndex.test.ts +97 -0
- package/src/events/NamespacePathIndex.ts +100 -0
- package/src/events/OtelEventPathsValidator.test.ts +243 -0
- package/src/events/OtelEventPathsValidator.ts +191 -0
- package/src/events/ScopeEventsValidator.test.ts +173 -0
- package/src/events/ScopeEventsValidator.ts +158 -0
- package/src/events/index.ts +27 -0
- package/src/events/path-helpers.ts +53 -0
- package/src/execution/ExecutionLoader.test.ts +378 -0
- package/src/execution/ExecutionLoader.ts +331 -0
- package/src/execution/ExecutionValidator.test.ts +503 -0
- package/src/execution/ExecutionValidator.ts +617 -0
- package/src/generated/graph-converter-execution.types.ts +193 -0
- package/src/helpers/GraphInstrumentationHelper.test.ts +364 -0
- package/src/helpers/GraphInstrumentationHelper.ts +323 -0
- package/src/index.ts +587 -0
- package/src/matchers/SpanMatcher.test.ts +1105 -0
- package/src/matchers/SpanMatcher.ts +381 -0
- package/src/node.ts +316 -0
- package/src/opencode/EVENT_MAPPING.md +82 -0
- package/src/opencode/OpenCodeEventStore.ts +214 -0
- package/src/opencode/__fixtures__/event-shapes.json +443 -0
- package/src/opencode/__fixtures__/session-events.json +13491 -0
- package/src/opencode/agent-sessions.ts +376 -0
- package/src/opencode/index.ts +23 -0
- package/src/opencode/node-path-adapter.ts +205 -0
- package/src/opencode/pipeline.ts +141 -0
- package/src/opencode/types.ts +43 -0
- package/src/orchestration/TraceOrchestrator.ts +560 -0
- package/src/orchestration/__tests__/TraceOrchestrator.test.ts +1098 -0
- package/src/parsers/OtlpTraceParser.ts +401 -0
- package/src/parsers/__tests__/OtlpTraceParser.test.ts +197 -0
- package/src/registry/CompositeRegistry.ts +140 -0
- package/src/registry/EventRegistry.test.ts +387 -0
- package/src/registry/EventRegistry.ts +191 -0
- package/src/registry/LocalRegistry.ts +416 -0
- package/src/registry/RemoteRegistry.ts +499 -0
- package/src/registry/VersionRegistry.test.ts +223 -0
- package/src/registry/VersionRegistry.ts +121 -0
- package/src/rules/config.test.ts +277 -0
- package/src/rules/config.ts +450 -0
- package/src/rules/engine.test.ts +331 -0
- package/src/rules/engine.ts +448 -0
- package/src/rules/implementations/connection-type-references.ts +117 -0
- package/src/rules/implementations/dead-end-states.ts +101 -0
- package/src/rules/implementations/index.ts +66 -0
- package/src/rules/implementations/minimum-node-sources.ts +84 -0
- package/src/rules/implementations/no-unknown-fields.ts +372 -0
- package/src/rules/implementations/orphaned-edge-types.ts +55 -0
- package/src/rules/implementations/orphaned-node-types.ts +58 -0
- package/src/rules/implementations/required-metadata.ts +52 -0
- package/src/rules/implementations/state-transition-references.ts +155 -0
- package/src/rules/implementations/unreachable-states.ts +94 -0
- package/src/rules/implementations/valid-action-patterns.ts +140 -0
- package/src/rules/implementations/valid-color-format.ts +152 -0
- package/src/rules/implementations/valid-edge-types.ts +273 -0
- package/src/rules/implementations/valid-node-types.ts +200 -0
- package/src/rules/index.ts +92 -0
- package/src/rules/types.ts +426 -0
- package/src/scopes/ScopePathIndex.test.ts +94 -0
- package/src/scopes/ScopePathIndex.ts +89 -0
- package/src/scopes/ScopesCanvasValidator.test.ts +127 -0
- package/src/scopes/ScopesCanvasValidator.ts +305 -0
- package/src/scopes/__tests__/utils.test.ts +383 -0
- package/src/scopes/index.ts +42 -0
- package/src/scopes/utils.ts +182 -0
- package/src/scopes/validateScopeNamespaceNesting.test.ts +127 -0
- package/src/scopes/validateScopeNamespaceNesting.ts +88 -0
- package/src/spans/index.ts +24 -0
- package/src/spans/utils.ts +249 -0
- package/src/storage/topic-types.ts +235 -0
- package/src/storage/topicStore.test.ts +193 -0
- package/src/storage/topicStore.ts +489 -0
- package/src/storyboard/builder.ts +308 -0
- package/src/storyboard/index.ts +26 -0
- package/src/storyboard/types.ts +117 -0
- package/src/telemetry/coverage.ts +480 -0
- package/src/telemetry/event-validator.ts +312 -0
- package/src/types/audit.ts +314 -0
- package/src/types/auxiliary.ts +63 -0
- package/src/types/canvas-scope.ts +190 -0
- package/src/types/canvas.test.ts +199 -0
- package/src/types/canvas.ts +1395 -0
- package/src/types/dashboard.ts +257 -0
- package/src/types/index.ts +460 -0
- package/src/types/library.ts +283 -0
- package/src/types/otel.test.ts +219 -0
- package/src/types/otel.ts +620 -0
- package/src/types/path-based-config.ts +285 -0
- package/src/types/registered-trace.ts +432 -0
- package/src/types/resource-match.ts +263 -0
- package/src/types/subsystem-model.ts +352 -0
- package/src/types/version-registry.ts +150 -0
- package/src/utils/CanvasConverter.ts +670 -0
- package/src/utils/GraphConverter.test.ts +322 -0
- package/src/utils/GraphConverter.ts +84 -0
- package/src/utils/PathMatcher.test.ts +139 -0
- package/src/utils/PathMatcher.ts +185 -0
- package/src/utils/TraceToCanvas.test.ts +310 -0
- package/src/utils/TraceToCanvas.ts +510 -0
- package/src/utils/YamlParser.ts +77 -0
- package/src/utils/registeredTraceHelpers.ts +251 -0
- package/src/utils/traceAggregation.test.ts +385 -0
- package/src/utils/traceAggregation.ts +173 -0
- package/src/validation/OtelCanvasValidator.ts +86 -0
- package/src/validation/index.ts +17 -0
- package/src/validation/libraryValidation.ts +206 -0
- package/src/workflow/README.md +408 -0
- package/src/workflow/__tests__/edge-derivation.test.ts +449 -0
- package/src/workflow/__tests__/edge-validation.test.ts +417 -0
- package/src/workflow/__tests__/scenario-matcher.test.ts +225 -0
- package/src/workflow/__tests__/template-parser.test.ts +276 -0
- package/src/workflow/__tests__/template-renderer.test.ts +509 -0
- package/src/workflow/__tests__/types.test.ts +187 -0
- package/src/workflow/__tests__/validator.test.ts +3225 -0
- package/src/workflow/edge-derivation.ts +265 -0
- package/src/workflow/edge-validation.ts +503 -0
- package/src/workflow/example.ts +330 -0
- package/src/workflow/index.ts +86 -0
- package/src/workflow/scenario-matcher.ts +253 -0
- package/src/workflow/template-parser.ts +350 -0
- package/src/workflow/template-renderer.ts +453 -0
- package/src/workflow/types.ts +511 -0
- package/src/workflow/validator.ts +2737 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @principal-ai/subsystems-core
|
|
4
|
+
* Browser-safe exports (no Node.js dependencies)
|
|
5
|
+
*
|
|
6
|
+
* This is the main entry point for the package and only includes browser-compatible code.
|
|
7
|
+
* Includes types, canvas utilities, YAML parsing, and workflow rendering.
|
|
8
|
+
*
|
|
9
|
+
* For Node.js-specific functionality (file system utilities, etc.), use:
|
|
10
|
+
* import { ... } from '@principal-ai/subsystems-core/node'
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.isWarnSeverity = exports.isErrorSeverity = exports.getSpanDuration = exports.parseNanoTime = exports.flattenResourceAttributes = exports.getAttributeValue = exports.findAttribute = exports.getAttributeStringValue = exports.TraceOrchestrator = exports.CompositeRegistry = exports.LocalRegistry = exports.RemoteRegistry = exports.OtlpTraceParser = exports.getWorkflowRootSpan = exports.getEventSpan = exports.getEventTemplateString = exports.isEventTemplate = exports.deriveEdgesFromSequence = exports.extractEventSpans = exports.setNestedValue = exports.getNestedValue = exports.computeAggregates = exports.hasEventMatching = exports.getRequiredEvents = exports.selectScenario = exports.ParsedTemplate = exports.parseTemplate = exports.renderEventTemplate = exports.renderWorkflow = exports.getConfigNameFromFilename = exports.isYamlFile = exports.parseYaml = exports.CanvasConverter = exports.resolveCanvasColor = exports.CANVAS_COLOR_PRESETS = exports.getOtelNodeIdentifier = exports.isOtelNode = exports.isOtelBoundaryNode = exports.isOtelResourceNode = exports.isOtelScopeNode = exports.isOtelSpanConventionNode = exports.isOtelEventNode = exports.isStandardCanvasNode = exports.hasPVExtension = exports.isGroupNode = exports.isLinkNode = exports.isFileNode = exports.isTextNode = exports.isSubsystemModelDocument = exports.isAuxiliaryManifest = void 0;
|
|
14
|
+
exports.SessionManager = exports.PathBasedEventProcessor = exports.analyzeCoverage = exports.createDashboardValidator = exports.DashboardValidator = exports.createExecutionValidator = exports.ExecutionValidator = exports.resolveEventSpanColor = exports.getSpanColor = exports.matchSpanPattern = exports.buildSpanColorMapFromCanvases = exports.buildSpanColorMap = exports.extractSpanConventions = exports.extractSpanConvention = exports.DEFAULT_SPAN_COLOR = exports.OtelEventPathsValidator = exports.NamespacePathIndex = exports.EventsCanvasValidator = exports.getAllScopeNames = exports.buildScopeColorMap = exports.normalizeScopes = exports.getScopeColor = exports.getScopeDefinition = exports.getScopeNames = exports.DRAFT_NODE_COLOR = exports.DEFAULT_SCOPE_COLOR = exports.validateScopeNamespaceNesting = exports.ScopePathIndex = exports.ScopesCanvasValidator = exports.buildStoryboardFileManifest = exports.buildWorkflowFileManifest = exports.buildCanvasFileManifest = exports.CanvasDiscovery = exports.SpanMatcher = exports.getScopeMatchSummary = exports.scopeHasMatches = exports.getScopeWithMostSpans = exports.getSpanCountForScope = exports.findScopeByName = exports.getUnmatchedScopes = exports.getPartialMatchedScopes = exports.getMatchedScopes = exports.getAllScopes = exports.getPrimaryScope = exports.getScopeFromUnmatchedSpan = exports.getScopeFromStoryboardMatch = exports.getScopeFromScenarioMatch = exports.groupSpansByTrace = exports.createInMemoryVersionRegistry = exports.InMemoryVersionRegistry = void 0;
|
|
15
|
+
exports.publishedFromDraft = exports.InMemoryFileSystemAdapter = exports.getAllNodeIds = exports.findNodesMatchingEventPattern = exports.resolveWorkflowNodeIds = exports.resolveScenarioNodeIds = exports.getNodeEventName = exports.buildEventNodeMap = exports.buildStoryboardContext = exports.LibraryDiscovery = exports.validateLibraryStructure = exports.LibraryLoader = exports.EventRecorderService = void 0;
|
|
16
|
+
// Import canvas utility functions to re-export (avoids export-from syntax that breaks with exports field)
|
|
17
|
+
const canvas_1 = require("./types/canvas");
|
|
18
|
+
Object.defineProperty(exports, "isTextNode", { enumerable: true, get: function () { return canvas_1.isTextNode; } });
|
|
19
|
+
Object.defineProperty(exports, "isFileNode", { enumerable: true, get: function () { return canvas_1.isFileNode; } });
|
|
20
|
+
Object.defineProperty(exports, "isLinkNode", { enumerable: true, get: function () { return canvas_1.isLinkNode; } });
|
|
21
|
+
Object.defineProperty(exports, "isGroupNode", { enumerable: true, get: function () { return canvas_1.isGroupNode; } });
|
|
22
|
+
Object.defineProperty(exports, "hasPVExtension", { enumerable: true, get: function () { return canvas_1.hasPVExtension; } });
|
|
23
|
+
Object.defineProperty(exports, "isStandardCanvasNode", { enumerable: true, get: function () { return canvas_1.isStandardCanvasNode; } });
|
|
24
|
+
Object.defineProperty(exports, "isOtelEventNode", { enumerable: true, get: function () { return canvas_1.isOtelEventNode; } });
|
|
25
|
+
Object.defineProperty(exports, "isOtelSpanConventionNode", { enumerable: true, get: function () { return canvas_1.isOtelSpanConventionNode; } });
|
|
26
|
+
Object.defineProperty(exports, "isOtelScopeNode", { enumerable: true, get: function () { return canvas_1.isOtelScopeNode; } });
|
|
27
|
+
Object.defineProperty(exports, "isOtelResourceNode", { enumerable: true, get: function () { return canvas_1.isOtelResourceNode; } });
|
|
28
|
+
Object.defineProperty(exports, "isOtelBoundaryNode", { enumerable: true, get: function () { return canvas_1.isOtelBoundaryNode; } });
|
|
29
|
+
Object.defineProperty(exports, "isOtelNode", { enumerable: true, get: function () { return canvas_1.isOtelNode; } });
|
|
30
|
+
Object.defineProperty(exports, "getOtelNodeIdentifier", { enumerable: true, get: function () { return canvas_1.getOtelNodeIdentifier; } });
|
|
31
|
+
Object.defineProperty(exports, "CANVAS_COLOR_PRESETS", { enumerable: true, get: function () { return canvas_1.CANVAS_COLOR_PRESETS; } });
|
|
32
|
+
Object.defineProperty(exports, "resolveCanvasColor", { enumerable: true, get: function () { return canvas_1.resolveCanvasColor; } });
|
|
33
|
+
// Auxiliary manifest type guard (browser-safe runtime helper)
|
|
34
|
+
var auxiliary_1 = require("./types/auxiliary");
|
|
35
|
+
Object.defineProperty(exports, "isAuxiliaryManifest", { enumerable: true, get: function () { return auxiliary_1.isAuxiliaryManifest; } });
|
|
36
|
+
// Subsystem model type guard (browser-safe runtime helper)
|
|
37
|
+
var subsystem_model_1 = require("./types/subsystem-model");
|
|
38
|
+
Object.defineProperty(exports, "isSubsystemModelDocument", { enumerable: true, get: function () { return subsystem_model_1.isSubsystemModelDocument; } });
|
|
39
|
+
var CanvasConverter_1 = require("./utils/CanvasConverter");
|
|
40
|
+
Object.defineProperty(exports, "CanvasConverter", { enumerable: true, get: function () { return CanvasConverter_1.CanvasConverter; } });
|
|
41
|
+
// Export YAML parsing (browser-compatible)
|
|
42
|
+
var YamlParser_1 = require("./utils/YamlParser");
|
|
43
|
+
Object.defineProperty(exports, "parseYaml", { enumerable: true, get: function () { return YamlParser_1.parseYaml; } });
|
|
44
|
+
Object.defineProperty(exports, "isYamlFile", { enumerable: true, get: function () { return YamlParser_1.isYamlFile; } });
|
|
45
|
+
Object.defineProperty(exports, "getConfigNameFromFilename", { enumerable: true, get: function () { return YamlParser_1.getConfigNameFromFilename; } });
|
|
46
|
+
// Export workflow template system (browser-safe)
|
|
47
|
+
// Import directly from files to avoid pulling in Node.js validator
|
|
48
|
+
var template_renderer_1 = require("./workflow/template-renderer");
|
|
49
|
+
Object.defineProperty(exports, "renderWorkflow", { enumerable: true, get: function () { return template_renderer_1.renderWorkflow; } });
|
|
50
|
+
Object.defineProperty(exports, "renderEventTemplate", { enumerable: true, get: function () { return template_renderer_1.renderEventTemplate; } });
|
|
51
|
+
var template_parser_1 = require("./workflow/template-parser");
|
|
52
|
+
Object.defineProperty(exports, "parseTemplate", { enumerable: true, get: function () { return template_parser_1.parseTemplate; } });
|
|
53
|
+
Object.defineProperty(exports, "ParsedTemplate", { enumerable: true, get: function () { return template_parser_1.ParsedTemplate; } });
|
|
54
|
+
var scenario_matcher_1 = require("./workflow/scenario-matcher");
|
|
55
|
+
Object.defineProperty(exports, "selectScenario", { enumerable: true, get: function () { return scenario_matcher_1.selectScenario; } });
|
|
56
|
+
Object.defineProperty(exports, "getRequiredEvents", { enumerable: true, get: function () { return scenario_matcher_1.getRequiredEvents; } });
|
|
57
|
+
Object.defineProperty(exports, "hasEventMatching", { enumerable: true, get: function () { return scenario_matcher_1.hasEventMatching; } });
|
|
58
|
+
Object.defineProperty(exports, "computeAggregates", { enumerable: true, get: function () { return scenario_matcher_1.computeAggregates; } });
|
|
59
|
+
Object.defineProperty(exports, "getNestedValue", { enumerable: true, get: function () { return scenario_matcher_1.getNestedValue; } });
|
|
60
|
+
Object.defineProperty(exports, "setNestedValue", { enumerable: true, get: function () { return scenario_matcher_1.setNestedValue; } });
|
|
61
|
+
var edge_derivation_1 = require("./workflow/edge-derivation");
|
|
62
|
+
Object.defineProperty(exports, "extractEventSpans", { enumerable: true, get: function () { return edge_derivation_1.extractEventSpans; } });
|
|
63
|
+
Object.defineProperty(exports, "deriveEdgesFromSequence", { enumerable: true, get: function () { return edge_derivation_1.deriveEdgesFromSequence; } });
|
|
64
|
+
var types_1 = require("./workflow/types");
|
|
65
|
+
Object.defineProperty(exports, "isEventTemplate", { enumerable: true, get: function () { return types_1.isEventTemplate; } });
|
|
66
|
+
Object.defineProperty(exports, "getEventTemplateString", { enumerable: true, get: function () { return types_1.getEventTemplateString; } });
|
|
67
|
+
Object.defineProperty(exports, "getEventSpan", { enumerable: true, get: function () { return types_1.getEventSpan; } });
|
|
68
|
+
Object.defineProperty(exports, "getWorkflowRootSpan", { enumerable: true, get: function () { return types_1.getWorkflowRootSpan; } });
|
|
69
|
+
// Export OTLP trace parser
|
|
70
|
+
var OtlpTraceParser_1 = require("./parsers/OtlpTraceParser");
|
|
71
|
+
Object.defineProperty(exports, "OtlpTraceParser", { enumerable: true, get: function () { return OtlpTraceParser_1.OtlpTraceParser; } });
|
|
72
|
+
// Export storyboard registries
|
|
73
|
+
var RemoteRegistry_1 = require("./registry/RemoteRegistry");
|
|
74
|
+
Object.defineProperty(exports, "RemoteRegistry", { enumerable: true, get: function () { return RemoteRegistry_1.RemoteRegistry; } });
|
|
75
|
+
var LocalRegistry_1 = require("./registry/LocalRegistry");
|
|
76
|
+
Object.defineProperty(exports, "LocalRegistry", { enumerable: true, get: function () { return LocalRegistry_1.LocalRegistry; } });
|
|
77
|
+
var CompositeRegistry_1 = require("./registry/CompositeRegistry");
|
|
78
|
+
Object.defineProperty(exports, "CompositeRegistry", { enumerable: true, get: function () { return CompositeRegistry_1.CompositeRegistry; } });
|
|
79
|
+
// Export trace orchestrator
|
|
80
|
+
var TraceOrchestrator_1 = require("./orchestration/TraceOrchestrator");
|
|
81
|
+
Object.defineProperty(exports, "TraceOrchestrator", { enumerable: true, get: function () { return TraceOrchestrator_1.TraceOrchestrator; } });
|
|
82
|
+
// Export OTEL helper functions
|
|
83
|
+
var otel_1 = require("./types/otel");
|
|
84
|
+
Object.defineProperty(exports, "getAttributeStringValue", { enumerable: true, get: function () { return otel_1.getAttributeStringValue; } });
|
|
85
|
+
Object.defineProperty(exports, "findAttribute", { enumerable: true, get: function () { return otel_1.findAttribute; } });
|
|
86
|
+
Object.defineProperty(exports, "getAttributeValue", { enumerable: true, get: function () { return otel_1.getAttributeValue; } });
|
|
87
|
+
Object.defineProperty(exports, "flattenResourceAttributes", { enumerable: true, get: function () { return otel_1.flattenResourceAttributes; } });
|
|
88
|
+
Object.defineProperty(exports, "parseNanoTime", { enumerable: true, get: function () { return otel_1.parseNanoTime; } });
|
|
89
|
+
Object.defineProperty(exports, "getSpanDuration", { enumerable: true, get: function () { return otel_1.getSpanDuration; } });
|
|
90
|
+
Object.defineProperty(exports, "isErrorSeverity", { enumerable: true, get: function () { return otel_1.isErrorSeverity; } });
|
|
91
|
+
Object.defineProperty(exports, "isWarnSeverity", { enumerable: true, get: function () { return otel_1.isWarnSeverity; } });
|
|
92
|
+
var VersionRegistry_1 = require("./registry/VersionRegistry");
|
|
93
|
+
Object.defineProperty(exports, "InMemoryVersionRegistry", { enumerable: true, get: function () { return VersionRegistry_1.InMemoryVersionRegistry; } });
|
|
94
|
+
Object.defineProperty(exports, "createInMemoryVersionRegistry", { enumerable: true, get: function () { return VersionRegistry_1.createInMemoryVersionRegistry; } });
|
|
95
|
+
// Export trace aggregation utilities
|
|
96
|
+
var traceAggregation_1 = require("./utils/traceAggregation");
|
|
97
|
+
Object.defineProperty(exports, "groupSpansByTrace", { enumerable: true, get: function () { return traceAggregation_1.groupSpansByTrace; } });
|
|
98
|
+
// Export RegisteredTrace helper utilities
|
|
99
|
+
var registeredTraceHelpers_1 = require("./utils/registeredTraceHelpers");
|
|
100
|
+
Object.defineProperty(exports, "getScopeFromScenarioMatch", { enumerable: true, get: function () { return registeredTraceHelpers_1.getScopeFromScenarioMatch; } });
|
|
101
|
+
Object.defineProperty(exports, "getScopeFromStoryboardMatch", { enumerable: true, get: function () { return registeredTraceHelpers_1.getScopeFromStoryboardMatch; } });
|
|
102
|
+
Object.defineProperty(exports, "getScopeFromUnmatchedSpan", { enumerable: true, get: function () { return registeredTraceHelpers_1.getScopeFromUnmatchedSpan; } });
|
|
103
|
+
Object.defineProperty(exports, "getPrimaryScope", { enumerable: true, get: function () { return registeredTraceHelpers_1.getPrimaryScope; } });
|
|
104
|
+
Object.defineProperty(exports, "getAllScopes", { enumerable: true, get: function () { return registeredTraceHelpers_1.getAllScopes; } });
|
|
105
|
+
Object.defineProperty(exports, "getMatchedScopes", { enumerable: true, get: function () { return registeredTraceHelpers_1.getMatchedScopes; } });
|
|
106
|
+
Object.defineProperty(exports, "getPartialMatchedScopes", { enumerable: true, get: function () { return registeredTraceHelpers_1.getPartialMatchedScopes; } });
|
|
107
|
+
Object.defineProperty(exports, "getUnmatchedScopes", { enumerable: true, get: function () { return registeredTraceHelpers_1.getUnmatchedScopes; } });
|
|
108
|
+
Object.defineProperty(exports, "findScopeByName", { enumerable: true, get: function () { return registeredTraceHelpers_1.findScopeByName; } });
|
|
109
|
+
Object.defineProperty(exports, "getSpanCountForScope", { enumerable: true, get: function () { return registeredTraceHelpers_1.getSpanCountForScope; } });
|
|
110
|
+
Object.defineProperty(exports, "getScopeWithMostSpans", { enumerable: true, get: function () { return registeredTraceHelpers_1.getScopeWithMostSpans; } });
|
|
111
|
+
Object.defineProperty(exports, "scopeHasMatches", { enumerable: true, get: function () { return registeredTraceHelpers_1.scopeHasMatches; } });
|
|
112
|
+
Object.defineProperty(exports, "getScopeMatchSummary", { enumerable: true, get: function () { return registeredTraceHelpers_1.getScopeMatchSummary; } });
|
|
113
|
+
// Export span matcher
|
|
114
|
+
var SpanMatcher_1 = require("./matchers/SpanMatcher");
|
|
115
|
+
Object.defineProperty(exports, "SpanMatcher", { enumerable: true, get: function () { return SpanMatcher_1.SpanMatcher; } });
|
|
116
|
+
// Export canvas, workflow, and test trace discovery (browser-safe)
|
|
117
|
+
var CanvasDiscovery_1 = require("./discovery/CanvasDiscovery");
|
|
118
|
+
Object.defineProperty(exports, "CanvasDiscovery", { enumerable: true, get: function () { return CanvasDiscovery_1.CanvasDiscovery; } });
|
|
119
|
+
// Export file manifest builders (browser-safe)
|
|
120
|
+
var CanvasFileManifest_1 = require("./discovery/CanvasFileManifest");
|
|
121
|
+
Object.defineProperty(exports, "buildCanvasFileManifest", { enumerable: true, get: function () { return CanvasFileManifest_1.buildCanvasFileManifest; } });
|
|
122
|
+
Object.defineProperty(exports, "buildWorkflowFileManifest", { enumerable: true, get: function () { return CanvasFileManifest_1.buildWorkflowFileManifest; } });
|
|
123
|
+
Object.defineProperty(exports, "buildStoryboardFileManifest", { enumerable: true, get: function () { return CanvasFileManifest_1.buildStoryboardFileManifest; } });
|
|
124
|
+
// Export scopes module (canvas validation + scope utilities)
|
|
125
|
+
var scopes_1 = require("./scopes");
|
|
126
|
+
Object.defineProperty(exports, "ScopesCanvasValidator", { enumerable: true, get: function () { return scopes_1.ScopesCanvasValidator; } });
|
|
127
|
+
Object.defineProperty(exports, "ScopePathIndex", { enumerable: true, get: function () { return scopes_1.ScopePathIndex; } });
|
|
128
|
+
Object.defineProperty(exports, "validateScopeNamespaceNesting", { enumerable: true, get: function () { return scopes_1.validateScopeNamespaceNesting; } });
|
|
129
|
+
Object.defineProperty(exports, "DEFAULT_SCOPE_COLOR", { enumerable: true, get: function () { return scopes_1.DEFAULT_SCOPE_COLOR; } });
|
|
130
|
+
Object.defineProperty(exports, "DRAFT_NODE_COLOR", { enumerable: true, get: function () { return scopes_1.DRAFT_NODE_COLOR; } });
|
|
131
|
+
Object.defineProperty(exports, "getScopeNames", { enumerable: true, get: function () { return scopes_1.getScopeNames; } });
|
|
132
|
+
Object.defineProperty(exports, "getScopeDefinition", { enumerable: true, get: function () { return scopes_1.getScopeDefinition; } });
|
|
133
|
+
Object.defineProperty(exports, "getScopeColor", { enumerable: true, get: function () { return scopes_1.getScopeColor; } });
|
|
134
|
+
Object.defineProperty(exports, "normalizeScopes", { enumerable: true, get: function () { return scopes_1.normalizeScopes; } });
|
|
135
|
+
Object.defineProperty(exports, "buildScopeColorMap", { enumerable: true, get: function () { return scopes_1.buildScopeColorMap; } });
|
|
136
|
+
Object.defineProperty(exports, "getAllScopeNames", { enumerable: true, get: function () { return scopes_1.getAllScopeNames; } });
|
|
137
|
+
// Export events module (event namespace canvas validation)
|
|
138
|
+
var events_1 = require("./events");
|
|
139
|
+
Object.defineProperty(exports, "EventsCanvasValidator", { enumerable: true, get: function () { return events_1.EventsCanvasValidator; } });
|
|
140
|
+
Object.defineProperty(exports, "NamespacePathIndex", { enumerable: true, get: function () { return events_1.NamespacePathIndex; } });
|
|
141
|
+
Object.defineProperty(exports, "OtelEventPathsValidator", { enumerable: true, get: function () { return events_1.OtelEventPathsValidator; } });
|
|
142
|
+
// Export spans module (span conventions + span color utilities)
|
|
143
|
+
var spans_1 = require("./spans");
|
|
144
|
+
Object.defineProperty(exports, "DEFAULT_SPAN_COLOR", { enumerable: true, get: function () { return spans_1.DEFAULT_SPAN_COLOR; } });
|
|
145
|
+
Object.defineProperty(exports, "extractSpanConvention", { enumerable: true, get: function () { return spans_1.extractSpanConvention; } });
|
|
146
|
+
Object.defineProperty(exports, "extractSpanConventions", { enumerable: true, get: function () { return spans_1.extractSpanConventions; } });
|
|
147
|
+
Object.defineProperty(exports, "buildSpanColorMap", { enumerable: true, get: function () { return spans_1.buildSpanColorMap; } });
|
|
148
|
+
Object.defineProperty(exports, "buildSpanColorMapFromCanvases", { enumerable: true, get: function () { return spans_1.buildSpanColorMapFromCanvases; } });
|
|
149
|
+
Object.defineProperty(exports, "matchSpanPattern", { enumerable: true, get: function () { return spans_1.matchSpanPattern; } });
|
|
150
|
+
Object.defineProperty(exports, "getSpanColor", { enumerable: true, get: function () { return spans_1.getSpanColor; } });
|
|
151
|
+
Object.defineProperty(exports, "resolveEventSpanColor", { enumerable: true, get: function () { return spans_1.resolveEventSpanColor; } });
|
|
152
|
+
// Export execution validation (browser-safe - no Node.js dependencies)
|
|
153
|
+
var ExecutionValidator_1 = require("./execution/ExecutionValidator");
|
|
154
|
+
Object.defineProperty(exports, "ExecutionValidator", { enumerable: true, get: function () { return ExecutionValidator_1.ExecutionValidator; } });
|
|
155
|
+
Object.defineProperty(exports, "createExecutionValidator", { enumerable: true, get: function () { return ExecutionValidator_1.createExecutionValidator; } });
|
|
156
|
+
// Export dashboard validation (browser-safe - no Node.js dependencies)
|
|
157
|
+
var dashboard_1 = require("./dashboard");
|
|
158
|
+
Object.defineProperty(exports, "DashboardValidator", { enumerable: true, get: function () { return dashboard_1.DashboardValidator; } });
|
|
159
|
+
Object.defineProperty(exports, "createDashboardValidator", { enumerable: true, get: function () { return dashboard_1.createDashboardValidator; } });
|
|
160
|
+
// Export telemetry coverage analysis (browser-safe - uses FileTree abstraction)
|
|
161
|
+
var coverage_1 = require("./telemetry/coverage");
|
|
162
|
+
Object.defineProperty(exports, "analyzeCoverage", { enumerable: true, get: function () { return coverage_1.analyzeCoverage; } });
|
|
163
|
+
// Export path-based processing (browser-safe - Milestone 1 & 2)
|
|
164
|
+
var PathBasedEventProcessor_1 = require("./PathBasedEventProcessor");
|
|
165
|
+
Object.defineProperty(exports, "PathBasedEventProcessor", { enumerable: true, get: function () { return PathBasedEventProcessor_1.PathBasedEventProcessor; } });
|
|
166
|
+
// Export session management (browser-safe - Event Recording System)
|
|
167
|
+
var SessionManager_1 = require("./SessionManager");
|
|
168
|
+
Object.defineProperty(exports, "SessionManager", { enumerable: true, get: function () { return SessionManager_1.SessionManager; } });
|
|
169
|
+
// Export event recorder service (browser-safe)
|
|
170
|
+
var EventRecorderService_1 = require("./EventRecorderService");
|
|
171
|
+
Object.defineProperty(exports, "EventRecorderService", { enumerable: true, get: function () { return EventRecorderService_1.EventRecorderService; } });
|
|
172
|
+
// Export component library support (browser-safe - uses FileSystemAdapter abstraction)
|
|
173
|
+
var LibraryLoader_1 = require("./LibraryLoader");
|
|
174
|
+
Object.defineProperty(exports, "LibraryLoader", { enumerable: true, get: function () { return LibraryLoader_1.LibraryLoader; } });
|
|
175
|
+
// Export library validation (browser-safe - standalone validation functions)
|
|
176
|
+
var validation_1 = require("./validation");
|
|
177
|
+
Object.defineProperty(exports, "validateLibraryStructure", { enumerable: true, get: function () { return validation_1.validateLibraryStructure; } });
|
|
178
|
+
// Export library discovery (browser-safe - uses FileSystemAdapter abstraction)
|
|
179
|
+
var LibraryDiscovery_1 = require("./discovery/LibraryDiscovery");
|
|
180
|
+
Object.defineProperty(exports, "LibraryDiscovery", { enumerable: true, get: function () { return LibraryDiscovery_1.LibraryDiscovery; } });
|
|
181
|
+
var index_1 = require("./storyboard/index");
|
|
182
|
+
Object.defineProperty(exports, "buildStoryboardContext", { enumerable: true, get: function () { return index_1.buildStoryboardContext; } });
|
|
183
|
+
Object.defineProperty(exports, "buildEventNodeMap", { enumerable: true, get: function () { return index_1.buildEventNodeMap; } });
|
|
184
|
+
Object.defineProperty(exports, "getNodeEventName", { enumerable: true, get: function () { return index_1.getNodeEventName; } });
|
|
185
|
+
Object.defineProperty(exports, "resolveScenarioNodeIds", { enumerable: true, get: function () { return index_1.resolveScenarioNodeIds; } });
|
|
186
|
+
Object.defineProperty(exports, "resolveWorkflowNodeIds", { enumerable: true, get: function () { return index_1.resolveWorkflowNodeIds; } });
|
|
187
|
+
Object.defineProperty(exports, "findNodesMatchingEventPattern", { enumerable: true, get: function () { return index_1.findNodesMatchingEventPattern; } });
|
|
188
|
+
Object.defineProperty(exports, "getAllNodeIds", { enumerable: true, get: function () { return index_1.getAllNodeIds; } });
|
|
189
|
+
var repository_abstraction_1 = require("@principal-ai/repository-abstraction");
|
|
190
|
+
Object.defineProperty(exports, "InMemoryFileSystemAdapter", { enumerable: true, get: function () { return repository_abstraction_1.InMemoryFileSystemAdapter; } });
|
|
191
|
+
// Canonical topic storage contract (browser-safe types + Draft->Published
|
|
192
|
+
// projection). The file-per-topic store that reads/writes these is node-only;
|
|
193
|
+
// import it from '@principal-ai/subsystems-core/node'.
|
|
194
|
+
var topic_types_1 = require("./storage/topic-types");
|
|
195
|
+
Object.defineProperty(exports, "publishedFromDraft", { enumerable: true, get: function () { return topic_types_1.publishedFromDraft; } });
|
|
196
|
+
// NOTE: The following require Node.js dependencies and are NOT exported in the main bundle.
|
|
197
|
+
// Use '@principal-ai/subsystems-core/node' for Node.js-specific functionality:
|
|
198
|
+
//
|
|
199
|
+
// - EventProcessor, ValidationEngine, ConfigurationValidator (Node.js processing)
|
|
200
|
+
// - OpenCodeEventStore, OpenCodeEventRetriever (opencode event reading)
|
|
201
|
+
// - GraphInstrumentationHelper (Node.js utilities)
|
|
202
|
+
// - PathMatcher, GraphConverter (Node.js utilities)
|
|
203
|
+
// - EventValidator, createValidatedEmitter (Node.js telemetry)
|
|
204
|
+
// - generateTypes, TypeScriptGenerator, generatorRegistry (code generation - file system)
|
|
205
|
+
// - traceToCanvas, traceToCanvasJson (trace utilities)
|
|
206
|
+
// - Rules engine (OpenTelemetry dependencies)
|
|
207
|
+
// - NarrativeValidator, createNarrativeValidator (Node.js validator)
|
|
208
|
+
// - ExecutionLoader, createExecutionLoader (file system loader)
|
|
209
|
+
//
|
|
210
|
+
// For building FileTree from filesystem, use FilesystemService from @principal-ai/codebase-composition:
|
|
211
|
+
// import { FilesystemService, NodeFileSystemAdapter } from '@principal-ai/codebase-composition/node';
|
|
212
|
+
// const service = new FilesystemService(new NodeFileSystemAdapter());
|
|
213
|
+
// const fileTree = await service.buildFileSystemTreeFromPath(rootDir);
|
|
214
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;AAEH,0GAA0G;AAC1G,2CAgBwB;AA4HtB,2FA3IA,mBAAU,OA2IA;AACV,2FA3IA,mBAAU,OA2IA;AACV,2FA3IA,mBAAU,OA2IA;AACV,4FA3IA,oBAAW,OA2IA;AACX,+FA3IA,uBAAc,OA2IA;AACd,qGA3IA,6BAAoB,OA2IA;AACpB,gGA3IA,wBAAe,OA2IA;AACf,yGA3IA,iCAAwB,OA2IA;AACxB,gGA3IA,wBAAe,OA2IA;AACf,mGA3IA,2BAAkB,OA2IA;AAClB,mGA3IA,2BAAkB,OA2IA;AAClB,2FA3IA,mBAAU,OA2IA;AACV,sGA3IA,8BAAqB,OA2IA;AACrB,qGA3IA,6BAAoB,OA2IA;AACpB,mGA3IA,2BAAkB,OA2IA;AAxFpB,8DAA8D;AAC9D,+CAAwD;AAA/C,gHAAA,mBAAmB,OAAA;AAE5B,2DAA2D;AAC3D,2DAAmE;AAA1D,2HAAA,wBAAwB,OAAA;AAuFjC,2DAA0D;AAAjD,kHAAA,eAAe,OAAA;AAGxB,2CAA2C;AAC3C,iDAAsF;AAA7E,uGAAA,SAAS,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,uHAAA,yBAAyB,OAAA;AAGzD,iD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
|
3
|
+
*
|
|
4
|
+
* Efficiently matches incoming OTEL spans to canvas nodes based on
|
|
5
|
+
* declarative matching criteria defined in node metadata.
|
|
6
|
+
*
|
|
7
|
+
* Implements the OTEL Span Matching specification from:
|
|
8
|
+
* .principal-views/OTEL-SPAN-MATCHING.md
|
|
9
|
+
*/
|
|
10
|
+
import type { ExtendedCanvas } from '../types/canvas';
|
|
11
|
+
import type { OtelSpanData, OtelResourceData } from '../types/otel';
|
|
12
|
+
/**
|
|
13
|
+
* Match result containing matched node IDs and metadata
|
|
14
|
+
*/
|
|
15
|
+
export interface SpanMatchResult {
|
|
16
|
+
/** IDs of nodes that matched this span */
|
|
17
|
+
matchedNodeIds: string[];
|
|
18
|
+
/** Timestamp extracted from span (milliseconds since epoch) */
|
|
19
|
+
timestamp: number;
|
|
20
|
+
/** Span duration in milliseconds */
|
|
21
|
+
duration: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* SpanMatcher
|
|
25
|
+
*
|
|
26
|
+
* Efficiently matches incoming OTEL spans to canvas nodes based on
|
|
27
|
+
* declarative matching criteria defined in node metadata.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const canvas = loadCanvas('checkout-flow.otel.canvas.json');
|
|
32
|
+
* const matcher = new SpanMatcher(canvas);
|
|
33
|
+
*
|
|
34
|
+
* // Later, when spans arrive:
|
|
35
|
+
* const result = matcher.matchSpan(span, resource);
|
|
36
|
+
* if (result.matchedNodeIds.length > 0) {
|
|
37
|
+
* console.log('Matched nodes:', result.matchedNodeIds);
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class SpanMatcher {
|
|
42
|
+
private rules;
|
|
43
|
+
/**
|
|
44
|
+
* Create a new SpanMatcher for a canvas
|
|
45
|
+
*
|
|
46
|
+
* @param canvas Canvas with nodes containing OTEL matching criteria
|
|
47
|
+
*/
|
|
48
|
+
constructor(canvas: ExtendedCanvas);
|
|
49
|
+
/**
|
|
50
|
+
* Pre-compile matching rules from canvas nodes
|
|
51
|
+
*
|
|
52
|
+
* This is done once at initialization for performance.
|
|
53
|
+
*/
|
|
54
|
+
private compileRules;
|
|
55
|
+
/**
|
|
56
|
+
* Compile resource attribute matcher
|
|
57
|
+
*/
|
|
58
|
+
private compileResourceMatcher;
|
|
59
|
+
/**
|
|
60
|
+
* Compile span name matcher
|
|
61
|
+
*/
|
|
62
|
+
private compileSpanNameMatcher;
|
|
63
|
+
/**
|
|
64
|
+
* Compile span kind matcher
|
|
65
|
+
*/
|
|
66
|
+
private compileSpanKindMatcher;
|
|
67
|
+
/**
|
|
68
|
+
* Convert string span kind to ESpanKind number
|
|
69
|
+
*/
|
|
70
|
+
private spanKindToNumber;
|
|
71
|
+
/**
|
|
72
|
+
* Compile span attributes matcher
|
|
73
|
+
*/
|
|
74
|
+
private compileSpanAttributesMatcher;
|
|
75
|
+
/**
|
|
76
|
+
* Compile span event matcher
|
|
77
|
+
*/
|
|
78
|
+
private compileSpanEventMatcher;
|
|
79
|
+
/**
|
|
80
|
+
* Match a value against a pattern
|
|
81
|
+
*
|
|
82
|
+
* Supports:
|
|
83
|
+
* - Wildcard: "*" matches anything
|
|
84
|
+
* - Glob patterns: "GET /api/*" matches "GET /api/users"
|
|
85
|
+
* - Exact match: "validateUser" matches only "validateUser"
|
|
86
|
+
*/
|
|
87
|
+
private matchPattern;
|
|
88
|
+
/**
|
|
89
|
+
* Match a span against all canvas nodes
|
|
90
|
+
*
|
|
91
|
+
* @param span OTEL span to match
|
|
92
|
+
* @param resource OTEL resource associated with the span
|
|
93
|
+
* @returns Match result with matched node IDs and metadata
|
|
94
|
+
*/
|
|
95
|
+
matchSpan(span: OtelSpanData, resource: OtelResourceData): SpanMatchResult;
|
|
96
|
+
/**
|
|
97
|
+
* Get statistics about the compiled rules
|
|
98
|
+
*
|
|
99
|
+
* Useful for debugging and performance analysis.
|
|
100
|
+
*/
|
|
101
|
+
getStats(): {
|
|
102
|
+
totalRules: number;
|
|
103
|
+
rulesWithResourceMatch: number;
|
|
104
|
+
rulesWithSpanMatch: number;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=SpanMatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpanMatcher.d.ts","sourceRoot":"","sources":["../../src/matchers/SpanMatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA2BpE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAA2B;IAExC;;;;OAIG;gBACS,MAAM,EAAE,cAAc;IAIlC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IA6EpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAYxB;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAoBpC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAiD/B;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAmBpB;;;;;;OAMG;IACI,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,eAAe;IA0BjF;;;;OAIG;IACI,QAAQ,IAAI;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CAOF"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SpanMatcher
|
|
4
|
+
*
|
|
5
|
+
* Efficiently matches incoming OTEL spans to canvas nodes based on
|
|
6
|
+
* declarative matching criteria defined in node metadata.
|
|
7
|
+
*
|
|
8
|
+
* Implements the OTEL Span Matching specification from:
|
|
9
|
+
* .principal-views/OTEL-SPAN-MATCHING.md
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SpanMatcher = void 0;
|
|
13
|
+
const canvas_1 = require("../types/canvas");
|
|
14
|
+
const otel_1 = require("../types/otel");
|
|
15
|
+
/**
|
|
16
|
+
* SpanMatcher
|
|
17
|
+
*
|
|
18
|
+
* Efficiently matches incoming OTEL spans to canvas nodes based on
|
|
19
|
+
* declarative matching criteria defined in node metadata.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const canvas = loadCanvas('checkout-flow.otel.canvas.json');
|
|
24
|
+
* const matcher = new SpanMatcher(canvas);
|
|
25
|
+
*
|
|
26
|
+
* // Later, when spans arrive:
|
|
27
|
+
* const result = matcher.matchSpan(span, resource);
|
|
28
|
+
* if (result.matchedNodeIds.length > 0) {
|
|
29
|
+
* console.log('Matched nodes:', result.matchedNodeIds);
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
class SpanMatcher {
|
|
34
|
+
/**
|
|
35
|
+
* Create a new SpanMatcher for a canvas
|
|
36
|
+
*
|
|
37
|
+
* @param canvas Canvas with nodes containing OTEL matching criteria
|
|
38
|
+
*/
|
|
39
|
+
constructor(canvas) {
|
|
40
|
+
this.rules = [];
|
|
41
|
+
this.rules = this.compileRules(canvas);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Pre-compile matching rules from canvas nodes
|
|
45
|
+
*
|
|
46
|
+
* This is done once at initialization for performance.
|
|
47
|
+
*/
|
|
48
|
+
compileRules(canvas) {
|
|
49
|
+
const rules = [];
|
|
50
|
+
if (!canvas.nodes)
|
|
51
|
+
return rules;
|
|
52
|
+
for (const node of canvas.nodes) {
|
|
53
|
+
// Get OTEL metadata from either OTEL nodes (top-level) or standard nodes (pv.otel)
|
|
54
|
+
let otel;
|
|
55
|
+
if ((0, canvas_1.isOtelNode)(node) && node.otel) {
|
|
56
|
+
otel = node.otel;
|
|
57
|
+
}
|
|
58
|
+
else if ((0, canvas_1.isStandardCanvasNode)(node) && node.pv?.otel) {
|
|
59
|
+
otel = node.pv.otel;
|
|
60
|
+
}
|
|
61
|
+
if (!otel)
|
|
62
|
+
continue;
|
|
63
|
+
const rule = {
|
|
64
|
+
nodeId: node.id,
|
|
65
|
+
resourceMatchers: [],
|
|
66
|
+
spanMatchers: () => true, // Default: match all spans (will be overridden if spanMatch is specified)
|
|
67
|
+
};
|
|
68
|
+
// Compile resource matchers
|
|
69
|
+
if (otel.resourceMatch) {
|
|
70
|
+
rule.resourceMatchers.push(this.compileResourceMatcher(otel.resourceMatch));
|
|
71
|
+
}
|
|
72
|
+
// Compile span matchers
|
|
73
|
+
if (otel.spanMatch) {
|
|
74
|
+
const spanMatcherFns = [];
|
|
75
|
+
// Span name matcher
|
|
76
|
+
if (otel.spanMatch.name) {
|
|
77
|
+
spanMatcherFns.push(this.compileSpanNameMatcher(otel.spanMatch.name));
|
|
78
|
+
}
|
|
79
|
+
// Span kind matcher
|
|
80
|
+
if (otel.spanMatch.kind) {
|
|
81
|
+
spanMatcherFns.push(this.compileSpanKindMatcher(otel.spanMatch.kind));
|
|
82
|
+
}
|
|
83
|
+
// Span attributes matcher
|
|
84
|
+
if (otel.spanMatch.attributes) {
|
|
85
|
+
spanMatcherFns.push(this.compileSpanAttributesMatcher(otel.spanMatch.attributes));
|
|
86
|
+
}
|
|
87
|
+
// Span event matcher
|
|
88
|
+
if (otel.spanMatch.event) {
|
|
89
|
+
spanMatcherFns.push(this.compileSpanEventMatcher(otel.spanMatch.event));
|
|
90
|
+
}
|
|
91
|
+
// Combine all span matchers with AND logic
|
|
92
|
+
rule.spanMatchers = (span) => {
|
|
93
|
+
return spanMatcherFns.every((matcher) => matcher(span));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
// Only add rule if it has at least one matcher
|
|
97
|
+
if (rule.resourceMatchers.length > 0 || rule.spanMatchers.length > 0) {
|
|
98
|
+
rules.push(rule);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return rules;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Compile resource attribute matcher
|
|
105
|
+
*/
|
|
106
|
+
compileResourceMatcher(resourceMatch) {
|
|
107
|
+
return (resourceAttrs) => {
|
|
108
|
+
// All specified attributes must match (AND logic)
|
|
109
|
+
return Object.entries(resourceMatch).every(([key, pattern]) => {
|
|
110
|
+
const value = resourceAttrs[key];
|
|
111
|
+
if (!value)
|
|
112
|
+
return false;
|
|
113
|
+
if (Array.isArray(pattern)) {
|
|
114
|
+
// Match any of the patterns (OR within the array)
|
|
115
|
+
return pattern.some((p) => this.matchPattern(value, p));
|
|
116
|
+
}
|
|
117
|
+
return this.matchPattern(value, pattern);
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Compile span name matcher
|
|
123
|
+
*/
|
|
124
|
+
compileSpanNameMatcher(namePattern) {
|
|
125
|
+
const patterns = Array.isArray(namePattern) ? namePattern : [namePattern];
|
|
126
|
+
return (span) => {
|
|
127
|
+
return patterns.some((pattern) => this.matchPattern(span.name, pattern));
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Compile span kind matcher
|
|
132
|
+
*/
|
|
133
|
+
compileSpanKindMatcher(kindPattern) {
|
|
134
|
+
const kindStrings = Array.isArray(kindPattern) ? kindPattern : [kindPattern];
|
|
135
|
+
// Convert string span kinds to numeric ESpanKind values
|
|
136
|
+
const kinds = kindStrings.map((k) => this.spanKindToNumber(k));
|
|
137
|
+
return (span) => {
|
|
138
|
+
return kinds.includes(span.kind);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Convert string span kind to ESpanKind number
|
|
143
|
+
*/
|
|
144
|
+
spanKindToNumber(kind) {
|
|
145
|
+
const kindMap = {
|
|
146
|
+
'SPAN_KIND_UNSPECIFIED': 0,
|
|
147
|
+
'SPAN_KIND_INTERNAL': 1,
|
|
148
|
+
'SPAN_KIND_SERVER': 2,
|
|
149
|
+
'SPAN_KIND_CLIENT': 3,
|
|
150
|
+
'SPAN_KIND_PRODUCER': 4,
|
|
151
|
+
'SPAN_KIND_CONSUMER': 5,
|
|
152
|
+
};
|
|
153
|
+
return kindMap[kind] ?? 0;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Compile span attributes matcher
|
|
157
|
+
*/
|
|
158
|
+
compileSpanAttributesMatcher(attributesMatch) {
|
|
159
|
+
return (span) => {
|
|
160
|
+
// All specified attributes must match (AND logic)
|
|
161
|
+
return Object.entries(attributesMatch).every(([key, pattern]) => {
|
|
162
|
+
const value = (0, otel_1.getAttributeValue)(span.attributes, key);
|
|
163
|
+
if (value === undefined)
|
|
164
|
+
return false;
|
|
165
|
+
const valueStr = String(value);
|
|
166
|
+
if (Array.isArray(pattern)) {
|
|
167
|
+
return pattern.some((p) => this.matchPattern(valueStr, p));
|
|
168
|
+
}
|
|
169
|
+
return this.matchPattern(valueStr, pattern);
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Compile span event matcher
|
|
175
|
+
*/
|
|
176
|
+
compileSpanEventMatcher(eventMatch) {
|
|
177
|
+
return (span) => {
|
|
178
|
+
if (!span.events || span.events.length === 0)
|
|
179
|
+
return false;
|
|
180
|
+
// At least one event must match
|
|
181
|
+
return span.events.some((event) => {
|
|
182
|
+
// Match event name if specified
|
|
183
|
+
if (eventMatch.name) {
|
|
184
|
+
const namePatterns = Array.isArray(eventMatch.name)
|
|
185
|
+
? eventMatch.name
|
|
186
|
+
: [eventMatch.name];
|
|
187
|
+
const nameMatches = namePatterns.some((pattern) => this.matchPattern(event.name, pattern));
|
|
188
|
+
if (!nameMatches)
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
// Match event attributes if specified
|
|
192
|
+
if (eventMatch.attributes) {
|
|
193
|
+
const attrsMatch = Object.entries(eventMatch.attributes).every(([key, pattern]) => {
|
|
194
|
+
const value = (0, otel_1.getAttributeValue)(event.attributes, key);
|
|
195
|
+
if (value === undefined)
|
|
196
|
+
return false;
|
|
197
|
+
const valueStr = String(value);
|
|
198
|
+
if (Array.isArray(pattern)) {
|
|
199
|
+
return pattern.some((p) => this.matchPattern(valueStr, p));
|
|
200
|
+
}
|
|
201
|
+
return this.matchPattern(valueStr, pattern);
|
|
202
|
+
});
|
|
203
|
+
if (!attrsMatch)
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
return true;
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Match a value against a pattern
|
|
212
|
+
*
|
|
213
|
+
* Supports:
|
|
214
|
+
* - Wildcard: "*" matches anything
|
|
215
|
+
* - Glob patterns: "GET /api/*" matches "GET /api/users"
|
|
216
|
+
* - Exact match: "validateUser" matches only "validateUser"
|
|
217
|
+
*/
|
|
218
|
+
matchPattern(value, pattern) {
|
|
219
|
+
// Wildcard matches everything
|
|
220
|
+
if (pattern === '*')
|
|
221
|
+
return true;
|
|
222
|
+
// Exact match (fast path)
|
|
223
|
+
if (!pattern.includes('*')) {
|
|
224
|
+
return value === pattern;
|
|
225
|
+
}
|
|
226
|
+
// Glob pattern matching
|
|
227
|
+
// Convert glob pattern to regex
|
|
228
|
+
const regexPattern = pattern
|
|
229
|
+
.replace(/[.+?^${}()|[\]\\]/g, '\\$&') // Escape regex special chars
|
|
230
|
+
.replace(/\*/g, '.*'); // Convert * to .*
|
|
231
|
+
const regex = new RegExp(`^${regexPattern}$`);
|
|
232
|
+
return regex.test(value);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Match a span against all canvas nodes
|
|
236
|
+
*
|
|
237
|
+
* @param span OTEL span to match
|
|
238
|
+
* @param resource OTEL resource associated with the span
|
|
239
|
+
* @returns Match result with matched node IDs and metadata
|
|
240
|
+
*/
|
|
241
|
+
matchSpan(span, resource) {
|
|
242
|
+
const matchedNodeIds = [];
|
|
243
|
+
const resourceAttrs = (0, otel_1.flattenResourceAttributes)(resource);
|
|
244
|
+
for (const rule of this.rules) {
|
|
245
|
+
// Check if all resource matchers pass
|
|
246
|
+
const resourceMatch = rule.resourceMatchers.every((matcher) => matcher(resourceAttrs));
|
|
247
|
+
// Check if span matchers pass
|
|
248
|
+
const spanMatch = rule.spanMatchers(span);
|
|
249
|
+
// Node matches if both resource AND span criteria match
|
|
250
|
+
if (resourceMatch && spanMatch) {
|
|
251
|
+
matchedNodeIds.push(rule.nodeId);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
matchedNodeIds,
|
|
256
|
+
timestamp: (0, otel_1.parseNanoTime)(span.startTimeUnixNano),
|
|
257
|
+
duration: (0, otel_1.getSpanDuration)(span),
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Get statistics about the compiled rules
|
|
262
|
+
*
|
|
263
|
+
* Useful for debugging and performance analysis.
|
|
264
|
+
*/
|
|
265
|
+
getStats() {
|
|
266
|
+
return {
|
|
267
|
+
totalRules: this.rules.length,
|
|
268
|
+
rulesWithResourceMatch: this.rules.filter((r) => r.resourceMatchers.length > 0).length,
|
|
269
|
+
rulesWithSpanMatch: this.rules.filter((r) => r.spanMatchers.length > 0).length,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
exports.SpanMatcher = SpanMatcher;
|
|
274
|
+
//# sourceMappingURL=SpanMatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpanMatcher.js","sourceRoot":"","sources":["../../src/matchers/SpanMatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAGH,4CAAmE;AAEnE,wCAKuB;AAiCvB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,WAAW;IAGtB;;;;OAIG;IACH,YAAY,MAAsB;QAP1B,UAAK,GAAwB,EAAE,CAAC;QAQtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACK,YAAY,CAAC,MAAsB;QACzC,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEhC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE;YAC/B,mFAAmF;YACnF,IAAI,IAAiC,CAAC;YAEtC,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACjC,IAAI,GAAG,IAAI,CAAC,IAAuB,CAAC;aACrC;iBAAM,IAAI,IAAA,6BAAoB,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE;gBACtD,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,IAAuB,CAAC;aACxC;YAED,IAAI,CAAC,IAAI;gBAAE,SAAS;YAEpB,MAAM,IAAI,GAAsB;gBAC9B,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,gBAAgB,EAAE,EAAE;gBACpB,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,0EAA0E;aACrG,CAAC;YAEF,4BAA4B;YAC5B,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,IAAI,CAA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