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.
44 lines (43 loc) • 1.65 kB
JavaScript
/**
* Agent Output Type Definitions
* TypeScript interfaces matching agent-output-v1.json schema
*
* @version 1.0.0
* @description Strict type-safe agent output interfaces for CFN Loop
*/ // ============================================================================
// Enums and Type Aliases
// ============================================================================
// ============================================================================
// Type Guards
// ============================================================================
/**
* Type guard for Loop 3 output
*/ export function isLoop3Output(output) {
return output.output_type === 'loop3';
}
/**
* Type guard for Loop 2 output
*/ export function isLoop2Output(output) {
return output.output_type === 'loop2';
}
/**
* Type guard for Product Owner output
*/ export function isProductOwnerOutput(output) {
return output.output_type === 'product_owner';
}
/**
* Type guard for base agent output
*/ export function isValidAgentOutput(value) {
if (typeof value !== 'object' || value === null) {
return false;
}
const obj = value;
// Check required base fields
if (typeof obj.success !== 'boolean' || typeof obj.confidence !== 'number' || typeof obj.iteration !== 'number' || !Array.isArray(obj.errors) || typeof obj.metadata !== 'object' || obj.metadata === null) {
return false;
}
// Check output_type discriminator
const outputType = obj.output_type;
return outputType === 'loop3' || outputType === 'loop2' || outputType === 'product_owner';
}
//# sourceMappingURL=agent-output.js.map