kibi-cli 2.7.0 → 2.10.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 (55) hide show
  1. package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
  2. package/dist/operations/bootstrap/intent-claims.js +24 -4
  3. package/dist/operations/bootstrap/markdown-candidates.d.ts +6 -0
  4. package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
  5. package/dist/operations/bootstrap/markdown-candidates.js +54 -2
  6. package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
  7. package/dist/operations/bootstrap/presentation.js +6 -0
  8. package/dist/operations/bootstrap/requirement-claims.d.ts +18 -1
  9. package/dist/operations/bootstrap/requirement-claims.d.ts.map +1 -1
  10. package/dist/operations/bootstrap/requirement-claims.js +58 -0
  11. package/dist/operations/bootstrap/types.d.ts +6 -0
  12. package/dist/operations/bootstrap/types.d.ts.map +1 -1
  13. package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
  14. package/dist/operations/modeling/predicate-applyplan.js +1 -1
  15. package/dist/operations/modeling/predicate-types.d.ts +16 -1
  16. package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
  17. package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
  18. package/dist/operations/modeling/suggest-predicates.js +140 -14
  19. package/dist/operations/mutation/validation.d.ts.map +1 -1
  20. package/dist/operations/mutation/validation.js +30 -0
  21. package/dist/operations/mutation/workspace-mutation-lock.d.ts +22 -0
  22. package/dist/operations/mutation/workspace-mutation-lock.d.ts.map +1 -1
  23. package/dist/operations/mutation/workspace-mutation-lock.js +67 -1
  24. package/dist/operations/planning/apply-plan.d.ts +8 -0
  25. package/dist/operations/planning/apply-plan.d.ts.map +1 -1
  26. package/dist/operations/planning/apply-plan.js +217 -26
  27. package/dist/public/operations/catalog.d.ts +22 -2
  28. package/dist/public/operations/catalog.d.ts.map +1 -1
  29. package/dist/public/operations/contracts.d.ts.map +1 -1
  30. package/dist/public/operations/contracts.js +36 -22
  31. package/dist/public/operations/runtime-types.d.ts +12 -0
  32. package/dist/public/operations/runtime-types.d.ts.map +1 -1
  33. package/dist/public/operations/specs/bootstrap.d.ts +15 -0
  34. package/dist/public/operations/specs/bootstrap.d.ts.map +1 -1
  35. package/dist/public/operations/specs/bootstrap.js +15 -0
  36. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  37. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  38. package/dist/public/operations/specs/check-rules.generated.js +2 -1
  39. package/dist/public/operations/specs/check.d.ts +1 -1
  40. package/dist/public/operations/specs/planning.d.ts +7 -2
  41. package/dist/public/operations/specs/planning.d.ts.map +1 -1
  42. package/dist/public/operations/specs/planning.js +7 -2
  43. package/dist/public/skills/kibi-bootstrap/SKILL.md +6 -6
  44. package/dist/public/skills/kibi-usage/SKILL.md +14 -5
  45. package/dist/utils/rule-registry.generated.d.ts +5 -0
  46. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  47. package/dist/utils/rule-registry.generated.js +6 -0
  48. package/package.json +2 -2
  49. package/src/public/operations/contracts.ts +38 -22
  50. package/src/public/operations/runtime-types.ts +14 -0
  51. package/src/public/operations/specs/bootstrap.ts +18 -0
  52. package/src/public/operations/specs/check-rules.generated.ts +2 -1
  53. package/src/public/operations/specs/planning.ts +11 -2
  54. package/src/public/skills/kibi-bootstrap/SKILL.md +6 -6
  55. package/src/public/skills/kibi-usage/SKILL.md +14 -5
@@ -675,15 +675,12 @@ async function executeSourceRecovery(args, context, onCommitted = () => undefine
675
675
  },
676
676
  };
677
677
  }
