kibi-cli 2.3.0 → 2.5.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/dist/cli-json-command.d.ts +6 -0
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +39 -11
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +7 -0
- package/dist/cli-operation-metadata.d.ts +13 -5
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +15 -5
- package/dist/cli-protocol.d.ts +14 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +31 -2
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +7 -0
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +13 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +11 -2
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +8 -2
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +4 -2
- package/dist/commands/gc.d.ts.map +1 -1
- package/dist/commands/gc.js +7 -0
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +0 -1
- package/dist/commands/merge-driver.d.ts +31 -0
- package/dist/commands/merge-driver.d.ts.map +1 -0
- package/dist/commands/merge-driver.js +268 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +281 -14
- package/dist/commands/proof-compact.d.ts +9 -0
- package/dist/commands/proof-compact.d.ts.map +1 -0
- package/dist/commands/proof-compact.js +58 -0
- package/dist/commands/prove.d.ts +38 -0
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +222 -47
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +61 -16
- package/dist/commands/sync.d.ts +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +42 -16
- package/dist/diagnostics.js +1 -1
- package/dist/engine-limits.d.ts +74 -0
- package/dist/engine-limits.d.ts.map +1 -0
- package/dist/engine-limits.js +201 -0
- package/dist/engine.d.ts +10 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +57 -9
- package/dist/extractors/manifest.d.ts +8 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +34 -5
- package/dist/extractors/markdown.d.ts +8 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +57 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +2 -0
- package/dist/intent-search.d.ts +4 -1
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +186 -33
- package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidate-helpers.js +8 -1
- package/dist/operations/bootstrap/candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.js +55 -39
- package/dist/operations/bootstrap/discovery.js +1 -1
- package/dist/operations/bootstrap/generate.d.ts +2 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +107 -37
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +3 -0
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +7 -1
- package/dist/operations/bootstrap/intent-claims.d.ts +17 -0
- package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -0
- package/dist/operations/bootstrap/intent-claims.js +103 -0
- package/dist/operations/bootstrap/markdown-candidates.d.ts +2 -0
- package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/markdown-candidates.js +32 -10
- package/dist/operations/bootstrap/presentation.d.ts +2 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +66 -3
- package/dist/operations/bootstrap/requirement-claims.d.ts +1 -0
- package/dist/operations/bootstrap/requirement-claims.d.ts.map +1 -1
- package/dist/operations/bootstrap/requirement-claims.js +13 -1
- package/dist/operations/bootstrap/types.d.ts +28 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/bootstrap/types.js +16 -0
- package/dist/operations/bootstrap/validation.d.ts +4 -0
- package/dist/operations/bootstrap/validation.d.ts.map +1 -0
- package/dist/operations/bootstrap/validation.js +20 -0
- package/dist/operations/migration/inventory-rederive.d.ts +81 -0
- package/dist/operations/migration/inventory-rederive.d.ts.map +1 -0
- package/dist/operations/migration/inventory-rederive.js +484 -0
- package/dist/operations/migration/kb-sources.d.ts +53 -0
- package/dist/operations/migration/kb-sources.d.ts.map +1 -0
- package/dist/operations/migration/kb-sources.js +233 -0
- package/dist/operations/migration/origin-backfill.d.ts +39 -0
- package/dist/operations/migration/origin-backfill.d.ts.map +1 -0
- package/dist/operations/migration/origin-backfill.js +164 -0
- package/dist/operations/migration/polarity-values.d.ts +10 -0
- package/dist/operations/migration/polarity-values.d.ts.map +1 -0
- package/dist/operations/migration/polarity-values.js +60 -0
- package/dist/operations/migration/schema6.d.ts +59 -0
- package/dist/operations/migration/schema6.d.ts.map +1 -0
- package/dist/operations/migration/schema6.js +379 -0
- package/dist/operations/migration/source-paths.d.ts +131 -0
- package/dist/operations/migration/source-paths.d.ts.map +1 -0
- package/dist/operations/migration/source-paths.js +308 -0
- package/dist/operations/migration/superseded-closure.d.ts +54 -0
- package/dist/operations/migration/superseded-closure.d.ts.map +1 -0
- package/dist/operations/migration/superseded-closure.js +187 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
- package/dist/operations/modeling/logic-modeling.js +3 -5
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +225 -67
- package/dist/operations/mutation/contradictions.d.ts +16 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +32 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +15 -7
- package/dist/operations/mutation/origin.d.ts +21 -0
- package/dist/operations/mutation/origin.d.ts.map +1 -0
- package/dist/operations/mutation/origin.js +78 -0
- package/dist/operations/mutation/plan-apply-journal.d.ts +182 -0
- package/dist/operations/mutation/plan-apply-journal.d.ts.map +1 -0
- package/dist/operations/mutation/plan-apply-journal.js +613 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +3 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.js +13 -2
- package/dist/operations/mutation/relationships.d.ts +5 -5
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +31 -11
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -1
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +7 -1
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +4 -1
- package/dist/operations/mutation/types.d.ts +14 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +30 -3
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +105 -35
- package/dist/operations/mutation/validate-upsert.d.ts +6 -0
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +34 -30
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +751 -144
- package/dist/operations/planning/compile-intent.d.ts +34 -1
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +314 -98
- package/dist/operations/proof/code-scope.d.ts +28 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -1
- package/dist/operations/proof/code-scope.js +72 -0
- package/dist/operations/proof/compact-receipts.d.ts +49 -0
- package/dist/operations/proof/compact-receipts.d.ts.map +1 -0
- package/dist/operations/proof/compact-receipts.js +160 -0
- package/dist/operations/proof/ingest-proof.d.ts +2 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +44 -23
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +5 -9
- package/dist/operations/proof/receipt-compaction.d.ts +48 -0
- package/dist/operations/proof/receipt-compaction.d.ts.map +1 -0
- package/dist/operations/proof/receipt-compaction.js +121 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +12 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +2 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +51 -5
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +11 -1
- package/dist/operations/semantic-advisor/conditional-rules.d.ts +33 -0
- package/dist/operations/semantic-advisor/conditional-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/conditional-rules.js +262 -0
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts +3 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +14 -6
- package/dist/operations/semantic-advisor/plugin-orchestration.js +1 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -1
- package/dist/prolog.d.ts +9 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +56 -10
- package/dist/proof/command-test-report.d.ts +74 -0
- package/dist/proof/command-test-report.d.ts.map +1 -0
- package/dist/proof/command-test-report.js +206 -0
- package/dist/public/branch-resolver.d.ts +1 -0
- package/dist/public/branch-resolver.d.ts.map +1 -1
- package/dist/public/branch-resolver.js +1 -0
- package/dist/public/diagnostic-usage.d.ts +14 -0
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +55 -1
- package/dist/public/entity-origin.d.ts +69 -0
- package/dist/public/entity-origin.d.ts.map +1 -0
- package/dist/public/entity-origin.js +142 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +1 -0
- package/dist/public/impact/requirement-quality.js +1 -1
- package/dist/public/operations/catalog.d.ts +203 -20
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +3 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +8 -0
- package/dist/public/operations/contracts.d.ts +0 -5
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +63 -14
- package/dist/public/operations/discovery-entities.d.ts +15 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +59 -0
- package/dist/public/operations/discovery-executors.d.ts +6 -1
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +65 -6
- package/dist/public/operations/index.d.ts +1 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +1 -0
- package/dist/public/operations/migration-plan.d.ts +5 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +26 -1
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +24 -3
- package/dist/public/operations/origin-review.d.ts +51 -0
- package/dist/public/operations/origin-review.d.ts.map +1 -0
- package/dist/public/operations/origin-review.js +307 -0
- package/dist/public/operations/predicate-schema-conformance.js +1 -1
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +4 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +17 -5
- package/dist/public/operations/runtime-types.d.ts +9 -0
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/schema6-check-actions.d.ts +127 -0
- package/dist/public/operations/schema6-check-actions.d.ts.map +1 -0
- package/dist/public/operations/schema6-check-actions.js +575 -0
- package/dist/public/operations/source-path-dangling.d.ts +17 -0
- package/dist/public/operations/source-path-dangling.d.ts.map +1 -0
- package/dist/public/operations/source-path-dangling.js +66 -0
- package/dist/public/operations/specs/bootstrap.d.ts +73 -1
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -1
- package/dist/public/operations/specs/bootstrap.js +66 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +15 -1
- package/dist/public/operations/specs/check.d.ts +2 -2
- package/dist/public/operations/specs/check.js +1 -1
- package/dist/public/operations/specs/composite.d.ts +351 -0
- package/dist/public/operations/specs/composite.d.ts.map +1 -0
- package/dist/public/operations/specs/composite.js +96 -0
- package/dist/public/operations/specs/discovery.d.ts +8 -3
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +8 -3
- package/dist/public/operations/specs/modeling.d.ts +2 -2
- package/dist/public/operations/specs/modeling.js +2 -2
- package/dist/public/operations/specs/mutation-schemas.d.ts +73 -8
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +43 -7
- package/dist/public/operations/specs/mutation.d.ts +1 -1
- package/dist/public/operations/specs/mutation.js +1 -1
- package/dist/public/operations/specs/planning.d.ts +2 -2
- package/dist/public/operations/specs/planning.js +4 -4
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +13 -26
- package/dist/public/operations/specs/upsert.d.ts +79 -9
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +6 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +3 -1
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-receipt.d.ts +1 -0
- package/dist/public/proof-receipt.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +52 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +2 -0
- package/dist/public/skills/kibi-bootstrap/SKILL.md +52 -11
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +12 -1
- package/dist/public/skills/kibi-usage/SKILL.md +82 -18
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/dist/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/dist/public/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/dist/public/skills/kibi-usage/resources/operation-access.md +29 -1
- package/dist/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/dist/public/skills/kibi-usage/resources/workflows.md +42 -25
- package/dist/public/telemetry-acceptance.d.ts +64 -0
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +143 -7
- package/dist/public/telemetry-remediation.d.ts.map +1 -1
- package/dist/public/telemetry-remediation.js +26 -10
- package/dist/relationships/shards.d.ts +13 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +54 -28
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +44 -3
- package/dist/runtime/detached-snapshot.d.ts +38 -0
- package/dist/runtime/detached-snapshot.d.ts.map +1 -0
- package/dist/runtime/detached-snapshot.js +92 -0
- package/dist/schemas/entity.schema.json +122 -0
- package/dist/search-answer.d.ts +157 -0
- package/dist/search-answer.d.ts.map +1 -0
- package/dist/search-answer.js +846 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +7 -0
- package/dist/traceability/symbol-extract.js +3 -3
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +12 -0
- package/dist/types/entities.d.ts +13 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +37 -1
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +130 -3
- package/dist/utils/repo-relative-path.d.ts +18 -0
- package/dist/utils/repo-relative-path.d.ts.map +1 -0
- package/dist/utils/repo-relative-path.js +58 -0
- package/dist/utils/rule-registry.generated.d.ts +75 -3
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +89 -3
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +4 -3
- package/dist/utils/strict-modeling.d.ts +1 -1
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +23 -3
- package/package.json +3 -3
- package/schema/entities.pl +22 -0
- package/schema/relationships.pl +14 -0
- package/schema/validation.pl +45 -1
- package/src/public/branch-resolver.ts +1 -0
- package/src/public/diagnostic-usage.ts +59 -1
- package/src/public/entity-origin.ts +175 -0
- package/src/public/impact/full-kb-quality.ts +1 -0
- package/src/public/impact/requirement-quality.ts +1 -1
- package/src/public/operations/catalog.ts +3 -0
- package/src/public/operations/check-executor.ts +15 -0
- package/src/public/operations/contracts.ts +75 -15
- package/src/public/operations/discovery-entities.ts +74 -0
- package/src/public/operations/discovery-executors.ts +88 -10
- package/src/public/operations/index.ts +1 -0
- package/src/public/operations/migration-plan.ts +30 -1
- package/src/public/operations/node-ports.ts +24 -3
- package/src/public/operations/origin-review.ts +375 -0
- package/src/public/operations/predicate-schema-conformance.ts +1 -1
- package/src/public/operations/repair-plan.ts +4 -0
- package/src/public/operations/result-envelope.ts +18 -6
- package/src/public/operations/runtime-types.ts +9 -0
- package/src/public/operations/schema6-check-actions.ts +699 -0
- package/src/public/operations/source-path-dangling.ts +81 -0
- package/src/public/operations/specs/bootstrap.ts +78 -4
- package/src/public/operations/specs/check-rules.generated.ts +15 -1
- package/src/public/operations/specs/check.ts +1 -1
- package/src/public/operations/specs/composite.ts +141 -0
- package/src/public/operations/specs/discovery.ts +9 -3
- package/src/public/operations/specs/modeling.ts +2 -2
- package/src/public/operations/specs/mutation-schemas.ts +49 -7
- package/src/public/operations/specs/mutation.ts +1 -1
- package/src/public/operations/specs/planning.ts +4 -4
- package/src/public/operations/specs/reporting.ts +13 -38
- package/src/public/operations/specs/upsert.ts +7 -1
- package/src/public/operations/symbol-repair-plan.ts +3 -1
- package/src/public/operations/types.ts +2 -0
- package/src/public/proof-receipt.ts +1 -0
- package/src/public/schemas/entity.ts +57 -0
- package/src/public/schemas/relationship.ts +2 -0
- package/src/public/skills/kibi-bootstrap/SKILL.md +52 -11
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +12 -1
- package/src/public/skills/kibi-usage/SKILL.md +82 -18
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/src/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/src/public/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/src/public/skills/kibi-usage/resources/operation-access.md +29 -1
- package/src/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/src/public/skills/kibi-usage/resources/workflows.md +42 -25
- package/src/public/telemetry-acceptance-types.d.ts +4 -1
- package/src/public/telemetry-acceptance.ts +210 -7
- package/src/public/telemetry-remediation.ts +39 -10
- package/src/schemas/entity.schema.json +122 -0
- package/src/schemas/relationship.schema.json +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAEhB,gBAAgB,EAChB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAEhB,gBAAgB,EAChB,wBAAwB,EAGxB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAwEpB,wBAAgB,yBAAyB,CACvC,KAAK,CAAC,EAAE,gBAAgB,GACvB,wBAAwB,CAa1B;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,oBAAoB,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,wEAAwE;IACxE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD,GAAG,mBAAmB,CAsLtB"}
|
|
@@ -1,18 +1,74 @@
|
|
|
1
1
|
import { buildGuidance } from "./guidance.js";
|
|
2
|
-
import { bootstrapPlanHash } from "./types.js";
|
|
2
|
+
import { KNOWLEDGE_SOURCE_AUTHORITIES, KNOWLEDGE_SOURCE_KINDS, bootstrapPlanHash, } from "./types.js";
|
|
3
3
|
function strings(values) {
|
|
4
4
|
return [
|
|
5
5
|
...new Set((values ?? []).map((value) => value.trim()).filter(Boolean)),
|
|
6
6
|
];
|
|
7
7
|
}
|
|
8
|
+
function knowledgeSources(values) {
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
const result = [];
|
|
11
|
+
for (const value of values ?? []) {
|
|
12
|
+
const id = value.id?.trim();
|
|
13
|
+
const title = value.title?.trim();
|
|
14
|
+
const locator = value.locator?.trim();
|
|
15
|
+
if (!id ||
|
|
16
|
+
!title ||
|
|
17
|
+
!locator ||
|
|
18
|
+
seen.has(id) ||
|
|
19
|
+
!KNOWLEDGE_SOURCE_KINDS.includes(value.kind) ||
|
|
20
|
+
!KNOWLEDGE_SOURCE_AUTHORITIES.includes(value.authority))
|
|
21
|
+
continue;
|
|
22
|
+
seen.add(id);
|
|
23
|
+
const connector = value.connector?.trim();
|
|
24
|
+
const notes = value.notes?.trim();
|
|
25
|
+
result.push({
|
|
26
|
+
id,
|
|
27
|
+
kind: value.kind,
|
|
28
|
+
title,
|
|
29
|
+
locator,
|
|
30
|
+
authority: value.authority,
|
|
31
|
+
...(connector ? { connector } : {}),
|
|
32
|
+
...(notes ? { notes } : {}),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function intentClaims(values) {
|
|
38
|
+
const seen = new Set();
|
|
39
|
+
const result = [];
|
|
40
|
+
for (const value of values ?? []) {
|
|
41
|
+
const statement = value.statement?.trim().replace(/\s+/g, " ");
|
|
42
|
+
const sourceId = value.sourceId?.trim();
|
|
43
|
+
const reference = value.reference?.trim();
|
|
44
|
+
if (!statement || !sourceId || !reference)
|
|
45
|
+
continue;
|
|
46
|
+
const key = `${sourceId}\u0000${reference}\u0000${statement}`;
|
|
47
|
+
if (seen.has(key))
|
|
48
|
+
continue;
|
|
49
|
+
seen.add(key);
|
|
50
|
+
const excerpt = value.excerpt?.trim();
|
|
51
|
+
result.push({
|
|
52
|
+
statement,
|
|
53
|
+
sourceId,
|
|
54
|
+
reference,
|
|
55
|
+
...(excerpt ? { excerpt } : {}),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
8
60
|
export function normalizeBootstrapContext(input) {
|
|
9
61
|
const projectSummary = input?.projectSummary?.trim();
|
|
62
|
+
const sources = knowledgeSources(input?.knowledgeSources);
|
|
63
|
+
const claims = intentClaims(input?.intentClaims);
|
|
10
64
|
return {
|
|
11
65
|
...(projectSummary ? { projectSummary } : {}),
|
|
12
66
|
sourceOfTruthPaths: strings(input?.sourceOfTruthPaths),
|
|
13
67
|
sourceOfTruthNotes: strings(input?.sourceOfTruthNotes),
|
|
14
68
|
priorityRoots: strings(input?.priorityRoots),
|
|
15
69
|
verificationAnchors: strings(input?.verificationAnchors),
|
|
70
|
+
...(sources.length > 0 ? { knowledgeSources: sources } : {}),
|
|
71
|
+
...(claims.length > 0 ? { intentClaims: claims } : {}),
|
|
16
72
|
};
|
|
17
73
|
}
|
|
18
74
|
function payoff(candidates) {
|
|
@@ -51,9 +107,13 @@ export function presentBootstrap(input) {
|
|
|
51
107
|
input.candidates.length + input.sourceOnlySignals.length > 0
|
|
52
108
|
? `Bootstrap plan is ready for review with ${input.candidates.length} safe candidate(s) and ${input.sourceOnlySignals.length} source-only authoring follow-up(s).`
|
|
53
109
|
: (input.activation.handoffMessage ?? blockedFallback);
|
|
54
|
-
const
|
|
110
|
+
const overLimitCount = input.suppressedCandidates.filter((row) => row.reason === "over_limit").length;
|
|
111
|
+
const limitSummary = overLimitCount > 0
|
|
112
|
+
? ` ${overLimitCount} candidate(s) exceeded maxCandidates; raise the limit or narrow entityTypes.`
|
|
113
|
+
: "";
|
|
114
|
+
const tldr = (confidenceLevel === "low" && !input.activation.applyBlocked
|
|
55
115
|
? `Low-confidence bootstrap (${String(guidance.confidence.score)}): review diagnostics before proceeding. ${baseTldr}`
|
|
56
|
-
: baseTldr;
|
|
116
|
+
: baseTldr) + limitSummary;
|
|
57
117
|
const rawActions = input.candidates.flatMap((candidate) => candidate.applyPlan.map((payload) => ({ candidate, payload })));
|
|
58
118
|
const actionIds = new Map();
|
|
59
119
|
rawActions.forEach(({ payload }, index) => {
|
|
@@ -99,6 +159,8 @@ export function presentBootstrap(input) {
|
|
|
99
159
|
if (status === "needs_context") {
|
|
100
160
|
if (!declaredContext.projectSummary)
|
|
101
161
|
contextQuestions.push("What is the one-sentence purpose of this repository?");
|
|
162
|
+
if (!declaredContext.knowledgeSources)
|
|
163
|
+
contextQuestions.push("Which knowledge sources outside the code (issue trackers, wikis, specs, decision logs) describe product intent, and which of them are authoritative?");
|
|
102
164
|
if (declaredContext.sourceOfTruthPaths.length === 0)
|
|
103
165
|
contextQuestions.push("Which repository paths are authoritative for product intent?");
|
|
104
166
|
if (input.sourceOnlySignals.length > 0)
|
|
@@ -112,6 +174,7 @@ export function presentBootstrap(input) {
|
|
|
112
174
|
...(input.migrationWarning ? [input.migrationWarning] : []),
|
|
113
175
|
...input.discoverySummary.scanWarnings,
|
|
114
176
|
...bindingDiagnostics,
|
|
177
|
+
...strings(input.contextDiagnostics),
|
|
115
178
|
];
|
|
116
179
|
const planBody = {
|
|
117
180
|
version: "kibi.bootstrap-plan.v1",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { SemanticClaim } from "../../utils/strict-modeling.js";
|
|
2
|
+
export declare function normalizeClaimStatement(statement: string): string;
|
|
2
3
|
export declare function claimFor(statement: string, source: string, confidence: number, provenance: string): SemanticClaim | null;
|
|
3
4
|
//# sourceMappingURL=requirement-claims.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirement-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/requirement-claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"requirement-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/requirement-claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAGpE,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED,wBAAgB,QAAQ,CACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,aAAa,GAAG,IAAI,CA0DtB"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
2
|
+
export function normalizeClaimStatement(statement) {
|
|
3
|
+
return statement
|
|
4
|
+
.replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")
|
|
5
|
+
.replace(/^\s*\[(?: |x)\]\s*/i, "")
|
|
6
|
+
.trim();
|
|
7
|
+
}
|
|
1
8
|
export function claimFor(statement, source, confidence, provenance) {
|
|
2
|
-
const
|
|
9
|
+
const cleaned = normalizeClaimStatement(statement);
|
|
10
|
+
if (cleaned.endsWith("?"))
|
|
11
|
+
return null;
|
|
12
|
+
const normalized = /^(?:must|shall|should)\s+/i.test(cleaned)
|
|
13
|
+
? `System ${cleaned}`
|
|
14
|
+
: cleaned;
|
|
3
15
|
const retention = normalized.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+retained\s+for\s+(?<value>\d+)\s+(?<unit>day|days|month|months|year|years)\.?$/i);
|
|
4
16
|
if (retention?.groups?.subject &&
|
|
5
17
|
retention.groups.value &&
|
|
@@ -6,12 +6,38 @@ export declare function bootstrapEmptyKbSnapshotId(input: {
|
|
|
6
6
|
readonly workspaceSnapshot: string;
|
|
7
7
|
readonly sourceHashes: Readonly<Record<string, string | null>>;
|
|
8
8
|
}): string;
|
|
9
|
+
export declare const KNOWLEDGE_SOURCE_KINDS: readonly ["issue_tracker", "wiki", "specification", "design", "decision_log", "support", "chat", "repository_docs", "other"];
|
|
10
|
+
export declare const KNOWLEDGE_SOURCE_AUTHORITIES: readonly ["authoritative", "supporting", "stale"];
|
|
11
|
+
/**
|
|
12
|
+
* A knowledge source the agent and human agreed on during the bootstrap
|
|
13
|
+
* interview: an issue tracker, wiki, spec, or other place where product intent
|
|
14
|
+
* lives outside the code. Kibi never reads it; the agent does, through the
|
|
15
|
+
* connectors it has, and cites it from intent claims.
|
|
16
|
+
*/
|
|
17
|
+
export type BootstrapKnowledgeSource = {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly kind: (typeof KNOWLEDGE_SOURCE_KINDS)[number];
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly locator: string;
|
|
22
|
+
readonly authority: (typeof KNOWLEDGE_SOURCE_AUTHORITIES)[number];
|
|
23
|
+
readonly connector?: string;
|
|
24
|
+
readonly notes?: string;
|
|
25
|
+
};
|
|
26
|
+
/** One statement of intent the agent harvested from a declared source. */
|
|
27
|
+
export type BootstrapIntentClaim = {
|
|
28
|
+
readonly statement: string;
|
|
29
|
+
readonly sourceId: string;
|
|
30
|
+
readonly reference: string;
|
|
31
|
+
readonly excerpt?: string;
|
|
32
|
+
};
|
|
9
33
|
export type BootstrapContext = {
|
|
10
34
|
readonly projectSummary?: string;
|
|
11
35
|
readonly sourceOfTruthPaths?: readonly string[];
|
|
12
36
|
readonly sourceOfTruthNotes?: readonly string[];
|
|
13
37
|
readonly priorityRoots?: readonly string[];
|
|
14
38
|
readonly verificationAnchors?: readonly string[];
|
|
39
|
+
readonly knowledgeSources?: readonly BootstrapKnowledgeSource[];
|
|
40
|
+
readonly intentClaims?: readonly BootstrapIntentClaim[];
|
|
15
41
|
};
|
|
16
42
|
export type PlanBootstrapArgs = {
|
|
17
43
|
readonly includeGenericMarkdown?: boolean;
|
|
@@ -38,6 +64,8 @@ export type BootstrapDeclaredContext = {
|
|
|
38
64
|
readonly sourceOfTruthNotes: readonly string[];
|
|
39
65
|
readonly priorityRoots: readonly string[];
|
|
40
66
|
readonly verificationAnchors: readonly string[];
|
|
67
|
+
readonly knowledgeSources?: readonly BootstrapKnowledgeSource[];
|
|
68
|
+
readonly intentClaims?: readonly BootstrapIntentClaim[];
|
|
41
69
|
};
|
|
42
70
|
export type ActivationState = "root_uninitialized" | "root_partial" | "vendored_only" | "root_active_thin" | "root_active_seeded";
|
|
43
71
|
export type ActivationMode = "cold_start_bootstrap" | "repair_bootstrap" | "attached_thin_bootstrap" | "attached_thin_handoff" | "attached_seeded_handoff" | "vendored_blocked";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGxE,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACtC,MAAM,CAGR;AAED,mFAAmF;AACnF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CAChE,GAAG,MAAM,CAWT;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE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AAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC7B,eAAe,CAAC,0BAA0B,CAAC,GAAG;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;CACxD,CAAC"}
|
|
@@ -15,6 +15,22 @@ export function bootstrapEmptyKbSnapshotId(input) {
|
|
|
15
15
|
}))
|
|
16
16
|
.digest("hex")}`;
|
|
17
17
|
}
|
|
18
|
+
export const KNOWLEDGE_SOURCE_KINDS = [
|
|
19
|
+
"issue_tracker",
|
|
20
|
+
"wiki",
|
|
21
|
+
"specification",
|
|
22
|
+
"design",
|
|
23
|
+
"decision_log",
|
|
24
|
+
"support",
|
|
25
|
+
"chat",
|
|
26
|
+
"repository_docs",
|
|
27
|
+
"other",
|
|
28
|
+
];
|
|
29
|
+
export const KNOWLEDGE_SOURCE_AUTHORITIES = [
|
|
30
|
+
"authoritative",
|
|
31
|
+
"supporting",
|
|
32
|
+
"stale",
|
|
33
|
+
];
|
|
18
34
|
export const BOOTSTRAP_PROVIDER_ORDER = [
|
|
19
35
|
"typed_kibi_docs",
|
|
20
36
|
"generic_repo_docs",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UpsertInput } from "../mutation/types.js";
|
|
2
|
+
/** Validate the original payload without dropping malformed relationships. */
|
|
3
|
+
export declare function validateBootstrapPayload(payload: Readonly<Record<string, unknown>>, now: Date): UpsertInput;
|
|
4
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKxD,8EAA8E;AAE9E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC1C,GAAG,EAAE,IAAI,GACR,WAAW,CAsBb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { validateUpsertInput } from "../mutation/validation.js";
|
|
2
|
+
import { analyzeSemanticAdvisorInput } from "../semantic-advisor/analyze-prose.js";
|
|
3
|
+
import { assertSemanticInventoryBoundary } from "../semantic-advisor/ingestion-boundary.js";
|
|
4
|
+
/** Validate the original payload without dropping malformed relationships. */
|
|
5
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
6
|
+
export function validateBootstrapPayload(payload, now) {
|
|
7
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
8
|
+
throw new Error("Bootstrap action payload must be an upsert object");
|
|
9
|
+
if (payload.relationships !== undefined &&
|
|
10
|
+
!Array.isArray(payload.relationships))
|
|
11
|
+
throw new Error("Relationship validation failed: relationships must be an array");
|
|
12
|
+
const input = payload;
|
|
13
|
+
validateUpsertInput(input, now);
|
|
14
|
+
const relationships = input.relationships ?? [];
|
|
15
|
+
const semantic = analyzeSemanticAdvisorInput({
|
|
16
|
+
payload: { ...input, relationships },
|
|
17
|
+
});
|
|
18
|
+
assertSemanticInventoryBoundary({ ...input, relationships }, relationships, semantic.receipt);
|
|
19
|
+
return input;
|
|
20
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
type InventoryEntry = {
|
|
2
|
+
claim_key: string;
|
|
3
|
+
claim_text: string;
|
|
4
|
+
role: string;
|
|
5
|
+
status: string;
|
|
6
|
+
span: {
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
};
|
|
10
|
+
semantic_key?: string;
|
|
11
|
+
reason?: string;
|
|
12
|
+
};
|
|
13
|
+
/** What re-derivation changed for one claim. */
|
|
14
|
+
export type InventoryClaimChange = Readonly<{
|
|
15
|
+
claim_key: string;
|
|
16
|
+
change: "kept" | "role_changed" | "span_changed" | "new_unresolved" | "new_context" | "now_unresolved" | "now_context" | "dropped";
|
|
17
|
+
before?: Readonly<{
|
|
18
|
+
role: string;
|
|
19
|
+
status: string;
|
|
20
|
+
}>;
|
|
21
|
+
after?: Readonly<{
|
|
22
|
+
role: string;
|
|
23
|
+
status: string;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
export type InventoryRederivationSummary = Readonly<{
|
|
27
|
+
keptModeled: number;
|
|
28
|
+
roleChanges: number;
|
|
29
|
+
newlyUnresolved: number;
|
|
30
|
+
droppedClaims: number;
|
|
31
|
+
downgradedModeled: number;
|
|
32
|
+
}>;
|
|
33
|
+
/** The re-derived inventory contract written to the requirement. */
|
|
34
|
+
export type InventoryContract = Readonly<{
|
|
35
|
+
semantic_inventory_version: string;
|
|
36
|
+
semantic_source_field: string;
|
|
37
|
+
semantic_source_hash: string;
|
|
38
|
+
semantic_inventory: readonly InventoryEntry[];
|
|
39
|
+
logic_claims: readonly string[];
|
|
40
|
+
}>;
|
|
41
|
+
export type InventoryRederivation = Readonly<{
|
|
42
|
+
requirementId: string;
|
|
43
|
+
path: string;
|
|
44
|
+
/** Ingestion errors the stored inventory produces today. */
|
|
45
|
+
errors: readonly string[];
|
|
46
|
+
safe: boolean;
|
|
47
|
+
/** Why re-derivation is left to a person (empty when safe). */
|
|
48
|
+
reasons: readonly string[];
|
|
49
|
+
summary: InventoryRederivationSummary;
|
|
50
|
+
changes: readonly InventoryClaimChange[];
|
|
51
|
+
contract: InventoryContract;
|
|
52
|
+
/** SHA-256 of the canonical re-derived contract; the apply step re-checks it. */
|
|
53
|
+
contractHash: string;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Every current requirement whose stored inventory contract no longer matches
|
|
57
|
+
* the current semantic advisor, with its re-derived contract. Read-only;
|
|
58
|
+
* reports all of them instead of stopping at the first. `onlyId` limits the
|
|
59
|
+
* scan to one requirement.
|
|
60
|
+
*/
|
|
61
|
+
export declare function planInventoryRederivation(workspaceRoot: string, onlyId?: string): InventoryRederivation[];
|
|
62
|
+
export type InventoryRederivationOutcome = Readonly<{
|
|
63
|
+
requirementId: string;
|
|
64
|
+
path: string;
|
|
65
|
+
outcome: "rederived" | "unchanged";
|
|
66
|
+
summary?: InventoryRederivationSummary;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Apply the safe re-derivation of one requirement. When `expectedContractHash`
|
|
70
|
+
* is given (the migration plan's evidence), the current re-derivation must
|
|
71
|
+
* still produce exactly that contract. A requirement that no longer drifts is
|
|
72
|
+
* left unchanged, so repeated runs are no-ops.
|
|
73
|
+
*/
|
|
74
|
+
export declare function applyInventoryRederivation(workspaceRoot: string, requirementId: string, expectedContractHash?: string): InventoryRederivationOutcome;
|
|
75
|
+
/** Apply every safe re-derivation; unsafe ones are returned untouched. */
|
|
76
|
+
export declare function applySafeInventoryRederivations(workspaceRoot: string): {
|
|
77
|
+
rederived: InventoryRederivationOutcome[];
|
|
78
|
+
manual: InventoryRederivation[];
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=inventory-rederive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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