Skip to main content
Glama

π“‚€π“’π“‹Ήπ”Έβ„•π•Œπ”Ήπ•€π•Šπ“‹Ήπ“’π“‚€ - Intelligent Guidance for

by Hive-Academy
workflow-execution-state.schema.tsβ€’1.92 kB
// Workflow Execution State schema and interface with Zod validation import { z } from 'zod'; // ----------------------------------------------------------------------------- // 1. TypeScript Interface // ----------------------------------------------------------------------------- export interface WorkflowExecutionState { phase: 'initialized' | 'in-progress' | 'role_transitioned' | 'completed'; currentContext?: Record<string, unknown>; currentStep?: { id: string; name: string; sequenceNumber: number; assignedAt: string; // ISO-8601 }; lastCompletedStep?: { id: string; completedAt: string; result: 'success' | 'failure'; }; lastTransition?: { newRoleId: string; timestamp: string; handoffMessage?: string; }; progressMarkers?: string[]; lastProgressUpdate?: string; } // ----------------------------------------------------------------------------- // 2. Zod Schema (runtime validation) // ----------------------------------------------------------------------------- export const WorkflowExecutionStateSchema = z.object({ phase: z.string(), currentContext: z.record(z.unknown()).optional(), currentStep: z .object({ id: z.string(), name: z.string(), sequenceNumber: z.number().int(), assignedAt: z.string(), }) .optional(), lastCompletedStep: z .object({ id: z.string(), completedAt: z.string(), result: z.enum(['success', 'failure']), }) .optional(), lastTransition: z .object({ newRoleId: z.string(), timestamp: z.string(), handoffMessage: z.string().optional(), }) .optional(), progressMarkers: z.array(z.string()).optional(), lastProgressUpdate: z.string().optional(), }); // Helper alias for inferred type (ensures consistency if schema changes) export type WorkflowExecutionStateType = z.infer< typeof WorkflowExecutionStateSchema >;

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hive-Academy/Anubis-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server