import { z } from 'zod';

declare const SectionSchema: z.ZodObject<{
    title: z.ZodString;
    content: z.ZodOptional<z.ZodString>;
    list: z.ZodOptional<z.ZodEnum<{
        agents: "agents";
        workflow: "workflow";
        validations: "validations";
        guardrails: "guardrails";
    }>>;
}, z.core.$loose>;
type Section = z.infer<typeof SectionSchema>;
declare const RuleSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodOptional<z.ZodString>;
    description: z.ZodString;
    severity: z.ZodEnum<{
        optional: "optional";
        mandatory: "mandatory";
        recommended: "recommended";
    }>;
    detection_method: z.ZodOptional<z.ZodString>;
    escalation: z.ZodOptional<z.ZodString>;
    ref: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type Rule = z.infer<typeof RuleSchema>;
declare const EscalationCriterionSchema: z.ZodObject<{
    condition: z.ZodString;
    action: z.ZodEnum<{
        stop_and_report: "stop_and_report";
        report_to_architect: "report_to_architect";
        wait_for_approval: "wait_for_approval";
    }>;
}, z.core.$loose>;
type EscalationCriterion = z.infer<typeof EscalationCriterionSchema>;
declare const PrerequisiteSchema: z.ZodObject<{
    action: z.ZodEnum<{
        read: "read";
        execute: "execute";
    }>;
    target: z.ZodString;
    required: z.ZodBoolean;
}, z.core.$loose>;
type Prerequisite = z.infer<typeof PrerequisiteSchema>;
declare const AgentSchema: z.ZodObject<{
    role_name: z.ZodString;
    purpose: z.ZodString;
    own_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_read_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_write_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_execute_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_perform_validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_invoke_agents: z.ZodDefault<z.ZodArray<z.ZodString>>;
    can_return_handoffs: z.ZodDefault<z.ZodArray<z.ZodString>>;
    dispatch_only: z.ZodOptional<z.ZodBoolean>;
    mode: z.ZodOptional<z.ZodEnum<{
        "read-only": "read-only";
        "read-write": "read-write";
    }>>;
    responsibilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
    constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
    rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodOptional<z.ZodString>;
        description: z.ZodString;
        severity: z.ZodEnum<{
            optional: "optional";
            mandatory: "mandatory";
            recommended: "recommended";
        }>;
        detection_method: z.ZodOptional<z.ZodString>;
        escalation: z.ZodOptional<z.ZodString>;
        ref: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>>;
    anti_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
    escalation_criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
        condition: z.ZodString;
        action: z.ZodEnum<{
            stop_and_report: "stop_and_report";
            report_to_architect: "report_to_architect";
            wait_for_approval: "wait_for_approval";
        }>;
    }, z.core.$loose>>>;
    sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
        title: z.ZodString;
        content: z.ZodOptional<z.ZodString>;
        list: z.ZodOptional<z.ZodEnum<{
            agents: "agents";
            workflow: "workflow";
            validations: "validations";
            guardrails: "guardrails";
        }>>;
    }, z.core.$loose>>>;
    prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
        action: z.ZodEnum<{
            read: "read";
            execute: "execute";
        }>;
        target: z.ZodString;
        required: z.ZodBoolean;
    }, z.core.$loose>>>;
    guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type Agent = z.infer<typeof AgentSchema>;

declare const ArtifactSchema: z.ZodObject<{
    type: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    owner: z.ZodOptional<z.ZodString>;
    producers: z.ZodDefault<z.ZodArray<z.ZodString>>;
    editors: z.ZodDefault<z.ZodArray<z.ZodString>>;
    consumers: z.ZodDefault<z.ZodArray<z.ZodString>>;
    states: z.ZodDefault<z.ZodArray<z.ZodString>>;
    required_validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
    visibility: z.ZodOptional<z.ZodString>;
    classification: z.ZodOptional<z.ZodString>;
    guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
    authority: z.ZodOptional<z.ZodEnum<{
        canonical: "canonical";
        derived: "derived";
        generated: "generated";
        control: "control";
    }>>;
    path_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
    exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
    manual_edit: z.ZodOptional<z.ZodEnum<{
        allowed: "allowed";
        discouraged: "discouraged";
        forbidden: "forbidden";
    }>>;
    change_control: z.ZodOptional<z.ZodEnum<{
        none: "none";
        "approval-required": "approval-required";
        "regeneration-required": "regeneration-required";
    }>>;
}, z.core.$loose>;
type Artifact = z.infer<typeof ArtifactSchema>;

declare const MatcherSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"command_regex">;
    pattern: z.ZodString;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"content_regex">;
    pattern: z.ZodString;
    file_glob: z.ZodOptional<z.ZodString>;
    exclude_glob: z.ZodOptional<z.ZodString>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"file_glob">;
    pattern: z.ZodString;
    exclude_glob: z.ZodOptional<z.ZodString>;
}, z.core.$loose>], "type">;
type Matcher = z.infer<typeof MatcherSchema>;
declare const CheckSchema: z.ZodObject<{
    matcher: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"command_regex">;
        pattern: z.ZodString;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"content_regex">;
        pattern: z.ZodString;
        file_glob: z.ZodOptional<z.ZodString>;
        exclude_glob: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"file_glob">;
        pattern: z.ZodString;
        exclude_glob: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>], "type">>;
    script: z.ZodOptional<z.ZodString>;
    message: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type Check = z.infer<typeof CheckSchema>;
