@rulvar/core 1.219.0 → 1.220.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/index.d.ts CHANGED
@@ -2162,7 +2162,15 @@ type CoreEvents = {
2162
2162
  ran: boolean;
2163
2163
  reason?: string;
2164
2164
  };
2165
- }; /** Children accepted through validated terminal output salvage on 'limit'; same lift. */
2165
+ };
2166
+ /**
2167
+ * The claim-consistency pass meta, lifted from the same envelope
2168
+ * (or typed error data) when it carries a valid object (RV2203);
2169
+ * `judgeDeclined` rides here on the failed terminals that used to
2170
+ * read null while the journal held the verdict.
2171
+ */
2172
+ claimConsistencyMeta?: Record<string, unknown>; /** The synthesis-skip marker from the same envelope; same lift (RV2203). */
2173
+ synthesisSkipped?: boolean | string; /** Children accepted through validated terminal output salvage on 'limit'; same lift. */
2166
2174
  salvagedTerminalOutputChildren?: string[];
2167
2175
  /**
2168
2176
  * Children that settled 'ok' below their declared evidence floor
@@ -11305,6 +11313,15 @@ type RunOutcome<R> = {
11305
11313
  salvagedPartialChildren?: string[]; /** The explicit semantic pass summaries (RV1906); same lift and posture. */
11306
11314
  semanticPasses?: SemanticPassesSummary;
11307
11315
  /**
11316
+ * The claim-consistency pass meta (`judgeInvoked`, `judgeDeclined`,
11317
+ * the pair counts), lifted from the same envelope or typed error
11318
+ * data (RV2203). The RV2106 mirror run journaled its declined judge
11319
+ * and the error terminal carried null: the truth now rides every
11320
+ * terminal that has it, ok and failed alike.
11321
+ */
11322
+ claimConsistencyMeta?: Record<string, unknown>; /** The synthesis-skip marker from the same envelope; same lift and posture (RV2203). */
11323
+ synthesisSkipped?: boolean | string;
11324
+ /**
11308
11325
  * Children accepted through validated terminal output salvage on
11309
11326
  * 'limit'; same lift and posture.
11310
11327
  */
package/dist/index.js CHANGED
@@ -24100,7 +24100,41 @@ function makeOrchestratorWorkflow(goal, opts) {
24100
24100
  }
24101
24101
  });
24102
24102
  };