678
- async function executeBootstrapPlan(args, context, recovery = false, remainingActions, priorResults = [], onCommitted = () => undefined) {
679
- const actions = recovery
680
- ? [...(remainingActions ?? args.plan.actions)]
681
- : validateBootstrapPlanShape(args);
682
- preflightBootstrapActions(actions, context);
683
- const prolog = context.prolog ?? (await context.ensureProlog?.());
684
- if (!prolog)
685
- throw new Error("Bootstrap apply requires a Prolog runtime");
686
- const operationContext = { ...context, prolog, sourceFirst: true };
678
+ /**
679
+ * The bootstrap plan's live-state checks: branch, KB snapshot, workspace
680
+ * snapshot and declared source hashes must still match the plan.
681
+ */
682
+ // implements REQ-bootstrap-apply-long-running
683
+ async function assertBootstrapPlanCurrent(args, operationContext) {
687
684
  const statusResult = await executeStatus({}, operationContext);
688
685
  const status = statusResult.structuredContent;
689
686
  if (!status)
@@ -698,18 +695,70 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
698
695
  sourceHashes: args.plan.expected.sourceHashes,
699
696
  })
700
697
  : status.snapshotId;
701
- if (!recovery) {
702
- if (args.plan.expected.branch !== "unknown" &&
703
- status.branch !== args.plan.expected.branch)
704
- throw new Error("Bootstrap apply failed: branch changed since planning");
705
- if (boundLiveKbSnapshot !== args.plan.expected.kbSnapshotId)
706
- throw new Error("Bootstrap apply failed: KB snapshot changed since planning");
707
- if (args.plan.expected.workspaceSnapshot !== "unknown" &&
708
- (!workspace.available ||
709
- workspace.snapshot.hash !== args.plan.expected.workspaceSnapshot))
710
- throw new Error("Bootstrap apply failed: workspace snapshot changed since planning");
711
- await validateSources(operationContext, args.plan.expected.sourceHashes);
698
+ if (args.plan.expected.branch !== "unknown" &&
699
+ status.branch !== args.plan.expected.branch)
700
+ throw new Error("Bootstrap apply failed: branch changed since planning");
701
+ if (boundLiveKbSnapshot !== args.plan.expected.kbSnapshotId)
702
+ throw new Error("Bootstrap apply failed: KB snapshot changed since planning");
703
+ if (args.plan.expected.workspaceSnapshot !== "unknown" &&
704
+ (!workspace.available ||
705
+ workspace.snapshot.hash !== args.plan.expected.workspaceSnapshot))
706
+ throw new Error("Bootstrap apply failed: workspace snapshot changed since planning");
707
+ await validateSources(operationContext, args.plan.expected.sourceHashes);
708
+ return status;
709
+ }
710
+ /**
711
+ * Checks a plan-bearing kb_apply_plan call can start: the approved hash, the
712
+ * plan shape and canonical hash, and for a bootstrap plan its live snapshots.
713
+ * Writes nothing. An MCP async apply runs it before returning the job
714
+ * receipt, so input and stale-plan errors fail the call instead of the job.
715
+ * The apply itself repeats every check under the workspace lock.
716
+ */
717
+ // implements REQ-mcp-apply-plan-async-preflight
718
+ export async function preflightApplyPlan(args, context) {
719
+ if (!("plan" in args))
720
+ return;
721
+ if (!isRecord(args.plan))
722
+ throw new Error("Apply plan failed: plan must be an object");
723
+ if (typeof args.approvedPlanHash !== "string" ||
724
+ !/^[a-f0-9]{64}$/i.test(args.approvedPlanHash))
725
+ throw new Error("Apply plan failed: approvedPlanHash must be the SHA-256 planHash returned with the plan");
726
+ if (isBootstrapApplyArgs(args)) {
727
+ preflightBootstrapActions(validateBootstrapPlanShape(args), context);
728
+ const prolog = context.prolog ?? (await context.ensureProlog?.());
729
+ if (!prolog)
730
+ throw new Error("Bootstrap apply requires a Prolog runtime");
731
+ await assertBootstrapPlanCurrent(args, {
732
+ ...context,
733
+ prolog,
734
+ sourceFirst: true,
735
+ });
736
+ return;
737
+ }
738
+ if (isMigrationApplyArgs(args)) {
739
+ validateMigrationPlanShape(args);
740
+ return;
741
+ }
742
+ if (isEntityDeletionApplyArgs(args)) {
743
+ validateEntityDeletionPlan(args);
744
+ return;
712
745
  }
746
+ validateCompilePlanShape(args);
747
+ }
748
+ async function executeBootstrapPlan(args, context, recovery = false, remainingActions, priorResults = [], onCommitted = () => undefined, carry = {}) {
749
+ const actions = recovery
750
+ ? [...(remainingActions ?? args.plan.actions)]
751
+ : validateBootstrapPlanShape(args);
752
+ preflightBootstrapActions(actions, context);
753
+ const prolog = context.prolog ?? (await context.ensureProlog?.());
754
+ if (!prolog)
755
+ throw new Error("Bootstrap apply requires a Prolog runtime");
756
+ const operationContext = { ...context, prolog, sourceFirst: true };
757
+ const status = recovery
758
+ ? (await executeStatus({}, operationContext)).structuredContent
759
+ : await assertBootstrapPlanCurrent(args, operationContext);
760
+ if (!status)
761
+ throw new Error("Bootstrap apply failed: status returned no payload");
713
762
  const journalId = `bootstrap-${args.plan.planHash.slice(0, 16)}`;
714
763
  const journalPath = path.join(context.workspaceRoot, ".kb", "recovery", `${journalId}.json`);
715
764
  if (!recovery && context.fs) {
@@ -754,9 +803,37 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
754
803
  if (!context.fs)
755
804
  return;
756
805
  await context.fs.mkdir(path.dirname(journalPath));
757
- await context.fs.writeFile(journalPath, `${JSON.stringify({ version: 2, kind: "bootstrap", plan: args.plan, state, checkpoint: currentCheckpoint, ...(activeActionId ? { activeActionId } : {}), results }, null, 2)}\n`);
806
+ await context.fs.writeFile(journalPath, `${JSON.stringify({
807
+ version: 2,
808
+ kind: "bootstrap",
809
+ plan: args.plan,
810
+ state,
811
+ checkpoint: currentCheckpoint,
812
+ ...(activeActionId ? { activeActionId } : {}),
813
+ results,
814
+ ...(carry.lockReclaims?.length
815
+ ? { lockReclaims: carry.lockReclaims }
816
+ : {}),
817
+ ...(carry.interruptedActions?.length
818
+ ? { interruptedActions: carry.interruptedActions }
819
+ : {}),
820
+ }, null, 2)}\n`);
758
821
  };
759
822
  await writeJournal("applying", undefined, initialCheckpoint);
823
+ const totalActions = priorResults.length + actions.length;
824
+ const reportProgress = (message) => {
825
+ try {
826
+ context.onProgress?.({
827
+ progress: results.filter((row) => row.outcome === "applied").length,
828
+ total: totalActions,
829
+ message,
830
+ });
831
+ }
832
+ catch {
833
+ // Progress is advisory: a failing listener never stops the apply.
834
+ }
835
+ };
836
+ reportProgress(`Bootstrap plan ${args.plan.planHash.slice(0, 12)}: applying ${actions.length} of ${totalActions} action(s).`);
760
837
  try {
761
838
  for (const action of actions) {
762
839
  try {
@@ -823,6 +900,7 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
823
900
  stepsApplied: results.filter((row) => row.outcome === "applied").length,
824
901
  sourceHashesChecked: Object.keys(args.plan.expected.sourceHashes).length,
825
902
  notes: [
903
+ ...(carry.notes ?? []),
826
904
  "Bootstrap stopped after an authoritative action committed with derived repair effects.",
827
905
  ],
828
906
  },
@@ -849,6 +927,7 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
849
927
  lastCheckpoint = await checkpoint();
850
928
  activeActionId = undefined;
851
929
  await writeJournal("applying", undefined, lastCheckpoint);
930
+ reportProgress(`Applied ${action.id}.`);
852
931
  }
853
932
  catch (error) {
854
933
  const detail = error instanceof Error ? error.message : String(error);
@@ -886,6 +965,7 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
886
965
  sourceHashesChecked: Object.keys(args.plan.expected.sourceHashes)
887
966
  .length,
888
967
  notes: [
968
+ ...(carry.notes ?? []),
889
969
  deterministic
890
970
  ? "Bootstrap stopped at a deterministic action failure; the journal is terminal. Re-plan from the current state."
891
971
  : "Bootstrap application stopped at a repairable action failure.",
@@ -944,6 +1024,7 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
944
1024
  sourceHashesChecked: Object.keys(args.plan.expected.sourceHashes)
945
1025
  .length,
946
1026
  notes: [
1027
+ ...(carry.notes ?? []),
947
1028
  "Bootstrap application stopped before its full action graph completed.",
948
1029
  ],
949
1030
  },
@@ -992,6 +1073,7 @@ async function executeBootstrapPlan(args, context, recovery = false, remainingAc
992
1073
  sourceHashesChecked: Object.keys(args.plan.expected.sourceHashes)
993
1074
  .length,
994
1075
  notes: [
1076
+ ...(carry.notes ?? []),
995
1077
  "Bootstrap actions applied sequentially through the shared plan executor.",
996
1078
  ],
997
1079
  },
@@ -1016,6 +1098,23 @@ async function executeApplyPlanUnlocked(args, context, onCommitted = () => undef
1016
1098
  }
1017
1099
  return withRecoveryReport(result, recovered);
1018
1100
  }
1101
+ /**
1102
+ * The action a bootstrap process was executing when it died: the journal is
1103
+ * still `applying`, names that action as active, and holds no result for it.
1104
+ * Only then may recovery attribute drift since the last checkpoint to the
1105
+ * action and re-apply it; every other drift stays a refusal.
1106
+ */
1107
+ // implements REQ-bootstrap-apply-long-running
1108
+ function interruptedBootstrapAction(journal, actionIds) {
1109
+ const active = journal.activeActionId;
1110
+ if (journal.state !== "applying" || typeof active !== "string")
1111
+ return undefined;
1112
+ if (!actionIds.has(active))
1113
+ return undefined;
1114
+ if ((journal.results ?? []).some((row) => row.actionId === active))
1115
+ return undefined;
1116
+ return active;
1117
+ }
1019
1118
  // implements REQ-kibi-change-to-proof-plan-compiler-v2, REQ-agent-guided-migration-orchestration
1020
1119
  async function dispatchApplyPlan(args, context, onCommitted, recovered) {
1021
1120
  if ("recoveryJournalId" in args) {
@@ -1065,12 +1164,43 @@ async function dispatchApplyPlan(args, context, onCommitted, recovered) {
1065
1164
  ? recoveryWorkspace.snapshot.hash
1066
1165
  : "unavailable",
1067
1166
  };
1068
- if (liveCheckpoint.branch !== journal.checkpoint.branch ||
1167
+ const actionIds = new Set(ordered.map((action) => action.id));
1168
+ const drifted = liveCheckpoint.branch !== journal.checkpoint.branch ||
1069
1169
  liveCheckpoint.kbSnapshotId !== journal.checkpoint.kbSnapshotId ||
1070
1170
  liveCheckpoint.workspaceSnapshot !==
1071
- journal.checkpoint.workspaceSnapshot)
1171
+ journal.checkpoint.workspaceSnapshot;
1172
+ const interruptedActionId = drifted
1173
+ ? interruptedBootstrapAction(journal, actionIds)
1174
+ : undefined;
1175
+ if (drifted &&
1176
+ (interruptedActionId === undefined ||
1177
+ liveCheckpoint.branch !== journal.checkpoint.branch))
1072
1178
  throw new Error("Bootstrap recovery refused: repository state changed since the last action checkpoint");
1073
- const actionIds = new Set(ordered.map((action) => action.id));
1179
+ const recordsOf = (value) => Array.isArray(value)
1180
+ ? value.filter((row) => row !== null && typeof row === "object" && !Array.isArray(row))
1181
+ : [];
1182
+ const interruptedActions = [
1183
+ ...recordsOf(journal.interruptedActions),
1184
+ ...(interruptedActionId === undefined
1185
+ ? []
1186
+ : [
1187
+ {
1188
+ actionId: interruptedActionId,
1189
+ recoveredAt: context.clock().toISOString(),
1190
+ checkpoint: journal.checkpoint,
1191
+ liveCheckpoint,
1192
+ },
1193
+ ]),
1194
+ ];
1195
+ const carry = {
1196
+ lockReclaims: recordsOf(journal.lockReclaims),
1197
+ interruptedActions,
1198
+ notes: interruptedActionId === undefined
1199
+ ? []
1200
+ : [
1201
+ `Action ${interruptedActionId} was interrupted before its checkpoint; the state drift since the last checkpoint is attributed to it and the action was re-applied idempotently.`,
1202
+ ],
1203
+ };
1074
1204
  const applied = new Set();
1075
1205
  for (const row of journal.results ?? []) {
1076
1206
  if (typeof row.actionId !== "string" || !actionIds.has(row.actionId))
@@ -1095,7 +1225,7 @@ async function dispatchApplyPlan(args, context, onCommitted, recovered) {
1095
1225
  },
1096
1226
  ]
1097
1227
  : []
1098
- : []), onCommitted);
1228
+ : []), onCommitted, carry);
1099
1229
  }
