// tools/register-worker-tools.ts — Registers worker management tools on the MCP server (SPEC-078)
import { WorkerStatusInputSchema, ConfigureWorkersInputSchema } from './schemas/workers-schema.js';
import { safeTracked, safeLicensed } from './safe-handler.js';
import { handleWorkerStatus } from './worker-status-handler.js';
import { handleConfigureWorkers } from './configure-workers-handler.js';
export function registerWorkerTools(server) {
    // worker_status (free tier)
    server.registerTool('worker_status', {
        description: 'Show the status of background analysis workers (test-gaps, security-audit, optimization, code-map, documentation, dependency-health). ' +
            'Returns enabled/disabled state, last run results, queue length, and findings. ' +
            'Optionally filter by worker name for detailed findings.',
        inputSchema: {
            projectId: WorkerStatusInputSchema.shape.projectId,
            workerName: WorkerStatusInputSchema.shape.workerName,
        },
        annotations: { title: 'Worker Status', readOnlyHint: true },
    }, safeTracked('worker_status', (args) => Promise.resolve(handleWorkerStatus(args))));
    // configure_workers (pro tier)
    server.registerTool('configure_workers', {
        description: 'Configure background analysis workers: enable/disable, set cooldown, set priority, add/remove trigger patterns. ' +
            'Changes are persisted per-project and override default registry values.',
        inputSchema: {
            projectId: ConfigureWorkersInputSchema.shape.projectId,
            workerName: ConfigureWorkersInputSchema.shape.workerName,
            action: ConfigureWorkersInputSchema.shape.action,
            value: ConfigureWorkersInputSchema.shape.value,
        },
        annotations: { title: 'Configure Workers', readOnlyHint: false },
    }, safeLicensed('configure_workers', (args) => handleConfigureWorkers(args)));
}
//# sourceMappingURL=register-worker-tools.js.map