export interface BoardTask { id: number; title: string; detail: string | null; state: "open" | "claimed" | "done" | "dropped"; /** Ids it waits on: claimable once each is done (a dropped one does not hold it). */ after: number[]; /** Who put it on the board: "user", "concierge", or a session's name (its job id when a job). */ by: { who: string; whoId: string | null; }; at: number; /** The session that holds it (claimed), or held it (done). */ owner: { id: string; name: string; } | null; claimedAt: number | null; doneAt: number | null; result: string | null; /** Handed to a session by the hub or the concierge (a message there); open until that session claims it. */ assigned: { id: string; name: string; at: number; } | null; } export declare const TASK_MAX = 200; export declare const TASK_TITLE_MAX = 200; export declare const TASK_TEXT_MAX = 2000; export interface BoardSummary { open: number; claimed: number; blocked: number; done: number; } /** The ids a task still waits on: the ones that exist and are neither done nor dropped. */ export declare function blockedOn(t: BoardTask, all: Iterable): number[]; /** Open, claimed, blocked (open but waiting on another) and done, counted. */ export declare function boardSummary(all: BoardTask[]): BoardSummary; /** `3 open · 2 claimed · 1 blocked · 5 done` (what is zero left out; "none" when the board is empty). */ export declare function summaryLine(s: BoardSummary): string; export declare function taskLine(t: BoardTask, all: Iterable, now?: number): string; /** Open (claimable) first, then blocked, then claimed: the order the digest and the hub list live tasks in. */ export declare function liveOrder(t: BoardTask, all: BoardTask[]): number; /** The board for a digest: the summary line, then every task that is not done or dropped (open, blocked, claimed). */ export declare function boardLines(all: BoardTask[], now?: number): string[]; /** The board for a tool's answer: boardLines, then the last `doneMax` done tasks (newest last). */ export declare function boardListing(all: BoardTask[], now?: number, doneMax?: number): string[];