1100
1230
  return executeSourceRecovery(args, context, onCommitted);
1101
1231
  }
@@ -1874,13 +2004,74 @@ function withRecoveryReport(result, recovered) {
1874
2004
  }
1875
2005
  return { content, structuredContent: result.structuredContent };
1876
2006
  }
2007
+ /**
2008
+ * The journal path of the bootstrap recovery this call requests, when that
2009
+ * journal is still `applying` (its process died mid-plan). Only such a
2010
+ * recovery may reclaim a lock whose holder process is dead.
2011
+ */
2012
+ // implements REQ-bootstrap-apply-long-running
2013
+ async function applyingBootstrapJournal(args, context) {
2014
+ if (!context.fs || !("recoveryJournalId" in args))
2015
+ return undefined;
2016
+ if (!/^bootstrap-[a-f0-9]{16}$/.test(args.recoveryJournalId))
2017
+ return undefined;
2018
+ const journalPath = path.join(context.workspaceRoot, ".kb", "recovery", `${args.recoveryJournalId}.json`);
2019
+ try {
2020
+ const journal = JSON.parse(await context.fs.readFile(journalPath));
2021
+ return journal.kind === "bootstrap" && journal.state === "applying"
2022
+ ? journalPath
2023
+ : undefined;
2024
+ }
2025
+ catch {
2026
+ return undefined;
2027
+ }
2028
+ }
2029
+ /** Record reclaimed dead lock holders in the bootstrap journal. */
2030
+ // implements REQ-bootstrap-apply-long-running
2031
+ async function recordBootstrapLockReclaims(context, journalPath, reclaimed) {
2032
+ if (!context.fs)
2033
+ return;
2034
+ const journal = JSON.parse(await context.fs.readFile(journalPath));
2035
+ const earlier = Array.isArray(journal.lockReclaims)
2036
+ ? journal.lockReclaims
2037
+ : [];
2038
+ await context.fs.writeFile(journalPath, `${JSON.stringify({
2039
+ ...journal,
2040
+ lockReclaims: [
2041
+ ...earlier,
2042
+ ...reclaimed.map((row) => ({
2043
+ holderPid: row.pid,
2044
+ holderAcquiredAt: new Date(row.acquiredAt).toISOString(),
2045
+ reclaimedAt: new Date(row.reclaimedAt).toISOString(),
2046
+ reclaimedByPid: row.reclaimedByPid,
2047
+ })),
2048
+ ],
2049
+ }, null, 2)}\n`);
2050
+ }
1877
2051
  // implements REQ-agent-guided-migration-orchestration, REQ-cli-canonical-runtime, REQ-KIBI-BOOTSTRAP-PLAN, REQ-kibi-change-to-proof-plan-compiler-v2, REQ-kibi-predicate-vocabulary-migration
