import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { type ScheduleTarget } from '../../../store/schedule-repo.js'; import { type ContextToolDeps } from './context.js'; /** Snapshot of the Cortex execution context — what cortex_context returns, sliced * down to fields needed by target resolution. Decoupled from the Tool's response * shape so the resolver can be unit-tested without spinning up MCP. */ export interface CortexContextSnapshot { channel: string | null; sessionId: string | null; sessionName: string | null; threadId: string | null; profile: string | null; project: string | null; backend: string | null; scheduleTaskId: string | null; callbackSource: string | null; } /** Target spec accepted by cortex_schedule_add: shorthand string OR explicit object. * Shorthand strings are resolved to concrete ScheduleTarget objects at create time * (decision: list/get always shows real IDs). */ export type TargetSpec = undefined | 'fresh' | 'current-project' | 'current-thread' | ScheduleTarget; export declare function resolveTargetShorthand(spec: TargetSpec, ctx: CortexContextSnapshot): ScheduleTarget; export declare function registerScheduleTools(server: McpServer, deps: ContextToolDeps): void;