import { z } from 'zod';
import { regenerateSpecSummaryHtml } from '../engine/spec-summary-html.js';
import { specStore } from '../storage/index.js';
import { hashProjectPath } from '../storage/base-store.js';
export function registerGenerateDashboardTools(server) {
    server.registerTool('generate_spec_dashboard', {
        description: 'Deprecated compatibility tool. Planu no longer writes generated dashboard HTML into planu/.',
        inputSchema: {
            projectPath: z.string().describe('Absolute path to the project root directory'),
        },
        annotations: { readOnlyHint: true },
    }, async (args) => {
        const projectId = hashProjectPath(args.projectPath);
        const specs = await specStore.listSpecs(projectId);
        await regenerateSpecSummaryHtml(args.projectPath, specs);
        const doneCount = specs.filter((s) => s.status === 'done').length;
        return {
            content: [
                {
                    type: 'text',
                    text: `Dashboard generation is deprecated; no project files were written. Current specs: ${String(specs.length)} (${String(doneCount)} done).`,
                },
            ],
        };
    });
}
//# sourceMappingURL=generate-dashboard.js.map