import { type Static, Type } from "typebox"; export declare const AUDIENCE_VALUES: readonly ["orchestrator-only", "subagent", "any"]; export type AudienceValue = (typeof AUDIENCE_VALUES)[number]; export declare const WorkflowFrontmatterSchema: Type.TObject<{ audience: Type.TOptional, Type.TLiteral<"subagent">, Type.TLiteral<"any">]>>; deps: Type.TOptional>; }>>; }>; export type WorkflowFrontmatter = Static; export interface LoadedWorkflow { filePath: string; rawMarkdown: string; frontmatter: WorkflowFrontmatter; /** Resolved audience; defaults to "any" when the key is absent. */ audience: AudienceValue; } export type WorkflowLoaderErrorCode = "missing_file" | "invalid_frontmatter" | "validation_failed"; export declare class WorkflowLoaderError extends Error { readonly code: WorkflowLoaderErrorCode; constructor(code: WorkflowLoaderErrorCode, message: string); } /** * Parse the YAML-like frontmatter of a workflow markdown file. * * Returns `{}` if the file does not start with `---`. * Throws `WorkflowLoaderError("invalid_frontmatter", ...)` on malformed YAML. */ export declare function parseWorkflowFrontmatter(rawMarkdown: string): WorkflowFrontmatter; /** * Extract the audience value from a parsed WorkflowFrontmatter. * Returns "any" when the key is absent or has an unrecognised value. */ export declare function extractAudience(frontmatter: WorkflowFrontmatter): AudienceValue; /** * Load and parse a materialized workflow markdown file. * * Throws `WorkflowLoaderError("missing_file", ...)` if the file is absent or unreadable. * Throws `WorkflowLoaderError("invalid_frontmatter", ...)` if frontmatter is malformed. */ export declare function loadWorkflow(workflowPath: string): LoadedWorkflow;