/** * `bober task ` — zero-friction personal task capture. * * Subcommands: * add — Capture a plain task as an open action Finding in the hub pool. * * Error handling: CLI handlers MUST NOT throw. They set process.exitCode=1 and * return on all errors. Pattern mirrors src/cli/commands/facts.ts. */ import type { Command } from "commander"; import { FactStore } from "../../state/facts.js"; import type { Finding } from "../../hub/finding.js"; import type { GmailMcpLike } from "../../hub/gmail-to-task.js"; /** * DI core for `task add` — accepts an already-open store + injected `now` * so tests can drive it without spawning the CLI or opening a real DB. * * Never throws: empty input and persistence errors are caught, reported to * stderr, and communicated via process.exitCode=1. */ export declare function runTaskAdd(store: FactStore, text: string, opts: { domain?: string; }, now: string): Promise; /** * DI core for `task list`. Default filter: wake-aware visibility (open, * in-progress, or snoozed tasks whose wake time has passed). Never throws. * * `now` is injected at the CLI handler boundary so tests can pass a fixed * clock. No Date.now() or new Date() inside this function. */ export declare function runTaskList(store: FactStore, opts: { all?: boolean; status?: string; }, now: string): void; /** * DI core for start/done/drop. Missing id → chalk.yellow + exitCode=1 + return. * Never throws. */ export declare function runTaskTransition(store: FactStore, id: string, newStatus: Finding["status"], now: string): Promise; /** * DI core for `task snooze`. Parses `until` as an ISO date at the boundary * (NaN → chalk.red + exitCode=1 + return), reads the active Finding, strips * any prior snooze-until tag, appends the new one, and transitions to snoozed. * * Never throws: all errors use chalk + process.exitCode=1 + return. */ export declare function runTaskSnooze(store: FactStore, id: string, until: string, now: string): Promise; /** * Parse the raw JSON, ingest it, print the reconcile action. Never throws: * bad JSON or schema-invalid payload → chalk.red + exitCode=1 + return, no write. */ export declare function runTaskIngest(store: FactStore, raw: string, now: string): Promise; /** * DI core for `task from-gmail`. egressAllowed is resolved at the CLI boundary. * * When disabled → opt-in error from fromGmailTask is caught, written to stderr, * exitCode=1, return. When enabled → fromGmailTask runs with the injected mcp. * Connector errors are caught, sanitized (KEY=VALUE stripped), set exitCode=1. * * Never throws. mcp.stop() is always attempted in a finally block. */ export declare function runTaskFromGmail(store: FactStore, mcp: GmailMcpLike, threadRef: string, egressAllowed: boolean, now: string): Promise; export declare function registerTaskCommand(program: Command): void; //# sourceMappingURL=task.d.ts.map