kibi-cli 1.0.1 → 2.0.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-errors.d.ts +3 -1
- package/dist/cli-errors.d.ts.map +1 -1
- package/dist/cli-errors.js +4 -1
- package/dist/cli-json-command.d.ts +1 -0
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +13 -4
- package/dist/cli-operation-loader.js +3 -3
- package/dist/cli-operation-metadata.d.ts +4 -3
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +7 -5
- package/dist/cli-protocol.js +1 -1
- 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 +3 -0
- package/dist/cli-register-proof.d.ts.map +1 -0
- package/dist/cli-register-proof.js +103 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -10
- package/dist/commands/branch.d.ts +1 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +8 -4
- package/dist/commands/check.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +190 -44
- package/dist/commands/coverage.d.ts +1 -0
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +6 -0
- package/dist/commands/doctor.d.ts +22 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +48 -22
- package/dist/commands/engine.d.ts +12 -0
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +40 -0
- package/dist/commands/github-init.d.ts +1 -0
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +9 -5
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +38 -5
- package/dist/commands/migrate.d.ts +4 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +7 -7
- package/dist/commands/proof-migrate-legacy.d.ts +7 -0
- package/dist/commands/proof-migrate-legacy.d.ts.map +1 -0
- package/dist/commands/proof-migrate-legacy.js +45 -0
- package/dist/commands/proof-prune.d.ts +8 -0
- package/dist/commands/proof-prune.d.ts.map +1 -0
- package/dist/commands/proof-prune.js +53 -0
- package/dist/commands/prove.d.ts +37 -0
- package/dist/commands/prove.d.ts.map +1 -0
- package/dist/commands/prove.js +470 -0
- package/dist/commands/report.js +1 -1
- package/dist/commands/sync/discovery.d.ts +3 -0
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +36 -28
- package/dist/commands/sync/manifest.d.ts +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +53 -21
- package/dist/commands/sync/persistence.d.ts +4 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +25 -14
- package/dist/commands/sync/staging.d.ts +1 -0
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +5 -2
- package/dist/commands/sync/untracked-targets.d.ts +24 -0
- package/dist/commands/sync/untracked-targets.d.ts.map +1 -0
- package/dist/commands/sync/untracked-targets.js +108 -0
- package/dist/commands/sync.d.ts +11 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +74 -30
- package/dist/engine-daemon.d.ts +3 -1
- package/dist/engine-daemon.d.ts.map +1 -1
- package/dist/engine-daemon.js +49 -20
- package/dist/engine.d.ts +14 -76
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +197 -30
- package/dist/extractors/manifest.d.ts +5 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +46 -1
- package/dist/extractors/markdown.d.ts +5 -3
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +41 -24
- package/dist/extractors/playwright-cases.js +1 -1
- package/dist/extractors/relationships.d.ts +6 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -1
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.d.ts +1 -0
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +142 -67
- package/dist/intent-search.d.ts +1 -0
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +7 -3
- package/dist/logic/ir.d.ts +1 -0
- package/dist/logic/ir.d.ts.map +1 -1
- package/dist/logic/ir.js +1 -1
- package/dist/operations/bootstrap/activation.d.ts +2 -1
- package/dist/operations/bootstrap/activation.d.ts.map +1 -1
- package/dist/operations/bootstrap/activation.js +11 -3
- package/dist/operations/bootstrap/generate.d.ts +2 -1
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +6 -3
- package/dist/operations/bootstrap/guidance.d.ts +1 -0
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +1 -1
- package/dist/operations/modeling/model-requirement.d.ts +5 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +53 -46
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applicability.js +103 -4
- package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-2.js +18 -2
- package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-3.js +17 -1
- package/dist/operations/modeling/predicate-catalog-5.d.ts +10 -0
- package/dist/operations/modeling/predicate-catalog-5.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-5.js +291 -0
- package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog.js +4 -0
- package/dist/operations/modeling/predicate-loader.d.ts +1 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +4 -3
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +4 -1
- package/dist/operations/modeling/predicate-types.d.ts +1 -1
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-4.js +84 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +3 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +52 -19
- package/dist/operations/mutation/contradictions.d.ts +2 -1
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +26 -5
- package/dist/operations/mutation/delete.d.ts +3 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +100 -32
- package/dist/operations/mutation/relationships.d.ts +1 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +6 -4
- package/dist/operations/mutation/saga.d.ts +51 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -0
- package/dist/operations/mutation/saga.js +67 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -2
- package/dist/operations/mutation/source-authoring.d.ts +5 -1
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +79 -46
- package/dist/operations/mutation/strict-fact.d.ts +1 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +8 -5
- package/dist/operations/mutation/symbol-compiler-lock.d.ts +5 -2
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-compiler-lock.js +65 -2
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +2 -2
- package/dist/operations/mutation/symbol-refresh.d.ts +1 -0
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +10 -8
- package/dist/operations/mutation/upsert.d.ts +18 -2
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +86 -54
- package/dist/operations/mutation/validate-upsert.js +2 -2
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +46 -4
- package/dist/operations/mutation/warnings.d.ts +1 -0
- package/dist/operations/mutation/warnings.d.ts.map +1 -1
- package/dist/operations/mutation/warnings.js +7 -5
- package/dist/operations/mutation/workspace-mutation-lock.d.ts +60 -0
- package/dist/operations/mutation/workspace-mutation-lock.d.ts.map +1 -0
- package/dist/operations/mutation/workspace-mutation-lock.js +362 -0
- package/dist/operations/planning/apply-plan.d.ts +8 -106
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +113 -36
- package/dist/operations/planning/compile-intent.d.ts +2 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +70 -14
- package/dist/operations/proof/ingest-proof.d.ts +34 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -0
- package/dist/operations/proof/ingest-proof.js +307 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts +30 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -0
- package/dist/operations/proof/migrate-legacy-receipts.js +88 -0
- package/dist/operations/proof/prune-receipts.d.ts +35 -0
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -0
- package/dist/operations/proof/prune-receipts.js +91 -0
- package/dist/operations/proof/receipt-document.d.ts +29 -0
- package/dist/operations/proof/receipt-document.d.ts.map +1 -0
- package/dist/operations/proof/receipt-document.js +117 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +1 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +46 -26
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +20 -7
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts +2 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-count-rules.js +40 -25
- package/dist/prolog/codec.d.ts +13 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +269 -154
- package/dist/prolog/error-terms.d.ts +47 -0
- package/dist/prolog/error-terms.d.ts.map +1 -0
- package/dist/prolog/error-terms.js +334 -0
- package/dist/prolog/janitor.d.ts +50 -0
- package/dist/prolog/janitor.d.ts.map +1 -0
- package/dist/prolog/janitor.js +154 -0
- package/dist/prolog/store-lock.d.ts +45 -0
- package/dist/prolog/store-lock.d.ts.map +1 -0
- package/dist/prolog/store-lock.js +195 -0
- package/dist/prolog.d.ts +7 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +55 -17
- package/dist/proof/evaluate.d.ts +27 -0
- package/dist/proof/evaluate.d.ts.map +1 -0
- package/dist/proof/evaluate.js +151 -0
- package/dist/proof/inspect.d.ts +12 -0
- package/dist/proof/inspect.d.ts.map +1 -0
- package/dist/proof/inspect.js +236 -0
- package/dist/proof/integrations.d.ts +35 -0
- package/dist/proof/integrations.d.ts.map +1 -0
- package/dist/proof/integrations.js +123 -0
- package/dist/proof/producers/junit-adapter.d.ts +26 -0
- package/dist/proof/producers/junit-adapter.d.ts.map +1 -0
- package/dist/proof/producers/junit-adapter.js +186 -0
- package/dist/{public → proof/producers}/playwright-case-id.d.ts +1 -1
- package/dist/proof/producers/playwright-case-id.d.ts.map +1 -0
- package/dist/{public → proof/producers}/playwright-case-id.js +3 -3
- package/dist/proof/producers/playwright-reporter.d.ts +27 -0
- package/dist/proof/producers/playwright-reporter.d.ts.map +1 -0
- package/dist/proof/producers/playwright-reporter.js +138 -0
- package/dist/proof/producers/tap-adapter.d.ts +10 -0
- package/dist/proof/producers/tap-adapter.d.ts.map +1 -0
- package/dist/proof/producers/tap-adapter.js +200 -0
- package/dist/proof/receipt-outcome.d.ts +2 -0
- package/dist/proof/receipt-outcome.d.ts.map +1 -0
- package/dist/proof/receipt-outcome.js +1 -0
- package/dist/public/diagnostic-usage.js +6 -6
- package/dist/public/distribution-parity.d.ts +7 -1
- package/dist/public/distribution-parity.d.ts.map +1 -1
- package/dist/public/distribution-parity.js +15 -10
- package/dist/public/impact/coverage-depth-quality.d.ts +1 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +1 -1
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +2 -2
- package/dist/public/impact/diff-meaning.d.ts +1 -0
- package/dist/public/impact/diff-meaning.d.ts.map +1 -1
- package/dist/public/impact/diff-meaning.js +5 -2
- package/dist/public/impact/full-kb-quality.d.ts +5 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +329 -64
- package/dist/public/operations/catalog.d.ts +447 -196
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +6 -4
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +3 -7
- package/dist/public/operations/contracts.d.ts +7 -0
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +31 -22
- package/dist/public/operations/discovery-entities.d.ts +3 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +4 -0
- package/dist/public/operations/discovery-executors.d.ts +9 -9
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +17 -14
- package/dist/public/operations/index.d.ts +1 -1
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +1 -1
- package/dist/public/operations/migration-plan.d.ts +4 -3
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +23 -21
- package/dist/public/operations/node-ports.js +6 -6
- package/dist/public/operations/repair-plan.d.ts +3 -3
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +49 -19
- package/dist/public/operations/result-envelope.d.ts +1 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +12 -10
- package/dist/public/operations/runtime-types.d.ts +5 -0
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +5 -0
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -0
- package/dist/public/operations/specs/check-rules.generated.js +34 -0
- package/dist/public/operations/specs/check.d.ts +7 -2
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +8 -20
- package/dist/public/operations/specs/mutation-schemas.d.ts +257 -163
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +15 -7
- package/dist/public/operations/specs/planning.d.ts +9 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -1
- package/dist/public/operations/specs/planning.js +6 -0
- package/dist/public/operations/specs/proof.d.ts +212 -0
- package/dist/public/operations/specs/proof.d.ts.map +1 -0
- package/dist/public/operations/specs/proof.js +30 -0
- package/dist/public/operations/specs/reporting.d.ts +19 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +112 -12
- package/dist/public/operations/specs/upsert.d.ts +257 -163
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts +11 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +118 -3
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-fingerprint.d.ts +54 -0
- package/dist/public/proof-fingerprint.d.ts.map +1 -0
- package/dist/public/proof-fingerprint.js +141 -0
- package/dist/public/proof-protocol.d.ts +354 -0
- package/dist/public/proof-protocol.d.ts.map +1 -0
- package/dist/public/proof-protocol.js +454 -0
- package/dist/public/proof-receipt.d.ts +279 -0
- package/dist/public/proof-receipt.d.ts.map +1 -0
- package/dist/public/proof-receipt.js +377 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +21 -7
- package/dist/public/skills/kibi-freshness/SKILL.md +1 -1
- package/dist/public/skills/kibi-usage/SKILL.md +41 -12
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/dist/public/skills/kibi-usage/resources/proof.md +105 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +6 -6
- package/dist/public/symbol-granularity.d.ts +3 -14
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts +16 -0
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -0
- package/dist/public/symbol-granularity.generated.js +20 -0
- package/dist/public/symbol-granularity.js +6 -47
- package/dist/public/telemetry-acceptance.d.ts +3 -77
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +4 -2
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/report/html-report.css +282 -0
- package/dist/report/html-report.d.ts +4 -2
- package/dist/report/html-report.d.ts.map +1 -1
- package/dist/report/html-report.js +37 -300
- package/dist/runtime/cli-runtime.d.ts +2 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +14 -7
- package/dist/schemas/entity.schema.json +355 -215
- package/dist/search-ranking.d.ts +1 -0
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/search-ranking.js +3 -0
- package/dist/traceability/evidence-model.d.ts +28 -0
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/git-staged.d.ts +20 -0
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +145 -1
- package/dist/traceability/staged-diagnostics.d.ts +7 -0
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +78 -7
- package/dist/traceability/staged-file-coverage.d.ts +33 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -0
- package/dist/traceability/staged-file-coverage.js +284 -0
- package/dist/traceability/staged-impact-contract.js +4 -4
- package/dist/traceability/staged-symbols-manifest.d.ts +13 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +138 -27
- package/dist/traceability/symbol-extract.d.ts +5 -0
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +1 -1
- package/dist/traceability/temp-kb.d.ts +2 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +13 -4
- package/dist/types/entities.d.ts +5 -3
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +1 -0
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +7 -4
- package/dist/utils/branch-store.d.ts +6 -0
- package/dist/utils/branch-store.d.ts.map +1 -1
- package/dist/utils/branch-store.js +27 -0
- package/dist/utils/kb-paths.d.ts +1 -1
- package/dist/utils/kb-paths.d.ts.map +1 -1
- package/dist/utils/kb-paths.js +1 -1
- package/dist/utils/rule-registry.d.ts +1 -11
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +97 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -0
- package/dist/utils/rule-registry.generated.js +125 -0
- package/dist/utils/rule-registry.js +12 -113
- package/dist/utils/strict-modeling.d.ts +1 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +1 -1
- package/package.json +8 -11
- package/src/public/diagnostic-usage.ts +6 -6
- package/src/public/distribution-parity.ts +17 -10
- package/src/public/impact/coverage-depth-quality.ts +1 -1
- package/src/public/impact/diagnostics.ts +2 -1
- package/src/public/impact/diff-meaning.ts +11 -4
- package/src/public/impact/full-kb-quality.ts +463 -72
- package/src/public/operations/catalog.ts +10 -4
- package/src/public/operations/check-executor.ts +3 -7
- package/src/public/operations/contracts.ts +38 -22
- package/src/public/operations/discovery-entities.ts +7 -0
- package/src/public/operations/discovery-executors.ts +26 -23
- package/src/public/operations/index.ts +1 -1
- package/src/public/operations/migration-plan.ts +32 -25
- package/src/public/operations/node-ports.ts +6 -6
- package/src/public/operations/repair-plan.ts +60 -23
- package/src/public/operations/result-envelope.ts +15 -10
- package/src/public/operations/runtime-types.ts +5 -0
- package/src/public/operations/specs/check-rules.generated.ts +37 -0
- package/src/public/operations/specs/check.ts +12 -21
- package/src/public/operations/specs/mutation-schemas.ts +22 -9
- package/src/public/operations/specs/planning.ts +7 -0
- package/src/public/operations/specs/proof.ts +43 -0
- package/src/public/operations/specs/reporting.ts +140 -13
- package/src/public/operations/symbol-repair-plan.ts +163 -3
- package/src/public/operations/types.ts +1 -1
- package/src/public/proof-fingerprint.ts +216 -0
- package/src/public/proof-protocol-types.d.ts +96 -0
- package/src/public/proof-protocol.ts +589 -0
- package/src/public/proof-receipt.ts +499 -0
- package/src/public/schemas/entity.ts +26 -10
- package/src/public/skills/kibi-freshness/SKILL.md +1 -1
- package/src/public/skills/kibi-usage/SKILL.md +41 -12
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -1
- package/src/public/skills/kibi-usage/resources/proof.md +105 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +6 -6
- package/src/public/symbol-granularity.generated.ts +41 -0
- package/src/public/symbol-granularity.ts +35 -60
- package/src/public/telemetry-acceptance-types.d.ts +98 -0
- package/src/public/telemetry-acceptance.ts +22 -100
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/schemas/entity.schema.json +355 -215
- package/dist/cli-register-verification.d.ts +0 -3
- package/dist/cli-register-verification.d.ts.map +0 -1
- package/dist/cli-register-verification.js +0 -16
- package/dist/commands/verify.d.ts +0 -10
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js +0 -126
- package/dist/operations/verification/ingest-verification.d.ts +0 -29
- package/dist/operations/verification/ingest-verification.d.ts.map +0 -1
- package/dist/operations/verification/ingest-verification.js +0 -192
- package/dist/public/operations/specs/verification.d.ts +0 -78
- package/dist/public/operations/specs/verification.d.ts.map +0 -1
- package/dist/public/operations/specs/verification.js +0 -62
- package/dist/public/playwright-case-id.d.ts.map +0 -1
- package/dist/public/verification-receipt.d.ts +0 -242
- package/dist/public/verification-receipt.d.ts.map +0 -1
- package/dist/public/verification-receipt.js +0 -296
- package/dist/verification/playwright-reporter.d.ts +0 -21
- package/dist/verification/playwright-reporter.d.ts.map +0 -1
- package/dist/verification/playwright-reporter.js +0 -114
- package/src/public/operations/specs/verification.ts +0 -78
- package/src/public/playwright-case-id.ts +0 -35
- package/src/public/verification-receipt.ts +0 -412
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contradictions.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/contradictions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contradictions.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/contradictions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AASrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,aAAa,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACrD,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;CAC1C,CAAC;AAGF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAOrE;AAGD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAOR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { escapeAtom } from "../../prolog/codec.js";
|
|
2
|
-
import { formatInvalidRelationshipError } from "./relationships.js";
|
|
2
|
+
import { formatInvalidRelationshipError, formatInvalidRelationshipTuple, } from "./relationships.js";
|
|
3
3
|
import { buildPropertyList, buildRelationshipMetadata, } from "./serialization.js";
|
|
4
4
|
// implements REQ-kibi-operation-interface-parity
|
|
5
5
|
export function buildUpsertCommitGoal(input) {
|
|
@@ -8,12 +8,33 @@ export function buildUpsertCommitGoal(input) {
|
|
|
8
8
|
return `kb_commit_upsert(${type}, ${buildPropertyList(input.entity)}, [${relationships.join(", ")}], ${input.skipContradictionCheck ? "true" : "false"}, ChangeKind)`;
|
|
9
9
|
}
|
|
10
10
|
// implements REQ-kibi-operation-interface-parity
|
|
11
|
-
export function formatUpsertError(entityId, raw) {
|
|
11
|
+
export function formatUpsertError(entityId, raw, record) {
|
|
12
|
+
const stage = raw?.match(/\(stage=([^)]+)\)/)?.[1];
|
|
13
|
+
const stageSuffix = stage === undefined ? "" : ` (stage=${stage})`;
|
|
14
|
+
if (record) {
|
|
15
|
+
return formatStructuredUpsertError(entityId, record, stageSuffix);
|
|
16
|
+
}
|
|
17
|
+
return formatTextUpsertError(entityId, raw, stageSuffix);
|
|
18
|
+
}
|
|
19
|
+
function formatStructuredUpsertError(entityId, record, stageSuffix) {
|
|
20
|
+
if (record.code === "contradiction") {
|
|
21
|
+
const conflicts = [
|
|
22
|
+
...new Set((record.conflicts ?? []).map((conflict) => ` - Conflicts with ${conflict.otherId}: ${conflict.reason}`)),
|
|
23
|
+
];
|
|
24
|
+
if (conflicts.length > 0) {
|
|
25
|
+
return `Contradiction detected for requirement ${entityId}:\n${conflicts.join("\n")}\n\nTo resolve:\n 1. Add a supersedes relationship from the new requirement to the conflicting one, OR\n 2. Deprecate the conflicting requirement before creating the new one.${stageSuffix}`;
|
|
26
|
+
}
|
|
27
|
+
return `Contradiction detected for entity ${entityId}: This requirement conflicts with existing requirements. Add a supersedes relationship to the conflicting requirement, or deprecate the old requirement before creating the new one.${stageSuffix}`;
|
|
28
|
+
}
|
|
29
|
+
if (record.code === "invalid_relationship" && record.relationship) {
|
|
30
|
+
return `Failed to upsert entity ${entityId}: ${formatInvalidRelationshipTuple(record.relationship)}${stageSuffix}`;
|
|
31
|
+
}
|
|
32
|
+
return `Failed to upsert entity ${entityId}: ${record.message}${stageSuffix}`;
|
|
33
|
+
}
|
|
34
|
+
function formatTextUpsertError(entityId, raw, stageSuffix) {
|
|
12
35
|
if (!raw)
|
|
13
36
|
return `Failed to upsert entity ${entityId}: Unknown error`;
|
|
14
|
-
const
|
|
15
|
-
const stageSuffix = stage === undefined ? "" : ` (stage=${stage})`;
|
|
16
|
-
const diagnosticFree = raw.replace(/^__KIBI_(?:STAGE|RUNTIME)__:[^\r\n]*\r?\n?/gm, "");
|
|
37
|
+
const diagnosticFree = raw.replace(/^__KIBI_(?:STAGE|RUNTIME|ERROR)__:[^\r\n]*\r?\n?/gm, "");
|
|
17
38
|
if (diagnosticFree.includes("stale_snapshot")) {
|
|
18
39
|
return `Failed to upsert entity ${entityId}: KB snapshot is stale; reattach or refresh the runtime before retrying (stale_snapshot)${stageSuffix}`;
|
|
19
40
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
2
|
import type { OperationResult } from "../../public/operations/types.js";
|
|
3
|
+
import { type RelationshipSelector } from "../../relationships/shards.js";
|
|
3
4
|
import type { DeleteInput, DeletePayload } from "./types.js";
|
|
5
|
+
export declare function assertFilesystemCapableRuntime(fs: OperationContext["fs"]): asserts fs is NonNullable<OperationContext["fs"]>;
|
|
6
|
+
export declare function executeRelationshipDelete(selectors: readonly RelationshipSelector[], context: OperationContext, onCommitted?: () => void): Promise<DeletePayload>;
|
|
4
7
|
export declare function executeDelete(input: DeleteInput, context: OperationContext): Promise<OperationResult<DeletePayload>>;
|
|
5
8
|
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/delete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/delete.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,+BAA+B,CAAC;AAgBvC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAc7D,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,GACzB,OAAO,CAAC,EAAE,IAAI,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAMnD;AAuWD,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,SAAS,oBAAoB,EAAE,EAC1C,OAAO,EAAE,gBAAgB,EACzB,WAAW,GAAE,MAAM,IAAsB,GACxC,OAAO,CAAC,aAAa,CAAC,CA4BxB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CA6OzC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
2
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { InputError, OperationError } from "../../cli-errors.js";
|
|
4
5
|
import { parseEntityFromList, parseListOfLists, toPrologAtom, } from "../../prolog/codec.js";
|
|
5
6
|
import { listShards, readAllShards, removeRelationshipsFromShards, } from "../../relationships/shards.js";
|
|
6
7
|
import { resolveBranchAttachment } from "../../utils/branch-resolver.js";
|
|
@@ -8,11 +9,17 @@ import { buildEntityDeleteAuditGoal } from "./audit.js";
|
|
|
8
9
|
import { RELATIONSHIP_TYPES, dependentRelationshipsGoal, } from "./relationships.js";
|
|
9
10
|
import { saveAtomicMutation, saveMutation } from "./save.js";
|
|
10
11
|
import { normalizeAuthoredSourcePath, renderMarkdownRelationshipDeletion, renderSourceDeletion, renderYamlRelationshipDeletion, resolveContainedSourcePath, writePendingSourceReceipt, } from "./source-authoring.js";
|
|
12
|
+
import { acquireWorkspaceMutationLock, classifySourceMutationFailure, releaseWorkspaceMutationLock, } from "./workspace-mutation-lock.js";
|
|
11
13
|
function requireProlog(context) {
|
|
12
14
|
if (context.prolog === undefined)
|
|
13
15
|
throw new Error("Delete operation requires a Prolog runtime");
|
|
14
16
|
return context.prolog;
|
|
15
17
|
}
|
|
18
|
+
export function assertFilesystemCapableRuntime(fs) {
|
|
19
|
+
if (!fs) {
|
|
20
|
+
throw new Error("Relationship source patch requires a filesystem-capable runtime");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
16
23
|
async function loadEntity(prolog, id) {
|
|
17
24
|
const safeId = id.replaceAll("'", "''");
|
|
18
25
|
const result = await prolog.query(`findall(['${safeId}',Type,Props], kb_entity('${safeId}', Type, Props), Results)`);
|
|
@@ -40,7 +47,9 @@ function fileHash(pathname) {
|
|
|
40
47
|
return null;
|
|
41
48
|
return createHash("sha256").update(readFileSync(pathname)).digest("hex");
|
|
42
49
|
}
|
|
43
|
-
|
|
50
|
+
// implements REQ-011
|
|
51
|
+
// covered_by TEST-cli-source-relationship-parity-unit
|
|
52
|
+
async function executeRelationshipDeleteUnlocked(selectors, context, onCommitted = () => undefined) {
|
|
44
53
|
const prolog = requireProlog(context);
|
|
45
54
|
const allowed = new Set(RELATIONSHIP_TYPES);
|
|
46
55
|
const errors = [];
|
|
@@ -84,41 +93,40 @@ async function executeRelationshipDelete(selectors, context) {
|
|
|
84
93
|
record.to === selector.to);
|
|
85
94
|
const liveResult = await prolog.query(`once(kb_relationship(${toPrologAtom(selector.type)}, ${toPrologAtom(selector.from)}, ${toPrologAtom(selector.to)}))`);
|
|
86
95
|
let sourceRemoved = false;
|
|
87
|
-
let
|
|
96
|
+
let authoredSourceKind;
|
|
88
97
|
if (context.fs) {
|
|
89
98
|
// Authored YAML symbol relationships remain authoritative even when the
|
|
90
99
|
// compiled edge or relationship shard is present. Patch the source first
|
|
91
100
|
// so the next sync cannot recreate a relationship the caller deleted.
|
|
92
|
-
// Legacy Markdown declarations
|
|
101
|
+
// Legacy Markdown declarations are authoritative by the same rule.
|
|
93
102
|
try {
|
|
94
103
|
const entity = await loadEntity(prolog, selector.from);
|
|
95
104
|
const source = typeof entity.source === "string" ? entity.source : "";
|
|
96
105
|
if (sourceIsAuthored(source)) {
|
|
97
|
-
|
|
106
|
+
authoredSourceKind = /\.(?:ya?ml)$/i.test(source.replaceAll("\\", "/"))
|
|
107
|
+
? "YAML"
|
|
108
|
+
: "Markdown";
|
|
98
109
|
const relative = normalizeAuthoredSourcePath(context.workspaceRoot, source);
|
|
99
110
|
const absolute = resolveContainedSourcePath(context.workspaceRoot, relative);
|
|
100
111
|
const isYaml = /\.(?:ya?ml)$/i.test(relative);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
sourceRemoved = true;
|
|
115
|
-
}
|
|
112
|
+
const previous = sourcePatches.get(relative);
|
|
113
|
+
const before = previous?.before ?? (await context.fs.readFile(absolute));
|
|
114
|
+
const current = previous?.after ?? before;
|
|
115
|
+
const rendered = isYaml
|
|
116
|
+
? renderYamlRelationshipDeletion(relative, current, selector)
|
|
117
|
+
: renderMarkdownRelationshipDeletion(relative, current, selector);
|
|
118
|
+
if (rendered.removed) {
|
|
119
|
+
sourcePatches.set(relative, {
|
|
120
|
+
before,
|
|
121
|
+
after: rendered.body,
|
|
122
|
+
});
|
|
123
|
+
sourceRemoved = true;
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
}
|
|
119
127
|
catch (error) {
|
|
120
|
-
if (
|
|
121
|
-
throw new Error(`Authored
|
|
128
|
+
if (authoredSourceKind !== undefined) {
|
|
129
|
+
throw new Error(`Authored ${authoredSourceKind} relationship deletion failed for ${selector.from}: ${error instanceof Error ? error.message : String(error)}`);
|
|
122
130
|
}
|
|
123
131
|
// The normal typed preflight below reports a deterministic not-found
|
|
124
132
|
// or inspection error when no authored source can prove the edge.
|
|
@@ -183,17 +191,24 @@ async function executeRelationshipDelete(selectors, context) {
|
|
|
183
191
|
throw new Error(`Relationship shard update failed before compiled mutation: ${error instanceof Error ? error.message : String(error)}`);
|
|
184
192
|
}
|
|
185
193
|
const writeSourcePatch = async (relative, body) => {
|
|
186
|
-
|
|
187
|
-
throw new Error("Relationship source patch requires a filesystem-capable runtime");
|
|
194
|
+
assertFilesystemCapableRuntime(context.fs);
|
|
188
195
|
const absolute = resolveContainedSourcePath(context.workspaceRoot, relative);
|
|
189
196
|
await context.fs.mkdir(path.dirname(absolute));
|
|
190
|
-
const temporary = `${absolute}.kibi-relationship-${process.pid}-${
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
const temporary = `${absolute}.kibi-relationship-${process.pid}-${randomUUID()}`;
|
|
198
|
+
try {
|
|
199
|
+
await context.fs.writeFile(temporary, body);
|
|
200
|
+
if (context.fs.rename)
|
|
201
|
+
await context.fs.rename(temporary, absolute);
|
|
202
|
+
else {
|
|
203
|
+
await context.fs.writeFile(absolute, body);
|
|
204
|
+
await context.fs.unlink?.(temporary).catch(() => undefined);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
// A failed rename must not leak the unique temp file into the authored
|
|
209
|
+
// tree; the published target (if any) is untouched at this point.
|
|
196
210
|
await context.fs.unlink?.(temporary).catch(() => undefined);
|
|
211
|
+
throw error;
|
|
197
212
|
}
|
|
198
213
|
};
|
|
199
214
|
try {
|
|
@@ -226,6 +241,9 @@ async function executeRelationshipDelete(selectors, context) {
|
|
|
226
241
|
}
|
|
227
242
|
if (retracted > 0)
|
|
228
243
|
await saveMutation(prolog, "delete");
|
|
244
|
+
// The compiled mutation is now authoritative. Receipt publication below
|
|
245
|
+
// must not make the enclosing operation look retryable.
|
|
246
|
+
onCommitted();
|
|
229
247
|
}
|
|
230
248
|
catch (error) {
|
|
231
249
|
const paths = [
|
|
@@ -295,6 +313,29 @@ async function executeRelationshipDelete(selectors, context) {
|
|
|
295
313
|
...(sourceWrites.length > 0 ? { sourceWrites } : {}),
|
|
296
314
|
};
|
|
297
315
|
}
|
|
316
|
+
export async function executeRelationshipDelete(selectors, context, onCommitted = () => undefined) {
|
|
317
|
+
if (!context.fs || context.sourceMutationLockHeld === true)
|
|
318
|
+
return executeRelationshipDeleteUnlocked(selectors, context, onCommitted);
|
|
319
|
+
const lock = await acquireWorkspaceMutationLock(context.workspaceRoot);
|
|
320
|
+
let operationFailure;
|
|
321
|
+
let committed = false;
|
|
322
|
+
try {
|
|
323
|
+
const result = await executeRelationshipDeleteUnlocked(selectors, context, () => {
|
|
324
|
+
committed = true;
|
|
325
|
+
onCommitted();
|
|
326
|
+
});
|
|
327
|
+
committed = true;
|
|
328
|
+
return result;
|
|
329
|
+
}
|
|
330
|
+
catch (error) {
|
|
331
|
+
const failure = classifySourceMutationFailure("Relationship delete", error, committed);
|
|
332
|
+
operationFailure = { error: failure };
|
|
333
|
+
throw failure;
|
|
334
|
+
}
|
|
335
|
+
finally {
|
|
336
|
+
releaseWorkspaceMutationLock(lock, operationFailure, committed);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
298
339
|
export async function executeDelete(input, context) {
|
|
299
340
|
const branchAttachment = context.branchAttachment ?? resolveBranchAttachment(context.workspaceRoot);
|
|
300
341
|
if ("error" in branchAttachment) {
|
|
@@ -305,7 +346,13 @@ export async function executeDelete(input, context) {
|
|
|
305
346
|
throw new Error(`Delete blocked: KB is attached through legacy branch storage (${branchAttachment.gitBranch} -> ${branchAttachment.kbBranch}). Run 'kibi branch migrate --from ${branchAttachment.kbBranch} --to ${branchAttachment.gitBranch} --apply' first.`);
|
|
306
347
|
}
|
|
307
348
|
const prolog = requireProlog(context);
|
|
349
|
+
let sourceMutationLock;
|
|
350
|
+
let committed = false;
|
|
351
|
+
let operationFailure;
|
|
308
352
|
try {
|
|
353
|
+
if (context.fs && context.sourceMutationLockHeld !== true) {
|
|
354
|
+
sourceMutationLock = await acquireWorkspaceMutationLock(context.workspaceRoot);
|
|
355
|
+
}
|
|
309
356
|
const ids = input.ids ?? [];
|
|
310
357
|
const relationships = input.relationships ?? [];
|
|
311
358
|
if ((ids.length === 0) === (relationships.length === 0))
|
|
@@ -313,7 +360,9 @@ export async function executeDelete(input, context) {
|
|
|
313
360
|
if (relationships.length > 0) {
|
|
314
361
|
if (relationships.some((value) => !isSelector(value)))
|
|
315
362
|
throw new Error("Each relationship selector requires non-empty type, from, and to strings");
|
|
316
|
-
const payload = await executeRelationshipDelete(relationships, context)
|
|
363
|
+
const payload = await executeRelationshipDelete(relationships, { ...context, sourceMutationLockHeld: true }, () => {
|
|
364
|
+
committed = true;
|
|
365
|
+
});
|
|
317
366
|
return {
|
|
318
367
|
content: [
|
|
319
368
|
{
|
|
@@ -435,6 +484,7 @@ export async function executeDelete(input, context) {
|
|
|
435
484
|
await saveAtomicMutation(prolog, goals, "delete");
|
|
436
485
|
else
|
|
437
486
|
await saveMutation(prolog, "delete");
|
|
487
|
+
committed = true;
|
|
438
488
|
}
|
|
439
489
|
catch (error) {
|
|
440
490
|
for (const [source, body] of sourceBodies) {
|
|
@@ -458,6 +508,24 @@ export async function executeDelete(input, context) {
|
|
|
458
508
|
};
|
|
459
509
|
}
|
|
460
510
|
catch (error) {
|
|
461
|
-
|
|
511
|
+
// Typed operation errors keep their code and retryability. After the
|
|
512
|
+
// commit milestone, a generic failure is already a committed mutation:
|
|
513
|
+
// wrap it as non-retryable immediately instead of only when lock release
|
|
514
|
+
// also fails.
|
|
515
|
+
if (error instanceof OperationError || error instanceof InputError) {
|
|
516
|
+
operationFailure = { error };
|
|
517
|
+
throw error;
|
|
518
|
+
}
|
|
519
|
+
if (committed) {
|
|
520
|
+
const failure = classifySourceMutationFailure("Delete", error, true);
|
|
521
|
+
operationFailure = { error: failure };
|
|
522
|
+
throw failure;
|
|
523
|
+
}
|
|
524
|
+
const failure = new Error(`Delete execution failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
525
|
+
operationFailure = { error: failure };
|
|
526
|
+
throw failure;
|
|
527
|
+
}
|
|
528
|
+
finally {
|
|
529
|
+
releaseWorkspaceMutationLock(sourceMutationLock, operationFailure, committed);
|
|
462
530
|
}
|
|
463
531
|
}
|
|
@@ -2,6 +2,7 @@ import type { PrologPort } from "../../public/operations/runtime-types.js";
|
|
|
2
2
|
import type { RelationshipInput } from "./types.js";
|
|
3
3
|
export declare const RELATIONSHIP_TYPES: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "relates_to"];
|
|
4
4
|
export type RelationshipType = (typeof RELATIONSHIP_TYPES)[number];
|
|
5
|
+
export declare function wrongKindRelationshipError(type: string, target: string, wrongKind: string): Error;
|
|
5
6
|
export declare function dependentRelationshipsGoal(entityId: string): string;
|
|
6
7
|
type RelationshipTuple = {
|
|
7
8
|
readonly relType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/relationships.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,eAAO,MAAM,kBAAkB,8QAkBrB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAgCF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,iBAAiB,GACvB,MAAM,CAER;AAED,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAczE;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,SAAS,iBAAiB,EAAE,GAC1C,IAAI,CAMN;AAED,KAAK,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE1D,KAAK,qBAAqB,GAAG,QAAQ,CAAC;IACpC,mBAAmB,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC9E,UAAU,EAAE,CACV,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,KACf,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC,CAAC;AA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CACR,qBAAqB,EACrB,YAAY,CACqB,GAClC,iBAAiB,CAenB;AAGD,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE,qBAAuD,GAC5D,OAAO,CAAC,IAAI,CAAC,CAyCf;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,iBAAiB,GAC9B,MAAM,CAIR;AAuBD,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,aAAa,EAAE,SAAS,iBAAiB,EAAE,GAC1C,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,EAClB,aAAa,EAAE,SAAS,iBAAiB,EAAE,GAC1C,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAevC"}
|
|
@@ -20,6 +20,10 @@ export const RELATIONSHIP_TYPES = [
|
|
|
20
20
|
"supersedes",
|
|
21
21
|
"relates_to",
|
|
22
22
|
];
|
|
23
|
+
export function wrongKindRelationshipError(type, target, wrongKind) {
|
|
24
|
+
const expected = type === "constrains" ? "subject" : "property_value";
|
|
25
|
+
return new Error(`Relationship '${type}' requires target '${target}' to be a ${expected}, observation, or meta fact. ${wrongKind[0]?.toUpperCase()}${wrongKind.slice(1)} facts cannot be direct targets of ${type} relationships.`);
|
|
26
|
+
}
|
|
23
27
|
export function dependentRelationshipsGoal(entityId) {
|
|
24
28
|
return `findall([RelType,From], (member(RelType, [${RELATIONSHIP_TYPES.join(", ")}]), kb_relationship(RelType, From, '${escapeAtom(entityId)}')), Dependents)`;
|
|
25
29
|
}
|
|
@@ -192,10 +196,8 @@ export async function validateStrictLanePairing(prolog, relationships) {
|
|
|
192
196
|
if (wrongKind === null)
|
|
193
197
|
continue;
|
|
194
198
|
const result = await prolog.query(`once((kb_entity('${escapeAtom(target)}', fact, _SlpProps), memberchk(fact_kind=_SlpFK, _SlpProps), normalize_term_atom(_SlpFK, ${wrongKind})))`);
|
|
195
|
-
if (result.success)
|
|
196
|
-
|
|
197
|
-
throw new Error(`Relationship '${String(relationship.type)}' requires target '${target}' to be a ${expected}, observation, or meta fact. ${wrongKind[0]?.toUpperCase()}${wrongKind.slice(1)} facts cannot be direct targets of ${String(relationship.type)} relationships.`);
|
|
198
|
-
}
|
|
199
|
+
if (result.success)
|
|
200
|
+
throw wrongKindRelationshipError(String(relationship.type), target, wrongKind);
|
|
199
201
|
}
|
|
200
202
|
}
|
|
201
203
|
export async function existingRelationships(prolog, entityId) {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declared compensation list for multi-surface mutations.
|
|
3
|
+
*
|
|
4
|
+
* An upsert touches authored sources, relationship shards, generated
|
|
5
|
+
* coordinate artifacts, and the compiled KB — in that order — and a failed
|
|
6
|
+
* attempt must undo them in reverse order without masking the original
|
|
7
|
+
* failure. Instead of tracking rollback state in scattered locals, steps
|
|
8
|
+
* register a named rollback as they succeed; one rollback() call walks the
|
|
9
|
+
* list backwards exactly once.
|
|
10
|
+
*/
|
|
11
|
+
export type SagaStep = Readonly<{
|
|
12
|
+
/** Stable identifier used in rollback diagnostics. */
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Undo the step. Implementations should target idempotence (guards against
|
|
16
|
+
* concurrent writers, tolerating an already-restored surface); rollback()
|
|
17
|
+
* never re-throws a rollback error.
|
|
18
|
+
*/
|
|
19
|
+
rollback: () => void | Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* `swallow` (default): preserve the original mutation failure; the recovery
|
|
22
|
+
* journal / next check reconciles. `capture`: report the rollback failure
|
|
23
|
+
* alongside the original error (e.g. as an AggregateError).
|
|
24
|
+
*/
|
|
25
|
+
onError?: "swallow" | "capture";
|
|
26
|
+
}>;
|
|
27
|
+
export type SagaRollbackFailure = Readonly<{
|
|
28
|
+
step: string;
|
|
29
|
+
error: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
export declare class MutationSaga {
|
|
32
|
+
private readonly steps;
|
|
33
|
+
private rollbackCompleted;
|
|
34
|
+
private committedAt;
|
|
35
|
+
/** Register a completed step. Call only after the step fully succeeded. */
|
|
36
|
+
add(step: SagaStep): void;
|
|
37
|
+
/**
|
|
38
|
+
* The durable commit point: once marked, rollback() is a no-op — the
|
|
39
|
+
* compiled KB holds the change and post-commit failures surface as
|
|
40
|
+
* committed-with-repairs results instead of undoing committed state.
|
|
41
|
+
*/
|
|
42
|
+
markCommitted(): void;
|
|
43
|
+
get committed(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Roll back every registered step in reverse order, exactly once. Rollback
|
|
46
|
+
* errors never throw; capture-policy failures are returned so the caller
|
|
47
|
+
* can decide whether to aggregate them into the propagated error.
|
|
48
|
+
*/
|
|
49
|
+
rollback(): Promise<readonly SagaRollbackFailure[]>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=saga.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saga.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/saga.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;AAGH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CAAC,CAAC;AAGH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAGH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,WAAW,CAAuB;IAE1C,2EAA2E;IAE3E,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAIzB;;;;OAIG;IAEH,aAAa,IAAI,IAAI;IAKrB,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;IAEG,QAAQ,IAAI,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC;CAkB1D"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
(at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
// implements REQ-014
|
|
19
|
+
export class MutationSaga {
|
|
20
|
+
steps = [];
|
|
21
|
+
rollbackCompleted = false;
|
|
22
|
+
committedAt = null;
|
|
23
|
+
/** Register a completed step. Call only after the step fully succeeded. */
|
|
24
|
+
// implements REQ-014
|
|
25
|
+
add(step) {
|
|
26
|
+
this.steps.push(step);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The durable commit point: once marked, rollback() is a no-op — the
|
|
30
|
+
* compiled KB holds the change and post-commit failures surface as
|
|
31
|
+
* committed-with-repairs results instead of undoing committed state.
|
|
32
|
+
*/
|
|
33
|
+
// implements REQ-014
|
|
34
|
+
markCommitted() {
|
|
35
|
+
this.committedAt = this.steps.length;
|
|
36
|
+
}
|
|
37
|
+
// implements REQ-014
|
|
38
|
+
get committed() {
|
|
39
|
+
return this.committedAt !== null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Roll back every registered step in reverse order, exactly once. Rollback
|
|
43
|
+
* errors never throw; capture-policy failures are returned so the caller
|
|
44
|
+
* can decide whether to aggregate them into the propagated error.
|
|
45
|
+
*/
|
|
46
|
+
// implements REQ-014
|
|
47
|
+
async rollback() {
|
|
48
|
+
if (this.rollbackCompleted || this.committedAt !== null)
|
|
49
|
+
return [];
|
|
50
|
+
this.rollbackCompleted = true;
|
|
51
|
+
const captured = [];
|
|
52
|
+
for (const step of [...this.steps].reverse()) {
|
|
53
|
+
try {
|
|
54
|
+
await step.rollback();
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (step.onError === "capture") {
|
|
58
|
+
captured.push({ step: step.name, error });
|
|
59
|
+
}
|
|
60
|
+
// Swallow-policy failures keep the original mutation error intact;
|
|
61
|
+
// the recovery journal and the next check/sync report what could not
|
|
62
|
+
// be restored.
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return captured;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/serialization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/serialization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAoDpD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,MAAM,CAMR;AAGD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAOxE;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBtD"}
|
|
@@ -28,8 +28,9 @@ function serializeValue(key, value) {
|
|
|
28
28
|
}
|
|
29
29
|
if (key === "rule_ir" ||
|
|
30
30
|
key === "semantic_inventory" ||
|
|
31
|
-
key === "
|
|
32
|
-
key === "
|
|
31
|
+
key === "proof_contract" ||
|
|
32
|
+
key === "proof_bindings" ||
|
|
33
|
+
key === "proof_receipts") {
|
|
33
34
|
return toPrologString(JSON.stringify(value));
|
|
34
35
|
}
|
|
35
36
|
if (Array.isArray(value))
|
|
@@ -19,6 +19,10 @@ export declare function configuredSourceTarget(workspaceRoot: string, type: stri
|
|
|
19
19
|
export declare function hasConfiguredSourceTarget(workspaceRoot: string, type: string): boolean;
|
|
20
20
|
/** Generated coordinate fields belong exclusively to `.kb/symbol-coordinates.yaml`. */
|
|
21
21
|
export declare const GENERATED_SYMBOL_FIELDS: readonly ["sourceLine", "sourceColumn", "sourceEndLine", "sourceEndColumn", "coordinatesGeneratedAt"];
|
|
22
|
+
export declare function manifestRelationships(item: unknown): Array<{
|
|
23
|
+
type: string;
|
|
24
|
+
target: string;
|
|
25
|
+
}>;
|
|
22
26
|
export declare function renderSourceDeletion(sourcePathValue: string, entityId: string, entityType: string, existingContent: string): {
|
|
23
27
|
mode: "write" | "delete";
|
|
24
28
|
body?: string;
|
|
@@ -52,7 +56,7 @@ export declare function renderYamlRelationshipDeletion(sourcePathValue: string,
|
|
|
52
56
|
body: string;
|
|
53
57
|
removed: boolean;
|
|
54
58
|
};
|
|
55
|
-
export declare function writeSourceForUpsert(input: UpsertInput, entity: Readonly<Record<string, unknown>>, existing?: Readonly<Record<string, unknown>>, context?: OperationContext): Promise<{
|
|
59
|
+
export declare function writeSourceForUpsert(input: UpsertInput, entity: Readonly<Record<string, unknown>>, existing?: Readonly<Record<string, unknown>>, context?: OperationContext, sourceDocumentOverride?: string): Promise<{
|
|
56
60
|
receipt: SourceWriteReceipt;
|
|
57
61
|
rollback: () => Promise<void>;
|
|
58
62
|
} | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-authoring.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/source-authoring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-authoring.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/source-authoring.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAKjF,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAmBH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,IAAI,CAiBN;AAUD,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,MAAM,CAwCR;AAED,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,MAAM,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