/**
* Self-contained AgentHub task board, served at `GET /board`.
*
* Constraints:
* - One static HTML page: inline CSS + JS, no framework and no runtime deps.
* - Reads only same-origin endpoints (`/tasks`, `/events` and `/status`).
* - Never mutates state.
*/
export interface BoardColumn {
key: string;
label: string;
}
/** Task statuses, in board order. Mirrors `TaskStatus` in core/schema.ts. */
export const BOARD_COLUMNS: BoardColumn[] = [
{ key: 'open', label: 'Open' },
{ key: 'in_progress', label: 'In Progress' },
{ key: 'review', label: 'Review' },
{ key: 'done', label: 'Done' },
{ key: 'cancelled', label: 'Cancelled' },
];
const ACTIVE_COLUMNS = BOARD_COLUMNS.filter((c) => ['open', 'in_progress', 'review'].includes(c.key));
function columnSkeleton(): string {
return ACTIVE_COLUMNS.map(
(c) => `
This cannot be undone.