import { ProviderPlugin } from '../../lib/providers';
import { createAnthropicAgent } from './agent';
import { anthropicModelDefinition } from './modelDefinition';
import { startAnthropicStream } from './streamHandler';
export const anthropicProvider = {
    metadata: {
        kind: 'anthropic',
        name: 'Anthropic',
        supportsTools: false,
        supportsApprovals: false,
        supportsStreaming: true,
        isImplemented: false
    },
    createAgent: (options) => createAnthropicAgent(options),
    startRun: async (agent, input, callbacks) => {
        if (!agent || typeof agent !== 'object') {
            throw new Error('Anthropic provider received an invalid agent context');
        }
        return startAnthropicStream(agent, input, callbacks);
    }
};
export class AnthropicProvider extends ProviderPlugin {
    constructor() {
        super(...arguments);
        Object.defineProperty(this, "id", {
            enumerable: true,
            configurable: true,
            writable: true,
            value: 'anthropic'
        });
    }
    async createProvider() {
        return anthropicProvider;
    }
    async getModelDefinition() {
        return anthropicModelDefinition;
    }
}
