kibi-cli 0.18.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-json-command.d.ts +1 -2
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +2 -34
- package/dist/cli-operation-loader.d.ts +3 -0
- package/dist/cli-operation-loader.d.ts.map +1 -0
- package/dist/cli-operation-loader.js +91 -0
- package/dist/cli-operation-metadata.d.ts +94 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -0
- package/dist/cli-operation-metadata.js +121 -0
- package/dist/cli-protocol.d.ts +1 -1
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +42 -11
- package/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +28 -19
- package/dist/cli-register-json.d.ts +3 -0
- package/dist/cli-register-json.d.ts.map +1 -0
- package/dist/cli-register-json.js +35 -0
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +60 -13
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +23 -14
- package/dist/cli-register-skills.d.ts.map +1 -1
- package/dist/cli-register-skills.js +8 -6
- package/dist/cli-register-verification.d.ts +3 -0
- package/dist/cli-register-verification.d.ts.map +1 -0
- package/dist/cli-register-verification.js +16 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -1
- package/dist/commands/aggregated-checks.d.ts +1 -2
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +14 -9
- package/dist/commands/branch.d.ts +36 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +371 -40
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +48 -77
- package/dist/commands/coverage.js +1 -1
- package/dist/commands/discovery-shared.d.ts +2 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +38 -25
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +259 -24
- package/dist/commands/engine.d.ts +8 -0
- package/dist/commands/engine.d.ts.map +1 -0
- package/dist/commands/engine.js +103 -0
- package/dist/commands/gaps.js +1 -1
- package/dist/commands/gc.d.ts +5 -2
- package/dist/commands/gc.d.ts.map +1 -1
- package/dist/commands/gc.js +140 -71
- package/dist/commands/github-init.d.ts +56 -0
- package/dist/commands/github-init.d.ts.map +1 -0
- package/dist/commands/github-init.js +310 -0
- package/dist/commands/graph.js +1 -1
- package/dist/commands/init-helpers.d.ts +1 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +73 -25
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +79 -24
- package/dist/commands/legacy-storage-migration.d.ts +54 -0
- package/dist/commands/legacy-storage-migration.d.ts.map +1 -0
- package/dist/commands/legacy-storage-migration.js +277 -0
- package/dist/commands/migrate.d.ts +7 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +244 -91
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/query.js +3 -1
- package/dist/commands/report.d.ts +24 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +191 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +3 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -1
- package/dist/commands/sync/cache.d.ts +26 -3
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +141 -5
- package/dist/commands/sync/discovery.d.ts +23 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +196 -15
- package/dist/commands/sync/extraction.d.ts +8 -1
- package/dist/commands/sync/extraction.d.ts.map +1 -1
- package/dist/commands/sync/extraction.js +38 -4
- package/dist/commands/sync/manifest.d.ts +8 -5
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +142 -39
- package/dist/commands/sync/persistence.d.ts +10 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +223 -44
- package/dist/commands/sync/staging.d.ts +10 -1
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +84 -1
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +710 -48
- package/dist/commands/verify.d.ts +10 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +126 -0
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/engine-daemon.d.ts +3 -0
- package/dist/engine-daemon.d.ts.map +1 -0
- package/dist/engine-daemon.js +34 -0
- package/dist/engine.d.ts +156 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1625 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +5 -6
- package/dist/extractors/manifest.d.ts +8 -1
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +51 -9
- package/dist/extractors/markdown.d.ts +2 -1
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +21 -3
- package/dist/extractors/playwright-cases.d.ts +24 -0
- package/dist/extractors/playwright-cases.d.ts.map +1 -0
- package/dist/extractors/playwright-cases.js +126 -0
- package/dist/extractors/relationships.d.ts +2 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +16 -17
- package/dist/extractors/symbol-coordinates.d.ts +81 -3
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbol-coordinates.js +389 -51
- package/dist/extractors/symbols-coordinator.js +11 -1
- package/dist/intent-search.d.ts +60 -0
- package/dist/intent-search.d.ts.map +1 -0
- package/dist/intent-search.js +433 -0
- package/dist/operations/bootstrap/activation.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/activation.js +48 -31
- package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.d.ts +4 -0
- package/dist/operations/{autopilot → bootstrap}/candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/candidates.js +22 -8
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.js +46 -6
- package/dist/operations/{autopilot → bootstrap}/discovery.d.ts +1 -1
- package/dist/operations/bootstrap/discovery.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/discovery.js +21 -14
- package/dist/operations/bootstrap/generate.d.ts +8 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -0
- package/dist/operations/bootstrap/generate.js +204 -0
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.js +4 -4
- package/dist/operations/{autopilot → bootstrap}/guidance.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/guidance.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/guidance.js +2 -0
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.js +4 -3
- package/dist/operations/bootstrap/presentation.d.ts +15 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -0
- package/dist/operations/bootstrap/presentation.js +177 -0
- package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/types.d.ts +63 -21
- package/dist/operations/bootstrap/types.d.ts.map +1 -0
- package/dist/operations/bootstrap/types.js +25 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +4 -17
- package/dist/operations/modeling/predicate-applicability.d.ts +16 -0
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-applicability.js +276 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts +13 -2
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +100 -3
- package/dist/operations/modeling/predicate-bindings.d.ts +6 -0
- package/dist/operations/modeling/predicate-bindings.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-bindings.js +122 -0
- package/dist/operations/modeling/predicate-catalog-4.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-4.js +155 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference-1.js +8 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts +10 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-launcher.js +13 -0
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference.js +4 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +7 -0
- package/dist/operations/modeling/predicate-ranker.d.ts +8 -1
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +156 -24
- package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-score-3.js +6 -0
- package/dist/operations/modeling/predicate-types.d.ts +34 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.js +40 -0
- package/dist/operations/modeling/predicate-utils.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-utils.js +2 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +170 -32
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +415 -19
- package/dist/operations/mutation/entity-projection.d.ts +11 -0
- package/dist/operations/mutation/entity-projection.d.ts.map +1 -0
- package/dist/operations/mutation/entity-projection.js +14 -0
- package/dist/operations/mutation/relationships.d.ts +10 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +71 -1
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +1 -0
- package/dist/operations/mutation/source-authoring.d.ts +61 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -0
- package/dist/operations/mutation/source-authoring.js +543 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts +51 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-compiler-lock.js +274 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +34 -3
- package/dist/operations/mutation/symbol-refresh.d.ts +18 -1
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +225 -63
- package/dist/operations/mutation/types.d.ts +57 -1
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +363 -24
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +1 -0
- package/dist/operations/planning/apply-plan.d.ts +117 -0
- package/dist/operations/planning/apply-plan.d.ts.map +1 -0
- package/dist/operations/planning/apply-plan.js +1437 -0
- package/dist/operations/planning/compile-intent.d.ts +106 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -0
- package/dist/operations/planning/compile-intent.js +562 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +6 -2
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +15 -2
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +7 -3
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +51 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +96 -0
- package/dist/operations/semantic-advisor/types.d.ts +13 -5
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/operations/verification/ingest-verification.d.ts +29 -0
- package/dist/operations/verification/ingest-verification.d.ts.map +1 -0
- package/dist/operations/verification/ingest-verification.js +192 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -1
- package/dist/prolog.d.ts +8 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +66 -16
- package/dist/public/branch-resolver.d.ts +1 -0
- package/dist/public/branch-resolver.d.ts.map +1 -1
- package/dist/public/branch-resolver.js +1 -0
- package/dist/public/check-types.d.ts +2 -2
- package/dist/public/check-types.d.ts.map +1 -1
- package/dist/public/check-types.js +16 -16
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +69 -1
- package/dist/public/distribution-parity.d.ts +1 -1
- package/dist/public/distribution-parity.d.ts.map +1 -1
- package/dist/public/distribution-parity.js +1 -0
- package/dist/public/ignore-policy.d.ts.map +1 -1
- package/dist/public/ignore-policy.js +16 -4
- package/dist/public/impact/coverage-depth-quality.d.ts +6 -1
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +21 -3
- package/dist/public/impact/full-kb-quality.d.ts +4 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +61 -1
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +2 -5
- package/dist/public/operational-artifacts.d.ts.map +1 -1
- package/dist/public/operational-artifacts.js +7 -1
- package/dist/public/operations/catalog.d.ts +682 -67
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +126 -4
- package/dist/public/operations/check-executor.d.ts +2 -2
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +72 -13
- package/dist/public/operations/check-format-shared.d.ts +3 -0
- package/dist/public/operations/check-format-shared.d.ts.map +1 -1
- package/dist/public/operations/check-format-shared.js +3 -0
- package/dist/public/operations/check-helpers.d.ts +27 -2
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +62 -26
- package/dist/public/operations/contracts.d.ts +11 -0
- package/dist/public/operations/contracts.d.ts.map +1 -0
- package/dist/public/operations/contracts.js +325 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +3 -2
- package/dist/public/operations/discovery-executors.d.ts +37 -1
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +246 -9
- package/dist/public/operations/index.d.ts +9 -4
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +8 -3
- package/dist/public/operations/migration-plan.d.ts +101 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -0
- package/dist/public/operations/migration-plan.js +537 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +68 -8
- package/dist/public/operations/prolog-json.d.ts +14 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +55 -6
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +1 -0
- package/dist/public/operations/result-envelope.d.ts +13 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -0
- package/dist/public/operations/result-envelope.js +104 -0
- package/dist/public/operations/runtime-types.d.ts +126 -5
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/source-relationship-parity.d.ts +13 -0
- package/dist/public/operations/source-relationship-parity.d.ts.map +1 -0
- package/dist/public/operations/source-relationship-parity.js +162 -0
- package/dist/public/operations/specs/{autopilot.d.ts → bootstrap.d.ts} +9 -9
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -0
- package/dist/public/operations/specs/{autopilot.js → bootstrap.js} +8 -7
- package/dist/public/operations/specs/check.d.ts +4 -4
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +4 -3
- package/dist/public/operations/specs/discovery.d.ts +87 -3
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +53 -3
- package/dist/public/operations/specs/modeling.d.ts +3 -3
- package/dist/public/operations/specs/modeling.js +3 -3
- package/dist/public/operations/specs/mutation-schemas.d.ts +190 -47
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +3 -1
- package/dist/public/operations/specs/mutation.d.ts +42 -2
- package/dist/public/operations/specs/mutation.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation.js +26 -2
- package/dist/public/operations/specs/planning.d.ts +270 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -0
- package/dist/public/operations/specs/planning.js +191 -0
- package/dist/public/operations/specs/reporting.d.ts +4 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -1
- package/dist/public/operations/specs/upsert.d.ts +204 -47
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +9 -0
- package/dist/public/operations/specs/verification.d.ts +78 -0
- package/dist/public/operations/specs/verification.d.ts.map +1 -0
- package/dist/public/operations/specs/verification.js +62 -0
- package/dist/public/operations/symbol-repair-plan.d.ts +11 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -0
- package/dist/public/operations/symbol-repair-plan.js +123 -0
- package/dist/public/operations/types.d.ts +52 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/playwright-case-id.d.ts +8 -0
- package/dist/public/playwright-case-id.d.ts.map +1 -0
- package/dist/public/playwright-case-id.js +25 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +4 -2
- package/dist/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/dist/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +40 -10
- package/dist/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/dist/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +47 -47
- package/dist/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/dist/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/dist/public/skills/kibi-usage/SKILL.md +115 -239
- package/dist/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/dist/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +56 -3
- package/dist/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +1 -0
- package/dist/public/telemetry-acceptance.d.ts +7 -0
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +8 -1
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/public/verification-receipt.d.ts +206 -39
- package/dist/public/verification-receipt.d.ts.map +1 -1
- package/dist/public/verification-receipt.js +171 -4
- package/dist/relationships/shards.d.ts +16 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +87 -2
- package/dist/report/brand.d.ts +19 -0
- package/dist/report/brand.d.ts.map +1 -0
- package/dist/report/brand.js +112 -0
- package/dist/report/html-report.d.ts +19 -0
- package/dist/report/html-report.d.ts.map +1 -0
- package/dist/report/html-report.js +963 -0
- package/dist/report/relative-time.d.ts +4 -0
- package/dist/report/relative-time.d.ts.map +1 -0
- package/dist/report/relative-time.js +46 -0
- package/dist/report/report-view.d.ts +17 -0
- package/dist/report/report-view.d.ts.map +1 -0
- package/dist/report/report-view.js +33 -0
- package/dist/report/repository.d.ts +35 -0
- package/dist/report/repository.d.ts.map +1 -0
- package/dist/report/repository.js +151 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +98 -42
- package/dist/schemas/entity.schema.json +1148 -273
- package/dist/traceability/evidence-model.d.ts +2 -2
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +2 -2
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +15 -40
- package/dist/traceability/markdown-validate.d.ts.map +1 -1
- package/dist/traceability/markdown-validate.js +12 -7
- package/dist/traceability/staged-impact-contract.d.ts +3 -3
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +10 -38
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +8 -3
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +3 -0
- package/dist/types/entities.d.ts +3 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +24 -10
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +121 -38
- package/dist/utils/branch-store-locator.d.ts +23 -0
- package/dist/utils/branch-store-locator.d.ts.map +1 -0
- package/dist/utils/branch-store-locator.js +90 -0
- package/dist/utils/branch-store.d.ts +15 -0
- package/dist/utils/branch-store.d.ts.map +1 -0
- package/dist/utils/branch-store.js +130 -0
- package/dist/utils/config.d.ts +39 -37
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +107 -119
- package/dist/utils/kb-manifest.d.ts +35 -0
- package/dist/utils/kb-manifest.d.ts.map +1 -0
- package/dist/utils/kb-manifest.js +154 -0
- package/dist/utils/kb-paths.d.ts +54 -0
- package/dist/utils/kb-paths.d.ts.map +1 -0
- package/dist/utils/kb-paths.js +125 -0
- package/dist/utils/manifest-paths.d.ts +4 -4
- package/dist/utils/manifest-paths.d.ts.map +1 -1
- package/dist/utils/manifest-paths.js +8 -56
- package/dist/utils/rule-registry.d.ts +48 -20
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +82 -77
- package/dist/utils/schema-version.d.ts +5 -5
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +26 -6
- package/dist/utils/strict-modeling.d.ts +0 -4
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +7 -8
- package/dist/verification/playwright-reporter.d.ts +21 -0
- package/dist/verification/playwright-reporter.d.ts.map +1 -0
- package/dist/verification/playwright-reporter.js +114 -0
- package/package.json +51 -8
- package/schema/config.json +2 -2
- package/schema/manifest.json +26 -0
- package/src/public/branch-resolver.ts +1 -0
- package/src/public/check-types.ts +22 -19
- package/src/public/diagnostic-usage.ts +79 -1
- package/src/public/distribution-parity.ts +1 -0
- package/src/public/ignore-policy.ts +16 -10
- package/src/public/impact/coverage-depth-quality.ts +36 -0
- package/src/public/impact/full-kb-quality.ts +118 -5
- package/src/public/impact/manifest.ts +2 -4
- package/src/public/operational-artifacts.ts +9 -1
- package/src/public/operations/catalog.ts +146 -9
- package/src/public/operations/check-executor.ts +102 -15
- package/src/public/operations/check-format-shared.ts +6 -0
- package/src/public/operations/check-helpers.ts +74 -35
- package/src/public/operations/contracts.ts +366 -0
- package/src/public/operations/discovery-entities.ts +3 -2
- package/src/public/operations/discovery-executors.ts +343 -15
- package/src/public/operations/index.ts +9 -4
- package/src/public/operations/migration-plan.ts +740 -0
- package/src/public/operations/node-ports.ts +84 -10
- package/src/public/operations/prolog-json.ts +73 -6
- package/src/public/operations/repair-plan.ts +1 -0
- package/src/public/operations/result-envelope.ts +136 -0
- package/src/public/operations/runtime-types.ts +130 -5
- package/src/public/operations/source-relationship-parity.ts +226 -0
- package/src/public/operations/specs/{autopilot.ts → bootstrap.ts} +17 -16
- package/src/public/operations/specs/check.ts +4 -3
- package/src/public/operations/specs/discovery.ts +57 -3
- package/src/public/operations/specs/modeling.ts +3 -3
- package/src/public/operations/specs/mutation-schemas.ts +6 -1
- package/src/public/operations/specs/mutation.ts +27 -2
- package/src/public/operations/specs/planning.ts +234 -0
- package/src/public/operations/specs/reporting.ts +55 -1
- package/src/public/operations/specs/upsert.ts +10 -0
- package/src/public/operations/specs/verification.ts +78 -0
- package/src/public/operations/symbol-repair-plan.ts +164 -0
- package/src/public/operations/types.ts +62 -1
- package/src/public/playwright-case-id.ts +35 -0
- package/src/public/schemas/entity.ts +7 -2
- package/src/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/src/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/src/public/skills/kibi-freshness/SKILL.md +40 -10
- package/src/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/src/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/src/public/skills/kibi-traceability/SKILL.md +47 -47
- package/src/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/src/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/src/public/skills/kibi-usage/SKILL.md +115 -239
- package/src/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/src/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/src/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +56 -3
- package/src/public/symbol-granularity.ts +1 -0
- package/src/public/telemetry-acceptance.ts +16 -1
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/public/verification-receipt.ts +248 -6
- package/src/schemas/entity.schema.json +1148 -273
- package/templates/github/kibi-badge.yml +86 -0
- package/templates/github/kibi-report.yml +84 -0
- package/dist/operations/autopilot/activation.d.ts.map +0 -1
- package/dist/operations/autopilot/candidates.d.ts +0 -4
- package/dist/operations/autopilot/discovery.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.d.ts +0 -8
- package/dist/operations/autopilot/generate.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.js +0 -112
- package/dist/operations/autopilot/presentation.d.ts +0 -13
- package/dist/operations/autopilot/presentation.d.ts.map +0 -1
- package/dist/operations/autopilot/presentation.js +0 -91
- package/dist/operations/autopilot/types.d.ts.map +0 -1
- package/dist/operations/autopilot/types.js +0 -8
- package/dist/public/operations/specs/autopilot.d.ts.map +0 -1
- package/dist/public/skills/init-kibi/SKILL.md +0 -62
- package/src/public/skills/init-kibi/SKILL.md +0 -62
- /package/dist/operations/{autopilot → bootstrap}/activation.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.js +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.js +0 -0
|
@@ -5,6 +5,7 @@ import { extractSemanticClauses, semanticClaimKey, } from "./clauses.js";
|
|
|
5
5
|
import { observationPlan } from "./observation-plan.js";
|
|
6
6
|
import { detectPredicateRules } from "./predicate-rule.js";
|
|
7
7
|
import { CORE_PREDICATE_RULES } from "./predicate-rules-core.js";
|
|
8
|
+
import { LAUNCHER_PREDICATE_RULES } from "./predicate-rules-launcher.js";
|
|
8
9
|
import { POLICY_PREDICATE_RULES } from "./predicate-rules-policy.js";
|
|
9
10
|
import { PRODUCT_TAIL_PREDICATE_RULES } from "./predicate-rules-product-tail.js";
|
|
10
11
|
import { PRODUCT_PREDICATE_RULES } from "./predicate-rules-product.js";
|
|
@@ -47,7 +48,9 @@ const SIGNAL_PATTERNS = [
|
|
|
47
48
|
kind: "normative_modal",
|
|
48
49
|
candidateLane: "observation_review",
|
|
49
50
|
confidence: 0.65,
|
|
50
|
-
|
|
51
|
+
// Modal-free validity, rejection, prohibition, and failure-outcome
|
|
52
|
+
// assertions are normative even when they omit must/shall.
|
|
53
|
+
pattern: /\b(?:must|shall|should|may|must\s+not|cannot|can't|invalid|unresolved|reject(?:ed|ion)?|prohibited|forbidden|fail(?:s|ed|ure)?\s+(?:clearly|explicitly|with)|required\s+outcome)\b/i,
|
|
51
54
|
},
|
|
52
55
|
];
|
|
53
56
|
function proseOf(payload) {
|
|
@@ -161,7 +164,8 @@ function ontologyGapSuggestion(payload, statement) {
|
|
|
161
164
|
};
|
|
162
165
|
}
|
|
163
166
|
function predicateSuggestion(payload, statement) {
|
|
164
|
-
return (detectPredicateRules(payload, statement,
|
|
167
|
+
return (detectPredicateRules(payload, statement, LAUNCHER_PREDICATE_RULES) ??
|
|
168
|
+
detectPredicateRules(payload, statement, CORE_PREDICATE_RULES) ??
|
|
165
169
|
detectPredicateRules(payload, statement, POLICY_PREDICATE_RULES) ??
|
|
166
170
|
detectPredicateRules(payload, statement, PRODUCT_PREDICATE_RULES) ??
|
|
167
171
|
detectPredicateRules(payload, statement, PRODUCT_TAIL_PREDICATE_RULES));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clauses.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/clauses.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACjC,CAAC,CAAC;AAKH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;
|
|
1
|
+
{"version":3,"file":"clauses.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/clauses.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACjC,CAAC,CAAC;AAKH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AA4BD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,GAClC,SAAS,cAAc,EAAE,CAgB3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
const NORMATIVE_PATTERN = /\b(?:must|shall|should|required|requires?|may\s+only|only\s+.+?\s+(?:may|can)|must\s+not|shall\s+not|cannot|can't|forbidden|
|
|
2
|
+
const NORMATIVE_PATTERN = /\b(?:must|shall|should|required|requires?|may\s+only|may\s+(?:have\s+)?(?:at\s+most|at\s+least|exactly|no\s+more\s+than|up\s+to)|only\s+.+?\s+(?:may|can)|must\s+not|shall\s+not|cannot|can't|denied|forbidden|prohibited|(?:is|are|be|become|becomes|remain|remains)\s+(?:invalid|rejected|prohibited|forbidden)|(?:reject|rejects|rejected|rejection)\s+(?:invalid|unresolved|ambiguous)|fail(?:s|ed)?\s+(?:clearly|explicitly|with)|expires?\s+(?:after|within|in)|failure\s+(?:behavior|policy|outcome)|error\s+(?:handling|behavior|policy|outcome)|required\s+outcome|defaults?\s+to|before|unless|when|if)\b/i;
|
|
3
3
|
export function normalizeSemanticClause(value) {
|
|
4
4
|
return (value
|
|
5
5
|
.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/, "")
|
|
@@ -21,7 +21,20 @@ function detectedClauses(text) {
|
|
|
21
21
|
.flatMap((sentence) => {
|
|
22
22
|
if (/\bmutually\s+exclusive\b/i.test(sentence))
|
|
23
23
|
return [sentence];
|
|
24
|
-
|
|
24
|
+
// Package-resolution lists often join two noun phrases with "and"
|
|
25
|
+
// before the actual exception clause. Keep this launcher contract
|
|
26
|
+
// atomic so "exports-restricted and pnpm-style layouts" is not
|
|
27
|
+
// mistaken for a second proposition.
|
|
28
|
+
if (/\bconsumer-scoped\s+Node\s+package\s+semantics\b/i.test(sentence))
|
|
29
|
+
return [sentence];
|
|
30
|
+
const conjunctionParts = sentence.split(/\s+(?:,\s*)?and\s+(?=(?:the\s+)?[a-z][^.!?]{0,140}\b(?:must|shall|should|requires?|cannot|can't|expire|default|transition|states?\s+are|invalid|unresolved|reject(?:ed|ion)?\s+(?:invalid|unresolved|ambiguous)|fail(?:s|ed)?\s+(?:clearly|explicitly|with)|failure\s+(?:behavior|policy|outcome)|error\s+(?:handling|behavior|policy|outcome)|prohibited|forbidden|required\s+outcome)\b)/i);
|
|
31
|
+
// A coordinated subject such as "Analytics and Sentry must..." is one
|
|
32
|
+
// proposition. Split only when every resulting fragment independently
|
|
33
|
+
// carries normative or validity intent.
|
|
34
|
+
return conjunctionParts.length > 1 &&
|
|
35
|
+
conjunctionParts.every((part) => NORMATIVE_PATTERN.test(part))
|
|
36
|
+
? conjunctionParts
|
|
37
|
+
: [sentence];
|
|
25
38
|
})
|
|
26
39
|
.map(normalizeSemanticClause)
|
|
27
40
|
.filter(Boolean);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestion-boundary.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/ingestion-boundary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EACL,KAAK,OAAO,EAOb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,YAAY,CAAC;AAgB9E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,OAAO,CAAC;CACd,CAAC,CAAC;AAgCH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,SAAS,oBAAoB,EAAE,EAC9C,OAAO,EAAE,sBAAsB,GAC9B,+BAA+B,
|
|
1
|
+
{"version":3,"file":"ingestion-boundary.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/ingestion-boundary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EACL,KAAK,OAAO,EAOb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,YAAY,CAAC;AAgB9E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,OAAO,CAAC;CACd,CAAC,CAAC;AAgCH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,SAAS,oBAAoB,EAAE,EAC9C,OAAO,EAAE,sBAAsB,GAC9B,+BAA+B,CA0IjC;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,SAAS,oBAAoB,EAAE,EAC9C,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CAWN;AAGD,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,SAAS,oBAAoB,EAAE,GAC7C,OAAO,CAAC,IAAI,CAAC,CA+Cf"}
|
|
@@ -118,10 +118,14 @@ export function validateSemanticInventoryBoundary(payload, relationships, receip
|
|
|
118
118
|
errors.push("logic_claims must contain exactly every assertive semantic_inventory claim_key");
|
|
119
119
|
}
|
|
120
120
|
const modeledCount = inventory.filter(({ status }) => status === "modeled").length;
|
|
121
|
-
const
|
|
122
|
-
LOGICAL_RELATIONSHIPS.has(stringValue(relationship.type)))
|
|
121
|
+
const groundingRelationships = relationships.filter((relationship) => relationship.from === payload.id &&
|
|
122
|
+
LOGICAL_RELATIONSHIPS.has(stringValue(relationship.type)));
|
|
123
|
+
const groundingCount = groundingRelationships.length;
|
|
123
124
|
if (modeledCount !== groundingCount) {
|
|
124
|
-
|
|
125
|
+
const groundingTargets = groundingRelationships
|
|
126
|
+
.map((relationship) => `${stringValue(relationship.type)}->${stringValue(relationship.to)}`)
|
|
127
|
+
.join(", ");
|
|
128
|
+
errors.push(`modeled semantic_inventory entries (${modeledCount}) must equal logical grounding relationships (${groundingCount})${groundingTargets ? ` [${groundingTargets}]` : ""}`);
|
|
125
129
|
}
|
|
126
130
|
return { applicable, errors, sourceHash };
|
|
127
131
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launcher contracts are deliberately matched as complete, domain-specific
|
|
3
|
+
* propositions. Generic words such as "error" or "workspace" are not enough
|
|
4
|
+
* to route a requirement into this family.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LAUNCHER_PREDICATE_RULES: readonly [{
|
|
7
|
+
readonly pattern: RegExp;
|
|
8
|
+
readonly name: "dependency_resolution_policy";
|
|
9
|
+
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
10
|
+
readonly rationale: "Consumer-local dependency resolution and acquisition restrictions are a reusable launcher policy predicate.";
|
|
11
|
+
}, {
|
|
12
|
+
readonly pattern: RegExp;
|
|
13
|
+
readonly name: "ordered_resolution_strategy";
|
|
14
|
+
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
15
|
+
readonly rationale: "An ordered workspace candidate list with a validated cwd fallback is a deterministic resolution strategy.";
|
|
16
|
+
}, {
|
|
17
|
+
readonly pattern: RegExp;
|
|
18
|
+
readonly name: "resolution_failure_policy";
|
|
19
|
+
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
20
|
+
readonly rationale: "Invalid unresolved placeholders are an explicit resolution failure condition.";
|
|
21
|
+
}, {
|
|
22
|
+
readonly pattern: RegExp;
|
|
23
|
+
readonly name: "resolution_failure_policy";
|
|
24
|
+
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
25
|
+
readonly rationale: "Ambiguous usable roots require a deterministic, clearly reported resolution failure.";
|
|
26
|
+
}, {
|
|
27
|
+
readonly pattern: RegExp;
|
|
28
|
+
readonly name: "exception_rule";
|
|
29
|
+
readonly args: () => string[];
|
|
30
|
+
readonly rationale: "Consumer-scoped package resolution with an explicitly authorized package-manager exception is an exception policy.";
|
|
31
|
+
}, {
|
|
32
|
+
readonly pattern: RegExp;
|
|
33
|
+
readonly name: "process_delegation_contract";
|
|
34
|
+
readonly args: () => string[];
|
|
35
|
+
readonly rationale: "Executable, cwd, environment, stdio, and termination propagation form a reusable process delegation contract.";
|
|
36
|
+
}, {
|
|
37
|
+
readonly pattern: RegExp;
|
|
38
|
+
readonly name: "failure_behavior";
|
|
39
|
+
readonly args: () => string[];
|
|
40
|
+
readonly rationale: "A missing project-local dependency with an actionable error is a reusable launcher failure behavior.";
|
|
41
|
+
}];
|
|
42
|
+
/**
|
|
43
|
+
* Return the reviewed argument tuple for an exact launcher proposition.
|
|
44
|
+
*
|
|
45
|
+
* The modeling route uses this same rule table as the semantic advisor so an
|
|
46
|
+
* inferred apply plan cannot silently drift from the canonical ontology
|
|
47
|
+
* interpretation. Non-exact prose deliberately returns null and must remain
|
|
48
|
+
* reviewable through explicit argument bindings.
|
|
49
|
+
*/
|
|
50
|
+
export declare function exactLauncherPredicateArgs(predicateName: string, text: string): readonly string[] | null;
|
|
51
|
+
//# sourceMappingURL=predicate-rules-launcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-rules-launcher.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-launcher.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFQ,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GACX,SAAS,MAAM,EAAE,GAAG,IAAI,CAO1B"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { normalizeKey, normalizePredicateToken, } from "./predicate-rule.js";
|
|
2
|
+
/**
|
|
3
|
+
* Launcher contracts are deliberately matched as complete, domain-specific
|
|
4
|
+
* propositions. Generic words such as "error" or "workspace" are not enough
|
|
5
|
+
* to route a requirement into this family.
|
|
6
|
+
*/
|
|
7
|
+
export const LAUNCHER_PREDICATE_RULES = [
|
|
8
|
+
{
|
|
9
|
+
pattern: /^(?<subject>.+?)\s+must\s+resolve\s+and\s+execute\s+the\s+(?<dependency>.+?)\s+without\s+downloading\s+packages\s+or\s+using\s+a\s+global\s+or\s+plugin-local\s+runtime\.?$/i,
|
|
10
|
+
name: "dependency_resolution_policy",
|
|
11
|
+
args: (groups) => [
|
|
12
|
+
normalizeKey(groups.subject ?? ""),
|
|
13
|
+
normalizePredicateToken(groups.dependency ?? "dependency"),
|
|
14
|
+
"consumer_local",
|
|
15
|
+
"no_download",
|
|
16
|
+
],
|
|
17
|
+
rationale: "Consumer-local dependency resolution and acquisition restrictions are a reusable launcher policy predicate.",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
pattern: /^it\s+must\s+resolve\s+the\s+consumer\s+workspace\s+in\s+deterministic\s+order:\s*(?<sources>.+?)\s+then\s+cwd\s+only\s+when\s+(?<condition>.+?)\.?$/i,
|
|
21
|
+
name: "ordered_resolution_strategy",
|
|
22
|
+
args: (groups) => [
|
|
23
|
+
"launcher",
|
|
24
|
+
normalizePredicateToken(groups.sources ?? "ordered_sources"),
|
|
25
|
+
normalizePredicateToken(groups.condition ?? "cwd_requires_validation"),
|
|
26
|
+
],
|
|
27
|
+
rationale: "An ordered workspace candidate list with a validated cwd fallback is a deterministic resolution strategy.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
pattern: /^(?<condition>unresolved\s+placeholders?)\s+are\s+invalid\.?$/i,
|
|
31
|
+
name: "resolution_failure_policy",
|
|
32
|
+
args: (groups) => [
|
|
33
|
+
"launcher",
|
|
34
|
+
normalizePredicateToken(groups.condition ?? "invalid_placeholder"),
|
|
35
|
+
"reject_input",
|
|
36
|
+
],
|
|
37
|
+
rationale: "Invalid unresolved placeholders are an explicit resolution failure condition.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
pattern: /^(?<condition>ambiguous\s+(?:multiple\s+)?usable\s+roots?)\s+fail\s+clearly\.?$/i,
|
|
41
|
+
name: "resolution_failure_policy",
|
|
42
|
+
args: (groups) => [
|
|
43
|
+
"launcher",
|
|
44
|
+
normalizePredicateToken(groups.condition ?? "ambiguous_root"),
|
|
45
|
+
"clear_error",
|
|
46
|
+
],
|
|
47
|
+
rationale: "Ambiguous usable roots require a deterministic, clearly reported resolution failure.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
pattern: /^(?<subject>the\s+launcher)\s+must\s+resolve\s+kibi-mcp\s+through\s+consumer-scoped\s+node\s+package\s+semantics\s+including\s+exports-restricted\s+and\s+pnpm-style\s+layouts,\s+and\s+reject\s+packages\s+outside\s+consumer\s+scope\s+unless\s+active\s+package-manager\s+semantics\s+authorize\s+it\.?$/i,
|
|
51
|
+
name: "exception_rule",
|
|
52
|
+
args: () => [
|
|
53
|
+
"launcher",
|
|
54
|
+
"consumer_scoped_node_package_semantics",
|
|
55
|
+
"active_package_manager_semantics",
|
|
56
|
+
],
|
|
57
|
+
rationale: "Consumer-scoped package resolution with an explicitly authorized package-manager exception is an exception policy.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
pattern: /^(?<subject>it)\s+must\s+spawn\s+the\s+declared\s+kibi-mcp\s+bin\s+with\s+cwd\s+and\s+kibi_workspace\s+set\s+to\s+the\s+consumer\s+workspace,\s+preserve\s+stdio,\s+and\s+propagate\s+child\s+exit\s+codes\s+and\s+termination\s+signals\.?$/i,
|
|
61
|
+
name: "process_delegation_contract",
|
|
62
|
+
args: () => [
|
|
63
|
+
"launcher",
|
|
64
|
+
"resolved_executable",
|
|
65
|
+
"consumer_cwd",
|
|
66
|
+
"consumer_workspace_environment",
|
|
67
|
+
"inherited_stdio",
|
|
68
|
+
"propagate_exit_and_termination",
|
|
69
|
+
],
|
|
70
|
+
rationale: "Executable, cwd, environment, stdio, and termination propagation form a reusable process delegation contract.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
pattern: /^(?<subject>missing)\s+project-local\s+kibi-mcp\s+must\s+produce\s+a\s+concise\s+actionable\s+error\.?$/i,
|
|
74
|
+
name: "failure_behavior",
|
|
75
|
+
args: () => ["launcher", "missing_dependency", "actionable_error"],
|
|
76
|
+
rationale: "A missing project-local dependency with an actionable error is a reusable launcher failure behavior.",
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
/**
|
|
80
|
+
* Return the reviewed argument tuple for an exact launcher proposition.
|
|
81
|
+
*
|
|
82
|
+
* The modeling route uses this same rule table as the semantic advisor so an
|
|
83
|
+
* inferred apply plan cannot silently drift from the canonical ontology
|
|
84
|
+
* interpretation. Non-exact prose deliberately returns null and must remain
|
|
85
|
+
* reviewable through explicit argument bindings.
|
|
86
|
+
*/
|
|
87
|
+
export function exactLauncherPredicateArgs(predicateName, text) {
|
|
88
|
+
for (const rule of LAUNCHER_PREDICATE_RULES) {
|
|
89
|
+
if (rule.name !== predicateName)
|
|
90
|
+
continue;
|
|
91
|
+
const match = text.match(rule.pattern);
|
|
92
|
+
if (match)
|
|
93
|
+
return [...rule.args(match.groups ?? {})];
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
@@ -72,6 +72,18 @@ export interface SemanticPredicateClaim {
|
|
|
72
72
|
readonly canonical_key: string;
|
|
73
73
|
readonly polarity: "assert" | "deny";
|
|
74
74
|
}
|
|
75
|
+
export interface SemanticPredicateSchemaDraft {
|
|
76
|
+
readonly predicate_name: string;
|
|
77
|
+
readonly argument_names: readonly string[];
|
|
78
|
+
readonly argument_types: readonly string[];
|
|
79
|
+
readonly title?: string;
|
|
80
|
+
readonly description?: string;
|
|
81
|
+
readonly argument_descriptions?: readonly string[];
|
|
82
|
+
readonly candidate_bindings?: Readonly<Record<string, string>>;
|
|
83
|
+
readonly unresolved_bindings?: readonly string[];
|
|
84
|
+
readonly rationale?: string;
|
|
85
|
+
readonly reuse_scope?: string;
|
|
86
|
+
}
|
|
75
87
|
export type SemanticModelingSuggestion = {
|
|
76
88
|
readonly kind: "strict_property";
|
|
77
89
|
readonly claim_key: string;
|
|
@@ -127,11 +139,7 @@ export type SemanticModelingSuggestion = {
|
|
|
127
139
|
readonly evidence: string;
|
|
128
140
|
readonly rationale: string;
|
|
129
141
|
readonly suggested_next_tool: "kb_suggest_predicates";
|
|
130
|
-
readonly recommendedPredicateSchema:
|
|
131
|
-
readonly predicate_name: string;
|
|
132
|
-
readonly argument_names: readonly string[];
|
|
133
|
-
readonly argument_types: readonly string[];
|
|
134
|
-
} | null;
|
|
142
|
+
readonly recommendedPredicateSchema: SemanticPredicateSchemaDraft | null;
|
|
135
143
|
readonly applyPlan: readonly Readonly<Record<string, unknown>>[];
|
|
136
144
|
};
|
|
137
145
|
export interface SemanticAdvisorReceipt {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,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../public/operations/runtime-types.js";
|
|
2
|
+
export declare const PLAYWRIGHT_RUN_VERSION: "kibi.playwright-run.v1";
|
|
3
|
+
export type VerificationCaseArtifact = Readonly<{
|
|
4
|
+
symbol_id: string;
|
|
5
|
+
project: string;
|
|
6
|
+
outcome: "passed" | "failed" | "timed_out" | "skipped" | "interrupted";
|
|
7
|
+
retries: number;
|
|
8
|
+
duration_ms: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type IngestVerificationArgs = Readonly<{
|
|
11
|
+
testId: string;
|
|
12
|
+
snapshot: string;
|
|
13
|
+
artifact: Readonly<Record<string, unknown>>;
|
|
14
|
+
}>;
|
|
15
|
+
export type IngestVerificationResult = Readonly<{
|
|
16
|
+
receipt: Readonly<Record<string, unknown>>;
|
|
17
|
+
testId: string;
|
|
18
|
+
proofOutcome: "passed" | "failed" | "timed_out" | "interrupted";
|
|
19
|
+
receiptCount: number;
|
|
20
|
+
upsert: unknown;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function executeIngestVerification(args: IngestVerificationArgs, context: OperationContext): Promise<{
|
|
23
|
+
content: Array<{
|
|
24
|
+
type: "text";
|
|
25
|
+
text: string;
|
|
26
|
+
}>;
|
|
27
|
+
structuredContent: IngestVerificationResult;
|
|
28
|
+
}>;
|
|
29
|
+
//# sourceMappingURL=ingest-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingest-verification.d.ts","sourceRoot":"","sources":["../../../src/operations/verification/ingest-verification.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAajF,eAAO,MAAM,sBAAsB,EAAG,wBAAiC,CAAC;AAGxE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC7C,CAAC,CAAC;AAGH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa,CAAC;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AA0IH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC;IACT,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE,wBAAwB,CAAC;CAC7C,CAAC,CAmHD"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { loadEntities } from "../../public/operations/discovery-entities.js";
|
|
3
|
+
import { readWorkspaceSnapshot } from "../../public/operations/workspace-snapshot.js";
|
|
4
|
+
import { VERIFICATION_CONTRACT_VERSION, VERIFICATION_RECEIPT_V2_VERSION, verificationContractHash, verificationReceiptCurrentBindingErrors, verificationReceiptHistoryErrors, } from "../../public/verification-receipt.js";
|
|
5
|
+
import { projectEntityProperties } from "../mutation/entity-projection.js";
|
|
6
|
+
import { executeUpsert } from "../mutation/upsert.js";
|
|
7
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
8
|
+
export const PLAYWRIGHT_RUN_VERSION = "kibi.playwright-run.v1";
|
|
9
|
+
function text(value) {
|
|
10
|
+
return typeof value === "string" ? value.trim() : "";
|
|
11
|
+
}
|
|
12
|
+
function record(value) {
|
|
13
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
14
|
+
? value
|
|
15
|
+
: null;
|
|
16
|
+
}
|
|
17
|
+
function canonical(value) {
|
|
18
|
+
if (Array.isArray(value))
|
|
19
|
+
return `[${value.map(canonical).join(",")}]`;
|
|
20
|
+
const objectValue = record(value);
|
|
21
|
+
if (objectValue) {
|
|
22
|
+
return `{${Object.entries(objectValue)
|
|
23
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
24
|
+
.map(([key, child]) => `${JSON.stringify(key)}:${canonical(child)}`)
|
|
25
|
+
.join(",")}}`;
|
|
26
|
+
}
|
|
27
|
+
return JSON.stringify(value);
|
|
28
|
+
}
|
|
29
|
+
function digest(value) {
|
|
30
|
+
return createHash("sha256").update(canonical(value)).digest("hex");
|
|
31
|
+
}
|
|
32
|
+
function requiredString(value, label) {
|
|
33
|
+
const result = text(value);
|
|
34
|
+
if (!result)
|
|
35
|
+
throw new Error(`Verification ingest failed: ${label} must be non-empty`);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
function parseCases(artifact) {
|
|
39
|
+
const raw = artifact.cases;
|
|
40
|
+
if (!Array.isArray(raw) || raw.length === 0)
|
|
41
|
+
throw new Error("Verification ingest failed: artifact.cases must be non-empty");
|
|
42
|
+
return raw.map((value, index) => {
|
|
43
|
+
const row = record(value);
|
|
44
|
+
if (!row)
|
|
45
|
+
throw new Error(`Verification ingest failed: artifact.cases[${index}] must be an object`);
|
|
46
|
+
const outcome = text(row.outcome);
|
|
47
|
+
if (!["passed", "failed", "timed_out", "skipped", "interrupted"].includes(outcome))
|
|
48
|
+
throw new Error(`Verification ingest failed: unsupported case outcome at index ${index}`);
|
|
49
|
+
if (!Number.isInteger(row.retries) || Number(row.retries) < 0)
|
|
50
|
+
throw new Error(`Verification ingest failed: artifact.cases[${index}].retries must be non-negative`);
|
|
51
|
+
if (!Number.isInteger(row.duration_ms) || Number(row.duration_ms) < 0)
|
|
52
|
+
throw new Error(`Verification ingest failed: artifact.cases[${index}].duration_ms must be non-negative`);
|
|
53
|
+
return {
|
|
54
|
+
symbol_id: requiredString(row.symbol_id, `artifact.cases[${index}].symbol_id`),
|
|
55
|
+
project: requiredString(row.project, `artifact.cases[${index}].project`),
|
|
56
|
+
outcome,
|
|
57
|
+
retries: Number(row.retries),
|
|
58
|
+
duration_ms: Number(row.duration_ms),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function existingReceipts(test) {
|
|
63
|
+
return Array.isArray(test.verification_receipts)
|
|
64
|
+
? test.verification_receipts.filter(record).map((value) => ({ ...value }))
|
|
65
|
+
: [];
|
|
66
|
+
}
|
|
67
|
+
function validateContract(test, artifact, cases) {
|
|
68
|
+
const contract = record(test.verification_contract);
|
|
69
|
+
if (!contract || contract.version !== VERIFICATION_CONTRACT_VERSION)
|
|
70
|
+
throw new Error("Verification ingest failed: test has no verification_contract.v1");
|
|
71
|
+
if (text(artifact.runner) !== text(contract.runner))
|
|
72
|
+
throw new Error("Verification ingest failed: reporter runner does not match verification contract");
|
|
73
|
+
const command = Array.isArray(artifact.command_argv)
|
|
74
|
+
? artifact.command_argv.map(String)
|
|
75
|
+
: [];
|
|
76
|
+
const contractCommand = Array.isArray(contract.command_argv)
|
|
77
|
+
? contract.command_argv.map(String)
|
|
78
|
+
: [];
|
|
79
|
+
if (canonical(command) !== canonical(contractCommand))
|
|
80
|
+
throw new Error("Verification ingest failed: reporter command_argv does not match verification contract");
|
|
81
|
+
const requiredCases = Array.isArray(contract.required_case_symbols)
|
|
82
|
+
? contract.required_case_symbols.map(String)
|
|
83
|
+
: [];
|
|
84
|
+
const requiredProjects = Array.isArray(contract.required_projects)
|
|
85
|
+
? contract.required_projects.map(String)
|
|
86
|
+
: [];
|
|
87
|
+
const seen = new Set();
|
|
88
|
+
for (const row of cases) {
|
|
89
|
+
const key = `${row.project}\0${row.symbol_id}`;
|
|
90
|
+
if (seen.has(key))
|
|
91
|
+
throw new Error(`Verification ingest failed: duplicate reporter case ${row.project}/${row.symbol_id}`);
|
|
92
|
+
seen.add(key);
|
|
93
|
+
}
|
|
94
|
+
for (const symbol of requiredCases) {
|
|
95
|
+
for (const project of requiredProjects) {
|
|
96
|
+
if (!seen.has(`${project}\0${symbol}`))
|
|
97
|
+
throw new Error(`Verification ingest failed: missing required case ${project}/${symbol}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return { contract, contractHash: verificationContractHash(contract) };
|
|
101
|
+
}
|
|
102
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
103
|
+
export async function executeIngestVerification(args, context) {
|
|
104
|
+
if (!context.prolog)
|
|
105
|
+
throw new Error("Verification ingest requires a Prolog runtime");
|
|
106
|
+
const testId = requiredString(args.testId, "testId");
|
|
107
|
+
const snapshot = requiredString(args.snapshot, "snapshot");
|
|
108
|
+
const artifact = record(args.artifact);
|
|
109
|
+
if (!artifact || artifact.version !== PLAYWRIGHT_RUN_VERSION)
|
|
110
|
+
throw new Error(`Verification ingest failed: artifact.version must be ${PLAYWRIGHT_RUN_VERSION}`);
|
|
111
|
+
const workspace = await readWorkspaceSnapshot(context);
|
|
112
|
+
if (!workspace.available)
|
|
113
|
+
throw new Error(`Verification ingest failed: ${workspace.error}`);
|
|
114
|
+
if (workspace.snapshot.hash !== snapshot)
|
|
115
|
+
throw new Error("Verification ingest failed: captured snapshot is not the live workspace snapshot");
|
|
116
|
+
if (text(artifact.code_snapshot) !== snapshot)
|
|
117
|
+
throw new Error("Verification ingest failed: artifact code_snapshot does not match captured snapshot");
|
|
118
|
+
const tests = await loadEntities(context.prolog, {
|
|
119
|
+
id: testId,
|
|
120
|
+
type: "test",
|
|
121
|
+
});
|
|
122
|
+
const test = tests[0];
|
|
123
|
+
if (!test)
|
|
124
|
+
throw new Error(`Verification ingest failed: test ${testId} was not found`);
|
|
125
|
+
const cases = parseCases(artifact);
|
|
126
|
+
const { contract, contractHash } = validateContract(test, artifact, cases);
|
|
127
|
+
const processExitCode = Number(artifact.process_exit_code);
|
|
128
|
+
const hasInterrupted = cases.some((row) => row.outcome === "interrupted");
|
|
129
|
+
const hasTimedOut = cases.some((row) => row.outcome === "timed_out");
|
|
130
|
+
const allPassing = processExitCode === 0 &&
|
|
131
|
+
cases.every((row) => row.outcome === "passed" && row.retries === 0);
|
|
132
|
+
const proofOutcome = allPassing
|
|
133
|
+
? "passed"
|
|
134
|
+
: hasInterrupted
|
|
135
|
+
? "interrupted"
|
|
136
|
+
: hasTimedOut
|
|
137
|
+
? "timed_out"
|
|
138
|
+
: "failed";
|
|
139
|
+
const startedAt = requiredString(artifact.started_at, "artifact.started_at");
|
|
140
|
+
const finishedAt = requiredString(artifact.finished_at, "artifact.finished_at");
|
|
141
|
+
const receipt = {
|
|
142
|
+
version: VERIFICATION_RECEIPT_V2_VERSION,
|
|
143
|
+
receipt_id: `VR-${digest({ testId, artifact }).slice(0, 24)}`,
|
|
144
|
+
test_id: testId,
|
|
145
|
+
runner: text(artifact.runner),
|
|
146
|
+
command: cases.length > 0
|
|
147
|
+
? Array.isArray(artifact.command_argv)
|
|
148
|
+
? artifact.command_argv.map(String).join(" ")
|
|
149
|
+
: ""
|
|
150
|
+
: "",
|
|
151
|
+
command_argv: Array.isArray(artifact.command_argv)
|
|
152
|
+
? artifact.command_argv.map(String)
|
|
153
|
+
: [],
|
|
154
|
+
scope: text(test.verification_scope) || "end_to_end",
|
|
155
|
+
outcome: proofOutcome,
|
|
156
|
+
code_snapshot: snapshot,
|
|
157
|
+
environment_hash: requiredString(artifact.environment_hash, "artifact.environment_hash"),
|
|
158
|
+
started_at: startedAt,
|
|
159
|
+
finished_at: finishedAt,
|
|
160
|
+
artifact_digest: digest(artifact),
|
|
161
|
+
contract_hash: contractHash,
|
|
162
|
+
case_results: cases,
|
|
163
|
+
};
|
|
164
|
+
const nextReceipts = [...existingReceipts(test), receipt];
|
|
165
|
+
const bindingErrors = verificationReceiptCurrentBindingErrors(testId, test.verification_scope, receipt, contract);
|
|
166
|
+
const historyErrors = verificationReceiptHistoryErrors(testId, test.verification_scope, nextReceipts);
|
|
167
|
+
const receiptErrors = [...historyErrors, ...bindingErrors];
|
|
168
|
+
if (receiptErrors.length > 0)
|
|
169
|
+
throw new Error(`Verification ingest failed: ${receiptErrors.join("; ")}`);
|
|
170
|
+
const properties = projectEntityProperties(test);
|
|
171
|
+
properties.verification_receipts = undefined;
|
|
172
|
+
const upsert = await executeUpsert({
|
|
173
|
+
type: "test",
|
|
174
|
+
id: testId,
|
|
175
|
+
properties: { ...properties, verification_receipts: nextReceipts },
|
|
176
|
+
}, context);
|
|
177
|
+
return {
|
|
178
|
+
content: [
|
|
179
|
+
{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: `Ingested ${proofOutcome} verification evidence for ${testId}.`,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
structuredContent: {
|
|
185
|
+
receipt,
|
|
186
|
+
testId,
|
|
187
|
+
proofOutcome,
|
|
188
|
+
receiptCount: nextReceipts.length,
|
|
189
|
+
upsert,
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/prolog/codec.ts"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASpD;AAED;;;GAG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B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAkG5D;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAoD7E;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAGtE;AAqBD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAenD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAmBlE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAoBzE;AAuDD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,CA6DjE"}
|
package/dist/prolog/codec.js
CHANGED
|
@@ -160,7 +160,8 @@ export function parsePropertyList(propsStr) {
|
|
|
160
160
|
let parsed = parsePrologValue(value);
|
|
161
161
|
if ((key === "rule_ir" ||
|
|
162
162
|
key === "semantic_inventory" ||
|
|
163
|
-
key === "verification_receipts"
|
|
163
|
+
key === "verification_receipts" ||
|
|
164
|
+
key === "verification_contract") &&
|
|
164
165
|
typeof parsed === "string") {
|
|
165
166
|
try {
|
|
166
167
|
parsed = JSON.parse(parsed);
|
package/dist/prolog.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ export declare function resolveKbPlPath(): string;
|
|
|
2
2
|
export interface PrologOptions {
|
|
3
3
|
swiplPath?: string;
|
|
4
4
|
timeout?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Force one-shot SWI execution. Production callers are Node-only and keep
|
|
7
|
+
* one interactive process alive; the fallback is retained for isolated
|
|
8
|
+
* repository tests that still run under Bun.
|
|
9
|
+
*/
|
|
10
|
+
oneShot?: boolean;
|
|
5
11
|
}
|
|
6
12
|
export interface QueryResult {
|
|
7
13
|
success: boolean;
|
|
@@ -28,6 +34,8 @@ export declare class PrologProcess {
|
|
|
28
34
|
start(): Promise<void>;
|
|
29
35
|
private waitForReady;
|
|
30
36
|
query(goal: string | string[]): Promise<QueryResult>;
|
|
37
|
+
/** Execute a group of goals as one transaction and one durable save. */
|
|
38
|
+
queryBatch(goals: readonly string[]): Promise<QueryResult>;
|
|
31
39
|
invalidateCache(): void;
|
|
32
40
|
private isCacheableGoal;
|
|
33
41
|
private isMutatingGoal;
|
package/dist/prolog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"AAkDA,wBAAgB,eAAe,IAAI,MAAM,CAsCxC;AACD,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"AAkDA,wBAAgB,eAAe,IAAI,MAAM,CAsCxC;AACD,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;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;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