@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.
22 lines (21 loc) • 795 B
JavaScript
import { holdAction, openProposalSession } from './proposal.js';
import { classifyActions } from './risk.js';
/** One classification for decide() and show_workspace. Scoring stays outside. */
export function governTrace(core, catalogActions) {
const classified = classifyActions(catalogActions);
const session = openProposalSession();
for (const action of classified)
holdAction(session, action);
const proposals = session.proposals.map((held) => ({
id: held.id,
action: held.action,
preview: held.preview,
}));
return {
...core,
risk: classified.map(({ action, band }) => ({ action, band })),
proposals,
proposal: proposals[0] ?? null,
outcome: proposals.length > 0 ? 'held' : 'rendered',
};
}