import { z } from 'zod'; declare const SectionSchema: z.ZodObject<{ title: z.ZodString; content: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>; type Section = z.infer; declare const RuleSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodOptional; description: z.ZodString; severity: z.ZodEnum<{ optional: "optional"; mandatory: "mandatory"; recommended: "recommended"; }>; detection_method: z.ZodOptional; escalation: z.ZodOptional; ref: z.ZodOptional; }, z.core.$loose>; type Rule = z.infer; 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; 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; declare const MemoryCapabilitySchema: z.ZodObject<{ resumable: z.ZodOptional; ref_required: z.ZodOptional; emits_memory_ref: z.ZodOptional; }, z.core.$strip>; type MemoryCapability = z.infer; declare const AgentSchema: z.ZodObject<{ role_name: z.ZodString; purpose: z.ZodString; own_artifacts: z.ZodDefault>; can_read_artifacts: z.ZodDefault>; can_write_artifacts: z.ZodDefault>; can_execute_tools: z.ZodDefault>; can_perform_validations: z.ZodDefault>; can_invoke_agents: z.ZodDefault>; can_return_handoffs: z.ZodDefault>; dispatch_only: z.ZodOptional; mode: z.ZodOptional>; responsibilities: z.ZodOptional>; constraints: z.ZodOptional>; rules: z.ZodOptional; description: z.ZodString; severity: z.ZodEnum<{ optional: "optional"; mandatory: "mandatory"; recommended: "recommended"; }>; detection_method: z.ZodOptional; escalation: z.ZodOptional; ref: z.ZodOptional; }, z.core.$loose>>>; anti_patterns: z.ZodOptional>; escalation_criteria: z.ZodOptional; }, z.core.$loose>>>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; prerequisites: z.ZodOptional; target: z.ZodString; required: z.ZodBoolean; }, z.core.$loose>>>; guardrails: z.ZodOptional>; memory: z.ZodOptional; ref_required: z.ZodOptional; emits_memory_ref: z.ZodOptional; }, z.core.$strip>>; effects: z.ZodOptional>; }, z.core.$loose>; type Agent = z.infer; declare const ArtifactSchema: z.ZodObject<{ type: z.ZodString; description: z.ZodOptional; owner: z.ZodOptional; producers: z.ZodDefault>; editors: z.ZodDefault>; consumers: z.ZodDefault>; states: z.ZodDefault>; required_validations: z.ZodDefault>; visibility: z.ZodOptional; classification: z.ZodOptional; guardrails: z.ZodOptional>; authority: z.ZodOptional>; path_patterns: z.ZodOptional>; exclude_patterns: z.ZodOptional>; manual_edit: z.ZodOptional>; change_control: z.ZodOptional>; derived_from: z.ZodOptional]>>; }, z.core.$loose>; type Artifact = z.infer; 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; exclude_glob: z.ZodOptional; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"file_glob">; pattern: z.ZodString; exclude_glob: z.ZodOptional; }, z.core.$loose>], "type">; type Matcher = z.infer; declare const CheckSchema: z.ZodObject<{ matcher: z.ZodOptional; pattern: z.ZodString; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"content_regex">; pattern: z.ZodString; file_glob: z.ZodOptional; exclude_glob: z.ZodOptional; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"file_glob">; pattern: z.ZodString; exclude_glob: z.ZodOptional; }, z.core.$loose>], "type">>; script: z.ZodOptional; message: z.ZodOptional; }, z.core.$loose>; type Check = z.infer; declare const BindingOutputSchema: z.ZodObject<{ target: z.ZodString; template: z.ZodOptional; inline_template: z.ZodOptional; source: z.ZodOptional; mode: z.ZodDefault>; format: z.ZodOptional>; patch_strategy: z.ZodOptional>; array_merge_key: z.ZodOptional; group_by: z.ZodOptional; executable: z.ZodOptional; skip_empty: z.ZodOptional; }, z.core.$loose>; type BindingOutput = z.infer; declare const ReportingSchema: z.ZodObject<{ commands: z.ZodRecord; fail_open: z.ZodDefault; timeout_ms: z.ZodDefault; }, z.core.$loose>; type Reporting = z.infer; declare const BindingRenderTargetSchema: z.ZodObject<{ template: z.ZodOptional; inline_template: z.ZodOptional; 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>; exclude: z.ZodOptional>; skip_empty: z.ZodOptional; executable: z.ZodOptional; }, z.core.$loose>; type BindingRenderTarget = z.infer; /** * A single observability span declaration within an event_mapping rule. * `axis` identifies the signal axis (e.g. "trace", "metric", "log"). * `lifecycle` is the lifecycle phase ("start" | "end" | "point", etc.). * `each` is an optional iteration expression (template string). * `attributes` are template-string key/value pairs rendered at runtime. */ declare const EventMappingSpanSchema: z.ZodObject<{ axis: z.ZodString; name: z.ZodString; lifecycle: z.ZodString; condition: z.ZodOptional; each: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>; type EventMappingSpan = z.infer; /** * A causal link between two spans within an event_mapping rule. * `type` is the link kind (e.g. "follows_from", "child_of"). */ declare const EventMappingLinkSchema: z.ZodObject<{ type: z.ZodString; from: z.ZodString; to: z.ZodString; condition: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>; type EventMappingLink = z.infer; /** * Rule associated with a single hook event name. */ declare const EventMappingRuleSchema: z.ZodObject<{ spans: z.ZodOptional; each: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>>>; links: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>>>; }, z.core.$loose>; type EventMappingRule = z.infer; declare const SoftwareBindingSchema: z.ZodObject<{ software: z.ZodString; version: z.ZodLiteral<1>; extends: z.ZodOptional; guardrail_impl: z.ZodOptional; pattern: z.ZodString; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"content_regex">; pattern: z.ZodString; file_glob: z.ZodOptional; exclude_glob: z.ZodOptional; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"file_glob">; pattern: z.ZodString; exclude_glob: z.ZodOptional; }, z.core.$loose>], "type">>; script: z.ZodOptional; message: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>>; outputs: z.ZodOptional; inline_template: z.ZodOptional; source: z.ZodOptional; mode: z.ZodDefault>; format: z.ZodOptional>; patch_strategy: z.ZodOptional>; array_merge_key: z.ZodOptional; group_by: z.ZodOptional; executable: z.ZodOptional; skip_empty: z.ZodOptional; }, z.core.$loose>>>; renders: z.ZodOptional; inline_template: z.ZodOptional; 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>; exclude: z.ZodOptional>; skip_empty: z.ZodOptional; executable: z.ZodOptional; }, z.core.$loose>>>; reporting: z.ZodOptional; fail_open: z.ZodDefault; timeout_ms: z.ZodDefault; }, z.core.$loose>>; event_mapping: z.ZodOptional; each: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>>>; links: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$loose>>>; }, z.core.$loose>>>; }, z.core.$loose>; type SoftwareBinding = z.infer; 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; 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/"`. */ declare const ComponentsSchema: z.ZodObject<{ schemas: z.ZodDefault>>; }, z.core.$loose>; type Components = z.infer; 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; description: z.ZodOptional; scope: z.ZodOptional>>; schema: z.ZodOptional>; required: z.ZodDefault; }, z.core.$strip>; type XExtensionDecl = z.infer; declare const DslSchema: z.ZodObject<{ version: z.ZodLiteral<1>; extends: z.ZodOptional; system: z.ZodObject<{ id: z.ZodString; name: z.ZodString; default_workflow_order: z.ZodArray; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; context_loading: z.ZodOptional>>; states: z.ZodDefault>; }, z.core.$loose>; agents: z.ZodDefault>; can_read_artifacts: z.ZodDefault>; can_write_artifacts: z.ZodDefault>; can_execute_tools: z.ZodDefault>; can_perform_validations: z.ZodDefault>; can_invoke_agents: z.ZodDefault>; can_return_handoffs: z.ZodDefault>; dispatch_only: z.ZodOptional; mode: z.ZodOptional>; responsibilities: z.ZodOptional>; constraints: z.ZodOptional>; rules: z.ZodOptional; description: z.ZodString; severity: z.ZodEnum<{ optional: "optional"; mandatory: "mandatory"; recommended: "recommended"; }>; detection_method: z.ZodOptional; escalation: z.ZodOptional; ref: z.ZodOptional; }, z.core.$loose>>>; anti_patterns: z.ZodOptional>; escalation_criteria: z.ZodOptional; }, z.core.$loose>>>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; prerequisites: z.ZodOptional; target: z.ZodString; required: z.ZodBoolean; }, z.core.$loose>>>; guardrails: z.ZodOptional>; memory: z.ZodOptional; ref_required: z.ZodOptional; emits_memory_ref: z.ZodOptional; }, z.core.$strip>>; effects: z.ZodOptional>; }, z.core.$loose>>>; tasks: z.ZodDefault>; workflow: z.ZodString; input_artifacts: z.ZodArray; invocation_handoff: z.ZodString; result_handoff: z.ZodString; default_priority: z.ZodOptional; responsibilities: z.ZodOptional>; constraints: z.ZodOptional>; execution_steps: z.ZodOptional; required: z.ZodOptional; abort_on_failure: z.ZodOptional; uses_tool: z.ZodOptional; produces_artifact: z.ZodOptional; reads_artifact: z.ZodOptional; validates_artifact: z.ZodOptional; validation_kind: z.ZodOptional>; depends_on: z.ZodOptional>; skip_condition: z.ZodOptional; wait_for_approval: z.ZodOptional; }, z.core.$loose>>>; completion_criteria: z.ZodOptional>; rules: z.ZodOptional; description: z.ZodString; severity: z.ZodEnum<{ optional: "optional"; mandatory: "mandatory"; recommended: "recommended"; }>; detection_method: z.ZodOptional; escalation: z.ZodOptional; ref: z.ZodOptional; }, z.core.$loose>>>; anti_patterns: z.ZodOptional>; escalation_criteria: z.ZodOptional; }, z.core.$loose>>>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; validations: z.ZodDefault>; guardrails: z.ZodOptional>; model_class: z.ZodOptional>; effects: z.ZodOptional>; }, z.core.$loose>>>; artifacts: z.ZodDefault; owner: z.ZodOptional; producers: z.ZodDefault>; editors: z.ZodDefault>; consumers: z.ZodDefault>; states: z.ZodDefault>; required_validations: z.ZodDefault>; visibility: z.ZodOptional; classification: z.ZodOptional; guardrails: z.ZodOptional>; authority: z.ZodOptional>; path_patterns: z.ZodOptional>; exclude_patterns: z.ZodOptional>; manual_edit: z.ZodOptional>; change_control: z.ZodOptional>; derived_from: z.ZodOptional]>>; }, z.core.$loose>>>; tools: z.ZodDefault; extends: z.ZodOptional; command: z.ZodOptional; description: z.ZodOptional; input_artifacts: z.ZodDefault>; output_artifacts: z.ZodDefault>; invokable_by: z.ZodDefault>; cli_contract: z.ZodOptional; component_contract: z.ZodOptional; artifact_bindings: z.ZodDefault>; side_effects: z.ZodDefault>; commands: z.ZodDefault>; writes: z.ZodDefault>; purpose: z.ZodOptional; }, z.core.$strip>>>; guardrails: z.ZodOptional>; }, z.core.$loose>>>; validations: z.ZodDefault; executor_type: z.ZodOptional>; executor: z.ZodOptional; blocking: z.ZodBoolean; produces_evidence: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>>>; handoff_types: z.ZodDefault; schema: z.ZodRecord; example: z.ZodOptional>; target_agent: z.ZodOptional; workflow_phase: z.ZodOptional; }, z.core.$loose>>>; team_interface: z.ZodOptional; accepts: z.ZodOptional; input_handoff: z.ZodString; output_handoff: z.ZodString; description: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; exposes: z.ZodOptional; }, z.core.$loose>>; constraints: z.ZodOptional>; }, z.core.$loose>>; imports: z.ZodOptional; }, z.core.$loose>>>; workflow: z.ZodDefault; entry_conditions: z.ZodDefault>; trigger: z.ZodOptional; steps: z.ZodArray; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; max_retries: z.ZodOptional; max_follow_ups: z.ZodOptional; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"gate">; description: z.ZodOptional; gate_kind: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"handoff">; description: z.ZodOptional; handoff_kind: z.ZodString; task: z.ZodOptional; from_agent: z.ZodOptional; group: z.ZodOptional; depends_on: z.ZodOptional>; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"validation">; description: z.ZodOptional; validation: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"decision">; description: z.ZodOptional; on: z.ZodOptional; routing_key: z.ZodOptional; branches: z.ZodRecord>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"team_task">; description: z.ZodOptional; to_team: z.ZodString; workflow: z.ZodString; handoff: z.ZodString; expects: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"evaluate">; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; evaluator_agent: z.ZodOptional; loop_to: z.ZodString; max_iterations: z.ZodNumber; inject_as: z.ZodOptional; on_exhausted: z.ZodOptional>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>], "type">>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; external_participants: z.ZodDefault; label: z.ZodString; description: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$loose>>>; policies: z.ZodDefault; workflow: z.ZodOptional; }, z.core.$loose>; requires_validations: z.ZodOptional>; requires: z.ZodOptional>; }, z.core.$loose>>>; guardrails: z.ZodDefault>; tasks: z.ZodOptional>; tools: z.ZodOptional>; artifacts: z.ZodOptional>; workflows: z.ZodOptional>; }, z.core.$loose>; rationale: z.ZodOptional; tags: z.ZodDefault>; exemptions: z.ZodOptional>; }, z.core.$loose>>>; guardrail_policies: z.ZodDefault; rules: z.ZodArray; action: z.ZodUnion, z.ZodObject<{ default: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; when: z.ZodRecord>; }, z.core.$strip>]>; allow_override: z.ZodDefault; override_requires: z.ZodOptional>; escalation: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; }, z.core.$loose>>>; components: z.ZodDefault>>; }, z.core.$loose>>; extensions: z.ZodDefault; description: z.ZodOptional; scope: z.ZodOptional>>; schema: z.ZodOptional>; required: z.ZodDefault; }, z.core.$strip>>>; extensions_strict: z.ZodDefault; }, z.core.$loose>; type Dsl = z.infer; /** * 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. * * Feature #134 — invocation-common structured fields: * `target_agent` and `workflow_phase` are optional structured metadata fields * that are rendered as `$tags` in the handoff payload envelope, enabling * downstream observability consumers to route/filter handoff events. */ declare const HandoffTypeSchema: z.ZodObject<{ version: z.ZodNumber; description: z.ZodOptional; schema: z.ZodRecord; example: z.ZodOptional>; target_agent: z.ZodOptional; workflow_phase: z.ZodOptional; }, z.core.$loose>; type HandoffType = z.infer; declare const GuardrailScopeSchema: z.ZodObject<{ agents: z.ZodOptional>; tasks: z.ZodOptional>; tools: z.ZodOptional>; artifacts: z.ZodOptional>; workflows: z.ZodOptional>; }, z.core.$loose>; type GuardrailScope = z.infer; declare const GuardrailSchema: z.ZodObject<{ description: z.ZodString; scope: z.ZodObject<{ agents: z.ZodOptional>; tasks: z.ZodOptional>; tools: z.ZodOptional>; artifacts: z.ZodOptional>; workflows: z.ZodOptional>; }, z.core.$loose>; rationale: z.ZodOptional; tags: z.ZodDefault>; exemptions: z.ZodOptional>; }, z.core.$loose>; type Guardrail = z.infer; declare const GuardrailPolicyRuleEscalationSchema: z.ZodObject<{ target: z.ZodString; condition: z.ZodOptional; }, z.core.$loose>; type GuardrailPolicyRuleEscalation = z.infer; declare const ActionEnum: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; type ActionValue = z.infer; declare const ConditionalActionSchema: z.ZodObject<{ default: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; when: z.ZodRecord>; }, z.core.$strip>; type ConditionalAction = z.infer; declare const ActionSchema: z.ZodUnion, z.ZodObject<{ default: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; when: z.ZodRecord>; }, z.core.$strip>]>; type Action = z.infer; declare const GuardrailPolicyRuleSchema: z.ZodObject<{ guardrail: z.ZodString; severity: z.ZodEnum<{ mandatory: "mandatory"; info: "info"; critical: "critical"; warning: "warning"; }>; action: z.ZodUnion, z.ZodObject<{ default: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; when: z.ZodRecord>; }, z.core.$strip>]>; allow_override: z.ZodDefault; override_requires: z.ZodOptional>; escalation: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; type GuardrailPolicyRule = z.infer; declare const GuardrailPolicySchema: z.ZodObject<{ description: z.ZodOptional; rules: z.ZodArray; action: z.ZodUnion, z.ZodObject<{ default: z.ZodEnum<{ block: "block"; warn: "warn"; shadow: "shadow"; info: "info"; }>; when: z.ZodRecord>; }, z.core.$strip>]>; allow_override: z.ZodDefault; override_requires: z.ZodOptional>; escalation: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; }, z.core.$loose>; type GuardrailPolicy = z.infer; type AnyRecord$2 = Record; /** * 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$2): AnyRecord$2; type AnyRecord$1 = Record; declare function resolveSchemaRefs(schema: AnyRecord$1, components?: Record): AnyRecord$1; declare const AppendOperatorSchema: z.ZodObject<{ $append: z.ZodRecord; }, z.core.$strip>; type AppendOperator = z.infer; declare const PrependOperatorSchema: z.ZodObject<{ $prepend: z.ZodRecord; }, z.core.$strip>; type PrependOperator = z.infer; declare const InsertAfterOperatorSchema: z.ZodObject<{ $insert_after: z.ZodObject<{ after: z.ZodString; entries: z.ZodRecord; }, z.core.$strip>; }, z.core.$strip>; type InsertAfterOperator = z.infer; declare const ReplaceOperatorSchema: z.ZodObject<{ $replace: z.ZodAny; }, z.core.$strip>; type ReplaceOperator = z.infer; declare const RemoveOperatorSchema: z.ZodObject<{ $remove: z.ZodArray]>>; }, z.core.$strip>; type RemoveOperator = z.infer; type MergeableRecord = Record | { $append: Record; } | { $prepend: Record; } | { $insert_after: { after: string; entries: Record; }; } | { $replace: unknown; } | { $remove: (string | { id: string; })[]; }; declare const PolicyWhenSchema: z.ZodObject<{ artifact_type: z.ZodOptional; workflow: z.ZodOptional; }, z.core.$loose>; type PolicyWhen = z.infer; declare const PolicySchema: z.ZodObject<{ when: z.ZodObject<{ artifact_type: z.ZodOptional; workflow: z.ZodOptional; }, z.core.$loose>; requires_validations: z.ZodOptional>; requires: z.ZodOptional>; }, z.core.$loose>; type Policy = z.infer; declare const VersionLiteralSchema: z.ZodLiteral<1>; type VersionLiteral = z.infer; declare const ExtendsSchema: z.ZodOptional; type Extends = z.infer; declare const ContextLoadingSchema: z.ZodOptional>>; type ContextLoading = z.infer; declare const SystemSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; default_workflow_order: z.ZodArray; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; context_loading: z.ZodOptional>>; states: z.ZodDefault>; }, z.core.$loose>; type System = z.infer; declare const TeamImportSchema: z.ZodObject<{ interface: z.ZodString; version: z.ZodOptional; }, z.core.$loose>; type TeamImport = z.infer; declare const TeamInterfaceAcceptWorkflowSchema: z.ZodObject<{ internal_workflow: z.ZodOptional; input_handoff: z.ZodString; output_handoff: z.ZodString; description: z.ZodOptional; }, z.core.$loose>; type TeamInterfaceAcceptWorkflow = z.infer; declare const TeamInterfaceSchema: z.ZodObject<{ version: z.ZodNumber; description: z.ZodOptional; accepts: z.ZodOptional; input_handoff: z.ZodString; output_handoff: z.ZodString; description: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; exposes: z.ZodOptional; }, z.core.$loose>>; constraints: z.ZodOptional>; }, z.core.$loose>; type TeamInterface = z.infer; declare const ModelClassSchema: z.ZodEnum<{ fast: "fast"; standard: "standard"; thinking: "thinking"; }>; type ModelClass = z.infer; declare const ExecutionStepSchema: z.ZodObject<{ id: z.ZodString; action: z.ZodString; description: z.ZodOptional; required: z.ZodOptional; abort_on_failure: z.ZodOptional; uses_tool: z.ZodOptional; produces_artifact: z.ZodOptional; reads_artifact: z.ZodOptional; validates_artifact: z.ZodOptional; validation_kind: z.ZodOptional>; depends_on: z.ZodOptional>; skip_condition: z.ZodOptional; wait_for_approval: z.ZodOptional; }, z.core.$loose>; type ExecutionStep = z.infer; declare const TaskSchema: z.ZodObject<{ description: z.ZodString; target_agent: z.ZodString; allowed_from_agents: z.ZodDefault>; workflow: z.ZodString; input_artifacts: z.ZodArray; invocation_handoff: z.ZodString; result_handoff: z.ZodString; default_priority: z.ZodOptional; responsibilities: z.ZodOptional>; constraints: z.ZodOptional>; execution_steps: z.ZodOptional; required: z.ZodOptional; abort_on_failure: z.ZodOptional; uses_tool: z.ZodOptional; produces_artifact: z.ZodOptional; reads_artifact: z.ZodOptional; validates_artifact: z.ZodOptional; validation_kind: z.ZodOptional>; depends_on: z.ZodOptional>; skip_condition: z.ZodOptional; wait_for_approval: z.ZodOptional; }, z.core.$loose>>>; completion_criteria: z.ZodOptional>; rules: z.ZodOptional; description: z.ZodString; severity: z.ZodEnum<{ optional: "optional"; mandatory: "mandatory"; recommended: "recommended"; }>; detection_method: z.ZodOptional; escalation: z.ZodOptional; ref: z.ZodOptional; }, z.core.$loose>>>; anti_patterns: z.ZodOptional>; escalation_criteria: z.ZodOptional; }, z.core.$loose>>>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; validations: z.ZodDefault>; guardrails: z.ZodOptional>; model_class: z.ZodOptional>; effects: z.ZodOptional>; }, z.core.$loose>; type Task = z.infer; declare const CommandSchema: z.ZodObject<{ command: z.ZodString; category: z.ZodString; reads: z.ZodDefault>; writes: z.ZodDefault>; purpose: z.ZodOptional; }, z.core.$strip>; type Command = z.infer; declare const ToolSchema: z.ZodObject<{ kind: z.ZodOptional; extends: z.ZodOptional; command: z.ZodOptional; description: z.ZodOptional; input_artifacts: z.ZodDefault>; output_artifacts: z.ZodDefault>; invokable_by: z.ZodDefault>; cli_contract: z.ZodOptional; component_contract: z.ZodOptional; artifact_bindings: z.ZodDefault>; side_effects: z.ZodDefault>; commands: z.ZodDefault>; writes: z.ZodDefault>; purpose: z.ZodOptional; }, z.core.$strip>>>; guardrails: z.ZodOptional>; }, z.core.$loose>; type Tool = z.infer; 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>; executor: z.ZodOptional; blocking: z.ZodBoolean; produces_evidence: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>; type Validation = z.infer; declare const RetrySchema: z.ZodObject<{ condition: z.ZodString; fix_task: z.ZodString; revalidate_task: z.ZodOptional; }, z.core.$strip>; type Retry = z.infer; declare const ExternalParticipantSchema: z.ZodObject<{ id: z.ZodString; kind: z.ZodEnum<{ actor: "actor"; participant: "participant"; }>; label: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; type ExternalParticipant = z.infer; declare const WorkflowStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"delegate">; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; max_retries: z.ZodOptional; max_follow_ups: z.ZodOptional; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"gate">; description: z.ZodOptional; gate_kind: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"handoff">; description: z.ZodOptional; handoff_kind: z.ZodString; task: z.ZodOptional; from_agent: z.ZodOptional; group: z.ZodOptional; depends_on: z.ZodOptional>; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"validation">; description: z.ZodOptional; validation: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"decision">; description: z.ZodOptional; on: z.ZodOptional; routing_key: z.ZodOptional; branches: z.ZodRecord>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"team_task">; description: z.ZodOptional; to_team: z.ZodString; workflow: z.ZodString; handoff: z.ZodString; expects: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"evaluate">; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; evaluator_agent: z.ZodOptional; loop_to: z.ZodString; max_iterations: z.ZodNumber; inject_as: z.ZodOptional; on_exhausted: z.ZodOptional>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>], "type">; type WorkflowStep = z.infer; declare const WorkflowSchema: z.ZodObject<{ description: z.ZodOptional; entry_conditions: z.ZodDefault>; trigger: z.ZodOptional; steps: z.ZodArray; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; max_retries: z.ZodOptional; max_follow_ups: z.ZodOptional; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"gate">; description: z.ZodOptional; gate_kind: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"handoff">; description: z.ZodOptional; handoff_kind: z.ZodString; task: z.ZodOptional; from_agent: z.ZodOptional; group: z.ZodOptional; depends_on: z.ZodOptional>; retry: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"validation">; description: z.ZodOptional; validation: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"decision">; description: z.ZodOptional; on: z.ZodOptional; routing_key: z.ZodOptional; branches: z.ZodRecord>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"team_task">; description: z.ZodOptional; to_team: z.ZodString; workflow: z.ZodString; handoff: z.ZodString; expects: z.ZodString; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"evaluate">; description: z.ZodOptional; task: z.ZodString; from_agent: z.ZodString; evaluator_agent: z.ZodOptional; loop_to: z.ZodString; max_iterations: z.ZodNumber; inject_as: z.ZodOptional; on_exhausted: z.ZodOptional>; group: z.ZodOptional; depends_on: z.ZodOptional>; }, z.core.$loose>], "type">>; sections: z.ZodOptional; list: z.ZodOptional>; }, z.core.$loose>>>; external_participants: z.ZodDefault; label: z.ZodString; description: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$loose>; type Workflow = z.infer; interface LoadResult { data: Record; filePath: string; } declare class DslLoadError extends Error { readonly filePath?: string | undefined; constructor(message: string, filePath?: string | undefined); } declare function loadDsl(entryPath: string): Promise; declare class BaseResolveError extends Error { constructor(message: string); } declare function resolveBase(extendsValue: string, projectDir: string): Promise; declare class MergeError extends Error { constructor(message: string); } type AnyRecord = Record; declare function mergeDsl(base: AnyRecord, project: AnyRecord): AnyRecord; interface ResolveResult { data: Record; projectPath: string; basePaths: string[]; } declare function resolve(projectDirOrFile: string): Promise; declare class CloneError extends Error { constructor(message: string); } interface EffectiveEffects { derived: string[]; override?: string[]; effective: string[]; } declare function resolveToolEffects(tool: Tool): string[]; declare function resolveAgentEffects(dsl: Dsl, agentId: string, resolvedTools?: Record): EffectiveEffects; declare function resolveTaskEffects(dsl: Dsl, taskId: string, resolvedTools?: Record): EffectiveEffects; declare function isNarrowOnlyOverride(derived: string[], override: string[] | undefined): boolean; declare function collectAgentArtifactProducers(dsl: Dsl, artifactId: string, resolvedTools?: Record): Set; declare function collectAgentArtifactConsumers(dsl: Dsl, artifactId: string, resolvedTools?: Record): Set; declare function normalizeDerivedFrom(derivedFrom: string | string[] | undefined): string[]; /** * 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): Record; interface ArtifactBindingDiagnostic { severity: "warning" | "error"; rule: "unbound-artifact" | "orphan-binding" | "type-mismatch"; message: string; } interface ArtifactBindingResult { artifacts: Record; diagnostics: ArtifactBindingDiagnostic[]; } declare function resolveArtifactBinding(dslArtifacts: Record, registry: { artifacts: Record; }, mappings?: Record, paths?: Record): ArtifactBindingResult; interface BoundResolveOptions { artifactBinding?: { source: string; mappings?: Record; }; paths?: Record; } interface BoundResolveResult { data: Record; diagnostics: ArtifactBindingDiagnostic[]; } declare function resolveBound(resolvedDsl: Record, options: BoundResolveOptions): Promise; interface DiagnosticMessage { path: string; message: string; code: string; severity?: "error" | "warning"; } interface SchemaValidationResult { success: boolean; data?: Dsl; diagnostics: DiagnosticMessage[]; } declare function validateSchema(data: Record): 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): Promise; 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>; exclude: z.ZodOptional>; skip_empty: z.ZodOptional; }, z.core.$strip>; type RenderTarget = z.infer; declare const AuditConfigSchema: z.ZodOptional; model: z.ZodOptional; temperature: z.ZodOptional; cache_dir: z.ZodOptional; }, z.core.$strip>>; type AuditConfig$1 = z.infer; declare const AgentContractsConfigSchema: z.ZodObject<{ dsl: z.ZodOptional; vars: z.ZodOptional>; renders: z.ZodDefault; output: z.ZodString; include: z.ZodOptional>; exclude: z.ZodOptional>; skip_empty: z.ZodOptional; }, z.core.$strip>>>; bindings: z.ZodDefault>; active_guardrail_policy: z.ZodOptional; paths: z.ZodOptional>; teams: z.ZodOptional; bindings: z.ZodDefault>; vars: z.ZodOptional>; paths: z.ZodOptional>; active_guardrail_policy: z.ZodOptional; interface_output: z.ZodOptional; artifact_binding: z.ZodOptional>; }, z.core.$strip>]>>; }, z.core.$strip>>>; audit: z.ZodOptional; model: z.ZodOptional; temperature: z.ZodOptional; cache_dir: z.ZodOptional; }, z.core.$strip>>; artifact_coverage: z.ZodOptional>; }, z.core.$strip>>; artifact_binding: z.ZodOptional>; }, z.core.$strip>]>>; }, z.core.$strip>; type AgentContractsConfig = z.infer; interface ResolvedRenderTarget { template: string; context: ContextType; output: string; include?: string[]; exclude?: string[]; skip_empty?: boolean; } interface ResolvedArtifactBinding { source: string; mappings?: Record; } interface ResolvedTeamConfig { dsl: string; vars?: Record; bindings: string[]; activeGuardrailPolicy?: string; paths?: Record; interfaceOutput?: string; artifactBinding?: ResolvedArtifactBinding; } interface ResolvedConfig { dsl: string; vars?: Record; renders: ResolvedRenderTarget[]; configDir: string; bindings: string[]; activeGuardrailPolicy?: string; paths?: Record; teams?: Record; audit?: AuditConfig$1; artifactCoverage?: { exclude_patterns: string[]; }; artifactBinding?: ResolvedArtifactBinding; } interface LoadedBinding { filePath: string; binding: SoftwareBinding; } declare function loadBindings(bindingPaths: string[]): Promise; interface RenderOptions { loadedBindings?: LoadedBinding[]; activeGuardrailPolicy?: string; } declare function renderFromConfig(dsl: Dsl, renderTargets: ResolvedRenderTarget[], options?: RenderOptions): Promise; 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; dsl: Dsl; [key: string]: unknown; } interface PerWorkflowContext { workflow: Workflow & { id: string; }; relatedAgents: Dsl["agents"]; relatedTasks: Array<(Task & Record) & { 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>; anti_patterns: string[]; escalation_criteria: Array>; execution_steps: Array>; completion_criteria: string[]; } interface HandoffFieldView { name: string; type: string; required: boolean; enum?: string; } interface HandoffRoleView { handoffId: string; role: "producer" | "consumer"; taskId?: string; description?: string; resolvedSchema: Record; fields: HandoffFieldView[]; } 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[]; model_class?: string; } interface PerAgentContext { agent: (Agent & Record) & { id: string; }; tasks: Array<(Task & Record) & { id: string; }>; receivableTasks: Array<(Task & Record) & { id: string; }>; delegatableTasks: DelegatableTaskView[]; relatedArtifacts: Dsl["artifacts"]; relatedTools: Dsl["tools"]; relatedHandoffTypes: Dsl["handoff_types"]; resolvedHandoffTypes: Record>; producerHandoffs: HandoffRoleView[]; consumerHandoffs: HandoffRoleView[]; effectiveEffects: EffectiveEffects; 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; 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; }; 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; showPrompt?: boolean; adapter?: string; model?: string; team?: string; logFile?: 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; agents_reviewed: z.ZodOptional; prompts_reviewed: z.ZodOptional; completion_criteria_coverage: z.ZodObject<{ all_dimensions_inspected: z.ZodOptional; gaps_classified: z.ZodOptional; gate_analysis_complete: z.ZodOptional; guardrail_enforcement_verified: z.ZodOptional; scope_overlap_analyzed: z.ZodOptional; x_property_misuse_checked: z.ZodOptional; hallucinated_permissions_checked: z.ZodOptional; extension_consumption_checked: z.ZodOptional; }, z.core.$strip>; critical_gaps: z.ZodOptional; agent: z.ZodOptional; gap_type: z.ZodOptional>; severity: z.ZodOptional>; }, z.core.$strip>>>; recommendations: z.ZodOptional>; description: z.ZodOptional; fix_type: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>; type DslAuditResult = z.infer; /** * Audit orchestrator — runs LLM-based semantic audits via agent-contracts-runtime. * * Uses executeTask() from agent-contracts-runtime for the complete execution * lifecycle: adapter creation, DSL context loading, progress sink, and task invocation. * * 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; showPrompt: 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; declare function runAllAudits(dsl: Dsl, config: ResolvedConfig, auditConfig: AuditConfig, options: Omit): Promise; /** * 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; /** * 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; policy: GuardrailPolicy; binding: SoftwareBinding; all_bindings: Record; vars: Record; paths: Record; reporting: { commands: Record; fail_open: boolean; timeout_ms: number; } | null; resolved_checks: ResolvedCheck[]; tasks: Record; artifacts: Record; agents: Record; handoff_types: Record; workflow: Record; } /** @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; 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, 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; } interface ArtifactFileInfo { path_patterns: string[]; exclude_patterns: string[]; } declare function matchFileToArtifacts(filePath: string, artifacts: Record): string[]; declare function buildCoverageReport(files: string[], artifacts: Record): 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 ArtifactBindingDiagnostic, type ArtifactBindingResult, 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, type BoundResolveOptions, type BoundResolveResult, CONTEXT_TYPES, type Check, CheckSchema, CloneError, 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 EffectiveEffects, type EntityGuardrailEntry, type EntityValidationEntry, type EscalationCriterion, EscalationCriterionSchema, type EventMappingLink, EventMappingLinkSchema, type EventMappingRule, EventMappingRuleSchema, type EventMappingSpan, EventMappingSpanSchema, 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 HandoffFieldView, type HandoffRoleView, type HandoffType, HandoffTypeSchema, ITERABLE_CONTEXT_TYPES, type InsertAfterOperator, InsertAfterOperatorSchema, type LintDiagnostic, type LintRule, type LoadResult, type LoadedBinding, type Matcher, MatcherSchema, type MemoryCapability, MemoryCapabilitySchema, MergeError, type MergeableRecord, type MergedBehavioralSpec, type ModelClass, ModelClassSchema, 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 ResolvedArtifactBinding, 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, collectAgentArtifactConsumers, collectAgentArtifactProducers, computeExitCode, enumerateProjectFiles, expandDefaults, formatAuditResult, formatAuditResults, formatCoverageText, generateGuardrails, isNarrowOnlyOverride, lint, loadBindings, loadConfig, loadDsl, matchFileToArtifacts, mergeDsl, normalizeDerivedFrom, renderFromConfig, resolve, resolveAgentEffects, resolveAllOf, resolveArtifactBinding, resolveBase, resolveBindingTargetPath, resolveBound, resolveChecks, resolveDslPath, resolveEffectiveGuardrails, resolveEntityValidations, resolveSchemaRefs, resolveTaskEffects, resolveToolEffects, runAllAudits, runAudit, score, spectralLint, validateHandoffSchemas, validateSchema, yamlReservedKeySafetyRule };