import { type BoardTask } from "./board.js"; export type WsGroup = "review" | "fix" | "verifying" | "working" | "open" | "shelved" | "merged"; export declare const WS_GROUPS: readonly WsGroup[]; export declare const WS_GROUP_TITLES: Record; /** Merged tasks shown: those of the last day, at most this many. */ export declare const WS_MERGED_MAX = 10; export declare const WS_MERGED_MS: number; export interface WsEntry { task: BoardTask; group: WsGroup; } /** The group a task is shown in, or undefined when it is not (dropped, done without a workspace, merged long ago). */ export declare function wsGroup(t: BoardTask, now?: number): WsGroup | undefined; /** The tasks in their groups' order; within a group by id, merged newest first (at most WS_MERGED_MAX). */ export declare function workspaceEntries(tasks: BoardTask[], now?: number): WsEntry[]; /** What the overlay knows of the session holding a task (the hub's row). */ export interface WsSession { name: string; state: string; waitingFor?: string | null; running: boolean; } export type WsTone = "accent" | "warning" | "error" | "success" | "muted" | "dim"; /** * The icon of a task: `●` working, `◐` waiting for you (its session asks), `○` idle, * `⧗` verifying, `◆` review, `✕` conflict or failed, `✓` merged, `·` open, `–` shelved. * The colour only adds to it. */ export declare function wsIcon(t: BoardTask, s?: WsSession): { glyph: string; tone: WsTone; }; /** A task the overlay counts as needing you: its stage (review, conflict, failed), or its session asks. */ export declare const wsNeedsYou: (t: BoardTask, s?: WsSession) => boolean; /** * The next task after `from` (by the entries' order, wrapping) that needs you; `from` * itself only when it is the only one. Undefined when none does. */ export declare function nextNeedsYou(entries: WsEntry[], from: number | undefined, sessionOf?: (t: BoardTask) => WsSession | undefined): number | undefined; /** The counts for the overlay's title: `3 working · 1 review · 1 conflict`. */ export declare function wsCounts(entries: WsEntry[]): string; /** What a task's worktree holds against its base (the hub reads it with git; see taskChanges). */ export interface TaskChanges { files: { status: string; path: string; add: number | null; del: number | null; }[]; insertions: number; deletions: number; /** Commits on its branch that base does not have. */ commits: number; /** Uncommitted (tracked changes or new files). */ dirty: boolean; } /** * M60: tasks of one repository at work at once (working, verifying, in review, to fix) * that change the same files: each with the others and the files they share. A merge of * one will conflict with, or silently reshape, the other's work. */ export declare function overlaps(entries: WsEntry[], changesOf: (id: number) => TaskChanges | undefined): Map; /** `+82 −3`, for a row (empty when there is nothing). */ export declare function changeShort(c: TaskChanges | undefined): string; /** A row's text after the icon: `#4 users migration`, with what holds an open task. */ export declare function wsRowText(t: BoardTask, all: BoardTask[]): string; /** The keys that act on a task in its state: what the overlay's bottom line offers. */ export declare function wsKeys(t: BoardTask | undefined, s?: WsSession): [string, string][]; /** * The detail of a task, as plain lines (the hub colours and cuts them): branch, agent, * change, verify, the note, the files, what its session said last. */ export declare function wsDetail(t: BoardTask, o: { session?: WsSession; sentence?: string; changes?: TaskChanges | "loading"; now?: number; fileMax?: number; overlap?: { id: number; files: string[]; }[]; }): { label: string; text: string; tone?: WsTone; }[];