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
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Predicate families added from consumer escalation evidence (Align
|
|
3
|
+
* dogfooding, 2026-08/09): fail-closed authorization, deployment
|
|
4
|
+
* preconditions, migration sequencing, diagnostic visibility, mutation
|
|
5
|
+
* authority, request deduplication, async boundaries, canonical
|
|
6
|
+
* identifiers, responsive breakpoints, and operational pauses.
|
|
7
|
+
*/
|
|
8
|
+
// implements REQ-mcp-suggest-predicates
|
|
9
|
+
export const PREDICATE_CATALOG_5 = [
|
|
10
|
+
{
|
|
11
|
+
id: "FACT-SCHEMA-FAIL-CLOSED-AUTHORIZATION-RULE",
|
|
12
|
+
predicate_name: "fail_closed_authorization_rule",
|
|
13
|
+
title: "Fail-closed authorization rule",
|
|
14
|
+
description: "On invalid, missing, or failed authorization input the subject must deny access or stay unauthenticated instead of falling back to a default identity.",
|
|
15
|
+
argument_names: ["subject", "trigger", "denied_outcome"],
|
|
16
|
+
argument_types: ["entity", "condition", "outcome"],
|
|
17
|
+
argument_descriptions: [
|
|
18
|
+
"Component or route that must fail closed.",
|
|
19
|
+
"Invalid, missing, or failed authorization condition.",
|
|
20
|
+
"Required denied outcome, such as staying unauthenticated or redirecting to login.",
|
|
21
|
+
],
|
|
22
|
+
keywords: [
|
|
23
|
+
"fail closed",
|
|
24
|
+
"fail-closed",
|
|
25
|
+
"deny",
|
|
26
|
+
"denied",
|
|
27
|
+
"unauthenticated",
|
|
28
|
+
"invalid role",
|
|
29
|
+
"missing role",
|
|
30
|
+
"default identity",
|
|
31
|
+
],
|
|
32
|
+
aliases: ["fail closed without creating", "must fail closed"],
|
|
33
|
+
examples: [
|
|
34
|
+
"fail_closed_authorization_rule(protected_routes, invalid_or_missing_fallback_role, stay_unauthenticated)",
|
|
35
|
+
],
|
|
36
|
+
tags: ["authorization", "security", "fail-closed"],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "FACT-SCHEMA-DEPLOYMENT-PRECONDITION-RULE",
|
|
40
|
+
predicate_name: "deployment_precondition_rule",
|
|
41
|
+
title: "Deployment precondition rule",
|
|
42
|
+
description: "A deployment or rollout must hold or abort until a named precondition holds, such as no unsupported legacy data remaining.",
|
|
43
|
+
argument_names: ["system", "precondition", "action"],
|
|
44
|
+
argument_types: ["entity", "condition", "outcome"],
|
|
45
|
+
argument_descriptions: [
|
|
46
|
+
"System, service, or release being deployed.",
|
|
47
|
+
"Precondition that must hold before deployment proceeds.",
|
|
48
|
+
"Required action when the precondition fails, such as holding deployment.",
|
|
49
|
+
],
|
|
50
|
+
keywords: [
|
|
51
|
+
"deployment",
|
|
52
|
+
"deploy",
|
|
53
|
+
"hold",
|
|
54
|
+
"precondition",
|
|
55
|
+
"unsupported data",
|
|
56
|
+
"abort",
|
|
57
|
+
"rollout",
|
|
58
|
+
],
|
|
59
|
+
aliases: ["deployment must hold", "block deployment"],
|
|
60
|
+
examples: [
|
|
61
|
+
"deployment_precondition_rule(annotation_storage, unsupported_legacy_rows_absent, hold_deployment)",
|
|
62
|
+
],
|
|
63
|
+
tags: ["deployment", "release", "precondition"],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "FACT-SCHEMA-DATA-MIGRATION-RULE",
|
|
67
|
+
predicate_name: "data_migration_rule",
|
|
68
|
+
title: "Data migration rule",
|
|
69
|
+
description: "Legacy data converts to the canonical form in a bounded, verified sequence, typically once and without data loss, before canonical-only operation begins.",
|
|
70
|
+
argument_names: ["legacy_surface", "canonical_surface", "sequencing"],
|
|
71
|
+
argument_types: ["entity", "entity", "action"],
|
|
72
|
+
argument_descriptions: [
|
|
73
|
+
"Legacy payload, table, or format being converted.",
|
|
74
|
+
"Canonical payload, table, or format produced by the conversion.",
|
|
75
|
+
"Sequencing contract, such as one-time conversion or conversion before canonical-only reads.",
|
|
76
|
+
],
|
|
77
|
+
keywords: [
|
|
78
|
+
"one-time conversion",
|
|
79
|
+
"converted once",
|
|
80
|
+
"no data loss",
|
|
81
|
+
"canonical",
|
|
82
|
+
"migration sequencing",
|
|
83
|
+
"conversion",
|
|
84
|
+
],
|
|
85
|
+
aliases: [
|
|
86
|
+
"converted once with no data loss",
|
|
87
|
+
"one-time persisted conversion",
|
|
88
|
+
],
|
|
89
|
+
examples: [
|
|
90
|
+
"data_migration_rule(fabricData, sceneData, one_time_conversion_before_canonical_only_reads)",
|
|
91
|
+
],
|
|
92
|
+
tags: ["migration", "data", "sequencing"],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "FACT-SCHEMA-DIAGNOSTIC-VISIBILITY-RULE",
|
|
96
|
+
predicate_name: "diagnostic_visibility_rule",
|
|
97
|
+
title: "Diagnostic visibility rule",
|
|
98
|
+
description: "Internal error and transport detail stays confined to logs or debugging surfaces while user-facing surfaces show actionable, friendly messages.",
|
|
99
|
+
argument_names: [
|
|
100
|
+
"subject",
|
|
101
|
+
"internal_detail",
|
|
102
|
+
"user_surface",
|
|
103
|
+
"log_surface",
|
|
104
|
+
],
|
|
105
|
+
argument_types: ["entity", "detail", "surface", "surface"],
|
|
106
|
+
argument_descriptions: [
|
|
107
|
+
"Flow or component whose diagnostics are governed.",
|
|
108
|
+
"Internal detail such as raw payloads, status lines, or backend errors.",
|
|
109
|
+
"User-facing surface and its required message style.",
|
|
110
|
+
"Log or debugging surface where internal detail is confined.",
|
|
111
|
+
],
|
|
112
|
+
keywords: [
|
|
113
|
+
"logged",
|
|
114
|
+
"log only",
|
|
115
|
+
"not shown",
|
|
116
|
+
"must not be shown",
|
|
117
|
+
"actionable",
|
|
118
|
+
"user-friendly",
|
|
119
|
+
"debugging",
|
|
120
|
+
"raw transport",
|
|
121
|
+
],
|
|
122
|
+
aliases: ["logged and must not be shown", "actionable error messages"],
|
|
123
|
+
examples: [
|
|
124
|
+
"diagnostic_visibility_rule(video_upload, tus_payload_and_http_status, friendly_terminal_recovery_message, server_logs)",
|
|
125
|
+
],
|
|
126
|
+
tags: ["errors", "diagnostics", "ux"],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "FACT-SCHEMA-MUTATION-AUTHORITY-RULE",
|
|
130
|
+
predicate_name: "mutation_authority_rule",
|
|
131
|
+
title: "Mutation authority rule",
|
|
132
|
+
description: "A client-facing surface exposes only its declared mutation scope; authority for other mutations stays server-side.",
|
|
133
|
+
argument_names: ["surface", "mutation_scope", "authority"],
|
|
134
|
+
argument_types: ["entity", "scope", "entity"],
|
|
135
|
+
argument_descriptions: [
|
|
136
|
+
"Client, view, API, or table surface being constrained.",
|
|
137
|
+
"Declared mutation scope, such as read-only or no direct writes.",
|
|
138
|
+
"Server-side authority, such as database triggers or an RPC, that owns other mutations.",
|
|
139
|
+
],
|
|
140
|
+
keywords: [
|
|
141
|
+
"read-only",
|
|
142
|
+
"read only",
|
|
143
|
+
"server-side",
|
|
144
|
+
"row-level security",
|
|
145
|
+
"rls",
|
|
146
|
+
"triggers",
|
|
147
|
+
"mutation",
|
|
148
|
+
],
|
|
149
|
+
aliases: ["read-only for the client", "must happen server-side"],
|
|
150
|
+
examples: [
|
|
151
|
+
"mutation_authority_rule(notifications_table, client_read_only, server_side_database_triggers)",
|
|
152
|
+
],
|
|
153
|
+
tags: ["security", "architecture", "api"],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "FACT-SCHEMA-REQUEST-DEDUPLICATION-RULE",
|
|
157
|
+
predicate_name: "request_deduplication_rule",
|
|
158
|
+
title: "Request deduplication rule",
|
|
159
|
+
description: "Concurrent duplicate requests for the same resource are coalesced into one underlying operation, preventing redundant work.",
|
|
160
|
+
argument_names: ["subject", "request", "scope"],
|
|
161
|
+
argument_types: ["entity", "action", "scope"],
|
|
162
|
+
argument_descriptions: [
|
|
163
|
+
"Component issuing the requests.",
|
|
164
|
+
"Request or query being deduplicated.",
|
|
165
|
+
"Scope of deduplication, such as the same user or key.",
|
|
166
|
+
],
|
|
167
|
+
keywords: [
|
|
168
|
+
"deduplicated",
|
|
169
|
+
"deduplication",
|
|
170
|
+
"dedupe",
|
|
171
|
+
"in-flight",
|
|
172
|
+
"coalesce",
|
|
173
|
+
"parallel requests",
|
|
174
|
+
"redundant",
|
|
175
|
+
],
|
|
176
|
+
aliases: ["must be deduplicated", "prevent redundant"],
|
|
177
|
+
examples: [
|
|
178
|
+
"request_deduplication_rule(profile_service, profile_fetch, same_user)",
|
|
179
|
+
],
|
|
180
|
+
tags: ["performance", "reliability"],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "FACT-SCHEMA-ASYNC-BOUNDARY-RULE",
|
|
184
|
+
predicate_name: "async_boundary_rule",
|
|
185
|
+
title: "Async boundary rule",
|
|
186
|
+
description: "A callback or handler must return synchronously, without awaiting, while work runs deferred or in the background.",
|
|
187
|
+
argument_names: ["subject", "operation", "execution_policy"],
|
|
188
|
+
argument_types: ["entity", "action", "policy"],
|
|
189
|
+
argument_descriptions: [
|
|
190
|
+
"Callback, handler, or API boundary.",
|
|
191
|
+
"Operation that must not block the caller.",
|
|
192
|
+
"Required policy, such as return synchronously or defer to background.",
|
|
193
|
+
],
|
|
194
|
+
keywords: [
|
|
195
|
+
"synchronously",
|
|
196
|
+
"return synchronously",
|
|
197
|
+
"not await",
|
|
198
|
+
"deferred",
|
|
199
|
+
"background",
|
|
200
|
+
"in flight",
|
|
201
|
+
"non-blocking",
|
|
202
|
+
],
|
|
203
|
+
aliases: ["must return synchronously", "without setting a loading state"],
|
|
204
|
+
examples: [
|
|
205
|
+
"async_boundary_rule(onAuthStateChange, supabase_client_operations, return_synchronously_defer_work)",
|
|
206
|
+
],
|
|
207
|
+
tags: ["async", "concurrency", "api"],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: "FACT-SCHEMA-CANONICAL-IDENTIFIER-RULE",
|
|
211
|
+
predicate_name: "canonical_identifier_rule",
|
|
212
|
+
title: "Canonical identifier rule",
|
|
213
|
+
description: "References to a domain entity must resolve through one canonical identifier or key.",
|
|
214
|
+
argument_names: ["domain", "canonical_key", "resolution"],
|
|
215
|
+
argument_types: ["entity", "key", "action"],
|
|
216
|
+
argument_descriptions: [
|
|
217
|
+
"Domain entity or flow being referenced.",
|
|
218
|
+
"The canonical identifier or key.",
|
|
219
|
+
"Required resolution behavior for routes, lookups, or messaging.",
|
|
220
|
+
],
|
|
221
|
+
keywords: [
|
|
222
|
+
"canonical id",
|
|
223
|
+
"canonical identifier",
|
|
224
|
+
"canonical",
|
|
225
|
+
"resolve against",
|
|
226
|
+
"single source of truth",
|
|
227
|
+
"videoid",
|
|
228
|
+
],
|
|
229
|
+
aliases: ["resolve against a canonical", "canonical identity"],
|
|
230
|
+
examples: [
|
|
231
|
+
"canonical_identifier_rule(review_routes_and_messaging, canonical_video_id, resolve_routes_against_canonical_id)",
|
|
232
|
+
],
|
|
233
|
+
tags: ["identity", "architecture"],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: "FACT-SCHEMA-RESPONSIVE-BREAKPOINT-RULE",
|
|
237
|
+
predicate_name: "responsive_breakpoint_rule",
|
|
238
|
+
title: "Responsive breakpoint rule",
|
|
239
|
+
description: "A viewport is classified by explicit responsive breakpoints, such as landscape phones counting as mobile below a height threshold.",
|
|
240
|
+
argument_names: ["subject", "viewport", "classification"],
|
|
241
|
+
argument_types: ["entity", "condition", "category"],
|
|
242
|
+
argument_descriptions: [
|
|
243
|
+
"UI or layout being classified.",
|
|
244
|
+
"Viewport condition with explicit dimensions.",
|
|
245
|
+
"Resulting classification, such as mobile or desktop.",
|
|
246
|
+
],
|
|
247
|
+
keywords: [
|
|
248
|
+
"breakpoint",
|
|
249
|
+
"landscape",
|
|
250
|
+
"portrait",
|
|
251
|
+
"viewport",
|
|
252
|
+
"responsive",
|
|
253
|
+
"mobile",
|
|
254
|
+
"width",
|
|
255
|
+
"height",
|
|
256
|
+
],
|
|
257
|
+
aliases: ["treat as mobile", "counts as mobile"],
|
|
258
|
+
examples: [
|
|
259
|
+
"responsive_breakpoint_rule(app_shell, height_below_768px_in_landscape, mobile)",
|
|
260
|
+
],
|
|
261
|
+
tags: ["ui", "responsive", "layout"],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: "FACT-SCHEMA-OPERATIONAL-PAUSE-RULE",
|
|
265
|
+
predicate_name: "operational_pause_rule",
|
|
266
|
+
title: "Operational pause rule",
|
|
267
|
+
description: "An operational pause or kill switch blocks new operations of a kind while preserving already-started or completed work.",
|
|
268
|
+
argument_names: ["subject", "blocked_action", "preserved_action"],
|
|
269
|
+
argument_types: ["entity", "action", "action"],
|
|
270
|
+
argument_descriptions: [
|
|
271
|
+
"Operational control being paused.",
|
|
272
|
+
"New operations the pause must block.",
|
|
273
|
+
"Existing work the pause must preserve, such as resumable sessions.",
|
|
274
|
+
],
|
|
275
|
+
keywords: [
|
|
276
|
+
"pause",
|
|
277
|
+
"paused",
|
|
278
|
+
"kill switch",
|
|
279
|
+
"block new",
|
|
280
|
+
"preserve",
|
|
281
|
+
"resumable",
|
|
282
|
+
"suspend",
|
|
283
|
+
],
|
|
284
|
+
aliases: ["upload pause", "operational pause"],
|
|
285
|
+
examples: [
|
|
286
|
+
"operational_pause_rule(uploads, new_upload_sessions, existing_and_resumable_sessions)",
|
|
287
|
+
],
|
|
288
|
+
tags: ["operations", "safety"],
|
|
289
|
+
// implements REQ-mcp-suggest-predicates
|
|
290
|
+
},
|
|
291
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-catalog.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicate-catalog.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-catalog.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,mBAAmB,EAAE,mBAOjC,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAKxE,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,wBAAwB,EAMhE,CAAC"}
|
|
@@ -2,9 +2,11 @@ import { PREDICATE_CATALOG_1 } from "./predicate-catalog-1.js";
|
|
|
2
2
|
import { PREDICATE_CATALOG_2 } from "./predicate-catalog-2.js";
|
|
3
3
|
import { PREDICATE_CATALOG_3 } from "./predicate-catalog-3.js";
|
|
4
4
|
import { PREDICATE_CATALOG_4 } from "./predicate-catalog-4.js";
|
|
5
|
+
import { PREDICATE_CATALOG_5 } from "./predicate-catalog-5.js";
|
|
5
6
|
import { PREDICATE_USAGE_HINTS_1 } from "./predicate-usage-hints-1.js";
|
|
6
7
|
import { PREDICATE_USAGE_HINTS_2 } from "./predicate-usage-hints-2.js";
|
|
7
8
|
import { PREDICATE_USAGE_HINTS_3 } from "./predicate-usage-hints-3.js";
|
|
9
|
+
import { PREDICATE_USAGE_HINTS_4 } from "./predicate-usage-hints-4.js";
|
|
8
10
|
// implements REQ-mcp-suggest-predicates
|
|
9
11
|
export const DEFAULT_USAGE_HINTS = {
|
|
10
12
|
use_when: [
|
|
@@ -19,6 +21,7 @@ export const USAGE_HINTS_BY_PREDICATE = {
|
|
|
19
21
|
...PREDICATE_USAGE_HINTS_1,
|
|
20
22
|
...PREDICATE_USAGE_HINTS_2,
|
|
21
23
|
...PREDICATE_USAGE_HINTS_3,
|
|
24
|
+
...PREDICATE_USAGE_HINTS_4,
|
|
22
25
|
};
|
|
23
26
|
// implements REQ-mcp-suggest-predicates
|
|
24
27
|
export const BUILT_IN_PREDICATE_SCHEMAS = [
|
|
@@ -26,4 +29,5 @@ export const BUILT_IN_PREDICATE_SCHEMAS = [
|
|
|
26
29
|
...PREDICATE_CATALOG_2,
|
|
27
30
|
...PREDICATE_CATALOG_3,
|
|
28
31
|
...PREDICATE_CATALOG_4,
|
|
32
|
+
...PREDICATE_CATALOG_5,
|
|
29
33
|
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PrologPort } from "../../public/operations/runtime-types.js";
|
|
2
2
|
import type { PredicateSchemaCandidate, PredicateUsageHints } from "./predicate-types.js";
|
|
3
|
+
export declare function optionalPredicateName(value: unknown): string | undefined;
|
|
3
4
|
export declare function schemaForCandidate(schema: PredicateSchemaCandidate): Omit<PredicateSchemaCandidate, "keywords"> & {
|
|
4
5
|
usage_hints: PredicateUsageHints;
|
|
5
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-loader.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAK3E,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"predicate-loader.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAK3E,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAG9B,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAExE;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CACxE,wBAAwB,EACxB,UAAU,CACX,GAAG;IACF,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAsBA;AAGD,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,sBAAsB,EAAE,OAAO,EAC/B,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAwBrC;AAGD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,wBAAwB,EAAE,CAmC5B;AAGD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,mBAAmB,GAAG,SAAS,CAOjC;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAQpD"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { parseEntityFromList, parseListOfLists } from "../../prolog/codec.js";
|
|
2
2
|
import { DEFAULT_USAGE_HINTS, USAGE_HINTS_BY_PREDICATE, } from "./predicate-catalog.js";
|
|
3
3
|
import { hashId, normalizeOptionalString } from "./predicate-utils.js";
|
|
4
|
+
export function optionalPredicateName(value) {
|
|
5
|
+
return typeof value === "string" ? value : undefined;
|
|
6
|
+
}
|
|
4
7
|
// implements REQ-mcp-suggest-predicates
|
|
5
8
|
export function schemaForCandidate(schema) {
|
|
6
9
|
return {
|
|
@@ -49,9 +52,7 @@ export async function loadExistingPredicateSchemas(prolog, includeExistingSchema
|
|
|
49
52
|
export function predicateSchemaFromEntity(entity) {
|
|
50
53
|
if (entity.fact_kind !== "predicate_schema")
|
|
51
54
|
return [];
|
|
52
|
-
const predicateName = normalizeOptionalString(
|
|
53
|
-
? entity.predicate_name
|
|
54
|
-
: undefined);
|
|
55
|
+
const predicateName = normalizeOptionalString(optionalPredicateName(entity.predicate_name));
|
|
55
56
|
if (!predicateName)
|
|
56
57
|
return [];
|
|
57
58
|
const usageHints = usageHintsFromEntity(entity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-ranker.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-ranker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAsJ9B,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,wBAAwB,kEAEnE;AAKD,wBAAgB,UAAU,CACxB,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,MAAM,GACX,qBAAqB,
|
|
1
|
+
{"version":3,"file":"predicate-ranker.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-ranker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAsJ9B,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,wBAAwB,kEAEnE;AAKD,wBAAgB,UAAU,CACxB,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,MAAM,GACX,qBAAqB,CA+EvB;AAID,wBAAgB,WAAW,CACzB,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,MAAM,GACX,MAAM,CAER"}
|
|
@@ -150,8 +150,11 @@ export function rankSchema(schema, text) {
|
|
|
150
150
|
const morphologyHits = schema.keywords.filter((keyword) => textTokens.map(stem).includes(stem(keyword.toLowerCase()))).length;
|
|
151
151
|
const specificity = specificityBonus(schema);
|
|
152
152
|
let total;
|
|
153
|
-
if (exact !== null) {
|
|
153
|
+
if (exact !== null && exact > 0) {
|
|
154
154
|
// Exact structural matches retain the established deterministic score.
|
|
155
|
+
// An exact score of 0 means the predicate's rigid pattern did not match;
|
|
156
|
+
// it is a miss, not a veto: lexical evidence still competes for
|
|
157
|
+
// retrieval and the semantic applicability gate remains the authority.
|
|
155
158
|
total = exact;
|
|
156
159
|
}
|
|
157
160
|
else if (keywordHits === 0 &&
|
|
@@ -95,7 +95,7 @@ export interface SuggestPredicatesResult {
|
|
|
95
95
|
requirementId: string | null;
|
|
96
96
|
subject: string;
|
|
97
97
|
candidates: PredicateSuggestion[];
|
|
98
|
-
recommendedAction: "apply_requires_predicate" | "provide_argument_bindings" | "resolve_schema_reference" | "record_ontology_gap";
|
|
98
|
+
recommendedAction: "apply_requires_predicate" | "provide_argument_bindings" | "resolve_schema_reference" | "record_ontology_gap" | "review_nonlogical";
|
|
99
99
|
recommendedPredicateSchema: RecommendedPredicateSchema | null;
|
|
100
100
|
applyPlan: Array<Record<string, unknown>>;
|
|
101
101
|
relationshipPlan: Record<string, unknown> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-types.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGlD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAA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ED,MAAM,WAAW,0BAA0B;IACzC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,mBAAmB,EAAE,CAAC;QAClC,iBAAiB,EACb,0BAA0B,GAC1B,2BAA2B,GAC3B,0BAA0B,GAC1B,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"predicate-types.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGlD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAGD,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IAC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AK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAkFvE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// implements REQ-mcp-suggest-predicates
|
|
2
|
+
export const PREDICATE_USAGE_HINTS_4 = {
|
|
3
|
+
fail_closed_authorization_rule: {
|
|
4
|
+
use_when: [
|
|
5
|
+
"Use when invalid, missing, or failed authorization input must deny access or stay unauthenticated.",
|
|
6
|
+
],
|
|
7
|
+
do_not_use_when: [
|
|
8
|
+
"Do not use when a degraded dependency legitimately falls back to a named alternative behavior.",
|
|
9
|
+
],
|
|
10
|
+
},
|
|
11
|
+
deployment_precondition_rule: {
|
|
12
|
+
use_when: [
|
|
13
|
+
"Use when a deployment or rollout must hold or abort until a named precondition holds.",
|
|
14
|
+
],
|
|
15
|
+
do_not_use_when: [
|
|
16
|
+
"Do not use for feature flags, checkout flows, or ordinary release test gates.",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
data_migration_rule: {
|
|
20
|
+
use_when: [
|
|
21
|
+
"Use when legacy data converts to a canonical form once, without data loss, before canonical-only operation.",
|
|
22
|
+
],
|
|
23
|
+
do_not_use_when: [
|
|
24
|
+
"Do not use for a standing boundary that only permits legacy reads as migration input.",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
diagnostic_visibility_rule: {
|
|
28
|
+
use_when: [
|
|
29
|
+
"Use when internal error or transport detail must stay in logs while users see actionable messages.",
|
|
30
|
+
],
|
|
31
|
+
do_not_use_when: [
|
|
32
|
+
"Do not use for audit-trail requirements or consent handling.",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
mutation_authority_rule: {
|
|
36
|
+
use_when: [
|
|
37
|
+
"Use when a client surface is read-only or scoped and a server-side authority owns the other mutations.",
|
|
38
|
+
],
|
|
39
|
+
do_not_use_when: [
|
|
40
|
+
"Do not use for individual permission denials such as delete or export rights.",
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
request_deduplication_rule: {
|
|
44
|
+
use_when: [
|
|
45
|
+
"Use when concurrent duplicate requests for the same resource must coalesce into one operation.",
|
|
46
|
+
],
|
|
47
|
+
do_not_use_when: [
|
|
48
|
+
"Do not use for per-window rate limits or batch-size constraints.",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
async_boundary_rule: {
|
|
52
|
+
use_when: [
|
|
53
|
+
"Use when a callback must return synchronously while work runs deferred or in the background.",
|
|
54
|
+
],
|
|
55
|
+
do_not_use_when: [
|
|
56
|
+
"Do not use for timeout durations or request rate constraints.",
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
canonical_identifier_rule: {
|
|
60
|
+
use_when: [
|
|
61
|
+
"Use when references to a domain entity must resolve through one canonical identifier or key.",
|
|
62
|
+
],
|
|
63
|
+
do_not_use_when: [
|
|
64
|
+
"Do not use for renderer neutrality or legacy-format boundaries.",
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
responsive_breakpoint_rule: {
|
|
68
|
+
use_when: [
|
|
69
|
+
"Use when explicit viewport dimensions determine a responsive classification such as mobile.",
|
|
70
|
+
],
|
|
71
|
+
do_not_use_when: [
|
|
72
|
+
"Do not use for server-side size limits or database constraints.",
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
operational_pause_rule: {
|
|
76
|
+
use_when: [
|
|
77
|
+
"Use when an operational pause blocks new work of a kind while preserving existing or resumable work.",
|
|
78
|
+
],
|
|
79
|
+
do_not_use_when: [
|
|
80
|
+
"Do not use for soft deletion or data preservation rules without an operational switch.",
|
|
81
|
+
],
|
|
82
|
+
// implements REQ-mcp-suggest-predicates
|
|
83
|
+
},
|
|
84
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { OperationContext, PrologPort } from "../../public/operations/runtime-types.js";
|
|
2
|
-
import type { SuggestPredicatesArgs, SuggestPredicatesResult } from "./predicate-types.js";
|
|
2
|
+
import type { PredicateSuggestion, SuggestPredicatesArgs, SuggestPredicatesResult } from "./predicate-types.js";
|
|
3
3
|
export type { BindingProvenance, PredicateScoreComponents, PredicateSuggestion, RecommendedPredicateSchema, SuggestPredicatesArgs, SuggestPredicatesResult, } from "./predicate-types.js";
|
|
4
|
+
export declare function compareEligibleByApplicabilityThenName(left: Pick<PredicateSuggestion, "applicability_score" | "predicate_name">, right: Pick<PredicateSuggestion, "applicability_score" | "predicate_name">): number;
|
|
5
|
+
export declare function compareEligibleByApplicabilityScoreThenName(left: Pick<PredicateSuggestion, "applicability_score" | "score" | "predicate_name">, right: Pick<PredicateSuggestion, "applicability_score" | "score" | "predicate_name">): number;
|
|
4
6
|
export declare function handleKbSuggestPredicates(prolog: PrologPort | null, args: SuggestPredicatesArgs): Promise<SuggestPredicatesResult>;
|
|
5
7
|
export declare function executeSuggestPredicates(args: SuggestPredicatesArgs, context: OperationContext): Promise<SuggestPredicatesResult>;
|
|
6
8
|
//# sourceMappingURL=suggest-predicates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AAmBlD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AAmBlD,OAAO,KAAK,EAEV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAoG9B,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,EACzE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,GACzE,MAAM,CAIR;AAED,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,IAAI,CACR,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,EACD,KAAK,EAAE,IAAI,CACT,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,GACA,MAAM,CAKR;AAqCD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CAgLlC;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
|
|
@@ -14,15 +14,14 @@ const NON_ASSERTIVE_PROPOSITION_ROLES = new Set([
|
|
|
14
14
|
"example",
|
|
15
15
|
"subjective",
|
|
16
16
|
]);
|
|
17
|
-
function
|
|
18
|
-
|
|
17
|
+
function analyzeInputPropositions(text) {
|
|
18
|
+
return analyzeSemanticAdvisorInput({
|
|
19
19
|
payload: {
|
|
20
20
|
type: "req",
|
|
21
21
|
id: "REQ-KIBI-PREDICATE-SUGGESTION-INPUT",
|
|
22
22
|
properties: { semantic_text: text },
|
|
23
23
|
},
|
|
24
|
-
});
|
|
25
|
-
return analysis.receipt.propositions.filter((proposition) => !NON_ASSERTIVE_PROPOSITION_ROLES.has(proposition.role)).length;
|
|
24
|
+
}).receipt.propositions;
|
|
26
25
|
}
|
|
27
26
|
function compoundInputAbstention(args, text, subject, propositionCount) {
|
|
28
27
|
const claimKey = semanticClaimKey(text);
|
|
@@ -52,6 +51,34 @@ function compoundInputAbstention(args, text, subject, propositionCount) {
|
|
|
52
51
|
applyPlan,
|
|
53
52
|
};
|
|
54
53
|
}
|
|
54
|
+
function nonlogicalInputRouting(args, text, subject) {
|
|
55
|
+
const claimKey = semanticClaimKey(text);
|
|
56
|
+
const warning = "The semantic advisor classifies this prose as nonlogical (rationale, example, or subjective context); it does not assert a verifiable domain proposition. Advisor routing wins: no predicate candidates, schema draft, or write plan were generated, and the claim was not added to logic_claims.";
|
|
57
|
+
const applyPlan = [];
|
|
58
|
+
return {
|
|
59
|
+
content: [
|
|
60
|
+
{
|
|
61
|
+
type: "text",
|
|
62
|
+
text: "Predicate suggestion abstained because the semantic advisor classifies this prose as nonlogical (rationale, example, or subjective context). Keep it outside logic_claims; no candidate, ontology-gap observation, or schema draft was generated.",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
structuredContent: {
|
|
66
|
+
text,
|
|
67
|
+
claimKey,
|
|
68
|
+
logicClaims: Array.from(new Set(args.existingLogicClaims ?? [])),
|
|
69
|
+
source: args.source ?? null,
|
|
70
|
+
requirementId: args.requirementId ?? null,
|
|
71
|
+
subject,
|
|
72
|
+
candidates: [],
|
|
73
|
+
recommendedAction: "review_nonlogical",
|
|
74
|
+
recommendedPredicateSchema: null,
|
|
75
|
+
applyPlan,
|
|
76
|
+
relationshipPlan: null,
|
|
77
|
+
warnings: [warning],
|
|
78
|
+
},
|
|
79
|
+
applyPlan,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
55
82
|
function uniqueSchemas(schemas) {
|
|
56
83
|
const seen = new Set();
|
|
57
84
|
return schemas.filter((schema) => {
|
|
@@ -62,14 +89,22 @@ function uniqueSchemas(schemas) {
|
|
|
62
89
|
return true;
|
|
63
90
|
});
|
|
64
91
|
}
|
|
92
|
+
export function compareEligibleByApplicabilityThenName(left, right) {
|
|
93
|
+
if (right.applicability_score !== left.applicability_score)
|
|
94
|
+
return right.applicability_score - left.applicability_score;
|
|
95
|
+
return left.predicate_name.localeCompare(right.predicate_name);
|
|
96
|
+
}
|
|
97
|
+
export function compareEligibleByApplicabilityScoreThenName(left, right) {
|
|
98
|
+
if (right.applicability_score !== left.applicability_score)
|
|
99
|
+
return right.applicability_score - left.applicability_score;
|
|
100
|
+
if (right.score !== left.score)
|
|
101
|
+
return right.score - left.score;
|
|
102
|
+
return left.predicate_name.localeCompare(right.predicate_name);
|
|
103
|
+
}
|
|
65
104
|
function withMarginRejection(candidates) {
|
|
66
105
|
const eligible = candidates
|
|
67
106
|
.filter((candidate) => candidate.eligibility === "eligible")
|
|
68
|
-
.sort(
|
|
69
|
-
if (right.applicability_score !== left.applicability_score)
|
|
70
|
-
return right.applicability_score - left.applicability_score;
|
|
71
|
-
return left.predicate_name.localeCompare(right.predicate_name);
|
|
72
|
-
});
|
|
107
|
+
.sort(compareEligibleByApplicabilityThenName);
|
|
73
108
|
const top = eligible[0];
|
|
74
109
|
const second = eligible[1];
|
|
75
110
|
if (!top ||
|
|
@@ -97,9 +132,13 @@ function withMarginRejection(candidates) {
|
|
|
97
132
|
export async function handleKbSuggestPredicates(prolog, args) {
|
|
98
133
|
const text = normalizeText(args.text);
|
|
99
134
|
const subject = inferSubject(text, args.subjectHint);
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
const propositions = analyzeInputPropositions(text);
|
|
136
|
+
const assertivePropositionCount = propositions.filter((proposition) => !NON_ASSERTIVE_PROPOSITION_ROLES.has(proposition.role)).length;
|
|
137
|
+
if (propositions.length > 0 && assertivePropositionCount === 0) {
|
|
138
|
+
return nonlogicalInputRouting(args, text, subject);
|
|
139
|
+
}
|
|
140
|
+
if (assertivePropositionCount > 1) {
|
|
141
|
+
return compoundInputAbstention(args, text, subject, assertivePropositionCount);
|
|
103
142
|
}
|
|
104
143
|
const maxCandidates = clampInteger(args.maxCandidates, DEFAULT_MAX_CANDIDATES, 1, 20);
|
|
105
144
|
const minScore = clampScore(args.minScore ?? DEFAULT_MIN_SCORE);
|
|
@@ -163,13 +202,7 @@ export async function handleKbSuggestPredicates(prolog, args) {
|
|
|
163
202
|
: [];
|
|
164
203
|
const recommendedCandidate = candidates
|
|
165
204
|
.filter((candidate) => candidate.eligibility === "eligible")
|
|
166
|
-
.sort(
|
|
167
|
-
if (right.applicability_score !== left.applicability_score)
|
|
168
|
-
return right.applicability_score - left.applicability_score;
|
|
169
|
-
if (right.score !== left.score)
|
|
170
|
-
return right.score - left.score;
|
|
171
|
-
return left.predicate_name.localeCompare(right.predicate_name);
|
|
172
|
-
})[0];
|
|
205
|
+
.sort(compareEligibleByApplicabilityScoreThenName)[0];
|
|
173
206
|
if (candidates.length === 0 && !args.schemaId) {
|
|
174
207
|
warnings.push("No predicate candidate met minScore. If this is recurring domain language, create a fact_kind=predicate_schema fact; otherwise keep the generated review:ontology-gap observation. Do not invent unsupported predicate names without a predicate_schema.");
|
|
175
208
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PrologErrorRecord } from "../../prolog/error-terms.js";
|
|
1
2
|
import type { RelationshipInput } from "./types.js";
|
|
2
3
|
type TransactionInput = {
|
|
3
4
|
readonly entity: Readonly<Record<string, unknown>>;
|
|
@@ -5,6 +6,6 @@ type TransactionInput = {
|
|
|
5
6
|
readonly skipContradictionCheck: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare function buildUpsertCommitGoal(input: TransactionInput): string;
|
|
8
|
-
export declare function formatUpsertError(entityId: string, raw?: string): string;
|
|
9
|
+
export declare function formatUpsertError(entityId: string, raw?: string, record?: PrologErrorRecord): string;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=contradictions.d.ts.map
|