kibi-cli 2.35.1 → 2.38.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.
Files changed (154) hide show
  1. package/dist/cli-operation-metadata.d.ts +1 -1
  2. package/dist/cli-operation-metadata.js +1 -1
  3. package/dist/cli-register-foundation.d.ts.map +1 -1
  4. package/dist/cli-register-foundation.js +2 -1
  5. package/dist/cli-register-maintenance.d.ts.map +1 -1
  6. package/dist/cli-register-maintenance.js +5 -0
  7. package/dist/cli-validate.d.ts.map +1 -1
  8. package/dist/cli-validate.js +21 -2
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +16 -1
  11. package/dist/commands/aggregated-checks.d.ts.map +1 -1
  12. package/dist/commands/aggregated-checks.js +89 -16
  13. package/dist/commands/doctor.d.ts.map +1 -1
  14. package/dist/commands/doctor.js +56 -35
  15. package/dist/commands/github-init.d.ts.map +1 -1
  16. package/dist/commands/github-init.js +4 -2
  17. package/dist/commands/hook-managers.d.ts +43 -0
  18. package/dist/commands/hook-managers.d.ts.map +1 -0
  19. package/dist/commands/hook-managers.js +426 -0
  20. package/dist/commands/init.d.ts +1 -0
  21. package/dist/commands/init.d.ts.map +1 -1
  22. package/dist/commands/init.js +40 -5
  23. package/dist/commands/sync/persistence.d.ts.map +1 -1
  24. package/dist/commands/sync/persistence.js +43 -1
  25. package/dist/commands/telemetry.d.ts +7 -0
  26. package/dist/commands/telemetry.d.ts.map +1 -0
  27. package/dist/commands/telemetry.js +23 -0
  28. package/dist/decision-firmness.d.ts.map +1 -1
  29. package/dist/decision-firmness.js +11 -14
  30. package/dist/engine-limits.d.ts.map +1 -1
  31. package/dist/engine-limits.js +8 -10
  32. package/dist/entity-body-context.d.ts.map +1 -1
  33. package/dist/entity-body-context.js +39 -36
  34. package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
  35. package/dist/extractors/symbol-coordinates.js +23 -4
  36. package/dist/firm-decision-edit.d.ts.map +1 -1
  37. package/dist/firm-decision-edit.js +1 -3
  38. package/dist/intent-search.d.ts +5 -1
  39. package/dist/intent-search.d.ts.map +1 -1
  40. package/dist/intent-search.js +118 -33
  41. package/dist/logic/ir.d.ts.map +1 -1
  42. package/dist/logic/ir.js +82 -108
  43. package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
  44. package/dist/operations/bootstrap/guidance-actions.js +2 -1
  45. package/dist/operations/bootstrap/plugin-offers.d.ts +11 -2
  46. package/dist/operations/bootstrap/plugin-offers.d.ts.map +1 -1
  47. package/dist/operations/bootstrap/plugin-offers.js +48 -9
  48. package/dist/operations/proof/claim-bindings.d.ts.map +1 -1
  49. package/dist/operations/proof/claim-bindings.js +1 -0
  50. package/dist/operations/proof/code-certificates.d.ts +2 -0
  51. package/dist/operations/proof/code-certificates.d.ts.map +1 -1
  52. package/dist/operations/proof/code-certificates.js +34 -14
  53. package/dist/operations/proof/code-models.d.ts.map +1 -1
  54. package/dist/operations/proof/code-models.js +19 -5
  55. package/dist/operations/proof/code-runner.d.ts +16 -0
  56. package/dist/operations/proof/code-runner.d.ts.map +1 -1
  57. package/dist/operations/proof/code-runner.js +42 -6
  58. package/dist/plugins/compose-search-hints.d.ts +29 -0
  59. package/dist/plugins/compose-search-hints.d.ts.map +1 -0
  60. package/dist/plugins/compose-search-hints.js +94 -0
  61. package/dist/plugins/external-allowlist.d.ts +7 -0
  62. package/dist/plugins/external-allowlist.d.ts.map +1 -1
  63. package/dist/plugins/external-allowlist.js +11 -0
  64. package/dist/plugins/registry.d.ts +8 -1
  65. package/dist/plugins/registry.d.ts.map +1 -1
  66. package/dist/plugins/registry.js +22 -3
  67. package/dist/prolog/codec.d.ts.map +1 -1
  68. package/dist/prolog/codec.js +10 -20
  69. package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
  70. package/dist/public/impact/coverage-depth-quality.js +32 -16
  71. package/dist/public/impact/full-kb-quality.d.ts +6 -0
  72. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  73. package/dist/public/impact/full-kb-quality.js +8 -3
  74. package/dist/public/impact/requirement-quality.d.ts.map +1 -1
  75. package/dist/public/impact/requirement-quality.js +56 -29
  76. package/dist/public/operations/catalog.d.ts +13 -3
  77. package/dist/public/operations/catalog.d.ts.map +1 -1
  78. package/dist/public/operations/check-executor.d.ts +6 -0
  79. package/dist/public/operations/check-executor.d.ts.map +1 -1
  80. package/dist/public/operations/check-executor.js +34 -2
  81. package/dist/public/operations/discovery-executors.d.ts +5 -1
  82. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  83. package/dist/public/operations/discovery-executors.js +65 -4
  84. package/dist/public/operations/evidence-floor.d.ts +8 -1
  85. package/dist/public/operations/evidence-floor.d.ts.map +1 -1
  86. package/dist/public/operations/evidence-floor.js +3 -4
  87. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  88. package/dist/public/operations/migration-plan.js +41 -10
  89. package/dist/public/operations/node-ports.d.ts.map +1 -1
  90. package/dist/public/operations/node-ports.js +3 -1
  91. package/dist/public/operations/source-analysis-cache.d.ts +22 -0
  92. package/dist/public/operations/source-analysis-cache.d.ts.map +1 -0
  93. package/dist/public/operations/source-analysis-cache.js +157 -0
  94. package/dist/public/operations/specs/discovery.d.ts +7 -2
  95. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  96. package/dist/public/operations/specs/discovery.js +7 -2
  97. package/dist/public/operations/specs/mutation-schemas.d.ts +6 -1
  98. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  99. package/dist/public/operations/specs/upsert.d.ts +6 -1
  100. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  101. package/dist/public/operations/symbol-granularity-check.d.ts +3 -1
  102. package/dist/public/operations/symbol-granularity-check.d.ts.map +1 -1
  103. package/dist/public/operations/symbol-granularity-check.js +21 -7
  104. package/dist/public/proof-protocol.d.ts +6 -1
  105. package/dist/public/proof-protocol.d.ts.map +1 -1
  106. package/dist/public/proof-protocol.js +12 -3
  107. package/dist/public/proof-sources.d.ts +2 -0
  108. package/dist/public/proof-sources.d.ts.map +1 -1
  109. package/dist/public/proof-sources.js +32 -6
  110. package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
  111. package/dist/public/skills/kibi-usage/SKILL.md +42 -3
  112. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
  113. package/dist/public/skills/kibi-usage/resources/proof.md +13 -5
  114. package/dist/public/skills/kibi-usage/resources/workflows.md +10 -0
  115. package/dist/relationships/shards.d.ts +2 -0
  116. package/dist/relationships/shards.d.ts.map +1 -1
  117. package/dist/relationships/shards.js +25 -1
  118. package/dist/schemas/entity.schema.json +6 -1
  119. package/dist/search-answer.js +1 -1
  120. package/dist/search-hints.d.ts +58 -0
  121. package/dist/search-hints.d.ts.map +1 -0
  122. package/dist/search-hints.js +187 -0
  123. package/dist/search-ranking.d.ts +7 -0
  124. package/dist/search-ranking.d.ts.map +1 -1
  125. package/dist/search-ranking.js +54 -56
  126. package/dist/search-token-cache.d.ts +30 -0
  127. package/dist/search-token-cache.d.ts.map +1 -0
  128. package/dist/search-token-cache.js +86 -0
  129. package/dist/usage-telemetry.d.ts +11 -0
  130. package/dist/usage-telemetry.d.ts.map +1 -0
  131. package/dist/usage-telemetry.js +47 -0
  132. package/dist/utils/branch-resolver.d.ts.map +1 -1
  133. package/dist/utils/branch-resolver.js +1 -0
  134. package/package.json +5 -4
  135. package/src/public/impact/coverage-depth-quality.ts +59 -21
  136. package/src/public/impact/full-kb-quality.ts +15 -1
  137. package/src/public/impact/requirement-quality.ts +95 -38
  138. package/src/public/operations/check-executor.ts +41 -1
  139. package/src/public/operations/discovery-executors.ts +92 -4
  140. package/src/public/operations/evidence-floor.ts +15 -3
  141. package/src/public/operations/migration-plan.ts +41 -9
  142. package/src/public/operations/node-ports.ts +3 -1
  143. package/src/public/operations/source-analysis-cache.ts +196 -0
  144. package/src/public/operations/specs/discovery.ts +8 -2
  145. package/src/public/operations/symbol-granularity-check.ts +25 -5
  146. package/src/public/proof-protocol-types.d.ts +1 -1
  147. package/src/public/proof-protocol.ts +18 -4
  148. package/src/public/proof-sources.ts +37 -6
  149. package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
  150. package/src/public/skills/kibi-usage/SKILL.md +42 -3
  151. package/src/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
  152. package/src/public/skills/kibi-usage/resources/proof.md +13 -5
  153. package/src/public/skills/kibi-usage/resources/workflows.md +10 -0
  154. package/src/schemas/entity.schema.json +6 -1
