@emmahyde/thinking-patterns
Version:
MCP server combining systematic thinking, mental models, debugging approaches, and stochastic algorithms for comprehensive cognitive pattern support
1,317 lines • 52.3 kB
TypeScript
import { z } from 'zod';
/**
* Temporal Thinking Schema
*
* Defines the structure for temporal reasoning and state-based modeling.
* Includes state machines, event handling, transition analysis, temporal
* constraints, and validation frameworks for time-dependent systems.
*/
export declare const StatePropertiesSchema: z.ZodObject<{
isInitial: z.ZodOptional<z.ZodBoolean>;
isFinal: z.ZodOptional<z.ZodBoolean>;
isStable: z.ZodOptional<z.ZodBoolean>;
duration: z.ZodOptional<z.ZodObject<{
min: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodString>;
typical: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}>>;
capacity: z.ZodOptional<z.ZodNumber>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}>;
export declare const StateSchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
isInitial: z.ZodOptional<z.ZodBoolean>;
isFinal: z.ZodOptional<z.ZodBoolean>;
isStable: z.ZodOptional<z.ZodBoolean>;
duration: z.ZodOptional<z.ZodObject<{
min: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodString>;
typical: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}>>;
capacity: z.ZodOptional<z.ZodNumber>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}>>;
invariants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
entryActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
exitActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
subStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
parentState: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}, {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}>;
export declare const EventPropertiesSchema: z.ZodObject<{
type: z.ZodOptional<z.ZodEnum<["internal", "external", "timer", "condition"]>>;
frequency: z.ZodOptional<z.ZodString>;
predictability: z.ZodOptional<z.ZodEnum<["deterministic", "stochastic", "unpredictable"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
cost: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}>;
export declare const EventSchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
type: z.ZodOptional<z.ZodEnum<["internal", "external", "timer", "condition"]>>;
frequency: z.ZodOptional<z.ZodString>;
predictability: z.ZodOptional<z.ZodEnum<["deterministic", "stochastic", "unpredictable"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
cost: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}>>;
preconditions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
type: z.ZodString;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: string;
name: string;
description?: string | undefined;
}, {
type: string;
name: string;
description?: string | undefined;
}>, "many">>;
triggers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}, {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}>;
export declare const TransitionPropertiesSchema: z.ZodObject<{
probability: z.ZodOptional<z.ZodNumber>;
duration: z.ZodOptional<z.ZodString>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
reversible: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}>;
export declare const TransitionSchema: z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
event: z.ZodString;
guard: z.ZodOptional<z.ZodString>;
action: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
probability: z.ZodOptional<z.ZodNumber>;
duration: z.ZodOptional<z.ZodString>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
reversible: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}>>;
sideEffects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
rollbackActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}, {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}>;
export declare const TemporalAnalysisSchema: z.ZodObject<{
reachability: z.ZodOptional<z.ZodObject<{
reachableStates: z.ZodArray<z.ZodString, "many">;
unreachableStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
deadlockStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
}, {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
}>>;
cycles: z.ZodOptional<z.ZodArray<z.ZodObject<{
states: z.ZodArray<z.ZodString, "many">;
type: z.ZodEnum<["simple", "complex", "self-loop"]>;
length: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}, {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}>, "many">>;
criticalPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
path: z.ZodArray<z.ZodString, "many">;
duration: z.ZodOptional<z.ZodString>;
probability: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}, {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}>, "many">>;
bottlenecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
state: z.ZodString;
reason: z.ZodString;
impact: z.ZodEnum<["low", "medium", "high"]>;
}, "strip", z.ZodTypeAny, {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}, {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
}, {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
}>;
export declare const ValidationResultsSchema: z.ZodObject<{
isValid: z.ZodBoolean;
completeness: z.ZodNumber;
consistency: z.ZodNumber;
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
type: z.ZodEnum<["error", "warning", "suggestion"]>;
description: z.ZodString;
location: z.ZodOptional<z.ZodString>;
severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
}, "strip", z.ZodTypeAny, {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}, {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}>, "many">>;
suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
}, {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
}>;
export declare const ActorSchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodEnum<["user", "system", "service", "database", "external"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}>;
export declare const SequenceStepSchema: z.ZodObject<{
id: z.ZodString;
from: z.ZodString;
to: z.ZodString;
message: z.ZodString;
type: z.ZodOptional<z.ZodEnum<["sync", "async", "return", "create", "destroy", "note"]>>;
timestamp: z.ZodOptional<z.ZodString>;
condition: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}>;
export declare const SequenceDiagramSchema: z.ZodObject<{
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
actors: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodEnum<["user", "system", "service", "database", "external"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}>, "many">;
steps: z.ZodArray<z.ZodObject<{
id: z.ZodString;
from: z.ZodString;
to: z.ZodString;
message: z.ZodString;
type: z.ZodOptional<z.ZodEnum<["sync", "async", "return", "create", "destroy", "note"]>>;
timestamp: z.ZodOptional<z.ZodString>;
condition: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}>, "many">;
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
mermaidSyntax: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
steps: {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}[];
title: string;
actors: {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}[];
description?: string | undefined;
notes?: string[] | undefined;
mermaidSyntax?: string | undefined;
}, {
steps: {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}[];
title: string;
actors: {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}[];
description?: string | undefined;
notes?: string[] | undefined;
mermaidSyntax?: string | undefined;
}>;
export declare const TemporalThinkingSchema: z.ZodObject<{
context: z.ZodString;
modelId: z.ZodOptional<z.ZodString>;
domain: z.ZodOptional<z.ZodString>;
purpose: z.ZodOptional<z.ZodString>;
initialState: z.ZodString;
states: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
isInitial: z.ZodOptional<z.ZodBoolean>;
isFinal: z.ZodOptional<z.ZodBoolean>;
isStable: z.ZodOptional<z.ZodBoolean>;
duration: z.ZodOptional<z.ZodObject<{
min: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodString>;
typical: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}, {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
}>>;
capacity: z.ZodOptional<z.ZodNumber>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}, {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
}>>;
invariants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
entryActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
exitActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
subStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
parentState: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}, {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}>, "many">;
events: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
type: z.ZodOptional<z.ZodEnum<["internal", "external", "timer", "condition"]>>;
frequency: z.ZodOptional<z.ZodString>;
predictability: z.ZodOptional<z.ZodEnum<["deterministic", "stochastic", "unpredictable"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
cost: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}, {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
}>>;
preconditions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
type: z.ZodString;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: string;
name: string;
description?: string | undefined;
}, {
type: string;
name: string;
description?: string | undefined;
}>, "many">>;
triggers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}, {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}>, "many">;
transitions: z.ZodArray<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
event: z.ZodString;
guard: z.ZodOptional<z.ZodString>;
action: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodObject<{
probability: z.ZodOptional<z.ZodNumber>;
duration: z.ZodOptional<z.ZodString>;
cost: z.ZodOptional<z.ZodNumber>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
reversible: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}, {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
}>>;
sideEffects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
rollbackActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}, {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}>, "many">;
finalStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
sequenceDiagram: z.ZodOptional<z.ZodObject<{
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
actors: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodEnum<["user", "system", "service", "database", "external"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}, {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}>, "many">;
steps: z.ZodArray<z.ZodObject<{
id: z.ZodString;
from: z.ZodString;
to: z.ZodString;
message: z.ZodString;
type: z.ZodOptional<z.ZodEnum<["sync", "async", "return", "create", "destroy", "note"]>>;
timestamp: z.ZodOptional<z.ZodString>;
condition: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}, {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}>, "many">;
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
mermaidSyntax: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
steps: {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}[];
title: string;
actors: {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}[];
description?: string | undefined;
notes?: string[] | undefined;
mermaidSyntax?: string | undefined;
}, {
steps: {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}[];
title: string;
actors: {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}[];
description?: string | undefined;
notes?: string[] | undefined;
mermaidSyntax?: string | undefined;
}>>;
generateSequenceDiagram: z.ZodOptional<z.ZodBoolean>;
analysis: z.ZodOptional<z.ZodObject<{
reachability: z.ZodOptional<z.ZodObject<{
reachableStates: z.ZodArray<z.ZodString, "many">;
unreachableStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
deadlockStates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
}, {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
}>>;
cycles: z.ZodOptional<z.ZodArray<z.ZodObject<{
states: z.ZodArray<z.ZodString, "many">;
type: z.ZodEnum<["simple", "complex", "self-loop"]>;
length: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}, {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}>, "many">>;
criticalPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
path: z.ZodArray<z.ZodString, "many">;
duration: z.ZodOptional<z.ZodString>;
probability: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}, {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}>, "many">>;
bottlenecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
state: z.ZodString;
reason: z.ZodString;
impact: z.ZodEnum<["low", "medium", "high"]>;
}, "strip", z.ZodTypeAny, {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}, {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
}, {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
}>>;
validation: z.ZodOptional<z.ZodObject<{
isValid: z.ZodBoolean;
completeness: z.ZodNumber;
consistency: z.ZodNumber;
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
type: z.ZodEnum<["error", "warning", "suggestion"]>;
description: z.ZodString;
location: z.ZodOptional<z.ZodString>;
severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
}, "strip", z.ZodTypeAny, {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}, {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}>, "many">>;
suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
}, {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
}>>;
globalConstraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
timeConstraints: z.ZodOptional<z.ZodArray<z.ZodObject<{
description: z.ZodString;
type: z.ZodEnum<["deadline", "duration", "interval", "frequency"]>;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "duration" | "frequency" | "deadline" | "interval";
description: string;
value: string;
}, {
type: "duration" | "frequency" | "deadline" | "interval";
description: string;
value: string;
}>, "many">>;
scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
initialConditions: z.ZodArray<z.ZodString, "many">;
expectedOutcome: z.ZodOptional<z.ZodString>;
testSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
initialConditions: string[];
expectedOutcome?: string | undefined;
testSteps?: string[] | undefined;
}, {
description: string;
name: string;
initialConditions: string[];
expectedOutcome?: string | undefined;
testSteps?: string[] | undefined;
}>, "many">>;
complexity: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "very-high"]>>;
completeness: z.ZodOptional<z.ZodNumber>;
lastModified: z.ZodOptional<z.ZodString>;
version: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
context: string;
states: {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}[];
initialState: string;
events: {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}[];
transitions: {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}[];
validation?: {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
} | undefined;
complexity?: "low" | "medium" | "high" | "very-high" | undefined;
analysis?: {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
} | undefined;
domain?: string | undefined;
completeness?: number | undefined;
purpose?: string | undefined;
tags?: string[] | undefined;
lastModified?: string | undefined;
version?: string | undefined;
modelId?: string | undefined;
finalStates?: string[] | undefined;
sequenceDiagram?: {
steps: {
message: string;
id: string;
from: string;
to: string;
type?: "create" | "sync" | "async" | "return" | "destroy" | "note" | undefined;
duration?: string | undefined;
timestamp?: string | undefined;
condition?: string | undefined;
}[];
title: string;
actors: {
name: string;
type?: "external" | "user" | "system" | "service" | "database" | undefined;
description?: string | undefined;
}[];
description?: string | undefined;
notes?: string[] | undefined;
mermaidSyntax?: string | undefined;
} | undefined;
generateSequenceDiagram?: boolean | undefined;
globalConstraints?: string[] | undefined;
timeConstraints?: {
type: "duration" | "frequency" | "deadline" | "interval";
description: string;
value: string;
}[] | undefined;
scenarios?: {
description: string;
name: string;
initialConditions: string[];
expectedOutcome?: string | undefined;
testSteps?: string[] | undefined;
}[] | undefined;
}, {
context: string;
states: {
name: string;
properties?: {
duration?: {
min?: string | undefined;
max?: string | undefined;
typical?: string | undefined;
} | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
isInitial?: boolean | undefined;
isFinal?: boolean | undefined;
isStable?: boolean | undefined;
capacity?: number | undefined;
cost?: number | undefined;
} | undefined;
description?: string | undefined;
invariants?: string[] | undefined;
entryActions?: string[] | undefined;
exitActions?: string[] | undefined;
subStates?: string[] | undefined;
parentState?: string | undefined;
}[];
initialState: string;
events: {
name: string;
properties?: {
type?: "condition" | "external" | "internal" | "timer" | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
frequency?: string | undefined;
cost?: number | undefined;
predictability?: "deterministic" | "stochastic" | "unpredictable" | undefined;
} | undefined;
description?: string | undefined;
parameters?: {
type: string;
name: string;
description?: string | undefined;
}[] | undefined;
preconditions?: string[] | undefined;
triggers?: string[] | undefined;
}[];
transitions: {
from: string;
to: string;
event: string;
properties?: {
duration?: string | undefined;
priority?: "low" | "medium" | "high" | "critical" | undefined;
probability?: number | undefined;
cost?: number | undefined;
reversible?: boolean | undefined;
} | undefined;
action?: string | undefined;
guard?: string | undefined;
sideEffects?: string[] | undefined;
rollbackActions?: string[] | undefined;
}[];
validation?: {
completeness: number;
consistency: number;
isValid: boolean;
issues?: {
type: "suggestion" | "error" | "warning";
description: string;
severity: "low" | "medium" | "high" | "critical";
location?: string | undefined;
}[] | undefined;
suggestions?: string[] | undefined;
} | undefined;
complexity?: "low" | "medium" | "high" | "very-high" | undefined;
analysis?: {
reachability?: {
reachableStates: string[];
unreachableStates?: string[] | undefined;
deadlockStates?: string[] | undefined;
} | undefined;
cycles?: {
type: "simple" | "complex" | "self-loop";
length: number;
states: string[];
}[] | undefined;
criticalPaths?: {
path: string[];
duration?: string | undefined;
probability?: number | undefined;
}[] | undefined;
bottlenecks?: {
impact: "low" | "medium" | "high";
state: string;
reason: string;
}[] | undefined;
} | undefined;
domain?: string | undefined;
completeness?: number