// tools/register-session-tools.ts — Registers session persistence tools (SPEC-081)
// Tools: restore_session, list_sessions, export_session
import { RestoreSessionSchema, ListSessionsSchema, ExportSessionSchema, } from './schemas/session.js';
import { handleRestoreSession } from './restore-session.js';
import { handleListSessions } from './list-sessions.js';
import { handleExportSession } from './export-session.js';
import { safeLicensed } from './safe-handler.js';
export function registerSessionTools(server) {
    // restore_session (AC-05)
    server.registerTool('restore_session', {
        description: 'Restore a previous session to recover context (active specs, decisions, modified files). ' +
            'If no sessionId is provided, restores the most recent session. ' +
            'Returns context summary, active specs, and recent decisions.',
        inputSchema: RestoreSessionSchema,
        annotations: { readOnlyHint: true },
    }, safeLicensed('restore_session', async (args) => handleRestoreSession(args)));
    // list_sessions (AC-06)
    server.registerTool('list_sessions', {
        description: 'List recent sessions for a project with summary info. ' +
            'Returns session IDs, timestamps, context summaries, and tool call counts. ' +
            'Ordered by most recent first.',
        inputSchema: ListSessionsSchema,
        annotations: { readOnlyHint: true },
    }, safeLicensed('list_sessions', async (args) => handleListSessions(args)));
    // export_session (AC-07)
    server.registerTool('export_session', {
        description: 'Export a session as markdown or JSON for handoff between agents or documentation. ' +
            'Markdown format includes sections for Summary, Specs, Decisions, Files, and Metadata. ' +
            'If no sessionId is provided, exports the most recent session.',
        inputSchema: ExportSessionSchema,
        annotations: { readOnlyHint: true },
    }, safeLicensed('export_session', async (args) => handleExportSession(args)));
}
//# sourceMappingURL=register-session-tools.js.map