@principal-ai/subsystems-core 0.29.0 → 0.30.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 +15 -110
- package/dist/index.d.ts +7 -75
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -205
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +7 -62
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +11 -146
- package/dist/node.js.map +1 -1
- package/dist/types/index.d.ts +3 -348
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -19
- package/dist/types/index.js.map +1 -1
- package/package.json +7 -24
- package/src/index.ts +7 -580
- package/src/node.ts +21 -262
- package/src/types/index.ts +3 -456
- package/dist/ConfigurationLoader.d.ts +0 -76
- package/dist/ConfigurationLoader.d.ts.map +0 -1
- package/dist/ConfigurationLoader.js +0 -148
- package/dist/ConfigurationLoader.js.map +0 -1
- package/dist/ConfigurationValidator.d.ts +0 -31
- package/dist/ConfigurationValidator.d.ts.map +0 -1
- package/dist/ConfigurationValidator.js +0 -239
- package/dist/ConfigurationValidator.js.map +0 -1
- package/dist/EventProcessor.d.ts +0 -49
- package/dist/EventProcessor.d.ts.map +0 -1
- package/dist/EventProcessor.js +0 -220
- package/dist/EventProcessor.js.map +0 -1
- package/dist/EventRecorderService.d.ts +0 -305
- package/dist/EventRecorderService.d.ts.map +0 -1
- package/dist/EventRecorderService.js +0 -467
- package/dist/EventRecorderService.js.map +0 -1
- package/dist/LibraryLoader.d.ts +0 -65
- package/dist/LibraryLoader.d.ts.map +0 -1
- package/dist/LibraryLoader.js +0 -197
- package/dist/LibraryLoader.js.map +0 -1
- package/dist/PathBasedEventProcessor.d.ts +0 -77
- package/dist/PathBasedEventProcessor.d.ts.map +0 -1
- package/dist/PathBasedEventProcessor.js +0 -136
- package/dist/PathBasedEventProcessor.js.map +0 -1
- package/dist/SessionManager.d.ts +0 -194
- package/dist/SessionManager.d.ts.map +0 -1
- package/dist/SessionManager.js +0 -302
- package/dist/SessionManager.js.map +0 -1
- package/dist/ValidationEngine.d.ts +0 -31
- package/dist/ValidationEngine.d.ts.map +0 -1
- package/dist/ValidationEngine.js +0 -162
- package/dist/ValidationEngine.js.map +0 -1
- package/dist/auxiliary/AuxiliaryManifestValidator.d.ts +0 -41
- package/dist/auxiliary/AuxiliaryManifestValidator.d.ts.map +0 -1
- package/dist/auxiliary/AuxiliaryManifestValidator.js +0 -100
- package/dist/auxiliary/AuxiliaryManifestValidator.js.map +0 -1
- package/dist/auxiliary/index.d.ts +0 -9
- package/dist/auxiliary/index.d.ts.map +0 -1
- package/dist/auxiliary/index.js +0 -14
- package/dist/auxiliary/index.js.map +0 -1
- package/dist/auxiliary/validateAreaScopeDisjoint.d.ts +0 -24
- package/dist/auxiliary/validateAreaScopeDisjoint.d.ts.map +0 -1
- package/dist/auxiliary/validateAreaScopeDisjoint.js +0 -61
- package/dist/auxiliary/validateAreaScopeDisjoint.js.map +0 -1
- package/dist/cli/codegen.d.ts +0 -41
- package/dist/cli/codegen.d.ts.map +0 -1
- package/dist/cli/codegen.js +0 -257
- package/dist/cli/codegen.js.map +0 -1
- package/dist/codegen/type-generator.d.ts +0 -123
- package/dist/codegen/type-generator.d.ts.map +0 -1
- package/dist/codegen/type-generator.js +0 -433
- package/dist/codegen/type-generator.js.map +0 -1
- package/dist/codegen/usage-example.d.ts +0 -103
- package/dist/codegen/usage-example.d.ts.map +0 -1
- package/dist/codegen/usage-example.js +0 -258
- package/dist/codegen/usage-example.js.map +0 -1
- package/dist/dashboard/DashboardValidator.d.ts +0 -85
- package/dist/dashboard/DashboardValidator.d.ts.map +0 -1
- package/dist/dashboard/DashboardValidator.js +0 -775
- package/dist/dashboard/DashboardValidator.js.map +0 -1
- package/dist/dashboard/index.d.ts +0 -6
- package/dist/dashboard/index.d.ts.map +0 -1
- package/dist/dashboard/index.js +0 -10
- package/dist/dashboard/index.js.map +0 -1
- package/dist/discovery/CanvasDiscovery.d.ts +0 -160
- package/dist/discovery/CanvasDiscovery.d.ts.map +0 -1
- package/dist/discovery/CanvasDiscovery.js +0 -865
- package/dist/discovery/CanvasDiscovery.js.map +0 -1
- package/dist/discovery/CanvasFileManifest.d.ts +0 -86
- package/dist/discovery/CanvasFileManifest.d.ts.map +0 -1
- package/dist/discovery/CanvasFileManifest.js +0 -338
- package/dist/discovery/CanvasFileManifest.js.map +0 -1
- package/dist/discovery/LibraryDiscovery.d.ts +0 -108
- package/dist/discovery/LibraryDiscovery.d.ts.map +0 -1
- package/dist/discovery/LibraryDiscovery.js +0 -263
- package/dist/discovery/LibraryDiscovery.js.map +0 -1
- package/dist/discovery/types.d.ts +0 -403
- package/dist/discovery/types.d.ts.map +0 -1
- package/dist/discovery/types.js +0 -6
- package/dist/discovery/types.js.map +0 -1
- package/dist/events/EventsCanvasValidator.d.ts +0 -139
- package/dist/events/EventsCanvasValidator.d.ts.map +0 -1
- package/dist/events/EventsCanvasValidator.js +0 -281
- package/dist/events/EventsCanvasValidator.js.map +0 -1
- package/dist/events/NamespacePathIndex.d.ts +0 -61
- package/dist/events/NamespacePathIndex.d.ts.map +0 -1
- package/dist/events/NamespacePathIndex.js +0 -74
- package/dist/events/NamespacePathIndex.js.map +0 -1
- package/dist/events/OtelEventPathsValidator.d.ts +0 -75
- package/dist/events/OtelEventPathsValidator.d.ts.map +0 -1
- package/dist/events/OtelEventPathsValidator.js +0 -126
- package/dist/events/OtelEventPathsValidator.js.map +0 -1
- package/dist/events/ScopeEventsValidator.d.ts +0 -68
- package/dist/events/ScopeEventsValidator.d.ts.map +0 -1
- package/dist/events/ScopeEventsValidator.js +0 -91
- package/dist/events/ScopeEventsValidator.js.map +0 -1
- package/dist/events/index.d.ts +0 -9
- package/dist/events/index.d.ts.map +0 -1
- package/dist/events/index.js +0 -12
- package/dist/events/index.js.map +0 -1
- package/dist/events/path-helpers.d.ts +0 -33
- package/dist/events/path-helpers.d.ts.map +0 -1
- package/dist/events/path-helpers.js +0 -59
- package/dist/events/path-helpers.js.map +0 -1
- package/dist/execution/ExecutionLoader.d.ts +0 -135
- package/dist/execution/ExecutionLoader.d.ts.map +0 -1
- package/dist/execution/ExecutionLoader.js +0 -266
- package/dist/execution/ExecutionLoader.js.map +0 -1
- package/dist/execution/ExecutionValidator.d.ts +0 -94
- package/dist/execution/ExecutionValidator.d.ts.map +0 -1
- package/dist/execution/ExecutionValidator.js +0 -503
- package/dist/execution/ExecutionValidator.js.map +0 -1
- package/dist/generated/graph-converter-execution.types.d.ts +0 -177
- package/dist/generated/graph-converter-execution.types.d.ts.map +0 -1
- package/dist/generated/graph-converter-execution.types.js +0 -12
- package/dist/generated/graph-converter-execution.types.js.map +0 -1
- package/dist/helpers/GraphInstrumentationHelper.d.ts +0 -93
- package/dist/helpers/GraphInstrumentationHelper.d.ts.map +0 -1
- package/dist/helpers/GraphInstrumentationHelper.js +0 -252
- package/dist/helpers/GraphInstrumentationHelper.js.map +0 -1
- package/dist/matchers/SpanMatcher.d.ts +0 -107
- package/dist/matchers/SpanMatcher.d.ts.map +0 -1
- package/dist/matchers/SpanMatcher.js +0 -274
- package/dist/matchers/SpanMatcher.js.map +0 -1
- package/dist/orchestration/TraceOrchestrator.d.ts +0 -71
- package/dist/orchestration/TraceOrchestrator.d.ts.map +0 -1
- package/dist/orchestration/TraceOrchestrator.js +0 -416
- package/dist/orchestration/TraceOrchestrator.js.map +0 -1
- package/dist/parsers/OtlpTraceParser.d.ts +0 -131
- package/dist/parsers/OtlpTraceParser.d.ts.map +0 -1
- package/dist/parsers/OtlpTraceParser.js +0 -310
- package/dist/parsers/OtlpTraceParser.js.map +0 -1
- package/dist/registry/CompositeRegistry.d.ts +0 -71
- package/dist/registry/CompositeRegistry.d.ts.map +0 -1
- package/dist/registry/CompositeRegistry.js +0 -113
- package/dist/registry/CompositeRegistry.js.map +0 -1
- package/dist/registry/EventRegistry.d.ts +0 -79
- package/dist/registry/EventRegistry.d.ts.map +0 -1
- package/dist/registry/EventRegistry.js +0 -165
- package/dist/registry/EventRegistry.js.map +0 -1
- package/dist/registry/LocalRegistry.d.ts +0 -111
- package/dist/registry/LocalRegistry.d.ts.map +0 -1
- package/dist/registry/LocalRegistry.js +0 -335
- package/dist/registry/LocalRegistry.js.map +0 -1
- package/dist/registry/RemoteRegistry.d.ts +0 -122
- package/dist/registry/RemoteRegistry.d.ts.map +0 -1
- package/dist/registry/RemoteRegistry.js +0 -399
- package/dist/registry/RemoteRegistry.js.map +0 -1
- package/dist/registry/VersionRegistry.d.ts +0 -51
- package/dist/registry/VersionRegistry.d.ts.map +0 -1
- package/dist/registry/VersionRegistry.js +0 -105
- package/dist/registry/VersionRegistry.js.map +0 -1
- package/dist/rules/config.d.ts +0 -57
- package/dist/rules/config.d.ts.map +0 -1
- package/dist/rules/config.js +0 -382
- package/dist/rules/config.js.map +0 -1
- package/dist/rules/engine.d.ts +0 -70
- package/dist/rules/engine.d.ts.map +0 -1
- package/dist/rules/engine.js +0 -373
- package/dist/rules/engine.js.map +0 -1
- package/dist/rules/implementations/connection-type-references.d.ts +0 -7
- package/dist/rules/implementations/connection-type-references.d.ts.map +0 -1
- package/dist/rules/implementations/connection-type-references.js +0 -107
- package/dist/rules/implementations/connection-type-references.js.map +0 -1
- package/dist/rules/implementations/dead-end-states.d.ts +0 -17
- package/dist/rules/implementations/dead-end-states.d.ts.map +0 -1
- package/dist/rules/implementations/dead-end-states.js +0 -75
- package/dist/rules/implementations/dead-end-states.js.map +0 -1
- package/dist/rules/implementations/index.d.ts +0 -23
- package/dist/rules/implementations/index.d.ts.map +0 -1
- package/dist/rules/implementations/index.js +0 -73
- package/dist/rules/implementations/index.js.map +0 -1
- package/dist/rules/implementations/minimum-node-sources.d.ts +0 -24
- package/dist/rules/implementations/minimum-node-sources.d.ts.map +0 -1
- package/dist/rules/implementations/minimum-node-sources.js +0 -59
- package/dist/rules/implementations/minimum-node-sources.js.map +0 -1
- package/dist/rules/implementations/no-unknown-fields.d.ts +0 -7
- package/dist/rules/implementations/no-unknown-fields.d.ts.map +0 -1
- package/dist/rules/implementations/no-unknown-fields.js +0 -216
- package/dist/rules/implementations/no-unknown-fields.js.map +0 -1
- package/dist/rules/implementations/orphaned-edge-types.d.ts +0 -7
- package/dist/rules/implementations/orphaned-edge-types.d.ts.map +0 -1
- package/dist/rules/implementations/orphaned-edge-types.js +0 -50
- package/dist/rules/implementations/orphaned-edge-types.js.map +0 -1
- package/dist/rules/implementations/orphaned-node-types.d.ts +0 -7
- package/dist/rules/implementations/orphaned-node-types.d.ts.map +0 -1
- package/dist/rules/implementations/orphaned-node-types.js +0 -53
- package/dist/rules/implementations/orphaned-node-types.js.map +0 -1
- package/dist/rules/implementations/required-metadata.d.ts +0 -7
- package/dist/rules/implementations/required-metadata.d.ts.map +0 -1
- package/dist/rules/implementations/required-metadata.js +0 -48
- package/dist/rules/implementations/required-metadata.js.map +0 -1
- package/dist/rules/implementations/state-transition-references.d.ts +0 -7
- package/dist/rules/implementations/state-transition-references.d.ts.map +0 -1
- package/dist/rules/implementations/state-transition-references.js +0 -138
- package/dist/rules/implementations/state-transition-references.js.map +0 -1
- package/dist/rules/implementations/unreachable-states.d.ts +0 -7
- package/dist/rules/implementations/unreachable-states.d.ts.map +0 -1
- package/dist/rules/implementations/unreachable-states.js +0 -83
- package/dist/rules/implementations/unreachable-states.js.map +0 -1
- package/dist/rules/implementations/valid-action-patterns.d.ts +0 -17
- package/dist/rules/implementations/valid-action-patterns.d.ts.map +0 -1
- package/dist/rules/implementations/valid-action-patterns.js +0 -112
- package/dist/rules/implementations/valid-action-patterns.js.map +0 -1
- package/dist/rules/implementations/valid-color-format.d.ts +0 -7
- package/dist/rules/implementations/valid-color-format.d.ts.map +0 -1
- package/dist/rules/implementations/valid-color-format.js +0 -94
- package/dist/rules/implementations/valid-color-format.js.map +0 -1
- package/dist/rules/implementations/valid-edge-types.d.ts +0 -7
- package/dist/rules/implementations/valid-edge-types.d.ts.map +0 -1
- package/dist/rules/implementations/valid-edge-types.js +0 -248
- package/dist/rules/implementations/valid-edge-types.js.map +0 -1
- package/dist/rules/implementations/valid-node-types.d.ts +0 -7
- package/dist/rules/implementations/valid-node-types.d.ts.map +0 -1
- package/dist/rules/implementations/valid-node-types.js +0 -187
- package/dist/rules/implementations/valid-node-types.js.map +0 -1
- package/dist/rules/index.d.ts +0 -28
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -70
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/types.d.ts +0 -309
- package/dist/rules/types.d.ts.map +0 -1
- package/dist/rules/types.js +0 -40
- package/dist/rules/types.js.map +0 -1
- package/dist/scopes/ScopePathIndex.d.ts +0 -56
- package/dist/scopes/ScopePathIndex.d.ts.map +0 -1
- package/dist/scopes/ScopePathIndex.js +0 -67
- package/dist/scopes/ScopePathIndex.js.map +0 -1
- package/dist/scopes/ScopesCanvasValidator.d.ts +0 -76
- package/dist/scopes/ScopesCanvasValidator.d.ts.map +0 -1
- package/dist/scopes/ScopesCanvasValidator.js +0 -221
- package/dist/scopes/ScopesCanvasValidator.js.map +0 -1
- package/dist/scopes/index.d.ts +0 -12
- package/dist/scopes/index.d.ts.map +0 -1
- package/dist/scopes/index.js +0 -30
- package/dist/scopes/index.js.map +0 -1
- package/dist/scopes/utils.d.ts +0 -85
- package/dist/scopes/utils.d.ts.map +0 -1
- package/dist/scopes/utils.js +0 -143
- package/dist/scopes/utils.js.map +0 -1
- package/dist/scopes/validateScopeNamespaceNesting.d.ts +0 -38
- package/dist/scopes/validateScopeNamespaceNesting.d.ts.map +0 -1
- package/dist/scopes/validateScopeNamespaceNesting.js +0 -69
- package/dist/scopes/validateScopeNamespaceNesting.js.map +0 -1
- package/dist/spans/index.d.ts +0 -12
- package/dist/spans/index.d.ts.map +0 -1
- package/dist/spans/index.js +0 -25
- package/dist/spans/index.js.map +0 -1
- package/dist/spans/utils.d.ts +0 -70
- package/dist/spans/utils.d.ts.map +0 -1
- package/dist/spans/utils.js +0 -205
- package/dist/spans/utils.js.map +0 -1
- package/dist/storyboard/builder.d.ts +0 -135
- package/dist/storyboard/builder.d.ts.map +0 -1
- package/dist/storyboard/builder.js +0 -235
- package/dist/storyboard/builder.js.map +0 -1
- package/dist/storyboard/index.d.ts +0 -9
- package/dist/storyboard/index.d.ts.map +0 -1
- package/dist/storyboard/index.js +0 -18
- package/dist/storyboard/index.js.map +0 -1
- package/dist/storyboard/types.d.ts +0 -101
- package/dist/storyboard/types.d.ts.map +0 -1
- package/dist/storyboard/types.js +0 -10
- package/dist/storyboard/types.js.map +0 -1
- package/dist/telemetry/coverage.d.ts +0 -92
- package/dist/telemetry/coverage.d.ts.map +0 -1
- package/dist/telemetry/coverage.js +0 -335
- package/dist/telemetry/coverage.js.map +0 -1
- package/dist/telemetry/event-validator.d.ts +0 -86
- package/dist/telemetry/event-validator.d.ts.map +0 -1
- package/dist/telemetry/event-validator.js +0 -257
- package/dist/telemetry/event-validator.js.map +0 -1
- package/dist/types/audit.d.ts +0 -236
- package/dist/types/audit.d.ts.map +0 -1
- package/dist/types/audit.js +0 -53
- package/dist/types/audit.js.map +0 -1
- package/dist/types/auxiliary.d.ts +0 -54
- package/dist/types/auxiliary.d.ts.map +0 -1
- package/dist/types/auxiliary.js +0 -27
- package/dist/types/auxiliary.js.map +0 -1
- package/dist/types/canvas-scope.d.ts +0 -156
- package/dist/types/canvas-scope.d.ts.map +0 -1
- package/dist/types/canvas-scope.js +0 -62
- package/dist/types/canvas-scope.js.map +0 -1
- package/dist/types/canvas.d.ts +0 -1138
- package/dist/types/canvas.d.ts.map +0 -1
- package/dist/types/canvas.js +0 -178
- package/dist/types/canvas.js.map +0 -1
- package/dist/types/dashboard.d.ts +0 -170
- package/dist/types/dashboard.d.ts.map +0 -1
- package/dist/types/dashboard.js +0 -14
- package/dist/types/dashboard.js.map +0 -1
- package/dist/types/library.d.ts +0 -227
- package/dist/types/library.d.ts.map +0 -1
- package/dist/types/library.js +0 -16
- package/dist/types/library.js.map +0 -1
- package/dist/types/otel.d.ts +0 -465
- package/dist/types/otel.d.ts.map +0 -1
- package/dist/types/otel.js +0 -163
- package/dist/types/otel.js.map +0 -1
- package/dist/types/path-based-config.d.ts +0 -235
- package/dist/types/path-based-config.d.ts.map +0 -1
- package/dist/types/path-based-config.js +0 -11
- package/dist/types/path-based-config.js.map +0 -1
- package/dist/types/registered-trace.d.ts +0 -337
- package/dist/types/registered-trace.d.ts.map +0 -1
- package/dist/types/registered-trace.js +0 -16
- package/dist/types/registered-trace.js.map +0 -1
- package/dist/types/resource-match.d.ts +0 -207
- package/dist/types/resource-match.d.ts.map +0 -1
- package/dist/types/resource-match.js +0 -74
- package/dist/types/resource-match.js.map +0 -1
- package/dist/types/version-registry.d.ts +0 -137
- package/dist/types/version-registry.d.ts.map +0 -1
- package/dist/types/version-registry.js +0 -10
- package/dist/types/version-registry.js.map +0 -1
- package/dist/utils/CanvasConverter.d.ts +0 -148
- package/dist/utils/CanvasConverter.d.ts.map +0 -1
- package/dist/utils/CanvasConverter.js +0 -530
- package/dist/utils/CanvasConverter.js.map +0 -1
- package/dist/utils/GraphConverter.d.ts +0 -18
- package/dist/utils/GraphConverter.d.ts.map +0 -1
- package/dist/utils/GraphConverter.js +0 -80
- package/dist/utils/GraphConverter.js.map +0 -1
- package/dist/utils/PathMatcher.d.ts +0 -55
- package/dist/utils/PathMatcher.d.ts.map +0 -1
- package/dist/utils/PathMatcher.js +0 -178
- package/dist/utils/PathMatcher.js.map +0 -1
- package/dist/utils/TraceToCanvas.d.ts +0 -83
- package/dist/utils/TraceToCanvas.d.ts.map +0 -1
- package/dist/utils/TraceToCanvas.js +0 -336
- package/dist/utils/TraceToCanvas.js.map +0 -1
- package/dist/utils/YamlParser.d.ts +0 -36
- package/dist/utils/YamlParser.d.ts.map +0 -1
- package/dist/utils/YamlParser.js +0 -92
- package/dist/utils/YamlParser.js.map +0 -1
- package/dist/utils/registeredTraceHelpers.d.ts +0 -76
- package/dist/utils/registeredTraceHelpers.d.ts.map +0 -1
- package/dist/utils/registeredTraceHelpers.js +0 -203
- package/dist/utils/registeredTraceHelpers.js.map +0 -1
- package/dist/utils/traceAggregation.d.ts +0 -25
- package/dist/utils/traceAggregation.d.ts.map +0 -1
- package/dist/utils/traceAggregation.js +0 -140
- package/dist/utils/traceAggregation.js.map +0 -1
- package/dist/validation/OtelCanvasValidator.d.ts +0 -40
- package/dist/validation/OtelCanvasValidator.d.ts.map +0 -1
- package/dist/validation/OtelCanvasValidator.js +0 -59
- package/dist/validation/OtelCanvasValidator.js.map +0 -1
- package/dist/validation/index.d.ts +0 -8
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js +0 -13
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/libraryValidation.d.ts +0 -53
- package/dist/validation/libraryValidation.d.ts.map +0 -1
- package/dist/validation/libraryValidation.js +0 -115
- package/dist/validation/libraryValidation.js.map +0 -1
- package/dist/workflow/edge-derivation.d.ts +0 -111
- package/dist/workflow/edge-derivation.d.ts.map +0 -1
- package/dist/workflow/edge-derivation.js +0 -174
- package/dist/workflow/edge-derivation.js.map +0 -1
- package/dist/workflow/edge-validation.d.ts +0 -170
- package/dist/workflow/edge-validation.d.ts.map +0 -1
- package/dist/workflow/edge-validation.js +0 -332
- package/dist/workflow/edge-validation.js.map +0 -1
- package/dist/workflow/example.d.ts +0 -11
- package/dist/workflow/example.d.ts.map +0 -1
- package/dist/workflow/example.js +0 -310
- package/dist/workflow/example.js.map +0 -1
- package/dist/workflow/index.d.ts +0 -20
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/index.js +0 -49
- package/dist/workflow/index.js.map +0 -1
- package/dist/workflow/scenario-matcher.d.ts +0 -63
- package/dist/workflow/scenario-matcher.d.ts.map +0 -1
- package/dist/workflow/scenario-matcher.js +0 -215
- package/dist/workflow/scenario-matcher.js.map +0 -1
- package/dist/workflow/template-parser.d.ts +0 -73
- package/dist/workflow/template-parser.d.ts.map +0 -1
- package/dist/workflow/template-parser.js +0 -280
- package/dist/workflow/template-parser.js.map +0 -1
- package/dist/workflow/template-renderer.d.ts +0 -45
- package/dist/workflow/template-renderer.d.ts.map +0 -1
- package/dist/workflow/template-renderer.js +0 -401
- package/dist/workflow/template-renderer.js.map +0 -1
- package/dist/workflow/types.d.ts +0 -393
- package/dist/workflow/types.d.ts.map +0 -1
- package/dist/workflow/types.js +0 -40
- package/dist/workflow/types.js.map +0 -1
- package/dist/workflow/validator.d.ts +0 -363
- package/dist/workflow/validator.d.ts.map +0 -1
- package/dist/workflow/validator.js +0 -2283
- package/dist/workflow/validator.js.map +0 -1
- package/schemas/auxiliary.manifest.schema.json +0 -56
- package/src/ConfigurationLoader.test.ts +0 -466
- package/src/ConfigurationLoader.ts +0 -184
- package/src/ConfigurationValidator.test.ts +0 -200
- package/src/ConfigurationValidator.ts +0 -273
- package/src/EventProcessor.test.ts +0 -405
- package/src/EventProcessor.ts +0 -256
- package/src/EventRecorderService.test.ts +0 -543
- package/src/EventRecorderService.ts +0 -741
- package/src/LibraryLoader.ts +0 -194
- package/src/PathBasedEventProcessor.test.ts +0 -336
- package/src/PathBasedEventProcessor.ts +0 -196
- package/src/SessionManager.test.ts +0 -424
- package/src/SessionManager.ts +0 -471
- package/src/ValidationEngine.test.ts +0 -520
- package/src/ValidationEngine.ts +0 -200
- package/src/auxiliary/AuxiliaryManifestValidator.test.ts +0 -93
- package/src/auxiliary/AuxiliaryManifestValidator.ts +0 -132
- package/src/auxiliary/index.ts +0 -18
- package/src/auxiliary/validateAreaScopeDisjoint.test.ts +0 -85
- package/src/auxiliary/validateAreaScopeDisjoint.ts +0 -72
- package/src/cli/codegen.ts +0 -286
- package/src/codegen/type-generator.test.ts +0 -219
- package/src/codegen/type-generator.ts +0 -560
- package/src/codegen/usage-example.ts +0 -357
- package/src/dashboard/DashboardValidator.ts +0 -904
- package/src/dashboard/index.ts +0 -14
- package/src/discovery/CanvasDiscovery.test.ts +0 -691
- package/src/discovery/CanvasDiscovery.ts +0 -1114
- package/src/discovery/CanvasFileManifest.test.ts +0 -521
- package/src/discovery/CanvasFileManifest.ts +0 -419
- package/src/discovery/LibraryDiscovery.test.ts +0 -329
- package/src/discovery/LibraryDiscovery.ts +0 -386
- package/src/discovery/types.ts +0 -453
- package/src/events/EventsCanvasValidator.test.ts +0 -191
- package/src/events/EventsCanvasValidator.ts +0 -428
- package/src/events/NamespacePathIndex.test.ts +0 -97
- package/src/events/NamespacePathIndex.ts +0 -100
- package/src/events/OtelEventPathsValidator.test.ts +0 -243
- package/src/events/OtelEventPathsValidator.ts +0 -191
- package/src/events/ScopeEventsValidator.test.ts +0 -173
- package/src/events/ScopeEventsValidator.ts +0 -158
- package/src/events/index.ts +0 -27
- package/src/events/path-helpers.ts +0 -53
- package/src/execution/ExecutionLoader.test.ts +0 -378
- package/src/execution/ExecutionLoader.ts +0 -331
- package/src/execution/ExecutionValidator.test.ts +0 -503
- package/src/execution/ExecutionValidator.ts +0 -617
- package/src/generated/graph-converter-execution.types.ts +0 -193
- package/src/helpers/GraphInstrumentationHelper.test.ts +0 -364
- package/src/helpers/GraphInstrumentationHelper.ts +0 -323
- package/src/matchers/SpanMatcher.test.ts +0 -1105
- package/src/matchers/SpanMatcher.ts +0 -381
- package/src/orchestration/TraceOrchestrator.ts +0 -560
- package/src/orchestration/__tests__/TraceOrchestrator.test.ts +0 -1098
- package/src/parsers/OtlpTraceParser.ts +0 -401
- package/src/parsers/__tests__/OtlpTraceParser.test.ts +0 -197
- package/src/registry/CompositeRegistry.ts +0 -140
- package/src/registry/EventRegistry.test.ts +0 -387
- package/src/registry/EventRegistry.ts +0 -191
- package/src/registry/LocalRegistry.ts +0 -416
- package/src/registry/RemoteRegistry.ts +0 -499
- package/src/registry/VersionRegistry.test.ts +0 -223
- package/src/registry/VersionRegistry.ts +0 -121
- package/src/rules/config.test.ts +0 -277
- package/src/rules/config.ts +0 -450
- package/src/rules/engine.test.ts +0 -331
- package/src/rules/engine.ts +0 -448
- package/src/rules/implementations/connection-type-references.ts +0 -117
- package/src/rules/implementations/dead-end-states.ts +0 -101
- package/src/rules/implementations/index.ts +0 -66
- package/src/rules/implementations/minimum-node-sources.ts +0 -84
- package/src/rules/implementations/no-unknown-fields.ts +0 -372
- package/src/rules/implementations/orphaned-edge-types.ts +0 -55
- package/src/rules/implementations/orphaned-node-types.ts +0 -58
- package/src/rules/implementations/required-metadata.ts +0 -52
- package/src/rules/implementations/state-transition-references.ts +0 -155
- package/src/rules/implementations/unreachable-states.ts +0 -94
- package/src/rules/implementations/valid-action-patterns.ts +0 -140
- package/src/rules/implementations/valid-color-format.ts +0 -152
- package/src/rules/implementations/valid-edge-types.ts +0 -273
- package/src/rules/implementations/valid-node-types.ts +0 -200
- package/src/rules/index.ts +0 -92
- package/src/rules/types.ts +0 -426
- package/src/scopes/ScopePathIndex.test.ts +0 -94
- package/src/scopes/ScopePathIndex.ts +0 -89
- package/src/scopes/ScopesCanvasValidator.test.ts +0 -127
- package/src/scopes/ScopesCanvasValidator.ts +0 -305
- package/src/scopes/__tests__/utils.test.ts +0 -383
- package/src/scopes/index.ts +0 -42
- package/src/scopes/utils.ts +0 -182
- package/src/scopes/validateScopeNamespaceNesting.test.ts +0 -127
- package/src/scopes/validateScopeNamespaceNesting.ts +0 -88
- package/src/spans/index.ts +0 -24
- package/src/spans/utils.ts +0 -249
- package/src/storyboard/builder.ts +0 -308
- package/src/storyboard/index.ts +0 -26
- package/src/storyboard/types.ts +0 -117
- package/src/telemetry/coverage.ts +0 -480
- package/src/telemetry/event-validator.ts +0 -312
- package/src/types/audit.ts +0 -314
- package/src/types/auxiliary.ts +0 -63
- package/src/types/canvas-scope.ts +0 -190
- package/src/types/canvas.test.ts +0 -199
- package/src/types/canvas.ts +0 -1395
- package/src/types/dashboard.ts +0 -257
- package/src/types/library.ts +0 -283
- package/src/types/otel.test.ts +0 -219
- package/src/types/otel.ts +0 -620
- package/src/types/path-based-config.ts +0 -285
- package/src/types/registered-trace.ts +0 -432
- package/src/types/resource-match.ts +0 -263
- package/src/types/version-registry.ts +0 -150
- package/src/utils/CanvasConverter.ts +0 -670
- package/src/utils/GraphConverter.test.ts +0 -322
- package/src/utils/GraphConverter.ts +0 -84
- package/src/utils/PathMatcher.test.ts +0 -139
- package/src/utils/PathMatcher.ts +0 -185
- package/src/utils/TraceToCanvas.test.ts +0 -310
- package/src/utils/TraceToCanvas.ts +0 -510
- package/src/utils/YamlParser.ts +0 -77
- package/src/utils/registeredTraceHelpers.ts +0 -251
- package/src/utils/traceAggregation.test.ts +0 -385
- package/src/utils/traceAggregation.ts +0 -173
- package/src/validation/OtelCanvasValidator.ts +0 -86
- package/src/validation/index.ts +0 -17
- package/src/validation/libraryValidation.ts +0 -206
- package/src/workflow/README.md +0 -408
- package/src/workflow/__tests__/edge-derivation.test.ts +0 -449
- package/src/workflow/__tests__/edge-validation.test.ts +0 -417
- package/src/workflow/__tests__/scenario-matcher.test.ts +0 -225
- package/src/workflow/__tests__/template-parser.test.ts +0 -276
- package/src/workflow/__tests__/template-renderer.test.ts +0 -509
- package/src/workflow/__tests__/types.test.ts +0 -187
- package/src/workflow/__tests__/validator.test.ts +0 -3225
- package/src/workflow/edge-derivation.ts +0 -265
- package/src/workflow/edge-validation.ts +0 -503
- package/src/workflow/example.ts +0 -330
- package/src/workflow/index.ts +0 -86
- package/src/workflow/scenario-matcher.ts +0 -253
- package/src/workflow/template-parser.ts +0 -350
- package/src/workflow/template-renderer.ts +0 -453
- package/src/workflow/types.ts +0 -511
- package/src/workflow/validator.ts +0 -2737
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event Validator
|
|
4
|
-
*
|
|
5
|
-
* Type-safe telemetry event validation against canvas event schemas.
|
|
6
|
-
* Ensures that emitted events match the schema defined in the canvas.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.createValidatedEmitter = exports.EventValidator = exports.EventValidationError = void 0;
|
|
10
|
-
const canvas_1 = require("../types/canvas");
|
|
11
|
-
/**
|
|
12
|
-
* Validation error for telemetry events
|
|
13
|
-
*/
|
|
14
|
-
class EventValidationError extends Error {
|
|
15
|
-
constructor(eventName, nodeId, errors) {
|
|
16
|
-
super(`Event validation failed for '${eventName}' on node '${nodeId}':\n${errors.join('\n')}`);
|
|
17
|
-
this.eventName = eventName;
|
|
18
|
-
this.nodeId = nodeId;
|
|
19
|
-
this.errors = errors;
|
|
20
|
-
this.name = 'EventValidationError';
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.EventValidationError = EventValidationError;
|
|
24
|
-
/**
|
|
25
|
-
* Event validator that checks events against canvas schema
|
|
26
|
-
*/
|
|
27
|
-
class EventValidator {
|
|
28
|
-
constructor(canvas, library) {
|
|
29
|
-
this.eventSchemasByNode = new Map();
|
|
30
|
-
this.eventSchemasByName = new Map();
|
|
31
|
-
this.nodeIdsByBaseId = new Map();
|
|
32
|
-
this.library = library;
|
|
33
|
-
this.indexEventSchemas(canvas);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Index all event schemas from canvas nodes
|
|
37
|
-
*/
|
|
38
|
-
indexEventSchemas(canvas) {
|
|
39
|
-
if (!canvas.nodes)
|
|
40
|
-
return;
|
|
41
|
-
for (const node of canvas.nodes) {
|
|
42
|
-
let eventSchema;
|
|
43
|
-
// Check OTEL event node (top-level event/eventRef)
|
|
44
|
-
if ((0, canvas_1.isOtelEventNode)(node)) {
|
|
45
|
-
if (node.event) {
|
|
46
|
-
eventSchema = node.event;
|
|
47
|
-
}
|
|
48
|
-
else if (node.eventRef) {
|
|
49
|
-
eventSchema = this.resolveLibraryEvent(node.eventRef);
|
|
50
|
-
if (!eventSchema) {
|
|
51
|
-
console.warn(`Node '${node.id}' references unknown library event '${node.eventRef}'`);
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Check standard node (pv.event/pv.eventRef)
|
|
57
|
-
else if ((0, canvas_1.isStandardCanvasNode)(node)) {
|
|
58
|
-
if (node.pv?.event) {
|
|
59
|
-
eventSchema = node.pv.event;
|
|
60
|
-
}
|
|
61
|
-
else if (node.pv?.eventRef) {
|
|
62
|
-
eventSchema = this.resolveLibraryEvent(node.pv.eventRef);
|
|
63
|
-
if (!eventSchema) {
|
|
64
|
-
console.warn(`Node '${node.id}' references unknown library event '${node.pv.eventRef}'`);
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (eventSchema) {
|
|
70
|
-
// Index by node ID
|
|
71
|
-
this.eventSchemasByNode.set(node.id, eventSchema);
|
|
72
|
-
// Index by event name
|
|
73
|
-
this.eventSchemasByName.set(eventSchema.name, eventSchema);
|
|
74
|
-
// Index by base node ID (strip numeric suffixes like '-2', '-3')
|
|
75
|
-
const baseId = node.id.replace(/-\d+$/, '');
|
|
76
|
-
if (!this.nodeIdsByBaseId.has(baseId)) {
|
|
77
|
-
this.nodeIdsByBaseId.set(baseId, new Set());
|
|
78
|
-
}
|
|
79
|
-
this.nodeIdsByBaseId.get(baseId).add(node.id);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Resolve an event schema from library by event name
|
|
85
|
-
*/
|
|
86
|
-
resolveLibraryEvent(eventName) {
|
|
87
|
-
if (!this.library?.eventSchemas) {
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
90
|
-
const librarySchema = this.library.eventSchemas[eventName];
|
|
91
|
-
if (!librarySchema) {
|
|
92
|
-
return undefined;
|
|
93
|
-
}
|
|
94
|
-
// Convert library schema (without name) to full PVEventSchema
|
|
95
|
-
return {
|
|
96
|
-
name: eventName,
|
|
97
|
-
description: librarySchema.description,
|
|
98
|
-
attributes: librarySchema.attributes,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Validate an event against the schema for a specific node
|
|
103
|
-
*/
|
|
104
|
-
validate(nodeId, eventName, attributes) {
|
|
105
|
-
const errors = [];
|
|
106
|
-
// First try to find schema by event name (supports multiple events per component)
|
|
107
|
-
const eventSchema = this.eventSchemasByName.get(eventName);
|
|
108
|
-
// If not found by event name, check if the specific node has a schema
|
|
109
|
-
if (!eventSchema) {
|
|
110
|
-
// Check exact node ID first
|
|
111
|
-
const nodeSchema = this.eventSchemasByNode.get(nodeId);
|
|
112
|
-
if (nodeSchema) {
|
|
113
|
-
// Node has a schema, but this event doesn't exist anywhere
|
|
114
|
-
errors.push(`Event '${eventName}' is not defined in schema for node '${nodeId}'`);
|
|
115
|
-
return { valid: false, errors };
|
|
116
|
-
}
|
|
117
|
-
// Check base ID pattern (e.g., "graph-converter" for "graph-converter-1", etc.)
|
|
118
|
-
const baseId = nodeId.replace(/-\d+$/, '');
|
|
119
|
-
if (this.nodeIdsByBaseId.has(baseId)) {
|
|
120
|
-
// Component has schemas defined, but this event doesn't exist
|
|
121
|
-
errors.push(`Event '${eventName}' is not defined in schema for node '${nodeId}'`);
|
|
122
|
-
return { valid: false, errors };
|
|
123
|
-
}
|
|
124
|
-
// No schema defined at all - allow all events (permissive mode)
|
|
125
|
-
return { valid: true, errors: [] };
|
|
126
|
-
}
|
|
127
|
-
// Verify event name matches (this should always be true now, but keeping for safety)
|
|
128
|
-
if (eventSchema.name !== eventName) {
|
|
129
|
-
errors.push(`Event '${eventName}' does not match schema event name '${eventSchema.name}' for node '${nodeId}'`);
|
|
130
|
-
return { valid: false, errors };
|
|
131
|
-
}
|
|
132
|
-
// Validate each field in the schema
|
|
133
|
-
for (const [fieldName, fieldSchema] of Object.entries(eventSchema.attributes)) {
|
|
134
|
-
const value = attributes[fieldName];
|
|
135
|
-
// Check required fields
|
|
136
|
-
if (fieldSchema.required && value === undefined) {
|
|
137
|
-
errors.push(`Required field '${fieldName}' is missing`);
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
// Skip validation if field is not present and not required
|
|
141
|
-
if (value === undefined) {
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
// Validate type
|
|
145
|
-
const actualType = this.getValueType(value);
|
|
146
|
-
if (actualType !== fieldSchema.type) {
|
|
147
|
-
errors.push(`Field '${fieldName}' has type '${actualType}' but schema expects '${fieldSchema.type}'`);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
// Check for unexpected fields (strict mode)
|
|
151
|
-
const schemaFields = new Set(Object.keys(eventSchema.attributes));
|
|
152
|
-
for (const fieldName of Object.keys(attributes)) {
|
|
153
|
-
// Allow special metadata fields
|
|
154
|
-
if (fieldName.startsWith('code.') || fieldName === 'description') {
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
if (!schemaFields.has(fieldName)) {
|
|
158
|
-
// Just a warning, not an error
|
|
159
|
-
// errors.push(`Unexpected field '${fieldName}' not in schema`);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
valid: errors.length === 0,
|
|
164
|
-
errors,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Get the type of a value
|
|
169
|
-
*/
|
|
170
|
-
getValueType(value) {
|
|
171
|
-
if (Array.isArray(value))
|
|
172
|
-
return 'array';
|
|
173
|
-
if (value === null)
|
|
174
|
-
return 'object';
|
|
175
|
-
return typeof value;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Get event schema for a node
|
|
179
|
-
*/
|
|
180
|
-
getNodeSchema(nodeId) {
|
|
181
|
-
return this.eventSchemasByNode.get(nodeId);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Get event name for a node
|
|
185
|
-
*/
|
|
186
|
-
getNodeEventName(nodeId) {
|
|
187
|
-
const schema = this.eventSchemasByNode.get(nodeId);
|
|
188
|
-
return schema?.name;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Get all event names for a node (including related nodes with same base ID)
|
|
192
|
-
*/
|
|
193
|
-
getNodeEventNames(nodeId) {
|
|
194
|
-
const baseId = nodeId.replace(/-\d+$/, '');
|
|
195
|
-
const relatedNodeIds = this.nodeIdsByBaseId.get(baseId);
|
|
196
|
-
if (!relatedNodeIds) {
|
|
197
|
-
const schema = this.eventSchemasByNode.get(nodeId);
|
|
198
|
-
return schema ? [schema.name] : [];
|
|
199
|
-
}
|
|
200
|
-
const eventNames = [];
|
|
201
|
-
for (const id of Array.from(relatedNodeIds)) {
|
|
202
|
-
const schema = this.eventSchemasByNode.get(id);
|
|
203
|
-
if (schema) {
|
|
204
|
-
eventNames.push(schema.name);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return eventNames;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Check if a node has event schema defined
|
|
211
|
-
* Supports both exact node IDs and base IDs (without numeric suffixes)
|
|
212
|
-
*/
|
|
213
|
-
hasSchema(nodeId) {
|
|
214
|
-
// Check exact match first
|
|
215
|
-
if (this.eventSchemasByNode.has(nodeId)) {
|
|
216
|
-
return true;
|
|
217
|
-
}
|
|
218
|
-
// Check base ID pattern (e.g., "graph-converter" matches "graph-converter-1", etc.)
|
|
219
|
-
const baseId = nodeId.replace(/-\d+$/, '');
|
|
220
|
-
return this.nodeIdsByBaseId.has(baseId);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
exports.EventValidator = EventValidator;
|
|
224
|
-
/**
|
|
225
|
-
* Create a validated event emitter for a specific node
|
|
226
|
-
*
|
|
227
|
-
* @example
|
|
228
|
-
* ```typescript
|
|
229
|
-
* const emit = createValidatedEmitter(validator, 'graph-converter', span);
|
|
230
|
-
*
|
|
231
|
-
* // Type-safe and runtime-validated
|
|
232
|
-
* emit('conversion.started', {
|
|
233
|
-
* 'config.nodeTypes': nodeTypes.length,
|
|
234
|
-
* 'config.edgeTypes': edgeTypes.length
|
|
235
|
-
* });
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
function createValidatedEmitter(validator, nodeId, addEventFn, options = {}) {
|
|
239
|
-
return (eventName, attributes) => {
|
|
240
|
-
// Validate against schema
|
|
241
|
-
const result = validator.validate(nodeId, eventName, attributes);
|
|
242
|
-
if (!result.valid) {
|
|
243
|
-
if (options.strict !== false) {
|
|
244
|
-
// Strict mode: throw on validation errors
|
|
245
|
-
throw new EventValidationError(eventName, nodeId, result.errors);
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
// Permissive mode: log warnings but allow the event
|
|
249
|
-
console.warn(`Event validation warnings for '${eventName}' on node '${nodeId}':`, result.errors);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
// Emit the event
|
|
253
|
-
addEventFn(eventName, attributes);
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
exports.createValidatedEmitter = createValidatedEmitter;
|
|
257
|
-
//# sourceMappingURL=event-validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-validator.js","sourceRoot":"","sources":["../../src/telemetry/event-validator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,4CAAwE;AAIxE;;GAEG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAC7C,YACS,SAAiB,EACjB,MAAc,EACd,MAAgB;QAEvB,KAAK,CAAC,gCAAgC,SAAS,cAAc,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAJxF,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAU;QAGvB,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AATD,oDASC;AAUD;;GAEG;AACH,MAAa,cAAc;IAMzB,YAAY,MAAsB,EAAE,OAA0B;QALtD,uBAAkB,GAA+B,IAAI,GAAG,EAAE,CAAC;QAC3D,uBAAkB,GAA+B,IAAI,GAAG,EAAE,CAAC;QAC3D,oBAAe,GAA6B,IAAI,GAAG,EAAE,CAAC;QAI5D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UAA+D,EAC/D,UAAgC,EAAE;IAElC,OAAO,CAAC,SAAiB,EAAE,UAAsB,EAAE,EAAE;QACnD,0BAA0B;QAC1B,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEjE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;YACjB,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;gBAC5B,0CAA0C;gBAC1C,MAAM,IAAI,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;aAClE;iBAAM;gBACL,oDAAoD;gBACpD,OAAO,CAAC,IAAI,CACV,kCAAkC,SAAS,cAAc,MAAM,IAAI,EACnE,MAAM,CAAC,MAAM,CACd,CAAC;aACH;SACF;QAED,iBAAiB;QACjB,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AA1BD,wDA0BC"}
|
package/dist/types/audit.d.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Log Audit Types
|
|
3
|
-
*
|
|
4
|
-
* Types for tracking log coverage, detecting orphaned logs, and generating
|
|
5
|
-
* audit reports. Used to analyze how well a canvas maps to actual system logs.
|
|
6
|
-
*
|
|
7
|
-
* @see docs/CANVAS_LOG_ASSOCIATION.md for full audit documentation
|
|
8
|
-
*/
|
|
9
|
-
import type { OtelResource } from './otel';
|
|
10
|
-
/**
|
|
11
|
-
* Status of a node based on log activity
|
|
12
|
-
*
|
|
13
|
-
* - `active`: Node is receiving logs normally
|
|
14
|
-
* - `silent`: Node is defined but receiving no logs (may indicate misconfiguration)
|
|
15
|
-
* - `error-heavy`: Node has unusually high error rate
|
|
16
|
-
*/
|
|
17
|
-
export type NodeActivityStatus = 'active' | 'silent' | 'error-heavy';
|
|
18
|
-
/**
|
|
19
|
-
* Activity record for a single node
|
|
20
|
-
*
|
|
21
|
-
* Tracks log counts and health status for audit reporting.
|
|
22
|
-
*/
|
|
23
|
-
export interface NodeActivity {
|
|
24
|
-
/** Node identifier */
|
|
25
|
-
nodeId: string;
|
|
26
|
-
/** Total log count during audit period */
|
|
27
|
-
logCount: number;
|
|
28
|
-
/** Error log count (severity >= ERROR) */
|
|
29
|
-
errorCount: number;
|
|
30
|
-
/** Warning log count (severity == WARN) */
|
|
31
|
-
warnCount: number;
|
|
32
|
-
/** Timestamp of last received log (null if never seen) */
|
|
33
|
-
lastSeen: number | null;
|
|
34
|
-
/** Computed activity status */
|
|
35
|
-
status: NodeActivityStatus;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Suggested action for orphaned logs
|
|
39
|
-
*
|
|
40
|
-
* - `add-node`: Log appears legitimate, add a node to the canvas
|
|
41
|
-
* - `fix-instrumentation`: Resource attributes look wrong, fix the source
|
|
42
|
-
* - `remove`: Log appears to be test/debug artifact, should be removed
|
|
43
|
-
* - `investigate`: Unable to determine, needs manual investigation
|
|
44
|
-
*/
|
|
45
|
-
export type OrphanSuggestedAction = 'add-node' | 'fix-instrumentation' | 'remove' | 'investigate';
|
|
46
|
-
/**
|
|
47
|
-
* An orphaned log group
|
|
48
|
-
*
|
|
49
|
-
* Logs that matched the canvas scope but didn't match any node's
|
|
50
|
-
* resourceMatch criteria. Grouped by resource signature.
|
|
51
|
-
*/
|
|
52
|
-
export interface OrphanedLog {
|
|
53
|
-
/**
|
|
54
|
-
* Resource attributes from the orphaned logs
|
|
55
|
-
*
|
|
56
|
-
* This is the "signature" used to group similar orphans.
|
|
57
|
-
* Contains the key attributes that could be used for matching.
|
|
58
|
-
*/
|
|
59
|
-
resource: OtelResource;
|
|
60
|
-
/** Number of logs with this resource signature */
|
|
61
|
-
count: number;
|
|
62
|
-
/**
|
|
63
|
-
* Sample log bodies for debugging
|
|
64
|
-
*
|
|
65
|
-
* Limited by audit config's maxSamplesPerOrphan setting.
|
|
66
|
-
*/
|
|
67
|
-
samples: string[];
|
|
68
|
-
/** First seen timestamp */
|
|
69
|
-
firstSeen: number;
|
|
70
|
-
/** Last seen timestamp */
|
|
71
|
-
lastSeen: number;
|
|
72
|
-
/**
|
|
73
|
-
* Suggested action based on heuristics
|
|
74
|
-
*
|
|
75
|
-
* Determined by analyzing the resource attributes and log patterns.
|
|
76
|
-
*/
|
|
77
|
-
suggestedAction: OrphanSuggestedAction;
|
|
78
|
-
/**
|
|
79
|
-
* Reason for the suggested action
|
|
80
|
-
*
|
|
81
|
-
* Human-readable explanation of why this action was suggested.
|
|
82
|
-
*/
|
|
83
|
-
suggestedReason?: string;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Type of audit recommendation
|
|
87
|
-
*
|
|
88
|
-
* - `add-node`: Add a new node to handle orphaned logs
|
|
89
|
-
* - `remove-node`: Remove a node that's always silent
|
|
90
|
-
* - `fix-match`: Update a node's resourceMatch criteria
|
|
91
|
-
* - `check-instrumentation`: Verify OTEL instrumentation on source service
|
|
92
|
-
*/
|
|
93
|
-
export type AuditRecommendationType = 'add-node' | 'remove-node' | 'fix-match' | 'check-instrumentation';
|
|
94
|
-
/**
|
|
95
|
-
* Priority level for recommendations
|
|
96
|
-
*/
|
|
97
|
-
export type AuditRecommendationPriority = 'high' | 'medium' | 'low';
|
|
98
|
-
/**
|
|
99
|
-
* Audit recommendation
|
|
100
|
-
*
|
|
101
|
-
* Actionable suggestion generated from audit analysis.
|
|
102
|
-
*/
|
|
103
|
-
export interface AuditRecommendation {
|
|
104
|
-
/** Type of recommendation */
|
|
105
|
-
type: AuditRecommendationType;
|
|
106
|
-
/** Target node ID or resource signature */
|
|
107
|
-
target: string;
|
|
108
|
-
/** Human-readable reason for this recommendation */
|
|
109
|
-
reason: string;
|
|
110
|
-
/** Priority level */
|
|
111
|
-
priority: AuditRecommendationPriority;
|
|
112
|
-
/**
|
|
113
|
-
* Suggested configuration snippet (if applicable)
|
|
114
|
-
*
|
|
115
|
-
* For `add-node` recommendations, this may contain a suggested
|
|
116
|
-
* resourceMatch configuration.
|
|
117
|
-
*/
|
|
118
|
-
suggestedConfig?: Record<string, unknown>;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Complete audit report for a canvas
|
|
122
|
-
*
|
|
123
|
-
* Generated by the AuditCollector after analyzing log routing data.
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```typescript
|
|
127
|
-
* const report: AuditReport = {
|
|
128
|
-
* canvasId: 'checkout-system',
|
|
129
|
-
* generatedAt: Date.now(),
|
|
130
|
-
* period: {
|
|
131
|
-
* start: Date.now() - 86400000, // 24h ago
|
|
132
|
-
* end: Date.now()
|
|
133
|
-
* },
|
|
134
|
-
* summary: {
|
|
135
|
-
* totalLogs: 45231,
|
|
136
|
-
* mappedLogs: 42108,
|
|
137
|
-
* orphanedLogs: 3123,
|
|
138
|
-
* coveragePercent: 93.1
|
|
139
|
-
* },
|
|
140
|
-
* nodeActivity: [...],
|
|
141
|
-
* orphans: [...],
|
|
142
|
-
* recommendations: [...]
|
|
143
|
-
* };
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
export interface AuditReport {
|
|
147
|
-
/** Canvas ID this report is for */
|
|
148
|
-
canvasId: string;
|
|
149
|
-
/** When this report was generated */
|
|
150
|
-
generatedAt: number;
|
|
151
|
-
/** Time period covered by this report */
|
|
152
|
-
period: {
|
|
153
|
-
start: number;
|
|
154
|
-
end: number;
|
|
155
|
-
};
|
|
156
|
-
/** Summary statistics */
|
|
157
|
-
summary: {
|
|
158
|
-
/** Total logs in scope during period */
|
|
159
|
-
totalLogs: number;
|
|
160
|
-
/** Logs successfully routed to a node */
|
|
161
|
-
mappedLogs: number;
|
|
162
|
-
/** Logs in scope but not matching any node */
|
|
163
|
-
orphanedLogs: number;
|
|
164
|
-
/** Coverage percentage (mappedLogs / totalLogs * 100) */
|
|
165
|
-
coveragePercent: number;
|
|
166
|
-
/** Number of out-of-scope logs (for reference) */
|
|
167
|
-
outOfScopeLogs?: number;
|
|
168
|
-
};
|
|
169
|
-
/** Per-node activity breakdown */
|
|
170
|
-
nodeActivity: NodeActivity[];
|
|
171
|
-
/** Orphaned log groups (grouped by resource signature) */
|
|
172
|
-
orphans: OrphanedLog[];
|
|
173
|
-
/** Actionable recommendations */
|
|
174
|
-
recommendations: AuditRecommendation[];
|
|
175
|
-
/** Warnings generated during audit */
|
|
176
|
-
warnings?: string[];
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Result of routing a single log
|
|
180
|
-
*
|
|
181
|
-
* Used for real-time routing decisions and audit tracking.
|
|
182
|
-
*/
|
|
183
|
-
export interface LogRoutingResult {
|
|
184
|
-
/**
|
|
185
|
-
* Routing outcome
|
|
186
|
-
*
|
|
187
|
-
* - `routed`: Log matched a node
|
|
188
|
-
* - `orphaned`: Log in scope but no node match
|
|
189
|
-
* - `out-of-scope`: Log doesn't match canvas scope
|
|
190
|
-
*/
|
|
191
|
-
status: 'routed' | 'orphaned' | 'out-of-scope';
|
|
192
|
-
/** Node ID the log was routed to (if status is 'routed') */
|
|
193
|
-
nodeId?: string;
|
|
194
|
-
/** Match specificity score (if status is 'routed') */
|
|
195
|
-
score?: number;
|
|
196
|
-
/** Resource signature (if status is 'orphaned') */
|
|
197
|
-
resource?: OtelResource;
|
|
198
|
-
/**
|
|
199
|
-
* Matching strategy used
|
|
200
|
-
*
|
|
201
|
-
* - `resource`: Matched via resourceMatch
|
|
202
|
-
* - `path`: Matched via sources (path-based)
|
|
203
|
-
* - `explicit`: Matched via explicit annotation in log
|
|
204
|
-
*/
|
|
205
|
-
matchedBy?: 'resource' | 'path' | 'explicit';
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Event emitted when a log is orphaned
|
|
209
|
-
*
|
|
210
|
-
* Can be subscribed to for real-time orphan monitoring.
|
|
211
|
-
*/
|
|
212
|
-
export interface OrphanEvent {
|
|
213
|
-
/** Timestamp of the orphan */
|
|
214
|
-
timestamp: number;
|
|
215
|
-
/** Resource attributes of the orphaned log */
|
|
216
|
-
resource: OtelResource;
|
|
217
|
-
/** Log body (truncated if too long) */
|
|
218
|
-
body: string;
|
|
219
|
-
/** Canvas ID where orphan was detected */
|
|
220
|
-
canvasId: string;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Create a resource signature for grouping orphans
|
|
224
|
-
*
|
|
225
|
-
* Extracts key attributes that should be used for matching.
|
|
226
|
-
* Two logs with the same signature are considered the same "type" of orphan.
|
|
227
|
-
*
|
|
228
|
-
* @param resource Full resource attributes
|
|
229
|
-
* @returns Signature containing key matching attributes
|
|
230
|
-
*/
|
|
231
|
-
export declare function createResourceSignature(resource: OtelResource): OtelResource;
|
|
232
|
-
/**
|
|
233
|
-
* Convert a resource signature to a string key for Map/Set usage
|
|
234
|
-
*/
|
|
235
|
-
export declare function signatureToKey(resource: OtelResource): string;
|
|
236
|
-
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IAEf,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IAEjB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IAEnB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAElB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,+BAA+B;IAC/B,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,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/audit.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Log Audit Types
|
|
4
|
-
*
|
|
5
|
-
* Types for tracking log coverage, detecting orphaned logs, and generating
|
|
6
|
-
* audit reports. Used to analyze how well a canvas maps to actual system logs.
|
|
7
|
-
*
|
|
8
|
-
* @see docs/CANVAS_LOG_ASSOCIATION.md for full audit documentation
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.signatureToKey = exports.createResourceSignature = void 0;
|
|
12
|
-
/**
|
|
13
|
-
* Create a resource signature for grouping orphans
|
|
14
|
-
*
|
|
15
|
-
* Extracts key attributes that should be used for matching.
|
|
16
|
-
* Two logs with the same signature are considered the same "type" of orphan.
|
|
17
|
-
*
|
|
18
|
-
* @param resource Full resource attributes
|
|
19
|
-
* @returns Signature containing key matching attributes
|
|
20
|
-
*/
|
|
21
|
-
function createResourceSignature(resource) {
|
|
22
|
-
// Extract key attributes that would typically be used for node matching
|
|
23
|
-
const signatureKeys = [
|
|
24
|
-
'service.name',
|
|
25
|
-
'service.namespace',
|
|
26
|
-
'deployment.environment',
|
|
27
|
-
'db.system',
|
|
28
|
-
'db.name',
|
|
29
|
-
'k8s.deployment.name',
|
|
30
|
-
'k8s.namespace.name',
|
|
31
|
-
'messaging.system',
|
|
32
|
-
'messaging.destination.name',
|
|
33
|
-
];
|
|
34
|
-
const signature = {};
|
|
35
|
-
for (const key of signatureKeys) {
|
|
36
|
-
if (resource[key] !== undefined) {
|
|
37
|
-
signature[key] = resource[key];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return signature;
|
|
41
|
-
}
|
|
42
|
-
exports.createResourceSignature = createResourceSignature;
|
|
43
|
-
/**
|
|
44
|
-
* Convert a resource signature to a string key for Map/Set usage
|
|
45
|
-
*/
|
|
46
|
-
function signatureToKey(resource) {
|
|
47
|
-
const entries = Object.entries(resource)
|
|
48
|
-
.filter(([, v]) => v !== undefined)
|
|
49
|
-
.sort(([a], [b]) => a.localeCompare(b));
|
|
50
|
-
return entries.map(([k, v]) => `${k}=${v}`).join('|');
|
|
51
|
-
}
|
|
52
|
-
exports.signatureToKey = signatureToKey;
|
|
53
|
-
//# sourceMappingURL=audit.js.map
|
package/dist/types/audit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAuQH;;;;;;;;GAQG;AACH,SAAgB,uBAAuB,CAAC,QAAsB;IAC5D,wEAAwE;IACxE,MAAM,aAAa,GAAG;QACpB,cAAc;QACd,mBAAmB;QACnB,wBAAwB;QACxB,WAAW;QACX,SAAS;QACT,qBAAqB;QACrB,oBAAoB;QACpB,kBAAkB;QAClB,4BAA4B;KAC7B,CAAC;IAEF,MAAM,SAAS,GAAiB,EAAE,CAAC;IAEnC,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE;QAC/B,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YAC/B,SAAS,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;SAChC;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAvBD,0DAuBC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAsB;IACnD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SACrC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;SAClC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAND,wCAMC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auxiliary Manifest Types
|
|
3
|
-
*
|
|
4
|
-
* The auxiliary manifest catalogs project regions that are *not* OTEL scopes —
|
|
5
|
-
* folders like `docs/` or `.github/` that support the project but don't emit
|
|
6
|
-
* telemetry. Scope paths and area paths together form a partition of the
|
|
7
|
-
* accounted-for filesystem.
|
|
8
|
-
*
|
|
9
|
-
* The manifest is open-ended: `areas` is the first section, but the top-level
|
|
10
|
-
* shape leaves room for future sibling sections (e.g. external integrations)
|
|
11
|
-
* without breaking the format.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* One project area — a folder (or file) that supports the project outside the
|
|
15
|
-
* OTEL telemetry surface.
|
|
16
|
-
*/
|
|
17
|
-
export interface ProjectArea {
|
|
18
|
-
/**
|
|
19
|
-
* Display name. Must be unique across all areas in the manifest — used as
|
|
20
|
-
* the area's identifier in diagnostics.
|
|
21
|
-
*/
|
|
22
|
-
name: string;
|
|
23
|
-
/**
|
|
24
|
-
* One or more repo-relative paths owned by this area. Each entry may be a
|
|
25
|
-
* folder (covers all descendants) or a specific file. Paths must not
|
|
26
|
-
* overlap other areas, and must not overlap any scope path declared in a
|
|
27
|
-
* `.scopes.canvas`.
|
|
28
|
-
*/
|
|
29
|
-
paths: string[];
|
|
30
|
-
/**
|
|
31
|
-
* Free-text purpose. The "light documentation" — a sentence about why this
|
|
32
|
-
* folder exists.
|
|
33
|
-
*/
|
|
34
|
-
description: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The full manifest document. Persisted at
|
|
38
|
-
* `.principal-views/auxiliary.manifest.json`.
|
|
39
|
-
*/
|
|
40
|
-
export interface AuxiliaryManifest {
|
|
41
|
-
/**
|
|
42
|
-
* Optional pointer to the JSON Schema that describes this file. Lets editors
|
|
43
|
-
* give autocomplete and validation when the field is set.
|
|
44
|
-
*/
|
|
45
|
-
$schema?: string;
|
|
46
|
-
/** Project areas declared in this manifest. */
|
|
47
|
-
areas: ProjectArea[];
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Type guard: true when the value plausibly conforms to `AuxiliaryManifest`.
|
|
51
|
-
* Shallow check — full validation lives in `AuxiliaryManifestValidator`.
|
|
52
|
-
*/
|
|
53
|
-
export declare function isAuxiliaryManifest(value: unknown): value is AuxiliaryManifest;
|
|
54
|
-
//# sourceMappingURL=auxiliary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auxiliary.d.ts","sourceRoot":"","sources":["../../src/types/auxiliary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,+CAA+C;IAC/C,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAI9E"}
|
package/dist/types/auxiliary.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Auxiliary Manifest Types
|
|
4
|
-
*
|
|
5
|
-
* The auxiliary manifest catalogs project regions that are *not* OTEL scopes —
|
|
6
|
-
* folders like `docs/` or `.github/` that support the project but don't emit
|
|
7
|
-
* telemetry. Scope paths and area paths together form a partition of the
|
|
8
|
-
* accounted-for filesystem.
|
|
9
|
-
*
|
|
10
|
-
* The manifest is open-ended: `areas` is the first section, but the top-level
|
|
11
|
-
* shape leaves room for future sibling sections (e.g. external integrations)
|
|
12
|
-
* without breaking the format.
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.isAuxiliaryManifest = void 0;
|
|
16
|
-
/**
|
|
17
|
-
* Type guard: true when the value plausibly conforms to `AuxiliaryManifest`.
|
|
18
|
-
* Shallow check — full validation lives in `AuxiliaryManifestValidator`.
|
|
19
|
-
*/
|
|
20
|
-
function isAuxiliaryManifest(value) {
|
|
21
|
-
if (!value || typeof value !== 'object')
|
|
22
|
-
return false;
|
|
23
|
-
const v = value;
|
|
24
|
-
return Array.isArray(v.areas);
|
|
25
|
-
}
|
|
26
|
-
exports.isAuxiliaryManifest = isAuxiliaryManifest;
|
|
27
|
-
//# sourceMappingURL=auxiliary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auxiliary.js","sourceRoot":"","sources":["../../src/types/auxiliary.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA2CH;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAAc;IAChD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAG,KAA4B,CAAC;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAJD,kDAIC"}
|