export const shapeName = 'TSAgentMessageOutput';
export const generateStateOutputSchema = {
    title: 'TSAgentGenerateStateOutput',
    type: 'object',
    properties: {
        type: { const: 'generate' },
        data: {}
    },
    required: ['type', 'data'],
    additionalProperties: false
};
export const graphQLStateOutputSchema = {
    title: 'TSAgentGraphQLStateOutput',
    type: 'object',
    properties: {
        type: { const: 'graphql' },
        data: {}
    },
    required: ['type', 'data'],
    additionalProperties: false
};
export const chatStateOutputSchema = {
    title: 'TSAgentChatStateOutput',
    type: 'object',
    properties: {
        type: { const: 'chat' },
        data: {
            type: 'object',
            properties: {
                content: { type: 'string' },
                artifact: { type: 'object' },
                references: {
                    type: 'array',
                    items: {
                        type: 'object',
                        properties: {
                            _tid: { type: 'string' }
                        },
                        required: ['_tid'],
                        additionalProperties: false
                    }
                }
            },
            required: ['content', 'references'],
            additionalProperties: false
        }
    },
    required: ['type', 'data'],
    additionalProperties: false
};
export const unknownStateOutputSchema = {
    title: 'TSAgentUnknownStateOutput',
    type: 'object',
    properties: {
        type: { const: 'unknown' },
        data: {}
    },
    required: ['type', 'data'],
    additionalProperties: false
};
export const schema = {
    title: shapeName,
    description: 'The output schema for agent messages.',
    discriminator: {
        propertyName: 'type'
    },
    oneOf: [generateStateOutputSchema, graphQLStateOutputSchema, chatStateOutputSchema, unknownStateOutputSchema]
};
export const shapeSchema = {
    ...schema,
    oneOf: [
        { '@ref': generateStateOutputSchema.title },
        { '@ref': graphQLStateOutputSchema.title },
        { '@ref': chatStateOutputSchema.title },
        { '@ref': unknownStateOutputSchema.title }
    ]
};
