UNPKG

@fusedashlabs/ui9000-workspace

Version:

UI9000 workspace MCP. One tool, show_workspace, draws a chart from your table. Set TYPESAFE_API_KEY to let Jev choose the chart.

79 lines (78 loc) • 2.54 kB
/** * Asset health overview object for `<ui9000-asset-health-overview>`. * * Needs an agent population (one goal) plus asset categories with health * counts or problems. What the goal rings arena reads besides is passed on as * sent: the goal's working, idle, over-budget, progress and status, and per * category its held agents, calls, traffic, rules and 24-hour `day`. Nothing * is invented. A single health dial stays the status gauge. A plain number * stays the KPI. Free-form node–link stays the network graph. */ type Problem = { name: string; type?: string; why?: string; loc?: string; where?: string; sev?: string; state?: string; agents?: number; since?: number; rule?: string; }; type Category = { id?: string; name: string; total?: number; healthy?: number; degraded?: number; failing?: number; items?: string[]; problems?: Problem[]; unit?: string; unitOne?: string; crew?: number; held?: number; hold?: string; overBudget?: number; calls?: number; traffic?: Record<string, number | string>; heldUp?: number | string; rules?: string[]; day?: unknown[]; }; type Agents = { id?: string; name?: string; total: number; awaiting?: number; blocked?: number; failed?: number; burn?: number; code?: string; working?: number; idle?: number; overBudget?: number; progress?: number | string; status?: string; }; export type Overview<Extra extends object = object> = { name?: string; agents: Agents; categories: (Category & Extra)[]; }; /** What a chart that takes this payload reads of a category besides it, from the category's record. */ export type CategoryExtra<Extra extends object> = (source: Record<string, unknown>) => Extra; export declare function assetHealthOverviewPayload(_fields: Record<string, string>, rows: Record<string, unknown>[]): unknown | null; /** * True when the overview should replace a KPI: an agent population plus at * least two asset categories that already carry health counts or problems. */ export declare function assetHealthFits(payload: unknown): boolean; /** * The overview the rows (or one overview object) describe. `extra` adds what * another chart taking this payload reads of each category, such as the goal * burst's answer times. */ export declare function readOverview<Extra extends object = object>(rows: Record<string, unknown>[], extra?: CategoryExtra<Extra>): Overview<Extra> | null; export {};