UNPKG

@cyqlelabs/mcp-dual-cycle-reasoner

Version:

MCP server implementing dual-cycle metacognitive reasoning framework for autonomous agents

350 lines (349 loc) 13.8 kB
import { z } from 'zod'; export declare const SentinelConfigSchema: z.ZodObject<{ progress_indicators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; min_actions_for_detection: z.ZodDefault<z.ZodNumber>; alternating_threshold: z.ZodDefault<z.ZodNumber>; repetition_threshold: z.ZodDefault<z.ZodNumber>; progress_threshold_adjustment: z.ZodDefault<z.ZodNumber>; statistical_analysis: z.ZodOptional<z.ZodObject<{ entropy_threshold: z.ZodDefault<z.ZodNumber>; variance_threshold: z.ZodDefault<z.ZodNumber>; trend_threshold: z.ZodDefault<z.ZodNumber>; cyclicity_threshold: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { entropy_threshold: number; variance_threshold: number; trend_threshold: number; cyclicity_threshold: number; }, { entropy_threshold?: number | undefined; variance_threshold?: number | undefined; trend_threshold?: number | undefined; cyclicity_threshold?: number | undefined; }>>; semantic_intents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { progress_indicators: string[]; min_actions_for_detection: number; alternating_threshold: number; repetition_threshold: number; progress_threshold_adjustment: number; semantic_intents: string[]; statistical_analysis?: { entropy_threshold: number; variance_threshold: number; trend_threshold: number; cyclicity_threshold: number; } | undefined; }, { progress_indicators?: string[] | undefined; min_actions_for_detection?: number | undefined; alternating_threshold?: number | undefined; repetition_threshold?: number | undefined; progress_threshold_adjustment?: number | undefined; statistical_analysis?: { entropy_threshold?: number | undefined; variance_threshold?: number | undefined; trend_threshold?: number | undefined; cyclicity_threshold?: number | undefined; } | undefined; semantic_intents?: string[] | undefined; }>; export declare const AgentActionSchema: z.ZodObject<{ type: z.ZodString; timestamp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; result: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: string; timestamp: number; result?: string | undefined; }, { type: string; timestamp?: number | undefined; result?: string | undefined; }>; export declare const EnvironmentStateSchema: z.ZodObject<{ context: z.ZodOptional<z.ZodString>; timestamp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { timestamp: number; context?: string | undefined; }, { timestamp?: number | undefined; context?: string | undefined; }>; export declare const CognitiveTraceSchema: z.ZodObject<{ last_action: z.ZodString; current_context: z.ZodOptional<z.ZodString>; goal: z.ZodString; }, "strip", z.ZodTypeAny, { last_action: string; goal: string; current_context?: string | undefined; }, { last_action: string; goal: string; current_context?: string | undefined; }>; export declare const LoopTypeSchema: z.ZodEnum<["action_repetition", "state_invariance", "progress_stagnation"]>; export declare const LoopDetectionDetailsSchema: z.ZodObject<{ dominant_method: z.ZodOptional<z.ZodString>; anomaly_score: z.ZodOptional<z.ZodNumber>; actions_involved_count: z.ZodOptional<z.ZodNumber>; recent_actions_count: z.ZodOptional<z.ZodNumber>; metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, "strip", z.ZodTypeAny, { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }, { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }>; export declare const LoopDetectionResultSchema: z.ZodObject<{ detected: z.ZodBoolean; type: z.ZodOptional<z.ZodEnum<["action_repetition", "state_invariance", "progress_stagnation"]>>; confidence: z.ZodNumber; details: z.ZodObject<{ dominant_method: z.ZodOptional<z.ZodString>; anomaly_score: z.ZodOptional<z.ZodNumber>; actions_involved_count: z.ZodOptional<z.ZodNumber>; recent_actions_count: z.ZodOptional<z.ZodNumber>; metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, "strip", z.ZodTypeAny, { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }, { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }>; actions_involved: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; statistical_metrics: z.ZodOptional<z.ZodObject<{ entropy_score: z.ZodOptional<z.ZodNumber>; variance_score: z.ZodOptional<z.ZodNumber>; trend_score: z.ZodOptional<z.ZodNumber>; cyclicity_score: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { entropy_score?: number | undefined; variance_score?: number | undefined; trend_score?: number | undefined; cyclicity_score?: number | undefined; }, { entropy_score?: number | undefined; variance_score?: number | undefined; trend_score?: number | undefined; cyclicity_score?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { detected: boolean; confidence: number; details: { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }; type?: "action_repetition" | "state_invariance" | "progress_stagnation" | undefined; actions_involved?: string[] | undefined; statistical_metrics?: { entropy_score?: number | undefined; variance_score?: number | undefined; trend_score?: number | undefined; cyclicity_score?: number | undefined; } | undefined; }, { detected: boolean; confidence: number; details: { dominant_method?: string | undefined; anomaly_score?: number | undefined; actions_involved_count?: number | undefined; recent_actions_count?: number | undefined; metrics?: Record<string, any> | undefined; }; type?: "action_repetition" | "state_invariance" | "progress_stagnation" | undefined; actions_involved?: string[] | undefined; statistical_metrics?: { entropy_score?: number | undefined; variance_score?: number | undefined; trend_score?: number | undefined; cyclicity_score?: number | undefined; } | undefined; }>; export declare const CaseSchema: z.ZodObject<{ id: z.ZodDefault<z.ZodOptional<z.ZodString>>; problem_description: z.ZodString; solution: z.ZodString; outcome: z.ZodBoolean; timestamp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; context: z.ZodOptional<z.ZodString>; difficulty_level: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; success_rate: z.ZodOptional<z.ZodNumber>; usage_count: z.ZodDefault<z.ZodNumber>; confidence_score: z.ZodOptional<z.ZodNumber>; validation_score: z.ZodOptional<z.ZodNumber>; semantic_features: z.ZodOptional<z.ZodObject<{ intents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; sentiment: z.ZodOptional<z.ZodEnum<["positive", "negative", "neutral"]>>; keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { intents?: string[] | undefined; sentiment?: "positive" | "negative" | "neutral" | undefined; keywords?: string[] | undefined; }, { intents?: string[] | undefined; sentiment?: "positive" | "negative" | "neutral" | undefined; keywords?: string[] | undefined; }>>; similarity_metrics: z.ZodOptional<z.ZodObject<{ semantic_similarity: z.ZodOptional<z.ZodNumber>; jaccard_similarity: z.ZodOptional<z.ZodNumber>; cosine_similarity: z.ZodOptional<z.ZodNumber>; combined_similarity: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { semantic_similarity?: number | undefined; jaccard_similarity?: number | undefined; cosine_similarity?: number | undefined; combined_similarity?: number | undefined; }, { semantic_similarity?: number | undefined; jaccard_similarity?: number | undefined; cosine_similarity?: number | undefined; combined_similarity?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { timestamp: number; id: string; problem_description: string; solution: string; outcome: boolean; usage_count: number; context?: string | undefined; difficulty_level?: "low" | "medium" | "high" | undefined; success_rate?: number | undefined; confidence_score?: number | undefined; validation_score?: number | undefined; semantic_features?: { intents?: string[] | undefined; sentiment?: "positive" | "negative" | "neutral" | undefined; keywords?: string[] | undefined; } | undefined; similarity_metrics?: { semantic_similarity?: number | undefined; jaccard_similarity?: number | undefined; cosine_similarity?: number | undefined; combined_similarity?: number | undefined; } | undefined; }, { problem_description: string; solution: string; outcome: boolean; timestamp?: number | undefined; context?: string | undefined; id?: string | undefined; difficulty_level?: "low" | "medium" | "high" | undefined; success_rate?: number | undefined; usage_count?: number | undefined; confidence_score?: number | undefined; validation_score?: number | undefined; semantic_features?: { intents?: string[] | undefined; sentiment?: "positive" | "negative" | "neutral" | undefined; keywords?: string[] | undefined; } | undefined; similarity_metrics?: { semantic_similarity?: number | undefined; jaccard_similarity?: number | undefined; cosine_similarity?: number | undefined; combined_similarity?: number | undefined; } | undefined; }>; export declare const MonitorCognitiveTraceInputSchema: z.ZodObject<{ last_action: z.ZodString; current_context: z.ZodOptional<z.ZodString>; goal: z.ZodString; window_size: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { last_action: string; goal: string; window_size: number; current_context?: string | undefined; }, { last_action: string; goal: string; current_context?: string | undefined; window_size?: number | undefined; }>; export declare const DetectLoopInputSchema: z.ZodObject<{ current_context: z.ZodOptional<z.ZodString>; goal: z.ZodString; detection_method: z.ZodDefault<z.ZodEnum<["statistical", "pattern", "hybrid"]>>; }, "strip", z.ZodTypeAny, { goal: string; detection_method: "statistical" | "pattern" | "hybrid"; current_context?: string | undefined; }, { goal: string; current_context?: string | undefined; detection_method?: "statistical" | "pattern" | "hybrid" | undefined; }>; export declare const StoreExperienceInputSchema: z.ZodObject<{ problem_description: z.ZodString; solution: z.ZodString; outcome: z.ZodBoolean; context: z.ZodOptional<z.ZodString>; difficulty_level: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; }, "strip", z.ZodTypeAny, { problem_description: string; solution: string; outcome: boolean; context?: string | undefined; difficulty_level?: "low" | "medium" | "high" | undefined; }, { problem_description: string; solution: string; outcome: boolean; context?: string | undefined; difficulty_level?: "low" | "medium" | "high" | undefined; }>; export declare const RetrieveSimilarCasesInputSchema: z.ZodObject<{ problem_description: z.ZodString; max_results: z.ZodDefault<z.ZodNumber>; context_filter: z.ZodOptional<z.ZodString>; difficulty_filter: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; outcome_filter: z.ZodOptional<z.ZodBoolean>; min_similarity: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { problem_description: string; max_results: number; min_similarity: number; context_filter?: string | undefined; difficulty_filter?: "low" | "medium" | "high" | undefined; outcome_filter?: boolean | undefined; }, { problem_description: string; max_results?: number | undefined; context_filter?: string | undefined; difficulty_filter?: "low" | "medium" | "high" | undefined; outcome_filter?: boolean | undefined; min_similarity?: number | undefined; }>; export type AgentAction = z.infer<typeof AgentActionSchema>; export type EnvironmentState = z.infer<typeof EnvironmentStateSchema>; export type CognitiveTrace = z.infer<typeof CognitiveTraceSchema>; export type LoopType = z.infer<typeof LoopTypeSchema>; export type LoopDetectionResult = z.infer<typeof LoopDetectionResultSchema>; export type Case = z.infer<typeof CaseSchema>; export type SentinelConfig = z.infer<typeof SentinelConfigSchema>;