kibi-cli 2.1.0 → 2.3.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-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +3 -0
- package/dist/cli-operation-metadata.d.ts +4 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +5 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +4 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-diff.d.ts +5 -0
- package/dist/commands/check-diff.d.ts.map +1 -0
- package/dist/commands/check-diff.js +62 -0
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +41 -18
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +231 -86
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +168 -53
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +10 -3
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +123 -23
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +10 -18
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +3 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +41 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +377 -80
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +66 -28
- package/dist/extractors/markdown.d.ts +2 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +14 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +7 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +75 -39
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -29
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +176 -10
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-inference-1.js +1 -1
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +213 -52
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +77 -11
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +66 -26
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +3 -1
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +208 -74
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +7 -5
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +7 -5
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +7 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +26 -4
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +7 -1
- package/dist/performance-trace.d.ts +17 -0
- package/dist/performance-trace.d.ts.map +1 -0
- package/dist/performance-trace.js +134 -0
- package/dist/plugins/approved-source-analyzers.d.ts +13 -0
- package/dist/plugins/approved-source-analyzers.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts +71 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.js +77 -0
- package/dist/plugins/approved-source-analyzers.js +3 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +6 -1
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -1
- package/dist/plugins/compose-semantic-classifier.js +8 -3
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +7 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -1
- package/dist/plugins/external-allowlist.js +13 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/maintenance-source-analysis.d.ts +14 -0
- package/dist/plugins/maintenance-source-analysis.d.ts.map +1 -0
- package/dist/plugins/maintenance-source-analysis.js +191 -0
- package/dist/plugins/registry.d.ts +3 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +27 -1
- package/dist/plugins/source-analysis-service.d.ts +36 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +184 -27
- package/dist/plugins/source-change-analysis.d.ts +15 -0
- package/dist/plugins/source-change-analysis.d.ts.map +1 -0
- package/dist/plugins/source-change-analysis.js +54 -0
- package/dist/plugins/source-classification.d.ts +41 -0
- package/dist/plugins/source-classification.d.ts.map +1 -0
- package/dist/plugins/source-classification.js +490 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/swipl-resolver.d.ts +88 -0
- package/dist/prolog/swipl-resolver.d.ts.map +1 -0
- package/dist/prolog/swipl-resolver.js +446 -0
- package/dist/prolog.d.ts +51 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +145 -15
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +56 -5
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +3 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +15 -1
- package/dist/public/impact/source-changes.d.ts.map +1 -1
- package/dist/public/impact/source-changes.js +35 -27
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +80 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +10 -2
- package/dist/public/operations/check-helpers.d.ts +6 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +21 -1
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +325 -8
- package/dist/public/operations/discovery-entities.d.ts +42 -2
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +195 -22
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +75 -46
- package/dist/public/operations/impact-review-preparation.d.ts +14 -0
- package/dist/public/operations/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/impact-review-preparation.js +379 -0
- package/dist/public/operations/index.d.ts +2 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +2 -0
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +1 -35
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +9 -3
- package/dist/public/operations/proof-receipt-projection.d.ts +5 -0
- package/dist/public/operations/proof-receipt-projection.d.ts.map +1 -0
- package/dist/public/operations/proof-receipt-projection.js +36 -0
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +1 -1
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +8 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +7 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +7 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +47 -0
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/specs/impact-review-preparation.js +43 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/reporting.d.ts +8 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -15
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +8 -3
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +7 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/analysis-gate.d.ts +39 -0
- package/dist/traceability/analysis-gate.d.ts.map +1 -0
- package/dist/traceability/analysis-gate.js +51 -0
- package/dist/traceability/git-change-snapshot.d.ts +27 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -0
- package/dist/traceability/git-change-snapshot.js +411 -0
- package/dist/traceability/git-staged.d.ts +5 -1
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +16 -11
- package/dist/traceability/impact-evaluator.d.ts +54 -0
- package/dist/traceability/impact-evaluator.d.ts.map +1 -0
- package/dist/traceability/impact-evaluator.js +270 -0
- package/dist/traceability/impact-git-tree.d.ts +12 -0
- package/dist/traceability/impact-git-tree.d.ts.map +1 -0
- package/dist/traceability/impact-git-tree.js +46 -0
- package/dist/traceability/impact-knowledge.d.ts +16 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -0
- package/dist/traceability/impact-knowledge.js +165 -0
- package/dist/traceability/impact-policy.d.ts +15 -0
- package/dist/traceability/impact-policy.d.ts.map +1 -0
- package/dist/traceability/impact-policy.js +48 -0
- package/dist/traceability/impact-policy.v1.schema.json +48 -0
- package/dist/traceability/impact-pr-diff.d.ts +5 -0
- package/dist/traceability/impact-pr-diff.d.ts.map +1 -0
- package/dist/traceability/impact-pr-diff.js +83 -0
- package/dist/traceability/impact-record-validation.d.ts +9 -0
- package/dist/traceability/impact-record-validation.d.ts.map +1 -0
- package/dist/traceability/impact-record-validation.js +113 -0
- package/dist/traceability/impact-review.d.ts +148 -0
- package/dist/traceability/impact-review.d.ts.map +1 -0
- package/dist/traceability/impact-review.js +494 -0
- package/dist/traceability/impact-review.schema.json +365 -0
- package/dist/traceability/impact-side-evidence.d.ts +13 -0
- package/dist/traceability/impact-side-evidence.d.ts.map +1 -0
- package/dist/traceability/impact-side-evidence.js +240 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +10 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +1 -0
- package/dist/traceability/reviewed-coordinate-refresh.js +49 -0
- package/dist/traceability/snapshot-knowledge.d.ts +4 -0
- package/dist/traceability/snapshot-knowledge.d.ts.map +1 -0
- package/dist/traceability/snapshot-knowledge.js +98 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/staged-file-coverage.d.ts +23 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +2 -16
- package/dist/traceability/staged-symbols-manifest.d.ts +4 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +17 -6
- package/dist/traceability/symbol-extract.d.ts +3 -5
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +49 -34
- package/dist/traceability/temp-kb.d.ts +1 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +57 -13
- package/dist/traceability/trusted-pr-event.d.ts +13 -0
- package/dist/traceability/trusted-pr-event.d.ts.map +1 -0
- package/dist/traceability/trusted-pr-event.js +105 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/canonical-path.d.ts +3 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +33 -0
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +37 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +44 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -5
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/impact/analyzer.ts +88 -5
- package/src/public/impact/diagnostics.ts +7 -5
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/impact/manifest.ts +14 -1
- package/src/public/impact/source-changes.ts +39 -34
- package/src/public/impact/types.ts +5 -0
- package/src/public/operations/catalog.ts +2 -0
- package/src/public/operations/check-executor.ts +12 -1
- package/src/public/operations/check-helpers.ts +27 -1
- package/src/public/operations/contracts.ts +404 -9
- package/src/public/operations/discovery-entities.ts +292 -23
- package/src/public/operations/discovery-executors.ts +91 -55
- package/src/public/operations/impact-review-preparation.ts +548 -0
- package/src/public/operations/index.ts +2 -0
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/node-ports.ts +1 -39
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +9 -3
- package/src/public/operations/proof-receipt-projection.ts +39 -0
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +1 -1
- package/src/public/operations/specs/check-rules.generated.ts +8 -1
- package/src/public/operations/specs/discovery.ts +8 -1
- package/src/public/operations/specs/impact-review-preparation.ts +46 -0
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/reporting.ts +69 -22
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +13 -3
- package/src/public/operations/types.ts +1 -0
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +7 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
- package/src/traceability/impact-policy.v1.schema.json +48 -0
- package/src/traceability/impact-review.schema.json +365 -0
- package/templates/github/kibi-badge.yml +0 -4
- package/templates/github/kibi-report.yml +0 -4
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type SwiplSource = "env" | "bundled" | "path";
|
|
2
|
+
export type ResolvedSwipl = {
|
|
3
|
+
/** Absolute path to the executable. */
|
|
4
|
+
bin: string;
|
|
5
|
+
/** SWI_HOME_DIR for a bundled build. */
|
|
6
|
+
home?: string;
|
|
7
|
+
/** Upstream SWI-Prolog version, e.g. "10.0.2". */
|
|
8
|
+
version: string;
|
|
9
|
+
source: SwiplSource;
|
|
10
|
+
};
|
|
11
|
+
export declare const MINIMUM_SWIPL_MAJOR = 9;
|
|
12
|
+
export type SwiplResolutionErrorCode = "swipl_not_found" | "swipl_env_invalid" | "swipl_bundle_corrupt";
|
|
13
|
+
/** Structured failure; `message` is the complete operator-facing guidance. */
|
|
14
|
+
export declare class SwiplResolutionError extends Error {
|
|
15
|
+
readonly code: SwiplResolutionErrorCode;
|
|
16
|
+
/** Detected host, e.g. "linux-x64 (glibc)". */
|
|
17
|
+
readonly platform: string;
|
|
18
|
+
/** Platform package that would have covered this host, when one exists. */
|
|
19
|
+
readonly packageName: string | undefined;
|
|
20
|
+
constructor(code: SwiplResolutionErrorCode, message: string, platform: string, packageName: string | undefined);
|
|
21
|
+
}
|
|
22
|
+
export type SwiplResolverDeps = {
|
|
23
|
+
platform: string;
|
|
24
|
+
arch: string;
|
|
25
|
+
/** True on glibc Linux, false on musl, undefined off Linux. */
|
|
26
|
+
glibc: boolean | undefined;
|
|
27
|
+
/** Directory of an installed platform package, or undefined. */
|
|
28
|
+
locatePackage: (packageName: string) => string | undefined;
|
|
29
|
+
/** Output of `<bin> --version`; throws when the executable cannot run. */
|
|
30
|
+
runVersion: (bin: string) => string;
|
|
31
|
+
};
|
|
32
|
+
/** Parse `SWI-Prolog version 10.0.2 for x86_64-linux` into its version. */
|
|
33
|
+
export declare function parseSwiplVersion(output: string): {
|
|
34
|
+
version: string;
|
|
35
|
+
major: number;
|
|
36
|
+
} | undefined;
|
|
37
|
+
/** Uncached resolution with injectable host facts; the test seam. */
|
|
38
|
+
export declare function resolveSwiplWith(env: NodeJS.ProcessEnv, deps: SwiplResolverDeps): ResolvedSwipl;
|
|
39
|
+
/**
|
|
40
|
+
* Resolve the SWI-Prolog executable for this process. The result is cached for
|
|
41
|
+
* the lifetime of the process, keyed by the inputs that select it.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveSwipl(env?: NodeJS.ProcessEnv): ResolvedSwipl;
|
|
44
|
+
/** Test seam: forget every cached resolution. */
|
|
45
|
+
export declare function resetSwiplResolverCache(): void;
|
|
46
|
+
/** Stable identity of a resolved runtime, compared across engine processes. */
|
|
47
|
+
export declare function swiplIdentity(resolved: ResolvedSwipl): string;
|
|
48
|
+
/** Environment additions a child needs to run the resolved SWI-Prolog. */
|
|
49
|
+
export declare function swiplChildEnv(resolved: Pick<ResolvedSwipl, "home">): Record<string, string>;
|
|
50
|
+
export type BundleStatus = {
|
|
51
|
+
state: "unsupported";
|
|
52
|
+
} | {
|
|
53
|
+
state: "missing" | "empty";
|
|
54
|
+
packageName: string;
|
|
55
|
+
} | {
|
|
56
|
+
state: "corrupt";
|
|
57
|
+
packageName: string;
|
|
58
|
+
reason: string;
|
|
59
|
+
} | {
|
|
60
|
+
state: "installed";
|
|
61
|
+
packageName: string;
|
|
62
|
+
};
|
|
63
|
+
/** Report the bundled package's state without resolving a runtime. */
|
|
64
|
+
export declare function inspectSwiplBundle(deps?: SwiplResolverDeps): BundleStatus;
|
|
65
|
+
/** Libraries Kibi loads at runtime; a SWI-Prolog lacking one cannot serve it. */
|
|
66
|
+
export declare const REQUIRED_SWIPL_LIBRARIES: readonly ["semweb/rdf_db", "semweb/rdf_persistency", "semweb/sparql_client", "pcre", "crypto", "sha", "http/json", "http/json_convert", "chr", "clpfd", "thread", "persistency", "filesex", "readutil", "date", "aggregate", "solution_sequences"];
|
|
67
|
+
export type SwiplGoalRunner = (bin: string, args: readonly string[], env: NodeJS.ProcessEnv) => {
|
|
68
|
+
status: number | null;
|
|
69
|
+
stdout: string;
|
|
70
|
+
stderr: string;
|
|
71
|
+
error?: Error;
|
|
72
|
+
};
|
|
73
|
+
export type LibraryProbe = {
|
|
74
|
+
kind: "ok";
|
|
75
|
+
} | {
|
|
76
|
+
kind: "missing";
|
|
77
|
+
libraries: string[];
|
|
78
|
+
} | {
|
|
79
|
+
kind: "failed";
|
|
80
|
+
detail: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Load every required library in one throwaway SWI-Prolog process and report
|
|
84
|
+
* the ones that fail. A probe that cannot run is reported as such, never as a
|
|
85
|
+
* pass.
|
|
86
|
+
*/
|
|
87
|
+
export declare function probeRequiredLibraries(resolved: ResolvedSwipl, run?: SwiplGoalRunner, env?: NodeJS.ProcessEnv): LibraryProbe;
|
|
88
|
+
//# sourceMappingURL=swipl-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipl-resolver.d.ts","sourceRoot":"","sources":["../../src/prolog/swipl-resolver.ts"],"names":[],"mappings":"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;AAqB9E,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GACd;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,aAAa,EACvB,GAAG,GAAE,eAAmC,EACxC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,YAAY,CAuBd"}
|
|
@@ -0,0 +1,446 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Resolves the SWI-Prolog executable Kibi runs, in this order:
|
|
12
|
+
*
|
|
13
|
+
* 1. `KIBI_SWIPL=<absolute path>` (an explicit operator choice always wins).
|
|
14
|
+
* 2. The bundled platform package (`kibi-swipl-<platform>`), after its build
|
|
15
|
+
* manifest and binary checksum verify. `KIBI_SWIPL=system` skips this step.
|
|
16
|
+
* 3. `swipl` on `PATH`, subject to the SWI-Prolog 9.0 minimum.
|
|
17
|
+
* 4. Otherwise an error naming the platform, the platform package that would
|
|
18
|
+
* have covered it, and the OS install command.
|
|
19
|
+
*/
|
|
20
|
+
import { execFileSync, spawnSync } from "node:child_process";
|
|
21
|
+
import { constants, accessSync, existsSync, readFileSync, statSync, } from "node:fs";
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
import { BUNDLED_BINARY_PATH, MANIFEST_FILE, PLATFORM_PACKAGES, locatePlatformPackage, platformKey, sha256File, validateBuildManifest, } from "kibi-swipl";
|
|
24
|
+
export const MINIMUM_SWIPL_MAJOR = 9;
|
|
25
|
+
/** Structured failure; `message` is the complete operator-facing guidance. */
|
|
26
|
+
export class SwiplResolutionError extends Error {
|
|
27
|
+
code;
|
|
28
|
+
/** Detected host, e.g. "linux-x64 (glibc)". */
|
|
29
|
+
platform;
|
|
30
|
+
/** Platform package that would have covered this host, when one exists. */
|
|
31
|
+
packageName;
|
|
32
|
+
constructor(code, message, platform, packageName) {
|
|
33
|
+
super(message);
|
|
34
|
+
this.name = "SwiplResolutionError";
|
|
35
|
+
this.code = code;
|
|
36
|
+
this.platform = platform;
|
|
37
|
+
this.packageName = packageName;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function detectGlibc() {
|
|
41
|
+
if (process.platform !== "linux")
|
|
42
|
+
return undefined;
|
|
43
|
+
try {
|
|
44
|
+
const report = process.report?.getReport?.();
|
|
45
|
+
if (report !== undefined) {
|
|
46
|
+
return typeof report.header?.glibcVersionRuntime === "string";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
// Fall back to the musl loader probe below.
|
|
51
|
+
}
|
|
52
|
+
return !["/lib/ld-musl-x86_64.so.1", "/lib/ld-musl-aarch64.so.1"].some((loader) => existsSync(loader));
|
|
53
|
+
}
|
|
54
|
+
function defaultRunVersion(bin) {
|
|
55
|
+
return execFileSync(bin, ["--version"], {
|
|
56
|
+
encoding: "utf8",
|
|
57
|
+
timeout: 10_000,
|
|
58
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function defaultDeps() {
|
|
62
|
+
return {
|
|
63
|
+
platform: process.platform,
|
|
64
|
+
arch: process.arch,
|
|
65
|
+
glibc: detectGlibc(),
|
|
66
|
+
locatePackage: (name) => locatePlatformPackage(name),
|
|
67
|
+
runVersion: defaultRunVersion,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/** Parse `SWI-Prolog version 10.0.2 for x86_64-linux` into its version. */
|
|
71
|
+
export function parseSwiplVersion(output) {
|
|
72
|
+
const match = /version\s+(\d+)\.(\d+)(?:\.(\d+))?/i.exec(output);
|
|
73
|
+
if (match === null)
|
|
74
|
+
return undefined;
|
|
75
|
+
const [, major, minor, patch] = match;
|
|
76
|
+
return {
|
|
77
|
+
version: `${major}.${minor}${patch === undefined ? "" : `.${patch}`}`,
|
|
78
|
+
major: Number.parseInt(major ?? "0", 10),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function installCommand(platform) {
|
|
82
|
+
if (platform === "linux") {
|
|
83
|
+
return "sudo apt-add-repository ppa:swi-prolog/stable && sudo apt-get update && sudo apt-get install swi-prolog";
|
|
84
|
+
}
|
|
85
|
+
if (platform === "darwin")
|
|
86
|
+
return "brew install swi-prolog";
|
|
87
|
+
return "download the installer from https://www.swi-prolog.org/download/stable and add swipl to PATH";
|
|
88
|
+
}
|
|
89
|
+
function hostLabel(deps) {
|
|
90
|
+
const libc = deps.platform === "linux" && deps.glibc !== undefined
|
|
91
|
+
? ` (${deps.glibc ? "glibc" : "musl"})`
|
|
92
|
+
: "";
|
|
93
|
+
return `${deps.platform}-${deps.arch}${libc}`;
|
|
94
|
+
}
|
|
95
|
+
function isExecutableFile(candidate) {
|
|
96
|
+
try {
|
|
97
|
+
if (!statSync(candidate).isFile())
|
|
98
|
+
return false;
|
|
99
|
+
accessSync(candidate, constants.X_OK);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function inspectBundle(deps) {
|
|
107
|
+
const key = platformKey({
|
|
108
|
+
platform: deps.platform,
|
|
109
|
+
arch: deps.arch,
|
|
110
|
+
glibc: deps.glibc,
|
|
111
|
+
});
|
|
112
|
+
if (key === undefined)
|
|
113
|
+
return { kind: "unsupported" };
|
|
114
|
+
const packageName = PLATFORM_PACKAGES[key].package;
|
|
115
|
+
const packageDir = deps.locatePackage(packageName);
|
|
116
|
+
if (packageDir === undefined)
|
|
117
|
+
return { kind: "missing", key, packageName };
|
|
118
|
+
const manifestPath = path.join(packageDir, MANIFEST_FILE);
|
|
119
|
+
const binary = path.join(packageDir, BUNDLED_BINARY_PATH);
|
|
120
|
+
if (!existsSync(manifestPath)) {
|
|
121
|
+
// A workspace checkout links the package without the pipeline payload.
|
|
122
|
+
// A binary without a manifest is a damaged install, not a placeholder.
|
|
123
|
+
if (!existsSync(binary))
|
|
124
|
+
return { kind: "empty", key, packageName };
|
|
125
|
+
return {
|
|
126
|
+
kind: "corrupt",
|
|
127
|
+
key,
|
|
128
|
+
packageName,
|
|
129
|
+
reason: `${MANIFEST_FILE} is missing next to ${BUNDLED_BINARY_PATH}`,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const corrupt = (reason) => ({
|
|
133
|
+
kind: "corrupt",
|
|
134
|
+
key,
|
|
135
|
+
packageName,
|
|
136
|
+
reason,
|
|
137
|
+
});
|
|
138
|
+
let manifest;
|
|
139
|
+
let packageJson;
|
|
140
|
+
try {
|
|
141
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
return corrupt(`${MANIFEST_FILE} is not valid JSON (${error instanceof Error ? error.message : String(error)})`);
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
packageJson = JSON.parse(readFileSync(path.join(packageDir, "package.json"), "utf8"));
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
return corrupt(`package.json is unreadable (${error instanceof Error ? error.message : String(error)})`);
|
|
151
|
+
}
|
|
152
|
+
const packageVersion = packageJson.kibi?.swiplVersion;
|
|
153
|
+
const checked = validateBuildManifest(manifest, {
|
|
154
|
+
target: key,
|
|
155
|
+
swiplVersion: typeof packageVersion === "string" ? packageVersion : undefined,
|
|
156
|
+
});
|
|
157
|
+
if (!checked.ok)
|
|
158
|
+
return corrupt(checked.reason);
|
|
159
|
+
if (!isExecutableFile(binary)) {
|
|
160
|
+
return corrupt(`${BUNDLED_BINARY_PATH} is missing or not executable`);
|
|
161
|
+
}
|
|
162
|
+
let actual;
|
|
163
|
+
try {
|
|
164
|
+
actual = sha256File(binary);
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
return corrupt(`${BUNDLED_BINARY_PATH} is unreadable (${error instanceof Error ? error.message : String(error)})`);
|
|
168
|
+
}
|
|
169
|
+
if (actual !== checked.binarySha256) {
|
|
170
|
+
return corrupt(`${BUNDLED_BINARY_PATH} SHA-256 ${actual} does not match the manifest (${checked.binarySha256})`);
|
|
171
|
+
}
|
|
172
|
+
const home = path.join(packageDir, checked.home);
|
|
173
|
+
let homeIsDirectory = false;
|
|
174
|
+
try {
|
|
175
|
+
homeIsDirectory = statSync(home).isDirectory();
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// reported below
|
|
179
|
+
}
|
|
180
|
+
if (!homeIsDirectory)
|
|
181
|
+
return corrupt(`${checked.home} is missing`);
|
|
182
|
+
return {
|
|
183
|
+
kind: "ok",
|
|
184
|
+
key,
|
|
185
|
+
packageName,
|
|
186
|
+
resolved: {
|
|
187
|
+
bin: binary,
|
|
188
|
+
home,
|
|
189
|
+
version: checked.swiplVersion,
|
|
190
|
+
source: "bundled",
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function probeVersion(bin, deps) {
|
|
195
|
+
let output;
|
|
196
|
+
try {
|
|
197
|
+
output = deps.runVersion(bin);
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
return {
|
|
201
|
+
kind: "unusable",
|
|
202
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const parsed = parseSwiplVersion(output);
|
|
206
|
+
if (parsed === undefined) {
|
|
207
|
+
return {
|
|
208
|
+
kind: "unusable",
|
|
209
|
+
detail: `unrecognized --version output ${JSON.stringify(output.trim().slice(0, 80))}`,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
if (parsed.major < MINIMUM_SWIPL_MAJOR) {
|
|
213
|
+
return { kind: "too-old", version: parsed.version };
|
|
214
|
+
}
|
|
215
|
+
return { kind: "ok", version: parsed.version };
|
|
216
|
+
}
|
|
217
|
+
function findOnPath(env, deps) {
|
|
218
|
+
for (const directory of (env.PATH ?? "").split(path.delimiter)) {
|
|
219
|
+
if (directory === "" || !path.isAbsolute(directory))
|
|
220
|
+
continue;
|
|
221
|
+
const candidate = path.join(directory, "swipl");
|
|
222
|
+
if (!isExecutableFile(candidate))
|
|
223
|
+
continue;
|
|
224
|
+
const probe = probeVersion(candidate, deps);
|
|
225
|
+
if (probe.kind === "ok") {
|
|
226
|
+
return {
|
|
227
|
+
kind: "ok",
|
|
228
|
+
resolved: { bin: candidate, version: probe.version, source: "path" },
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
return probe.kind === "too-old"
|
|
232
|
+
? { kind: "too-old", bin: candidate, version: probe.version }
|
|
233
|
+
: { kind: "unusable", bin: candidate, detail: probe.detail };
|
|
234
|
+
}
|
|
235
|
+
return { kind: "absent" };
|
|
236
|
+
}
|
|
237
|
+
function resolveFromEnv(override, deps) {
|
|
238
|
+
const platform = hostLabel(deps);
|
|
239
|
+
const key = platformKey({
|
|
240
|
+
platform: deps.platform,
|
|
241
|
+
arch: deps.arch,
|
|
242
|
+
glibc: deps.glibc,
|
|
243
|
+
});
|
|
244
|
+
const packageName = key === undefined ? undefined : PLATFORM_PACKAGES[key].package;
|
|
245
|
+
const invalid = (detail) => new SwiplResolutionError("swipl_env_invalid", `KIBI_SWIPL=${override} ${detail}. Set KIBI_SWIPL to the absolute path of a SWI-Prolog ${MINIMUM_SWIPL_MAJOR}.0+ executable, to "system" to use swipl from PATH, or unset it to use the bundled runtime.`, platform, packageName);
|
|
246
|
+
if (!path.isAbsolute(override))
|
|
247
|
+
return fail(invalid("is not an absolute path"));
|
|
248
|
+
if (!isExecutableFile(override)) {
|
|
249
|
+
return fail(invalid("is not an executable file"));
|
|
250
|
+
}
|
|
251
|
+
const probe = probeVersion(override, deps);
|
|
252
|
+
if (probe.kind === "unusable") {
|
|
253
|
+
return fail(invalid(`could not report its version (${probe.detail})`));
|
|
254
|
+
}
|
|
255
|
+
if (probe.kind === "too-old") {
|
|
256
|
+
return fail(invalid(`is SWI-Prolog ${probe.version}, but ${MINIMUM_SWIPL_MAJOR}.0 or newer is required`));
|
|
257
|
+
}
|
|
258
|
+
return { bin: override, version: probe.version, source: "env" };
|
|
259
|
+
}
|
|
260
|
+
function fail(error) {
|
|
261
|
+
throw error;
|
|
262
|
+
}
|
|
263
|
+
function notFoundError(deps, bundle, lookup) {
|
|
264
|
+
const platform = hostLabel(deps);
|
|
265
|
+
const command = installCommand(deps.platform);
|
|
266
|
+
const lines = [
|
|
267
|
+
`Kibi could not find a usable SWI-Prolog (${MINIMUM_SWIPL_MAJOR}.0 or newer is required).`,
|
|
268
|
+
`Detected platform: ${platform}.`,
|
|
269
|
+
];
|
|
270
|
+
let packageName;
|
|
271
|
+
if (bundle === "skipped") {
|
|
272
|
+
lines.push("Bundled SWI-Prolog: skipped because KIBI_SWIPL=system.");
|
|
273
|
+
const key = platformKey({
|
|
274
|
+
platform: deps.platform,
|
|
275
|
+
arch: deps.arch,
|
|
276
|
+
glibc: deps.glibc,
|
|
277
|
+
});
|
|
278
|
+
if (key !== undefined)
|
|
279
|
+
packageName = PLATFORM_PACKAGES[key].package;
|
|
280
|
+
}
|
|
281
|
+
else if (bundle.kind === "unsupported") {
|
|
282
|
+
lines.push(`Bundled SWI-Prolog: no bundled build exists for ${platform} (supported: ${Object.keys(PLATFORM_PACKAGES).join(", ")}).`);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
packageName = bundle.packageName;
|
|
286
|
+
if (bundle.kind === "empty") {
|
|
287
|
+
lines.push(`Bundled SWI-Prolog: package ${bundle.packageName} is installed but carries no runtime (a source checkout that was not populated from a release build).`);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
lines.push(`Bundled SWI-Prolog: package ${bundle.packageName} would cover this platform but is not installed. It is skipped by installs that omit optional dependencies (npm --omit=optional, --no-optional) and by pnpm supportedArchitectures settings that exclude this platform.`);
|
|
291
|
+
lines.push(` Add it with: npm install --save-dev ${bundle.packageName}`);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (bundle === "skipped" && packageName !== undefined) {
|
|
295
|
+
lines.push(` To use it, unset KIBI_SWIPL and install ${packageName}.`);
|
|
296
|
+
}
|
|
297
|
+
switch (lookup.kind) {
|
|
298
|
+
case "absent":
|
|
299
|
+
lines.push("System SWI-Prolog: swipl was not found on PATH.");
|
|
300
|
+
break;
|
|
301
|
+
case "too-old":
|
|
302
|
+
lines.push(`System SWI-Prolog: swipl on PATH (${lookup.bin}) is version ${lookup.version}, older than ${MINIMUM_SWIPL_MAJOR}.0.`);
|
|
303
|
+
break;
|
|
304
|
+
case "unusable":
|
|
305
|
+
lines.push(`System SWI-Prolog: swipl on PATH (${lookup.bin}) could not report its version (${lookup.detail}).`);
|
|
306
|
+
break;
|
|
307
|
+
case "ok":
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
lines.push(` Install it with: ${command}`);
|
|
311
|
+
lines.push(`Or set KIBI_SWIPL to the absolute path of a SWI-Prolog ${MINIMUM_SWIPL_MAJOR}.0+ executable.`);
|
|
312
|
+
return new SwiplResolutionError("swipl_not_found", lines.join("\n"), platform, packageName);
|
|
313
|
+
}
|
|
314
|
+
/** Uncached resolution with injectable host facts; the test seam. */
|
|
315
|
+
export function resolveSwiplWith(env, deps) {
|
|
316
|
+
const override = env.KIBI_SWIPL?.trim() ?? "";
|
|
317
|
+
if (override !== "" && override !== "system") {
|
|
318
|
+
return resolveFromEnv(override, deps);
|
|
319
|
+
}
|
|
320
|
+
let bundle = "skipped";
|
|
321
|
+
if (override === "") {
|
|
322
|
+
bundle = inspectBundle(deps);
|
|
323
|
+
if (bundle.kind === "ok")
|
|
324
|
+
return bundle.resolved;
|
|
325
|
+
if (bundle.kind === "corrupt") {
|
|
326
|
+
throw new SwiplResolutionError("swipl_bundle_corrupt", [
|
|
327
|
+
`The bundled SWI-Prolog package ${bundle.packageName} is damaged: ${bundle.reason}.`,
|
|
328
|
+
`Detected platform: ${hostLabel(deps)}.`,
|
|
329
|
+
`Reinstall it (for example: npm install --save-dev ${bundle.packageName}), or set KIBI_SWIPL=system to use swipl from PATH instead.`,
|
|
330
|
+
].join("\n"), hostLabel(deps), bundle.packageName);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
const lookup = findOnPath(env, deps);
|
|
334
|
+
if (lookup.kind === "ok")
|
|
335
|
+
return lookup.resolved;
|
|
336
|
+
throw notFoundError(deps, bundle, lookup);
|
|
337
|
+
}
|
|
338
|
+
const cache = new Map();
|
|
339
|
+
/**
|
|
340
|
+
* Resolve the SWI-Prolog executable for this process. The result is cached for
|
|
341
|
+
* the lifetime of the process, keyed by the inputs that select it.
|
|
342
|
+
*/
|
|
343
|
+
export function resolveSwipl(env = process.env) {
|
|
344
|
+
const key = `${env.KIBI_SWIPL ?? ""}\0${env.PATH ?? ""}`;
|
|
345
|
+
const cached = cache.get(key);
|
|
346
|
+
if (cached !== undefined)
|
|
347
|
+
return cached;
|
|
348
|
+
const resolved = resolveSwiplWith(env, defaultDeps());
|
|
349
|
+
cache.set(key, resolved);
|
|
350
|
+
return resolved;
|
|
351
|
+
}
|
|
352
|
+
/** Test seam: forget every cached resolution. */
|
|
353
|
+
export function resetSwiplResolverCache() {
|
|
354
|
+
cache.clear();
|
|
355
|
+
}
|
|
356
|
+
/** Stable identity of a resolved runtime, compared across engine processes. */
|
|
357
|
+
export function swiplIdentity(resolved) {
|
|
358
|
+
return `${resolved.bin}@${resolved.version}`;
|
|
359
|
+
}
|
|
360
|
+
/** Environment additions a child needs to run the resolved SWI-Prolog. */
|
|
361
|
+
export function swiplChildEnv(resolved) {
|
|
362
|
+
return resolved.home === undefined ? {} : { SWI_HOME_DIR: resolved.home };
|
|
363
|
+
}
|
|
364
|
+
/** Report the bundled package's state without resolving a runtime. */
|
|
365
|
+
export function inspectSwiplBundle(deps = defaultDeps()) {
|
|
366
|
+
const bundle = inspectBundle(deps);
|
|
367
|
+
switch (bundle.kind) {
|
|
368
|
+
case "unsupported":
|
|
369
|
+
return { state: "unsupported" };
|
|
370
|
+
case "missing":
|
|
371
|
+
case "empty":
|
|
372
|
+
return { state: bundle.kind, packageName: bundle.packageName };
|
|
373
|
+
case "corrupt":
|
|
374
|
+
return {
|
|
375
|
+
state: "corrupt",
|
|
376
|
+
packageName: bundle.packageName,
|
|
377
|
+
reason: bundle.reason,
|
|
378
|
+
};
|
|
379
|
+
case "ok":
|
|
380
|
+
return { state: "installed", packageName: bundle.packageName };
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/** Libraries Kibi loads at runtime; a SWI-Prolog lacking one cannot serve it. */
|
|
384
|
+
export const REQUIRED_SWIPL_LIBRARIES = [
|
|
385
|
+
"semweb/rdf_db",
|
|
386
|
+
"semweb/rdf_persistency",
|
|
387
|
+
"semweb/sparql_client",
|
|
388
|
+
"pcre",
|
|
389
|
+
"crypto",
|
|
390
|
+
"sha",
|
|
391
|
+
"http/json",
|
|
392
|
+
"http/json_convert",
|
|
393
|
+
"chr",
|
|
394
|
+
"clpfd",
|
|
395
|
+
"thread",
|
|
396
|
+
"persistency",
|
|
397
|
+
"filesex",
|
|
398
|
+
"readutil",
|
|
399
|
+
"date",
|
|
400
|
+
"aggregate",
|
|
401
|
+
"solution_sequences",
|
|
402
|
+
];
|
|
403
|
+
const MISSING_LIBRARY_MARKER = "__KIBI_MISSING_LIBRARY__:";
|
|
404
|
+
function defaultGoalRunner(bin, args, env) {
|
|
405
|
+
const result = spawnSync(bin, [...args], {
|
|
406
|
+
encoding: "utf8",
|
|
407
|
+
timeout: 60_000,
|
|
408
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
409
|
+
env,
|
|
410
|
+
});
|
|
411
|
+
return {
|
|
412
|
+
status: result.status,
|
|
413
|
+
stdout: result.stdout ?? "",
|
|
414
|
+
stderr: result.stderr ?? "",
|
|
415
|
+
...(result.error === undefined ? {} : { error: result.error }),
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Load every required library in one throwaway SWI-Prolog process and report
|
|
420
|
+
* the ones that fail. A probe that cannot run is reported as such, never as a
|
|
421
|
+
* pass.
|
|
422
|
+
*/
|
|
423
|
+
export function probeRequiredLibraries(resolved, run = defaultGoalRunner, env = process.env) {
|
|
424
|
+
const goal = `forall(member(L, [${REQUIRED_SWIPL_LIBRARIES.join(", ")}]), (catch(use_module(library(L)), _, fail) -> true ; format("${MISSING_LIBRARY_MARKER}~w~n", [L])))`;
|
|
425
|
+
const result = run(resolved.bin, ["-q", "-g", goal, "-t", "halt"], {
|
|
426
|
+
...env,
|
|
427
|
+
...swiplChildEnv(resolved),
|
|
428
|
+
});
|
|
429
|
+
if (result.error !== undefined) {
|
|
430
|
+
return { kind: "failed", detail: result.error.message };
|
|
431
|
+
}
|
|
432
|
+
if (result.status !== 0) {
|
|
433
|
+
const detail = result.stderr.trim().split("\n")[0] ?? "";
|
|
434
|
+
return {
|
|
435
|
+
kind: "failed",
|
|
436
|
+
detail: `exit status ${result.status ?? "none"}${detail === "" ? "" : `: ${detail}`}`,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
const libraries = result.stdout
|
|
440
|
+
.split("\n")
|
|
441
|
+
.filter((line) => line.startsWith(MISSING_LIBRARY_MARKER))
|
|
442
|
+
.map((line) => line.slice(MISSING_LIBRARY_MARKER.length).trim());
|
|
443
|
+
return libraries.length === 0
|
|
444
|
+
? { kind: "ok" }
|
|
445
|
+
: { kind: "missing", libraries };
|
|
446
|
+
}
|
package/dist/prolog.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { type PrologErrorRecord } from "./prolog/error-terms.js";
|
|
2
|
+
import { type ResolvedSwipl } from "./prolog/swipl-resolver.js";
|
|
2
3
|
export declare function resolveKbPlPath(): string;
|
|
3
4
|
export interface PrologOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Explicit SWI-Prolog executable. When omitted, the executable comes from
|
|
7
|
+
* the resolver (KIBI_SWIPL, the bundled platform package, then PATH).
|
|
8
|
+
*/
|
|
4
9
|
swiplPath?: string;
|
|
10
|
+
/** Resolver seam for tests; defaults to the per-process SWI-Prolog resolver. */
|
|
11
|
+
swiplResolver?: () => ResolvedSwipl;
|
|
5
12
|
timeout?: number;
|
|
6
13
|
/**
|
|
7
14
|
* Force one-shot SWI execution. Production callers are Node-only and keep
|
|
@@ -9,6 +16,23 @@ export interface PrologOptions {
|
|
|
9
16
|
* repository tests that still run under Bun.
|
|
10
17
|
*/
|
|
11
18
|
oneShot?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Bounded stdout/stderr capacity per query. Defaults to 8 MiB; tests inject
|
|
21
|
+
* a small cap to exercise the overflow path deterministically.
|
|
22
|
+
*/
|
|
23
|
+
maxOutputBytes?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Raised when a query reaches an interactive process that was started and
|
|
27
|
+
* later terminated (output overflow, timeout, crash, or explicit terminate).
|
|
28
|
+
* Such a port must be restarted by its owner (the engine daemon recycles it);
|
|
29
|
+
* it never degrades into isolated one-shot SWI processes, which would lose
|
|
30
|
+
* the attached KB and every module loaded into the interactive session.
|
|
31
|
+
*/
|
|
32
|
+
export declare class PrologProcessTerminatedError extends Error {
|
|
33
|
+
readonly code = "prolog_process_terminated";
|
|
34
|
+
readonly reason: string;
|
|
35
|
+
constructor(reason: string);
|
|
12
36
|
}
|
|
13
37
|
export interface QueryResult {
|
|
14
38
|
success: boolean;
|
|
@@ -20,7 +44,8 @@ export declare function registerProcessExitOnce(current: (() => void) | null, ha
|
|
|
20
44
|
export declare function bindProcessExitHandler(current: (() => void) | null, terminate: () => void | Promise<void>, on?: (event: "exit", listener: () => void) => void): () => void;
|
|
21
45
|
export declare class PrologProcess {
|
|
22
46
|
private process;
|
|
23
|
-
private
|
|
47
|
+
private explicitSwiplPath;
|
|
48
|
+
private readonly swiplResolver;
|
|
24
49
|
private timeout;
|
|
25
50
|
private outputBuffer;
|
|
26
51
|
private outputBufferBytes;
|
|
@@ -34,8 +59,32 @@ export declare class PrologProcess {
|
|
|
34
59
|
private useOneShotMode;
|
|
35
60
|
private attachedKbPath;
|
|
36
61
|
private onProcessExit;
|
|
62
|
+
private readonly maxOutputBytes;
|
|
63
|
+
/**
|
|
64
|
+
* Set once start() spawned an interactive process. From then on the
|
|
65
|
+
* isolated one-shot fallback is unreachable: a lost interactive process
|
|
66
|
+
* must fail loudly instead of silently changing execution semantics.
|
|
67
|
+
*/
|
|
68
|
+
private interactiveStarted;
|
|
69
|
+
private terminationReason;
|
|
37
70
|
constructor(options?: PrologOptions);
|
|
38
71
|
attachProcessExitHandler(on?: (event: "exit", listener: () => void) => void): void;
|
|
72
|
+
/**
|
|
73
|
+
* True when every query runs in its own isolated SWI process, so callers
|
|
74
|
+
* must not rely on state (loaded modules) carried between queries.
|
|
75
|
+
*/
|
|
76
|
+
get oneShotMode(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* True once a started interactive process has been lost. The owner must
|
|
79
|
+
* restart it (and re-establish its session state) before querying again.
|
|
80
|
+
*/
|
|
81
|
+
needsRestart(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The executable and SWI home to launch. An explicit `swiplPath` is used
|
|
84
|
+
* verbatim; otherwise the per-process resolver decides, so a missing or
|
|
85
|
+
* damaged runtime fails with its complete remediation text.
|
|
86
|
+
*/
|
|
87
|
+
private launchTarget;
|
|
39
88
|
start(): Promise<void>;
|
|
40
89
|
private waitForReady;
|
|
41
90
|
query(goal: string | string[]): Promise<QueryResult>;
|
|
@@ -63,6 +112,7 @@ export declare class PrologProcess {
|
|
|
63
112
|
private translateError;
|
|
64
113
|
isRunning(): boolean;
|
|
65
114
|
getPid(): number;
|
|
115
|
+
private lostProcessError;
|
|
66
116
|
terminate(): Promise<void>;
|
|
67
117
|
}
|
|
68
118
|
//# sourceMappingURL=prolog.d.ts.map
|
package/dist/prolog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,4BAA4B,CAAC;AA2BpC,wBAAgB,eAAe,IAAI,MAAM,CAsCxC;AACD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,QAAQ,CAAC,IAAI,+BAA+B;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;CAO3B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAGD,wBAAgB,uBAAuB,CACrC,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