import upperFirst from 'lodash/upperFirst.js';
import * as agentMessageInput from "./agent-message-input.js";
import * as agentMessageOutput from "./agent-message-output.js";
import * as agentSessionPayload from "./agent-session-payload.js";
export const schema = {
    type: 'object',
    properties: {
        messageId: {
            type: 'string',
            description: 'The unique identifier for the agent run response message.'
        },
        input: {
            ...agentMessageInput.schema
        },
        output: {
            ...agentMessageOutput.schema
        },
        session: {
            ...agentSessionPayload.schema
        },
        runMode: {
            enum: ['BACKGROUND', 'IMMEDIATE'],
            description: 'Indicates how the agent message was run'
        }
    },
    required: ['messageId', 'session', 'runMode'],
    additionalProperties: true
};
export function createUserShapeSchema(params) {
    return {
        ...schema,
        properties: {
            ...schema.properties,
            input: {
                '@ref': agentMessageInput.shapeName
            },
            output: {
                '@ref': agentMessageOutput.shapeName
            },
            session: {
                '@ref': agentSessionPayload.shapeName
            },
            ...params?.properties
        },
        required: [...schema.required, 'output'],
        additionalProperties: false
    };
}
export function createUserShapeName(agentName) {
    return `${upperFirst(agentName)}SendAgentMessageResponse`;
}
