АРЧ АП11 - Подключить shadow-контракты переходов и truth gate в debug payload

This commit is contained in:
2026-04-15 23:03:11 +03:00
parent 93ad18daa3
commit 1d95ed9b60
10 changed files with 645 additions and 9 deletions
@@ -7,6 +7,7 @@ import {
type AddressLlmPreDecomposeMetaLogInput,
type FinalizeAssistantAddressTurnInput
} from "./assistantAddressTurnFinalizeRuntimeAdapter";
import { attachAssistantRuntimeContractShadow } from "./assistantRuntimeContractResolver";
export interface RunAssistantAddressLaneResponseRuntimeInput<ResponseType = AssistantMessageResponsePayload> {
sessionId: string;
@@ -246,6 +247,10 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
period_to: input.toNonEmptyString(rootFilters?.period_to)
};
}
const debugWithRuntimeContracts = attachAssistantRuntimeContractShadow(debug, {
userMessage: input.userMessage,
addressRuntimeMeta: input.llmPreDecomposeMeta
});
const finalization = finalizeAddressTurnSafe({
sessionId: input.sessionId,
userMessage: input.userMessage,
@@ -253,7 +258,7 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
assistantReply: safeAddressReply,
replyType: normalizeAddressReplyType(input.addressLane.reply_type),
addressLaneDebug: normalizeAddressLaneDebug(input.addressLane.debug),
debug,
debug: debugWithRuntimeContracts,
carryoverMeta: normalizeCarryoverMeta(input.carryoverMeta),
llmPreDecomposeMeta: normalizeLlmPreDecomposeMeta(input.llmPreDecomposeMeta),
appendItem: input.appendItem,
@@ -266,6 +271,6 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
return {
response: finalization.response as ResponseType,
debug
debug: debugWithRuntimeContracts
};
}