@opensip-cli/graph 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__/baseline-plane.test.d.ts +11 -0
- package/dist/__tests__/baseline-plane.test.d.ts.map +1 -0
- package/dist/__tests__/baseline-plane.test.js +60 -0
- package/dist/__tests__/baseline-plane.test.js.map +1 -0
- package/dist/__tests__/cache/engine-version.test.d.ts +12 -0
- package/dist/__tests__/cache/engine-version.test.d.ts.map +1 -0
- package/dist/__tests__/cache/engine-version.test.js +79 -0
- package/dist/__tests__/cache/engine-version.test.js.map +1 -0
- package/dist/__tests__/cache/invalidate.test.d.ts +9 -0
- package/dist/__tests__/cache/invalidate.test.d.ts.map +1 -0
- package/dist/__tests__/cache/invalidate.test.js +228 -0
- package/dist/__tests__/cache/invalidate.test.js.map +1 -0
- package/dist/__tests__/cli/contribution-from-signals.test.d.ts +17 -0
- package/dist/__tests__/cli/contribution-from-signals.test.d.ts.map +1 -0
- package/dist/__tests__/cli/contribution-from-signals.test.js +89 -0
- package/dist/__tests__/cli/contribution-from-signals.test.js.map +1 -0
- package/dist/__tests__/cli/detect.test.d.ts +2 -0
- package/dist/__tests__/cli/detect.test.d.ts.map +1 -0
- package/dist/__tests__/cli/detect.test.js +96 -0
- package/dist/__tests__/cli/detect.test.js.map +1 -0
- package/dist/__tests__/cli/graph-config.test.d.ts +9 -0
- package/dist/__tests__/cli/graph-config.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph-config.test.js +113 -0
- package/dist/__tests__/cli/graph-config.test.js.map +1 -0
- package/dist/__tests__/cli/graph-execute.test.d.ts +9 -0
- package/dist/__tests__/cli/graph-execute.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph-execute.test.js +434 -0
- package/dist/__tests__/cli/graph-execute.test.js.map +1 -0
- package/dist/__tests__/cli/graph.test.d.ts +12 -0
- package/dist/__tests__/cli/graph.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph.test.js +589 -0
- package/dist/__tests__/cli/graph.test.js.map +1 -0
- package/dist/__tests__/cli/heap-preflight.test.d.ts +11 -0
- package/dist/__tests__/cli/heap-preflight.test.d.ts.map +1 -0
- package/dist/__tests__/cli/heap-preflight.test.js +150 -0
- package/dist/__tests__/cli/heap-preflight.test.js.map +1 -0
- package/dist/__tests__/cli/language-mismatch.test.d.ts +10 -0
- package/dist/__tests__/cli/language-mismatch.test.d.ts.map +1 -0
- package/dist/__tests__/cli/language-mismatch.test.js +155 -0
- package/dist/__tests__/cli/language-mismatch.test.js.map +1 -0
- package/dist/__tests__/cli/lookup.test.d.ts +7 -0
- package/dist/__tests__/cli/lookup.test.d.ts.map +1 -0
- package/dist/__tests__/cli/lookup.test.js +104 -0
- package/dist/__tests__/cli/lookup.test.js.map +1 -0
- package/dist/__tests__/cli/orchestrate.test.d.ts +12 -0
- package/dist/__tests__/cli/orchestrate.test.d.ts.map +1 -0
- package/dist/__tests__/cli/orchestrate.test.js +315 -0
- package/dist/__tests__/cli/orchestrate.test.js.map +1 -0
- package/dist/__tests__/cli/positional-paths.test.d.ts +5 -0
- package/dist/__tests__/cli/positional-paths.test.d.ts.map +1 -0
- package/dist/__tests__/cli/positional-paths.test.js +87 -0
- package/dist/__tests__/cli/positional-paths.test.js.map +1 -0
- package/dist/__tests__/cli/pressure-monitor.test.d.ts +11 -0
- package/dist/__tests__/cli/pressure-monitor.test.d.ts.map +1 -0
- package/dist/__tests__/cli/pressure-monitor.test.js +94 -0
- package/dist/__tests__/cli/pressure-monitor.test.js.map +1 -0
- package/dist/__tests__/cli/sarif-export.test.d.ts +8 -0
- package/dist/__tests__/cli/sarif-export.test.d.ts.map +1 -0
- package/dist/__tests__/cli/sarif-export.test.js +94 -0
- package/dist/__tests__/cli/sarif-export.test.js.map +1 -0
- package/dist/__tests__/cli/session-contract.test.d.ts +17 -0
- package/dist/__tests__/cli/session-contract.test.d.ts.map +1 -0
- package/dist/__tests__/cli/session-contract.test.js +225 -0
- package/dist/__tests__/cli/session-contract.test.js.map +1 -0
- package/dist/__tests__/cli/symbol-index.test.d.ts +7 -0
- package/dist/__tests__/cli/symbol-index.test.d.ts.map +1 -0
- package/dist/__tests__/cli/symbol-index.test.js +117 -0
- package/dist/__tests__/cli/symbol-index.test.js.map +1 -0
- package/dist/__tests__/cli/tool-show-mode.test.d.ts +10 -0
- package/dist/__tests__/cli/tool-show-mode.test.d.ts.map +1 -0
- package/dist/__tests__/cli/tool-show-mode.test.js +128 -0
- package/dist/__tests__/cli/tool-show-mode.test.js.map +1 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.d.ts +10 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.d.ts.map +1 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.js +120 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.js.map +1 -0
- package/dist/__tests__/graph-catalog-drift.test.d.ts +24 -0
- package/dist/__tests__/graph-catalog-drift.test.d.ts.map +1 -0
- package/dist/__tests__/graph-catalog-drift.test.js +34 -0
- package/dist/__tests__/graph-catalog-drift.test.js.map +1 -0
- package/dist/__tests__/internal-surface.test.d.ts +17 -0
- package/dist/__tests__/internal-surface.test.d.ts.map +1 -0
- package/dist/__tests__/internal-surface.test.js +45 -0
- package/dist/__tests__/internal-surface.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/body-digest.test.d.ts +13 -0
- package/dist/__tests__/lang-adapter/body-digest.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/body-digest.test.js +51 -0
- package/dist/__tests__/lang-adapter/body-digest.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.d.ts +12 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.js +147 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/registry.test.d.ts +9 -0
- package/dist/__tests__/lang-adapter/registry.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/registry.test.js +228 -0
- package/dist/__tests__/lang-adapter/registry.test.js.map +1 -0
- package/dist/__tests__/persistence/catalog-repo.test.d.ts +2 -0
- package/dist/__tests__/persistence/catalog-repo.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/catalog-repo.test.js +188 -0
- package/dist/__tests__/persistence/catalog-repo.test.js.map +1 -0
- package/dist/__tests__/persistence/session-payload.test.d.ts +2 -0
- package/dist/__tests__/persistence/session-payload.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/session-payload.test.js +81 -0
- package/dist/__tests__/persistence/session-payload.test.js.map +1 -0
- package/dist/__tests__/persistence/session-replay.test.d.ts +10 -0
- package/dist/__tests__/persistence/session-replay.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/session-replay.test.js +196 -0
- package/dist/__tests__/persistence/session-replay.test.js.map +1 -0
- package/dist/__tests__/public-api.test.d.ts +19 -0
- package/dist/__tests__/public-api.test.d.ts.map +1 -0
- package/dist/__tests__/public-api.test.js +96 -0
- package/dist/__tests__/public-api.test.js.map +1 -0
- package/dist/__tests__/render/catalog-json-types.test.d.ts +10 -0
- package/dist/__tests__/render/catalog-json-types.test.d.ts.map +1 -0
- package/dist/__tests__/render/catalog-json-types.test.js +121 -0
- package/dist/__tests__/render/catalog-json-types.test.js.map +1 -0
- package/dist/__tests__/render/catalog-json.test.d.ts +19 -0
- package/dist/__tests__/render/catalog-json.test.d.ts.map +1 -0
- package/dist/__tests__/render/catalog-json.test.js +435 -0
- package/dist/__tests__/render/catalog-json.test.js.map +1 -0
- package/dist/__tests__/render/opensip-id-derivation.test.d.ts +21 -0
- package/dist/__tests__/render/opensip-id-derivation.test.d.ts.map +1 -0
- package/dist/__tests__/render/opensip-id-derivation.test.js +159 -0
- package/dist/__tests__/render/opensip-id-derivation.test.js.map +1 -0
- package/dist/__tests__/render/rule-id-mapping.test.d.ts +13 -0
- package/dist/__tests__/render/rule-id-mapping.test.d.ts.map +1 -0
- package/dist/__tests__/render/rule-id-mapping.test.js +50 -0
- package/dist/__tests__/render/rule-id-mapping.test.js.map +1 -0
- package/dist/__tests__/render/sarif-opensip.test.d.ts +20 -0
- package/dist/__tests__/render/sarif-opensip.test.d.ts.map +1 -0
- package/dist/__tests__/render/sarif-opensip.test.js +235 -0
- package/dist/__tests__/render/sarif-opensip.test.js.map +1 -0
- package/dist/__tests__/resolution-mode.test.d.ts +10 -0
- package/dist/__tests__/resolution-mode.test.d.ts.map +1 -0
- package/dist/__tests__/resolution-mode.test.js +96 -0
- package/dist/__tests__/resolution-mode.test.js.map +1 -0
- package/dist/__tests__/resolve-callee.test.d.ts +2 -0
- package/dist/__tests__/resolve-callee.test.d.ts.map +1 -0
- package/dist/__tests__/resolve-callee.test.js +119 -0
- package/dist/__tests__/resolve-callee.test.js.map +1 -0
- package/dist/__tests__/rules/_entry-points.test.d.ts +8 -0
- package/dist/__tests__/rules/_entry-points.test.d.ts.map +1 -0
- package/dist/__tests__/rules/_entry-points.test.js +74 -0
- package/dist/__tests__/rules/_entry-points.test.js.map +1 -0
- package/dist/__tests__/rules/_helpers.d.ts +18 -0
- package/dist/__tests__/rules/_helpers.d.ts.map +1 -0
- package/dist/__tests__/rules/_helpers.js +72 -0
- package/dist/__tests__/rules/_helpers.js.map +1 -0
- package/dist/__tests__/rules/always-throws-branch.test.d.ts +9 -0
- package/dist/__tests__/rules/always-throws-branch.test.d.ts.map +1 -0
- package/dist/__tests__/rules/always-throws-branch.test.js +113 -0
- package/dist/__tests__/rules/always-throws-branch.test.js.map +1 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.d.ts +13 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.d.ts.map +1 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.js +224 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.js.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.d.ts +8 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.d.ts.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.js +132 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.js.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.d.ts +10 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.d.ts.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.js +274 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.js.map +1 -0
- package/dist/__tests__/rules/feature-column-parity.test.d.ts +11 -0
- package/dist/__tests__/rules/feature-column-parity.test.d.ts.map +1 -0
- package/dist/__tests__/rules/feature-column-parity.test.js +169 -0
- package/dist/__tests__/rules/feature-column-parity.test.js.map +1 -0
- package/dist/__tests__/rules/high-blast-untested.test.d.ts +13 -0
- package/dist/__tests__/rules/high-blast-untested.test.d.ts.map +1 -0
- package/dist/__tests__/rules/high-blast-untested.test.js +108 -0
- package/dist/__tests__/rules/high-blast-untested.test.js.map +1 -0
- package/dist/__tests__/rules/large-function.test.d.ts +11 -0
- package/dist/__tests__/rules/large-function.test.d.ts.map +1 -0
- package/dist/__tests__/rules/large-function.test.js +105 -0
- package/dist/__tests__/rules/large-function.test.js.map +1 -0
- package/dist/__tests__/rules/no-side-effect-path.test.d.ts +10 -0
- package/dist/__tests__/rules/no-side-effect-path.test.d.ts.map +1 -0
- package/dist/__tests__/rules/no-side-effect-path.test.js +301 -0
- package/dist/__tests__/rules/no-side-effect-path.test.js.map +1 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.d.ts +8 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.d.ts.map +1 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.js +176 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.js.map +1 -0
- package/dist/__tests__/rules/registry.test.d.ts +11 -0
- package/dist/__tests__/rules/registry.test.d.ts.map +1 -0
- package/dist/__tests__/rules/registry.test.js +50 -0
- package/dist/__tests__/rules/registry.test.js.map +1 -0
- package/dist/__tests__/rules/severity-override.test.d.ts +11 -0
- package/dist/__tests__/rules/severity-override.test.d.ts.map +1 -0
- package/dist/__tests__/rules/severity-override.test.js +67 -0
- package/dist/__tests__/rules/severity-override.test.js.map +1 -0
- package/dist/__tests__/rules/test-only-reachable.test.d.ts +9 -0
- package/dist/__tests__/rules/test-only-reachable.test.d.ts.map +1 -0
- package/dist/__tests__/rules/test-only-reachable.test.js +142 -0
- package/dist/__tests__/rules/test-only-reachable.test.js.map +1 -0
- package/dist/__tests__/rules/wide-function.test.d.ts +9 -0
- package/dist/__tests__/rules/wide-function.test.d.ts.map +1 -0
- package/dist/__tests__/rules/wide-function.test.js +64 -0
- package/dist/__tests__/rules/wide-function.test.js.map +1 -0
- package/dist/__tests__/test-utils/with-graph-scope.d.ts +14 -0
- package/dist/__tests__/test-utils/with-graph-scope.d.ts.map +1 -0
- package/dist/__tests__/test-utils/with-graph-scope.js +26 -0
- package/dist/__tests__/test-utils/with-graph-scope.js.map +1 -0
- package/dist/__tests__/tool-branches.test.d.ts +18 -0
- package/dist/__tests__/tool-branches.test.d.ts.map +1 -0
- package/dist/__tests__/tool-branches.test.js +262 -0
- package/dist/__tests__/tool-branches.test.js.map +1 -0
- package/dist/__tests__/tool-register.test.d.ts +16 -0
- package/dist/__tests__/tool-register.test.d.ts.map +1 -0
- package/dist/__tests__/tool-register.test.js +419 -0
- package/dist/__tests__/tool-register.test.js.map +1 -0
- package/dist/__tests__/tool.test.d.ts +18 -0
- package/dist/__tests__/tool.test.d.ts.map +1 -0
- package/dist/__tests__/tool.test.js +65 -0
- package/dist/__tests__/tool.test.js.map +1 -0
- package/dist/baseline-strategy.d.ts +28 -0
- package/dist/baseline-strategy.d.ts.map +1 -0
- package/dist/baseline-strategy.js +27 -0
- package/dist/baseline-strategy.js.map +1 -0
- package/dist/cache/engine-version.d.ts +69 -0
- package/dist/cache/engine-version.d.ts.map +1 -0
- package/dist/cache/engine-version.js +60 -0
- package/dist/cache/engine-version.js.map +1 -0
- package/dist/cache/invalidate.d.ts +60 -0
- package/dist/cache/invalidate.d.ts.map +1 -0
- package/dist/cache/invalidate.js +120 -0
- package/dist/cache/invalidate.js.map +1 -0
- package/dist/cli/__tests__/build-envelope.test.d.ts +8 -0
- package/dist/cli/__tests__/build-envelope.test.d.ts.map +1 -0
- package/dist/cli/__tests__/build-envelope.test.js +70 -0
- package/dist/cli/__tests__/build-envelope.test.js.map +1 -0
- package/dist/cli/__tests__/dispatch-envelope.test.d.ts +15 -0
- package/dist/cli/__tests__/dispatch-envelope.test.d.ts.map +1 -0
- package/dist/cli/__tests__/dispatch-envelope.test.js +73 -0
- package/dist/cli/__tests__/dispatch-envelope.test.js.map +1 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.d.ts +18 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.d.ts.map +1 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.js +91 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.js.map +1 -0
- package/dist/cli/__tests__/graph-config-schema.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-config-schema.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-config-schema.test.js +60 -0
- package/dist/cli/__tests__/graph-config-schema.test.js.map +1 -0
- package/dist/cli/__tests__/graph-gate-mode.test.d.ts +15 -0
- package/dist/cli/__tests__/graph-gate-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-gate-mode.test.js +99 -0
- package/dist/cli/__tests__/graph-gate-mode.test.js.map +1 -0
- package/dist/cli/__tests__/graph-recipes.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-recipes.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-recipes.test.js +24 -0
- package/dist/cli/__tests__/graph-recipes.test.js.map +1 -0
- package/dist/cli/__tests__/graph-report.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-report.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-report.test.js +138 -0
- package/dist/cli/__tests__/graph-report.test.js.map +1 -0
- package/dist/cli/__tests__/graph-tracer.test.d.ts +11 -0
- package/dist/cli/__tests__/graph-tracer.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-tracer.test.js +41 -0
- package/dist/cli/__tests__/graph-tracer.test.js.map +1 -0
- package/dist/cli/__tests__/graph-worker.test.d.ts +13 -0
- package/dist/cli/__tests__/graph-worker.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-worker.test.js +127 -0
- package/dist/cli/__tests__/graph-worker.test.js.map +1 -0
- package/dist/cli/__tests__/list-files.test.d.ts +12 -0
- package/dist/cli/__tests__/list-files.test.d.ts.map +1 -0
- package/dist/cli/__tests__/list-files.test.js +146 -0
- package/dist/cli/__tests__/list-files.test.js.map +1 -0
- package/dist/cli/__tests__/live-suppression-parity.test.d.ts +23 -0
- package/dist/cli/__tests__/live-suppression-parity.test.d.ts.map +1 -0
- package/dist/cli/__tests__/live-suppression-parity.test.js +136 -0
- package/dist/cli/__tests__/live-suppression-parity.test.js.map +1 -0
- package/dist/cli/__tests__/orchestrate-spans.test.d.ts +18 -0
- package/dist/cli/__tests__/orchestrate-spans.test.d.ts.map +1 -0
- package/dist/cli/__tests__/orchestrate-spans.test.js +108 -0
- package/dist/cli/__tests__/orchestrate-spans.test.js.map +1 -0
- package/dist/cli/__tests__/shard-worker.test.d.ts +10 -0
- package/dist/cli/__tests__/shard-worker.test.d.ts.map +1 -0
- package/dist/cli/__tests__/shard-worker.test.js +153 -0
- package/dist/cli/__tests__/shard-worker.test.js.map +1 -0
- package/dist/cli/__tests__/workspace-report.test.d.ts +6 -0
- package/dist/cli/__tests__/workspace-report.test.d.ts.map +1 -0
- package/dist/cli/__tests__/workspace-report.test.js +89 -0
- package/dist/cli/__tests__/workspace-report.test.js.map +1 -0
- package/dist/cli/apply-suppressions.d.ts +86 -0
- package/dist/cli/apply-suppressions.d.ts.map +1 -0
- package/dist/cli/apply-suppressions.js +101 -0
- package/dist/cli/apply-suppressions.js.map +1 -0
- package/dist/cli/apply-suppressions.test.d.ts +12 -0
- package/dist/cli/apply-suppressions.test.d.ts.map +1 -0
- package/dist/cli/apply-suppressions.test.js +85 -0
- package/dist/cli/apply-suppressions.test.js.map +1 -0
- package/dist/cli/build-envelope.d.ts +53 -0
- package/dist/cli/build-envelope.d.ts.map +1 -0
- package/dist/cli/build-envelope.js +88 -0
- package/dist/cli/build-envelope.js.map +1 -0
- package/dist/cli/detect.d.ts +37 -0
- package/dist/cli/detect.d.ts.map +1 -0
- package/dist/cli/detect.js +60 -0
- package/dist/cli/detect.js.map +1 -0
- package/dist/cli/equivalence-check-command.d.ts +45 -0
- package/dist/cli/equivalence-check-command.d.ts.map +1 -0
- package/dist/cli/equivalence-check-command.js +196 -0
- package/dist/cli/equivalence-check-command.js.map +1 -0
- package/dist/cli/graph/graph-aux-command-specs.d.ts +60 -0
- package/dist/cli/graph/graph-aux-command-specs.d.ts.map +1 -0
- package/dist/cli/graph/graph-aux-command-specs.js +390 -0
- package/dist/cli/graph/graph-aux-command-specs.js.map +1 -0
- package/dist/cli/graph/graph-command-spec.d.ts +43 -0
- package/dist/cli/graph/graph-command-spec.d.ts.map +1 -0
- package/dist/cli/graph/graph-command-spec.js +456 -0
- package/dist/cli/graph/graph-command-spec.js.map +1 -0
- package/dist/cli/graph-config-schema.d.ts +70 -0
- package/dist/cli/graph-config-schema.d.ts.map +1 -0
- package/dist/cli/graph-config-schema.js +68 -0
- package/dist/cli/graph-config-schema.js.map +1 -0
- package/dist/cli/graph-config.d.ts +53 -0
- package/dist/cli/graph-config.d.ts.map +1 -0
- package/dist/cli/graph-config.js +111 -0
- package/dist/cli/graph-config.js.map +1 -0
- package/dist/cli/graph-modes.d.ts +36 -0
- package/dist/cli/graph-modes.d.ts.map +1 -0
- package/dist/cli/graph-modes.js +161 -0
- package/dist/cli/graph-modes.js.map +1 -0
- package/dist/cli/graph-options.d.ts +143 -0
- package/dist/cli/graph-options.d.ts.map +1 -0
- package/dist/cli/graph-options.js +15 -0
- package/dist/cli/graph-options.js.map +1 -0
- package/dist/cli/graph-progress.d.ts +31 -0
- package/dist/cli/graph-progress.d.ts.map +1 -0
- package/dist/cli/graph-progress.js +56 -0
- package/dist/cli/graph-progress.js.map +1 -0
- package/dist/cli/graph-recipes.d.ts +23 -0
- package/dist/cli/graph-recipes.d.ts.map +1 -0
- package/dist/cli/graph-recipes.js +44 -0
- package/dist/cli/graph-recipes.js.map +1 -0
- package/dist/cli/graph-report.d.ts +79 -0
- package/dist/cli/graph-report.d.ts.map +1 -0
- package/dist/cli/graph-report.js +186 -0
- package/dist/cli/graph-report.js.map +1 -0
- package/dist/cli/graph-runner.d.ts +106 -0
- package/dist/cli/graph-runner.d.ts.map +1 -0
- package/dist/cli/graph-runner.js +274 -0
- package/dist/cli/graph-runner.js.map +1 -0
- package/dist/cli/graph-tracer.d.ts +27 -0
- package/dist/cli/graph-tracer.d.ts.map +1 -0
- package/dist/cli/graph-tracer.js +33 -0
- package/dist/cli/graph-tracer.js.map +1 -0
- package/dist/cli/graph-worker.d.ts +29 -0
- package/dist/cli/graph-worker.d.ts.map +1 -0
- package/dist/cli/graph-worker.js +86 -0
- package/dist/cli/graph-worker.js.map +1 -0
- package/dist/cli/graph.d.ts +171 -0
- package/dist/cli/graph.d.ts.map +1 -0
- package/dist/cli/graph.js +1041 -0
- package/dist/cli/graph.js.map +1 -0
- package/dist/cli/heap-preflight.d.ts +62 -0
- package/dist/cli/heap-preflight.d.ts.map +1 -0
- package/dist/cli/heap-preflight.js +176 -0
- package/dist/cli/heap-preflight.js.map +1 -0
- package/dist/cli/list-files.d.ts +37 -0
- package/dist/cli/list-files.d.ts.map +1 -0
- package/dist/cli/list-files.js +166 -0
- package/dist/cli/list-files.js.map +1 -0
- package/dist/cli/lookup.d.ts +19 -0
- package/dist/cli/lookup.d.ts.map +1 -0
- package/dist/cli/lookup.js +87 -0
- package/dist/cli/lookup.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.d.ts +47 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.js +331 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.d.ts +69 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.js +181 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.js +51 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.js +147 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.d.ts +12 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.js +509 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.d.ts +19 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.js +163 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.js +103 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.d.ts +10 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.js +277 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.d.ts +51 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.js +183 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.d.ts +47 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.js +259 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.js +105 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.d.ts +12 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.js +346 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.d.ts +16 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.js +99 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.d.ts +11 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.js +271 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.d.ts +38 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.js +163 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.js +153 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.d.ts +10 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.js +104 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.d.ts +21 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.js +59 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.js +77 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.d.ts +13 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.js +103 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.d.ts +13 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.js +257 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.d.ts +6 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.js +38 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.js.map +1 -0
- package/dist/cli/orchestrate/cache-orchestrator.d.ts +42 -0
- package/dist/cli/orchestrate/cache-orchestrator.d.ts.map +1 -0
- package/dist/cli/orchestrate/cache-orchestrator.js +92 -0
- package/dist/cli/orchestrate/cache-orchestrator.js.map +1 -0
- package/dist/cli/orchestrate/canonical-file-set.d.ts +51 -0
- package/dist/cli/orchestrate/canonical-file-set.d.ts.map +1 -0
- package/dist/cli/orchestrate/canonical-file-set.js +58 -0
- package/dist/cli/orchestrate/canonical-file-set.js.map +1 -0
- package/dist/cli/orchestrate/catalog-builder.d.ts +121 -0
- package/dist/cli/orchestrate/catalog-builder.d.ts.map +1 -0
- package/dist/cli/orchestrate/catalog-builder.js +279 -0
- package/dist/cli/orchestrate/catalog-builder.js.map +1 -0
- package/dist/cli/orchestrate/catalog-stats.d.ts +31 -0
- package/dist/cli/orchestrate/catalog-stats.d.ts.map +1 -0
- package/dist/cli/orchestrate/catalog-stats.js +52 -0
- package/dist/cli/orchestrate/catalog-stats.js.map +1 -0
- package/dist/cli/orchestrate/cross-shard-resolve.d.ts +190 -0
- package/dist/cli/orchestrate/cross-shard-resolve.d.ts.map +1 -0
- package/dist/cli/orchestrate/cross-shard-resolve.js +523 -0
- package/dist/cli/orchestrate/cross-shard-resolve.js.map +1 -0
- package/dist/cli/orchestrate/edge-identity.d.ts +48 -0
- package/dist/cli/orchestrate/edge-identity.d.ts.map +1 -0
- package/dist/cli/orchestrate/edge-identity.js +68 -0
- package/dist/cli/orchestrate/edge-identity.js.map +1 -0
- package/dist/cli/orchestrate/equivalence-check.d.ts +227 -0
- package/dist/cli/orchestrate/equivalence-check.d.ts.map +1 -0
- package/dist/cli/orchestrate/equivalence-check.js +264 -0
- package/dist/cli/orchestrate/equivalence-check.js.map +1 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.d.ts +33 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.d.ts.map +1 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.js +62 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.js.map +1 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.d.ts +171 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.d.ts.map +1 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.js +328 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.js.map +1 -0
- package/dist/cli/orchestrate/incremental-merge.d.ts +46 -0
- package/dist/cli/orchestrate/incremental-merge.d.ts.map +1 -0
- package/dist/cli/orchestrate/incremental-merge.js +236 -0
- package/dist/cli/orchestrate/incremental-merge.js.map +1 -0
- package/dist/cli/orchestrate/partition-chunk.d.ts +36 -0
- package/dist/cli/orchestrate/partition-chunk.d.ts.map +1 -0
- package/dist/cli/orchestrate/partition-chunk.js +37 -0
- package/dist/cli/orchestrate/partition-chunk.js.map +1 -0
- package/dist/cli/orchestrate/partition-files.d.ts +52 -0
- package/dist/cli/orchestrate/partition-files.d.ts.map +1 -0
- package/dist/cli/orchestrate/partition-files.js +94 -0
- package/dist/cli/orchestrate/partition-files.js.map +1 -0
- package/dist/cli/orchestrate/resolution-trace.d.ts +11 -0
- package/dist/cli/orchestrate/resolution-trace.d.ts.map +1 -0
- package/dist/cli/orchestrate/resolution-trace.js +27 -0
- package/dist/cli/orchestrate/resolution-trace.js.map +1 -0
- package/dist/cli/orchestrate/shard-model.d.ts +99 -0
- package/dist/cli/orchestrate/shard-model.d.ts.map +1 -0
- package/dist/cli/orchestrate/shard-model.js +23 -0
- package/dist/cli/orchestrate/shard-model.js.map +1 -0
- package/dist/cli/orchestrate/shard-runner.d.ts +65 -0
- package/dist/cli/orchestrate/shard-runner.d.ts.map +1 -0
- package/dist/cli/orchestrate/shard-runner.js +169 -0
- package/dist/cli/orchestrate/shard-runner.js.map +1 -0
- package/dist/cli/orchestrate/sharded-graph.d.ts +86 -0
- package/dist/cli/orchestrate/sharded-graph.d.ts.map +1 -0
- package/dist/cli/orchestrate/sharded-graph.js +227 -0
- package/dist/cli/orchestrate/sharded-graph.js.map +1 -0
- package/dist/cli/orchestrate/types.d.ts +31 -0
- package/dist/cli/orchestrate/types.d.ts.map +1 -0
- package/dist/cli/orchestrate/types.js +24 -0
- package/dist/cli/orchestrate/types.js.map +1 -0
- package/dist/cli/orchestrate/worker-pool.d.ts +16 -0
- package/dist/cli/orchestrate/worker-pool.d.ts.map +1 -0
- package/dist/cli/orchestrate/worker-pool.js +39 -0
- package/dist/cli/orchestrate/worker-pool.js.map +1 -0
- package/dist/cli/orchestrate.d.ts +106 -0
- package/dist/cli/orchestrate.d.ts.map +1 -0
- package/dist/cli/orchestrate.js +228 -0
- package/dist/cli/orchestrate.js.map +1 -0
- package/dist/cli/positional-paths.d.ts +23 -0
- package/dist/cli/positional-paths.d.ts.map +1 -0
- package/dist/cli/positional-paths.js +64 -0
- package/dist/cli/positional-paths.js.map +1 -0
- package/dist/cli/pressure-monitor.d.ts +62 -0
- package/dist/cli/pressure-monitor.d.ts.map +1 -0
- package/dist/cli/pressure-monitor.js +110 -0
- package/dist/cli/pressure-monitor.js.map +1 -0
- package/dist/cli/profile.d.ts +82 -0
- package/dist/cli/profile.d.ts.map +1 -0
- package/dist/cli/profile.js +120 -0
- package/dist/cli/profile.js.map +1 -0
- package/dist/cli/report-data.d.ts +46 -0
- package/dist/cli/report-data.d.ts.map +1 -0
- package/dist/cli/report-data.js +48 -0
- package/dist/cli/report-data.js.map +1 -0
- package/dist/cli/resolve-adapters.d.ts +19 -0
- package/dist/cli/resolve-adapters.d.ts.map +1 -0
- package/dist/cli/resolve-adapters.js +38 -0
- package/dist/cli/resolve-adapters.js.map +1 -0
- package/dist/cli/sarif-export.d.ts +40 -0
- package/dist/cli/sarif-export.d.ts.map +1 -0
- package/dist/cli/sarif-export.js +69 -0
- package/dist/cli/sarif-export.js.map +1 -0
- package/dist/cli/shard-worker.d.ts +25 -0
- package/dist/cli/shard-worker.d.ts.map +1 -0
- package/dist/cli/shard-worker.js +98 -0
- package/dist/cli/shard-worker.js.map +1 -0
- package/dist/cli/symbol-index.d.ts +51 -0
- package/dist/cli/symbol-index.d.ts.map +1 -0
- package/dist/cli/symbol-index.js +120 -0
- package/dist/cli/symbol-index.js.map +1 -0
- package/dist/cli/workspace-report.d.ts +32 -0
- package/dist/cli/workspace-report.d.ts.map +1 -0
- package/dist/cli/workspace-report.js +107 -0
- package/dist/cli/workspace-report.js.map +1 -0
- package/dist/cli/workspace-runner.d.ts +104 -0
- package/dist/cli/workspace-runner.d.ts.map +1 -0
- package/dist/cli/workspace-runner.js +166 -0
- package/dist/cli/workspace-runner.js.map +1 -0
- package/dist/cross-package/export-index.d.ts +118 -0
- package/dist/cross-package/export-index.d.ts.map +1 -0
- package/dist/cross-package/export-index.js +296 -0
- package/dist/cross-package/export-index.js.map +1 -0
- package/dist/cross-package/posix-path.d.ts +16 -0
- package/dist/cross-package/posix-path.d.ts.map +1 -0
- package/dist/cross-package/posix-path.js +18 -0
- package/dist/cross-package/posix-path.js.map +1 -0
- package/dist/cross-package/resolve.d.ts +68 -0
- package/dist/cross-package/resolve.d.ts.map +1 -0
- package/dist/cross-package/resolve.js +83 -0
- package/dist/cross-package/resolve.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +25 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +38 -0
- package/dist/internal.js.map +1 -0
- package/dist/lang-adapter/body-digest.d.ts +46 -0
- package/dist/lang-adapter/body-digest.d.ts.map +1 -0
- package/dist/lang-adapter/body-digest.js +49 -0
- package/dist/lang-adapter/body-digest.js.map +1 -0
- package/dist/lang-adapter/edge-helpers.d.ts +104 -0
- package/dist/lang-adapter/edge-helpers.d.ts.map +1 -0
- package/dist/lang-adapter/edge-helpers.js +120 -0
- package/dist/lang-adapter/edge-helpers.js.map +1 -0
- package/dist/lang-adapter/registry.d.ts +59 -0
- package/dist/lang-adapter/registry.d.ts.map +1 -0
- package/dist/lang-adapter/registry.js +100 -0
- package/dist/lang-adapter/registry.js.map +1 -0
- package/dist/lang-adapter/selector.d.ts +39 -0
- package/dist/lang-adapter/selector.d.ts.map +1 -0
- package/dist/lang-adapter/selector.js +140 -0
- package/dist/lang-adapter/selector.js.map +1 -0
- package/dist/lang-adapter/types.d.ts +217 -0
- package/dist/lang-adapter/types.d.ts.map +1 -0
- package/dist/lang-adapter/types.js +18 -0
- package/dist/lang-adapter/types.js.map +1 -0
- package/dist/owner-key.d.ts +22 -0
- package/dist/owner-key.d.ts.map +1 -0
- package/dist/owner-key.js +25 -0
- package/dist/owner-key.js.map +1 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.d.ts +8 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.d.ts.map +1 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.js +126 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.js.map +1 -0
- package/dist/persistence/catalog-repo.d.ts +77 -0
- package/dist/persistence/catalog-repo.d.ts.map +1 -0
- package/dist/persistence/catalog-repo.js +229 -0
- package/dist/persistence/catalog-repo.js.map +1 -0
- package/dist/persistence/schema.d.ts +249 -0
- package/dist/persistence/schema.d.ts.map +1 -0
- package/dist/persistence/schema.js +53 -0
- package/dist/persistence/schema.js.map +1 -0
- package/dist/persistence/session-payload.d.ts +96 -0
- package/dist/persistence/session-payload.d.ts.map +1 -0
- package/dist/persistence/session-payload.js +116 -0
- package/dist/persistence/session-payload.js.map +1 -0
- package/dist/persistence/session-replay.d.ts +15 -0
- package/dist/persistence/session-replay.d.ts.map +1 -0
- package/dist/persistence/session-replay.js +80 -0
- package/dist/persistence/session-replay.js.map +1 -0
- package/dist/pipeline/__tests__/assign-packages.test.d.ts +2 -0
- package/dist/pipeline/__tests__/assign-packages.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/assign-packages.test.js +88 -0
- package/dist/pipeline/__tests__/assign-packages.test.js.map +1 -0
- package/dist/pipeline/__tests__/constrain-edges.test.d.ts +2 -0
- package/dist/pipeline/__tests__/constrain-edges.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/constrain-edges.test.js +228 -0
- package/dist/pipeline/__tests__/constrain-edges.test.js.map +1 -0
- package/dist/pipeline/__tests__/features.test.d.ts +9 -0
- package/dist/pipeline/__tests__/features.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/features.test.js +458 -0
- package/dist/pipeline/__tests__/features.test.js.map +1 -0
- package/dist/pipeline/__tests__/indexes-imports.test.d.ts +2 -0
- package/dist/pipeline/__tests__/indexes-imports.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/indexes-imports.test.js +114 -0
- package/dist/pipeline/__tests__/indexes-imports.test.js.map +1 -0
- package/dist/pipeline/assign-packages.d.ts +18 -0
- package/dist/pipeline/assign-packages.d.ts.map +1 -0
- package/dist/pipeline/assign-packages.js +86 -0
- package/dist/pipeline/assign-packages.js.map +1 -0
- package/dist/pipeline/constrain-edges.d.ts +34 -0
- package/dist/pipeline/constrain-edges.d.ts.map +1 -0
- package/dist/pipeline/constrain-edges.js +139 -0
- package/dist/pipeline/constrain-edges.js.map +1 -0
- package/dist/pipeline/feature-deps.d.ts +19 -0
- package/dist/pipeline/feature-deps.d.ts.map +1 -0
- package/dist/pipeline/feature-deps.js +28 -0
- package/dist/pipeline/feature-deps.js.map +1 -0
- package/dist/pipeline/features.d.ts +50 -0
- package/dist/pipeline/features.d.ts.map +1 -0
- package/dist/pipeline/features.js +462 -0
- package/dist/pipeline/features.js.map +1 -0
- package/dist/pipeline/indexes.d.ts +27 -0
- package/dist/pipeline/indexes.d.ts.map +1 -0
- package/dist/pipeline/indexes.js +159 -0
- package/dist/pipeline/indexes.js.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts +5 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js +24 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js.map +1 -0
- package/dist/recipes/__tests__/registry.test.d.ts +7 -0
- package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/registry.test.js +34 -0
- package/dist/recipes/__tests__/registry.test.js.map +1 -0
- package/dist/recipes/__tests__/resolve.test.d.ts +10 -0
- package/dist/recipes/__tests__/resolve.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/resolve.test.js +38 -0
- package/dist/recipes/__tests__/resolve.test.js.map +1 -0
- package/dist/recipes/built-in-recipes.d.ts +26 -0
- package/dist/recipes/built-in-recipes.d.ts.map +1 -0
- package/dist/recipes/built-in-recipes.js +43 -0
- package/dist/recipes/built-in-recipes.js.map +1 -0
- package/dist/recipes/registry.d.ts +31 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +48 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/resolve.d.ts +31 -0
- package/dist/recipes/resolve.d.ts.map +1 -0
- package/dist/recipes/resolve.js +70 -0
- package/dist/recipes/resolve.js.map +1 -0
- package/dist/recipes/types.d.ts +58 -0
- package/dist/recipes/types.d.ts.map +1 -0
- package/dist/recipes/types.js +39 -0
- package/dist/recipes/types.js.map +1 -0
- package/dist/render/__tests__/catalog-json.test.d.ts +9 -0
- package/dist/render/__tests__/catalog-json.test.d.ts.map +1 -0
- package/dist/render/__tests__/catalog-json.test.js +132 -0
- package/dist/render/__tests__/catalog-json.test.js.map +1 -0
- package/dist/render/catalog-json-types.d.ts +114 -0
- package/dist/render/catalog-json-types.d.ts.map +1 -0
- package/dist/render/catalog-json-types.js +23 -0
- package/dist/render/catalog-json-types.js.map +1 -0
- package/dist/render/catalog-json.d.ts +43 -0
- package/dist/render/catalog-json.d.ts.map +1 -0
- package/dist/render/catalog-json.js +303 -0
- package/dist/render/catalog-json.js.map +1 -0
- package/dist/render/opensip-id-derivation.d.ts +73 -0
- package/dist/render/opensip-id-derivation.d.ts.map +1 -0
- package/dist/render/opensip-id-derivation.js +65 -0
- package/dist/render/opensip-id-derivation.js.map +1 -0
- package/dist/render/rule-id-mapping.d.ts +61 -0
- package/dist/render/rule-id-mapping.d.ts.map +1 -0
- package/dist/render/rule-id-mapping.js +82 -0
- package/dist/render/rule-id-mapping.js.map +1 -0
- package/dist/resolve-callee.d.ts +50 -0
- package/dist/resolve-callee.d.ts.map +1 -0
- package/dist/resolve-callee.js +80 -0
- package/dist/resolve-callee.js.map +1 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.d.ts +22 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.d.ts.map +1 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.js +143 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.js.map +1 -0
- package/dist/rules/__tests__/create-graph-signal.test.d.ts +8 -0
- package/dist/rules/__tests__/create-graph-signal.test.d.ts.map +1 -0
- package/dist/rules/__tests__/create-graph-signal.test.js +55 -0
- package/dist/rules/__tests__/create-graph-signal.test.js.map +1 -0
- package/dist/rules/__tests__/define-rule.test.d.ts +13 -0
- package/dist/rules/__tests__/define-rule.test.d.ts.map +1 -0
- package/dist/rules/__tests__/define-rule.test.js +102 -0
- package/dist/rules/__tests__/define-rule.test.js.map +1 -0
- package/dist/rules/__tests__/fingerprint-golden.test.d.ts +21 -0
- package/dist/rules/__tests__/fingerprint-golden.test.d.ts.map +1 -0
- package/dist/rules/__tests__/fingerprint-golden.test.js +69 -0
- package/dist/rules/__tests__/fingerprint-golden.test.js.map +1 -0
- package/dist/rules/__tests__/registry.test.d.ts +6 -0
- package/dist/rules/__tests__/registry.test.d.ts.map +1 -0
- package/dist/rules/__tests__/registry.test.js +37 -0
- package/dist/rules/__tests__/registry.test.js.map +1 -0
- package/dist/rules/__tests__/rule-behaviors.test.d.ts +9 -0
- package/dist/rules/__tests__/rule-behaviors.test.d.ts.map +1 -0
- package/dist/rules/__tests__/rule-behaviors.test.js +204 -0
- package/dist/rules/__tests__/rule-behaviors.test.js.map +1 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.d.ts +11 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.d.ts.map +1 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.js +55 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.js.map +1 -0
- package/dist/rules/_approximation.d.ts +23 -0
- package/dist/rules/_approximation.d.ts.map +1 -0
- package/dist/rules/_approximation.js +28 -0
- package/dist/rules/_approximation.js.map +1 -0
- package/dist/rules/_entry-points.d.ts +27 -0
- package/dist/rules/_entry-points.d.ts.map +1 -0
- package/dist/rules/_entry-points.js +81 -0
- package/dist/rules/_entry-points.js.map +1 -0
- package/dist/rules/_severity-override.d.ts +32 -0
- package/dist/rules/_severity-override.d.ts.map +1 -0
- package/dist/rules/_severity-override.js +33 -0
- package/dist/rules/_severity-override.js.map +1 -0
- package/dist/rules/always-throws-branch.d.ts +26 -0
- package/dist/rules/always-throws-branch.d.ts.map +1 -0
- package/dist/rules/always-throws-branch.js +66 -0
- package/dist/rules/always-throws-branch.js.map +1 -0
- package/dist/rules/create-graph-signal.d.ts +38 -0
- package/dist/rules/create-graph-signal.d.ts.map +1 -0
- package/dist/rules/create-graph-signal.js +35 -0
- package/dist/rules/create-graph-signal.js.map +1 -0
- package/dist/rules/cycle.d.ts +29 -0
- package/dist/rules/cycle.d.ts.map +1 -0
- package/dist/rules/cycle.js +166 -0
- package/dist/rules/cycle.js.map +1 -0
- package/dist/rules/cycle.memberlocations.test.d.ts +11 -0
- package/dist/rules/cycle.memberlocations.test.d.ts.map +1 -0
- package/dist/rules/cycle.memberlocations.test.js +84 -0
- package/dist/rules/cycle.memberlocations.test.js.map +1 -0
- package/dist/rules/define-rule.d.ts +67 -0
- package/dist/rules/define-rule.d.ts.map +1 -0
- package/dist/rules/define-rule.js +66 -0
- package/dist/rules/define-rule.js.map +1 -0
- package/dist/rules/duplicated-function-body.d.ts +40 -0
- package/dist/rules/duplicated-function-body.d.ts.map +1 -0
- package/dist/rules/duplicated-function-body.js +232 -0
- package/dist/rules/duplicated-function-body.js.map +1 -0
- package/dist/rules/high-blast-untested.d.ts +26 -0
- package/dist/rules/high-blast-untested.d.ts.map +1 -0
- package/dist/rules/high-blast-untested.js +82 -0
- package/dist/rules/high-blast-untested.js.map +1 -0
- package/dist/rules/large-function.d.ts +22 -0
- package/dist/rules/large-function.d.ts.map +1 -0
- package/dist/rules/large-function.js +72 -0
- package/dist/rules/large-function.js.map +1 -0
- package/dist/rules/no-side-effect-path.d.ts +31 -0
- package/dist/rules/no-side-effect-path.d.ts.map +1 -0
- package/dist/rules/no-side-effect-path.js +217 -0
- package/dist/rules/no-side-effect-path.js.map +1 -0
- package/dist/rules/orphan-subtree.d.ts +11 -0
- package/dist/rules/orphan-subtree.d.ts.map +1 -0
- package/dist/rules/orphan-subtree.js +104 -0
- package/dist/rules/orphan-subtree.js.map +1 -0
- package/dist/rules/registry.d.ts +35 -0
- package/dist/rules/registry.d.ts.map +1 -0
- package/dist/rules/registry.js +96 -0
- package/dist/rules/registry.js.map +1 -0
- package/dist/rules/test-only-reachable.d.ts +9 -0
- package/dist/rules/test-only-reachable.d.ts.map +1 -0
- package/dist/rules/test-only-reachable.js +101 -0
- package/dist/rules/test-only-reachable.js.map +1 -0
- package/dist/rules/unexpected-coupling.d.ts +29 -0
- package/dist/rules/unexpected-coupling.d.ts.map +1 -0
- package/dist/rules/unexpected-coupling.js +0 -0
- package/dist/rules/unexpected-coupling.js.map +1 -0
- package/dist/rules/wide-function.d.ts +18 -0
- package/dist/rules/wide-function.d.ts.map +1 -0
- package/dist/rules/wide-function.js +58 -0
- package/dist/rules/wide-function.js.map +1 -0
- package/dist/scope-augmentation.d.ts +58 -0
- package/dist/scope-augmentation.d.ts.map +1 -0
- package/dist/scope-augmentation.js +29 -0
- package/dist/scope-augmentation.js.map +1 -0
- package/dist/tool.d.ts +29 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +241 -0
- package/dist/tool.js.map +1 -0
- package/dist/types.d.ts +642 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +136 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphLanguageAdapter — the contract every language implements to
|
|
3
|
+
* participate in the graph tool.
|
|
4
|
+
*
|
|
5
|
+
* The interface signature below is the canonical source for adapter
|
|
6
|
+
* authors. Every adapter must satisfy the 9 contract invariants
|
|
7
|
+
* (I-1 through I-9) documented inline on each method.
|
|
8
|
+
*
|
|
9
|
+
* Six methods total:
|
|
10
|
+
* 1. discoverFiles — resolve which files belong to the project
|
|
11
|
+
* 2. parseProject — build adapter-internal parse state
|
|
12
|
+
* 3. walkProject — emit occurrences + located call-site records
|
|
13
|
+
* 4. resolveCallSites — produce CallEdge[] keyed by owner bodyHash
|
|
14
|
+
* 5. cacheKey — opaque per-adapter cache invalidation key
|
|
15
|
+
* 6. ruleHints — optional per-language rule-input hints
|
|
16
|
+
*/
|
|
17
|
+
import type { Catalog, CallEdge, CrossBoundaryCall, DependencyEdge, FunctionOccurrence, ParseError, ReExportRecord, ResolutionMode, ResolutionStats, RuleHints } from '../types.js';
|
|
18
|
+
/**
|
|
19
|
+
* Adapter-internal parse state. Opaque to the engine; the engine
|
|
20
|
+
* passes P from parseProject() back into walkProject() and
|
|
21
|
+
* resolveCallSites() unchanged. TypeScript holds a `ts.Program`;
|
|
22
|
+
* a tree-sitter adapter would hold a `Map<filePath, Tree>` plus a
|
|
23
|
+
* project-wide call-graph hint.
|
|
24
|
+
*
|
|
25
|
+
* Notation only — `ParsedProject` is the literal `unknown`. Adapter
|
|
26
|
+
* authors parameterize their `GraphLanguageAdapter<P>` with their
|
|
27
|
+
* concrete type (e.g. `TypescriptParsedProject`) and the engine
|
|
28
|
+
* sees `unknown` because it doesn't introspect.
|
|
29
|
+
*/
|
|
30
|
+
export type ParsedProject = unknown;
|
|
31
|
+
export interface DiscoverInput {
|
|
32
|
+
/** Absolute, realpath-normalized cwd. */
|
|
33
|
+
readonly cwd: string;
|
|
34
|
+
/** User-supplied --tsconfig (or analogue) override; optional. */
|
|
35
|
+
readonly configPathOverride?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DiscoverOutput {
|
|
38
|
+
/** The resolved project root (= cwd, normalized). */
|
|
39
|
+
readonly projectDirAbs: string;
|
|
40
|
+
/** Absolute, realpath-normalized, sorted, deduped file paths. */
|
|
41
|
+
readonly files: readonly string[];
|
|
42
|
+
/** Path to the language config file (tsconfig.json, pyproject.toml, etc.). */
|
|
43
|
+
readonly configPathAbs?: string;
|
|
44
|
+
/** Adapter-internal compiler options, threaded into parseProject. */
|
|
45
|
+
readonly compilerOptions?: unknown;
|
|
46
|
+
}
|
|
47
|
+
export interface ParseInput {
|
|
48
|
+
readonly projectDirAbs: string;
|
|
49
|
+
readonly files: readonly string[];
|
|
50
|
+
/**
|
|
51
|
+
* Absolute path to the language config file that anchored discovery
|
|
52
|
+
* (tsconfig.json, pyproject.toml, Cargo.toml, etc.). Optional —
|
|
53
|
+
* adapters that don't need a config-file anchor may ignore it.
|
|
54
|
+
*
|
|
55
|
+
* Threaded through DiscoverOutput so synthetic-partition discovery
|
|
56
|
+
* in flat monorepos can hand each partition's config to the parser
|
|
57
|
+
* (e.g. tsc's project-reference / rootDir resolution depends on
|
|
58
|
+
* knowing which tsconfig the program belongs to).
|
|
59
|
+
*/
|
|
60
|
+
readonly configPathAbs?: string;
|
|
61
|
+
readonly compilerOptions?: unknown;
|
|
62
|
+
/**
|
|
63
|
+
* The resolution tier the run was invoked with. The engine always
|
|
64
|
+
* supplies it (defaulting to `'exact'` at the CLI boundary). An
|
|
65
|
+
* adapter that only implements semantic parsing MAY ignore a `'fast'`
|
|
66
|
+
* value and behave as `'exact'` — the contract permits, but does not
|
|
67
|
+
* require, a per-adapter fast implementation.
|
|
68
|
+
*/
|
|
69
|
+
readonly resolutionMode: ResolutionMode;
|
|
70
|
+
}
|
|
71
|
+
export interface ParseOutput<P = ParsedProject> {
|
|
72
|
+
readonly project: P;
|
|
73
|
+
readonly parseErrors: readonly ParseError[];
|
|
74
|
+
}
|
|
75
|
+
export interface WalkInput<P = ParsedProject> {
|
|
76
|
+
readonly project: P;
|
|
77
|
+
readonly projectDirAbs: string;
|
|
78
|
+
readonly files: readonly string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* One call-site record emitted by walkProject. Opaque node + source
|
|
82
|
+
* handles flow back into resolveCallSites unchanged. The 'creation'
|
|
83
|
+
* kind is for parent → nested-callable creation edges (arrows,
|
|
84
|
+
* function-expressions, etc.); the resolver pass emits a static
|
|
85
|
+
* high-confidence edge without consulting any resolver.
|
|
86
|
+
*/
|
|
87
|
+
export interface CallSiteRecord {
|
|
88
|
+
/** Adapter handle to the AST node. */
|
|
89
|
+
readonly nodeRef: unknown;
|
|
90
|
+
/** Adapter handle to the source file containing the call. */
|
|
91
|
+
readonly sourceFileRef: unknown;
|
|
92
|
+
/** bodyHash of the enclosing function-shape. Always exists in WalkOutput.occurrences (I-3). */
|
|
93
|
+
readonly ownerHash: string;
|
|
94
|
+
/** 'call' dispatches to resolvers; 'creation' produces a static edge. */
|
|
95
|
+
readonly kind: 'call' | 'creation';
|
|
96
|
+
/** For 'creation' kind, the bodyHash of the nested callable. */
|
|
97
|
+
readonly childHash?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One module-level dependency site emitted by walkProject. Represents
|
|
101
|
+
* a single `import` / `from … import` / `require` / `use` statement.
|
|
102
|
+
* Resolved to bodyHashes by `resolveCallSites` (which returns
|
|
103
|
+
* `dependenciesByOwner` alongside the existing `edgesByOwner`).
|
|
104
|
+
*
|
|
105
|
+
* Phase 4 of opensip's substrate consolidation (DEC-498). Optional —
|
|
106
|
+
* adapters that don't emit dependency sites are not required to populate
|
|
107
|
+
* this shape; the engine treats absence as "no module-level edges
|
|
108
|
+
* available for this language."
|
|
109
|
+
*/
|
|
110
|
+
export interface DependencySiteRecord {
|
|
111
|
+
/** Adapter handle to the AST node (import/require/use statement). */
|
|
112
|
+
readonly nodeRef: unknown;
|
|
113
|
+
/** Adapter handle to the source file containing the import. */
|
|
114
|
+
readonly sourceFileRef: unknown;
|
|
115
|
+
/** bodyHash of the enclosing file's module-init occurrence. */
|
|
116
|
+
readonly ownerHash: string;
|
|
117
|
+
/** The raw import specifier — `'./foo'`, `'@opensip/core'`, etc. */
|
|
118
|
+
readonly specifier: string;
|
|
119
|
+
/** 1-based line of the import statement. */
|
|
120
|
+
readonly line: number;
|
|
121
|
+
/** 0-based column. */
|
|
122
|
+
readonly column: number;
|
|
123
|
+
}
|
|
124
|
+
export interface WalkOutput {
|
|
125
|
+
readonly occurrences: Record<string, FunctionOccurrence[]>;
|
|
126
|
+
readonly callSites: readonly CallSiteRecord[];
|
|
127
|
+
/** Optional — Phase 4 (DEC-498) addition. Adapters that emit
|
|
128
|
+
* module-level dependency edges populate this; others may omit. */
|
|
129
|
+
readonly dependencySites?: readonly DependencySiteRecord[];
|
|
130
|
+
/** Optional — re-export facts (see {@link ReExportRecord}). Adapters that
|
|
131
|
+
* resolve re-export chains populate this; others may omit. Carried onto the
|
|
132
|
+
* catalog so the engine's cross-shard export index can follow re-exports. */
|
|
133
|
+
readonly reExports?: readonly ReExportRecord[];
|
|
134
|
+
readonly parseErrors: readonly ParseError[];
|
|
135
|
+
}
|
|
136
|
+
export interface ResolveInput<P = ParsedProject> {
|
|
137
|
+
readonly project: P;
|
|
138
|
+
readonly catalog: Catalog;
|
|
139
|
+
readonly callSites: readonly CallSiteRecord[];
|
|
140
|
+
/** Optional — Phase 4 (DEC-498) addition. The engine threads any
|
|
141
|
+
* `dependencySites` returned from walkProject back into resolveCallSites
|
|
142
|
+
* so the resolver can produce module-level edges in the same pass as
|
|
143
|
+
* call resolution. */
|
|
144
|
+
readonly dependencySites?: readonly DependencySiteRecord[];
|
|
145
|
+
readonly projectDirAbs: string;
|
|
146
|
+
/**
|
|
147
|
+
* The resolution tier. `'exact'` runs the semantic, type-checker-backed
|
|
148
|
+
* resolvers; `'fast'` runs the syntactic resolver (name + import graph)
|
|
149
|
+
* and labels every edge `'syntactic'` with capped confidence. Adapters
|
|
150
|
+
* that only implement exact resolution may ignore a `'fast'` value.
|
|
151
|
+
*/
|
|
152
|
+
readonly resolutionMode: ResolutionMode;
|
|
153
|
+
/**
|
|
154
|
+
* Sharded-build flag (plan #2). When `true`, the adapter additionally
|
|
155
|
+
* emits a `CrossBoundaryCall` for every call site whose callee name is
|
|
156
|
+
* NOT among the shard's own occurrences — the candidates the cross-shard
|
|
157
|
+
* boundary pass re-resolves against the global catalog. Boundary
|
|
158
|
+
* detection is purely syntactic (name + import specifier), independent
|
|
159
|
+
* of `resolutionMode`. Adapters that don't implement it leave
|
|
160
|
+
* `boundaryCalls` undefined. Omitted/false in single-process builds.
|
|
161
|
+
*/
|
|
162
|
+
readonly emitBoundaryCalls?: boolean;
|
|
163
|
+
}
|
|
164
|
+
export interface ResolveOutput {
|
|
165
|
+
/** Map: owner bodyHash → CallEdges produced by resolution. */
|
|
166
|
+
readonly edgesByOwner: ReadonlyMap<string, readonly CallEdge[]>;
|
|
167
|
+
/**
|
|
168
|
+
* Optional — Phase 4 (DEC-498) addition. Map: module-init bodyHash →
|
|
169
|
+
* DependencyEdges produced by import-site resolution. Engine's
|
|
170
|
+
* stitchEdges merges these into `FunctionOccurrence.dependencies`.
|
|
171
|
+
* Adapters that don't resolve dependencies may omit.
|
|
172
|
+
*/
|
|
173
|
+
readonly dependenciesByOwner?: ReadonlyMap<string, readonly DependencyEdge[]>;
|
|
174
|
+
/**
|
|
175
|
+
* Sharded-build output (plan #2). Populated only when the input set
|
|
176
|
+
* `emitBoundaryCalls`: the call sites that didn't resolve within this
|
|
177
|
+
* shard's files, as plain descriptors the cross-shard pass re-resolves
|
|
178
|
+
* globally. Undefined when not requested or not implemented.
|
|
179
|
+
*/
|
|
180
|
+
readonly boundaryCalls?: readonly CrossBoundaryCall[];
|
|
181
|
+
readonly stats: ResolutionStats;
|
|
182
|
+
}
|
|
183
|
+
export interface CacheKeyInput {
|
|
184
|
+
readonly projectDirAbs: string;
|
|
185
|
+
readonly configPathAbs?: string;
|
|
186
|
+
readonly compilerOptions?: unknown;
|
|
187
|
+
/**
|
|
188
|
+
* The resolution tier. Adapters MUST fold this into the returned key so
|
|
189
|
+
* fast and exact catalogs never collide in the cache (a mode switch must
|
|
190
|
+
* be a cache miss against the other tier, not a wrong-tier reuse).
|
|
191
|
+
*/
|
|
192
|
+
readonly resolutionMode: ResolutionMode;
|
|
193
|
+
}
|
|
194
|
+
export type { RuleHints } from '../types.js';
|
|
195
|
+
export interface GraphLanguageAdapter<P = ParsedProject> {
|
|
196
|
+
/** Stable identifier. Stored in Catalog.language. */
|
|
197
|
+
readonly id: string;
|
|
198
|
+
/** Lowercase file extensions including the leading dot. */
|
|
199
|
+
readonly fileExtensions: readonly string[];
|
|
200
|
+
/** Optional human-readable name; defaults to id. */
|
|
201
|
+
readonly displayName?: string;
|
|
202
|
+
discoverFiles(input: DiscoverInput): DiscoverOutput;
|
|
203
|
+
parseProject(input: ParseInput): ParseOutput<P>;
|
|
204
|
+
walkProject(input: WalkInput<P>): WalkOutput;
|
|
205
|
+
/**
|
|
206
|
+
* Resolve call sites to edges. May return synchronously OR a Promise: the
|
|
207
|
+
* resolve stage is a tool's heaviest loop (tens of thousands of call sites),
|
|
208
|
+
* so an adapter MAY run it cooperatively — yielding to the event loop every N
|
|
209
|
+
* sites — so the live view's spinner animates instead of freezing for the
|
|
210
|
+
* stage's whole duration (ADR-0016). The orchestrator always `await`s the
|
|
211
|
+
* result, so sync adapters are unaffected.
|
|
212
|
+
*/
|
|
213
|
+
resolveCallSites(input: ResolveInput<P>): ResolveOutput | Promise<ResolveOutput>;
|
|
214
|
+
cacheKey(input: CacheKeyInput): string;
|
|
215
|
+
readonly ruleHints?: RuleHints;
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lang-adapter/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACV,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAIpC,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,qEAAqE;IACrE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAID,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,aAAa,EAAE,M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,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;CACjC;AAID,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAQD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,aAAa;IACrD,qDAAqD;IACrD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,oDAAoD;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAAC;IACpD,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAChD,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;IAC7C;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACjF,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAC;IAEvC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphLanguageAdapter — the contract every language implements to
|
|
3
|
+
* participate in the graph tool.
|
|
4
|
+
*
|
|
5
|
+
* The interface signature below is the canonical source for adapter
|
|
6
|
+
* authors. Every adapter must satisfy the 9 contract invariants
|
|
7
|
+
* (I-1 through I-9) documented inline on each method.
|
|
8
|
+
*
|
|
9
|
+
* Six methods total:
|
|
10
|
+
* 1. discoverFiles — resolve which files belong to the project
|
|
11
|
+
* 2. parseProject — build adapter-internal parse state
|
|
12
|
+
* 3. walkProject — emit occurrences + located call-site records
|
|
13
|
+
* 4. resolveCallSites — produce CallEdge[] keyed by owner bodyHash
|
|
14
|
+
* 5. cacheKey — opaque per-adapter cache invalidation key
|
|
15
|
+
* 6. ruleHints — optional per-language rule-input hints
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lang-adapter/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-owner key.
|
|
3
|
+
*
|
|
4
|
+
* Call/dependency edges are bucketed by their owning occurrence while edges are
|
|
5
|
+
* resolved, then stitched back onto occurrences. The owner cannot be keyed by
|
|
6
|
+
* `bodyHash` alone: two functions with identical bodies in different files
|
|
7
|
+
* (e.g. `stripStrings` duplicated across the language adapters) share a hash,
|
|
8
|
+
* so a hash-keyed bucket unions their edges — each twin then appears to call
|
|
9
|
+
* every twin's callees, inventing cross-package coupling. Keying by
|
|
10
|
+
* `(bodyHash, filePath)` keeps each occurrence's edges its own.
|
|
11
|
+
*
|
|
12
|
+
* The `filePath` component must be byte-identical to `FunctionOccurrence.filePath`
|
|
13
|
+
* (project-relative, as the walk emits it) so the stitch lookup hits. The NUL
|
|
14
|
+
* separator never appears in a body hash (hex) or a file path.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The per-occurrence key edges are bucketed under: `bodyHash` joined with the
|
|
18
|
+
* occurrence's project-relative `filePath` by a NUL separator. Distinguishes
|
|
19
|
+
* body-twins (identical bodies in different files) so their edges aren't unioned.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ownerEdgeKey(bodyHash: string, filePath: string): string;
|
|
22
|
+
//# sourceMappingURL=owner-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-key.d.ts","sourceRoot":"","sources":["../src/owner-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-owner key.
|
|
3
|
+
*
|
|
4
|
+
* Call/dependency edges are bucketed by their owning occurrence while edges are
|
|
5
|
+
* resolved, then stitched back onto occurrences. The owner cannot be keyed by
|
|
6
|
+
* `bodyHash` alone: two functions with identical bodies in different files
|
|
7
|
+
* (e.g. `stripStrings` duplicated across the language adapters) share a hash,
|
|
8
|
+
* so a hash-keyed bucket unions their edges — each twin then appears to call
|
|
9
|
+
* every twin's callees, inventing cross-package coupling. Keying by
|
|
10
|
+
* `(bodyHash, filePath)` keeps each occurrence's edges its own.
|
|
11
|
+
*
|
|
12
|
+
* The `filePath` component must be byte-identical to `FunctionOccurrence.filePath`
|
|
13
|
+
* (project-relative, as the walk emits it) so the stitch lookup hits. The NUL
|
|
14
|
+
* separator never appears in a body hash (hex) or a file path.
|
|
15
|
+
*/
|
|
16
|
+
const SEP = String.fromCodePoint(0);
|
|
17
|
+
/**
|
|
18
|
+
* The per-occurrence key edges are bucketed under: `bodyHash` joined with the
|
|
19
|
+
* occurrence's project-relative `filePath` by a NUL separator. Distinguishes
|
|
20
|
+
* body-twins (identical bodies in different files) so their edges aren't unioned.
|
|
21
|
+
*/
|
|
22
|
+
export function ownerEdgeKey(bodyHash, filePath) {
|
|
23
|
+
return bodyHash + SEP + filePath;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=owner-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-key.js","sourceRoot":"","sources":["../src/owner-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,QAAgB;IAC7D,OAAO,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-shard fragment cache (CatalogRepo) + the incremental shard-work
|
|
3
|
+
* planner. A fragment is reusable only when both its cache key and files
|
|
4
|
+
* fingerprint match; planShardWork partitions shards into reuse vs rebuild
|
|
5
|
+
* accordingly — the incremental-parse fix's decision point.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=shard-fragment-cache.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shard-fragment-cache.test.d.ts","sourceRoot":"","sources":["../../../src/persistence/__tests__/shard-fragment-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-shard fragment cache (CatalogRepo) + the incremental shard-work
|
|
3
|
+
* planner. A fragment is reusable only when both its cache key and files
|
|
4
|
+
* fingerprint match; planShardWork partitions shards into reuse vs rebuild
|
|
5
|
+
* accordingly — the incremental-parse fix's decision point.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { tmpdir } from 'node:os';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
import { DataStoreFactory } from '@opensip-cli/datastore';
|
|
11
|
+
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
12
|
+
import { stampEngineVersion } from '../../cache/engine-version.js';
|
|
13
|
+
import { computeFilesFingerprint } from '../../cache/invalidate.js';
|
|
14
|
+
import { planShardWork } from '../../cli/orchestrate/shard-runner.js';
|
|
15
|
+
import { CatalogRepo } from '../catalog-repo.js';
|
|
16
|
+
function result(shardId, cacheKey, fingerprint) {
|
|
17
|
+
return {
|
|
18
|
+
shardId,
|
|
19
|
+
fragment: {
|
|
20
|
+
version: '3.0',
|
|
21
|
+
tool: 'graph',
|
|
22
|
+
language: 'typescript',
|
|
23
|
+
builtAt: 'x',
|
|
24
|
+
cacheKey,
|
|
25
|
+
resolutionMode: 'exact',
|
|
26
|
+
functions: {},
|
|
27
|
+
},
|
|
28
|
+
fingerprint,
|
|
29
|
+
boundaryCalls: [],
|
|
30
|
+
parseErrors: [],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
describe('CatalogRepo shard-fragment cache', () => {
|
|
34
|
+
let datastore;
|
|
35
|
+
let repo;
|
|
36
|
+
beforeEach(() => {
|
|
37
|
+
datastore = DataStoreFactory.open({ backend: 'memory' });
|
|
38
|
+
repo = new CatalogRepo(datastore);
|
|
39
|
+
});
|
|
40
|
+
afterEach(() => {
|
|
41
|
+
datastore.close?.();
|
|
42
|
+
});
|
|
43
|
+
it('round-trips a fragment and validates on matching key + fingerprint', () => {
|
|
44
|
+
repo.upsertShardFragment(result('pkg:a', 'key-1', 'fp-1'));
|
|
45
|
+
expect(repo.loadValidShardFragment('pkg:a', 'key-1', 'fp-1')).not.toBeNull();
|
|
46
|
+
});
|
|
47
|
+
it('returns null on a stale fingerprint or a stale cache key', () => {
|
|
48
|
+
repo.upsertShardFragment(result('pkg:a', 'key-1', 'fp-1'));
|
|
49
|
+
expect(repo.loadValidShardFragment('pkg:a', 'key-1', 'fp-CHANGED')).toBeNull();
|
|
50
|
+
expect(repo.loadValidShardFragment('pkg:a', 'key-CHANGED', 'fp-1')).toBeNull();
|
|
51
|
+
});
|
|
52
|
+
it('returns null for an unknown shard', () => {
|
|
53
|
+
expect(repo.loadValidShardFragment('pkg:missing', 'k', 'f')).toBeNull();
|
|
54
|
+
});
|
|
55
|
+
it('upsert replaces a prior row for the same shard', () => {
|
|
56
|
+
repo.upsertShardFragment(result('pkg:a', 'key-1', 'fp-1'));
|
|
57
|
+
repo.upsertShardFragment(result('pkg:a', 'key-2', 'fp-2'));
|
|
58
|
+
expect(repo.loadValidShardFragment('pkg:a', 'key-1', 'fp-1')).toBeNull();
|
|
59
|
+
expect(repo.loadValidShardFragment('pkg:a', 'key-2', 'fp-2')).not.toBeNull();
|
|
60
|
+
});
|
|
61
|
+
it('prunes fragments for shards no longer present', () => {
|
|
62
|
+
repo.upsertShardFragment(result('pkg:a', 'k', 'f'));
|
|
63
|
+
repo.upsertShardFragment(result('pkg:b', 'k', 'f'));
|
|
64
|
+
repo.pruneShardFragmentsExcept(['pkg:b']);
|
|
65
|
+
expect(repo.loadValidShardFragment('pkg:a', 'k', 'f')).toBeNull();
|
|
66
|
+
expect(repo.loadValidShardFragment('pkg:b', 'k', 'f')).not.toBeNull();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
describe('planShardWork', () => {
|
|
70
|
+
let dir;
|
|
71
|
+
let datastore;
|
|
72
|
+
let repo;
|
|
73
|
+
// A stub adapter whose cacheKey is a stable function of its config path —
|
|
74
|
+
// enough to drive the planner without a real TypeScript build.
|
|
75
|
+
const adapter = {
|
|
76
|
+
cacheKey: (input) => `key-${input.configPathAbs ?? 'none'}-${input.resolutionMode}`,
|
|
77
|
+
};
|
|
78
|
+
beforeEach(() => {
|
|
79
|
+
dir = mkdtempSync(join(tmpdir(), 'shard-plan-'));
|
|
80
|
+
datastore = DataStoreFactory.open({ backend: 'memory' });
|
|
81
|
+
repo = new CatalogRepo(datastore);
|
|
82
|
+
});
|
|
83
|
+
afterEach(() => {
|
|
84
|
+
datastore.close?.();
|
|
85
|
+
rmSync(dir, { recursive: true, force: true });
|
|
86
|
+
});
|
|
87
|
+
function shard(id) {
|
|
88
|
+
const file = join(dir, `${id}.ts`);
|
|
89
|
+
writeFileSync(file, 'export const x = 1;\n', 'utf8');
|
|
90
|
+
return { id, rootDir: dir, files: [file], configPathAbs: join(dir, `${id}.tsconfig`) };
|
|
91
|
+
}
|
|
92
|
+
it('rebuilds every shard when the cache is empty', () => {
|
|
93
|
+
const shards = [shard('a'), shard('b')];
|
|
94
|
+
const plan = planShardWork(shards, repo, adapter, 'exact', true);
|
|
95
|
+
expect(plan.cached).toHaveLength(0);
|
|
96
|
+
expect(plan.toBuild).toHaveLength(2);
|
|
97
|
+
});
|
|
98
|
+
it('reuses an unchanged shard and rebuilds only the changed one', () => {
|
|
99
|
+
const a = shard('a');
|
|
100
|
+
const b = shard('b');
|
|
101
|
+
// Seed both with a fragment whose key+fingerprint match the current files.
|
|
102
|
+
for (const s of [a, b]) {
|
|
103
|
+
// planShardWork stamps the engine version + `mode=sharded` onto the
|
|
104
|
+
// comparison key, so the seeded fragment must carry the same stamp (in
|
|
105
|
+
// production the worker stamps via assembleCatalog with engineMode:
|
|
106
|
+
// 'sharded'). ADR-0015 / ADR-0031.
|
|
107
|
+
const key = stampEngineVersion(adapter.cacheKey({
|
|
108
|
+
projectDirAbs: s.rootDir,
|
|
109
|
+
configPathAbs: s.configPathAbs,
|
|
110
|
+
resolutionMode: 'exact',
|
|
111
|
+
}), 'sharded');
|
|
112
|
+
const fp = computeFilesFingerprint(s.files);
|
|
113
|
+
repo.upsertShardFragment(result(s.id, key, fp));
|
|
114
|
+
}
|
|
115
|
+
// Change shard b's file so its fingerprint no longer matches.
|
|
116
|
+
writeFileSync(b.files[0], 'export const x = 2; export const y = 3;\n', 'utf8');
|
|
117
|
+
const plan = planShardWork([a, b], repo, adapter, 'exact', true);
|
|
118
|
+
expect(plan.cached.map((r) => r.shardId)).toEqual(['a']);
|
|
119
|
+
expect(plan.toBuild.map((s) => s.id)).toEqual(['b']);
|
|
120
|
+
});
|
|
121
|
+
it('rebuilds everything when useCache is false', () => {
|
|
122
|
+
const plan = planShardWork([shard('a')], repo, adapter, 'exact', false);
|
|
123
|
+
expect(plan.toBuild).toHaveLength(1);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=shard-fragment-cache.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shard-fragment-cache.test.js","sourceRoot":"","sources":["../../../src/persistence/__tests__/shard-fragment-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAkB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,SAAS,MAAM,CAAC,OAAe,EAAE,QAAgB,EAAE,WAAmB;IACpE,OAAO;QACL,OAAO;QACP,QAAQ,EAAE;YACR,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,GAAG;YACZ,QAAQ;YACR,cAAc,EAAE,OAAO;YACvB,SAAS,EAAE,EAAE;SACd;QACD,WAAW;QACX,aAAa,EAAE,EAAE;QACjB,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,kCAAkC,EAAE,GAAG,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,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CatalogRepo — SQLite-backed graph catalog at parity with v1's
|
|
3
|
+
* single-JSON-file shape.
|
|
4
|
+
*
|
|
5
|
+
* v1 stored the catalog as `<runtime>/cache/graph/catalog.json`. v2
|
|
6
|
+
* stores it in `graph_catalog` row 1, lifting the cache-validity
|
|
7
|
+
* fields (language, cacheKey, filesFingerprint) into typed columns so
|
|
8
|
+
* the orchestrator can fingerprint-mismatch without parsing the full
|
|
9
|
+
* payload. The catalog perf follow-up plan normalizes the payload
|
|
10
|
+
* into per-function/occurrence/edge tables and pushes dashboard view
|
|
11
|
+
* derivations into SQL.
|
|
12
|
+
*/
|
|
13
|
+
import { type DataStore } from '@opensip-cli/datastore';
|
|
14
|
+
import type { ShardBuildResult } from '../cli/orchestrate/shard-model.js';
|
|
15
|
+
import type { Catalog } from '../types.js';
|
|
16
|
+
import type { GraphCatalog } from '@opensip-cli/contracts';
|
|
17
|
+
/**
|
|
18
|
+
* SQLite/Drizzle-backed repository for the graph catalog and its per-shard
|
|
19
|
+
* fragments. Owns the `graph_catalog` row plus the `graph_shard_fragment`
|
|
20
|
+
* table; all reads/writes are synchronous (better-sqlite3). The orchestrator
|
|
21
|
+
* uses it to persist whole catalogs and incremental shard fragments, and to
|
|
22
|
+
* fingerprint-match for cache validity without parsing the full payload.
|
|
23
|
+
*/
|
|
24
|
+
export declare class CatalogRepo {
|
|
25
|
+
private readonly datastore;
|
|
26
|
+
constructor(datastore: DataStore);
|
|
27
|
+
/**
|
|
28
|
+
* Replace the catalog with a fresh value. Mirrors v1's atomic
|
|
29
|
+
* tmp-file + rename write — the upsert is a single statement, and
|
|
30
|
+
* SQLite's transaction semantics guarantee no torn reads.
|
|
31
|
+
*/
|
|
32
|
+
replaceAll(catalog: Catalog): void;
|
|
33
|
+
/**
|
|
34
|
+
* Load the full catalog. Returns `null` on cache miss (no row).
|
|
35
|
+
* Reconstructs the legacy `Catalog` shape from the JSON payload at
|
|
36
|
+
* parity — view derivations under
|
|
37
|
+
* `packages/contracts/src/persistence/dashboard/code-paths/` consume
|
|
38
|
+
* the same shape they always have.
|
|
39
|
+
*/
|
|
40
|
+
loadFullCatalog(): Catalog | null;
|
|
41
|
+
/**
|
|
42
|
+
* Read the catalog as the cross-tool {@link GraphCatalog} contract —
|
|
43
|
+
* the shape the report renderer and graph contribution depend on.
|
|
44
|
+
* This is the supported cross-tool read path: it lets fitness drop its
|
|
45
|
+
* raw-SQL `SELECT … FROM graph_catalog` (audit 2026-05-29, H1). The
|
|
46
|
+
* internal `Catalog` is structurally assignable to the GraphCatalog
|
|
47
|
+
* contract, so this is a plain widening — no cast — verified by the
|
|
48
|
+
* compiler at this boundary, where graph owns both types.
|
|
49
|
+
*/
|
|
50
|
+
loadCatalogContract(): GraphCatalog | null;
|
|
51
|
+
/**
|
|
52
|
+
* True iff a catalog row exists. Used by the orchestrator to short-
|
|
53
|
+
* circuit fingerprint mismatch checks when nothing is cached.
|
|
54
|
+
*/
|
|
55
|
+
hasAnyCatalog(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Persist one shard's `ShardBuildResult`, replacing any prior row for
|
|
58
|
+
* the same shard id. The validity keys (`cache_key`, `shard_fingerprint`)
|
|
59
|
+
* are lifted from the result so a reuse check needs no payload parse.
|
|
60
|
+
*/
|
|
61
|
+
upsertShardFragment(result: ShardBuildResult): void;
|
|
62
|
+
/**
|
|
63
|
+
* Load a shard fragment ONLY if it is still valid — both the shard's
|
|
64
|
+
* cache key (tsconfig/version/mode) and its files fingerprint must match
|
|
65
|
+
* the current run. Returns `null` on miss or staleness, signalling the
|
|
66
|
+
* orchestrator to re-run that shard's worker. No parse happens here
|
|
67
|
+
* beyond the JSON payload of a single valid shard.
|
|
68
|
+
*/
|
|
69
|
+
loadValidShardFragment(shardId: string, expectedCacheKey: string, expectedFingerprint: string): ShardBuildResult | null;
|
|
70
|
+
/**
|
|
71
|
+
* Drop fragment rows for shards no longer present in the current build
|
|
72
|
+
* (e.g. a package was removed). Keeps the per-shard cache from
|
|
73
|
+
* accumulating stale rows. No-op when `keepShardIds` is empty.
|
|
74
|
+
*/
|
|
75
|
+
pruneShardFragmentsExcept(keepShardIds: readonly string[]): void;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=catalog-repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-repo.d.ts","sourceRoot":"","sources":["../../src/persistence/catalog-repo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAkC3D;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;gBAEjC,SAAS,EAAE,SAAS;IAIhC;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAyDlC;;;;;;OAMG;IACH,eAAe,IAAI,OAAO,GAAG,IAAI;IA8CjC;;;;;;;;OAQG;IACH,mBAAmB,IAAI,YAAY,GAAG,IAAI;IAI1C;;;OAGG;IACH,aAAa,IAAI,OAAO;IAOxB;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAsBnD;;;;;;OAMG;IACH,sBAAsB,CACpB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,EAAE,MAAM,GAC1B,gBAAgB,GAAG,IAAI;IAa1B;;;;OAIG;IACH,yBAAyB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;CAUjE"}
|