declare const BindingOutputSchema: z.ZodObject<{
    target: z.ZodString;
    template: z.ZodOptional<z.ZodString>;
    inline_template: z.ZodOptional<z.ZodString>;
    source: z.ZodOptional<z.ZodString>;
    mode: z.ZodDefault<z.ZodEnum<{
        write: "write";
        patch: "patch";
    }>>;
    format: z.ZodOptional<z.ZodEnum<{
        json: "json";
        yaml: "yaml";
        text: "text";
    }>>;
    patch_strategy: z.ZodOptional<z.ZodEnum<{
        deep_merge: "deep_merge";
        append: "append";
    }>>;
    array_merge_key: z.ZodOptional<z.ZodString>;
    group_by: z.ZodOptional<z.ZodString>;
    executable: z.ZodOptional<z.ZodBoolean>;
    skip_empty: z.ZodOptional<z.ZodBoolean>;
}, z.core.$loose>;
type BindingOutput = z.infer<typeof BindingOutputSchema>;
declare const ReportingSchema: z.ZodObject<{
    commands: z.ZodRecord<z.ZodString, z.ZodString>;
    fail_open: z.ZodDefault<z.ZodBoolean>;
    timeout_ms: z.ZodDefault<z.ZodNumber>;
}, z.core.$loose>;
type Reporting = z.infer<typeof ReportingSchema>;
declare const BindingRenderTargetSchema: z.ZodObject<{
    template: z.ZodOptional<z.ZodString>;
    inline_template: z.ZodOptional<z.ZodString>;
    context: z.ZodEnum<{
        workflow: "workflow";
        agent: "agent";
        task: "task";
        artifact: "artifact";
        tool: "tool";
        validation: "validation";
        handoff_type: "handoff_type";
        policy: "policy";
        guardrail: "guardrail";
        guardrail_policy: "guardrail_policy";
        system: "system";
        navigation_index: "navigation_index";
    }>;
    output: z.ZodString;
    include: z.ZodOptional<z.ZodArray<z.ZodString>>;
    exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
    skip_empty: z.ZodOptional<z.ZodBoolean>;
    executable: z.ZodOptional<z.ZodBoolean>;
}, z.core.$loose>;
type BindingRenderTarget = z.infer<typeof BindingRenderTargetSchema>;
declare const SoftwareBindingSchema: z.ZodObject<{
    software: z.ZodString;
    version: z.ZodLiteral<1>;
    extends: z.ZodOptional<z.ZodString>;
    guardrail_impl: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        checks: z.ZodArray<z.ZodObject<{
            matcher: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"command_regex">;
                pattern: z.ZodString;
            }, z.core.$loose>, z.ZodObject<{
                type: z.ZodLiteral<"content_regex">;
                pattern: z.ZodString;
                file_glob: z.ZodOptional<z.ZodString>;
                exclude_glob: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>, z.ZodObject<{
                type: z.ZodLiteral<"file_glob">;
                pattern: z.ZodString;
                exclude_glob: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>], "type">>;
            script: z.ZodOptional<z.ZodString>;
            message: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
    }, z.core.$strip>>>;
    outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        target: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
        inline_template: z.ZodOptional<z.ZodString>;
        source: z.ZodOptional<z.ZodString>;
        mode: z.ZodDefault<z.ZodEnum<{
            write: "write";
            patch: "patch";
        }>>;
        format: z.ZodOptional<z.ZodEnum<{
            json: "json";
            yaml: "yaml";
            text: "text";
        }>>;
        patch_strategy: z.ZodOptional<z.ZodEnum<{
            deep_merge: "deep_merge";
            append: "append";
        }>>;
        array_merge_key: z.ZodOptional<z.ZodString>;
        group_by: z.ZodOptional<z.ZodString>;
        executable: z.ZodOptional<z.ZodBoolean>;
        skip_empty: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$loose>>>;
    renders: z.ZodOptional<z.ZodArray<z.ZodObject<{
        template: z.ZodOptional<z.ZodString>;
        inline_template: z.ZodOptional<z.ZodString>;
        context: z.ZodEnum<{
            workflow: "workflow";
            agent: "agent";
            task: "task";
            artifact: "artifact";
            tool: "tool";
            validation: "validation";
            handoff_type: "handoff_type";
            policy: "policy";
            guardrail: "guardrail";
            guardrail_policy: "guardrail_policy";
            system: "system";
            navigation_index: "navigation_index";
        }>;
        output: z.ZodString;
        include: z.ZodOptional<z.ZodArray<z.ZodString>>;
        exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
        skip_empty: z.ZodOptional<z.ZodBoolean>;
        executable: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$loose>>>;
    reporting: z.ZodOptional<z.ZodObject<{
        commands: z.ZodRecord<z.ZodString, z.ZodString>;
        fail_open: z.ZodDefault<z.ZodBoolean>;
        timeout_ms: z.ZodDefault<z.ZodNumber>;
    }, z.core.$loose>>;
}, z.core.$loose>;
type SoftwareBinding = z.infer<typeof SoftwareBindingSchema>;

declare const CONTEXT_TYPES: readonly ["agent", "task", "artifact", "tool", "validation", "handoff_type", "workflow", "policy", "guardrail", "guardrail_policy", "system", "navigation_index"];
declare const ContextTypeSchema: z.ZodEnum<{
    workflow: "workflow";
    agent: "agent";
    task: "task";
    artifact: "artifact";
    tool: "tool";
    validation: "validation";
    handoff_type: "handoff_type";
    policy: "policy";
    guardrail: "guardrail";
    guardrail_policy: "guardrail_policy";
    system: "system";
    navigation_index: "navigation_index";
}>;
type ContextType = z.infer<typeof ContextTypeSchema>;
declare const ITERABLE_CONTEXT_TYPES: ("workflow" | "agent" | "task" | "artifact" | "tool" | "validation" | "handoff_type" | "policy" | "guardrail" | "guardrail_policy")[];

/**
 * Reusable schema components, following the OpenAPI `components` pattern.
 *
 * `schemas` is a map of named JSON Schema fragments that can be referenced
 * from anywhere in the document via `$ref: "#/components/schemas/<name>"`.
 */
declare const ComponentsSchema: z.ZodObject<{
    schemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
}, z.core.$loose>;
type Components = z.infer<typeof ComponentsSchema>;
declare const SCOPE_NODE_TYPES: readonly ["root", "system", "agent", "task", "execution_step", "artifact", "tool", "tool_command", "validation", "handoff_type", "workflow", "workflow_step", "policy", "guardrail", "guardrail_policy", "rule", "escalation_criterion", "prerequisite"];
type ScopeNodeType = (typeof SCOPE_NODE_TYPES)[number];
declare const ScopeNodeTypeSchema: z.ZodEnum<{
    workflow: "workflow";
    agent: "agent";
    task: "task";
    artifact: "artifact";
    tool: "tool";
    validation: "validation";
    handoff_type: "handoff_type";
    policy: "policy";
    guardrail: "guardrail";
    guardrail_policy: "guardrail_policy";
    system: "system";
    root: "root";
    execution_step: "execution_step";
    tool_command: "tool_command";
    workflow_step: "workflow_step";
    rule: "rule";
    escalation_criterion: "escalation_criterion";
    prerequisite: "prerequisite";
}>;
/**
 * Declaration of project-specific `x-*` extension fields.
 * Each key must start with `x-` and describes the expected type/shape
 * so that tooling can validate custom extensions in the future.
 */
declare const XExtensionDeclSchema: z.ZodObject<{
    type: z.ZodString;
    items: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        workflow: "workflow";
        agent: "agent";
        task: "task";
        artifact: "artifact";
        tool: "tool";
        validation: "validation";
        handoff_type: "handoff_type";
        policy: "policy";
        guardrail: "guardrail";
        guardrail_policy: "guardrail_policy";
        system: "system";
        root: "root";
        execution_step: "execution_step";
        tool_command: "tool_command";
        workflow_step: "workflow_step";
        rule: "rule";
        escalation_criterion: "escalation_criterion";
        prerequisite: "prerequisite";
    }>>>;
    schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    required: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
type XExtensionDecl = z.infer<typeof XExtensionDeclSchema>;
declare const DslSchema: z.ZodObject<{
    version: z.ZodLiteral<1>;
    extends: z.ZodOptional<z.ZodString>;
    system: z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        default_workflow_order: z.ZodArray<z.ZodString>;
        sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
            title: z.ZodString;
            content: z.ZodOptional<z.ZodString>;
            list: z.ZodOptional<z.ZodEnum<{
                agents: "agents";
                workflow: "workflow";
                validations: "validations";
                guardrails: "guardrails";
            }>>;
        }, z.core.$loose>>>;
        context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
        states: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>;
    agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        role_name: z.ZodString;
        purpose: z.ZodString;
        own_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_read_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_write_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_execute_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_perform_validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_invoke_agents: z.ZodDefault<z.ZodArray<z.ZodString>>;
        can_return_handoffs: z.ZodDefault<z.ZodArray<z.ZodString>>;
        dispatch_only: z.ZodOptional<z.ZodBoolean>;
        mode: z.ZodOptional<z.ZodEnum<{
            "read-only": "read-only";
            "read-write": "read-write";
        }>>;
        responsibilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
        constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
        rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodOptional<z.ZodString>;
            description: z.ZodString;
            severity: z.ZodEnum<{
                optional: "optional";
                mandatory: "mandatory";
                recommended: "recommended";
            }>;
            detection_method: z.ZodOptional<z.ZodString>;
            escalation: z.ZodOptional<z.ZodString>;
            ref: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>>;
        anti_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
        escalation_criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
            condition: z.ZodString;
            action: z.ZodEnum<{
                stop_and_report: "stop_and_report";
                report_to_architect: "report_to_architect";
                wait_for_approval: "wait_for_approval";
            }>;
        }, z.core.$loose>>>;
        sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
            title: z.ZodString;
            content: z.ZodOptional<z.ZodString>;
            list: z.ZodOptional<z.ZodEnum<{
                agents: "agents";
                workflow: "workflow";
                validations: "validations";
                guardrails: "guardrails";
            }>>;
        }, z.core.$loose>>>;
        prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
            action: z.ZodEnum<{
                read: "read";
                execute: "execute";
            }>;
            target: z.ZodString;
            required: z.ZodBoolean;
        }, z.core.$loose>>>;
        guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>>;
    tasks: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        description: z.ZodString;
        target_agent: z.ZodString;
        allowed_from_agents: z.ZodDefault<z.ZodArray<z.ZodString>>;
        workflow: z.ZodString;
        input_artifacts: z.ZodArray<z.ZodString>;
        invocation_handoff: z.ZodString;
        result_handoff: z.ZodString;
        default_priority: z.ZodOptional<z.ZodString>;
        responsibilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
        constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
        execution_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            action: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
            abort_on_failure: z.ZodOptional<z.ZodBoolean>;
            uses_tool: z.ZodOptional<z.ZodString>;
            produces_artifact: z.ZodOptional<z.ZodString>;
            reads_artifact: z.ZodOptional<z.ZodString>;
            validates_artifact: z.ZodOptional<z.ZodString>;
            validation_kind: z.ZodOptional<z.ZodEnum<{
                schema: "schema";
                mechanical: "mechanical";
                semantic: "semantic";
                approval: "approval";
                provenance: "provenance";
                traceability: "traceability";
                fidelity: "fidelity";
            }>>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
            skip_condition: z.ZodOptional<z.ZodString>;
            wait_for_approval: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$loose>>>;
        completion_criteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
        rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodOptional<z.ZodString>;
            description: z.ZodString;
            severity: z.ZodEnum<{
                optional: "optional";
                mandatory: "mandatory";
                recommended: "recommended";
            }>;
            detection_method: z.ZodOptional<z.ZodString>;
            escalation: z.ZodOptional<z.ZodString>;
            ref: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>>;
        anti_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
        escalation_criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
            condition: z.ZodString;
            action: z.ZodEnum<{
                stop_and_report: "stop_and_report";
                report_to_architect: "report_to_architect";
                wait_for_approval: "wait_for_approval";
            }>;
        }, z.core.$loose>>>;
        sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
            title: z.ZodString;
            content: z.ZodOptional<z.ZodString>;
            list: z.ZodOptional<z.ZodEnum<{
                agents: "agents";
                workflow: "workflow";
                validations: "validations";
                guardrails: "guardrails";
            }>>;
        }, z.core.$loose>>>;
        validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
        guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>>;
    artifacts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        type: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        owner: z.ZodOptional<z.ZodString>;
        producers: z.ZodDefault<z.ZodArray<z.ZodString>>;
        editors: z.ZodDefault<z.ZodArray<z.ZodString>>;
        consumers: z.ZodDefault<z.ZodArray<z.ZodString>>;
        states: z.ZodDefault<z.ZodArray<z.ZodString>>;
        required_validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
        visibility: z.ZodOptional<z.ZodString>;
        classification: z.ZodOptional<z.ZodString>;
        guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
        authority: z.ZodOptional<z.ZodEnum<{
            canonical: "canonical";
            derived: "derived";
            generated: "generated";
            control: "control";
        }>>;
        path_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
        exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
        manual_edit: z.ZodOptional<z.ZodEnum<{
            allowed: "allowed";
            discouraged: "discouraged";
            forbidden: "forbidden";
        }>>;
        change_control: z.ZodOptional<z.ZodEnum<{
            none: "none";
            "approval-required": "approval-required";
            "regeneration-required": "regeneration-required";
        }>>;
    }, z.core.$loose>>>;
    tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        kind: z.ZodOptional<z.ZodString>;
        extends: z.ZodOptional<z.ZodString>;
        command: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
        input_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
        output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
        invokable_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
        cli_contract: z.ZodOptional<z.ZodString>;
        artifact_bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
        side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
        commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
            command: z.ZodString;
            category: z.ZodString;
            reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
            writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
            purpose: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>>;
    validations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        target_artifact: z.ZodString;
        kind: z.ZodEnum<{
            schema: "schema";
            mechanical: "mechanical";
            semantic: "semantic";
            approval: "approval";
            provenance: "provenance";
            traceability: "traceability";
            fidelity: "fidelity";
        }>;
        executor_type: z.ZodOptional<z.ZodEnum<{
            agent: "agent";
            tool: "tool";
        }>>;
        executor: z.ZodOptional<z.ZodString>;
        blocking: z.ZodBoolean;
        produces_evidence: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>>;
    handoff_types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        version: z.ZodNumber;
        description: z.ZodOptional<z.ZodString>;
        schema: z.ZodRecord<z.ZodString, z.ZodAny>;
        example: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    }, z.core.$loose>>>;
    team_interface: z.ZodOptional<z.ZodObject<{
        version: z.ZodNumber;
        description: z.ZodOptional<z.ZodString>;
        accepts: z.ZodOptional<z.ZodObject<{
            workflows: z.ZodRecord<z.ZodString, z.ZodObject<{
                internal_workflow: z.ZodOptional<z.ZodString>;
                input_handoff: z.ZodString;
                output_handoff: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
        }, z.core.$loose>>;
        exposes: z.ZodOptional<z.ZodObject<{
            artifacts: z.ZodArray<z.ZodString>;
        }, z.core.$loose>>;
        constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>;
    imports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        interface: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>>;
    workflow: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        description: z.ZodOptional<z.ZodString>;
        entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
        trigger: z.ZodOptional<z.ZodString>;
        steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"delegate">;
            description: z.ZodOptional<z.ZodString>;
            task: z.ZodString;
            from_agent: z.ZodString;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
            max_retries: z.ZodOptional<z.ZodNumber>;
            max_follow_ups: z.ZodOptional<z.ZodNumber>;
            retry: z.ZodOptional<z.ZodObject<{
                condition: z.ZodString;
                fix_task: z.ZodString;
                revalidate_task: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
        }, z.core.$loose>, z.ZodObject<{
            type: z.ZodLiteral<"gate">;
            description: z.ZodOptional<z.ZodString>;
            gate_kind: z.ZodString;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$loose>, z.ZodObject<{
            type: z.ZodLiteral<"handoff">;
            description: z.ZodOptional<z.ZodString>;
            handoff_kind: z.ZodString;
            task: z.ZodOptional<z.ZodString>;
            from_agent: z.ZodOptional<z.ZodString>;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
            retry: z.ZodOptional<z.ZodObject<{
                condition: z.ZodString;
                fix_task: z.ZodString;
                revalidate_task: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
        }, z.core.$loose>, z.ZodObject<{
            type: z.ZodLiteral<"validation">;
            description: z.ZodOptional<z.ZodString>;
            validation: z.ZodString;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$loose>, z.ZodObject<{
            type: z.ZodLiteral<"decision">;
            description: z.ZodOptional<z.ZodString>;
            on: z.ZodOptional<z.ZodString>;
            routing_key: z.ZodOptional<z.ZodString>;
            branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$loose>, z.ZodObject<{
            type: z.ZodLiteral<"team_task">;
            description: z.ZodOptional<z.ZodString>;
            to_team: z.ZodString;
            workflow: z.ZodString;
            handoff: z.ZodString;
            expects: z.ZodString;
            group: z.ZodOptional<z.ZodString>;
            depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$loose>], "type">>;
        sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
            title: z.ZodString;
            content: z.ZodOptional<z.ZodString>;
            list: z.ZodOptional<z.ZodEnum<{
                agents: "agents";
                workflow: "workflow";
                validations: "validations";
                guardrails: "guardrails";
            }>>;
        }, z.core.$loose>>>;
        external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            kind: z.ZodEnum<{
                actor: "actor";
                participant: "participant";
            }>;
            label: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$loose>>>;
    policies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        when: z.ZodObject<{
            artifact_type: z.ZodOptional<z.ZodString>;
            workflow: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        requires_validations: z.ZodOptional<z.ZodArray<z.ZodString>>;
        requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>>;
    guardrails: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        description: z.ZodString;
        scope: z.ZodObject<{
            agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
            tasks: z.ZodOptional<z.ZodArray<z.ZodString>>;
            tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
            artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
            workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$loose>;
        rationale: z.ZodOptional<z.ZodString>;
        tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
        exemptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>>>;
    guardrail_policies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        description: z.ZodOptional<z.ZodString>;
        rules: z.ZodArray<z.ZodObject<{
            guardrail: z.ZodString;
            severity: z.ZodEnum<{
                mandatory: "mandatory";
                info: "info";
                critical: "critical";
                warning: "warning";
            }>;
            action: z.ZodUnion<readonly [z.ZodEnum<{
                block: "block";
                warn: "warn";
                shadow: "shadow";
                info: "info";
            }>, z.ZodObject<{
                default: z.ZodEnum<{
                    block: "block";
                    warn: "warn";
                    shadow: "shadow";
                    info: "info";
                }>;
                when: z.ZodRecord<z.ZodString, z.ZodEnum<{
                    block: "block";
                    warn: "warn";
                    shadow: "shadow";
                    info: "info";
                }>>;
            }, z.core.$strip>]>;
            allow_override: z.ZodDefault<z.ZodBoolean>;
            override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
            escalation: z.ZodOptional<z.ZodObject<{
                target: z.ZodString;
                condition: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
        }, z.core.$loose>>;
    }, z.core.$loose>>>;
    components: z.ZodDefault<z.ZodObject<{
        schemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
    }, z.core.$loose>>;
    extensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        type: z.ZodString;
        items: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
        scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            workflow: "workflow";
            agent: "agent";
            task: "task";
            artifact: "artifact";
            tool: "tool";
            validation: "validation";
            handoff_type: "handoff_type";
            policy: "policy";
            guardrail: "guardrail";
            guardrail_policy: "guardrail_policy";
            system: "system";
            root: "root";
            execution_step: "execution_step";
            tool_command: "tool_command";
            workflow_step: "workflow_step";
            rule: "rule";
            escalation_criterion: "escalation_criterion";
            prerequisite: "prerequisite";
        }>>>;
        schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
        required: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    extensions_strict: z.ZodDefault<z.ZodBoolean>;
}, z.core.$loose>;
type Dsl = z.infer<typeof DslSchema>;

/**
 * Zod schema for a handoff type definition.
 *
 * `schema` holds a JSON Schema object describing the full message structure
 * for this handoff type. It may use `allOf` to compose shared fragments
 * (e.g., from `components.schemas`) with type-specific properties.
 */
declare const HandoffTypeSchema: z.ZodObject<{
    version: z.ZodNumber;
    description: z.ZodOptional<z.ZodString>;
    schema: z.ZodRecord<z.ZodString, z.ZodAny>;
    example: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$loose>;
type HandoffType = z.infer<typeof HandoffTypeSchema>;

declare const GuardrailScopeSchema: z.ZodObject<{
    agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
    tasks: z.ZodOptional<z.ZodArray<z.ZodString>>;
    tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
    artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
    workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type GuardrailScope = z.infer<typeof GuardrailScopeSchema>;
declare const GuardrailSchema: z.ZodObject<{
    description: z.ZodString;
    scope: z.ZodObject<{
        agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
        tasks: z.ZodOptional<z.ZodArray<z.ZodString>>;
        tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
        artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
        workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>;
    rationale: z.ZodOptional<z.ZodString>;
    tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
    exemptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type Guardrail = z.infer<typeof GuardrailSchema>;
declare const GuardrailPolicyRuleEscalationSchema: z.ZodObject<{
    target: z.ZodString;
    condition: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type GuardrailPolicyRuleEscalation = z.infer<typeof GuardrailPolicyRuleEscalationSchema>;
declare const ActionEnum: z.ZodEnum<{
    block: "block";
    warn: "warn";
    shadow: "shadow";
    info: "info";
}>;
type ActionValue = z.infer<typeof ActionEnum>;
declare const ConditionalActionSchema: z.ZodObject<{
    default: z.ZodEnum<{
        block: "block";
        warn: "warn";
        shadow: "shadow";
        info: "info";
    }>;
    when: z.ZodRecord<z.ZodString, z.ZodEnum<{
        block: "block";
        warn: "warn";
        shadow: "shadow";
        info: "info";
    }>>;
}, z.core.$strip>;
type ConditionalAction = z.infer<typeof ConditionalActionSchema>;
declare const ActionSchema: z.ZodUnion<readonly [z.ZodEnum<{
    block: "block";
    warn: "warn";
    shadow: "shadow";
    info: "info";
}>, z.ZodObject<{
    default: z.ZodEnum<{
        block: "block";
        warn: "warn";
        shadow: "shadow";
        info: "info";
    }>;
    when: z.ZodRecord<z.ZodString, z.ZodEnum<{
        block: "block";
        warn: "warn";
        shadow: "shadow";
        info: "info";
    }>>;
}, z.core.$strip>]>;
type Action = z.infer<typeof ActionSchema>;
declare const GuardrailPolicyRuleSchema: z.ZodObject<{
    guardrail: z.ZodString;
    severity: z.ZodEnum<{
        mandatory: "mandatory";
        info: "info";
        critical: "critical";
        warning: "warning";
    }>;
    action: z.ZodUnion<readonly [z.ZodEnum<{
        block: "block";
        warn: "warn";
        shadow: "shadow";
        info: "info";
    }>, z.ZodObject<{
        default: z.ZodEnum<{
            block: "block";
            warn: "warn";
            shadow: "shadow";
            info: "info";
        }>;
        when: z.ZodRecord<z.ZodString, z.ZodEnum<{
            block: "block";
            warn: "warn";
            shadow: "shadow";
            info: "info";
        }>>;
    }, z.core.$strip>]>;
    allow_override: z.ZodDefault<z.ZodBoolean>;
    override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
    escalation: z.ZodOptional<z.ZodObject<{
        target: z.ZodString;
        condition: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
}, z.core.$loose>;
type GuardrailPolicyRule = z.infer<typeof GuardrailPolicyRuleSchema>;
declare const GuardrailPolicySchema: z.ZodObject<{
    description: z.ZodOptional<z.ZodString>;
    rules: z.ZodArray<z.ZodObject<{
        guardrail: z.ZodString;
        severity: z.ZodEnum<{
            mandatory: "mandatory";
            info: "info";
            critical: "critical";
            warning: "warning";
        }>;
        action: z.ZodUnion<readonly [z.ZodEnum<{
            block: "block";
            warn: "warn";
            shadow: "shadow";
            info: "info";
        }>, z.ZodObject<{
            default: z.ZodEnum<{
                block: "block";
                warn: "warn";
                shadow: "shadow";
                info: "info";
            }>;
            when: z.ZodRecord<z.ZodString, z.ZodEnum<{
                block: "block";
                warn: "warn";
                shadow: "shadow";
                info: "info";
            }>>;
        }, z.core.$strip>]>;
        allow_override: z.ZodDefault<z.ZodBoolean>;
        override_requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
        escalation: z.ZodOptional<z.ZodObject<{
            target: z.ZodString;
            condition: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
    }, z.core.$loose>>;
}, z.core.$loose>;
type GuardrailPolicy = z.infer<typeof GuardrailPolicySchema>;

type AnyRecord$1 = Record<string, unknown>;
/**
 * Recursively merge `allOf` arrays in a JSON Schema.
 *
 * Each `allOf` sub-schema is itself resolved first (handling nested
 * `allOf`), then `properties`, `required`, and top-level scalars are
 * merged. After merging, nested property schemas that contain their
 * own `allOf` are also resolved so the output is fully flattened.
 */
declare function resolveAllOf(schema: AnyRecord$1): AnyRecord$1;

declare const AppendOperatorSchema: z.ZodObject<{
    $append: z.ZodRecord<z.ZodString, z.ZodAny>;
}, z.core.$strip>;
type AppendOperator = z.infer<typeof AppendOperatorSchema>;
declare const PrependOperatorSchema: z.ZodObject<{
    $prepend: z.ZodRecord<z.ZodString, z.ZodAny>;
}, z.core.$strip>;
type PrependOperator = z.infer<typeof PrependOperatorSchema>;
declare const InsertAfterOperatorSchema: z.ZodObject<{
    $insert_after: z.ZodObject<{
        after: z.ZodString;
        entries: z.ZodRecord<z.ZodString, z.ZodAny>;
    }, z.core.$strip>;
}, z.core.$strip>;
type InsertAfterOperator = z.infer<typeof InsertAfterOperatorSchema>;
declare const ReplaceOperatorSchema: z.ZodObject<{
    $replace: z.ZodAny;
}, z.core.$strip>;
type ReplaceOperator = z.infer<typeof ReplaceOperatorSchema>;
declare const RemoveOperatorSchema: z.ZodObject<{
    $remove: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
        id: z.ZodString;
    }, z.core.$strip>]>>;
}, z.core.$strip>;
type RemoveOperator = z.infer<typeof RemoveOperatorSchema>;
type MergeableRecord<T> = Record<string, T> | {
    $append: Record<string, unknown>;
} | {
    $prepend: Record<string, unknown>;
} | {
    $insert_after: {
        after: string;
        entries: Record<string, unknown>;
    };
} | {
    $replace: unknown;
} | {
    $remove: (string | {
        id: string;
    })[];
};

declare const PolicyWhenSchema: z.ZodObject<{
    artifact_type: z.ZodOptional<z.ZodString>;
    workflow: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type PolicyWhen = z.infer<typeof PolicyWhenSchema>;
declare const PolicySchema: z.ZodObject<{
    when: z.ZodObject<{
        artifact_type: z.ZodOptional<z.ZodString>;
        workflow: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    requires_validations: z.ZodOptional<z.ZodArray<z.ZodString>>;
    requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type Policy = z.infer<typeof PolicySchema>;

declare const VersionLiteralSchema: z.ZodLiteral<1>;
type VersionLiteral = z.infer<typeof VersionLiteralSchema>;
declare const ExtendsSchema: z.ZodOptional<z.ZodString>;
type Extends = z.infer<typeof ExtendsSchema>;
declare const ContextLoadingSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
type ContextLoading = z.infer<typeof ContextLoadingSchema>;
declare const SystemSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    default_workflow_order: z.ZodArray<z.ZodString>;
    sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
        title: z.ZodString;
        content: z.ZodOptional<z.ZodString>;
        list: z.ZodOptional<z.ZodEnum<{
            agents: "agents";
            workflow: "workflow";
            validations: "validations";
            guardrails: "guardrails";
        }>>;
    }, z.core.$loose>>>;
    context_loading: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
    states: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type System = z.infer<typeof SystemSchema>;

declare const TeamImportSchema: z.ZodObject<{
    interface: z.ZodString;
    version: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type TeamImport = z.infer<typeof TeamImportSchema>;

declare const TeamInterfaceAcceptWorkflowSchema: z.ZodObject<{
    internal_workflow: z.ZodOptional<z.ZodString>;
    input_handoff: z.ZodString;
    output_handoff: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type TeamInterfaceAcceptWorkflow = z.infer<typeof TeamInterfaceAcceptWorkflowSchema>;
declare const TeamInterfaceSchema: z.ZodObject<{
    version: z.ZodNumber;
    description: z.ZodOptional<z.ZodString>;
    accepts: z.ZodOptional<z.ZodObject<{
        workflows: z.ZodRecord<z.ZodString, z.ZodObject<{
            internal_workflow: z.ZodOptional<z.ZodString>;
            input_handoff: z.ZodString;
            output_handoff: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
    }, z.core.$loose>>;
    exposes: z.ZodOptional<z.ZodObject<{
        artifacts: z.ZodArray<z.ZodString>;
    }, z.core.$loose>>;
    constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type TeamInterface = z.infer<typeof TeamInterfaceSchema>;

declare const ExecutionStepSchema: z.ZodObject<{
    id: z.ZodString;
    action: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    required: z.ZodOptional<z.ZodBoolean>;
    abort_on_failure: z.ZodOptional<z.ZodBoolean>;
    uses_tool: z.ZodOptional<z.ZodString>;
    produces_artifact: z.ZodOptional<z.ZodString>;
    reads_artifact: z.ZodOptional<z.ZodString>;
    validates_artifact: z.ZodOptional<z.ZodString>;
    validation_kind: z.ZodOptional<z.ZodEnum<{
        schema: "schema";
        mechanical: "mechanical";
        semantic: "semantic";
        approval: "approval";
        provenance: "provenance";
        traceability: "traceability";
        fidelity: "fidelity";
    }>>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    skip_condition: z.ZodOptional<z.ZodString>;
    wait_for_approval: z.ZodOptional<z.ZodBoolean>;
}, z.core.$loose>;
type ExecutionStep = z.infer<typeof ExecutionStepSchema>;
declare const TaskSchema: z.ZodObject<{
    description: z.ZodString;
    target_agent: z.ZodString;
    allowed_from_agents: z.ZodDefault<z.ZodArray<z.ZodString>>;
    workflow: z.ZodString;
    input_artifacts: z.ZodArray<z.ZodString>;
    invocation_handoff: z.ZodString;
    result_handoff: z.ZodString;
    default_priority: z.ZodOptional<z.ZodString>;
    responsibilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
    constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
    execution_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        action: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        required: z.ZodOptional<z.ZodBoolean>;
        abort_on_failure: z.ZodOptional<z.ZodBoolean>;
        uses_tool: z.ZodOptional<z.ZodString>;
        produces_artifact: z.ZodOptional<z.ZodString>;
        reads_artifact: z.ZodOptional<z.ZodString>;
        validates_artifact: z.ZodOptional<z.ZodString>;
        validation_kind: z.ZodOptional<z.ZodEnum<{
            schema: "schema";
            mechanical: "mechanical";
            semantic: "semantic";
            approval: "approval";
            provenance: "provenance";
            traceability: "traceability";
            fidelity: "fidelity";
        }>>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        skip_condition: z.ZodOptional<z.ZodString>;
        wait_for_approval: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$loose>>>;
    completion_criteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
    rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodOptional<z.ZodString>;
        description: z.ZodString;
        severity: z.ZodEnum<{
            optional: "optional";
            mandatory: "mandatory";
            recommended: "recommended";
        }>;
        detection_method: z.ZodOptional<z.ZodString>;
        escalation: z.ZodOptional<z.ZodString>;
        ref: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>>;
    anti_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
    escalation_criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
        condition: z.ZodString;
        action: z.ZodEnum<{
            stop_and_report: "stop_and_report";
            report_to_architect: "report_to_architect";
            wait_for_approval: "wait_for_approval";
        }>;
    }, z.core.$loose>>>;
    sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
        title: z.ZodString;
        content: z.ZodOptional<z.ZodString>;
        list: z.ZodOptional<z.ZodEnum<{
            agents: "agents";
            workflow: "workflow";
            validations: "validations";
            guardrails: "guardrails";
        }>>;
    }, z.core.$loose>>>;
    validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
    guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type Task = z.infer<typeof TaskSchema>;

declare const CommandSchema: z.ZodObject<{
    command: z.ZodString;
    category: z.ZodString;
    reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
    writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
    purpose: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type Command = z.infer<typeof CommandSchema>;
declare const ToolSchema: z.ZodObject<{
    kind: z.ZodOptional<z.ZodString>;
    extends: z.ZodOptional<z.ZodString>;
    command: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
    input_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
    output_artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
    invokable_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
    cli_contract: z.ZodOptional<z.ZodString>;
    artifact_bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    side_effects: z.ZodDefault<z.ZodArray<z.ZodString>>;
    commands: z.ZodDefault<z.ZodArray<z.ZodObject<{
        command: z.ZodString;
        category: z.ZodString;
        reads: z.ZodDefault<z.ZodArray<z.ZodString>>;
        writes: z.ZodDefault<z.ZodArray<z.ZodString>>;
        purpose: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    guardrails: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>;
type Tool = z.infer<typeof ToolSchema>;

declare const ValidationSchema: z.ZodObject<{
    target_artifact: z.ZodString;
    kind: z.ZodEnum<{
        schema: "schema";
        mechanical: "mechanical";
        semantic: "semantic";
        approval: "approval";
        provenance: "provenance";
        traceability: "traceability";
        fidelity: "fidelity";
    }>;
    executor_type: z.ZodOptional<z.ZodEnum<{
        agent: "agent";
        tool: "tool";
    }>>;
    executor: z.ZodOptional<z.ZodString>;
    blocking: z.ZodBoolean;
    produces_evidence: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
type Validation = z.infer<typeof ValidationSchema>;

declare const RetrySchema: z.ZodObject<{
    condition: z.ZodString;
    fix_task: z.ZodString;
    revalidate_task: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type Retry = z.infer<typeof RetrySchema>;
declare const ExternalParticipantSchema: z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodEnum<{
        actor: "actor";
        participant: "participant";
    }>;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ExternalParticipant = z.infer<typeof ExternalParticipantSchema>;
declare const WorkflowStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"delegate">;
    description: z.ZodOptional<z.ZodString>;
    task: z.ZodString;
    from_agent: z.ZodString;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    max_retries: z.ZodOptional<z.ZodNumber>;
    max_follow_ups: z.ZodOptional<z.ZodNumber>;
    retry: z.ZodOptional<z.ZodObject<{
        condition: z.ZodString;
        fix_task: z.ZodString;
        revalidate_task: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"gate">;
    description: z.ZodOptional<z.ZodString>;
    gate_kind: z.ZodString;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"handoff">;
    description: z.ZodOptional<z.ZodString>;
    handoff_kind: z.ZodString;
    task: z.ZodOptional<z.ZodString>;
    from_agent: z.ZodOptional<z.ZodString>;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    retry: z.ZodOptional<z.ZodObject<{
        condition: z.ZodString;
        fix_task: z.ZodString;
        revalidate_task: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"validation">;
    description: z.ZodOptional<z.ZodString>;
    validation: z.ZodString;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"decision">;
    description: z.ZodOptional<z.ZodString>;
    on: z.ZodOptional<z.ZodString>;
    routing_key: z.ZodOptional<z.ZodString>;
    branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"team_task">;
    description: z.ZodOptional<z.ZodString>;
    to_team: z.ZodString;
    workflow: z.ZodString;
    handoff: z.ZodString;
    expects: z.ZodString;
    group: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>], "type">;
type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
declare const WorkflowSchema: z.ZodObject<{
    description: z.ZodOptional<z.ZodString>;
    entry_conditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
    trigger: z.ZodOptional<z.ZodString>;
    steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"delegate">;
        description: z.ZodOptional<z.ZodString>;
        task: z.ZodString;
        from_agent: z.ZodString;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        max_retries: z.ZodOptional<z.ZodNumber>;
        max_follow_ups: z.ZodOptional<z.ZodNumber>;
        retry: z.ZodOptional<z.ZodObject<{
            condition: z.ZodString;
            fix_task: z.ZodString;
            revalidate_task: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"gate">;
        description: z.ZodOptional<z.ZodString>;
        gate_kind: z.ZodString;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"handoff">;
        description: z.ZodOptional<z.ZodString>;
        handoff_kind: z.ZodString;
        task: z.ZodOptional<z.ZodString>;
        from_agent: z.ZodOptional<z.ZodString>;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        retry: z.ZodOptional<z.ZodObject<{
            condition: z.ZodString;
            fix_task: z.ZodString;
            revalidate_task: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"validation">;
        description: z.ZodOptional<z.ZodString>;
        validation: z.ZodString;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"decision">;
        description: z.ZodOptional<z.ZodString>;
        on: z.ZodOptional<z.ZodString>;
        routing_key: z.ZodOptional<z.ZodString>;
        branches: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"team_task">;
        description: z.ZodOptional<z.ZodString>;
        to_team: z.ZodString;
        workflow: z.ZodString;
        handoff: z.ZodString;
        expects: z.ZodString;
        group: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$loose>], "type">>;
    sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
        title: z.ZodString;
        content: z.ZodOptional<z.ZodString>;
        list: z.ZodOptional<z.ZodEnum<{
            agents: "agents";
            workflow: "workflow";
            validations: "validations";
            guardrails: "guardrails";
        }>>;
    }, z.core.$loose>>>;
    external_participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        kind: z.ZodEnum<{
            actor: "actor";
            participant: "participant";
        }>;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
}, z.core.$loose>;
type Workflow = z.infer<typeof WorkflowSchema>;

interface LoadResult {
    data: Record<string, unknown>;
    filePath: string;
}
declare class DslLoadError extends Error {
    readonly filePath?: string | undefined;
    constructor(message: string, filePath?: string | undefined);
}
declare function loadDsl(entryPath: string): Promise<LoadResult>;

declare class BaseResolveError extends Error {
    constructor(message: string);
}
declare function resolveBase(extendsValue: string, projectDir: string): Promise<LoadResult>;

declare class MergeError extends Error {
    constructor(message: string);
}
type AnyRecord = Record<string, unknown>;
declare function mergeDsl(base: AnyRecord, project: AnyRecord): AnyRecord;

interface ResolveResult {
    data: Record<string, unknown>;
    projectPath: string;
    basePaths: string[];
}
declare function resolve(projectDirOrFile: string): Promise<ResolveResult>;

/**
 * Parse the resolved DSL through Zod to fill all schema-defined default
 * values, then return the fully-expanded plain object.
 *
 * If parsing fails (e.g. the DSL has validation errors), the original
 * data is returned unchanged so that `resolve` remains non-destructive.
 */
declare function expandDefaults(data: Record<string, unknown>): Record<string, unknown>;

interface DiagnosticMessage {
    path: string;
    message: string;
    code: string;
    severity?: "error" | "warning";
}
interface SchemaValidationResult {
    success: boolean;
    data?: Dsl;
    diagnostics: DiagnosticMessage[];
}
declare function validateSchema(data: Record<string, unknown>): SchemaValidationResult;

interface ReferenceDiagnostic {
    path: string;
    message: string;
    code: string;
}
declare function checkReferences(dsl: Dsl): ReferenceDiagnostic[];

/**
 * Meta-validate all `handoff_types.*.schema` entries as valid JSON Schema.
 *
 * Uses ajv's `validateSchema` to check that each schema is structurally
 * valid according to the JSON Schema specification. Returns diagnostics
 * with code `"invalid-handoff-schema"` for any violations.
 */
declare function validateHandoffSchemas(dsl: Dsl): ReferenceDiagnostic[];

type Severity = "error" | "warning" | "info";
interface LintDiagnostic {
    ruleId: string;
    severity: Severity;
    path: string;
    message: string;
}
interface LintRule {
    id: string;
    description: string;
    run(dsl: Dsl): LintDiagnostic[];
}

declare const builtinRules: LintRule[];
declare function lint(dsl: Dsl, rules?: LintRule[]): LintDiagnostic[];

/**
 * Run Spectral rules on a resolved DSL object.
 * Returns diagnostics in the same format as the TypeScript linter.
 */
declare function spectralLint(dslObject: Record<string, unknown>): Promise<LintDiagnostic[]>;

declare const yamlReservedKeySafetyRule: LintRule;

declare const RenderTargetSchema: z.ZodObject<{
    template: z.ZodString;
    context: z.ZodEnum<{
        workflow: "workflow";
        agent: "agent";
        task: "task";
        artifact: "artifact";
        tool: "tool";
        validation: "validation";
        handoff_type: "handoff_type";
        policy: "policy";
        guardrail: "guardrail";
        guardrail_policy: "guardrail_policy";
        system: "system";
        navigation_index: "navigation_index";
    }>;
    output: z.ZodString;
    include: z.ZodOptional<z.ZodArray<z.ZodString>>;
    exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
    skip_empty: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
type RenderTarget = z.infer<typeof RenderTargetSchema>;
declare const AuditConfigSchema: z.ZodOptional<z.ZodObject<{
    adapter: z.ZodOptional<z.ZodString>;
    model: z.ZodOptional<z.ZodString>;
    temperature: z.ZodOptional<z.ZodNumber>;
    cache_dir: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
type AuditConfig$1 = z.infer<typeof AuditConfigSchema>;
declare const AgentContractsConfigSchema: z.ZodObject<{
    dsl: z.ZodOptional<z.ZodString>;
    vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    renders: z.ZodDefault<z.ZodArray<z.ZodObject<{
        template: z.ZodString;
        context: z.ZodEnum<{
            workflow: "workflow";
            agent: "agent";
            task: "task";
            artifact: "artifact";
            tool: "tool";
            validation: "validation";
            handoff_type: "handoff_type";
            policy: "policy";
            guardrail: "guardrail";
            guardrail_policy: "guardrail_policy";
            system: "system";
            navigation_index: "navigation_index";
        }>;
        output: z.ZodString;
        include: z.ZodOptional<z.ZodArray<z.ZodString>>;
        exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
        skip_empty: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>>;
    bindings: z.ZodDefault<z.ZodArray<z.ZodString>>;
    active_guardrail_policy: z.ZodOptional<z.ZodString>;
    paths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    teams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        dsl: z.ZodOptional<z.ZodString>;
        bindings: z.ZodDefault<z.ZodArray<z.ZodString>>;
        vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        paths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        active_guardrail_policy: z.ZodOptional<z.ZodString>;
        interface_output: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    audit: z.ZodOptional<z.ZodObject<{
        adapter: z.ZodOptional<z.ZodString>;
        model: z.ZodOptional<z.ZodString>;
        temperature: z.ZodOptional<z.ZodNumber>;
        cache_dir: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    artifact_coverage: z.ZodOptional<z.ZodObject<{
        exclude_patterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
type AgentContractsConfig = z.infer<typeof AgentContractsConfigSchema>;
interface ResolvedRenderTarget {
    template: string;
    context: ContextType;
    output: string;
    include?: string[];
    exclude?: string[];
    skip_empty?: boolean;
}
interface ResolvedTeamConfig {
    dsl: string;
    vars?: Record<string, string>;
    bindings: string[];
    activeGuardrailPolicy?: string;
    paths?: Record<string, string>;
    interfaceOutput?: string;
}
interface ResolvedConfig {
    dsl: string;
    vars?: Record<string, string>;
    renders: ResolvedRenderTarget[];
    configDir: string;
    bindings: string[];
    activeGuardrailPolicy?: string;
    paths?: Record<string, string>;
    teams?: Record<string, ResolvedTeamConfig>;
    audit?: AuditConfig$1;
    artifactCoverage?: {
        exclude_patterns: string[];
    };
}

interface LoadedBinding {
    filePath: string;
    binding: SoftwareBinding;
}
declare function loadBindings(bindingPaths: string[]): Promise<LoadedBinding[]>;

interface RenderOptions {
    loadedBindings?: LoadedBinding[];
    activeGuardrailPolicy?: string;
}
declare function renderFromConfig(dsl: Dsl, renderTargets: ResolvedRenderTarget[], options?: RenderOptions): Promise<string[]>;
declare function checkDriftFromConfig(dsl: Dsl, renderTargets: ResolvedRenderTarget[], options?: RenderOptions): Promise<{
    hasDrift: boolean;
    diffs: string[];
}>;

interface GlobalContext {
    system: Dsl["system"];
    agents: Dsl["agents"];
    tasks: Dsl["tasks"];
    artifacts: Dsl["artifacts"];
    tools: Dsl["tools"];
    validations: Dsl["validations"];
    handoff_types: Dsl["handoff_types"];
    workflow: Dsl["workflow"];
    policies: Dsl["policies"];
    guardrails: Dsl["guardrails"];
    guardrail_policies: Dsl["guardrail_policies"];
    [key: string]: unknown;
}
interface GuardrailEnforcementEntry {
    guardrail_id: string;
    description: string;
    severity: string;
    action: Action;
    scoped_agents: string[];
    scoped_tasks: string[];
    scoped_workflows: string[];
    scoped_tools: string[];
    scoped_artifacts: string[];
    allow_override: boolean;
    override_requires: string[];
    trigger: string | null;
    escalation: {
        target: string;
        condition?: string;
    } | null;
}
interface SystemContext {
    system: System;
    dsl: Dsl;
    guardrailEnforcement?: GuardrailEnforcementEntry[];
    bindings?: SoftwareBinding[];
    [key: string]: unknown;
}
interface EntityGuardrailEntry {
    guardrail_id: string;
    description: string;
    rationale?: string;
    tags: string[];
    source: "entity" | "scope" | "both";
    severity?: string;
    action?: Action;
}
interface EntityValidationEntry {
    validation_id: string;
    kind: string;
    target_artifact: string;
    executor_type?: string;
    blocking: boolean;
    produces_evidence?: string;
}
interface PerTaskContext {
    task: Task & {
        id: string;
    };
    targetAgent: (Agent & {
        id: string;
    }) | null;
    relatedGuardrails: EntityGuardrailEntry[];
    relatedValidations: EntityValidationEntry[];
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerArtifactContext {
    artifact: Artifact & {
        id: string;
    };
    relatedTools: Dsl["tools"];
    relatedValidations: Dsl["validations"];
    producerAgents: Dsl["agents"];
    consumerAgents: Dsl["agents"];
    editorAgents: Dsl["agents"];
    createdInWorkflows: string[];
    relatedGuardrails: EntityGuardrailEntry[];
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerToolContext {
    tool: Tool & {
        id: string;
    };
    invokableAgents: Dsl["agents"];
    inputArtifactDetails: Dsl["artifacts"];
    outputArtifactDetails: Dsl["artifacts"];
    relatedGuardrails: EntityGuardrailEntry[];
    relatedValidations: EntityValidationEntry[];
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerValidationContext {
    validation: Validation & {
        id: string;
    };
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerHandoffTypeContext {
    handoff_type: HandoffType & {
        id: string;
    };
    relatedTasks: Array<Task & {
        id: string;
    }>;
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerWorkflowContext {
    workflow: Workflow & {
        id: string;
    };
    relatedAgents: Dsl["agents"];
    relatedTasks: Array<(Task & Record<string, unknown>) & {
        id: string;
    }>;
    relatedTools: Dsl["tools"];
    relatedArtifacts: Dsl["artifacts"];
    relatedValidations: Dsl["validations"];
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerPolicyContext {
    policy: Policy & {
        id: string;
    };
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerGuardrailContext {
    guardrail: Guardrail & {
        id: string;
    };
    dsl: Dsl;
    [key: string]: unknown;
}
interface PerGuardrailPolicyContext {
    guardrail_policy: GuardrailPolicy & {
        id: string;
    };
    dsl: Dsl;
    [key: string]: unknown;
}
interface MergedBehavioralSpec {
    responsibilities: string[];
    constraints: string[];
    rules: Array<Record<string, unknown>>;
    anti_patterns: string[];
    escalation_criteria: Array<Record<string, unknown>>;
    execution_steps: Array<Record<string, unknown>>;
    completion_criteria: string[];
}
interface DelegatableTaskView {
    id: string;
    description: string;
    target_agent: string;
    workflow: string;
    input_artifacts: string[];
    invocation_handoff: string;
    invocation_payload_keys: string[];
    result_handoff: string;
    result_payload_keys: string[];
}
interface PerAgentContext {
    agent: (Agent & Record<string, unknown>) & {
        id: string;
    };
    tasks: Array<(Task & Record<string, unknown>) & {
        id: string;
    }>;
    receivableTasks: Array<(Task & Record<string, unknown>) & {
        id: string;
    }>;
    delegatableTasks: DelegatableTaskView[];
    relatedArtifacts: Dsl["artifacts"];
    relatedTools: Dsl["tools"];
    relatedHandoffTypes: Dsl["handoff_types"];
    mergedBehavior: MergedBehavioralSpec;
    relatedGuardrails: EntityGuardrailEntry[];
    relatedValidations: EntityValidationEntry[];
    dsl: Dsl;
    [key: string]: unknown;
}
declare function buildGlobalContext(dsl: Dsl): GlobalContext;
declare function buildSystemContext(dsl: Dsl, options?: {
    loadedBindings?: LoadedBinding[];
    activeGuardrailPolicy?: string;
}): SystemContext;
type EntityType = "agents" | "tasks" | "tools" | "artifacts";
declare function resolveEffectiveGuardrails(dsl: Dsl, entityType: EntityType, entityId: string): EntityGuardrailEntry[];
/**
 * Resolves validation IDs for an agent, task, or tool into full entries for prompts.
 * For tools, includes validations where executor_type is "tool" and executor is the tool id.
 */
declare function resolveEntityValidations(dsl: Dsl, entityType: "agents" | "tasks" | "tools", entityId: string): EntityValidationEntry[];
declare function buildTaskContext(dsl: Dsl, taskId: string): PerTaskContext;
declare function buildArtifactContext(dsl: Dsl, artifactId: string): PerArtifactContext;
declare function buildToolContext(dsl: Dsl, toolId: string): PerToolContext;
declare function buildValidationContext(dsl: Dsl, validationId: string): PerValidationContext;
declare function buildHandoffTypeContext(dsl: Dsl, handoffTypeId: string): PerHandoffTypeContext;
declare function buildWorkflowContext(dsl: Dsl, workflowId: string): PerWorkflowContext;
declare function buildPolicyContext(dsl: Dsl, policyId: string): PerPolicyContext;
declare function buildGuardrailContext(dsl: Dsl, guardrailId: string): PerGuardrailContext;
declare function buildGuardrailPolicyContext(dsl: Dsl, policyId: string): PerGuardrailPolicyContext;
declare function buildPerAgentContext(dsl: Dsl, agent: Agent & {
    id: string;
}): PerAgentContext;

declare class ConfigLoadError extends Error {
    readonly filePath?: string | undefined;
    constructor(message: string, filePath?: string | undefined);
}
declare function loadConfig(configPath?: string): Promise<ResolvedConfig | null>;
declare function resolveDslPath(dirArg: string | undefined, dirArgDefault: string, config: ResolvedConfig | null): string;

interface DimensionResult {
    id: string;
    label: string;
    score: number;
    total: number;
    percent: number;
    weight: number;
    recommendations: string[];
}
interface ScoreResult {
    overall: number;
    dimensions: DimensionResult[];
}

declare function score(dsl: Dsl): ScoreResult;

type ProjectNavigationIndex = {
    version: string;
    generated_at: string;
    system: {
        id: string;
        name: string;
    };
    artifacts: Record<string, CompiledArtifactNode>;
};
type CompiledArtifactNode = {
    id: string;
    files: {
        path_patterns: string[];
        exclude_patterns: string[];
    };
    properties: {
        type: string;
        authority: "canonical" | "derived" | "generated" | "control";
        manual_edit: "allowed" | "discouraged" | "forbidden";
        change_control: "none" | "approval-required" | "regeneration-required";
    };
    relations: {
        source_artifacts: string[];
        derived_artifacts: string[];
    };
    operations: {
        producers: ArtifactOperation[];
        validators: ArtifactOperation[];
        consumers: ArtifactOperation[];
    };
    agents: {
        owners: string[];
        editors: string[];
        readers: string[];
    };
    routes: {
        update?: ArtifactRoute[];
        regenerate?: ArtifactRoute[];
        validate?: ArtifactRoute[];
    };
};
type ArtifactOperation = {
    tool: string;
    cli_contract: string;
    command: string;
    slot: string;
    invokable_by: string[];
};
type ArtifactRoute = {
    purpose: "update" | "regenerate" | "validate";
    steps: ArtifactRouteStep[];
};
type ArtifactRouteStep = {
    type: "edit_artifact";
    artifact: string;
    candidate_agents: string[];
} | {
    type: "run_operation";
    operation: string;
    candidate_agents: string[];
} | {
    type: "request_review";
    artifact: string;
    candidate_agents: string[];
};

declare function buildNavigationIndex(dsl: Dsl): ProjectNavigationIndex;

type AuditType = "render" | "dsl" | "prompt" | "extensions";
type OutputFormat = "text" | "json" | "markdown";
interface AuditOptions {
    auditType: AuditType;
    format: OutputFormat;
    scope?: string;
    dryRun: boolean;
    adapter?: string;
    model?: string;
    team?: string;
}
interface AuditConfig {
    adapter?: string;
    model?: string;
    temperature?: number;
    cache_dir?: string;
}

/**
 * AUTO-GENERATED by agent-contracts-runtime. DO NOT EDIT.
 *
 * Regenerate via: npx agent-runtime generate
 */

declare const DslAuditResultSchema: z.ZodObject<{
    audit_type: z.ZodEnum<{
        semantic: "semantic";
        extensions: "extensions";
        prompt: "prompt";
        completeness: "completeness";
    }>;
    total_dimensions: z.ZodNumber;
    pass_count: z.ZodNumber;
    miss_count: z.ZodNumber;
    partial_count: z.ZodOptional<z.ZodNumber>;
    agents_reviewed: z.ZodOptional<z.ZodNumber>;
    prompts_reviewed: z.ZodOptional<z.ZodNumber>;
    gate_analysis_complete: z.ZodOptional<z.ZodBoolean>;
    guardrail_enforcement_verified: z.ZodOptional<z.ZodBoolean>;
    critical_gaps: z.ZodOptional<z.ZodArray<z.ZodObject<{
        dimension: z.ZodOptional<z.ZodString>;
        agent: z.ZodOptional<z.ZodString>;
        gap_type: z.ZodOptional<z.ZodEnum<{
            template_gap: "template_gap";
            data_gap: "data_gap";
            dsl_gap: "dsl_gap";
        }>>;
        severity: z.ZodOptional<z.ZodEnum<{
            info: "info";
            critical: "critical";
            warning: "warning";
        }>>;
    }, z.core.$strip>>>;
    recommendations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        priority: z.ZodOptional<z.ZodEnum<{
            P0: "P0";
            P1: "P1";
            P2: "P2";
        }>>;
        description: z.ZodOptional<z.ZodString>;
        fix_type: z.ZodOptional<z.ZodEnum<{
            template_fix: "template_fix";
            dsl_fix: "dsl_fix";
            regeneration: "regeneration";
        }>>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type DslAuditResult = z.infer<typeof DslAuditResultSchema>;

/**
 * Audit orchestrator — runs LLM-based semantic audits via agent-contracts-runtime.
 *
 * Uses the auto-generated contracts from dsl_base/ (agentRegistry, taskRegistry,
 * handoffSchemas) and the runtime's runTask() for execution, follow-up recovery,
 * and handoff schema validation.
 *
 * agent-contracts-runtime is an optional peer dependency — it is loaded
 * dynamically at audit invocation time so that users who don't use audit
 * have zero additional overhead.
 */

interface AuditRunResult {
    taskId: string;
    auditType: AuditType;
    data: DslAuditResult | null;
    raw: string;
    prompt: string;
    dryRun: boolean;
    status: "success" | "validation_error" | "escalation" | "error";
    errorMessage?: string;
    followUpsUsed: number;
    retriesUsed: number;
}
declare function runAudit(dsl: Dsl, config: ResolvedConfig, auditConfig: AuditConfig, options: AuditOptions): Promise<AuditRunResult>;
declare function runAllAudits(dsl: Dsl, config: ResolvedConfig, auditConfig: AuditConfig, options: Omit<AuditOptions, "auditType">): Promise<AuditRunResult[]>;

/**
 * Build the audit context string that becomes the user_request for runTask().
 *
 * Each audit type collects the relevant DSL data and rendered files,
 * then formats them into a structured prompt that the dsl-auditor agent
 * can analyze via LLM.
 */

declare function buildAuditContext(auditType: AuditType, dsl: Dsl, config: ResolvedConfig): Promise<string>;

/**
 * Format audit results for CLI output.
 */

declare function formatAuditResult(r: AuditRunResult, format: OutputFormat): string;
declare function formatAuditResults(results: AuditRunResult[], format: OutputFormat): string;
declare function computeExitCode(results: AuditRunResult[], failOn?: string): number;

interface ResolvedCheck {
    guardrail_id: string;
    guardrail: Guardrail;
    policy_rule: GuardrailPolicyRule;
    check: Check;
}
interface BindingGenerationContext {
    system: {
        id: string;
        name: string;
    };
    guardrails: Record<string, Guardrail>;
    policy: GuardrailPolicy;
    binding: SoftwareBinding;
    all_bindings: Record<string, SoftwareBinding>;
    vars: Record<string, string>;
    paths: Record<string, string>;
    reporting: {
        commands: Record<string, string>;
        fail_open: boolean;
        timeout_ms: number;
    } | null;
    resolved_checks: ResolvedCheck[];
    tasks: Record<string, Task>;
    artifacts: Record<string, Artifact>;
    agents: Record<string, Agent>;
    handoff_types: Record<string, HandoffType>;
    workflow: Record<string, Workflow>;
}
/** @deprecated Use BindingGenerationContext */
type GuardrailGenerationContext = BindingGenerationContext;
interface GenerateResult {
    outputFiles: string[];
    diagnostics: GenerateDiagnostic[];
}
interface GenerateDiagnostic {
    path: string;
    message: string;
    severity: "error" | "warning" | "info";
}

interface GenerateGuardrailsOptions {
    dsl: Dsl;
    config: ResolvedConfig;
    loadedBindings: LoadedBinding[];
    filterBindings?: string[];
    dryRun?: boolean;
}
declare function generateGuardrails(options: GenerateGuardrailsOptions): Promise<GenerateResult>;

interface ResolveChecksResult {
    resolved: ResolvedCheck[];
    diagnostics: GenerateDiagnostic[];
}
declare function resolveChecks(dsl: Dsl, binding: SoftwareBinding, policy: GuardrailPolicy): ResolveChecksResult;

interface PathResolveResult {
    resolved: string;
    diagnostics: GenerateDiagnostic[];
}
declare function resolveBindingTargetPath(target: string, paths: Record<string, string>, bindingSoftware: string): PathResolveResult;

declare function enumerateProjectFiles(cwd: string, excludePatterns: string[]): string[];

interface ArtifactCoverageSummary {
    total_files: number;
    covered_files: number;
    uncovered_files: number;
    overlapping_files: number;
    coverage_percent: number;
}
interface OverlappingFile {
    path: string;
    artifacts: string[];
}
interface PerArtifactEntry {
    matched_files: number;
    patterns: string[];
}
interface ArtifactCoverageReport {
    summary: ArtifactCoverageSummary;
    uncovered: string[];
    overlapping: OverlappingFile[];
    per_artifact: Record<string, PerArtifactEntry>;
}
interface ArtifactFileInfo {
    path_patterns: string[];
    exclude_patterns: string[];
}

declare function matchFileToArtifacts(filePath: string, artifacts: Record<string, ArtifactFileInfo>): string[];

declare function buildCoverageReport(files: string[], artifacts: Record<string, ArtifactFileInfo>): ArtifactCoverageReport;
declare function formatCoverageText(report: ArtifactCoverageReport): string;

export { type Action, ActionEnum, ActionSchema, type ActionValue, type Agent, type AgentContractsConfig, AgentContractsConfigSchema, AgentSchema, type AppendOperator, AppendOperatorSchema, type Artifact, type ArtifactCoverageReport, type ArtifactCoverageSummary, type ArtifactFileInfo, type ArtifactOperation, type ArtifactRoute, type ArtifactRouteStep, ArtifactSchema, type AuditOptions, type OutputFormat as AuditOutputFormat, type AuditConfig as AuditRunConfig, type AuditRunResult, type AuditType, BaseResolveError, type BindingGenerationContext, type BindingOutput, BindingOutputSchema, type BindingRenderTarget, BindingRenderTargetSchema, CONTEXT_TYPES, type Check, CheckSchema, type Command, CommandSchema, type CompiledArtifactNode, type Components, ComponentsSchema, type ConditionalAction, ConditionalActionSchema, ConfigLoadError, type ContextLoading, ContextLoadingSchema, type ContextType, ContextTypeSchema, type DelegatableTaskView, type DiagnosticMessage, type DimensionResult, type Dsl, DslLoadError, DslSchema, type EntityGuardrailEntry, type EntityValidationEntry, type EscalationCriterion, EscalationCriterionSchema, type ExecutionStep, ExecutionStepSchema, type Extends, ExtendsSchema, type ExternalParticipant, type GenerateDiagnostic, type GenerateGuardrailsOptions, type GenerateResult, type GlobalContext, type Guardrail, type GuardrailGenerationContext, type GuardrailPolicy, type GuardrailPolicyRule, type GuardrailPolicyRuleEscalation, GuardrailPolicyRuleEscalationSchema, GuardrailPolicyRuleSchema, GuardrailPolicySchema, GuardrailSchema, type GuardrailScope, GuardrailScopeSchema, type HandoffType, HandoffTypeSchema, ITERABLE_CONTEXT_TYPES, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, type LoadedBinding, type Matcher, MatcherSchema, MergeError, type MergeableRecord, type MergedBehavioralSpec, type OverlappingFile, type PathResolveResult, type PerAgentContext, type PerArtifactContext, type PerArtifactEntry, type PerGuardrailContext, type PerGuardrailPolicyContext, type PerHandoffTypeContext, type PerPolicyContext, type PerTaskContext, type PerToolContext, type PerValidationContext, type PerWorkflowContext, type Policy, PolicySchema, type PolicyWhen, PolicyWhenSchema, type PrependOperator, PrependOperatorSchema, type Prerequisite, PrerequisiteSchema, type ProjectNavigationIndex, type ReferenceDiagnostic, type RemoveOperator, RemoveOperatorSchema, type RenderTarget, RenderTargetSchema, type ReplaceOperator, ReplaceOperatorSchema, type Reporting, ReportingSchema, type ResolveChecksResult, type ResolveResult, type ResolvedCheck, type ResolvedConfig, type ResolvedRenderTarget, type Retry, type Rule, RuleSchema, SCOPE_NODE_TYPES, type SchemaValidationResult, type ScopeNodeType, ScopeNodeTypeSchema, type ScoreResult, type Section, SectionSchema, type Severity, type SoftwareBinding, SoftwareBindingSchema, type System, type SystemContext, SystemSchema, type Task, TaskSchema, type TeamImport, TeamImportSchema, type TeamInterface, type TeamInterfaceAcceptWorkflow, TeamInterfaceAcceptWorkflowSchema, TeamInterfaceSchema, type Tool, ToolSchema, type Validation, ValidationSchema, type VersionLiteral, VersionLiteralSchema, type Workflow, WorkflowSchema, type WorkflowStep, WorkflowStepSchema, type XExtensionDecl, XExtensionDeclSchema, buildArtifactContext, buildAuditContext, buildCoverageReport, buildGlobalContext, buildGuardrailContext, buildGuardrailPolicyContext, buildHandoffTypeContext, buildNavigationIndex, buildPerAgentContext, buildPolicyContext, buildSystemContext, buildTaskContext, buildToolContext, buildValidationContext, buildWorkflowContext, builtinRules, checkDriftFromConfig, checkReferences, computeExitCode, enumerateProjectFiles, expandDefaults, formatAuditResult, formatAuditResults, formatCoverageText, generateGuardrails, lint, loadBindings, loadConfig, loadDsl, matchFileToArtifacts, mergeDsl, renderFromConfig, resolve, resolveAllOf, resolveBase, resolveBindingTargetPath, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };
