/** * daemon/todoist-completed-hook.ts — running something when a task is ticked. * * Completion is the one event with nothing downstream: the receiver records it * and deliberately never acts, because "done" must not start work. But recording * is not the same as ignoring, and there is a real thing to do at that moment — * PAI archives the task's comment thread, which otherwise leaves every list the * instant the box is ticked and is gone. * * A CONFIGURED COMMAND rather than a hardcoded one. AIBroker is the runtime and * PAI is a consumer of it; wiring `pai task archive` into the receiver would * invert that and make this file useless to anyone not running PAI. The hook is * unset by default, so nothing changes for an installation that wants nothing. * * The exit code is the whole point of the contract. A hook that fails silently * turns "recorded, no action taken" into a claim about something that did not * happen — which is the defect this codebase keeps closing, reintroduced at the * one place that reports on it. */ export interface HookResult { ran: boolean; ok: boolean; detail?: string; } /** * Run `TODOIST_ON_COMPLETED`, substituting `{taskId}`. * * The command is split on whitespace and executed WITHOUT a shell: this runs on * a task id that came from the internet, and a shell would make that id part of * a command line. The daemon's PATH is `/usr/local/bin:/usr/bin:/bin` under * launchd — no Homebrew — so anything outside that must be given absolutely. */ export declare function runCompletedHook(taskId: string): Promise; //# sourceMappingURL=todoist-completed-hook.d.ts.map