АРЧ АП11 - Выделить truth и answer-shape policy в assistant runtime

This commit is contained in:
2026-04-15 23:21:13 +03:00
parent 9d5928125d
commit 89bcaccda8
12 changed files with 970 additions and 20 deletions
@@ -8,6 +8,7 @@ import {
type FinalizeAssistantAddressTurnInput
} from "./assistantAddressTurnFinalizeRuntimeAdapter";
import { attachAssistantRuntimeContractShadow } from "./assistantRuntimeContractResolver";
import { attachAssistantTruthAnswerPolicy } from "./assistantTruthAnswerPolicyRuntimeAdapter";
export interface RunAssistantAddressLaneResponseRuntimeInput<ResponseType = AssistantMessageResponsePayload> {
sessionId: string;
@@ -251,6 +252,10 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
userMessage: input.userMessage,
addressRuntimeMeta: input.llmPreDecomposeMeta
});
const debugWithTruthAnswerPolicy = attachAssistantTruthAnswerPolicy(debugWithRuntimeContracts, {
addressRuntimeMeta: input.llmPreDecomposeMeta,
replyType: normalizeAddressReplyType(input.addressLane.reply_type)
});
const finalization = finalizeAddressTurnSafe({
sessionId: input.sessionId,
userMessage: input.userMessage,
@@ -258,7 +263,7 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
assistantReply: safeAddressReply,
replyType: normalizeAddressReplyType(input.addressLane.reply_type),
addressLaneDebug: normalizeAddressLaneDebug(input.addressLane.debug),
debug: debugWithRuntimeContracts,
debug: debugWithTruthAnswerPolicy,
carryoverMeta: normalizeCarryoverMeta(input.carryoverMeta),
llmPreDecomposeMeta: normalizeLlmPreDecomposeMeta(input.llmPreDecomposeMeta),
appendItem: input.appendItem,
@@ -271,6 +276,6 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
return {
response: finalization.response as ResponseType,
debug: debugWithRuntimeContracts
debug: debugWithTruthAnswerPolicy
};
}