1878
2052
  export async function executeApplyPlan(args, context) {
1879
2053
  if (isBootstrapApplyArgs(args))
1880
2054
  preflightBootstrapActions(validateBootstrapPlanShape(args), context);
1881
2055
  if (!context.fs || context.sourceMutationLockHeld === true)
1882
2056
  return executeApplyPlanUnlocked(args, context);
1883
- const lock = await acquireWorkspaceMutationLock(context.workspaceRoot);
2057
+ const applyingJournal = await applyingBootstrapJournal(args, context);
2058
+ const lock = await acquireWorkspaceMutationLock(context.workspaceRoot, applyingJournal === undefined
2059
+ ? {}
2060
+ : {
2061
+ // The interrupted bootstrap this call recovers left its lock
2062
+ // behind; a dead holder's lock is reclaimed and recorded instead
2063
+ // of demanding operator recovery. A live holder still blocks.
2064
+ reclaimDeadHolder: () => true,
2065
+ });
2066
+ if (applyingJournal !== undefined && lock.reclaimed !== undefined) {
2067
+ try {
2068
+ await recordBootstrapLockReclaims(context, applyingJournal, lock.reclaimed);
2069
+ }
2070
+ catch (error) {
2071
+ releaseWorkspaceMutationLock(lock, { error });
2072
+ throw error;
2073
+ }
2074
+ }
1884
2075
  let operationFailure;
1885
2076
  let committed = false;
1886
2077
  try {
@@ -792,6 +792,11 @@ export declare const OPERATION_CATALOG: readonly [{
792
792
  readonly notes: {
793
793
  readonly type: "string";
794
794
  };
795
+ readonly component: {
796
+ readonly type: "string";
797
+ readonly minLength: 1;
798
+ readonly description: "Optional component this source's claims are about (for example recorder). It becomes the first segment of each generated subject_key (component.aspect); a claim's own component overrides it.";
799
+ };
795
800
  };
796
801
  };
797
802
  };
@@ -834,6 +839,16 @@ export declare const OPERATION_CATALOG: readonly [{
834
839
  readonly minLength: 1;
835
840
  readonly description: "Verbatim passage from the source the claim came from. Required for intent and observation claims (optional for open_question): Kibi persists it with the knowledge source title and reference in the created entity's '## Source' section, because the ticket or page may be gone by the next migration.";
836
841
  };
842
+ readonly component: {
843
+ readonly type: "string";
844
+ readonly minLength: 1;
845
+ readonly description: "Optional component the claim is about (for example recorder). Generated subject keys take the shape component.aspect with the aspect from the claim's subject. Without a component on the claim or its knowledge source, a claim whose subject is not a single word or already dotted becomes an authoring follow-up with a diagnostic instead of a malformed subject key.";
846
+ };
847
+ readonly rationale: {
848
+ readonly type: "string";
849
+ readonly minLength: 1;
850
+ readonly description: "Optional reason the requirement exists, as the source states it or the human answered when asked. It becomes the requirement's rationale and its body's '## Context' section. Never invent one.";
851
+ };
837
852
  readonly kind: {
838
853
  readonly type: "string";
839
854
  readonly enum: readonly ["intent", "observation", "open_question"];
@@ -1717,7 +1732,7 @@ export declare const OPERATION_CATALOG: readonly [{
1717
1732
  readonly type: "string";
1718
1733
  readonly enum: readonly string[];
1719
1734
  };
1720
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
1735
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
1721
1736
  };
1722
1737
  readonly sourceFiles: {
1723
1738
  readonly type: "array";
@@ -2103,7 +2118,12 @@ export declare const OPERATION_CATALOG: readonly [{
2103
2118
  readonly recoveryJournalId: {
2104
2119
  readonly type: "string";
2105
2120
  readonly pattern: "^[A-Za-z0-9._-]+$";
2106
- readonly description: "Typed recovery journal identifier returned by a committed_with_repairs result or a PLAN_APPLY_RECOVERY_REQUIRED error. Recovery replays only the immutable journal and never the original plan request; a compile-plan journal (plan-apply-*) is completed or rolled back deterministically and reports which.";
2121
+ readonly description: "Typed recovery journal identifier returned by a committed_with_repairs result or a PLAN_APPLY_RECOVERY_REQUIRED error. Recovery replays only the immutable journal and never the original plan request; a compile-plan journal (plan-apply-*) is completed or rolled back deterministically and reports which. A bootstrap journal left `applying` by a process that died mid-action is resumed without edits: the interrupted action is re-applied and a source lock held by the dead process is reclaimed and recorded in the journal.";
2122
+ };
2123
+ readonly async: {
2124
+ readonly type: "boolean";
2125
+ readonly default: false;
2126
+ readonly description: "MCP only. When true, start the apply as a background job and return a kibi.job.v1 receipt immediately instead of holding the request open; poll kb_job_status with the returned jobId for the final result. Use for large bootstrap plans (hundreds of actions) that can outlast a client's request timeout. The MCP server registers kb_job_status only when KIBI_MCP_OPTIONAL_TOOLS includes it; otherwise async applies synchronously. A synchronous apply sends notifications/progress after each bootstrap action when the request carries a progressToken. The CLI ignores this field.";
2107
2127
  };
2108
2128
  };
2109
2129
  };
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/public/operations/catalog.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAa,EACxB,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,SAAS,0BAA0B,EAAE,CAoBvC"}
@@ -306,8 +306,8 @@ const impactReviewAuthorship = objectData({
306
306
  "recordTemplate",
307
307
  ]);
308
308
  /**
309
- * kibi.job.v1 receipt returned by async-mode operations (kb_check with
310
- * `async: true`) instead of the synchronous payload. Agents poll
309
+ * kibi.job.v1 receipt returned by async-mode operations (kb_check and
310
+ * kb_apply_plan with `async: true`) instead of the synchronous payload. Agents poll
311
311
  * kb_job_status with the jobId. Declared as a union member of the operation
312
312
  * data contract so hosts validating tool output against the declared schema
313
313
  * accept the receipt without weakening the synchronous payload contract.
@@ -460,11 +460,19 @@ const BASE_DATA_SCHEMAS = {
460
460
  "provide_argument_bindings",
461
461
  "resolve_schema_reference",
462
462
  "record_ontology_gap",
463
+ "review_nonlogical",
464
+ "replace_grounding",
463
465
  ],
464
466
  },
465
467
  recommendedPredicateSchema: { type: ["object", "null"] },
466
468
  applyPlan: recordArray,
467
469
  relationshipPlan: { type: ["object", "null"] },
470
+ relationshipTarget: {
471
+ type: ["string", "null"],
472
+ description: "The planned predicate fact id (FACT-PRED-...) that a requires_predicate link must target. Candidate ids (SUGGEST-...) are never relationship targets.",
473
+ },
474
+ existingGrounding: recordArray,
475
+ replacementPlan: { type: ["object", "null"] },
468
476
  warnings: stringArray,
469
477
  }),
470
478
  kb_plan_bootstrap: objectData({
@@ -599,26 +607,32 @@ const BASE_DATA_SCHEMAS = {
599
607
  diagnostics: stringArray,
600
608
  capabilityPlugins: recordValue,
601
609
  }),
602
- kb_apply_plan: objectData({
603
- version: stringValue,
604
- outcome: stringValue,
605
- planHash: stringValue,
606
- changedEntities: integerValue,
607
- changedRelationships: integerValue,
608
- changedPaths: stringArray,
609
- finalSnapshots: recordValue,
610
- validationSummary: recordValue,
611
- recoveryJournalId: { type: ["string", "null"] },
612
- deleted: integerValue,
613
- sourcePaths: stringArray,
614
- actionResults: recordArray,
615
- notes: stringArray,
616
- remainingPlan: recordValue,
617
- closeout: recordValue,
618
- status: stringValue,
619
- effectFailures: recordArray,
620
- nextActions: recordArray,
621
- }),
610
+ kb_apply_plan: {
611
+ description: "Synchronous apply result, or a kibi.job.v1 receipt when async:true detached the apply into a background job (poll kb_job_status with the jobId).",
612
+ anyOf: [
613
+ objectData({
614
+ version: stringValue,
615
+ outcome: stringValue,
616
+ planHash: stringValue,
617
+ changedEntities: integerValue,
618
+ changedRelationships: integerValue,
619
+ changedPaths: stringArray,
620
+ finalSnapshots: recordValue,
621
+ validationSummary: recordValue,
622
+ recoveryJournalId: { type: ["string", "null"] },
623
+ deleted: integerValue,
624
+ sourcePaths: stringArray,
625
+ actionResults: recordArray,
626
+ notes: stringArray,
627
+ remainingPlan: recordValue,
628
+ closeout: recordValue,
629
+ status: stringValue,
630
+ effectFailures: recordArray,
631
+ nextActions: recordArray,
632
+ }),
633
+ jobReceiptData,
634
+ ],
635
+ },
622
636
  kb_ingest_proof: objectData({
623
637
  artifactDigest: stringValue,
624
638
  environmentHash: stringValue,
@@ -165,6 +165,14 @@ export interface NetworkPort {
165
165
  fetch(input: string | URL, init?: RequestInit): Promise<Response>;
166
166
  }
167
167
  export type Clock = () => Date;
168
+ /** One progress report from a long-running operation (for example one applied plan action). */
169
+ export type OperationProgress = Readonly<{
170
+ progress: number;
171
+ total?: number;
172
+ message?: string;
173
+ }>;
174
+ /** Host callback for progress reports; MCP forwards them as notifications/progress. */
175
+ export type ProgressReporter = (progress: OperationProgress) => void;
168
176
  export type RuntimeOptions = {
169
177
  readonly workspaceRoot?: string;
170
178
  readonly signal?: AbortSignal;
@@ -175,6 +183,8 @@ export type RuntimeOptions = {
175
183
  readonly net?: NetworkPort;
176
184
  /** Optional injectable capability registry (or lazy factory). */
177
185
  readonly plugins?: OperationPlugins;
186
+ /** Optional progress sink for long-running operations. */
187
+ readonly onProgress?: ProgressReporter;
178
188
  };
179
189
  export type OperationContext = {
180
190
  readonly workspaceRoot: string;
@@ -198,6 +208,8 @@ export type OperationContext = {
198
208
  readonly plugins?: OperationPlugins;
199
209
  /** Lazily materialize the workspace capability registry. */
200
210
  readonly ensurePlugins?: () => Promise<CapabilityRegistry>;
211
+ /** Progress sink a long-running operation reports to; absent when the host does not listen. */
212
+ readonly onProgress?: ProgressReporter;
201
213
  };
202
214
  export interface RuntimeOperationSpec<TInput = unknown, TResult = unknown> {
203
215
  readonly name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-types.d.ts","sourceRoot":"","sources":["../../../src/public/operations/runtime-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,4EAA4E;AAE5E,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,CAAC,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAExC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,CAAC,EAAE,mBAAmB,CAAC;CAC9C,CAAC;AAEF,MAAM,MAA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AW,gBAAgB;IAC/B,IAAI,CACF,IAAI,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7B,YAAY,CACV,IAAI,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAGD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EACpD,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,OAAO,CAAC,CAclB"}
@@ -109,6 +109,11 @@ export declare const planBootstrapSpec: {
109
109
  readonly notes: {
110
110
  readonly type: "string";
111
111
  };
112
+ readonly component: {
113
+ readonly type: "string";
114
+ readonly minLength: 1;
115
+ readonly description: "Optional component this source's claims are about (for example recorder). It becomes the first segment of each generated subject_key (component.aspect); a claim's own component overrides it.";
116
+ };
112
117
  };
113
118
  };
114
119
  };
@@ -151,6 +156,16 @@ export declare const planBootstrapSpec: {
151
156
  readonly minLength: 1;
152
157
  readonly description: "Verbatim passage from the source the claim came from. Required for intent and observation claims (optional for open_question): Kibi persists it with the knowledge source title and reference in the created entity's '## Source' section, because the ticket or page may be gone by the next migration.";
153
158
  };
159
+ readonly component: {
160
+ readonly type: "string";
161
+ readonly minLength: 1;
162
+ readonly description: "Optional component the claim is about (for example recorder). Generated subject keys take the shape component.aspect with the aspect from the claim's subject. Without a component on the claim or its knowledge source, a claim whose subject is not a single word or already dotted becomes an authoring follow-up with a diagnostic instead of a malformed subject key.";
163
+ };
164
+ readonly rationale: {
165
+ readonly type: "string";
166
+ readonly minLength: 1;
167
+ readonly description: "Optional reason the requirement exists, as the source states it or the human answered when asked. It becomes the requirement's rationale and its body's '## Context' section. Never invent one.";
168
+ };
154
169
  readonly kind: {
155
170
  readonly type: "string";
156
171
  readonly enum: readonly ["intent", "observation", "open_question"];
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAUjF,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAGjF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyM7B,CAAC"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAUjF,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAGjF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2N7B,CAAC"}
@@ -94,6 +94,11 @@ export const planBootstrapSpec = {
94
94
  description: "Optional name of the MCP server or tool the agent used to read the source.",
95
95
  },
96
96
  notes: { type: "string" },
97
+ component: {
98
+ type: "string",
99
+ minLength: 1,
100
+ description: "Optional component this source's claims are about (for example recorder). It becomes the first segment of each generated subject_key (component.aspect); a claim's own component overrides it.",
101
+ },
97
102
  },
98
103
  },
99
104
  },
@@ -130,6 +135,16 @@ export const planBootstrapSpec = {
130
135
  minLength: 1,
131
136
  description: "Verbatim passage from the source the claim came from. Required for intent and observation claims (optional for open_question): Kibi persists it with the knowledge source title and reference in the created entity's '## Source' section, because the ticket or page may be gone by the next migration.",
132
137
  },
138
+ component: {
139
+ type: "string",
140
+ minLength: 1,
141
+ description: "Optional component the claim is about (for example recorder). Generated subject keys take the shape component.aspect with the aspect from the claim's subject. Without a component on the claim or its knowledge source, a claim whose subject is not a single word or already dotted becomes an authoring follow-up with a diagnostic instead of a malformed subject key.",
142
+ },
143
+ rationale: {
144
+ type: "string",
145
+ minLength: 1,
146
+ description: "Optional reason the requirement exists, as the source states it or the human answered when asked. It becomes the requirement's rationale and its body's '## Context' section. Never invent one.",
147
+ },
133
148
  kind: {
134
149
  type: "string",
135
150
  enum: [...INTENT_CLAIM_KINDS],