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.

32 lines (31 loc) 1.25 kB
/** * CFN Loop Type Definitions * * Core types and interfaces for the CFN Loop system including: * - Configuration and options * - Results and outcomes * - Byzantine consensus types * - Agent responses and votes * * @module cfn-loop/types */ // ===== VALIDATOR TYPES ===== /** * Validator vote in Byzantine consensus * Each validator provides a confidence score, vote, reasoning, and cryptographic signature */ // ===== TYPE GUARDS ===== /** * Type guard to check if consensus result is Byzantine */ export function isByzantineConsensusResult(result) { return 'byzantineEnabled' in result && result.byzantineEnabled === true; } /** * Type guard to check if validator vote is valid */ export function isValidValidatorVote(vote) { return vote && typeof vote.agentId === 'string' && typeof vote.agentType === 'string' && typeof vote.confidence === 'number' && (vote.vote === 'PASS' || vote.vote === 'FAIL') && typeof vote.reasoning === 'string' && typeof vote.signature === 'string' && typeof vote.timestamp === 'number' && vote.confidence >= 0 && vote.confidence <= 1; } // ===== EXPORTS ===== export default { isByzantineConsensusResult, isValidValidatorVote }; //# sourceMappingURL=types.js.map