// tools/event-contracts.ts — Event-Driven Architecture Contracts tool (SPEC-031)
// Subcommands: generate-contract, validate-contract, evolve-contract, saga-spec
import { handleGenerateContract, handleValidateContract, handleEvolveContract, handleSagaSpec, } from './event-contracts/index.js';
// ---------------------------------------------------------------------------
// Entry point
// ---------------------------------------------------------------------------
export async function handleEventContracts(args) {
    try {
        switch (args.subcommand) {
            case 'generate-contract':
                return await handleGenerateContract(args);
            case 'validate-contract':
                return await handleValidateContract(args);
            case 'evolve-contract':
                return await handleEvolveContract(args);
            case 'saga-spec':
                return await handleSagaSpec(args);
        }
    }
    catch (error) {
        const message = error instanceof Error ? error.message : String(error);
        return {
            content: [{ type: 'text', text: `Event contracts error: ${message}` }],
            isError: true,
        };
    }
}
//# sourceMappingURL=event-contracts.js.map