metheus-governance-mcp-cli 0.2.217 → 0.2.218
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.
|
@@ -4511,7 +4511,6 @@ export async function processRunnerSelectedRecord({
|
|
|
4511
4511
|
? executionDeps.explainExecutionFailureWithAI
|
|
4512
4512
|
: null;
|
|
4513
4513
|
const normalizedPrecomputedHumanIntentContext = safeObject(precomputedHumanIntentContext);
|
|
4514
|
-
const normalizedPrecomputedHumanIntent = safeObject(normalizedPrecomputedHumanIntentContext.humanIntent);
|
|
4515
4514
|
const validateWorkspaceArtifacts = typeof executionDeps.validateWorkspaceArtifacts === "function"
|
|
4516
4515
|
? executionDeps.validateWorkspaceArtifacts
|
|
4517
4516
|
: null;
|
|
@@ -4547,6 +4546,42 @@ export async function processRunnerSelectedRecord({
|
|
|
4547
4546
|
},
|
|
4548
4547
|
};
|
|
4549
4548
|
}
|
|
4549
|
+
const selectedRecordKind = String(safeObject(selectedRecord?.parsedArchive).kind || "").trim();
|
|
4550
|
+
const shouldResolveHumanIntentFirst = ["telegram_message", "telegram_edited_message"].includes(selectedRecordKind)
|
|
4551
|
+
&& safeObject(selectedRecord?.parsedArchive).senderIsBot !== true;
|
|
4552
|
+
const resolvedPreAdjudicationHumanIntentContext = Object.keys(normalizedPrecomputedHumanIntentContext).length > 0
|
|
4553
|
+
? normalizedPrecomputedHumanIntentContext
|
|
4554
|
+
: shouldResolveHumanIntentFirst
|
|
4555
|
+
? await resolveHumanIntentContext({
|
|
4556
|
+
selectedRecord,
|
|
4557
|
+
normalizedRoute,
|
|
4558
|
+
bot,
|
|
4559
|
+
executionPlan,
|
|
4560
|
+
deps: executionDeps,
|
|
4561
|
+
persistedRequest: persistedHumanIntentRequest,
|
|
4562
|
+
})
|
|
4563
|
+
: null;
|
|
4564
|
+
if (resolvedPreAdjudicationHumanIntentContext?.contractNeedsResolution === true) {
|
|
4565
|
+
const reason = "human intent contract is incomplete and requires regeneration";
|
|
4566
|
+
saveRunnerRouteState(
|
|
4567
|
+
routeKey,
|
|
4568
|
+
buildRunnerRouteStateFromComment(selectedRecord, {
|
|
4569
|
+
last_action: "needs_contract",
|
|
4570
|
+
last_reason: reason,
|
|
4571
|
+
}),
|
|
4572
|
+
);
|
|
4573
|
+
return {
|
|
4574
|
+
kind: "skipped",
|
|
4575
|
+
skippedRecord: {
|
|
4576
|
+
id: selectedRecord.id,
|
|
4577
|
+
reason,
|
|
4578
|
+
messageID: intFromRawAllowZero(selectedRecord?.parsedArchive?.messageID, 0),
|
|
4579
|
+
},
|
|
4580
|
+
};
|
|
4581
|
+
}
|
|
4582
|
+
const normalizedPrecomputedHumanIntent = safeObject(
|
|
4583
|
+
resolvedPreAdjudicationHumanIntentContext?.humanIntent || normalizedPrecomputedHumanIntentContext.humanIntent,
|
|
4584
|
+
);
|
|
4550
4585
|
const responderAdjudication = Object.keys(safeObject(precomputedResponderAdjudication)).length > 0
|
|
4551
4586
|
? safeObject(precomputedResponderAdjudication)
|
|
4552
4587
|
: await resolveRunnerResponderAdjudication({
|
|
@@ -4586,8 +4621,8 @@ export async function processRunnerSelectedRecord({
|
|
|
4586
4621
|
};
|
|
4587
4622
|
}
|
|
4588
4623
|
|
|
4589
|
-
const humanIntentContext = Object.keys(
|
|
4590
|
-
?
|
|
4624
|
+
const humanIntentContext = Object.keys(safeObject(resolvedPreAdjudicationHumanIntentContext)).length > 0
|
|
4625
|
+
? safeObject(resolvedPreAdjudicationHumanIntentContext)
|
|
4591
4626
|
: await resolveHumanIntentContext({
|
|
4592
4627
|
selectedRecord,
|
|
4593
4628
|
normalizedRoute,
|
|
@@ -12579,16 +12579,15 @@ export async function runSelftestRunnerScenarios(push, deps) {
|
|
|
12579
12579
|
resolveConversationPeerBots: () => [],
|
|
12580
12580
|
},
|
|
12581
12581
|
});
|
|
12582
|
-
push(
|
|
12583
|
-
"
|
|
12584
|
-
processed.kind === "
|
|
12585
|
-
&&
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
}
|
|
12582
|
+
push(
|
|
12583
|
+
"runner_contract_first_selection_overrides_responder_adjudicator_for_human_message",
|
|
12584
|
+
processed.kind === "replied"
|
|
12585
|
+
&& executionCalls === 1,
|
|
12586
|
+
`kind=${String(processed.kind || "(none)")} reason=${String(processed.skippedRecord?.reason || "(none)")} execution_calls=${executionCalls}`,
|
|
12587
|
+
);
|
|
12588
|
+
} catch (err) {
|
|
12589
|
+
push("runner_contract_first_selection_overrides_responder_adjudicator_for_human_message", false, String(err?.message || err));
|
|
12590
|
+
}
|
|
12592
12591
|
|
|
12593
12592
|
try {
|
|
12594
12593
|
let executionCalls = 0;
|