@opensip-cli/core 0.1.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/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +31 -0
- package/dist/__tests__/config-resolution.test.d.ts +2 -0
- package/dist/__tests__/config-resolution.test.d.ts.map +1 -0
- package/dist/__tests__/config-resolution.test.js +94 -0
- package/dist/__tests__/config-resolution.test.js.map +1 -0
- package/dist/__tests__/public-api.test.d.ts +16 -0
- package/dist/__tests__/public-api.test.d.ts.map +1 -0
- package/dist/__tests__/public-api.test.js +209 -0
- package/dist/__tests__/public-api.test.js.map +1 -0
- package/dist/__tests__/signal-batch.test.d.ts +2 -0
- package/dist/__tests__/signal-batch.test.d.ts.map +1 -0
- package/dist/__tests__/signal-batch.test.js +39 -0
- package/dist/__tests__/signal-batch.test.js.map +1 -0
- package/dist/__tests__/signal-sink.test.d.ts +2 -0
- package/dist/__tests__/signal-sink.test.d.ts.map +1 -0
- package/dist/__tests__/signal-sink.test.js +25 -0
- package/dist/__tests__/signal-sink.test.js.map +1 -0
- package/dist/__tests__/strip-utils.test.d.ts +2 -0
- package/dist/__tests__/strip-utils.test.d.ts.map +1 -0
- package/dist/__tests__/strip-utils.test.js +397 -0
- package/dist/__tests__/strip-utils.test.js.map +1 -0
- package/dist/__tests__/text-tree.test.d.ts +2 -0
- package/dist/__tests__/text-tree.test.d.ts.map +1 -0
- package/dist/__tests__/text-tree.test.js +31 -0
- package/dist/__tests__/text-tree.test.js.map +1 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts +2 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts.map +1 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.js +69 -0
- package/dist/baseline/__tests__/fingerprint-strategy.test.js.map +1 -0
- package/dist/baseline/fingerprint-strategy.d.ts +70 -0
- package/dist/baseline/fingerprint-strategy.d.ts.map +1 -0
- package/dist/baseline/fingerprint-strategy.js +90 -0
- package/dist/baseline/fingerprint-strategy.js.map +1 -0
- package/dist/config-resolution.d.ts +27 -0
- package/dist/config-resolution.d.ts.map +1 -0
- package/dist/config-resolution.js +92 -0
- package/dist/config-resolution.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +165 -0
- package/dist/index.js.map +1 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.d.ts +2 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.d.ts.map +1 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.js +87 -0
- package/dist/languages/__tests__/content-filter-dispatch.test.js.map +1 -0
- package/dist/languages/__tests__/non-code-formats.test.d.ts +2 -0
- package/dist/languages/__tests__/non-code-formats.test.d.ts.map +1 -0
- package/dist/languages/__tests__/non-code-formats.test.js +31 -0
- package/dist/languages/__tests__/non-code-formats.test.js.map +1 -0
- package/dist/languages/__tests__/parse-cache.test.d.ts +2 -0
- package/dist/languages/__tests__/parse-cache.test.d.ts.map +1 -0
- package/dist/languages/__tests__/parse-cache.test.js +228 -0
- package/dist/languages/__tests__/parse-cache.test.js.map +1 -0
- package/dist/languages/__tests__/registry.test.d.ts +2 -0
- package/dist/languages/__tests__/registry.test.d.ts.map +1 -0
- package/dist/languages/__tests__/registry.test.js +193 -0
- package/dist/languages/__tests__/registry.test.js.map +1 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.d.ts +2 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.d.ts.map +1 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.js +66 -0
- package/dist/languages/__tests__/workspace-unit-contract.test.js.map +1 -0
- package/dist/languages/adapter.d.ts +66 -0
- package/dist/languages/adapter.d.ts.map +1 -0
- package/dist/languages/adapter.js +2 -0
- package/dist/languages/adapter.js.map +1 -0
- package/dist/languages/content-filter-dispatch.d.ts +36 -0
- package/dist/languages/content-filter-dispatch.d.ts.map +1 -0
- package/dist/languages/content-filter-dispatch.js +75 -0
- package/dist/languages/content-filter-dispatch.js.map +1 -0
- package/dist/languages/generic-types.d.ts +22 -0
- package/dist/languages/generic-types.d.ts.map +1 -0
- package/dist/languages/generic-types.js +3 -0
- package/dist/languages/generic-types.js.map +1 -0
- package/dist/languages/index.d.ts +12 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +7 -0
- package/dist/languages/index.js.map +1 -0
- package/dist/languages/non-code-formats.d.ts +37 -0
- package/dist/languages/non-code-formats.d.ts.map +1 -0
- package/dist/languages/non-code-formats.js +45 -0
- package/dist/languages/non-code-formats.js.map +1 -0
- package/dist/languages/parse-cache-class.d.ts +69 -0
- package/dist/languages/parse-cache-class.d.ts.map +1 -0
- package/dist/languages/parse-cache-class.js +135 -0
- package/dist/languages/parse-cache-class.js.map +1 -0
- package/dist/languages/parse-cache.d.ts +54 -0
- package/dist/languages/parse-cache.d.ts.map +1 -0
- package/dist/languages/parse-cache.js +88 -0
- package/dist/languages/parse-cache.js.map +1 -0
- package/dist/languages/registry.d.ts +35 -0
- package/dist/languages/registry.d.ts.map +1 -0
- package/dist/languages/registry.js +123 -0
- package/dist/languages/registry.js.map +1 -0
- package/dist/languages/strip-scanners.d.ts +170 -0
- package/dist/languages/strip-scanners.d.ts.map +1 -0
- package/dist/languages/strip-scanners.js +233 -0
- package/dist/languages/strip-scanners.js.map +1 -0
- package/dist/languages/strip-utils.d.ts +66 -0
- package/dist/languages/strip-utils.d.ts.map +1 -0
- package/dist/languages/strip-utils.js +88 -0
- package/dist/languages/strip-utils.js.map +1 -0
- package/dist/languages/text-tree.d.ts +44 -0
- package/dist/languages/text-tree.d.ts.map +1 -0
- package/dist/languages/text-tree.js +34 -0
- package/dist/languages/text-tree.js.map +1 -0
- package/dist/languages/workspace-unit.d.ts +18 -0
- package/dist/languages/workspace-unit.d.ts.map +1 -0
- package/dist/languages/workspace-unit.js +2 -0
- package/dist/languages/workspace-unit.js.map +1 -0
- package/dist/lib/__tests__/config-version.test.d.ts +12 -0
- package/dist/lib/__tests__/config-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/config-version.test.js +92 -0
- package/dist/lib/__tests__/config-version.test.js.map +1 -0
- package/dist/lib/__tests__/diagnostics-bus.test.d.ts +7 -0
- package/dist/lib/__tests__/diagnostics-bus.test.d.ts.map +1 -0
- package/dist/lib/__tests__/diagnostics-bus.test.js +44 -0
- package/dist/lib/__tests__/diagnostics-bus.test.js.map +1 -0
- package/dist/lib/__tests__/env-registry.test.d.ts +7 -0
- package/dist/lib/__tests__/env-registry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/env-registry.test.js +82 -0
- package/dist/lib/__tests__/env-registry.test.js.map +1 -0
- package/dist/lib/__tests__/errors.test.d.ts +2 -0
- package/dist/lib/__tests__/errors.test.d.ts.map +1 -0
- package/dist/lib/__tests__/errors.test.js +218 -0
- package/dist/lib/__tests__/errors.test.js.map +1 -0
- package/dist/lib/__tests__/format.test.d.ts +2 -0
- package/dist/lib/__tests__/format.test.d.ts.map +1 -0
- package/dist/lib/__tests__/format.test.js +23 -0
- package/dist/lib/__tests__/format.test.js.map +1 -0
- package/dist/lib/__tests__/ids.test.d.ts +2 -0
- package/dist/lib/__tests__/ids.test.d.ts.map +1 -0
- package/dist/lib/__tests__/ids.test.js +80 -0
- package/dist/lib/__tests__/ids.test.js.map +1 -0
- package/dist/lib/__tests__/logger.test.d.ts +2 -0
- package/dist/lib/__tests__/logger.test.d.ts.map +1 -0
- package/dist/lib/__tests__/logger.test.js +284 -0
- package/dist/lib/__tests__/logger.test.js.map +1 -0
- package/dist/lib/__tests__/package-version.test.d.ts +2 -0
- package/dist/lib/__tests__/package-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/package-version.test.js +47 -0
- package/dist/lib/__tests__/package-version.test.js.map +1 -0
- package/dist/lib/__tests__/paths.test.d.ts +5 -0
- package/dist/lib/__tests__/paths.test.d.ts.map +1 -0
- package/dist/lib/__tests__/paths.test.js +59 -0
- package/dist/lib/__tests__/paths.test.js.map +1 -0
- package/dist/lib/__tests__/payload-version.test.d.ts +2 -0
- package/dist/lib/__tests__/payload-version.test.d.ts.map +1 -0
- package/dist/lib/__tests__/payload-version.test.js +35 -0
- package/dist/lib/__tests__/payload-version.test.js.map +1 -0
- package/dist/lib/__tests__/phantom-detect.test.d.ts +10 -0
- package/dist/lib/__tests__/phantom-detect.test.d.ts.map +1 -0
- package/dist/lib/__tests__/phantom-detect.test.js +84 -0
- package/dist/lib/__tests__/phantom-detect.test.js.map +1 -0
- package/dist/lib/__tests__/project-context.test.d.ts +10 -0
- package/dist/lib/__tests__/project-context.test.d.ts.map +1 -0
- package/dist/lib/__tests__/project-context.test.js +240 -0
- package/dist/lib/__tests__/project-context.test.js.map +1 -0
- package/dist/lib/__tests__/registry.test.d.ts +2 -0
- package/dist/lib/__tests__/registry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/registry.test.js +333 -0
- package/dist/lib/__tests__/registry.test.js.map +1 -0
- package/dist/lib/__tests__/retry.test.d.ts +2 -0
- package/dist/lib/__tests__/retry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/retry.test.js +71 -0
- package/dist/lib/__tests__/retry.test.js.map +1 -0
- package/dist/lib/__tests__/run-diagnostics.test.d.ts +9 -0
- package/dist/lib/__tests__/run-diagnostics.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-diagnostics.test.js +61 -0
- package/dist/lib/__tests__/run-diagnostics.test.js.map +1 -0
- package/dist/lib/__tests__/run-scope.test.d.ts +2 -0
- package/dist/lib/__tests__/run-scope.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-scope.test.js +202 -0
- package/dist/lib/__tests__/run-scope.test.js.map +1 -0
- package/dist/lib/__tests__/run-timer.test.d.ts +2 -0
- package/dist/lib/__tests__/run-timer.test.d.ts.map +1 -0
- package/dist/lib/__tests__/run-timer.test.js +152 -0
- package/dist/lib/__tests__/run-timer.test.js.map +1 -0
- package/dist/lib/__tests__/severity-policy.test.d.ts +6 -0
- package/dist/lib/__tests__/severity-policy.test.d.ts.map +1 -0
- package/dist/lib/__tests__/severity-policy.test.js +47 -0
- package/dist/lib/__tests__/severity-policy.test.js.map +1 -0
- package/dist/lib/__tests__/telemetry.test.d.ts +2 -0
- package/dist/lib/__tests__/telemetry.test.d.ts.map +1 -0
- package/dist/lib/__tests__/telemetry.test.js +212 -0
- package/dist/lib/__tests__/telemetry.test.js.map +1 -0
- package/dist/lib/__tests__/verdict-policy.test.d.ts +7 -0
- package/dist/lib/__tests__/verdict-policy.test.d.ts.map +1 -0
- package/dist/lib/__tests__/verdict-policy.test.js +91 -0
- package/dist/lib/__tests__/verdict-policy.test.js.map +1 -0
- package/dist/lib/__tests__/yaml.test.d.ts +6 -0
- package/dist/lib/__tests__/yaml.test.d.ts.map +1 -0
- package/dist/lib/__tests__/yaml.test.js +79 -0
- package/dist/lib/__tests__/yaml.test.js.map +1 -0
- package/dist/lib/config-version.d.ts +49 -0
- package/dist/lib/config-version.d.ts.map +1 -0
- package/dist/lib/config-version.js +56 -0
- package/dist/lib/config-version.js.map +1 -0
- package/dist/lib/diagnostics-bus.d.ts +48 -0
- package/dist/lib/diagnostics-bus.d.ts.map +1 -0
- package/dist/lib/diagnostics-bus.js +74 -0
- package/dist/lib/diagnostics-bus.js.map +1 -0
- package/dist/lib/env-registry.d.ts +108 -0
- package/dist/lib/env-registry.d.ts.map +1 -0
- package/dist/lib/env-registry.js +92 -0
- package/dist/lib/env-registry.js.map +1 -0
- package/dist/lib/errors.d.ts +132 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +160 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/execution/__tests__/execution.test.d.ts +7 -0
- package/dist/lib/execution/__tests__/execution.test.d.ts.map +1 -0
- package/dist/lib/execution/__tests__/execution.test.js +254 -0
- package/dist/lib/execution/__tests__/execution.test.js.map +1 -0
- package/dist/lib/execution/index.d.ts +15 -0
- package/dist/lib/execution/index.d.ts.map +1 -0
- package/dist/lib/execution/index.js +10 -0
- package/dist/lib/execution/index.js.map +1 -0
- package/dist/lib/execution/options.d.ts +32 -0
- package/dist/lib/execution/options.d.ts.map +1 -0
- package/dist/lib/execution/options.js +15 -0
- package/dist/lib/execution/options.js.map +1 -0
- package/dist/lib/execution/pipeline.d.ts +36 -0
- package/dist/lib/execution/pipeline.d.ts.map +1 -0
- package/dist/lib/execution/pipeline.js +38 -0
- package/dist/lib/execution/pipeline.js.map +1 -0
- package/dist/lib/execution/retry.d.ts +38 -0
- package/dist/lib/execution/retry.d.ts.map +1 -0
- package/dist/lib/execution/retry.js +56 -0
- package/dist/lib/execution/retry.js.map +1 -0
- package/dist/lib/execution/run-with-timeout.d.ts +46 -0
- package/dist/lib/execution/run-with-timeout.d.ts.map +1 -0
- package/dist/lib/execution/run-with-timeout.js +86 -0
- package/dist/lib/execution/run-with-timeout.js.map +1 -0
- package/dist/lib/execution/schedule.d.ts +62 -0
- package/dist/lib/execution/schedule.d.ts.map +1 -0
- package/dist/lib/execution/schedule.js +130 -0
- package/dist/lib/execution/schedule.js.map +1 -0
- package/dist/lib/format.d.ts +17 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +26 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/ids.d.ts +13 -0
- package/dist/lib/ids.d.ts.map +1 -0
- package/dist/lib/ids.js +48 -0
- package/dist/lib/ids.js.map +1 -0
- package/dist/lib/logger.d.ts +166 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +283 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/package-version.d.ts +17 -0
- package/dist/lib/package-version.d.ts.map +1 -0
- package/dist/lib/package-version.js +52 -0
- package/dist/lib/package-version.js.map +1 -0
- package/dist/lib/paths.d.ts +139 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +105 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/payload-version.d.ts +15 -0
- package/dist/lib/payload-version.d.ts.map +1 -0
- package/dist/lib/payload-version.js +24 -0
- package/dist/lib/payload-version.js.map +1 -0
- package/dist/lib/phantom-detect.d.ts +21 -0
- package/dist/lib/phantom-detect.d.ts.map +1 -0
- package/dist/lib/phantom-detect.js +76 -0
- package/dist/lib/phantom-detect.js.map +1 -0
- package/dist/lib/project-context.d.ts +66 -0
- package/dist/lib/project-context.d.ts.map +1 -0
- package/dist/lib/project-context.js +112 -0
- package/dist/lib/project-context.js.map +1 -0
- package/dist/lib/recipe-id.d.ts +13 -0
- package/dist/lib/recipe-id.d.ts.map +1 -0
- package/dist/lib/recipe-id.js +15 -0
- package/dist/lib/recipe-id.js.map +1 -0
- package/dist/lib/registry.d.ts +98 -0
- package/dist/lib/registry.d.ts.map +1 -0
- package/dist/lib/registry.js +152 -0
- package/dist/lib/registry.js.map +1 -0
- package/dist/lib/retry.d.ts +26 -0
- package/dist/lib/retry.d.ts.map +1 -0
- package/dist/lib/retry.js +48 -0
- package/dist/lib/retry.js.map +1 -0
- package/dist/lib/run-diagnostics.d.ts +64 -0
- package/dist/lib/run-diagnostics.d.ts.map +1 -0
- package/dist/lib/run-diagnostics.js +25 -0
- package/dist/lib/run-diagnostics.js.map +1 -0
- package/dist/lib/run-scope.d.ts +167 -0
- package/dist/lib/run-scope.d.ts.map +1 -0
- package/dist/lib/run-scope.js +176 -0
- package/dist/lib/run-scope.js.map +1 -0
- package/dist/lib/run-timer.d.ts +82 -0
- package/dist/lib/run-timer.d.ts.map +1 -0
- package/dist/lib/run-timer.js +79 -0
- package/dist/lib/run-timer.js.map +1 -0
- package/dist/lib/scope-types.d.ts +172 -0
- package/dist/lib/scope-types.d.ts.map +1 -0
- package/dist/lib/scope-types.js +27 -0
- package/dist/lib/scope-types.js.map +1 -0
- package/dist/lib/severity-policy.d.ts +38 -0
- package/dist/lib/severity-policy.d.ts.map +1 -0
- package/dist/lib/severity-policy.js +44 -0
- package/dist/lib/severity-policy.js.map +1 -0
- package/dist/lib/telemetry.d.ts +93 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +144 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/dist/lib/ui-context.d.ts +34 -0
- package/dist/lib/ui-context.d.ts.map +1 -0
- package/dist/lib/ui-context.js +16 -0
- package/dist/lib/ui-context.js.map +1 -0
- package/dist/lib/verdict-policy.d.ts +71 -0
- package/dist/lib/verdict-policy.d.ts.map +1 -0
- package/dist/lib/verdict-policy.js +82 -0
- package/dist/lib/verdict-policy.js.map +1 -0
- package/dist/lib/yaml.d.ts +74 -0
- package/dist/lib/yaml.d.ts.map +1 -0
- package/dist/lib/yaml.js +118 -0
- package/dist/lib/yaml.js.map +1 -0
- package/dist/plugins/__tests__/as-if-external.test.d.ts +18 -0
- package/dist/plugins/__tests__/as-if-external.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/as-if-external.test.js +159 -0
- package/dist/plugins/__tests__/as-if-external.test.js.map +1 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts +8 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.js +97 -0
- package/dist/plugins/__tests__/authored-tool-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-discovery.test.js +349 -0
- package/dist/plugins/__tests__/capability-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.js +172 -0
- package/dist/plugins/__tests__/capability-from-manifest.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-loader.test.js +122 -0
- package/dist/plugins/__tests__/capability-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/capability-registry.test.d.ts +2 -0
- package/dist/plugins/__tests__/capability-registry.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/capability-registry.test.js +185 -0
- package/dist/plugins/__tests__/capability-registry.test.js.map +1 -0
- package/dist/plugins/__tests__/discover.test.d.ts +2 -0
- package/dist/plugins/__tests__/discover.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/discover.test.js +311 -0
- package/dist/plugins/__tests__/discover.test.js.map +1 -0
- package/dist/plugins/__tests__/loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/loader.test.js +191 -0
- package/dist/plugins/__tests__/loader.test.js.map +1 -0
- package/dist/plugins/__tests__/manifest-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/manifest-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/manifest-discovery.test.js +132 -0
- package/dist/plugins/__tests__/manifest-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/manifest-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/manifest-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/manifest-loader.test.js +434 -0
- package/dist/plugins/__tests__/manifest-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/marker-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/marker-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/marker-discovery.test.js +164 -0
- package/dist/plugins/__tests__/marker-discovery.test.js.map +1 -0
- package/dist/plugins/__tests__/node-modules-walk.test.d.ts +2 -0
- package/dist/plugins/__tests__/node-modules-walk.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/node-modules-walk.test.js +76 -0
- package/dist/plugins/__tests__/node-modules-walk.test.js.map +1 -0
- package/dist/plugins/__tests__/package-entry.test.d.ts +9 -0
- package/dist/plugins/__tests__/package-entry.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/package-entry.test.js +117 -0
- package/dist/plugins/__tests__/package-entry.test.js.map +1 -0
- package/dist/plugins/__tests__/recipe-loader.test.d.ts +2 -0
- package/dist/plugins/__tests__/recipe-loader.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/recipe-loader.test.js +130 -0
- package/dist/plugins/__tests__/recipe-loader.test.js.map +1 -0
- package/dist/plugins/__tests__/scope-validation.test.d.ts +2 -0
- package/dist/plugins/__tests__/scope-validation.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/scope-validation.test.js +68 -0
- package/dist/plugins/__tests__/scope-validation.test.js.map +1 -0
- package/dist/plugins/__tests__/single-core-guard.test.d.ts +10 -0
- package/dist/plugins/__tests__/single-core-guard.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/single-core-guard.test.js +89 -0
- package/dist/plugins/__tests__/single-core-guard.test.js.map +1 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.d.ts +2 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.d.ts.map +1 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.js +215 -0
- package/dist/plugins/__tests__/tool-package-discovery.test.js.map +1 -0
- package/dist/plugins/authored-tool-discovery.d.ts +45 -0
- package/dist/plugins/authored-tool-discovery.d.ts.map +1 -0
- package/dist/plugins/authored-tool-discovery.js +61 -0
- package/dist/plugins/authored-tool-discovery.js.map +1 -0
- package/dist/plugins/capability-discovery.d.ts +80 -0
- package/dist/plugins/capability-discovery.d.ts.map +1 -0
- package/dist/plugins/capability-discovery.js +278 -0
- package/dist/plugins/capability-discovery.js.map +1 -0
- package/dist/plugins/capability-loader.d.ts +50 -0
- package/dist/plugins/capability-loader.d.ts.map +1 -0
- package/dist/plugins/capability-loader.js +85 -0
- package/dist/plugins/capability-loader.js.map +1 -0
- package/dist/plugins/capability-registry.d.ts +169 -0
- package/dist/plugins/capability-registry.d.ts.map +1 -0
- package/dist/plugins/capability-registry.js +319 -0
- package/dist/plugins/capability-registry.js.map +1 -0
- package/dist/plugins/discover.d.ts +64 -0
- package/dist/plugins/discover.d.ts.map +1 -0
- package/dist/plugins/discover.js +303 -0
- package/dist/plugins/discover.js.map +1 -0
- package/dist/plugins/index.d.ts +37 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +40 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/json-guards.d.ts +11 -0
- package/dist/plugins/json-guards.d.ts.map +1 -0
- package/dist/plugins/json-guards.js +15 -0
- package/dist/plugins/json-guards.js.map +1 -0
- package/dist/plugins/loader.d.ts +67 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +137 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/manifest-discovery.d.ts +28 -0
- package/dist/plugins/manifest-discovery.d.ts.map +1 -0
- package/dist/plugins/manifest-discovery.js +103 -0
- package/dist/plugins/manifest-discovery.js.map +1 -0
- package/dist/plugins/manifest-loader.d.ts +120 -0
- package/dist/plugins/manifest-loader.d.ts.map +1 -0
- package/dist/plugins/manifest-loader.js +410 -0
- package/dist/plugins/manifest-loader.js.map +1 -0
- package/dist/plugins/marker-discovery.d.ts +115 -0
- package/dist/plugins/marker-discovery.d.ts.map +1 -0
- package/dist/plugins/marker-discovery.js +172 -0
- package/dist/plugins/marker-discovery.js.map +1 -0
- package/dist/plugins/node-modules-walk.d.ts +61 -0
- package/dist/plugins/node-modules-walk.d.ts.map +1 -0
- package/dist/plugins/node-modules-walk.js +99 -0
- package/dist/plugins/node-modules-walk.js.map +1 -0
- package/dist/plugins/package-entry.d.ts +38 -0
- package/dist/plugins/package-entry.d.ts.map +1 -0
- package/dist/plugins/package-entry.js +86 -0
- package/dist/plugins/package-entry.js.map +1 -0
- package/dist/plugins/recipe-loader.d.ts +63 -0
- package/dist/plugins/recipe-loader.d.ts.map +1 -0
- package/dist/plugins/recipe-loader.js +67 -0
- package/dist/plugins/recipe-loader.js.map +1 -0
- package/dist/plugins/scope-validation.d.ts +35 -0
- package/dist/plugins/scope-validation.d.ts.map +1 -0
- package/dist/plugins/scope-validation.js +55 -0
- package/dist/plugins/scope-validation.js.map +1 -0
- package/dist/plugins/single-core-guard.d.ts +28 -0
- package/dist/plugins/single-core-guard.d.ts.map +1 -0
- package/dist/plugins/single-core-guard.js +69 -0
- package/dist/plugins/single-core-guard.js.map +1 -0
- package/dist/plugins/tool-package-discovery.d.ts +93 -0
- package/dist/plugins/tool-package-discovery.d.ts.map +1 -0
- package/dist/plugins/tool-package-discovery.js +118 -0
- package/dist/plugins/tool-package-discovery.js.map +1 -0
- package/dist/plugins/types.d.ts +78 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +15 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/recipes/__tests__/registry.test.d.ts +2 -0
- package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/registry.test.js +170 -0
- package/dist/recipes/__tests__/registry.test.js.map +1 -0
- package/dist/recipes/__tests__/selector.test.d.ts +20 -0
- package/dist/recipes/__tests__/selector.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/selector.test.js +173 -0
- package/dist/recipes/__tests__/selector.test.js.map +1 -0
- package/dist/recipes/__tests__/unit-config.test.d.ts +7 -0
- package/dist/recipes/__tests__/unit-config.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/unit-config.test.js +52 -0
- package/dist/recipes/__tests__/unit-config.test.js.map +1 -0
- package/dist/recipes/registry.d.ts +105 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +141 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/selector.d.ts +112 -0
- package/dist/recipes/selector.d.ts.map +1 -0
- package/dist/recipes/selector.js +134 -0
- package/dist/recipes/selector.js.map +1 -0
- package/dist/recipes/unit-config.d.ts +63 -0
- package/dist/recipes/unit-config.d.ts.map +1 -0
- package/dist/recipes/unit-config.js +68 -0
- package/dist/recipes/unit-config.js.map +1 -0
- package/dist/runtime/__tests__/in-process-transport.test.d.ts +6 -0
- package/dist/runtime/__tests__/in-process-transport.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/in-process-transport.test.js +73 -0
- package/dist/runtime/__tests__/in-process-transport.test.js.map +1 -0
- package/dist/runtime/__tests__/subprocess-transport.test.d.ts +11 -0
- package/dist/runtime/__tests__/subprocess-transport.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/subprocess-transport.test.js +118 -0
- package/dist/runtime/__tests__/subprocess-transport.test.js.map +1 -0
- package/dist/runtime/in-process-transport.d.ts +20 -0
- package/dist/runtime/in-process-transport.d.ts.map +1 -0
- package/dist/runtime/in-process-transport.js +49 -0
- package/dist/runtime/in-process-transport.js.map +1 -0
- package/dist/runtime/progress-transport.d.ts +73 -0
- package/dist/runtime/progress-transport.d.ts.map +1 -0
- package/dist/runtime/progress-transport.js +17 -0
- package/dist/runtime/progress-transport.js.map +1 -0
- package/dist/runtime/subprocess-transport.d.ts +43 -0
- package/dist/runtime/subprocess-transport.d.ts.map +1 -0
- package/dist/runtime/subprocess-transport.js +134 -0
- package/dist/runtime/subprocess-transport.js.map +1 -0
- package/dist/signals/comment-openers.d.ts +29 -0
- package/dist/signals/comment-openers.d.ts.map +1 -0
- package/dist/signals/comment-openers.js +41 -0
- package/dist/signals/comment-openers.js.map +1 -0
- package/dist/signals/comment-openers.test.d.ts +7 -0
- package/dist/signals/comment-openers.test.d.ts.map +1 -0
- package/dist/signals/comment-openers.test.js +41 -0
- package/dist/signals/comment-openers.test.js.map +1 -0
- package/dist/signals/create-signal-from-violation.d.ts +29 -0
- package/dist/signals/create-signal-from-violation.d.ts.map +1 -0
- package/dist/signals/create-signal-from-violation.js +29 -0
- package/dist/signals/create-signal-from-violation.js.map +1 -0
- package/dist/signals/signal-sink.d.ts +49 -0
- package/dist/signals/signal-sink.d.ts.map +1 -0
- package/dist/signals/signal-sink.js +6 -0
- package/dist/signals/signal-sink.js.map +1 -0
- package/dist/signals/suppress.d.ts +102 -0
- package/dist/signals/suppress.d.ts.map +1 -0
- package/dist/signals/suppress.js +325 -0
- package/dist/signals/suppress.js.map +1 -0
- package/dist/signals/suppress.test.d.ts +2 -0
- package/dist/signals/suppress.test.d.ts.map +1 -0
- package/dist/signals/suppress.test.js +213 -0
- package/dist/signals/suppress.test.js.map +1 -0
- package/dist/tools/__tests__/command-spec.test.d.ts +2 -0
- package/dist/tools/__tests__/command-spec.test.d.ts.map +1 -0
- package/dist/tools/__tests__/command-spec.test.js +191 -0
- package/dist/tools/__tests__/command-spec.test.js.map +1 -0
- package/dist/tools/__tests__/compatibility.test.d.ts +5 -0
- package/dist/tools/__tests__/compatibility.test.d.ts.map +1 -0
- package/dist/tools/__tests__/compatibility.test.js +41 -0
- package/dist/tools/__tests__/compatibility.test.js.map +1 -0
- package/dist/tools/__tests__/ids.test.d.ts +5 -0
- package/dist/tools/__tests__/ids.test.d.ts.map +1 -0
- package/dist/tools/__tests__/ids.test.js +56 -0
- package/dist/tools/__tests__/ids.test.js.map +1 -0
- package/dist/tools/__tests__/manifest-assert.test.d.ts +5 -0
- package/dist/tools/__tests__/manifest-assert.test.d.ts.map +1 -0
- package/dist/tools/__tests__/manifest-assert.test.js +66 -0
- package/dist/tools/__tests__/manifest-assert.test.js.map +1 -0
- package/dist/tools/__tests__/registry.test.d.ts +2 -0
- package/dist/tools/__tests__/registry.test.d.ts.map +1 -0
- package/dist/tools/__tests__/registry.test.js +93 -0
- package/dist/tools/__tests__/registry.test.js.map +1 -0
- package/dist/tools/__tests__/types.test.d.ts +2 -0
- package/dist/tools/__tests__/types.test.d.ts.map +1 -0
- package/dist/tools/__tests__/types.test.js +51 -0
- package/dist/tools/__tests__/types.test.js.map +1 -0
- package/dist/tools/capability.d.ts +257 -0
- package/dist/tools/capability.d.ts.map +1 -0
- package/dist/tools/capability.js +46 -0
- package/dist/tools/capability.js.map +1 -0
- package/dist/tools/command-spec.d.ts +211 -0
- package/dist/tools/command-spec.d.ts.map +1 -0
- package/dist/tools/command-spec.js +110 -0
- package/dist/tools/command-spec.js.map +1 -0
- package/dist/tools/compatibility.d.ts +45 -0
- package/dist/tools/compatibility.d.ts.map +1 -0
- package/dist/tools/compatibility.js +49 -0
- package/dist/tools/compatibility.js.map +1 -0
- package/dist/tools/ids.d.ts +61 -0
- package/dist/tools/ids.d.ts.map +1 -0
- package/dist/tools/ids.js +61 -0
- package/dist/tools/ids.js.map +1 -0
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +28 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/manifest-assert.d.ts +35 -0
- package/dist/tools/manifest-assert.d.ts.map +1 -0
- package/dist/tools/manifest-assert.js +67 -0
- package/dist/tools/manifest-assert.js.map +1 -0
- package/dist/tools/manifest.d.ts +178 -0
- package/dist/tools/manifest.d.ts.map +1 -0
- package/dist/tools/manifest.js +35 -0
- package/dist/tools/manifest.js.map +1 -0
- package/dist/tools/registry.d.ts +37 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +49 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +1021 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +77 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/__tests__/signal.test.d.ts +2 -0
- package/dist/types/__tests__/signal.test.d.ts.map +1 -0
- package/dist/types/__tests__/signal.test.js +111 -0
- package/dist/types/__tests__/signal.test.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/signal-batch.d.ts +56 -0
- package/dist/types/signal-batch.d.ts.map +1 -0
- package/dist/types/signal-batch.js +54 -0
- package/dist/types/signal-batch.js.map +1 -0
- package/dist/types/signal.d.ts +77 -0
- package/dist/types/signal.d.ts.map +1 -0
- package/dist/types/signal.js +42 -0
- package/dist/types/signal.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview UiContext — per-invocation presentation settings.
|
|
3
|
+
*
|
|
4
|
+
* A small kernel-level bag for values the render paths need but that aren't
|
|
5
|
+
* owned by any single tool: the selected banner size and the CLI version.
|
|
6
|
+
* Populated once by the CLI bootstrap (pre-action hook) and read by every
|
|
7
|
+
* render seam — the static `App`, fit's live view, and graph's live view —
|
|
8
|
+
* via `currentScope()?.ui`.
|
|
9
|
+
*
|
|
10
|
+
* `bannerSize` is a plain `string` here, NOT the `BannerSize` union: that
|
|
11
|
+
* union lives in `@opensip-cli/cli-ui` (a higher layer the kernel must not
|
|
12
|
+
* import). The render sites narrow it with `normalizeBannerSize` at the
|
|
13
|
+
* point of use, so an unknown / stale config value degrades to `lg`.
|
|
14
|
+
*/
|
|
15
|
+
/** Per-invocation presentation settings, read by the render paths. */
|
|
16
|
+
export interface UiContext {
|
|
17
|
+
/**
|
|
18
|
+
* Selected banner art: `lg` | `md` | `sm` | `mini` (product default
|
|
19
|
+
* `mini`, applied by the CLI bootstrap when no `cli.ui.banner` is set).
|
|
20
|
+
* Stored untyped; narrowed via cli-ui's `normalizeBannerSize` at render.
|
|
21
|
+
*/
|
|
22
|
+
readonly bannerSize: string;
|
|
23
|
+
/** CLI version (e.g. `1.0.0`), shown by the `mini` banner. */
|
|
24
|
+
readonly version: string;
|
|
25
|
+
/**
|
|
26
|
+
* Newer published version available on npm (e.g. `1.0.1`), or `undefined`
|
|
27
|
+
* when up-to-date / the check is skipped or hasn't completed. Resolved by
|
|
28
|
+
* the CLI bootstrap from the cached `update-notifier` result. The `mini`
|
|
29
|
+
* banner surfaces it inline as `(<new-version> available)`; other sizes rely on
|
|
30
|
+
* the separate stderr nag.
|
|
31
|
+
*/
|
|
32
|
+
readonly update?: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ui-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-context.d.ts","sourceRoot":"","sources":["../../src/lib/ui-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview UiContext — per-invocation presentation settings.
|
|
3
|
+
*
|
|
4
|
+
* A small kernel-level bag for values the render paths need but that aren't
|
|
5
|
+
* owned by any single tool: the selected banner size and the CLI version.
|
|
6
|
+
* Populated once by the CLI bootstrap (pre-action hook) and read by every
|
|
7
|
+
* render seam — the static `App`, fit's live view, and graph's live view —
|
|
8
|
+
* via `currentScope()?.ui`.
|
|
9
|
+
*
|
|
10
|
+
* `bannerSize` is a plain `string` here, NOT the `BannerSize` union: that
|
|
11
|
+
* union lives in `@opensip-cli/cli-ui` (a higher layer the kernel must not
|
|
12
|
+
* import). The render sites narrow it with `normalizeBannerSize` at the
|
|
13
|
+
* point of use, so an unknown / stale config value degrades to `lg`.
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ui-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-context.js","sourceRoot":"","sources":["../../src/lib/ui-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Verdict policy — the host-owned findings gate (ADR-0035).
|
|
3
|
+
*
|
|
4
|
+
* A run's pass/fail is one value, `envelope.verdict.passed`, computed from the
|
|
5
|
+
* run's error/warning counts against a tool-declared findings policy. The policy
|
|
6
|
+
* is two reserved config keys — `failOnErrors` / `failOnWarnings` — recognized in
|
|
7
|
+
* EVERY tool's config namespace, with a host fallback of `{1, 0}` (fail on any
|
|
8
|
+
* error, warnings informational) when a tool declares neither.
|
|
9
|
+
*
|
|
10
|
+
* Lives in `lib/` next to {@link ./severity-policy} (the error/warning split it
|
|
11
|
+
* pairs with), NOT under `tools/`: `resolveVerdictPolicy` reads
|
|
12
|
+
* `currentScope().toolConfig`, and `run-scope.ts` imports `tools/registry.js`, so
|
|
13
|
+
* a `tools/ → run-scope` edge would reintroduce a cycle (see `tools/types.ts`).
|
|
14
|
+
* `contracts` imports {@link VerdictPolicy} / {@link policyPasses} from here the
|
|
15
|
+
* same way it imports `SeverityPolicy`.
|
|
16
|
+
*/
|
|
17
|
+
/** The findings gate for a run: fail when counts cross either threshold. */
|
|
18
|
+
export interface VerdictPolicy {
|
|
19
|
+
/** Fail when `errors >= failOnErrors`; `0` disables the error gate. */
|
|
20
|
+
readonly failOnErrors: number;
|
|
21
|
+
/** Fail when `warnings >= failOnWarnings`; `0` disables the warning gate. */
|
|
22
|
+
readonly failOnWarnings: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Host fallback applied when a tool declares neither reserved key: fail on any
|
|
26
|
+
* error, warnings informational. This is fit's historical default generalized to
|
|
27
|
+
* every tool (graph/sim inherit it, reproducing their `errors > 0 ⇒ fail`).
|
|
28
|
+
*/
|
|
29
|
+
export declare const HOST_VERDICT_POLICY_FALLBACK: VerdictPolicy;
|
|
30
|
+
/**
|
|
31
|
+
* The findings predicate: `true` ⇔ the run passes its policy. Pure. Mirrors
|
|
32
|
+
* fit's pre-ADR-0035 threshold (`result-builders.ts`) exactly — a `> 0` threshold
|
|
33
|
+
* is active, `0` disables that rung. Execution faults are handled by the caller
|
|
34
|
+
* (the envelope's `runFaulted` / unit `error`), not here.
|
|
35
|
+
*/
|
|
36
|
+
export declare function policyPasses(counts: {
|
|
37
|
+
readonly errors: number;
|
|
38
|
+
readonly warnings: number;
|
|
39
|
+
}, policy: VerdictPolicy): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve a tool's findings policy from its config namespace. Reads the already-
|
|
42
|
+
* resolved `currentScope().toolConfig?.[toolNamespace]` (ADR-0023 applied the
|
|
43
|
+
* flag>env>file>defaults precedence upstream); this only extracts the two
|
|
44
|
+
* reserved keys and applies {@link HOST_VERDICT_POLICY_FALLBACK} per-key, so a
|
|
45
|
+
* tool may declare one key and inherit the other.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveVerdictPolicy(toolNamespace: string): VerdictPolicy;
|
|
48
|
+
/**
|
|
49
|
+
* Host default for the third reserved gate key, `failOnDegraded` (ADR-0036): a
|
|
50
|
+
* `--gate-compare` that finds net-new findings (the diff is `degraded`) fails the
|
|
51
|
+
* run. `true` by default.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_FAIL_ON_DEGRADED = true;
|
|
54
|
+
/**
|
|
55
|
+
* Resolve the net-new ratchet's hard-fail switch, `failOnDegraded` (ADR-0036) —
|
|
56
|
+
* the THIRD reserved gate key beside `failOnErrors`/`failOnWarnings`, read off the
|
|
57
|
+
* same already-resolved `currentScope().toolConfig?.[toolNamespace]` (ADR-0023
|
|
58
|
+
* flag>env>file precedence). Boolean, default {@link DEFAULT_FAIL_ON_DEGRADED}.
|
|
59
|
+
*
|
|
60
|
+
* Deliberately NOT part of {@link VerdictPolicy} or {@link policyPasses}: the
|
|
61
|
+
* findings verdict stays a pure function of findings, while the gate-compare
|
|
62
|
+
* ratchet is the documented ADR-0035 Phase-5 RETAIN carve-out — an orthogonal,
|
|
63
|
+
* gate-dispatch-only mechanism. `false` ⇒ ratchet-as-report (compare runs, prints
|
|
64
|
+
* the diff, exits 0), mirroring ADR-0020's `failOnErrors:0 = ratchet-only`.
|
|
65
|
+
*
|
|
66
|
+
* The HOST derives the exit: dispatch passes `degraded && failOnDegraded` as the
|
|
67
|
+
* `deliverSignals` runFailed override (→ RUNTIME_ERROR). No tool calls
|
|
68
|
+
* `setExitCode` for the gate path (ADR-0035 invariant).
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveFailOnDegraded(toolNamespace: string): boolean;
|
|
71
|
+
//# sourceMappingURL=verdict-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict-policy.d.ts","sourceRoot":"","sources":["../../src/lib/verdict-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4EAA4E;AAC5E,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,aAG1C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC9D,MAAM,EAAE,aAAa,GACpB,OAAO,CAIT;AAOD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAMzE;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAGpE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Verdict policy — the host-owned findings gate (ADR-0035).
|
|
3
|
+
*
|
|
4
|
+
* A run's pass/fail is one value, `envelope.verdict.passed`, computed from the
|
|
5
|
+
* run's error/warning counts against a tool-declared findings policy. The policy
|
|
6
|
+
* is two reserved config keys — `failOnErrors` / `failOnWarnings` — recognized in
|
|
7
|
+
* EVERY tool's config namespace, with a host fallback of `{1, 0}` (fail on any
|
|
8
|
+
* error, warnings informational) when a tool declares neither.
|
|
9
|
+
*
|
|
10
|
+
* Lives in `lib/` next to {@link ./severity-policy} (the error/warning split it
|
|
11
|
+
* pairs with), NOT under `tools/`: `resolveVerdictPolicy` reads
|
|
12
|
+
* `currentScope().toolConfig`, and `run-scope.ts` imports `tools/registry.js`, so
|
|
13
|
+
* a `tools/ → run-scope` edge would reintroduce a cycle (see `tools/types.ts`).
|
|
14
|
+
* `contracts` imports {@link VerdictPolicy} / {@link policyPasses} from here the
|
|
15
|
+
* same way it imports `SeverityPolicy`.
|
|
16
|
+
*/
|
|
17
|
+
import { currentScope } from './run-scope.js';
|
|
18
|
+
/**
|
|
19
|
+
* Host fallback applied when a tool declares neither reserved key: fail on any
|
|
20
|
+
* error, warnings informational. This is fit's historical default generalized to
|
|
21
|
+
* every tool (graph/sim inherit it, reproducing their `errors > 0 ⇒ fail`).
|
|
22
|
+
*/
|
|
23
|
+
export const HOST_VERDICT_POLICY_FALLBACK = {
|
|
24
|
+
failOnErrors: 1,
|
|
25
|
+
failOnWarnings: 0,
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The findings predicate: `true` ⇔ the run passes its policy. Pure. Mirrors
|
|
29
|
+
* fit's pre-ADR-0035 threshold (`result-builders.ts`) exactly — a `> 0` threshold
|
|
30
|
+
* is active, `0` disables that rung. Execution faults are handled by the caller
|
|
31
|
+
* (the envelope's `runFaulted` / unit `error`), not here.
|
|
32
|
+
*/
|
|
33
|
+
export function policyPasses(counts, policy) {
|
|
34
|
+
const failsOnErrors = policy.failOnErrors > 0 && counts.errors >= policy.failOnErrors;
|
|
35
|
+
const failsOnWarnings = policy.failOnWarnings > 0 && counts.warnings >= policy.failOnWarnings;
|
|
36
|
+
return !failsOnErrors && !failsOnWarnings;
|
|
37
|
+
}
|
|
38
|
+
/** A resolved config value is a usable threshold only if it is a non-negative int. */
|
|
39
|
+
function asThreshold(value) {
|
|
40
|
+
return typeof value === 'number' && Number.isInteger(value) && value >= 0 ? value : undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve a tool's findings policy from its config namespace. Reads the already-
|
|
44
|
+
* resolved `currentScope().toolConfig?.[toolNamespace]` (ADR-0023 applied the
|
|
45
|
+
* flag>env>file>defaults precedence upstream); this only extracts the two
|
|
46
|
+
* reserved keys and applies {@link HOST_VERDICT_POLICY_FALLBACK} per-key, so a
|
|
47
|
+
* tool may declare one key and inherit the other.
|
|
48
|
+
*/
|
|
49
|
+
export function resolveVerdictPolicy(toolNamespace) {
|
|
50
|
+
const ns = currentScope()?.toolConfig?.[toolNamespace];
|
|
51
|
+
return {
|
|
52
|
+
failOnErrors: asThreshold(ns?.failOnErrors) ?? HOST_VERDICT_POLICY_FALLBACK.failOnErrors,
|
|
53
|
+
failOnWarnings: asThreshold(ns?.failOnWarnings) ?? HOST_VERDICT_POLICY_FALLBACK.failOnWarnings,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Host default for the third reserved gate key, `failOnDegraded` (ADR-0036): a
|
|
58
|
+
* `--gate-compare` that finds net-new findings (the diff is `degraded`) fails the
|
|
59
|
+
* run. `true` by default.
|
|
60
|
+
*/
|
|
61
|
+
export const DEFAULT_FAIL_ON_DEGRADED = true;
|
|
62
|
+
/**
|
|
63
|
+
* Resolve the net-new ratchet's hard-fail switch, `failOnDegraded` (ADR-0036) —
|
|
64
|
+
* the THIRD reserved gate key beside `failOnErrors`/`failOnWarnings`, read off the
|
|
65
|
+
* same already-resolved `currentScope().toolConfig?.[toolNamespace]` (ADR-0023
|
|
66
|
+
* flag>env>file precedence). Boolean, default {@link DEFAULT_FAIL_ON_DEGRADED}.
|
|
67
|
+
*
|
|
68
|
+
* Deliberately NOT part of {@link VerdictPolicy} or {@link policyPasses}: the
|
|
69
|
+
* findings verdict stays a pure function of findings, while the gate-compare
|
|
70
|
+
* ratchet is the documented ADR-0035 Phase-5 RETAIN carve-out — an orthogonal,
|
|
71
|
+
* gate-dispatch-only mechanism. `false` ⇒ ratchet-as-report (compare runs, prints
|
|
72
|
+
* the diff, exits 0), mirroring ADR-0020's `failOnErrors:0 = ratchet-only`.
|
|
73
|
+
*
|
|
74
|
+
* The HOST derives the exit: dispatch passes `degraded && failOnDegraded` as the
|
|
75
|
+
* `deliverSignals` runFailed override (→ RUNTIME_ERROR). No tool calls
|
|
76
|
+
* `setExitCode` for the gate path (ADR-0035 invariant).
|
|
77
|
+
*/
|
|
78
|
+
export function resolveFailOnDegraded(toolNamespace) {
|
|
79
|
+
const value = currentScope()?.toolConfig?.[toolNamespace]?.failOnDegraded;
|
|
80
|
+
return typeof value === 'boolean' ? value : DEFAULT_FAIL_ON_DEGRADED;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=verdict-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict-policy.js","sourceRoot":"","sources":["../../src/lib/verdict-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAU9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAkB;IACzD,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,MAA8D,EAC9D,MAAqB;IAErB,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC;IACtF,MAAM,eAAe,GAAG,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,cAAc,CAAC;IAC9F,OAAO,CAAC,aAAa,IAAI,CAAC,eAAe,CAAC;AAC5C,CAAC;AAED,sFAAsF;AACtF,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,aAAqB;IACxD,MAAM,EAAE,GAAG,YAAY,EAAE,EAAE,UAAU,EAAE,CAAC,aAAa,CAAC,CAAC;IACvD,OAAO;QACL,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,IAAI,4BAA4B,CAAC,YAAY;QACxF,cAAc,EAAE,WAAW,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,4BAA4B,CAAC,cAAc;KAC/F,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,qBAAqB,CAAC,aAAqB;IACzD,MAAM,KAAK,GAAG,YAAY,EAAE,EAAE,UAAU,EAAE,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC;IAC1E,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Permissive YAML reader used by plugin-discovery sites
|
|
3
|
+
* that need to extract a single field from `opensip-cli.config.yml`
|
|
4
|
+
* without dragging in a Zod schema or surfacing structured errors.
|
|
5
|
+
*
|
|
6
|
+
* The kernel's plugin discovery (and fitness's check-package discovery)
|
|
7
|
+
* only need to read `plugins.<domain>` / `plugins.checkPackages`
|
|
8
|
+
* out of the project config. They previously reached for js-yaml via a
|
|
9
|
+
* `createRequire(import.meta.url)` shim — duplicated, and unnecessary
|
|
10
|
+
* now that `js-yaml` is a direct dep of every package that calls this.
|
|
11
|
+
*
|
|
12
|
+
* Behavior:
|
|
13
|
+
* - Missing file → `undefined`
|
|
14
|
+
* - I/O error → `undefined`
|
|
15
|
+
* - Malformed YAML → `undefined`
|
|
16
|
+
* - Valid YAML → parsed value (typed `unknown`; callers narrow)
|
|
17
|
+
*
|
|
18
|
+
* Strict YAML loading (with structured errors and size caps) is the
|
|
19
|
+
* targets loader's job — it lives in fitness because the schema lives
|
|
20
|
+
* there. Don't add error-throwing modes here; that's a different tool's
|
|
21
|
+
* surface.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Read a YAML file and return the parsed document. Returns `undefined`
|
|
25
|
+
* on any failure (missing, unreadable, or malformed). Callers that
|
|
26
|
+
* need structured error reporting should use a dedicated loader
|
|
27
|
+
* instead — this helper exists for the discovery seam where "no
|
|
28
|
+
* config" and "bad config" are both treated the same: don't load
|
|
29
|
+
* plugins.
|
|
30
|
+
*
|
|
31
|
+
* @remarks Advanced / discouraged for general use. This is the
|
|
32
|
+
* "permissive" reader for plugin discovery; tools that read their
|
|
33
|
+
* own config should keep a dedicated loader (see fitness's
|
|
34
|
+
* targets/loader.ts) so malformed YAML surfaces a structured error
|
|
35
|
+
* instead of silently no-op'ing.
|
|
36
|
+
*
|
|
37
|
+
* On parse failure we still emit a `core.yaml.parse_failed` debug
|
|
38
|
+
* log so a `--debug` run reveals the cause — "permissive" should
|
|
39
|
+
* not mean "silent" at the kernel layer.
|
|
40
|
+
*/
|
|
41
|
+
export declare function readYamlFile(filePath: string): unknown;
|
|
42
|
+
/** Knobs for {@link readYamlFileOrThrow}: size guard and loader attribution. */
|
|
43
|
+
export interface ReadYamlFileOrThrowOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Maximum file size in bytes before this loader refuses to read.
|
|
46
|
+
* Defaults to 10 MB — a project config file that grows past this is
|
|
47
|
+
* almost certainly checked-in test data or a bug.
|
|
48
|
+
*/
|
|
49
|
+
readonly maxBytes?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Loader name surfaced in `ValidationError.options.loader` so
|
|
52
|
+
* downstream error rendering can attribute failures to the right
|
|
53
|
+
* subsystem (e.g. `'signalers'`, `'cli-defaults'`).
|
|
54
|
+
*/
|
|
55
|
+
readonly loader?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Strict counterpart to `readYamlFile`. Throws structured errors on
|
|
59
|
+
* any failure mode instead of returning `undefined`:
|
|
60
|
+
*
|
|
61
|
+
* - `ValidationError` — missing file, unreadable file, malformed YAML.
|
|
62
|
+
* The `loader` and `operation` fields are populated for downstream
|
|
63
|
+
* attribution.
|
|
64
|
+
* - `SystemError` — file exceeds `maxBytes` (default 10 MB).
|
|
65
|
+
*
|
|
66
|
+
* Consumers that want hand-rolled stat/read/parse with the same
|
|
67
|
+
* structured errors should call this instead — it consolidates a
|
|
68
|
+
* pattern previously duplicated across loaders (audit-round-2 Finding F).
|
|
69
|
+
*
|
|
70
|
+
* @throws {ValidationError} When the file is missing, unreadable, or contains malformed YAML.
|
|
71
|
+
* @throws {SystemError} When the file exceeds `maxBytes`.
|
|
72
|
+
*/
|
|
73
|
+
export declare function readYamlFileOrThrow(filePath: string, options?: ReadYamlFileOrThrowOptions): unknown;
|
|
74
|
+
//# sourceMappingURL=yaml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../src/lib/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AASH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CActD;AAED,gFAAgF;AAChF,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAsCT"}
|
package/dist/lib/yaml.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Permissive YAML reader used by plugin-discovery sites
|
|
3
|
+
* that need to extract a single field from `opensip-cli.config.yml`
|
|
4
|
+
* without dragging in a Zod schema or surfacing structured errors.
|
|
5
|
+
*
|
|
6
|
+
* The kernel's plugin discovery (and fitness's check-package discovery)
|
|
7
|
+
* only need to read `plugins.<domain>` / `plugins.checkPackages`
|
|
8
|
+
* out of the project config. They previously reached for js-yaml via a
|
|
9
|
+
* `createRequire(import.meta.url)` shim — duplicated, and unnecessary
|
|
10
|
+
* now that `js-yaml` is a direct dep of every package that calls this.
|
|
11
|
+
*
|
|
12
|
+
* Behavior:
|
|
13
|
+
* - Missing file → `undefined`
|
|
14
|
+
* - I/O error → `undefined`
|
|
15
|
+
* - Malformed YAML → `undefined`
|
|
16
|
+
* - Valid YAML → parsed value (typed `unknown`; callers narrow)
|
|
17
|
+
*
|
|
18
|
+
* Strict YAML loading (with structured errors and size caps) is the
|
|
19
|
+
* targets loader's job — it lives in fitness because the schema lives
|
|
20
|
+
* there. Don't add error-throwing modes here; that's a different tool's
|
|
21
|
+
* surface.
|
|
22
|
+
*/
|
|
23
|
+
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
24
|
+
import yaml from 'js-yaml';
|
|
25
|
+
import { SystemError, ValidationError } from './errors.js';
|
|
26
|
+
import { logger } from './logger.js';
|
|
27
|
+
/**
|
|
28
|
+
* Read a YAML file and return the parsed document. Returns `undefined`
|
|
29
|
+
* on any failure (missing, unreadable, or malformed). Callers that
|
|
30
|
+
* need structured error reporting should use a dedicated loader
|
|
31
|
+
* instead — this helper exists for the discovery seam where "no
|
|
32
|
+
* config" and "bad config" are both treated the same: don't load
|
|
33
|
+
* plugins.
|
|
34
|
+
*
|
|
35
|
+
* @remarks Advanced / discouraged for general use. This is the
|
|
36
|
+
* "permissive" reader for plugin discovery; tools that read their
|
|
37
|
+
* own config should keep a dedicated loader (see fitness's
|
|
38
|
+
* targets/loader.ts) so malformed YAML surfaces a structured error
|
|
39
|
+
* instead of silently no-op'ing.
|
|
40
|
+
*
|
|
41
|
+
* On parse failure we still emit a `core.yaml.parse_failed` debug
|
|
42
|
+
* log so a `--debug` run reveals the cause — "permissive" should
|
|
43
|
+
* not mean "silent" at the kernel layer.
|
|
44
|
+
*/
|
|
45
|
+
export function readYamlFile(filePath) {
|
|
46
|
+
if (!existsSync(filePath))
|
|
47
|
+
return undefined;
|
|
48
|
+
try {
|
|
49
|
+
const raw = readFileSync(filePath, 'utf8');
|
|
50
|
+
return yaml.load(raw);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
logger.debug({
|
|
54
|
+
evt: 'core.yaml.parse_failed',
|
|
55
|
+
module: 'core:lib',
|
|
56
|
+
filePath,
|
|
57
|
+
error: error instanceof Error ? error.message : String(error),
|
|
58
|
+
});
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Strict counterpart to `readYamlFile`. Throws structured errors on
|
|
64
|
+
* any failure mode instead of returning `undefined`:
|
|
65
|
+
*
|
|
66
|
+
* - `ValidationError` — missing file, unreadable file, malformed YAML.
|
|
67
|
+
* The `loader` and `operation` fields are populated for downstream
|
|
68
|
+
* attribution.
|
|
69
|
+
* - `SystemError` — file exceeds `maxBytes` (default 10 MB).
|
|
70
|
+
*
|
|
71
|
+
* Consumers that want hand-rolled stat/read/parse with the same
|
|
72
|
+
* structured errors should call this instead — it consolidates a
|
|
73
|
+
* pattern previously duplicated across loaders (audit-round-2 Finding F).
|
|
74
|
+
*
|
|
75
|
+
* @throws {ValidationError} When the file is missing, unreadable, or contains malformed YAML.
|
|
76
|
+
* @throws {SystemError} When the file exceeds `maxBytes`.
|
|
77
|
+
*/
|
|
78
|
+
export function readYamlFileOrThrow(filePath, options = {}) {
|
|
79
|
+
const loader = options.loader ?? 'yaml';
|
|
80
|
+
const maxBytes = options.maxBytes ?? 10 * 1024 * 1024;
|
|
81
|
+
let raw;
|
|
82
|
+
try {
|
|
83
|
+
const stats = statSync(filePath);
|
|
84
|
+
if (stats.size > maxBytes) {
|
|
85
|
+
throw new SystemError(`File too large (${stats.size} bytes, max ${maxBytes}): ${filePath}`, {
|
|
86
|
+
code: 'SYSTEM.FILE.TOO_LARGE',
|
|
87
|
+
operation: 'read',
|
|
88
|
+
loader,
|
|
89
|
+
filePath,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
raw = readFileSync(filePath, 'utf8');
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
if (error instanceof SystemError || error instanceof ValidationError)
|
|
96
|
+
throw error;
|
|
97
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
98
|
+
throw new ValidationError(`Failed to read ${filePath}: ${message}`, {
|
|
99
|
+
operation: 'read',
|
|
100
|
+
loader,
|
|
101
|
+
filePath,
|
|
102
|
+
cause: error instanceof Error ? error : undefined,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
return yaml.load(raw) ?? {};
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
110
|
+
throw new ValidationError(`${filePath} contains invalid YAML: ${message}`, {
|
|
111
|
+
operation: 'parse',
|
|
112
|
+
loader,
|
|
113
|
+
filePath,
|
|
114
|
+
cause: error instanceof Error ? error : undefined,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=yaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.js","sourceRoot":"","sources":["../../src/lib/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MA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ity &
|
|
3
|
+
* compatibility — Phase 5, task 5.2).
|
|
4
|
+
*
|
|
5
|
+
* The miniature of the north-star §8 minimum proof slice: a **bundled** tool's
|
|
6
|
+
* static manifest, loaded + admitted through the **exact same** gate path an
|
|
7
|
+
* external tool would take (`loadToolManifest` → `admitTool`), is admitted
|
|
8
|
+
* identically — and the gate actually fires on incompatibility.
|
|
9
|
+
*
|
|
10
|
+
* Why the equality is asserted against a KNOWN command list rather than by
|
|
11
|
+
* importing the tool's runtime `Tool.commands`: core is the kernel and MUST
|
|
12
|
+
* NOT import `@opensip-cli/fitness` / `graph` / `simulation` (the layering
|
|
13
|
+
* rule dependency-cruiser enforces). The manifest⇔tool equality was already
|
|
14
|
+
* asserted from the tool side in Phase 1; here we assert the manifest the
|
|
15
|
+
* host reads matches the contract-frozen command set the tools register.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=as-if-external.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"as-if-external.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/as-if-external.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview As-if-external acceptance test (release 2.8.0, identity &
|
|
3
|
+
* compatibility — Phase 5, task 5.2).
|
|
4
|
+
*
|
|
5
|
+
* The miniature of the north-star §8 minimum proof slice: a **bundled** tool's
|
|
6
|
+
* static manifest, loaded + admitted through the **exact same** gate path an
|
|
7
|
+
* external tool would take (`loadToolManifest` → `admitTool`), is admitted
|
|
8
|
+
* identically — and the gate actually fires on incompatibility.
|
|
9
|
+
*
|
|
10
|
+
* Why the equality is asserted against a KNOWN command list rather than by
|
|
11
|
+
* importing the tool's runtime `Tool.commands`: core is the kernel and MUST
|
|
12
|
+
* NOT import `@opensip-cli/fitness` / `graph` / `simulation` (the layering
|
|
13
|
+
* rule dependency-cruiser enforces). The manifest⇔tool equality was already
|
|
14
|
+
* asserted from the tool side in Phase 1; here we assert the manifest the
|
|
15
|
+
* host reads matches the contract-frozen command set the tools register.
|
|
16
|
+
*/
|
|
17
|
+
import { dirname, join } from 'node:path';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import { describe, expect, it } from 'vitest';
|
|
20
|
+
import { PLUGIN_API_VERSION } from '../../tools/manifest.js';
|
|
21
|
+
import { admitTool, loadToolManifest } from '../manifest-loader.js';
|
|
22
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
/** Repo root, five levels up from this test's directory. */
|
|
24
|
+
const REPO_ROOT = join(HERE, '..', '..', '..', '..', '..');
|
|
25
|
+
/**
|
|
26
|
+
* The three bundled tools' engine package dirs + their CONTRACT-FROZEN command
|
|
27
|
+
* name sets. These are the exact lists the runtime `Tool.commands` arrays
|
|
28
|
+
* register (Phase 1 asserts manifest⇔Tool from the tool side); core asserts
|
|
29
|
+
* the host-read manifest matches them without importing the tool runtime.
|
|
30
|
+
*/
|
|
31
|
+
const BUNDLED_TOOLS = [
|
|
32
|
+
{
|
|
33
|
+
id: 'fitness',
|
|
34
|
+
dir: join(REPO_ROOT, 'packages', 'fitness', 'engine'),
|
|
35
|
+
commands: ['fit', 'fit-list', 'fit-recipes', 'fit-baseline-export', 'fit-run-worker'],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'simulation',
|
|
39
|
+
dir: join(REPO_ROOT, 'packages', 'simulation', 'engine'),
|
|
40
|
+
commands: ['sim', 'sim-run-worker'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'graph',
|
|
44
|
+
dir: join(REPO_ROOT, 'packages', 'graph', 'engine'),
|
|
45
|
+
commands: [
|
|
46
|
+
'graph',
|
|
47
|
+
'graph-lookup',
|
|
48
|
+
'graph-symbol-index',
|
|
49
|
+
'graph-baseline-export',
|
|
50
|
+
'graph-shard-worker',
|
|
51
|
+
'graph-equivalence-check',
|
|
52
|
+
'graph-run-worker',
|
|
53
|
+
'catalog-export',
|
|
54
|
+
'sarif-export',
|
|
55
|
+
'graph-recipes',
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
const FIXTURES = join(HERE, '__fixtures__');
|
|
60
|
+
const FUTURE_EPOCH_DIR = join(FIXTURES, 'future-epoch-tool');
|
|
61
|
+
const NO_APIVERSION_DIR = join(FIXTURES, 'no-apiversion-tool');
|
|
62
|
+
describe('as-if-external gate — bundled tools admitted through the external path', () => {
|
|
63
|
+
for (const tool of BUNDLED_TOOLS) {
|
|
64
|
+
describe(`${tool.id} (bundled)`, () => {
|
|
65
|
+
it('(a) loads its static manifest from package.json and admits it', () => {
|
|
66
|
+
const manifest = loadToolManifest('bundled', tool.dir);
|
|
67
|
+
expect(manifest, `expected a readable manifest for ${tool.id}`).toBeDefined();
|
|
68
|
+
if (manifest === undefined)
|
|
69
|
+
return;
|
|
70
|
+
expect(manifest.kind).toBe('tool');
|
|
71
|
+
expect(manifest.id).toBe(tool.id);
|
|
72
|
+
// Bundled tools declare the current epoch.
|
|
73
|
+
expect(manifest.apiVersion).toBe(PLUGIN_API_VERSION);
|
|
74
|
+
const result = admitTool({
|
|
75
|
+
manifest,
|
|
76
|
+
source: 'bundled',
|
|
77
|
+
dir: tool.dir,
|
|
78
|
+
packageName: manifest.name,
|
|
79
|
+
explicitlyRequested: false,
|
|
80
|
+
});
|
|
81
|
+
expect(result.decision).toBe('admit');
|
|
82
|
+
expect(result.verdict.kind).toBe('compatible');
|
|
83
|
+
expect(result.diagnostic).toBeUndefined();
|
|
84
|
+
// Provenance identity matches the tool the host read.
|
|
85
|
+
expect(result.provenance.source).toBe('bundled');
|
|
86
|
+
expect(result.provenance.id).toBe(tool.id);
|
|
87
|
+
expect(result.provenance.resolvedPath).toBe(tool.dir);
|
|
88
|
+
expect(result.provenance.manifestHash).toMatch(/^[0-9a-f]{64}$/);
|
|
89
|
+
});
|
|
90
|
+
it('(b) manifest command-name SET equals the contract-frozen Tool.commands set', () => {
|
|
91
|
+
const manifest = loadToolManifest('bundled', tool.dir);
|
|
92
|
+
expect(manifest).toBeDefined();
|
|
93
|
+
if (manifest === undefined)
|
|
94
|
+
return;
|
|
95
|
+
const manifestNames = new Set(manifest.commands.map((c) => c.name));
|
|
96
|
+
expect(manifestNames).toEqual(new Set(tool.commands));
|
|
97
|
+
// Every command entry carries a non-empty description (the manifest
|
|
98
|
+
// contract the guardrail enforces).
|
|
99
|
+
for (const cmd of manifest.commands) {
|
|
100
|
+
expect(typeof cmd.description).toBe('string');
|
|
101
|
+
expect(cmd.name.length).toBeGreaterThan(0);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
describe('as-if-external gate — the gate fires on incompatibility', () => {
|
|
108
|
+
it('(c) skips an out-of-range tool that was NOT explicitly requested', () => {
|
|
109
|
+
const manifest = loadToolManifest('installed', FUTURE_EPOCH_DIR);
|
|
110
|
+
expect(manifest?.apiVersion).toBe(999);
|
|
111
|
+
if (manifest === undefined)
|
|
112
|
+
return;
|
|
113
|
+
const result = admitTool({
|
|
114
|
+
manifest,
|
|
115
|
+
source: 'installed',
|
|
116
|
+
dir: FUTURE_EPOCH_DIR,
|
|
117
|
+
explicitlyRequested: false,
|
|
118
|
+
});
|
|
119
|
+
expect(result.decision).toBe('skip');
|
|
120
|
+
expect(result.verdict.kind).toBe('incompatible');
|
|
121
|
+
expect(result.diagnostic).toBeTruthy();
|
|
122
|
+
expect(result.diagnostic).toContain('999');
|
|
123
|
+
// Provenance is still recorded for a skipped tool.
|
|
124
|
+
expect(result.provenance.id).toBe('future');
|
|
125
|
+
});
|
|
126
|
+
it('(c) fails closed for an out-of-range tool that WAS explicitly requested', () => {
|
|
127
|
+
const manifest = loadToolManifest('installed', FUTURE_EPOCH_DIR);
|
|
128
|
+
expect(manifest).toBeDefined();
|
|
129
|
+
if (manifest === undefined)
|
|
130
|
+
return;
|
|
131
|
+
const result = admitTool({
|
|
132
|
+
manifest,
|
|
133
|
+
source: 'installed',
|
|
134
|
+
dir: FUTURE_EPOCH_DIR,
|
|
135
|
+
explicitlyRequested: true,
|
|
136
|
+
});
|
|
137
|
+
expect(result.decision).toBe('fail-closed');
|
|
138
|
+
expect(result.verdict.kind).toBe('incompatible');
|
|
139
|
+
expect(result.diagnostic).toBeTruthy();
|
|
140
|
+
});
|
|
141
|
+
it('(d) fail-closes an explicitly-requested tool with NO apiVersion (3.0.0 — grace window ended)', () => {
|
|
142
|
+
const manifest = loadToolManifest('installed', NO_APIVERSION_DIR);
|
|
143
|
+
expect(manifest).toBeDefined();
|
|
144
|
+
if (manifest === undefined)
|
|
145
|
+
return;
|
|
146
|
+
// The manifest omits apiVersion entirely.
|
|
147
|
+
expect(manifest.apiVersion).toBeUndefined();
|
|
148
|
+
const result = admitTool({
|
|
149
|
+
manifest,
|
|
150
|
+
source: 'installed',
|
|
151
|
+
dir: NO_APIVERSION_DIR,
|
|
152
|
+
explicitlyRequested: true, // 3.0.0: a missing apiVersion + explicit request → fail-closed.
|
|
153
|
+
});
|
|
154
|
+
expect(result.decision).toBe('fail-closed');
|
|
155
|
+
expect(result.verdict.kind).toBe('incompatible');
|
|
156
|
+
expect(result.diagnostic).toBeDefined();
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=as-if-external.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"as-if-external.test.js","sourceRoot":"","sources":["../../../src/plugins/__tests__/as-if-external.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE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AAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,UAAU,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8FAA8F,EAAE,GAAG,EAAE;QACtG,MAAM,QAAQ,GAAG,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;QAClE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QAC/B,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QACnC,0CAA0C;QAC1C,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,aAAa,EAAE,CAAC;QAE5C,MAAM,MAAM,GAAG,SAAS,CAAC;YACvB,QAAQ;YACR,MAAM,EAAE,WAAW;YACnB,GAAG,EAAE,iBAAiB;YACtB,mBAAmB,EAAE,IAAI,EAAE,gEAAgE;SAC5F,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authored-Tool sidecar discovery (Phase 1): a source-agnostic walk over a
|
|
3
|
+
* single authored `tools/` root that returns each `<root>/<name>/` dir carrying
|
|
4
|
+
* an `opensip-tool.manifest.json` sidecar. Pure filesystem reads — no module
|
|
5
|
+
* code is imported (the walk keys on the sidecar FILE's presence).
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=authored-tool-discovery.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authored-tool-discovery.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/authored-tool-discovery.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|