UNPKG

claude-flow-novice

Version:

Claude Flow Novice - Advanced orchestration platform for multi-agent AI workflows with CFN Loop architecture Includes Local RuVector Accelerator and all CFN skills for complete functionality.

58 lines (57 loc) 1.8 kB
/** * CFN Loop Orchestrator Type Definitions * * Comprehensive type definitions for the orchestrator workflow including: * - Orchestration configuration and modes * - Agent management and execution * - Decision types and outcomes * - Iteration context and state * - Error handling and validation * * @module orchestrator/types */ /** * Orchestrator error with code */ export class OrchestratorError extends Error { code; metadata; constructor(message, code, metadata){ super(message), this.code = code, this.metadata = metadata; this.name = 'OrchestratorError'; Object.setPrototypeOf(this, OrchestratorError.prototype); } } /** * Mode-specific thresholds */ export const ModeThresholds = { mvp: { gate: 0.70, consensus: 0.80 }, standard: { gate: 0.95, consensus: 0.90 }, enterprise: { gate: 0.98, consensus: 0.95 } }; /** * Type guards and validators */ export function isValidLoopDecision(value) { return value === 'PROCEED' || value === 'ITERATE' || value === 'ABORT'; } export function isValidExecutionMode(value) { return value === 'mvp' || value === 'standard' || value === 'enterprise'; } export function isValidOrchestratorConfig(value) { if (typeof value !== 'object' || value === null) { return false; } const config = value; return typeof config.taskId === 'string' && isValidExecutionMode(config.mode) && Array.isArray(config.loop3Agents) && Array.isArray(config.loop2Agents) && typeof config.productOwner === 'string' && typeof config.maxIterations === 'number' && config.maxIterations > 0; } export function getThresholdsForMode(mode) { return ModeThresholds[mode]; } //# sourceMappingURL=types.js.map