import { castGovernedTools } from './chat-process-tool-normalization.js';
import { applyGovernedMergeRequestWithNative } from '../../../router/virtual-router/engine-selection/native-chat-process-governance-semantics.js';
export function buildGovernedMergedRequest(options) {
    const { request, governed, inboundStreamIntent } = options;
    const governanceTimestamp = Date.now();
    const mergedBase = applyGovernedMergeRequestWithNative(request, governed, inboundStreamIntent, governanceTimestamp);
    return {
        ...mergedBase,
        tools: governed.tools !== undefined ? castGovernedTools(governed.tools) : request.tools
    };
}
