@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.
57 lines (56 loc) • 1.93 kB
TypeScript
/**
* Goals against the resource groups they draw on, read from one row per goal
* and group. The goals perimeter's goal shape, as the bipartite graph and the
* goals dependency graph take it: each goal with its agents and the groups it
* draws on, a group of the same name on several goals being one group.
*
* Goal columns repeat on each of the goal's rows; the first value sent wins.
* Nothing is invented: a column that is not sent is not in the payload.
*/
import { AGENT_STATE_KEYS } from '../../profiler/goal-group-columns.js';
type LinkState = 'healthy' | 'degraded' | 'awaiting' | 'blocked' | 'failed';
type AgentState = keyof typeof AGENT_STATE_KEYS;
export type GroupLink = {
name: string;
kind?: string;
state?: LinkState;
held?: number;
calls?: number;
detail?: string;
cause?: string;
rule?: string;
owner?: string;
since?: string;
};
export type GoalAgents = {
total: number;
} & Partial<Record<AgentState, number>>;
export type GoalGroups = {
name: string;
code?: string;
agents: GoalAgents;
progress?: number | string;
multiplier?: number;
status?: string;
resourceGroups: GroupLink[];
};
export type GoalGroupMap = {
title?: string;
goals: GoalGroups[];
/** Every link carries its calls a minute. */
callsOnEveryLink: boolean;
/** Some link holds agents: a held count, or a held state. */
holds: boolean;
/** Some link says what holds agents there: a cause, rule, owner or since. */
traced: boolean;
};
/**
* The goals and their groups, or null unless the rows are goal × group pairs
* with the goal's agent total on every goal, and at least `minGoals` goals
* (two unless the reader says otherwise). A pair
* that repeats is not one link.
*/
export declare function readGoalGroups(rows: Record<string, unknown>[], { minGoals }?: {
minGoals?: number;
}): GoalGroupMap | null;
export {};