/** router.ts — Pure classifier: slash-command vs plain text. No side effects, no network. */ import type { Scope } from "../hub/scope.js"; /** * Discriminated union returned by classify. * A command carries the slash-stripped name and any trailing args string. * A text message carries the raw message verbatim for zero-friction capture. */ export type RoutedMessage = { kind: "command"; name: string; args: string; } | { kind: "text"; text: string; }; /** * Classify a Telegram message text as a slash-command or plain capture text. * * A message whose first non-space character is '/' is a command: * "/start" → { kind:"command", name:"start", args:"" } * "/todo buy milk" → { kind:"command", name:"todo", args:"buy milk" } * * All other messages are plain text routed to the capture handler: * "renew passport" → { kind:"text", text:"renew passport" } * * PURE: no side effects, no network, no clock. Text is never trimmed/parsed * (the capture handler receives it verbatim — generatorNotes). */ export declare function classify(message: string): RoutedMessage; /** * Parse an ephemeral Scope from a slash-command name and its trailing args. * * Maps: * "today" → { mode: "filtered", dueWithinDays: 1 } * "priority" → { mode: "general" } * "decide" → { mode: "decision", optionA: X, optionB: Y } * (split args on /\s+vs\s+/i, trim both; returns null if ≠2 parts) * * Returns null for all other command names, or if /decide args do not yield * exactly two non-empty trimmed options (caller should fall through to Unknown command). * * PURE: no side effects, no network, no disk access. Scope is ephemeral — * never persisted (nonGoal #2). */ export declare function parseScopeFromCommand(name: string, args: string): Scope | null; //# sourceMappingURL=router.d.ts.map