@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,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* runWithTimeout — the per-unit timeout/abort/retry wrapper of the execution
|
|
3
|
+
* substrate (north-star §5.8, launch).
|
|
4
|
+
*
|
|
5
|
+
* One unit's lifecycle: install an `AbortController` + `setTimeout`, run the
|
|
6
|
+
* domain function under that signal (optionally with retry), and classify the
|
|
7
|
+
* outcome as `ok` / `timeout` / `error`. The single-source abort invariant is
|
|
8
|
+
* preserved from fitness's `runOneCheck`: the controller is aborted ONLY by the
|
|
9
|
+
* timeout, so a post-run `signal.aborted` IS a timeout.
|
|
10
|
+
*
|
|
11
|
+
* This is the shared primitive that makes "a declared `timeout` actually aborts"
|
|
12
|
+
* true in every domain — the §4.3 fix for simulation, whose `runSingle` declared
|
|
13
|
+
* `execution.timeout` but never installed one.
|
|
14
|
+
*/
|
|
15
|
+
import { runWithRetry } from './retry.js';
|
|
16
|
+
/**
|
|
17
|
+
* Run one unit under a timeout, returning a classified outcome (never throws for
|
|
18
|
+
* a domain error — it is returned as `status:'error'`). Mirrors the proven
|
|
19
|
+
* timeout-detection of fitness's `runOneCheck` (clear the timer, then a
|
|
20
|
+
* `signal.aborted` check is canonical-timeout because the controller has a single
|
|
21
|
+
* abort source).
|
|
22
|
+
*/
|
|
23
|
+
export async function runWithTimeout(opts) {
|
|
24
|
+
const controller = new AbortController();
|
|
25
|
+
const startTime = Date.now();
|
|
26
|
+
const timeoutId = setTimeout(() => controller.abort(), opts.timeoutMs);
|
|
27
|
+
const finish = () => {
|
|
28
|
+
clearTimeout(timeoutId);
|
|
29
|
+
return Date.now() - startTime;
|
|
30
|
+
};
|
|
31
|
+
// Execute the domain work (retry or direct) and always classify to an outcome.
|
|
32
|
+
// This promise may never settle if the callee ignores the abort signal.
|
|
33
|
+
const workPromise = (async () => {
|
|
34
|
+
try {
|
|
35
|
+
if (opts.retry) {
|
|
36
|
+
const retry = await runWithRetry(() => opts.run(controller.signal), opts.retry);
|
|
37
|
+
const durationMs = finish();
|
|
38
|
+
if (controller.signal.aborted) {
|
|
39
|
+
return { status: 'timeout', durationMs, timeoutMs: opts.timeoutMs };
|
|
40
|
+
}
|
|
41
|
+
if (retry.result === undefined) {
|
|
42
|
+
return { status: 'error', error: retry.lastError, durationMs };
|
|
43
|
+
}
|
|
44
|
+
return { status: 'ok', result: retry.result, durationMs };
|
|
45
|
+
}
|
|
46
|
+
const result = await opts.run(controller.signal);
|
|
47
|
+
const durationMs = finish();
|
|
48
|
+
// A run that resolved AFTER the timeout fired is reported as a timeout
|
|
49
|
+
// (single-source abort invariant), matching fitness's post-run check.
|
|
50
|
+
if (controller.signal.aborted) {
|
|
51
|
+
return { status: 'timeout', durationMs, timeoutMs: opts.timeoutMs };
|
|
52
|
+
}
|
|
53
|
+
return { status: 'ok', result, durationMs };
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
const durationMs = finish();
|
|
57
|
+
if (controller.signal.aborted) {
|
|
58
|
+
return { status: 'timeout', durationMs, timeoutMs: opts.timeoutMs };
|
|
59
|
+
}
|
|
60
|
+
return { status: 'error', error, durationMs };
|
|
61
|
+
}
|
|
62
|
+
})();
|
|
63
|
+
// Hard timeout: this settles the *function* with a timeout outcome even if
|
|
64
|
+
// the domain work never settles. We still abort the controller so cooperative
|
|
65
|
+
// callees can stop. Report the exact budget as duration for the timeout case
|
|
66
|
+
// (avoids sampling skew from the setTimeout fire time).
|
|
67
|
+
const hardTimeout = new Promise((resolve) => {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
controller.abort();
|
|
70
|
+
resolve({
|
|
71
|
+
status: 'timeout',
|
|
72
|
+
durationMs: opts.timeoutMs,
|
|
73
|
+
timeoutMs: opts.timeoutMs,
|
|
74
|
+
});
|
|
75
|
+
}, opts.timeoutMs);
|
|
76
|
+
});
|
|
77
|
+
// Race so a non-settling domain cannot hang the scheduler/recipe.
|
|
78
|
+
const outcome = await Promise.race([workPromise, hardTimeout]);
|
|
79
|
+
// If the hard timeout won, the domain promise may still settle (or reject) later.
|
|
80
|
+
// Attach a no-op handler so a late rejection does not become an unhandled promise rejection.
|
|
81
|
+
workPromise.catch(() => {
|
|
82
|
+
/* late settlement after timeout is expected and ignored; the abort signal was delivered */
|
|
83
|
+
});
|
|
84
|
+
return outcome;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=run-with-timeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-with-timeout.js","sourceRoot":"","sources":["../../../src/lib/execution/run-with-timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAA6B,MAAM,YAAY,CAAC;AAiBrE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAA8B;IAE9B,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,GAAW,EAAE;QAC1B,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAChC,CAAC,CAAC;IAEF,+EAA+E;IAC/E,wEAAwE;IACxE,MAAM,WAAW,GAAG,CAAC,KAAK,IAAgC,EAAE;QAC1D,IAAI,CAAC;YACH,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;gBAChF,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;gBAC5B,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBAC9B,OAAO,EAAE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OAAO,EAAE,EAAE;QAC7D,UAAU,CAAC,GAAG,EAAE;YACd,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,CAAC;gBACN,MAAM,EAAE,SAAS;gBACjB,UAAU,EAAE,IAAI,CAAC,SAAS;gBAC1B,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,kEAAkE;IAClE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAE/D,kFAAkF;IAClF,6FAA6F;IAC7F,WAAW,CAAC,KAAK,CAAC,GAAG,EAAE;QACrB,2FAA2F;IAC7F,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scheduleUnits — the bounded scheduler of the execution substrate (north-star
|
|
3
|
+
* §5.8, launch).
|
|
4
|
+
*
|
|
5
|
+
* Owns the scheduling SHAPE — a `parallel` sliding window bounded by `maxParallel`,
|
|
6
|
+
* or a `sequential` one-at-a-time loop — plus the stop policy and an external
|
|
7
|
+
* abort check. The per-unit lifecycle (timeout/retry/result) is the caller's
|
|
8
|
+
* `runUnit`, which returns whether scheduling should stop (the domain's
|
|
9
|
+
* `stopOnFirstFailure` decision). This is the one loop fit + sim run on, replacing
|
|
10
|
+
* their hand-rolled parallel pools and `for-of` loops (the `same-recipe-semantics`
|
|
11
|
+
* guarantee).
|
|
12
|
+
*
|
|
13
|
+
* Faithfully generalized from fitness's `executeParallel` (sliding window: launch
|
|
14
|
+
* up to `maxParallel`, refill on each completion unless stopping/aborted, resolve
|
|
15
|
+
* when drained) and `executeSequential` (`for-of`, abort-check at the top, break
|
|
16
|
+
* on stop).
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Hand control back to the event loop's macrotask queue. `await runUnit()` only
|
|
20
|
+
* yields to the MICROtask queue, so a `setInterval` timer (the 80ms live-progress
|
|
21
|
+
* clock) and Ink's repaint never get a turn between back-to-back synchronous
|
|
22
|
+
* units. A `setImmediate` boundary lets them run — the interim live-view smoothing
|
|
23
|
+
* (the durable fix runs the engine off the main thread; ADR-0016/ADR-0028).
|
|
24
|
+
*/
|
|
25
|
+
export declare const yieldToEventLoop: () => Promise<void>;
|
|
26
|
+
export interface ScheduleUnitsOptions<Unit> {
|
|
27
|
+
readonly units: readonly Unit[];
|
|
28
|
+
readonly mode: 'parallel' | 'sequential';
|
|
29
|
+
/** Concurrency bound in `parallel` mode (ignored for `sequential`). Default 1. */
|
|
30
|
+
readonly maxParallel?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Run one unit (its full timeout/retry/result lifecycle) and report whether the
|
|
33
|
+
* scheduler should stop launching further units. Receives the 0-based index.
|
|
34
|
+
*/
|
|
35
|
+
readonly runUnit: (unit: Unit, index: number) => Promise<{
|
|
36
|
+
readonly shouldStop: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
/** External abort check (e.g. a service-level AbortController); polled before each launch. */
|
|
39
|
+
readonly shouldAbort?: () => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When true, insert a macrotask boundary ({@link yieldToEventLoop}) after each
|
|
42
|
+
* unit completes, so a live-progress timer + renderer on the same thread can
|
|
43
|
+
* paint between units. Opt-in (default off) — only the interactive (TTY) run
|
|
44
|
+
* paths set it; `--json`/non-TTY callers don't need it.
|
|
45
|
+
*/
|
|
46
|
+
readonly yieldBetweenUnits?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Schedule `units` through `runUnit` per the mode/concurrency/stop policy.
|
|
50
|
+
*
|
|
51
|
+
* Cognitive complexity is high (19) because the implementation unifies two
|
|
52
|
+
* scheduling shapes (sliding-window parallel with dynamic refill, and
|
|
53
|
+
* sequential for-of) plus shared abort latching, drain detection, and the
|
|
54
|
+
* optional yieldToEventLoop wrapper for live UI. This is the single
|
|
55
|
+
* scheduler used by fitness and simulation engines (the "same-recipe-semantics"
|
|
56
|
+
* contract). Extracting helpers would make the refill-vs-drain state machine
|
|
57
|
+
* harder to audit as a whole. Disable is scoped to this function.
|
|
58
|
+
*
|
|
59
|
+
* @throws {Error} When `mode` is neither 'sequential' nor 'parallel'.
|
|
60
|
+
*/
|
|
61
|
+
export declare function scheduleUnits<Unit>(opts: ScheduleUnitsOptions<Unit>): Promise<void>;
|
|
62
|
+
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/lib/execution/schedule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAAO,OAAO,CAAC,IAAI,CAG5C,CAAC;AAEL,MAAM,WAAW,oBAAoB,CAAC,IAAI;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;IACzC,kFAAkF;IAClF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC3F,8FAA8F;IAC9F,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC;AAGD;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA2FzF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scheduleUnits — the bounded scheduler of the execution substrate (north-star
|
|
3
|
+
* §5.8, launch).
|
|
4
|
+
*
|
|
5
|
+
* Owns the scheduling SHAPE — a `parallel` sliding window bounded by `maxParallel`,
|
|
6
|
+
* or a `sequential` one-at-a-time loop — plus the stop policy and an external
|
|
7
|
+
* abort check. The per-unit lifecycle (timeout/retry/result) is the caller's
|
|
8
|
+
* `runUnit`, which returns whether scheduling should stop (the domain's
|
|
9
|
+
* `stopOnFirstFailure` decision). This is the one loop fit + sim run on, replacing
|
|
10
|
+
* their hand-rolled parallel pools and `for-of` loops (the `same-recipe-semantics`
|
|
11
|
+
* guarantee).
|
|
12
|
+
*
|
|
13
|
+
* Faithfully generalized from fitness's `executeParallel` (sliding window: launch
|
|
14
|
+
* up to `maxParallel`, refill on each completion unless stopping/aborted, resolve
|
|
15
|
+
* when drained) and `executeSequential` (`for-of`, abort-check at the top, break
|
|
16
|
+
* on stop).
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Hand control back to the event loop's macrotask queue. `await runUnit()` only
|
|
20
|
+
* yields to the MICROtask queue, so a `setInterval` timer (the 80ms live-progress
|
|
21
|
+
* clock) and Ink's repaint never get a turn between back-to-back synchronous
|
|
22
|
+
* units. A `setImmediate` boundary lets them run — the interim live-view smoothing
|
|
23
|
+
* (the durable fix runs the engine off the main thread; ADR-0016/ADR-0028).
|
|
24
|
+
*/
|
|
25
|
+
export const yieldToEventLoop = () => new Promise((resolve) => {
|
|
26
|
+
setImmediate(resolve);
|
|
27
|
+
});
|
|
28
|
+
/* eslint-disable sonarjs/cognitive-complexity -- unifies parallel sliding-window and sequential scheduling with shared abort/drain latching; one scheduler for fitness and simulation (rationale below) */
|
|
29
|
+
/**
|
|
30
|
+
* Schedule `units` through `runUnit` per the mode/concurrency/stop policy.
|
|
31
|
+
*
|
|
32
|
+
* Cognitive complexity is high (19) because the implementation unifies two
|
|
33
|
+
* scheduling shapes (sliding-window parallel with dynamic refill, and
|
|
34
|
+
* sequential for-of) plus shared abort latching, drain detection, and the
|
|
35
|
+
* optional yieldToEventLoop wrapper for live UI. This is the single
|
|
36
|
+
* scheduler used by fitness and simulation engines (the "same-recipe-semantics"
|
|
37
|
+
* contract). Extracting helpers would make the refill-vs-drain state machine
|
|
38
|
+
* harder to audit as a whole. Disable is scoped to this function.
|
|
39
|
+
*
|
|
40
|
+
* @throws {Error} When `mode` is neither 'sequential' nor 'parallel'.
|
|
41
|
+
*/
|
|
42
|
+
export async function scheduleUnits(opts) {
|
|
43
|
+
const { units, mode, shouldAbort } = opts;
|
|
44
|
+
if (units.length === 0)
|
|
45
|
+
return;
|
|
46
|
+
if (mode !== 'sequential' && mode !== 'parallel') {
|
|
47
|
+
throw new Error(`scheduleUnits: mode must be 'parallel' or 'sequential' (got '${String(mode)}')`);
|
|
48
|
+
}
|
|
49
|
+
// Each unit's promise resolves AFTER a macrotask yield when requested, so a
|
|
50
|
+
// same-thread live-progress timer + renderer paint between units. Wrapping
|
|
51
|
+
// `runUnit` (rather than the scheduling logic) keeps the parallel sliding
|
|
52
|
+
// window's activeCount/relaunch bookkeeping synchronous and correct in both modes.
|
|
53
|
+
const runUnit = opts.yieldBetweenUnits === true
|
|
54
|
+
? async (unit, index) => {
|
|
55
|
+
// @fitness-ignore-next-line async-waterfall-detection -- deliberately sequential: the macrotask yield MUST run AFTER the unit completes (it is the between-units boundary); parallelizing with Promise.all would defeat the purpose.
|
|
56
|
+
const outcome = await opts.runUnit(unit, index);
|
|
57
|
+
await yieldToEventLoop();
|
|
58
|
+
return outcome;
|
|
59
|
+
}
|
|
60
|
+
: opts.runUnit;
|
|
61
|
+
// Shared abort observation that also latches a local flag so that once an
|
|
62
|
+
// external abort is seen we treat it as a terminal drain condition (prevents
|
|
63
|
+
// the "no more refills + active drains but resolve condition never fires"
|
|
64
|
+
// hang when there are still unlaunched units).
|
|
65
|
+
let aborted = false;
|
|
66
|
+
const observeAbort = () => {
|
|
67
|
+
if (shouldAbort?.() === true) {
|
|
68
|
+
aborted = true;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
};
|
|
73
|
+
if (mode === 'sequential') {
|
|
74
|
+
for (const [index, unit] of units.entries()) {
|
|
75
|
+
if (observeAbort())
|
|
76
|
+
break;
|
|
77
|
+
const { shouldStop } = await runUnit(unit, index);
|
|
78
|
+
if (shouldStop)
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Parallel sliding window — mirrors fitness's executeParallel.
|
|
84
|
+
// Defensive: even though recipe authors go through defineSimulationRecipe (and
|
|
85
|
+
// fitness through its own paths), a direct caller or future plugin could pass
|
|
86
|
+
// NaN/0/negative. Force a safe minimum.
|
|
87
|
+
const maxParallel = Math.max(1, Number.isFinite(opts.maxParallel) ? opts.maxParallel : 1);
|
|
88
|
+
let nextIndex = 0;
|
|
89
|
+
let activeCount = 0;
|
|
90
|
+
let stopping = false;
|
|
91
|
+
await new Promise((resolve) => {
|
|
92
|
+
const launch = (unit, index) => {
|
|
93
|
+
activeCount++;
|
|
94
|
+
void runUnit(unit, index)
|
|
95
|
+
.then(({ shouldStop }) => {
|
|
96
|
+
if (shouldStop)
|
|
97
|
+
stopping = true;
|
|
98
|
+
})
|
|
99
|
+
.finally(() => {
|
|
100
|
+
activeCount--;
|
|
101
|
+
// Only refill if we are not in any terminal state (stopping, list done, or aborted).
|
|
102
|
+
if (!stopping && !aborted && nextIndex < units.length && !observeAbort()) {
|
|
103
|
+
const next = units[nextIndex];
|
|
104
|
+
if (next !== undefined) {
|
|
105
|
+
const idx = nextIndex;
|
|
106
|
+
nextIndex++;
|
|
107
|
+
launch(next, idx);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Drain condition now includes external abort as a terminal reason.
|
|
111
|
+
// Once all in-flight units complete, we resolve even if units remain.
|
|
112
|
+
if (activeCount === 0 && (nextIndex >= units.length || stopping || aborted)) {
|
|
113
|
+
resolve();
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const initialBatch = Math.min(maxParallel, units.length);
|
|
118
|
+
for (let i = 0; i < initialBatch; i++) {
|
|
119
|
+
if (observeAbort())
|
|
120
|
+
break;
|
|
121
|
+
const unit = units[i];
|
|
122
|
+
if (unit !== undefined) {
|
|
123
|
+
nextIndex = i + 1;
|
|
124
|
+
launch(unit, i);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/* eslint-enable sonarjs/cognitive-complexity */
|
|
130
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/lib/execution/schedule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAkB,EAAE,CAClD,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;IAC5B,YAAY,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAuBL,2MAA2M;AAC3M;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAO,IAAgC;IACxE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE/B,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CACb,gEAAgE,MAAM,CAAC,IAAI,CAAC,IAAI,CACjF,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,mFAAmF;IACnF,MAAM,O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1B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;gBAClB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AACD,gDAAgD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Shared presentation formatters.
|
|
3
|
+
*
|
|
4
|
+
* Small, dependency-free helpers used by more than one tool's CLI/report
|
|
5
|
+
* layer. Kept in core because tools sit in a peer layer and cannot depend on
|
|
6
|
+
* each other — core is their only shared home.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Format a millisecond duration as `"Xms"` under one second, `"X.Ys"` for
|
|
10
|
+
* sub-minute durations, or `"Xm Y.Ys"` at minute scale.
|
|
11
|
+
*
|
|
12
|
+
* @example formatDuration(450) // "450ms"
|
|
13
|
+
* @example formatDuration(1500) // "1.5s"
|
|
14
|
+
* @example formatDuration(1471600) // "24m 31.6s"
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDuration(ms: number): string;
|
|
17
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CASjD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Shared presentation formatters.
|
|
3
|
+
*
|
|
4
|
+
* Small, dependency-free helpers used by more than one tool's CLI/report
|
|
5
|
+
* layer. Kept in core because tools sit in a peer layer and cannot depend on
|
|
6
|
+
* each other — core is their only shared home.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Format a millisecond duration as `"Xms"` under one second, `"X.Ys"` for
|
|
10
|
+
* sub-minute durations, or `"Xm Y.Ys"` at minute scale.
|
|
11
|
+
*
|
|
12
|
+
* @example formatDuration(450) // "450ms"
|
|
13
|
+
* @example formatDuration(1500) // "1.5s"
|
|
14
|
+
* @example formatDuration(1471600) // "24m 31.6s"
|
|
15
|
+
*/
|
|
16
|
+
export function formatDuration(ms) {
|
|
17
|
+
if (ms < 1000)
|
|
18
|
+
return `${String(ms)}ms`;
|
|
19
|
+
const totalTenths = Math.round(ms / 100);
|
|
20
|
+
if (totalTenths < 600)
|
|
21
|
+
return `${(totalTenths / 10).toFixed(1)}s`;
|
|
22
|
+
const minutes = Math.floor(totalTenths / 600);
|
|
23
|
+
const remainingTenths = totalTenths % 600;
|
|
24
|
+
return `${minutes}m ${(remainingTenths / 10).toFixed(1)}s`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;IAExC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;IACzC,IAAI,WAAW,GAAG,GAAG;QAAE,OAAO,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAElE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC;IAC9C,MAAM,eAAe,GAAG,WAAW,GAAG,GAAG,CAAC;IAC1C,OAAO,GAAG,OAAO,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ID generation for opensip-cli.
|
|
3
|
+
* Uses ULID for time-sortable, unique identifiers.
|
|
4
|
+
*/
|
|
5
|
+
/** Generate a ULID (time-sortable, 26 lowercase crockford base32 chars) */
|
|
6
|
+
export declare function generateId(prefix?: string): string;
|
|
7
|
+
/** Generate a prefixed ULID — e.g., generatePrefixedId('run') → 'RUN_01HXYZ...' */
|
|
8
|
+
export declare function generatePrefixedId(prefix: string): string;
|
|
9
|
+
/** Extract the timestamp from a ULID string. Returns null if invalid. */
|
|
10
|
+
export declare function extractTimestamp(id: string): Date | null;
|
|
11
|
+
/** Generate a standard UUID v4 (for cases where ULID is not appropriate) */
|
|
12
|
+
export declare function generateUUID(): string;
|
|
13
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAwBxD;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
|
package/dist/lib/ids.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ID generation for opensip-cli.
|
|
3
|
+
* Uses ULID for time-sortable, unique identifiers.
|
|
4
|
+
*/
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import { ulid } from 'ulid';
|
|
7
|
+
/** Generate a ULID (time-sortable, 26 lowercase crockford base32 chars) */
|
|
8
|
+
export function generateId(prefix) {
|
|
9
|
+
const id = ulid();
|
|
10
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
11
|
+
}
|
|
12
|
+
/** Generate a prefixed ULID — e.g., generatePrefixedId('run') → 'RUN_01HXYZ...' */
|
|
13
|
+
export function generatePrefixedId(prefix) {
|
|
14
|
+
return `${prefix.toUpperCase()}_${ulid()}`;
|
|
15
|
+
}
|
|
16
|
+
/** Extract the timestamp from a ULID string. Returns null if invalid. */
|
|
17
|
+
export function extractTimestamp(id) {
|
|
18
|
+
// ULIDs are exactly 26 Crockford Base32 chars; the prefix (if any) may
|
|
19
|
+
// contain underscores itself — e.g. `generatePrefixedId('my_tool')`
|
|
20
|
+
// produces `MY_TOOL_<ulid>`. Splitting on the first '_' would slice off
|
|
21
|
+
// only `MY` and leave `TOOL_<ulid>`, failing the length check. Take the
|
|
22
|
+
// trailing 26 chars instead, since ULIDs never contain underscores.
|
|
23
|
+
const ulidPart = id.length >= 26 ? id.slice(-26) : id;
|
|
24
|
+
if (ulidPart.length !== 26)
|
|
25
|
+
return null;
|
|
26
|
+
try {
|
|
27
|
+
// ULID encodes timestamp in first 10 chars as Crockford Base32
|
|
28
|
+
const ENCODING = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
29
|
+
const upper = ulidPart.toUpperCase();
|
|
30
|
+
let time = 0;
|
|
31
|
+
for (let i = 0; i < 10; i++) {
|
|
32
|
+
const idx = ENCODING.indexOf(upper[i]);
|
|
33
|
+
if (idx === -1)
|
|
34
|
+
return null;
|
|
35
|
+
time = time * 32 + idx;
|
|
36
|
+
}
|
|
37
|
+
return new Date(time);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// @fitness-ignore-next-line error-handling-quality -- parse-or-null helper; exception → null is the function's contract, caller checks for null.
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Generate a standard UUID v4 (for cases where ULID is not appropriate) */
|
|
45
|
+
export function generateUUID() {
|
|
46
|
+
return randomUUID();
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAC,MAAe;IACxC,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;IAClB,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;AAC7C,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,uEAAuE;IACvE,oEAAoE;IACpE,wEAAwE;IACxE,wEAAwE;IACxE,oEAAoE;IACpE,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtD,IAAI,QAAQ,CAAC,MAAM,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAExC,IAAI,CAAC;QACH,+DAA+D;QAC/D,MAAM,QAAQ,GAAG,kCAAkC,CAAC;QACpD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QACrC,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,GAAG,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAC5B,IAAI,GAAG,IAAI,GAAG,EAAE,GAAG,GAAG,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,iJAAiJ;QACjJ,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured logger for opensip-cli.
|
|
3
|
+
*
|
|
4
|
+
* Outputs JSON log lines with:
|
|
5
|
+
* - ts: ISO timestamp
|
|
6
|
+
* - level: debug | info | warn | error
|
|
7
|
+
* - evt: event name (e.g., 'cli.start', 'cli.check.complete')
|
|
8
|
+
* - runId: correlation ID for the current CLI invocation
|
|
9
|
+
* - msg: human-readable message
|
|
10
|
+
* - ...data: additional structured fields
|
|
11
|
+
*
|
|
12
|
+
* Destinations:
|
|
13
|
+
* - File: <project>/opensip-cli/.runtime/logs/{YYYY-MM-DD}.jsonl
|
|
14
|
+
* The CLI bootstrap supplies this path via configureLogger({ logDir }).
|
|
15
|
+
* Without that, file output is disabled — user-global state
|
|
16
|
+
* (`~/.opensip-cli/`) is reserved for config.yml only.
|
|
17
|
+
* - stderr: when debug mode is enabled (Ink renders to stdout, logs to stderr)
|
|
18
|
+
*
|
|
19
|
+
* The `silent: true` option only suppresses stderr output, NOT file output.
|
|
20
|
+
*
|
|
21
|
+
* Two access patterns:
|
|
22
|
+
*
|
|
23
|
+
* 1. The exported `logger` singleton + `configureLogger(opts)`. Used
|
|
24
|
+
* by the CLI bootstrap and any production caller that wants the
|
|
25
|
+
* process-wide configuration. The four prior free mutators
|
|
26
|
+
* (`setSilent`, `setDebugMode`, `setRunId`, `initLogFile`) were
|
|
27
|
+
* collapsed into `configureLogger` in T1 deferred Item C.
|
|
28
|
+
*
|
|
29
|
+
* 2. The exported `LoggerImpl` class. Used by tests (or tools that
|
|
30
|
+
* need an isolated logger) to construct a fresh instance whose
|
|
31
|
+
* state is independent of the singleton.
|
|
32
|
+
*/
|
|
33
|
+
/** Structured logger surface; accepts a message string or a structured record. */
|
|
34
|
+
export interface Logger {
|
|
35
|
+
debug(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
36
|
+
info(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
37
|
+
warn(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
38
|
+
error(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
39
|
+
}
|
|
40
|
+
/** Log severity levels, ordered from most to least verbose. */
|
|
41
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
42
|
+
/**
|
|
43
|
+
* Concrete logger implementation. Production code uses the exported
|
|
44
|
+
* `logger` singleton (typed as the `Logger` interface so the
|
|
45
|
+
* configuration surface is hidden from generic call sites); tests
|
|
46
|
+
* (or tools that need an isolated logger) can construct a fresh
|
|
47
|
+
* `LoggerImpl()` to exercise the logger without polluting (or being
|
|
48
|
+
* polluted by) the singleton's state.
|
|
49
|
+
*
|
|
50
|
+
* @remarks Treat this class as advanced / discouraged for general
|
|
51
|
+
* production use — the `Logger` interface is the seam. Importing
|
|
52
|
+
* `LoggerImpl` is appropriate for tests and for tools that genuinely
|
|
53
|
+
* need an isolated logger; everywhere else the typed `logger`
|
|
54
|
+
* singleton is the right import.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Construction-time options for `LoggerImpl`. Also the shape accepted
|
|
58
|
+
* by `configureLogger(opts)`, the single bootstrap-time configuration
|
|
59
|
+
* seam that replaced the four free mutators (`setSilent`,
|
|
60
|
+
* `setDebugMode`, `setRunId`, `initLogFile`) — T1 deferred Item C.
|
|
61
|
+
*/
|
|
62
|
+
export interface LoggerOptions {
|
|
63
|
+
/** Initial log level. Defaults to `'warn'`. */
|
|
64
|
+
readonly level?: LogLevel;
|
|
65
|
+
/** Suppress stderr output (file output still occurs). Defaults to `false`. */
|
|
66
|
+
readonly silent?: boolean;
|
|
67
|
+
/** Enable debug-level output to stderr. Defaults to `false`. */
|
|
68
|
+
readonly debugMode?: boolean;
|
|
69
|
+
/** Correlation id for the current CLI invocation. */
|
|
70
|
+
readonly runId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Directory the daily `.jsonl` log file is written to. When provided,
|
|
73
|
+
* the logger initialises the file path and prunes logs older than
|
|
74
|
+
* 7 days. Best-effort; failures are swallowed.
|
|
75
|
+
*/
|
|
76
|
+
readonly logDir?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Optional indirection for the runId on each log entry. The CLI binds
|
|
80
|
+
* this to `() => currentScope()?.runId` at module init (in run-scope.ts,
|
|
81
|
+
* which already depends on logger.ts — this preserves the dependency
|
|
82
|
+
* direction and avoids a logger→run-scope import cycle that depcruise
|
|
83
|
+
* would reject). Returns `undefined` when no scope is bound, in which
|
|
84
|
+
* case `LoggerImpl.log` falls back to its instance-level `runId`.
|
|
85
|
+
*
|
|
86
|
+
* Tests that construct an isolated `new LoggerImpl()` skip this path
|
|
87
|
+
* entirely — they call `setRunId(...)` on the instance.
|
|
88
|
+
*/
|
|
89
|
+
export type RunIdProvider = () => string | undefined;
|
|
90
|
+
/** Concrete logger writing JSONL to stderr and an optional daily file. */
|
|
91
|
+
export declare class LoggerImpl implements Logger {
|
|
92
|
+
private currentLevel;
|
|
93
|
+
private silent;
|
|
94
|
+
private debugMode;
|
|
95
|
+
private runId;
|
|
96
|
+
private logFilePath;
|
|
97
|
+
private runIdProvider;
|
|
98
|
+
constructor(opts?: LoggerOptions);
|
|
99
|
+
/**
|
|
100
|
+
* Apply a `LoggerOptions` bag to this instance. Used by the singleton
|
|
101
|
+
* via `configureLogger(opts)` — the bootstrap-time configuration seam
|
|
102
|
+
* that collapsed the four prior free mutators into one shot. Each
|
|
103
|
+
* field is independent: an `applyOptions({ silent: true })` leaves
|
|
104
|
+
* `debugMode` and `runId` alone.
|
|
105
|
+
*/
|
|
106
|
+
applyOptions(opts: LoggerOptions): void;
|
|
107
|
+
debug(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
108
|
+
info(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
109
|
+
warn(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
110
|
+
error(msgOrObj: string | Record<string, unknown>, data?: Record<string, unknown>): void;
|
|
111
|
+
/**
|
|
112
|
+
* Suppress stderr output. File output still occurs. Used by the CLI
|
|
113
|
+
* to silence the logger during Ink renders (Ink owns stdout; stderr
|
|
114
|
+
* is reserved for `--debug` traces). Tests use this on fresh
|
|
115
|
+
* `new LoggerImpl()` instances to verify the silent-mode contract.
|
|
116
|
+
*/
|
|
117
|
+
setSilent(value: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* Enable debug-level output to stderr. Sets the current level to
|
|
120
|
+
* `'debug'` when enabled. Disabling does NOT restore a prior level.
|
|
121
|
+
*/
|
|
122
|
+
setDebugMode(value: boolean): void;
|
|
123
|
+
/** Set the correlation id stamped on each log entry. */
|
|
124
|
+
setRunId(id: string): void;
|
|
125
|
+
getRunId(): string | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Inject a runId source consulted on every `log()`. Lets the kernel
|
|
128
|
+
* route the singleton through the RunScope-bound runId without the
|
|
129
|
+
* logger module having to import run-scope.ts (which would create a
|
|
130
|
+
* cycle, since run-scope already imports the logger).
|
|
131
|
+
*/
|
|
132
|
+
setRunIdProvider(provider: RunIdProvider | undefined): void;
|
|
133
|
+
/**
|
|
134
|
+
* Initialize the log file for this instance.
|
|
135
|
+
*
|
|
136
|
+
* Writes to `<dir>/<YYYY-MM-DD>.jsonl`; the CLI bootstrap supplies
|
|
137
|
+
* the path from `resolveProjectPaths(cwd).logsDir`. Without a call
|
|
138
|
+
* to this function, file output is disabled (logs still hit stderr
|
|
139
|
+
* in debug mode).
|
|
140
|
+
*
|
|
141
|
+
* Prunes log files older than 7 days inside the chosen directory.
|
|
142
|
+
*
|
|
143
|
+
* @internal — production callers route through `configureLogger`'s
|
|
144
|
+
* `logDir` option. The method is `private` from a domain-design
|
|
145
|
+
* standpoint but TypeScript can't mark it `private` because the
|
|
146
|
+
* constructor calls it via `applyOptions`.
|
|
147
|
+
*/
|
|
148
|
+
initLogFile(dir: string): void;
|
|
149
|
+
private shouldLog;
|
|
150
|
+
private shouldWriteToFile;
|
|
151
|
+
private log;
|
|
152
|
+
}
|
|
153
|
+
export declare const logger: Logger;
|
|
154
|
+
/**
|
|
155
|
+
* One-shot configuration for the process-wide `logger` singleton.
|
|
156
|
+
* Replaces the four free mutators that previously each mutated one
|
|
157
|
+
* field. The CLI's pre-action-hook calls this once with all relevant
|
|
158
|
+
* options after flags are parsed and the project context is resolved.
|
|
159
|
+
*
|
|
160
|
+
* SaaS hosts that run multiple invocations concurrently should NOT use
|
|
161
|
+
* this — they construct per-invocation `new LoggerImpl({...})` and
|
|
162
|
+
* wire it into the `RunScope.logger` field so each run has its own
|
|
163
|
+
* file path and runId.
|
|
164
|
+
*/
|
|
165
|
+
export declare function configureLogger(opts: LoggerOptions): void;
|
|
166
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,kFAAkF;AAClF,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,QAAQ,EAAE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