24103
+ /**
24104
+ * The pass summaries as one builder (RV2203): the ok envelope and
24105
+ * the failure enrichment must tell the same {ran, reason} story,
24106
+ * with only the synthesis arm differing by path.
24107
+ */
24108
+ const semanticPassesSummary = (synthesis) => ({
24109
+ contradictions: opts?.contradictions === void 0 ? {
24110
+ ran: false,
24111
+ reason: "not-configured"
24112
+ } : contradictionsFound === void 0 ? {
24113
+ ran: false,
24114
+ reason: "not-run"
24115
+ } : { ran: true },
24116
+ claimConsistency: opts?.claimConsistency === void 0 ? {
24117
+ ran: false,
24118
+ reason: "not-configured"
24119
+ } : claimConsistencyMeta === void 0 ? {
24120
+ ran: false,
24121
+ reason: "not-run"
24122
+ } : { ran: true },
24123
+ synthesis
24124
+ });
24103
24125
  const enrichSynthesisFailure = (thrown, snapshot) => {
24126
+ const passTruth = {
24127
+ ...claimConsistencyMeta === void 0 ? {} : { claimConsistencyMeta },
24128
+ semanticPasses: semanticPassesSummary({
24129
+ ran: false,
24130
+ reason: "synthesis-failed"
24131
+ })
24132
+ };
24133
+ if (thrown instanceof BudgetExhaustedError) throw new BudgetExhaustedError(thrown.message, { data: {
24134
+ ...thrown.data ?? {},
24135
+ ...snapshot ?? {},
24136
+ ...passTruth
24137
+ } });
24104
24138
  if (!(thrown instanceof FailRunError)) throw thrown;
24105
24139
  const base = thrown.data ?? {};
24106
24140
  const spent = validationDecisions().filter((candidate) => candidate.verdict !== "accepted" && contractGenerationCurrent(candidate));
@@ -24110,6 +24144,7 @@ function makeOrchestratorWorkflow(goal, opts) {
24110
24144
  throw new FailRunError(thrown.message, { data: {
24111
24145
  ...base,
24112
24146
  ...snapshot ?? {},
24147
+ ...passTruth,
24113
24148
  ...spent.length === 0 || base.repairsUsed !== void 0 ? {} : {
24114
24149
  repairsUsed: spent.length,
24115
24150
  maxRepairs: validationSpec?.maxRepairs ?? 1,
@@ -24368,29 +24403,13 @@ function makeOrchestratorWorkflow(goal, opts) {
24368
24403
  ...claimFindingsFound === void 0 ? {} : { claimContradictions: claimFindingsFound },
24369
24404
  claimConsistencyMeta
24370
24405
  },
24371
- semanticPasses: {
24372
- contradictions: opts?.contradictions === void 0 ? {
24373
- ran: false,
24374
- reason: "not-configured"
24375
- } : contradictionsFound === void 0 ? {
24376
- ran: false,
24377
- reason: "not-run"
24378
- } : { ran: true },
24379
- claimConsistency: opts?.claimConsistency === void 0 ? {
24380
- ran: false,
24381
- reason: "not-configured"
24382
- } : claimConsistencyMeta === void 0 ? {
24383
- ran: false,
24384
- reason: "not-run"
24385
- } : { ran: true },
24386
- synthesis: opts?.synthesis === void 0 ? {
24387
- ran: false,
24388
- reason: "not-configured"
24389
- } : synthesisSkippedByValidDraft ? {
24390
- ran: false,
24391
- reason: "valid-draft"
24392
- } : { ran: true }
24393
- }
24406
+ semanticPasses: semanticPassesSummary(opts?.synthesis === void 0 ? {
24407
+ ran: false,
24408
+ reason: "not-configured"
24409
+ } : synthesisSkippedByValidDraft ? {
24410
+ ran: false,
24411
+ reason: "valid-draft"
24412
+ } : { ran: true })
24394
24413
  };
24395
24414
  };
24396
24415
  return defineWorkflow({ name: ORCHESTRATE_WORKFLOW_NAME }, async (ctx) => {
@@ -26026,6 +26045,10 @@ function liftRunCompletion(candidate) {
26026
26045
  synthesis: { ...synthesis }
26027
26046
  };
26028
26047
  }
26048
+ const metaCandidate = candidate.claimConsistencyMeta;
26049
+ if (typeof metaCandidate === "object" && metaCandidate !== null && !Array.isArray(metaCandidate)) lifted.claimConsistencyMeta = { ...metaCandidate };
26050
+ const skippedCandidate = candidate.synthesisSkipped;
26051
+ if (typeof skippedCandidate === "boolean" || typeof skippedCandidate === "string") lifted.synthesisSkipped = skippedCandidate;
26029
26052
  return lifted;
26030
26053
  }
26031
26054
  /**
@@ -26576,7 +26599,8 @@ function createEngine(options) {
26576
26599
  };
26577
26600
  if (value !== void 0 && (status === "ok" || status === "exhausted")) outcomeFacts.value = value;
26578
26601
  if (wireError !== void 0) outcomeFacts.error = wireError;
26579
- const lifted = liftRunCompletion(status === "ok" || status === "exhausted" ? outcomeFacts.value : status === "error" ? wireError?.data : void 0);
26602
+ let lifted = liftRunCompletion(status === "ok" || status === "exhausted" ? outcomeFacts.value : status === "error" ? wireError?.data : void 0);
26603
+ if (lifted === void 0 && status === "exhausted") lifted = liftRunCompletion(wireError?.data);
26580
26604
  if (lifted !== void 0) {
26581
26605
  outcomeFacts.completion = lifted.completion;
26582
26606
  if (lifted.childStatusCounts !== void 0) outcomeFacts.childStatusCounts = lifted.childStatusCounts;
@@ -26586,6 +26610,8 @@ function createEngine(options) {
26586
26610
  if (lifted.belowFloorOkChildren !== void 0) outcomeFacts.belowFloorOkChildren = lifted.belowFloorOkChildren;
26587
26611
  if (lifted.acceptanceChildren !== void 0) outcomeFacts.acceptanceChildren = lifted.acceptanceChildren;
26588
26612
  if (lifted.semanticPasses !== void 0) outcomeFacts.semanticPasses = lifted.semanticPasses;
26613
+ if (lifted.claimConsistencyMeta !== void 0) outcomeFacts.claimConsistencyMeta = lifted.claimConsistencyMeta;
26614
+ if (lifted.synthesisSkipped !== void 0) outcomeFacts.synthesisSkipped = lifted.synthesisSkipped;
26589
26615
  }
26590
26616
  let settlementFailure;
26591
26617
  let supersededBy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/core",
3
- "version": "1.219.0",
3
+ "version": "1.220.0",
4
4
  "description": "Rulvar core: L0 contracts, journal kernel, ctx primitives, agent runtime, model router, tool system, dynamic orchestrator, InMemory and JSONL stores, event stream.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",