kibi-cli 2.36.0 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +4 -0
- package/dist/cli-operation-metadata.d.ts +1 -1
- package/dist/cli-operation-metadata.js +1 -1
- package/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +2 -1
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +5 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +1 -0
- package/dist/cli-validate.d.ts.map +1 -1
- package/dist/cli-validate.js +21 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -1
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +89 -16
- package/dist/commands/coverage.d.ts +1 -0
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +40 -0
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +70 -35
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +4 -2
- package/dist/commands/hook-managers.d.ts +43 -0
- package/dist/commands/hook-managers.d.ts.map +1 -0
- package/dist/commands/hook-managers.js +426 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +40 -5
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +9 -3
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +49 -1
- package/dist/commands/telemetry.d.ts +7 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +23 -0
- package/dist/decision-firmness.d.ts.map +1 -1
- package/dist/decision-firmness.js +11 -14
- package/dist/engine-limits.d.ts.map +1 -1
- package/dist/engine-limits.js +8 -10
- package/dist/entity-body-context.d.ts.map +1 -1
- package/dist/entity-body-context.js +39 -36
- package/dist/extractors/markdown.d.ts +6 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +21 -0
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbol-coordinates.js +23 -4
- package/dist/firm-decision-edit.d.ts.map +1 -1
- package/dist/firm-decision-edit.js +1 -3
- package/dist/intent-search.d.ts +5 -1
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +118 -33
- package/dist/logic/ir.d.ts.map +1 -1
- package/dist/logic/ir.js +82 -108
- package/dist/operations/bootstrap/discovery-evidence.d.ts.map +1 -1
- package/dist/operations/bootstrap/discovery-evidence.js +44 -2
- package/dist/operations/bootstrap/discovery.d.ts.map +1 -1
- package/dist/operations/bootstrap/discovery.js +1 -0
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +2 -1
- package/dist/operations/bootstrap/plugin-offers.d.ts +11 -2
- package/dist/operations/bootstrap/plugin-offers.d.ts.map +1 -1
- package/dist/operations/bootstrap/plugin-offers.js +48 -9
- package/dist/operations/proof/claim-bindings.d.ts.map +1 -1
- package/dist/operations/proof/claim-bindings.js +1 -0
- package/dist/operations/proof/code-certificates.d.ts +2 -0
- package/dist/operations/proof/code-certificates.d.ts.map +1 -1
- package/dist/operations/proof/code-certificates.js +34 -14
- package/dist/operations/proof/code-models.d.ts.map +1 -1
- package/dist/operations/proof/code-models.js +19 -5
- package/dist/operations/proof/code-runner.d.ts +16 -0
- package/dist/operations/proof/code-runner.d.ts.map +1 -1
- package/dist/operations/proof/code-runner.js +42 -6
- package/dist/operations/proof/explain.d.ts +63 -0
- package/dist/operations/proof/explain.d.ts.map +1 -1
- package/dist/operations/proof/explain.js +162 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +9 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +21 -0
- package/dist/operations/semantic-advisor/case-preview.d.ts +24 -0
- package/dist/operations/semantic-advisor/case-preview.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/case-preview.js +216 -0
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/shared.js +3 -0
- package/dist/operations/semantic-advisor/types.d.ts +23 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.d.ts +11 -8
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.js +11 -8
- package/dist/plugins/compose-search-hints.d.ts +29 -0
- package/dist/plugins/compose-search-hints.d.ts.map +1 -0
- package/dist/plugins/compose-search-hints.js +94 -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 +11 -0
- package/dist/plugins/registry.d.ts +8 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +22 -3
- package/dist/plugins/source-classification.d.ts +2 -2
- package/dist/plugins/source-classification.d.ts.map +1 -1
- package/dist/plugins/source-classification.js +25 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +10 -20
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +32 -16
- package/dist/public/impact/full-kb-quality.d.ts +6 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +8 -3
- package/dist/public/impact/requirement-quality.d.ts.map +1 -1
- package/dist/public/impact/requirement-quality.js +56 -29
- package/dist/public/operations/catalog.d.ts +44 -4
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts +6 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +34 -2
- package/dist/public/operations/discovery-executors.d.ts +5 -1
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +65 -4
- package/dist/public/operations/evidence-floor.d.ts +8 -1
- package/dist/public/operations/evidence-floor.d.ts.map +1 -1
- package/dist/public/operations/evidence-floor.js +3 -4
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +41 -10
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +3 -1
- package/dist/public/operations/repair-plan.d.ts +46 -0
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +110 -1
- package/dist/public/operations/schema6-check-actions.js +1 -1
- package/dist/public/operations/source-analysis-cache.d.ts +22 -0
- package/dist/public/operations/source-analysis-cache.d.ts.map +1 -0
- package/dist/public/operations/source-analysis-cache.js +157 -0
- 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 +2 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +7 -2
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +7 -2
- package/dist/public/operations/specs/mutation-schemas.d.ts +36 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +30 -0
- package/dist/public/operations/specs/upsert.d.ts +36 -1
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/symbol-granularity-check.d.ts +3 -1
- package/dist/public/operations/symbol-granularity-check.d.ts.map +1 -1
- package/dist/public/operations/symbol-granularity-check.js +21 -7
- package/dist/public/proof-protocol.d.ts +6 -1
- package/dist/public/proof-protocol.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +12 -3
- package/dist/public/proof-sources.d.ts +2 -0
- package/dist/public/proof-sources.d.ts.map +1 -1
- package/dist/public/proof-sources.js +32 -6
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +59 -0
- package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/dist/public/skills/kibi-commit-review/SKILL.md +6 -2
- package/dist/public/skills/kibi-decisions/SKILL.md +7 -2
- package/dist/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
- package/dist/public/skills/kibi-usage/SKILL.md +50 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
- package/dist/public/skills/kibi-usage/resources/proof.md +13 -5
- package/dist/public/skills/kibi-usage/resources/workflows.md +10 -0
- package/dist/relationships/shards.d.ts +2 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +25 -1
- package/dist/schemas/entity.schema.json +98 -1
- package/dist/search-answer.d.ts +3 -2
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +57 -4
- package/dist/search-hints.d.ts +58 -0
- package/dist/search-hints.d.ts.map +1 -0
- package/dist/search-hints.js +187 -0
- package/dist/search-ranking.d.ts +7 -0
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/search-ranking.js +54 -56
- package/dist/search-token-cache.d.ts +30 -0
- package/dist/search-token-cache.d.ts.map +1 -0
- package/dist/search-token-cache.js +86 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +2 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +11 -1
- package/dist/types/entities.d.ts +12 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/usage-telemetry.d.ts +20 -0
- package/dist/usage-telemetry.d.ts.map +1 -0
- package/dist/usage-telemetry.js +93 -0
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +1 -0
- package/dist/utils/rule-registry.generated.d.ts +5 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +6 -0
- package/package.json +5 -4
- package/schema/entities.pl +12 -0
- package/src/public/impact/coverage-depth-quality.ts +59 -21
- package/src/public/impact/full-kb-quality.ts +15 -1
- package/src/public/impact/requirement-quality.ts +95 -38
- package/src/public/operations/check-executor.ts +41 -1
- package/src/public/operations/discovery-executors.ts +92 -4
- package/src/public/operations/evidence-floor.ts +15 -3
- package/src/public/operations/migration-plan.ts +41 -9
- package/src/public/operations/node-ports.ts +3 -1
- package/src/public/operations/repair-plan.ts +152 -1
- package/src/public/operations/schema6-check-actions.ts +1 -1
- package/src/public/operations/source-analysis-cache.ts +196 -0
- package/src/public/operations/specs/check-rules.generated.ts +2 -1
- package/src/public/operations/specs/discovery.ts +8 -2
- package/src/public/operations/specs/mutation-schemas.ts +34 -0
- package/src/public/operations/symbol-granularity-check.ts +25 -5
- package/src/public/proof-protocol-types.d.ts +1 -1
- package/src/public/proof-protocol.ts +18 -4
- package/src/public/proof-sources.ts +37 -6
- package/src/public/schemas/entity.ts +65 -0
- package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/src/public/skills/kibi-commit-review/SKILL.md +6 -2
- package/src/public/skills/kibi-decisions/SKILL.md +7 -2
- package/src/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
- package/src/public/skills/kibi-usage/SKILL.md +50 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
- package/src/public/skills/kibi-usage/resources/proof.md +13 -5
- package/src/public/skills/kibi-usage/resources/workflows.md +10 -0
- package/src/schemas/entity.schema.json +98 -1
|
@@ -654,6 +654,25 @@ function interpretationResults(interpretations, clauses, statement) {
|
|
|
654
654
|
warnings.push("Only the first three interpretations are considered; submit materially distinct alternatives explicitly and resolve them before writing.");
|
|
655
655
|
return { results, warnings };
|
|
656
656
|
}
|
|
657
|
+
// implements REQ-kibi-dimension-gap
|
|
658
|
+
/**
|
|
659
|
+
* The first quantifier over a collection or cardinality bound in a clause,
|
|
660
|
+
* and the typed groundings that represent it. The proof ladder's
|
|
661
|
+
* dimension_unrepresented gap uses the same words (requirement_proof.pl,
|
|
662
|
+
* claim_quantifier/2): only, any and some mostly scope a condition, so they
|
|
663
|
+
* are left out.
|
|
664
|
+
*/
|
|
665
|
+
export function claimDimension(text) {
|
|
666
|
+
const match = /\b(no more than|at least|at most|each|every|all|exactly)\b/i.exec(text);
|
|
667
|
+
if (!match?.[1])
|
|
668
|
+
return undefined;
|
|
669
|
+
const quantifier = match[1].toLowerCase().replaceAll(" ", "_");
|
|
670
|
+
const bound = ["exactly", "at_least", "at_most", "no_more_than"].includes(quantifier);
|
|
671
|
+
return {
|
|
672
|
+
quantifier,
|
|
673
|
+
rewrites: bound ? ["bound"] : ["rule", "count", "set"],
|
|
674
|
+
};
|
|
675
|
+
}
|
|
657
676
|
function propositionInventory(statement, clauses, suggestions, interpretations, inputPayloadHash) {
|
|
658
677
|
const interpretationKeys = new Map();
|
|
659
678
|
for (const interpretation of interpretations) {
|
|
@@ -701,6 +720,7 @@ function propositionInventory(statement, clauses, suggestions, interpretations,
|
|
|
701
720
|
reason =
|
|
702
721
|
"No accepted typed interpretation grounds this assertive proposition.";
|
|
703
722
|
}
|
|
723
|
+
const dimension = role === "normative" ? claimDimension(located.sourceText) : undefined;
|
|
704
724
|
return {
|
|
705
725
|
claim_key: clause.claim_key,
|
|
706
726
|
claim_text: located.sourceText,
|
|
@@ -710,6 +730,7 @@ function propositionInventory(statement, clauses, suggestions, interpretations,
|
|
|
710
730
|
payload_hash: inputPayloadHash,
|
|
711
731
|
...(semanticKey ? { semantic_key: semanticKey } : {}),
|
|
712
732
|
...(reason ? { reason } : {}),
|
|
733
|
+
...(dimension ? { dimension } : {}),
|
|
713
734
|
};
|
|
714
735
|
});
|
|
715
736
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SemanticStrictPropertyClaim } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The edge cases the proof ladder will derive from a typed property claim
|
|
4
|
+
* once it is written (packages/core/src/cases.pl), so the author sees the
|
|
5
|
+
* scenario debt before committing the model: the bound and the value past
|
|
6
|
+
* it, zero, one and many for an integer count, each set member and the value
|
|
7
|
+
* outside the set. Each rejection case later needs a scenario that assumes
|
|
8
|
+
* it, or the requirement reports uncovered_case.
|
|
9
|
+
*/
|
|
10
|
+
export interface CasePreview {
|
|
11
|
+
readonly generator: "boundary" | "cardinality" | "member" | "non_member" | "excluded_member";
|
|
12
|
+
/** The value class, as `kibi coverage --cases` prints it. */
|
|
13
|
+
readonly constraint: string;
|
|
14
|
+
readonly predicted: "success" | "rejection" | "unspecified";
|
|
15
|
+
/** The assumes fact a scenario states to land in the case. */
|
|
16
|
+
readonly assumption: Readonly<Record<string, unknown>>;
|
|
17
|
+
}
|
|
18
|
+
/** Most cases one fact yields, as in cases.pl. */
|
|
19
|
+
export declare const CASE_LIMIT = 12;
|
|
20
|
+
export declare function previewCases(claim: SemanticStrictPropertyClaim): {
|
|
21
|
+
cases: CasePreview[];
|
|
22
|
+
limitReached: boolean;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=case-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case-preview.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/case-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAG9D;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,EACd,UAAU,GACV,aAAa,GACb,QAAQ,GACR,YAAY,GACZ,iBAAiB,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;IAC5D,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxD;AAED,kDAAkD;AAClD,eAAO,MAAM,UAAU,KAAK,CAAC;AAkP7B,wBAAgB,YAAY,CAAC,KAAK,EAAE,2BAA2B,GAAG;IAChE,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB,CAaA"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/** Most cases one fact yields, as in cases.pl. */
|
|
2
|
+
export const CASE_LIMIT = 12;
|
|
3
|
+
const NEGATED = {
|
|
4
|
+
eq: "neq",
|
|
5
|
+
neq: "eq",
|
|
6
|
+
lt: "gte",
|
|
7
|
+
gte: "lt",
|
|
8
|
+
gt: "lte",
|
|
9
|
+
lte: "gt",
|
|
10
|
+
};
|
|
11
|
+
const UPPER_PAST = {
|
|
12
|
+
eq: "gt",
|
|
13
|
+
neq: "gt",
|
|
14
|
+
lte: "gt",
|
|
15
|
+
lt: "gte",
|
|
16
|
+
};
|
|
17
|
+
const LOWER_PAST = {
|
|
18
|
+
eq: "lt",
|
|
19
|
+
neq: "lt",
|
|
20
|
+
gte: "lt",
|
|
21
|
+
gt: "lte",
|
|
22
|
+
};
|
|
23
|
+
function region({ op, value }, integer) {
|
|
24
|
+
// On integers a strict bound is the closed bound one step in.
|
|
25
|
+
const v = value;
|
|
26
|
+
switch (op) {
|
|
27
|
+
case "eq":
|
|
28
|
+
return { kind: "interval", lo: v, loOpen: false, hi: v, hiOpen: false };
|
|
29
|
+
case "neq":
|
|
30
|
+
return { kind: "except", value: v };
|
|
31
|
+
case "lt":
|
|
32
|
+
return integer
|
|
33
|
+
? {
|
|
34
|
+
kind: "interval",
|
|
35
|
+
lo: Number.NEGATIVE_INFINITY,
|
|
36
|
+
loOpen: true,
|
|
37
|
+
hi: v - 1,
|
|
38
|
+
hiOpen: false,
|
|
39
|
+
}
|
|
40
|
+
: {
|
|
41
|
+
kind: "interval",
|
|
42
|
+
lo: Number.NEGATIVE_INFINITY,
|
|
43
|
+
loOpen: true,
|
|
44
|
+
hi: v,
|
|
45
|
+
hiOpen: true,
|
|
46
|
+
};
|
|
47
|
+
case "lte":
|
|
48
|
+
return {
|
|
49
|
+
kind: "interval",
|
|
50
|
+
lo: Number.NEGATIVE_INFINITY,
|
|
51
|
+
loOpen: true,
|
|
52
|
+
hi: v,
|
|
53
|
+
hiOpen: false,
|
|
54
|
+
};
|
|
55
|
+
case "gt":
|
|
56
|
+
return integer
|
|
57
|
+
? {
|
|
58
|
+
kind: "interval",
|
|
59
|
+
lo: v + 1,
|
|
60
|
+
loOpen: false,
|
|
61
|
+
hi: Number.POSITIVE_INFINITY,
|
|
62
|
+
hiOpen: true,
|
|
63
|
+
}
|
|
64
|
+
: {
|
|
65
|
+
kind: "interval",
|
|
66
|
+
lo: v,
|
|
67
|
+
loOpen: true,
|
|
68
|
+
hi: Number.POSITIVE_INFINITY,
|
|
69
|
+
hiOpen: true,
|
|
70
|
+
};
|
|
71
|
+
case "gte":
|
|
72
|
+
return {
|
|
73
|
+
kind: "interval",
|
|
74
|
+
lo: v,
|
|
75
|
+
loOpen: false,
|
|
76
|
+
hi: Number.POSITIVE_INFINITY,
|
|
77
|
+
hiOpen: true,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function contains(r, value) {
|
|
82
|
+
if (r.kind === "except")
|
|
83
|
+
return value !== r.value;
|
|
84
|
+
const aboveLo = r.loOpen ? value > r.lo : value >= r.lo;
|
|
85
|
+
const belowHi = r.hiOpen ? value < r.hi : value <= r.hi;
|
|
86
|
+
return aboveLo && belowHi;
|
|
87
|
+
}
|
|
88
|
+
/** Whether every value constraint a admits, constraint b admits too. */
|
|
89
|
+
function entails(a, b, integer) {
|
|
90
|
+
const ra = region(a, integer);
|
|
91
|
+
const rb = region(b, integer);
|
|
92
|
+
if (ra.kind === "except")
|
|
93
|
+
return rb.kind === "except" && rb.value === ra.value;
|
|
94
|
+
if (rb.kind === "except")
|
|
95
|
+
return !contains(ra, rb.value);
|
|
96
|
+
const loInside = ra.lo > rb.lo || (ra.lo === rb.lo && (ra.loOpen || !rb.loOpen));
|
|
97
|
+
const hiInside = ra.hi < rb.hi || (ra.hi === rb.hi && (ra.hiOpen || !rb.hiOpen));
|
|
98
|
+
return loInside && hiInside;
|
|
99
|
+
}
|
|
100
|
+
function numericCases(integer, op, v) {
|
|
101
|
+
const cases = [];
|
|
102
|
+
const add = (generator, caseOp, value) => cases.push({ generator, constraint: { op: caseOp, value } });
|
|
103
|
+
if (["eq", "neq", "lte", "gte"].includes(op))
|
|
104
|
+
add("boundary", "eq", v);
|
|
105
|
+
if (integer && op === "lt")
|
|
106
|
+
add("boundary", "eq", v - 1);
|
|
107
|
+
if (integer && op === "gt")
|
|
108
|
+
add("boundary", "eq", v + 1);
|
|
109
|
+
const upper = UPPER_PAST[op];
|
|
110
|
+
if (upper)
|
|
111
|
+
add("boundary", upper, v);
|
|
112
|
+
const lower = LOWER_PAST[op];
|
|
113
|
+
if (lower &&
|
|
114
|
+
!(integer && lower === "lt" && v <= 0) &&
|
|
115
|
+
!(integer && lower === "lte" && v < 0))
|
|
116
|
+
add("boundary", lower, v);
|
|
117
|
+
if (integer && v >= 1) {
|
|
118
|
+
add("cardinality", "eq", 0);
|
|
119
|
+
add("cardinality", "eq", 1);
|
|
120
|
+
add("cardinality", "gte", 2);
|
|
121
|
+
}
|
|
122
|
+
return cases;
|
|
123
|
+
}
|
|
124
|
+
function predict(claim, candidate, integer) {
|
|
125
|
+
if (entails(candidate, claim, integer))
|
|
126
|
+
return "success";
|
|
127
|
+
if (entails(candidate, { op: NEGATED[claim.op], value: claim.value }, integer))
|
|
128
|
+
return "rejection";
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
function numericPreviews(claim, op) {
|
|
132
|
+
const integer = claim.value_type === "int";
|
|
133
|
+
const value = integer ? claim.value_int : claim.value_number;
|
|
134
|
+
if (typeof value !== "number" || !Number.isFinite(value))
|
|
135
|
+
return [];
|
|
136
|
+
const bound = { op, value };
|
|
137
|
+
const kept = [];
|
|
138
|
+
for (const raw of numericCases(integer, op, value)) {
|
|
139
|
+
const predicted = predict(bound, raw.constraint, integer);
|
|
140
|
+
if (predicted === undefined)
|
|
141
|
+
continue;
|
|
142
|
+
// A class already named, or inside an earlier class with the same
|
|
143
|
+
// outcome, is not a case of its own.
|
|
144
|
+
const subsumed = kept.some((earlier) => earlier.predicted === predicted &&
|
|
145
|
+
entails(raw.constraint, earlier.raw.constraint, integer));
|
|
146
|
+
if (!subsumed)
|
|
147
|
+
kept.push({ raw, predicted });
|
|
148
|
+
}
|
|
149
|
+
return kept.map(({ raw, predicted }) => ({
|
|
150
|
+
generator: raw.generator,
|
|
151
|
+
constraint: `${raw.constraint.op} ${raw.constraint.value}`,
|
|
152
|
+
predicted,
|
|
153
|
+
assumption: {
|
|
154
|
+
fact_kind: "property_value",
|
|
155
|
+
subject_key: claim.subject_key,
|
|
156
|
+
property_key: claim.property_key,
|
|
157
|
+
operator: raw.constraint.op,
|
|
158
|
+
value_type: claim.value_type,
|
|
159
|
+
value: raw.constraint.value,
|
|
160
|
+
},
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
function setPreviews(claim) {
|
|
164
|
+
const members = claim.value_set ?? [];
|
|
165
|
+
const assumption = (value) => ({
|
|
166
|
+
fact_kind: "property_value",
|
|
167
|
+
subject_key: claim.subject_key,
|
|
168
|
+
property_key: claim.property_key,
|
|
169
|
+
operator: "includes",
|
|
170
|
+
value_type: "set",
|
|
171
|
+
value: [...value],
|
|
172
|
+
});
|
|
173
|
+
const previews = [];
|
|
174
|
+
if (["eq", "includes", "subset_of"].includes(claim.operator))
|
|
175
|
+
for (const member of members)
|
|
176
|
+
previews.push({
|
|
177
|
+
generator: "member",
|
|
178
|
+
constraint: `includes ${member}`,
|
|
179
|
+
predicted: "success",
|
|
180
|
+
assumption: assumption([member]),
|
|
181
|
+
});
|
|
182
|
+
const outside = claim.operator === "eq" || claim.operator === "subset_of"
|
|
183
|
+
? "rejection"
|
|
184
|
+
: claim.operator === "includes"
|
|
185
|
+
? "unspecified"
|
|
186
|
+
: undefined;
|
|
187
|
+
if (outside)
|
|
188
|
+
previews.push({
|
|
189
|
+
generator: "non_member",
|
|
190
|
+
constraint: `includes a value outside [${members.join(", ")}]`,
|
|
191
|
+
predicted: outside,
|
|
192
|
+
assumption: assumption(["<a value outside the set>"]),
|
|
193
|
+
});
|
|
194
|
+
if (claim.operator === "excludes")
|
|
195
|
+
for (const member of members)
|
|
196
|
+
previews.push({
|
|
197
|
+
generator: "excluded_member",
|
|
198
|
+
constraint: `includes ${member}`,
|
|
199
|
+
predicted: "rejection",
|
|
200
|
+
assumption: assumption([member]),
|
|
201
|
+
});
|
|
202
|
+
return previews;
|
|
203
|
+
}
|
|
204
|
+
export function previewCases(claim) {
|
|
205
|
+
const op = claim.operator;
|
|
206
|
+
const all = claim.value_type === "set"
|
|
207
|
+
? setPreviews(claim)
|
|
208
|
+
: (claim.value_type === "int" || claim.value_type === "number") &&
|
|
209
|
+
op in NEGATED
|
|
210
|
+
? numericPreviews(claim, op)
|
|
211
|
+
: [];
|
|
212
|
+
return {
|
|
213
|
+
cases: all.slice(0, CASE_LIMIT),
|
|
214
|
+
limitReached: all.length > CASE_LIMIT,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/shared.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,0BAA0B,EAE1B,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,QAAQ,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AAgB,CAC9B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,MAAM,CAUR;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAGD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,2BAA2B,EAClC,SAAS,EAAE,MAAM,EACjB,UAAU,SAAM,GACf,0BAA0B,CAgG5B;AAGD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,QAAQ,GAAG,MAAiB,GACrC,0BAA0B,CA+C5B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
+
import { previewCases } from "./case-preview.js";
|
|
2
3
|
import { semanticClaimKey } from "./clauses.js";
|
|
3
4
|
export const SEMANTIC_INVENTORY_VERSION = "kibi.semantic-inventory.v1";
|
|
4
5
|
// implements REQ-mcp-semantic-advisor-preflight
|
|
@@ -135,6 +136,7 @@ export function strictSuggestion(payload, evidence, claim, rationale, confidence
|
|
|
135
136
|
claim.value_int ??
|
|
136
137
|
claim.value_number ??
|
|
137
138
|
claim.value_bool;
|
|
139
|
+
const casesPreview = previewCases(claim);
|
|
138
140
|
const propertyFields = {
|
|
139
141
|
...(claim.value_string !== undefined
|
|
140
142
|
? { value_string: claim.value_string }
|
|
@@ -158,6 +160,7 @@ export function strictSuggestion(payload, evidence, claim, rationale, confidence
|
|
|
158
160
|
rationale,
|
|
159
161
|
suggested_next_tool: "kb_model_requirement",
|
|
160
162
|
claim,
|
|
163
|
+
...(casesPreview.cases.length > 0 ? { casesPreview } : {}),
|
|
161
164
|
rejected_alternatives: ["predicate", "observation_review"],
|
|
162
165
|
applyPlan: [
|
|
163
166
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LogicRuleIR } from "../../logic/ir.js";
|
|
2
|
+
import type { CasePreview } from "./case-preview.js";
|
|
2
3
|
export type SemanticAdvisorLane = "strict_property" | "predicate" | "rule" | "observation_review" | "none";
|
|
3
4
|
export type SemanticAdvisorReadiness = "modeled" | "needs_modeling" | "not_applicable";
|
|
4
5
|
export type SemanticLogicCoverageStatus = "complete" | "partial" | "unverified" | "not_applicable";
|
|
@@ -17,6 +18,19 @@ export interface SemanticProposition {
|
|
|
17
18
|
readonly payload_hash?: string;
|
|
18
19
|
readonly semantic_key?: string;
|
|
19
20
|
readonly reason?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Set when the clause quantifies over a collection (each, every, all) or
|
|
23
|
+
* bounds a cardinality (exactly, at least, at most, no more than). A
|
|
24
|
+
* boolean or ground-predicate grounding would state only the verdict, so
|
|
25
|
+
* the proof ladder reports dimension_unrepresented until the claim is
|
|
26
|
+
* grounded on one of `rewrites`.
|
|
27
|
+
*/
|
|
28
|
+
readonly dimension?: SemanticPropositionDimension;
|
|
29
|
+
}
|
|
30
|
+
export interface SemanticPropositionDimension {
|
|
31
|
+
readonly quantifier: string;
|
|
32
|
+
/** Typed groundings that represent what varies, likeliest first. */
|
|
33
|
+
readonly rewrites: readonly ("bound" | "rule" | "count" | "set")[];
|
|
20
34
|
}
|
|
21
35
|
export interface SemanticInterpretationInput {
|
|
22
36
|
readonly claim_key: string;
|
|
@@ -94,6 +108,15 @@ export type SemanticModelingSuggestion = {
|
|
|
94
108
|
readonly rationale: string;
|
|
95
109
|
readonly suggested_next_tool: "kb_model_requirement";
|
|
96
110
|
readonly claim: SemanticStrictPropertyClaim;
|
|
111
|
+
/**
|
|
112
|
+
* The edge cases the proof ladder derives from this claim once it is
|
|
113
|
+
* written; each rejection case needs a scenario that assumes it.
|
|
114
|
+
* Omitted when the claim yields none (a boolean or string value).
|
|
115
|
+
*/
|
|
116
|
+
readonly casesPreview?: {
|
|
117
|
+
readonly cases: readonly CasePreview[];
|
|
118
|
+
readonly limitReached: boolean;
|
|
119
|
+
};
|
|
97
120
|
readonly rejected_alternatives: readonly string[];
|
|
98
121
|
readonly applyPlan: readonly Readonly<Record<string, unknown>>[];
|
|
99
122
|
} | {
|
|
@@ -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,mBAAmB,GAC3B,iBAAiB,GACjB,WAAW,GACX,MAAM,GACN,oBAAoB,GACpB,MAAM,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,gBAAgB,GAChB,gBAAgB,CAAC;AACrB,MAAM,MAAM,2BAA2B,GACnC,UAAU,GACV,SAAS,GACT,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,WAAW,GACX,cAAc,GACd,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CA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B,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,2BAA2B,EAAE,CAAC;CACnE;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9E,QAAQ,CAAC,iBAAiB,EAAE;QAC1B,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;QACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;QACrC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAChE,CAAC;CACH"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const qualifiedSourceAnalyzers: readonly [{
|
|
2
2
|
readonly packageName: "kibi-plugin-treesitter";
|
|
3
|
-
readonly version: "2.0
|
|
3
|
+
readonly version: "2.1.0";
|
|
4
4
|
readonly files: {
|
|
5
|
-
readonly "SBOM.spdx.json": "
|
|
6
|
-
readonly "THIRD_PARTY_NOTICES.md": "
|
|
5
|
+
readonly "SBOM.spdx.json": "ffab8e28376a815906c901348cdc9c31ba566c903e832e1f9808c890a0cab3c2";
|
|
6
|
+
readonly "THIRD_PARTY_NOTICES.md": "fff747633b08a90bf949e998892211702b021c63e3a074ded102700fc447fed3";
|
|
7
7
|
readonly "assets/queries/bash.scm": "6ca535e8fe652b51203ac272831881dab001f7ac508e50551bc2cdc4a15d7b6c";
|
|
8
8
|
readonly "assets/queries/c.scm": "774ca67cfe23b0e0d1d3a4f01788049a822beb1311feee72b20a595a37be1e28";
|
|
9
9
|
readonly "assets/queries/cpp-extra.scm": "7cf486901eaf7e9196bc2c5dfe83785eed70d367136f8008af37eb4f1c12a68a";
|
|
@@ -15,6 +15,7 @@ export declare const qualifiedSourceAnalyzers: readonly [{
|
|
|
15
15
|
readonly "assets/queries/java-extra.scm": "5ce7857f2b52c10b3672bc09f39f287cff2eaa7caa0b75dafccbaa5fec58431d";
|
|
16
16
|
readonly "assets/queries/java.scm": "bcb22147b8582d92743fc973864cefb894a4c12b3957f16f3d472b2ec7cd4c49";
|
|
17
17
|
readonly "assets/queries/php.scm": "4ac5e30f99f3abe5417dcb42219e0790c66f9b4bb3be071bc60160dd012f3cd8";
|
|
18
|
+
readonly "assets/queries/prolog.scm": "df6af374b121bc85ff5b471763b542894ba9602b37f3ec7c17ab70944a7486b1";
|
|
18
19
|
readonly "assets/queries/python.scm": "d0f3e577878167bfabc30e526e497bce58d1699b9bcabf8ab3a50698efb5ca3e";
|
|
19
20
|
readonly "assets/queries/ruby.scm": "ed1e7dc07a95b87aef267e7f9715c6717a70f09efbd7b6f48bbd51c7b7510cf3";
|
|
20
21
|
readonly "assets/queries/rust-extra.scm": "511a492200e813f15b7ebec324eae69a245986a9d6813ddabe776075fd65976c";
|
|
@@ -31,14 +32,15 @@ export declare const qualifiedSourceAnalyzers: readonly [{
|
|
|
31
32
|
readonly "assets/tree-sitter-python.wasm": "16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47";
|
|
32
33
|
readonly "assets/tree-sitter-ruby.wasm": "09a96427d7c72f0613ed470cd9812223fc4a91d6a9c025c0235cc6bd59ff96f4";
|
|
33
34
|
readonly "assets/tree-sitter-rust.wasm": "f65f354215611fd94ad34134b3427eb3d58cbb745df7b6509ba722184db73d57";
|
|
35
|
+
readonly "assets/tree-sitter-swi_prolog.wasm": "a9872f0369b51c1eed2ef04267382c34aeaeba7c97b6f55b829fbf625bdb22dd";
|
|
34
36
|
readonly "assets/tree-sitter-terraform.release.wasm": "59dbcbb0f08eb78b78f37510834559a48ce5c9d4866c978d62c6390796461cb5";
|
|
35
|
-
readonly "catalog.json": "
|
|
36
|
-
readonly "dist/analysis-worker.js": "
|
|
37
|
-
readonly "dist/catalog.js": "
|
|
37
|
+
readonly "catalog.json": "c10f0cd5d1989abb9543c4e385ba44fa226cad4186613791061b56dbda2497a7";
|
|
38
|
+
readonly "dist/analysis-worker.js": "9ef76ad467f6b4e2a117a3b5656838eb5f096890931ec0480566b76b73fd64db";
|
|
39
|
+
readonly "dist/catalog.js": "c485cd1bf81098c3e2e86d37f78bf9f55af122f5d6b9587c0c57b494d68e4968";
|
|
38
40
|
readonly "dist/extractor.js": "1d8cd819e7ec8fcc291a44e5ffe4ccfe77099301677913fcfe0d92e7ce971f33";
|
|
39
41
|
readonly "dist/index.js": "adc03d77d94c0133b3188950b35f79db19e447cf7bfa1f7e1cf1f5c97a582a44";
|
|
40
42
|
readonly "dist/performance-timing.js": "56cce530f627c8fd079e8ec070322f84378ae50c40a6765d88b418850692940b";
|
|
41
|
-
readonly "integrity.json": "
|
|
43
|
+
readonly "integrity.json": "fabfc50ba1392b4b0f7b9bf39e714de05d093ebfccdcc2225eb9d1fd84ad9a4e";
|
|
42
44
|
readonly "licenses/tree-sitter-bash-MIT.txt": "49bf33cf78ef5897e4e161ce1517df7de1ae5042a65b6bcfd44401e0fc606559";
|
|
43
45
|
readonly "licenses/tree-sitter-c-MIT.txt": "2e0110e07abef7c2548b26ec9d6969775617ca539a0dc8dbeeb14d6452c711d1";
|
|
44
46
|
readonly "licenses/tree-sitter-c-sharp-MIT.txt": "778fb7d63b8c1844da315648c02f325c4713a6f4a5d19644fd413421422776d3";
|
|
@@ -50,8 +52,9 @@ export declare const qualifiedSourceAnalyzers: readonly [{
|
|
|
50
52
|
readonly "licenses/tree-sitter-python-MIT.txt": "d724405ce238a22c0d35769c5a36b386ad5958192efe8bbb304fb2896254575f";
|
|
51
53
|
readonly "licenses/tree-sitter-ruby-MIT.txt": "9c99b99e93d3c6461bef9f6bac45d17b8bf014172625c24f76319bbd235a7b80";
|
|
52
54
|
readonly "licenses/tree-sitter-rust-MIT.txt": "31d5b6f4243d5c7c6e1c4ebbbb9f6407bd1457a08bcc4f706521710341acba36";
|
|
55
|
+
readonly "licenses/tree-sitter-swi-prolog-MIT.txt": "c51ac4800457c57ddabdee5486605df9452705491f806cb87241b7a8acc7ab2d";
|
|
53
56
|
readonly "licenses/web-tree-sitter-MIT.txt": "c5cfb43042b6b72045f4ba997834d0a7786d2793d91680868b5815b39f14fc78";
|
|
54
|
-
readonly "package.json": "
|
|
57
|
+
readonly "package.json": "5e81c6ce4712add506e576b30d05a80d07a9ad65ba863c2765483b4150687370";
|
|
55
58
|
};
|
|
56
59
|
readonly dependencies: readonly [{
|
|
57
60
|
readonly packageName: "web-tree-sitter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approved-source-analyzers.generated.d.ts","sourceRoot":"","sources":["../../src/plugins/approved-source-analyzers.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"approved-source-analyzers.generated.d.ts","sourceRoot":"","sources":["../../src/plugins/approved-source-analyzers.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyI3B,CAAC"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
export const qualifiedSourceAnalyzers = [
|
|
5
5
|
{
|
|
6
6
|
packageName: "kibi-plugin-treesitter",
|
|
7
|
-
version: "2.0
|
|
7
|
+
version: "2.1.0",
|
|
8
8
|
files: {
|
|
9
|
-
"SBOM.spdx.json": "
|
|
10
|
-
"THIRD_PARTY_NOTICES.md": "
|
|
9
|
+
"SBOM.spdx.json": "ffab8e28376a815906c901348cdc9c31ba566c903e832e1f9808c890a0cab3c2",
|
|
10
|
+
"THIRD_PARTY_NOTICES.md": "fff747633b08a90bf949e998892211702b021c63e3a074ded102700fc447fed3",
|
|
11
11
|
"assets/queries/bash.scm": "6ca535e8fe652b51203ac272831881dab001f7ac508e50551bc2cdc4a15d7b6c",
|
|
12
12
|
"assets/queries/c.scm": "774ca67cfe23b0e0d1d3a4f01788049a822beb1311feee72b20a595a37be1e28",
|
|
13
13
|
"assets/queries/cpp-extra.scm": "7cf486901eaf7e9196bc2c5dfe83785eed70d367136f8008af37eb4f1c12a68a",
|
|
@@ -19,6 +19,7 @@ export const qualifiedSourceAnalyzers = [
|
|
|
19
19
|
"assets/queries/java-extra.scm": "5ce7857f2b52c10b3672bc09f39f287cff2eaa7caa0b75dafccbaa5fec58431d",
|
|
20
20
|
"assets/queries/java.scm": "bcb22147b8582d92743fc973864cefb894a4c12b3957f16f3d472b2ec7cd4c49",
|
|
21
21
|
"assets/queries/php.scm": "4ac5e30f99f3abe5417dcb42219e0790c66f9b4bb3be071bc60160dd012f3cd8",
|
|
22
|
+
"assets/queries/prolog.scm": "df6af374b121bc85ff5b471763b542894ba9602b37f3ec7c17ab70944a7486b1",
|
|
22
23
|
"assets/queries/python.scm": "d0f3e577878167bfabc30e526e497bce58d1699b9bcabf8ab3a50698efb5ca3e",
|
|
23
24
|
"assets/queries/ruby.scm": "ed1e7dc07a95b87aef267e7f9715c6717a70f09efbd7b6f48bbd51c7b7510cf3",
|
|
24
25
|
"assets/queries/rust-extra.scm": "511a492200e813f15b7ebec324eae69a245986a9d6813ddabe776075fd65976c",
|
|
@@ -35,14 +36,15 @@ export const qualifiedSourceAnalyzers = [
|
|
|
35
36
|
"assets/tree-sitter-python.wasm": "16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47",
|
|
36
37
|
"assets/tree-sitter-ruby.wasm": "09a96427d7c72f0613ed470cd9812223fc4a91d6a9c025c0235cc6bd59ff96f4",
|
|
37
38
|
"assets/tree-sitter-rust.wasm": "f65f354215611fd94ad34134b3427eb3d58cbb745df7b6509ba722184db73d57",
|
|
39
|
+
"assets/tree-sitter-swi_prolog.wasm": "a9872f0369b51c1eed2ef04267382c34aeaeba7c97b6f55b829fbf625bdb22dd",
|
|
38
40
|
"assets/tree-sitter-terraform.release.wasm": "59dbcbb0f08eb78b78f37510834559a48ce5c9d4866c978d62c6390796461cb5",
|
|
39
|
-
"catalog.json": "
|
|
40
|
-
"dist/analysis-worker.js": "
|
|
41
|
-
"dist/catalog.js": "
|
|
41
|
+
"catalog.json": "c10f0cd5d1989abb9543c4e385ba44fa226cad4186613791061b56dbda2497a7",
|
|
42
|
+
"dist/analysis-worker.js": "9ef76ad467f6b4e2a117a3b5656838eb5f096890931ec0480566b76b73fd64db",
|
|
43
|
+
"dist/catalog.js": "c485cd1bf81098c3e2e86d37f78bf9f55af122f5d6b9587c0c57b494d68e4968",
|
|
42
44
|
"dist/extractor.js": "1d8cd819e7ec8fcc291a44e5ffe4ccfe77099301677913fcfe0d92e7ce971f33",
|
|
43
45
|
"dist/index.js": "adc03d77d94c0133b3188950b35f79db19e447cf7bfa1f7e1cf1f5c97a582a44",
|
|
44
46
|
"dist/performance-timing.js": "56cce530f627c8fd079e8ec070322f84378ae50c40a6765d88b418850692940b",
|
|
45
|
-
"integrity.json": "
|
|
47
|
+
"integrity.json": "fabfc50ba1392b4b0f7b9bf39e714de05d093ebfccdcc2225eb9d1fd84ad9a4e",
|
|
46
48
|
"licenses/tree-sitter-bash-MIT.txt": "49bf33cf78ef5897e4e161ce1517df7de1ae5042a65b6bcfd44401e0fc606559",
|
|
47
49
|
"licenses/tree-sitter-c-MIT.txt": "2e0110e07abef7c2548b26ec9d6969775617ca539a0dc8dbeeb14d6452c711d1",
|
|
48
50
|
"licenses/tree-sitter-c-sharp-MIT.txt": "778fb7d63b8c1844da315648c02f325c4713a6f4a5d19644fd413421422776d3",
|
|
@@ -54,8 +56,9 @@ export const qualifiedSourceAnalyzers = [
|
|
|
54
56
|
"licenses/tree-sitter-python-MIT.txt": "d724405ce238a22c0d35769c5a36b386ad5958192efe8bbb304fb2896254575f",
|
|
55
57
|
"licenses/tree-sitter-ruby-MIT.txt": "9c99b99e93d3c6461bef9f6bac45d17b8bf014172625c24f76319bbd235a7b80",
|
|
56
58
|
"licenses/tree-sitter-rust-MIT.txt": "31d5b6f4243d5c7c6e1c4ebbbb9f6407bd1457a08bcc4f706521710341acba36",
|
|
59
|
+
"licenses/tree-sitter-swi-prolog-MIT.txt": "c51ac4800457c57ddabdee5486605df9452705491f806cb87241b7a8acc7ab2d",
|
|
57
60
|
"licenses/web-tree-sitter-MIT.txt": "c5cfb43042b6b72045f4ba997834d0a7786d2793d91680868b5815b39f14fc78",
|
|
58
|
-
"package.json": "
|
|
61
|
+
"package.json": "5e81c6ce4712add506e576b30d05a80d07a9ad65ba863c2765483b4150687370",
|
|
59
62
|
},
|
|
60
63
|
dependencies: [
|
|
61
64
|
{
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PluginProviderStamp, type SearchHint, type SearchHintsInput, type SearchHintsV1 } from "kibi-plugin-sdk";
|
|
2
|
+
import { type SemanticClassifierDiagnostic } from "./compose-semantic-classifier.js";
|
|
3
|
+
import type { CapabilityModeResolution, CapabilityProviderBinding } from "./registry.js";
|
|
4
|
+
export type SearchHintsDiagnostic = SemanticClassifierDiagnostic;
|
|
5
|
+
export type ComposedSearchHints = Readonly<{
|
|
6
|
+
/** Hints of the replace provider; empty without one or when it failed. */
|
|
7
|
+
hints: readonly SearchHint[];
|
|
8
|
+
/** Stamp of the provider whose hints are shown, if any. */
|
|
9
|
+
stamp: PluginProviderStamp | null;
|
|
10
|
+
shadowComparisons: readonly {
|
|
11
|
+
readonly stamp: PluginProviderStamp;
|
|
12
|
+
readonly hints: readonly SearchHint[];
|
|
13
|
+
}[];
|
|
14
|
+
fallbackUsed: boolean;
|
|
15
|
+
diagnostics: readonly SearchHintsDiagnostic[];
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* replace / shadow for search hints. The builtin has no hints, so without a
|
|
19
|
+
* replace provider nothing is shown; a failing or late replace provider
|
|
20
|
+
* yields no hints (stamped fallbackUsed) and a diagnostic, never an error.
|
|
21
|
+
* Shadow providers are recorded for comparison only. External providers run
|
|
22
|
+
* only for allowlisted operations.
|
|
23
|
+
*/
|
|
24
|
+
export declare function composeSearchHints(resolution: CapabilityModeResolution<SearchHintsV1>, input: SearchHintsInput, options: Readonly<{
|
|
25
|
+
operationName: string;
|
|
26
|
+
/** How long one provider may take to answer. */
|
|
27
|
+
timeoutMs: (binding: CapabilityProviderBinding<SearchHintsV1>) => number;
|
|
28
|
+
}>): Promise<ComposedSearchHints>;
|
|
29
|
+
//# sourceMappingURL=compose-search-hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-search-hints.d.ts","sourceRoot":"","sources":["../../src/plugins/compose-search-hints.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,4BAA4B,EAGlC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAGjE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,0EAA0E;IAC1E,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,2DAA2D;IAC3D,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,SAAS;QAC1B,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;QACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;KACvC,EAAE,CAAC;IACJ,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC/C,CAAC,CAAC;AA+CH;;;;;;GAMG;AAEH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,wBAAwB,CAAC,aAAa,CAAC,EACnD,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,QAAQ,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,SAAS,EAAE,CAAC,OAAO,EAAE,yBAAyB,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;CAC1E,CAAC,GACD,OAAO,CAAC,mBAAmB,CAAC,CAuC9B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
(at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { validateSearchHintsResult, } from "kibi-plugin-sdk";
|
|
19
|
+
import { diagnosticFromError, withFallback, } from "./compose-semantic-classifier.js";
|
|
20
|
+
import { allowsExternalSearchHints } from "./external-allowlist.js";
|
|
21
|
+
/** A provider that does not answer within the deadline counts as failed. */
|
|
22
|
+
class SearchHintsTimeout extends Error {
|
|
23
|
+
code = "timeout";
|
|
24
|
+
constructor(ms) {
|
|
25
|
+
super(`search hints provider did not answer within ${ms} ms`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function ask(binding, input, timeoutMs) {
|
|
29
|
+
let timer;
|
|
30
|
+
try {
|
|
31
|
+
const answer = Promise.resolve(binding.capability.hint(input));
|
|
32
|
+
// rationale: clearing only frees the timer early; a timer left to fire
|
|
33
|
+
// rejects a race that already settled, which nothing observes.
|
|
34
|
+
// Stryker disable all
|
|
35
|
+
const clear = () => clearTimeout(timer);
|
|
36
|
+
answer.then(clear, clear);
|
|
37
|
+
// Stryker restore all
|
|
38
|
+
const result = await Promise.race([
|
|
39
|
+
answer,
|
|
40
|
+
new Promise((_, reject) => {
|
|
41
|
+
timer = setTimeout(() => reject(new SearchHintsTimeout(timeoutMs)), timeoutMs);
|
|
42
|
+
}),
|
|
43
|
+
]);
|
|
44
|
+
const validated = validateSearchHintsResult(result, input.entities.map((entity) => entity.id), input.limit);
|
|
45
|
+
return { ok: true, hints: validated.hints };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
return { ok: false, diagnostic: diagnosticFromError(binding, error) };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* replace / shadow for search hints. The builtin has no hints, so without a
|
|
53
|
+
* replace provider nothing is shown; a failing or late replace provider
|
|
54
|
+
* yields no hints (stamped fallbackUsed) and a diagnostic, never an error.
|
|
55
|
+
* Shadow providers are recorded for comparison only. External providers run
|
|
56
|
+
* only for allowlisted operations.
|
|
57
|
+
*/
|
|
58
|
+
// implements REQ-kibi-search-hints-host
|
|
59
|
+
export async function composeSearchHints(resolution, input, options) {
|
|
60
|
+
const empty = {
|
|
61
|
+
hints: [],
|
|
62
|
+
stamp: null,
|
|
63
|
+
shadowComparisons: [],
|
|
64
|
+
fallbackUsed: false,
|
|
65
|
+
diagnostics: [],
|
|
66
|
+
};
|
|
67
|
+
if (!allowsExternalSearchHints(options.operationName))
|
|
68
|
+
return empty;
|
|
69
|
+
const diagnostics = [];
|
|
70
|
+
let hints = [];
|
|
71
|
+
let stamp = null;
|
|
72
|
+
let fallbackUsed = false;
|
|
73
|
+
if (resolution.replace) {
|
|
74
|
+
const answer = await ask(resolution.replace, input, options.timeoutMs(resolution.replace));
|
|
75
|
+
if (answer.ok) {
|
|
76
|
+
hints = answer.hints;
|
|
77
|
+
stamp = resolution.replace.stamp;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
diagnostics.push(answer.diagnostic);
|
|
81
|
+
fallbackUsed = true;
|
|
82
|
+
stamp = withFallback(resolution.replace.stamp, true);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const shadowComparisons = [];
|
|
86
|
+
for (const shadow of resolution.shadow) {
|
|
87
|
+
const answer = await ask(shadow, input, options.timeoutMs(shadow));
|
|
88
|
+
if (answer.ok)
|
|
89
|
+
shadowComparisons.push({ stamp: shadow.stamp, hints: answer.hints });
|
|
90
|
+
else
|
|
91
|
+
diagnostics.push(answer.diagnostic);
|
|
92
|
+
}
|
|
93
|
+
return { hints, stamp, shadowComparisons, fallbackUsed, diagnostics };
|
|
94
|
+
}
|