// resources/registry.ts — Registers all MCP resources on the server.
import { handleProcessResource, processResourceDefinition } from './process.js';
import { handleSpecsResource, specsResourceDefinition } from './specs.js';
import { handleTemplatesResource, templatesResourceDefinition } from './templates.js';
import { handlePatternsResource, patternsResourceDefinition } from './patterns.js';
/**
 * Registers all 4 read-only MCP resources on the server.
 */
export function registerResources(server) {
    server.registerResource(processResourceDefinition.name, processResourceDefinition.uri, {
        description: processResourceDefinition.description,
        mimeType: processResourceDefinition.mimeType,
    }, async (uri) => ({
        contents: [
            { uri: uri.href, text: await handleProcessResource(), mimeType: 'application/json' },
        ],
    }));
    server.registerResource(specsResourceDefinition.name, specsResourceDefinition.uri, {
        description: specsResourceDefinition.description,
        mimeType: specsResourceDefinition.mimeType,
    }, async (uri) => ({
        contents: [
            { uri: uri.href, text: await handleSpecsResource(), mimeType: 'application/json' },
        ],
    }));
    server.registerResource(templatesResourceDefinition.name, templatesResourceDefinition.uri, {
        description: templatesResourceDefinition.description,
        mimeType: templatesResourceDefinition.mimeType,
    }, async (uri) => ({
        contents: [
            { uri: uri.href, text: await handleTemplatesResource(), mimeType: 'application/json' },
        ],
    }));
    server.registerResource(patternsResourceDefinition.name, patternsResourceDefinition.uri, {
        description: patternsResourceDefinition.description,
        mimeType: patternsResourceDefinition.mimeType,
    }, async (uri) => ({
        contents: [
            { uri: uri.href, text: await handlePatternsResource(), mimeType: 'application/json' },
        ],
    }));
}
//# sourceMappingURL=registry.js.map