package/dist/logic/ir.js CHANGED
@@ -13,7 +13,9 @@ function isRecord(value) {
13
13
  return typeof value === "object" && value !== null && !Array.isArray(value);
14
14
  }
15
15
  function asString(value) {
16
- return typeof value === "string" && value.trim() ? value.trim() : undefined;
16
+ if (typeof value !== "string")
17
+ return undefined;
18
+ return value.trim() || undefined;
17
19
  }
18
20
  function invalidKeys(value, allowed, path, errors) {
19
21
  const allowedKeys = new Set(allowed);
@@ -28,8 +30,8 @@ function stableValue(value) {
28
30
  return value.map(stableValue);
29
31
  if (!isRecord(value))
30
32
  return value;
33
+ // JSON.stringify drops undefined fields itself.
31
34
  return Object.fromEntries(Object.entries(value)
32
- .filter(([, nested]) => nested !== undefined)
33
35
  .sort(([a], [b]) => a.localeCompare(b))
34
36
  .map(([key, nested]) => [key, stableValue(nested)]));
35
37
  }
@@ -50,10 +52,23 @@ function mergeInto(target, source) {
50
52
  for (const value of source)
51
53
  target.add(value);
52
54
  }
55
+ /** The name of a variable term, before the term itself is validated. */
56
+ function variableName(term) {
57
+ return isRecord(term) && term.kind === "var" && typeof term.name === "string"
58
+ ? term.name
59
+ : undefined;
60
+ }
61
+ function addVariables(target, terms) {
62
+ for (const term of terms) {
63
+ const name = variableName(term);
64
+ if (name !== undefined)
65
+ target.add(name);
66
+ }
67
+ }
53
68
  function validateTerm(value, path, declared, errors) {
54
69
  if (!isRecord(value) || typeof value.kind !== "string") {
55
70
  errors.push(`${path} must be a typed term object`);
56
- return false;
71
+ return;
57
72
  }
58
73
  switch (value.kind) {
59
74
  case "var": {
@@ -66,7 +81,7 @@ function validateTerm(value, path, declared, errors) {
66
81
  errors.push(`${path}.type must be a lowercase type name`);
67
82
  if (name && !declared.has(name))
68
83
  errors.push(`${path}.name ${name} is not declared in variables`);
69
- return true;
84
+ return;
70
85
  }
71
86
  case "const":
72
87
  invalidKeys(value, ["kind", "value", "type"], path, errors);
@@ -75,48 +90,43 @@ function validateTerm(value, path, declared, errors) {
75
90
  if (value.type !== undefined &&
76
91
  (typeof value.type !== "string" || !TYPE_NAME.test(value.type)))
77
92
  errors.push(`${path}.type is invalid`);
78
- return true;
93
+ return;
79
94
  case "number":
80
95
  invalidKeys(value, ["kind", "value", "unit"], path, errors);
81
- if (typeof value.value !== "number" || !Number.isFinite(value.value))
96
+ if (!Number.isFinite(value.value))
82
97
  errors.push(`${path}.value must be finite`);
83
98
  if (value.unit !== undefined &&
84
99
  (typeof value.unit !== "string" || !TYPE_NAME.test(value.unit)))
85
100
  errors.push(`${path}.unit is invalid`);
86
- return true;
101
+ return;
87
102
  case "duration":
88
103
  invalidKeys(value, ["kind", "value", "unit"], path, errors);
89
- if (typeof value.value !== "number" ||
90
- !Number.isFinite(value.value) ||
91
- value.value < 0)
104
+ if (!Number.isFinite(value.value) || Number(value.value) < 0)
92
105
  errors.push(`${path}.value must be a non-negative finite duration`);
93
106
  if (!["ms", "s", "m", "h", "d", "w"].includes(String(value.unit)))
94
107
  errors.push(`${path}.unit is invalid`);
95
- return true;
108
+ return;
96
109
  case "timestamp":
97
110
  invalidKeys(value, ["kind", "value"], path, errors);
98
111
  if (typeof value.value !== "string" ||
99
112
  Number.isNaN(Date.parse(value.value)))
100
113
  errors.push(`${path}.value must be an ISO timestamp`);
101
- return true;
102
- case "interval":
114
+ return;
115
+ case "interval": {
103
116
  invalidKeys(value, ["kind", "start", "end"], path, errors);
104
- if (typeof value.start !== "string" ||
105
- Number.isNaN(Date.parse(value.start)))
117
+ const start = typeof value.start === "string" ? Date.parse(value.start) : Number.NaN;
118
+ const end = typeof value.end === "string" ? Date.parse(value.end) : Number.NaN;
119
+ if (Number.isNaN(start))
106
120
  errors.push(`${path}.start must be an ISO timestamp`);
107
- if (typeof value.end !== "string" || Number.isNaN(Date.parse(value.end)))
121
+ if (Number.isNaN(end))
108
122
  errors.push(`${path}.end must be an ISO timestamp`);
109
- if (typeof value.start === "string" &&
110
- typeof value.end === "string" &&
111
- !Number.isNaN(Date.parse(value.start)) &&
112
- !Number.isNaN(Date.parse(value.end)) &&
113
- Date.parse(value.start) > Date.parse(value.end)) {
123
+ // Comparisons with NaN are false, so unparsable bounds add nothing here.
124
+ if (start > end)
114
125
  errors.push(`${path}.start must not be after ${path}.end`);
115
- }
116
- return true;
126
+ return;
127
+ }
117
128
  default:
118
129
  errors.push(`${path}.kind ${String(value.kind)} is not supported`);
119
- return false;
120
130
  }
121
131
  }
122
132
  function validateAtom(value, path, declared, errors) {
@@ -135,13 +145,9 @@ function validateAtom(value, path, declared, errors) {
135
145
  errors.push(`${path}.args must contain at most 8 terms`);
136
146
  const allVariables = new Set();
137
147
  const args = Array.isArray(value.args) ? value.args : [];
138
- for (let index = 0; index < args.length; index += 1) {
139
- validateTerm(args[index], `${path}.args[${index}]`, declared, errors);
140
- if (isRecord(args[index]) &&
141
- args[index].kind === "var" &&
142
- typeof args[index].name === "string")
143
- allVariables.add(args[index].name);
144
- }
148
+ for (const [index, arg] of args.entries())
149
+ validateTerm(arg, `${path}.args[${index}]`, declared, errors);
150
+ addVariables(allVariables, args);
145
151
  if (value.polarity !== undefined &&
146
152
  value.polarity !== "positive" &&
147
153
  value.polarity !== "negative")
@@ -221,14 +227,7 @@ function validateExpression(value, path, declared, errors, depth) {
221
227
  validateTerm(value.left, `${path}.left`, declared, errors);
222
228
  validateTerm(value.right, `${path}.right`, declared, errors);
223
229
  const variables = new Set();
224
- if (isRecord(value.left) &&
225
- value.left.kind === "var" &&
226
- typeof value.left.name === "string")
227
- variables.add(value.left.name);
228
- if (isRecord(value.right) &&
229
- value.right.kind === "var" &&
230
- typeof value.right.name === "string")
231
- variables.add(value.right.name);
230
+ addVariables(variables, [value.left, value.right]);
232
231
  validateComparableTerms(value.left, value.right, path, errors);
233
232
  return { positiveVariables: new Set(), allVariables: variables, atoms: 0 };
234
233
  }
@@ -237,9 +236,7 @@ function validateExpression(value, path, declared, errors, depth) {
237
236
  const facts = validateAtom(value.atom, `${path}.atom`, declared, errors);
238
237
  if (!["eq", "neq", "lt", "lte", "gt", "gte"].includes(String(value.operator)))
239
238
  errors.push(`${path}.operator is invalid`);
240
- if (typeof value.value !== "number" ||
241
- !Number.isInteger(value.value) ||
242
- value.value < 0)
239
+ if (!Number.isInteger(value.value) || Number(value.value) < 0)
243
240
  errors.push(`${path}.value must be a non-negative integer`);
244
241
  return {
245
242
  positiveVariables: facts.positiveVariables,
@@ -254,11 +251,7 @@ function validateExpression(value, path, declared, errors, depth) {
254
251
  validateTerm(value.left, `${path}.left`, declared, errors);
255
252
  validateTerm(value.right, `${path}.right`, declared, errors);
256
253
  const variables = new Set();
257
- for (const term of [value.left, value.right])
258
- if (isRecord(term) &&
259
- term.kind === "var" &&
260
- typeof term.name === "string")
261
- variables.add(term.name);
254
+ addVariables(variables, [value.left, value.right]);
262
255
  validateTemporalTerms(value.relation, value.left, value.right, path, errors);
263
256
  return { positiveVariables: new Set(), allVariables: variables, atoms: 0 };
264
257
  }
@@ -301,27 +294,17 @@ function validateTemporalTerms(relation, left, right, path, errors) {
301
294
  errors.push(`${path} ${String(relation)} requires interval terms`);
302
295
  }
303
296
  }
297
+ // Validation already requires lowercase identifiers, exact const types and
298
+ // units, and unpadded variable names in terms (a padded one is never
299
+ // declared); normalization trims what validation trimmed and puts times in
300
+ // ISO form.
304
301
  function normalizeTerm(term) {
305
302
  if (term.kind === "var")
306
- return {
307
- ...term,
308
- name: term.name.trim(),
309
- type: term.type.trim().toLowerCase(),
310
- };
303
+ return { ...term, type: term.type.trim() };
311
304
  if (term.kind === "const")
312
- return {
313
- ...term,
314
- value: term.value.trim(),
315
- ...(term.type ? { type: term.type.trim().toLowerCase() } : {}),
316
- };
317
- if (term.kind === "number")
318
- return {
319
- ...term,
320
- value: term.value,
321
- ...(term.unit ? { unit: term.unit.trim().toLowerCase() } : {}),
322
- };
323
- if (term.kind === "duration")
324
- return { ...term, value: term.value, unit: term.unit };
305
+ return { ...term, value: term.value.trim() };
306
+ if (term.kind === "number" || term.kind === "duration")
307
+ return term;
325
308
  if (term.kind === "timestamp")
326
309
  return { ...term, value: new Date(term.value).toISOString() };
327
310
  return {
@@ -334,10 +317,7 @@ function normalizeExpression(expression) {
334
317
  if (expression.kind === "atom")
335
318
  return {
336
319
  ...expression,
337
- name: expression.name.trim().toLowerCase(),
338
- ...(expression.namespace
339
- ? { namespace: expression.namespace.trim().toLowerCase() }
340
- : {}),
320
+ name: expression.name.trim(),
341
321
  args: expression.args.map(normalizeTerm),
342
322
  };
343
323
  if (expression.kind === "all" || expression.kind === "any") {
@@ -351,17 +331,12 @@ function normalizeExpression(expression) {
351
331
  kind: "not",
352
332
  item: normalizeExpression(expression.item),
353
333
  };
354
- if (expression.kind === "compare")
355
- return {
356
- ...expression,
357
- left: normalizeTerm(expression.left),
358
- right: normalizeTerm(expression.right),
359
- };
360
334
  if (expression.kind === "count")
361
335
  return {
362
336
  ...expression,
363
337
  atom: normalizeExpression(expression.atom),
364
338
  };
339
+ // compare and temporal
365
340
  return {
366
341
  ...expression,
367
342
  left: normalizeTerm(expression.left),
@@ -386,20 +361,22 @@ function variableNamesInExpression(expression, names) {
386
361
  variableNamesInExpression(item, names);
387
362
  return;
388
363
  }
389
- if (expression.kind === "not") {
390
- variableNamesInExpression(expression.item, names);
391
- return;
392
- }
393
364
  if (expression.kind === "count") {
394
365
  variableNamesInExpression(expression.atom, names);
395
366
  return;
396
367
  }
397
- if (expression.kind === "compare" || expression.kind === "temporal") {
368
+ // A negated atom's variables are bound by a positive atom or count that
369
+ // sorts before it, so they are named already; a temporal expression never
370
+ // holds a variable (its terms are timestamps or intervals).
371
+ if (expression.kind === "compare") {
398
372
  variableNamesInTerm(expression.left, names);
399
373
  variableNamesInTerm(expression.right, names);
400
374
  }
401
375
  }
402
376
  function renameTerm(term, names) {
377
+ // rationale: only a variable term has a name, so names.get misses for the
378
+ // others either way; the guard narrows the type.
379
+ // Stryker disable next-line ConditionalExpression
403
380
  if (term.kind !== "var")
404
381
  return term;
405
382
  const renamed = names.get(term.name);
@@ -433,17 +410,20 @@ function renameExpression(expression, names) {
433
410
  };
434
411
  }
435
412
  function alphaNormalizeVariables(ir) {
413
+ // Exception variables are bound by the body, so they are named already;
414
+ // declared but unused variables follow in name order (normalizeIr sorted
415
+ // them).
436
416
  const names = [];
437
417
  if (ir.head)
438
418
  variableNamesInExpression(ir.head, names);
439
419
  if (ir.body)
440
420
  variableNamesInExpression(ir.body, names);
441
- for (const exception of ir.exceptions ?? [])
442
- variableNamesInExpression(exception, names);
443
- for (const variable of [...(ir.variables ?? [])].sort((left, right) => left.name.localeCompare(right.name))) {
444
- if (!names.includes(variable.name))
445
- names.push(variable.name);
446
- }
421
+ // rationale: a stand-in entry has no name, and an undefined name renames
422
+ // nothing.
423
+ // Stryker disable next-line ArrayDeclaration
424
+ for (const { name } of ir.variables ?? [])
425
+ if (!names.includes(name))
426
+ names.push(name);
447
427
  const renames = new Map(names.map((name, index) => [name, `V${index + 1}`]));
448
428
  const variables = (ir.variables ?? [])
449
429
  .map((variable) => ({
@@ -478,7 +458,7 @@ function normalizeIr(ir) {
478
458
  .map((variable) => ({
479
459
  ...variable,
480
460
  name: variable.name.trim(),
481
- type: variable.type.trim().toLowerCase(),
461
+ type: variable.type.trim(),
482
462
  quantifier: variable.quantifier ?? "forall",
483
463
  }))
484
464
  .sort((a, b) => a.name.localeCompare(b.name)),
@@ -509,7 +489,7 @@ function normalizeIr(ir) {
509
489
  ? { validFrom: new Date(ir.validFrom).toISOString() }
510
490
  : {}),
511
491
  ...(ir.validTo ? { validTo: new Date(ir.validTo).toISOString() } : {}),
512
- ...(ir.ruleSchemaId ? { ruleSchemaId: ir.ruleSchemaId.trim() } : {}),
492
+ ...(ir.ruleSchemaId ? { ruleSchemaId: ir.ruleSchemaId } : {}),
513
493
  });
514
494
  }
515
495
  function prologTerm(term) {
@@ -601,6 +581,9 @@ export function validateLogicIr(input) {
601
581
  variable.quantifier !== "forall" &&
602
582
  variable.quantifier !== "exists")
603
583
  errors.push(`variables[${index}].quantifier is invalid`);
584
+ // rationale: an undefined name is never looked up, so adding it would be
585
+ // harmless; the guard keeps the set typed.
586
+ // Stryker disable next-line ConditionalExpression
604
587
  if (name)
605
588
  declared.add(name);
606
589
  }
@@ -636,20 +619,12 @@ export function validateLogicIr(input) {
636
619
  if (kind === "constraint" &&
637
620
  (input.body === undefined || input.head !== undefined))
638
621
  errors.push("constraint kind requires body and forbids head");
639
- if (isRecord(input.head)) {
640
- const headVars = new Set();
641
- for (const term of Array.isArray(input.head.args) ? input.head.args : [])
642
- if (isRecord(term) &&
643
- term.kind === "var" &&
644
- typeof term.name === "string")
645
- headVars.add(term.name);
646
- for (const variable of headVars) {
647
- if (!facts.positiveVariables.has(variable))
648
- errors.push(`head variable ${variable} is not range-restricted by a positive body atom`);
649
- const declaration = variables.find((candidate) => isRecord(candidate) && candidate.name === variable);
650
- if (declaration?.quantifier === "exists")
651
- errors.push(`head variable ${variable} cannot be existential`);
652
- }
622
+ for (const variable of headFacts.allVariables) {
623
+ if (!facts.positiveVariables.has(variable))
624
+ errors.push(`head variable ${variable} is not range-restricted by a positive body atom`);
625
+ const declaration = variables.find((candidate) => isRecord(candidate) && candidate.name === variable);
626
+ if (declaration?.quantifier === "exists")
627
+ errors.push(`head variable ${variable} cannot be existential`);
653
628
  }
654
629
  for (const variable of facts.allVariables)
655
630
  if (!declared.has(variable))
@@ -660,7 +635,7 @@ export function validateLogicIr(input) {
660
635
  if (input.exceptions !== undefined &&
661
636
  (!Array.isArray(input.exceptions) || input.exceptions.length > 16))
662
637
  errors.push("exceptions must contain at most 16 expressions");
663
- if (input.exceptions !== undefined && Array.isArray(input.exceptions)) {
638
+ if (Array.isArray(input.exceptions)) {
664
639
  for (const [index, exception] of input.exceptions.entries()) {
665
640
  const exceptionFacts = validateExpression(exception, `exceptions[${index}]`, declared, errors, 0);
666
641
  for (const variable of exceptionFacts.allVariables)
@@ -696,9 +671,8 @@ export function validateLogicIr(input) {
696
671
  (typeof input.validTo !== "string" ||
697
672
  Number.isNaN(Date.parse(input.validTo))))
698
673
  errors.push("validTo must be an ISO timestamp");
699
- if (input.validFrom &&
700
- input.validTo &&
701
- Date.parse(String(input.validFrom)) > Date.parse(String(input.validTo)))
674
+ // Missing or unparsable bounds parse to NaN, which never compares greater.
675
+ if (Date.parse(String(input.validFrom)) > Date.parse(String(input.validTo)))
702
676
  errors.push("validFrom must not be after validTo");
703
677
  if (errors.length > 0)
704
678
  return { valid: false, errors, warnings };
@@ -723,7 +697,7 @@ export function validateLogicIr(input) {
723
697
  }
724
698
  export function utf8Span(text, start, end) {
725
699
  return {
726
- start: Buffer.byteLength(text.slice(0, Math.max(0, start)), "utf8"),
727
- end: Buffer.byteLength(text.slice(0, Math.max(start, end)), "utf8"),
700
+ start: Buffer.byteLength(text.slice(0, Math.max(0, start))),
701
+ end: Buffer.byteLength(text.slice(0, Math.max(start, end))),
728
702
  };
729
703
  }
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-actions.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/guidance-actions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,wBAAwB,EAClC,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,GAAE,SAAS,WAAW,EAAO,GAClC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CA+F9C"}
1
+ {"version":3,"file":"guidance-actions.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/guidance-actions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,wBAAwB,EAClC,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,GAAE,SAAS,WAAW,EAAO,GAClC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAgG9C"}
@@ -92,8 +92,9 @@ export function buildActions(root, activation, declared, candidates, signals, of
92
92
  kind: "plugin_offer",
93
93
  package: offer.package,
94
94
  capability: offer.capability,
95
+ mode: offer.mode,
95
96
  evidence: offer.evidence,
96
- description: `${offer.reason} (${summary(offer.evidence)}). Ask the operator whether to enable the experimental ${offer.package}; on yes, install it as a dev dependency and add it to package.json kibi.plugins with "${offer.capability}": { "mode": "augment" }; on no, add "${offer.package}" to kibi.declinedPlugins so bootstrap stops offering it.`,
97
+ description: `${offer.reason} (${summary(offer.evidence)}). Ask the operator whether to enable the experimental ${offer.package}; on yes, install it as a dev dependency and add it to package.json kibi.plugins with "${offer.capability}": { "mode": "${offer.mode}" }; on no, add "${offer.package}" to kibi.declinedPlugins so bootstrap stops offering it.`,
97
98
  });
98
99
  result.push({
99
100
  order,
@@ -3,14 +3,23 @@ import type { OperationContext } from "../../public/operations/runtime-types.js"
3
3
  export type PluginOffer = {
4
4
  readonly package: string;
5
5
  readonly capability: string;
6
+ /** The mode to activate the capability in. */
7
+ readonly mode: "augment" | "replace";
6
8
  readonly reason: string;
7
9
  readonly fileCount: number;
8
10
  readonly evidence: readonly string[];
9
11
  };
12
+ /**
13
+ * Below this many requirements a reader can scan the list, and a question
14
+ * worded unlike the KB rarely misses; above it hints start to pay.
15
+ */
16
+ export declare const SEARCH_HINTS_OFFER_REQUIREMENTS = 50;
10
17
  /**
11
18
  * Optional plugins worth offering for this workspace. kibi-plugin-ui is
12
- * offered when production React or Angular component files exist and the
13
- * project has neither activated nor declined it.
19
+ * offered when production React or Angular component files exist, and
20
+ * kibi-plugin-search-hints once the KB holds enough requirements that a
21
+ * question worded differently from them is likely to miss; neither is
22
+ * offered once the project activated or declined it.
14
23
  */
15
24
  export declare function pluginOffers(context: OperationContext, files: readonly string[]): Promise<readonly PluginOffer[]>;
16
25
  //# sourceMappingURL=plugin-offers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-offers.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/plugin-offers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,oFAAoF;AAEpF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAgDF;;;;GAIG;AAEH,wBAAsB,YAAY,CAChC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAgBjC"}
1
+ {"version":3,"file":"plugin-offers.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/plugin-offers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAGjF,oFAAoF;AAEpF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAUF;;;GAGG;AAEH,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAyDlD;;;;;;GAMG;AAEH,wBAAsB,YAAY,CAChC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CA6BjC"}
@@ -1,9 +1,18 @@
1
1
  import path from "node:path";
2
+ import { KB_PATHS } from "../../utils/kb-paths.js";
2
3
  const UI_PLUGIN = "kibi-plugin-ui";
3
4
  const UI_CAPABILITY = "kibi.check-policy.v1";
4
5
  const UI_SOURCE = /(?:\.(?:tsx|jsx)|\.component\.ts)$/i;
5
6
  const NOT_PRODUCTION = /(?:^|\/)(?:node_modules|dist|build|coverage|tests?|__tests__|e2e)\/|\.(?:test|spec|stories)\.[^/]+$/i;
6
7
  const EVIDENCE_LIMIT = 5;
8
+ const HINTS_PLUGIN = "kibi-plugin-search-hints";
9
+ const HINTS_CAPABILITY = "kibi.search-hints.v1";
10
+ /**
11
+ * Below this many requirements a reader can scan the list, and a question
12
+ * worded unlike the KB rarely misses; above it hints start to pay.
13
+ */
14
+ // implements REQ-kibi-plugin-search-hints
15
+ export const SEARCH_HINTS_OFFER_REQUIREMENTS = 50;
7
16
  /** Plugin names the project activated or declined, from its package.json. */
8
17
  async function configuredPlugins(context) {
9
18
  let manifest;
@@ -41,26 +50,56 @@ async function configuredPlugins(context) {
41
50
  names.add(name);
42
51
  return names;
43
52
  }
53
+ /** Requirement documents already in the KB lane. */
54
+ async function requirementFiles(context) {
55
+ if (!context.fs?.glob)
56
+ return [];
57
+ try {
58
+ return [
59
+ ...(await context.fs.glob([`${KB_PATHS.lanes.requirements}/**/*.md`], {
60
+ cwd: context.workspaceRoot,
61
+ })),
62
+ ].sort();
63
+ }
64
+ catch {
65
+ return [];
66
+ }
67
+ }
44
68
  /**
45
69
  * Optional plugins worth offering for this workspace. kibi-plugin-ui is
46
- * offered when production React or Angular component files exist and the
47
- * project has neither activated nor declined it.
70
+ * offered when production React or Angular component files exist, and
71
+ * kibi-plugin-search-hints once the KB holds enough requirements that a
72
+ * question worded differently from them is likely to miss; neither is
73
+ * offered once the project activated or declined it.
48
74
  */
49
- // implements REQ-bootstrap-ui-plugin-offer
75
+ // implements REQ-bootstrap-ui-plugin-offer, REQ-kibi-plugin-search-hints
50
76
  export async function pluginOffers(context, files) {
51
77
  const uiFiles = files.filter((file) => UI_SOURCE.test(file) && !NOT_PRODUCTION.test(file));
52
- if (uiFiles.length === 0)
78
+ const requirements = await requirementFiles(context);
79
+ const wantsHints = requirements.length >= SEARCH_HINTS_OFFER_REQUIREMENTS;
80
+ if (uiFiles.length === 0 && !wantsHints)
53
81
  return [];
54
82
  const configured = await configuredPlugins(context);
55
- if (configured === undefined || configured.has(UI_PLUGIN))
83
+ if (configured === undefined)
56
84
  return [];
57
- return [
58
- {
85
+ const offers = [];
86
+ if (uiFiles.length > 0 && !configured.has(UI_PLUGIN))
87
+ offers.push({
59
88
  package: UI_PLUGIN,
60
89
  capability: UI_CAPABILITY,
90
+ mode: "augment",
61
91
  reason: `${uiFiles.length} UI component file(s) found`,
62
92
  fileCount: uiFiles.length,
63
93
  evidence: uiFiles.slice(0, EVIDENCE_LIMIT),
64
- },
65
- ];
94
+ });
95
+ if (wantsHints && !configured.has(HINTS_PLUGIN))
96
+ offers.push({
97
+ package: HINTS_PLUGIN,
98
+ capability: HINTS_CAPABILITY,
99
+ mode: "replace",
100
+ reason: `${requirements.length} requirements in the KB; kb_search can suggest which ones a weakly answered question means`,
101
+ fileCount: requirements.length,
102
+ evidence: requirements.slice(0, EVIDENCE_LIMIT),
103
+ });
104
+ return offers;
66
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"claim-bindings.d.ts","sourceRoot":"","sources":["../../../src/operations/proof/claim-bindings.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,wBAAwB,CAAC;AAgDhC;;;GAGG;AAEH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,WAAW,EAAE,MAAM,GAClB,MAAM,CAWR;AAgED;;;;;;GAMG;AAEH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,CAgBR;AAED,uEAAuE;AACvE,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,EAAE,CAaV;AA0JD;;;;;;GAMG;AAEH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,QAAQ,GAAG,QAAQ,EAC1B,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAC5C,QAAQ,GAAG,QAAQ,C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CAQrB;AAED;;;;;;GAMG;AAEH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,QAAQ,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC,GACD,OAAO,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,CA+FrC"}
@@ -225,6 +225,7 @@ const NON_NUMERIC_OBLIGATIONS = new Set([
225
225
  "set_relation",
226
226
  "nullable_fields",
227
227
  "route_middleware",
228
+ "sequence_precedes",
228
229
  ]);
229
230
  async function derivedProblem(context, contract, certificate, row, coveredBy) {
230
231
  const obligation = record(row.obligation) ?? {};
@@ -45,6 +45,8 @@ export declare function compiledToSourcePath(workspaceRoot: string, relativePath
45
45
  export declare function evaluateDomain(workspaceRoot: string, sourceFile: string, exportName: string, options?: Readonly<{
46
46
  /** The TypeScript runners to try, in order (default all three). */
47
47
  runners?: readonly ("bun" | "tsx" | "node")[];
48
+ /** Read this field of each member instead of the member itself. */
49
+ field?: string;
48
50
  }>): {
49
51
  ok: true;
50
52
  count: number;
@@ -1 +1 @@
1
- {"version":3,"file":"code-certificates.d.ts","sourceRoot":"","sources":["../../../src/operations/proof/code-certificates.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAKjF,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAC;AAkBxC;;;GAGG;AAEH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChD,kBA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