// Generated by `pnpm contract:write`. Do not edit by hand. // These are compile-time wire types, not runtime decoders or authorization. export type WorkflowOperationName = | "workflow.admin.auth.delete" | "workflow.admin.auth.inspect" | "workflow.admin.auth.list" | "workflow.admin.auth.save" | "workflow.admin.connection_statuses.list" | "workflow.admin.connections.list" | "workflow.admin.events.list" | "workflow.admin.source_registry.add" | "workflow.admin.source_registry.apply" | "workflow.admin.source_registry.disable" | "workflow.admin.source_registry.enable" | "workflow.admin.source_registry.inspect" | "workflow.admin.source_registry.list" | "workflow.admin.source_registry.remove" | "workflow.admin.source_registry.update" | "workflow.artifacts.create_from_plan" | "workflow.artifacts.delete" | "workflow.artifacts.inspect" | "workflow.artifacts.list" | "workflow.artifacts.save" | "workflow.artifacts.validate_plan" | "workflow.capabilities.call" | "workflow.capabilities.inspect" | "workflow.capabilities.list" | "workflow.deployments.delete" | "workflow.deployments.inspect" | "workflow.deployments.list" | "workflow.deployments.save" | "workflow.deployments.validate" | "workflow.draft_workspaces.add_step" | "workflow.draft_workspaces.add_step_from_capability" | "workflow.draft_workspaces.bind" | "workflow.draft_workspaces.branch" | "workflow.draft_workspaces.compile" | "workflow.draft_workspaces.create_artifact" | "workflow.draft_workspaces.create_empty" | "workflow.draft_workspaces.create_from_capability" | "workflow.draft_workspaces.create_wrapper" | "workflow.draft_workspaces.delete" | "workflow.draft_workspaces.get" | "workflow.draft_workspaces.handle" | "workflow.draft_workspaces.inspect_authoring_contract" | "workflow.draft_workspaces.list" | "workflow.draft_workspaces.patch" | "workflow.draft_workspaces.remove_binding" | "workflow.draft_workspaces.remove_route" | "workflow.draft_workspaces.remove_step" | "workflow.draft_workspaces.replace_document" | "workflow.draft_workspaces.set_contract" | "workflow.draft_workspaces.set_name" | "workflow.draft_workspaces.set_route" | "workflow.draft_workspaces.set_start" | "workflow.draft_workspaces.set_step_input_bindings" | "workflow.draft_workspaces.set_step_input_map" | "workflow.draft_workspaces.set_step_output_bindings" | "workflow.draft_workspaces.set_step_output_map" | "workflow.draft_workspaces.set_workflow_output_bindings" | "workflow.draft_workspaces.set_workflow_output_map" | "workflow.draft_workspaces.update_capability_step" | "workflow.draft_workspaces.validate" | "workflow.drafts.create_from_capability" | "workflow.drafts.patch" | "workflow.drafts.validate" | "workflow.health" | "workflow.runs.inspect" | "workflow.runs.list" | "workflow.runs.resume" | "workflow.runs.start" | "workflow.runs.trace" | "workflow.sources.diagnose" | "workflow.sources.inspect" | "workflow.sources.list"; export const workflowOperationNames: readonly WorkflowOperationName[] = [ "workflow.admin.auth.delete", "workflow.admin.auth.inspect", "workflow.admin.auth.list", "workflow.admin.auth.save", "workflow.admin.connection_statuses.list", "workflow.admin.connections.list", "workflow.admin.events.list", "workflow.admin.source_registry.add", "workflow.admin.source_registry.apply", "workflow.admin.source_registry.disable", "workflow.admin.source_registry.enable", "workflow.admin.source_registry.inspect", "workflow.admin.source_registry.list", "workflow.admin.source_registry.remove", "workflow.admin.source_registry.update", "workflow.artifacts.create_from_plan", "workflow.artifacts.delete", "workflow.artifacts.inspect", "workflow.artifacts.list", "workflow.artifacts.save", "workflow.artifacts.validate_plan", "workflow.capabilities.call", "workflow.capabilities.inspect", "workflow.capabilities.list", "workflow.deployments.delete", "workflow.deployments.inspect", "workflow.deployments.list", "workflow.deployments.save", "workflow.deployments.validate", "workflow.draft_workspaces.add_step", "workflow.draft_workspaces.add_step_from_capability", "workflow.draft_workspaces.bind", "workflow.draft_workspaces.branch", "workflow.draft_workspaces.compile", "workflow.draft_workspaces.create_artifact", "workflow.draft_workspaces.create_empty", "workflow.draft_workspaces.create_from_capability", "workflow.draft_workspaces.create_wrapper", "workflow.draft_workspaces.delete", "workflow.draft_workspaces.get", "workflow.draft_workspaces.handle", "workflow.draft_workspaces.inspect_authoring_contract", "workflow.draft_workspaces.list", "workflow.draft_workspaces.patch", "workflow.draft_workspaces.remove_binding", "workflow.draft_workspaces.remove_route", "workflow.draft_workspaces.remove_step", "workflow.draft_workspaces.replace_document", "workflow.draft_workspaces.set_contract", "workflow.draft_workspaces.set_name", "workflow.draft_workspaces.set_route", "workflow.draft_workspaces.set_start", "workflow.draft_workspaces.set_step_input_bindings", "workflow.draft_workspaces.set_step_input_map", "workflow.draft_workspaces.set_step_output_bindings", "workflow.draft_workspaces.set_step_output_map", "workflow.draft_workspaces.set_workflow_output_bindings", "workflow.draft_workspaces.set_workflow_output_map", "workflow.draft_workspaces.update_capability_step", "workflow.draft_workspaces.validate", "workflow.drafts.create_from_capability", "workflow.drafts.patch", "workflow.drafts.validate", "workflow.health", "workflow.runs.inspect", "workflow.runs.list", "workflow.runs.resume", "workflow.runs.start", "workflow.runs.trace", "workflow.sources.diagnose", "workflow.sources.inspect", "workflow.sources.list", ]; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ArtifactKindPayload". */ export type ArtifactKindPayload = "workflow" | "wrapper"; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CapabilityKindPayload". */ export type CapabilityKindPayload = "tool" | "resource" | "prompt" | "node_spec" | "reducer" | "workflow"; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InspectCapabilityResult". */ export type InspectCapabilityResult = NodeSpecCapabilityDetail | WrapperArtifactCapabilityDetail; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "StepInputBinding". */ export type StepInputBinding = InputPathBinding | InputValueBinding | InputExpressionBinding; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "JsonValue". */ export type JsonValue = | boolean | number | string | JsonValue[] | { [k: string]: JsonValue; } | null; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InputExpression". */ export type InputExpression = LiteralExpression | PathExpression | ArrayExpression | ObjectExpression; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CompileDraftWorkspaceResult". */ export type CompileDraftWorkspaceResult = CompileDraftWorkspaceSuccess | InvalidDraftResult; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CreateArtifactFromWorkspaceResult". */ export type CreateArtifactFromWorkspaceResult = SavedDraftArtifactResult | UnsavedDraftArtifactResult; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringPathAvailability". */ export type AuthoringPathAvailability = "available" | "conditional"; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringPathOrigin". */ export type AuthoringPathOrigin = "workflow_input" | "workflow_state" | "runtime_context" | "step_input" | "step_output" | "workflow_output"; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringPathUse". */ export type AuthoringPathUse = "step_input" | "step_output_source" | "state_target" | "workflow_output"; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "PatchDraftResult". */ export type PatchDraftResult = PatchedDraftValidResult | PatchedDraftInvalidResult; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ValidateDraftResult". */ export type ValidateDraftResult = ValidDraftResult | InvalidDraftResult; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ResumeReadiness". */ export type ResumeReadiness = string; /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RunStatus". */ export type RunStatus = string; export interface WorkflowContractMap { "workflow.admin.auth.delete": { params: { auth_ref: string; }; result: DeleteAuthRecordResult; }; "workflow.admin.auth.inspect": { params: { auth_ref: string; }; result: AuthRecordSummaryPayload; }; "workflow.admin.auth.list": { params: Record; result: ListAuthRecordsResult; }; "workflow.admin.auth.save": { params: { auth_ref: string; scheme: string; payload?: { [k: string]: unknown; }; metadata?: { [k: string]: unknown; }; }; result: AuthRecordSummaryPayload; }; "workflow.admin.connection_statuses.list": { params: Record; result: ListConnectionStatusesResult; }; "workflow.admin.connections.list": { params: Record; result: ListConnectionsResult; }; "workflow.admin.events.list": { params: Record; result: ListAdminEventsResult; }; "workflow.admin.source_registry.add": { params: { entry: { [k: string]: unknown; }; }; result: RegistryEntryMutationResult; }; "workflow.admin.source_registry.apply": { params: Record; result: ApplyRegistryChangesResult; }; "workflow.admin.source_registry.disable": { params: { source_id: string; }; result: RegistryEntryMutationResult; }; "workflow.admin.source_registry.enable": { params: { source_id: string; }; result: RegistryEntryMutationResult; }; "workflow.admin.source_registry.inspect": { params: { source_id: string; }; result: InspectRegistryEntryResult; }; "workflow.admin.source_registry.list": { params: { cursor?: string | null; limit?: number; }; result: ListRegistryEntriesResult; }; "workflow.admin.source_registry.remove": { params: { source_id: string; }; result: RemoveRegistryEntryResult; }; "workflow.admin.source_registry.update": { params: { source_id: string; patch: { [k: string]: unknown; }; }; result: RegistryEntryMutationResult; }; "workflow.artifacts.create_from_plan": { params: { artifact_id: string; version: number; title: string; plan: { [k: string]: unknown; }; outcomes: string[]; kind?: "workflow" | "wrapper"; description?: string | null; required_capabilities?: { [k: string]: { [k: string]: unknown; }; } | null; source_bindings?: { [k: string]: string; } | null; created_from_catalog_version?: string | null; }; result: SaveArtifactResult; }; "workflow.artifacts.delete": { params: { artifact_id: string; version: number; }; result: DeleteArtifactResult; }; "workflow.artifacts.inspect": { params: { artifact_id: string; version: number; }; result: WorkflowArtifactPayload; }; "workflow.artifacts.list": { params: { query?: string | null; kind?: ("workflow" | "wrapper") | null; cursor?: string | null; limit?: number; }; result: ListArtifactsResult; }; "workflow.artifacts.save": { params: { artifact: { [k: string]: unknown; }; }; result: SaveArtifactResult; }; "workflow.artifacts.validate_plan": { params: { plan: { [k: string]: unknown; }; outcomes: string[]; required_capabilities?: { [k: string]: { [k: string]: unknown; }; } | null; source_bindings?: { [k: string]: string; } | null; }; result: ValidateArtifactPlanResult; }; "workflow.capabilities.call": { params: { qualified_name: string; payload?: { [k: string]: unknown; }; deployment_id?: string | null; }; result: CapabilityCallResult; }; "workflow.capabilities.inspect": { params: { qualified_name: string; }; result: InspectCapabilityResult; }; "workflow.capabilities.list": { params: { query?: string | null; source_id?: string | null; cursor?: string | null; limit?: number; }; result: ListCapabilitiesResult; }; "workflow.deployments.delete": { params: { deployment_id: string; }; result: DeleteDeploymentResult; }; "workflow.deployments.inspect": { params: { deployment_id: string; }; result: WorkflowDeploymentPayload; }; "workflow.deployments.list": { params: Record; result: ListDeploymentsResult; }; "workflow.deployments.save": { params: { deployment: { [k: string]: unknown; }; }; result: SaveDeploymentResult; }; "workflow.deployments.validate": { params: { deployment_id: string; live_check?: boolean; }; result: ValidateDeploymentResult; }; "workflow.draft_workspaces.add_step": { params: { workspace_id: string; revision: number; step_id: string; step: | DraftUseStep | DraftForeachStep | DraftInterruptStep | DraftEndStep | DraftWhenStep | DraftChooseStep | DraftMatchStep | DraftSubgraphStep; incoming?: RouteSourceParams | null; routes?: { [k: string]: string; } | null; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.add_step_from_capability": { params: { workspace_id: string; revision: number; step_id: string; capability_name: string; route_from_step?: string | null; route_from_outcome?: string; routes?: { [k: string]: string; } | null; input_map?: { [k: string]: string; } | null; input_bindings?: StepInputBinding[] | null; bind_outputs?: { [k: string]: string; }; desc?: string | null; retry?: number | null; timeout_seconds?: number | null; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.bind": { params: { workspace_id: string; revision: number; step_id: string; source_path: string; target_path: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.branch": { params: { workspace_id: string; revision: number; step_id: string; routes: { [k: string]: string; }; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.compile": { params: { workspace_id: string; }; result: CompileDraftWorkspaceResult; }; "workflow.draft_workspaces.create_artifact": { params: { workspace_id: string; artifact_id: string; version: number; title: string; outcomes: string[]; kind?: "workflow" | "wrapper"; description?: string | null; required_capabilities?: { [k: string]: { [k: string]: unknown; }; } | null; source_bindings?: { [k: string]: string; } | null; created_from_catalog_version?: string | null; }; result: CreateArtifactFromWorkspaceResult; }; "workflow.draft_workspaces.create_empty": { params: { workspace_id: string; name: string; title?: string | null; input_schema?: { [k: string]: unknown; } | null; state_schema?: { [k: string]: unknown; } | null; output_schema?: { [k: string]: unknown; } | null; outcomes?: string[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.create_from_capability": { params: { workspace_id: string; capability_name: string; name?: string | null; title?: string | null; input_schema?: { [k: string]: unknown; } | null; state_schema?: { [k: string]: unknown; } | null; output_schema?: { [k: string]: unknown; } | null; input?: StepInputBinding[] | null; output?: OutputBinding[] | null; input_map?: { [k: string]: string; } | null; output_map?: { [k: string]: string; } | null; error_message_source?: unknown; }; result: CreateDraftWorkspaceFromCapabilityResult; }; "workflow.draft_workspaces.create_wrapper": { params: { workspace_id: string; artifact_id: string; version: number; title: string; outcomes: string[]; description?: string | null; required_capabilities?: { [k: string]: { [k: string]: unknown; }; } | null; source_bindings?: { [k: string]: string; } | null; created_from_catalog_version?: string | null; }; result: CreateArtifactFromWorkspaceResult; }; "workflow.draft_workspaces.delete": { params: { workspace_id: string; }; result: DeleteDraftWorkspaceResult; }; "workflow.draft_workspaces.get": { params: { workspace_id: string; include_draft?: boolean; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.handle": { params: { workspace_id: string; revision: number; branches: HandleDraftBranch[]; target: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.inspect_authoring_contract": { params: { workspace_id: string; revision: number; selected_step_id?: string | null; }; result: AuthoringContractInventoryPayload | DraftWorkspaceResult; }; "workflow.draft_workspaces.list": { params: Record; result: ListDraftWorkspacesResult; }; "workflow.draft_workspaces.patch": { params: { workspace_id: string; revision: number; patch: { [k: string]: unknown; }[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.remove_binding": { params: { workspace_id: string; revision: number; step_id: string; inputs?: string[]; outputs?: string[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.remove_route": { params: { workspace_id: string; revision: number; step_id: string; outcome: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.remove_step": { params: { workspace_id: string; revision: number; step_id: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.replace_document": { params: { workspace_id: string; revision: number; draft: { [k: string]: unknown; }; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_contract": { params: { workspace_id: string; revision: number; input_schema?: { [k: string]: unknown; } | null; state_schema?: { [k: string]: unknown; } | null; output_schema?: { [k: string]: unknown; } | null; outcomes?: string[] | null; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_name": { params: { workspace_id: string; revision: number; name: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_route": { params: { workspace_id: string; revision: number; step_id: string; outcome: string; target: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_start": { params: { workspace_id: string; revision: number; step_id: string; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_step_input_bindings": { params: { workspace_id: string; revision: number; step_id: string; bindings: StepInputBinding[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_step_input_map": { params: { workspace_id: string; revision: number; step_id: string; input_map: { [k: string]: string; }; merge?: boolean; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_step_output_bindings": { params: { workspace_id: string; revision: number; step_id: string; bindings: OutputBinding[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_step_output_map": { params: { workspace_id: string; revision: number; step_id: string; output_map: { [k: string]: string; }; merge?: boolean; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_workflow_output_bindings": { params: { workspace_id: string; revision: number; bindings: (InputPathBinding | InputValueBinding)[]; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.set_workflow_output_map": { params: { workspace_id: string; revision: number; output_map: { [k: string]: string; }; merge?: boolean; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.update_capability_step": { params: { workspace_id: string; revision: number; step_id: string; update: CapabilityStepUpdate; }; result: DraftWorkspaceResult; }; "workflow.draft_workspaces.validate": { params: { workspace_id: string; }; result: DraftWorkspaceResult; }; "workflow.drafts.create_from_capability": { params: { workspace_id: string; capability_name: string; name?: string | null; title?: string | null; input_schema?: { [k: string]: unknown; } | null; state_schema?: { [k: string]: unknown; } | null; output_schema?: { [k: string]: unknown; } | null; input?: StepInputBinding[] | null; output?: OutputBinding[] | null; input_map?: { [k: string]: string; } | null; output_map?: { [k: string]: string; } | null; error_message_source?: unknown; }; result: CreateDraftWorkspaceFromCapabilityResult; }; "workflow.drafts.patch": { params: { draft: { [k: string]: unknown; }; patch: { [k: string]: unknown; }[]; }; result: PatchDraftResult; }; "workflow.drafts.validate": { params: { draft: { [k: string]: unknown; }; }; result: ValidateDraftResult; }; "workflow.health": { params: Record; result: HealthResult; }; "workflow.runs.inspect": { params: { run_id: string; }; result: RunResult; }; "workflow.runs.list": { params: { status?: ("completed" | "failed" | "interrupted") | null; cursor?: string | null; limit?: number; }; result: ListRunsResult; }; "workflow.runs.resume": { params: { run_id: string; resume_payload?: { [k: string]: unknown; }; resume_outcome?: string; trace_range?: TraceRangeParams | null; }; result: RunResult; }; "workflow.runs.start": { params: { deployment_id: string; workflow_input?: { [k: string]: unknown; }; trace_range?: TraceRangeParams | null; /** * Optional run step budget. The server default applies when omitted; resume never accepts a replacement. */ max_steps?: number | null; }; result: RunResult; }; "workflow.runs.trace": { params: { run_id: string; trace_range: TraceRangeParams; }; result: RunTraceResult; }; "workflow.sources.diagnose": { params: { source_id: string; }; result: SourceDiagnosisResult; }; "workflow.sources.inspect": { params: { source_id: string; }; result: InspectSourceResult; }; "workflow.sources.list": { params: { cursor?: string | null; limit?: number; }; result: ListSourcesResult; }; } /** * Outcome of deleting one auth record. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DeleteAuthRecordResult". */ export interface DeleteAuthRecordResult { deleted: boolean; id: string; } /** * Auth record summary without credential payload values. * * ``metadata`` is explicitly non-secret display data. Credential material * belongs in the omitted auth payload and is represented only by key names. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthRecordSummaryPayload". */ export interface AuthRecordSummaryPayload { id: string; metadata: JsonObject; payload_keys: string[]; scheme: string; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "JsonObject". */ export interface JsonObject { [k: string]: unknown; } /** * Sorted secret-safe auth record inventory. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListAuthRecordsResult". */ export interface ListAuthRecordsResult { auth_records: AuthRecordSummaryPayload[]; total: number; [k: string]: unknown; } /** * Sorted connection readiness inventory. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListConnectionStatusesResult". */ export interface ListConnectionStatusesResult { statuses: ConnectionStatusPayload[]; total: number; [k: string]: unknown; } /** * Connection readiness row with optional catalog snapshot facts. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ConnectionStatusPayload". */ export interface ConnectionStatusPayload { account?: string; connection_id: string; enabled: boolean; fetched_at_epoch_ms?: number | null; has_snapshot?: boolean; max_age_seconds?: number | null; node_count?: number; prompt_count?: number; resource_count?: number; server?: string; [k: string]: unknown; } /** * Sorted configured connection inventory. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListConnectionsResult". */ export interface ListConnectionsResult { connections: ConnectionPayload[]; total: number; [k: string]: unknown; } /** * Configured connection inventory row with provider extensions preserved. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ConnectionPayload". */ export interface ConnectionPayload { account: string; enabled: boolean; id: string; metadata: JsonObject; server: string; source_config_ownership?: string; [k: string]: unknown; } /** * Chronological platform event history. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListAdminEventsResult". */ export interface ListAdminEventsResult { events: AdminEventPayload[]; total: number; [k: string]: unknown; } /** * Chronological platform event with provider-specific payload preserved. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AdminEventPayload". */ export interface AdminEventPayload { capability_id?: string | null; connection_id?: string | null; kind: string; payload: JsonObject; timestamp_epoch_ms: number; workflow_name?: string | null; [k: string]: unknown; } /** * Desired source entry returned after add, update, or enablement changes. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RegistryEntryMutationResult". */ export interface RegistryEntryMutationResult { entry: RegistryEntryPayload; shadowed_by_config: boolean; [k: string]: unknown; } /** * Desired source entry with provider-specific configuration preserved. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RegistryEntryPayload". */ export interface RegistryEntryPayload { account?: string | null; auth_ref?: string | null; enabled: boolean; id: string; kind: string; metadata?: JsonObject; profile?: string | null; provider?: string | null; transport?: JsonObject | null; [k: string]: unknown; } /** * Summary of reconciling desired registry state into the live service. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ApplyRegistryChangesResult". */ export interface ApplyRegistryChangesResult { applied: boolean; auth_diagnostics?: DependencyDiagnosticPayload[]; connection_count: number; registered: string[]; registry_entry_count: number; removed: string[]; updated: string[]; [k: string]: unknown; } /** * JSON projection of one deployment dependency diagnostic. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DependencyDiagnosticPayload". */ export interface DependencyDiagnosticPayload { bound_source: string | null; code: string; logical_ref: string; message: string; repair_hint: string | null; severity: string; [k: string]: unknown; } /** * Full desired source entry with config precedence facts. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InspectRegistryEntryResult". */ export interface InspectRegistryEntryResult { config_ownership: string | null; entry: RegistryEntryPayload; mutable: boolean; shadowed_by_config: boolean; [k: string]: unknown; } /** * Cursor-paged desired source registry entries. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListRegistryEntriesResult". */ export interface ListRegistryEntriesResult { entries: RegistryEntrySummaryPayload[]; next_cursor: string | null; total: number; [k: string]: unknown; } /** * Compact desired-source row including config precedence facts. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RegistryEntrySummaryPayload". */ export interface RegistryEntrySummaryPayload { account: string | null; auth_ref: string | null; config_ownership: string | null; enabled: boolean; id: string; kind: string; mutable: boolean; profile: string | null; provider: string | null; shadowed_by_config: boolean; transport_kind: string | null; [k: string]: unknown; } /** * Outcome of removing one desired source registry entry. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RemoveRegistryEntryResult". */ export interface RemoveRegistryEntryResult { removed: boolean; source_id: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SaveArtifactResult". */ export interface SaveArtifactResult { artifact_id: string; saved: boolean; version: number; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DeleteArtifactResult". */ export interface DeleteArtifactResult { artifact_id: string; blocked_by_deployments: string[]; deleted: boolean; version: number; [k: string]: unknown; } /** * Normalized immutable artifact returned by inspect operations. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WorkflowArtifactPayload". */ export interface WorkflowArtifactPayload { created_from_catalog_version: string | null; description: string | null; id: string; input_schema: JsonObject; kind: ArtifactKindPayload; outcomes: string[]; output_schema: JsonObject; plan: JsonObject; required_capabilities: RequiredCapabilityPayload[]; title: string; version: number; workflow_dependencies: { [k: string]: number; }; [k: string]: unknown; } /** * Saved dependency contract for one artifact capability reference. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RequiredCapabilityPayload". */ export interface RequiredCapabilityPayload { input_schema_hash: string | null; input_schema_snapshot: JsonObject | null; kind: CapabilityKindPayload; observed_at_epoch_ms: number | null; observed_concrete_source: string | null; output_schema_hash: string | null; output_schema_snapshot: JsonObject | null; ref: CapabilityRefPayload; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CapabilityRefPayload". */ export interface CapabilityRefPayload { capability_key: string; source: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListArtifactsResult". */ export interface ListArtifactsResult { next_cursor: string | null; nodes: ArtifactCatalogEntryPayload[]; total: number; [k: string]: unknown; } /** * Compact artifact row returned by discovery operations. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ArtifactCatalogEntryPayload". */ export interface ArtifactCatalogEntryPayload { artifact_id: string; description: string | null; diagnostics: DependencyDiagnosticPayload[]; display_name: string; input_schema: JsonObject; kind: string; name: string; outcomes: string[]; output_schema: JsonObject; required_sources: string[]; version: number; [k: string]: unknown; } /** * Non-persisting artifact-plan validation and dependency inventory. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ValidateArtifactPlanResult". */ export interface ValidateArtifactPlanResult { diagnostics: ArtifactPlanDiagnosticPayload[]; required_capabilities: RequiredCapabilityPayload[]; status: "valid" | "invalid"; workflow_dependencies: { [k: string]: number; }; [k: string]: unknown; } /** * Stable diagnostic projected when an artifact plan is invalid. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ArtifactPlanDiagnosticPayload". */ export interface ArtifactPlanDiagnosticPayload { code: string; message: string; path: string; repair_hint: string | null; severity: "error" | "warning"; [k: string]: unknown; } /** * Outcome returned by a direct node-spec or wrapper capability call. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CapabilityCallResult". */ export interface CapabilityCallResult { deployment_id: string | null; diagnostics: DependencyDiagnosticPayload[]; kind: "node_spec" | "wrapper_artifact"; outcome: string; output: JsonObject | null; qualified_name: string; source_id: string; [k: string]: unknown; } /** * Full executable contract for one source node spec. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NodeSpecCapabilityDetail". */ export interface NodeSpecCapabilityDetail { accepts_context: boolean; description: string | null; input_schema: JsonObject; is_async: boolean; kind: "node_spec"; name: string; outcomes: string[]; output_schema: JsonObject; source_id: string; wrapper_hints: WrapperAuthoringHintsPayload; [k: string]: unknown; } /** * Transport-neutral projection of conservative wrapper scaffolding hints. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WrapperAuthoringHintsPayload". */ export interface WrapperAuthoringHintsPayload { capability_name: string; confidence: "high" | "medium" | "low"; declared_outcomes: string[]; input_map: { [k: string]: string; }; input_schema: JsonObject; missing_decisions: WrapperMissingDecisionPayload[]; notes: string[]; outcome_candidates: WrapperOutcomeCandidatePayload[]; outcome_policy: "preserve_declared" | "manual_mapping_required"; output_map: { [k: string]: string; }; output_schema: JsonObject; state_schema: JsonObject; suggested_wrapper_outcomes: string[]; [k: string]: unknown; } /** * One unresolved wrapper-authoring decision. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WrapperMissingDecisionPayload". */ export interface WrapperMissingDecisionPayload { kind: "choose_output_fields" | "review_nested_output" | "confirm_boolean_outcomes" | "choose_error_mapping"; message: string; [k: string]: unknown; } /** * Possible wrapper outcome mapping that still requires caller judgment. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WrapperOutcomeCandidatePayload". */ export interface WrapperOutcomeCandidatePayload { automatic: boolean; candidate_outcomes: string[]; confidence: "high" | "medium" | "low"; kind: "boolean_control_field"; reason: string; source: string; [k: string]: unknown; } /** * Full callable contract for one saved wrapper artifact. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WrapperArtifactCapabilityDetail". */ export interface WrapperArtifactCapabilityDetail { artifact_id: string; description: string | null; input_schema: JsonObject; is_async: boolean; kind: "wrapper_artifact"; name: string; outcomes: string[]; output_schema: JsonObject; required_capabilities: { [k: string]: RequiredCapabilityPayload; }; source_id: string; title: string; version: number; wrapper_hints: WrapperAuthoringHintsPayload; [k: string]: unknown; } /** * Cursor-paged planner-visible capability discovery result. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListCapabilitiesResult". */ export interface ListCapabilitiesResult { capabilities: (NodeSpecCapabilitySummary | WrapperArtifactCapabilitySummary)[]; next_cursor: string | null; total: number; [k: string]: unknown; } /** * Compact discovery row for one executable source node spec. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NodeSpecCapabilitySummary". */ export interface NodeSpecCapabilitySummary { description: string | null; input_fields: string[]; is_async: boolean; kind: "node_spec"; name: string; outcomes: string[]; output_fields: string[]; source_id: string; [k: string]: unknown; } /** * Compact discovery row for one saved wrapper artifact. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WrapperArtifactCapabilitySummary". */ export interface WrapperArtifactCapabilitySummary { artifact_id: string; description: string | null; input_fields: string[]; is_async: boolean; kind: "wrapper_artifact"; name: string; outcomes: string[]; output_fields: string[]; source_id: string; title: string; version: number; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DeleteDeploymentResult". */ export interface DeleteDeploymentResult { deleted: boolean; deployment_id: string; [k: string]: unknown; } /** * Serialized deployment accepted and returned by workflow API surfaces. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WorkflowDeploymentPayload". */ export interface WorkflowDeploymentPayload { artifact_id: string; artifact_version: number; bindings: SourceBindingPayload[]; drift_policy: string; id: string; [k: string]: unknown; } /** * JSON projection of a logical-to-concrete deployment source binding. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceBindingPayload". */ export interface SourceBindingPayload { concrete_source: string; logical_source: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListDeploymentsResult". */ export interface ListDeploymentsResult { deployments: DeploymentSummary[]; [k: string]: unknown; } /** * Compact deployment row used by list operations. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DeploymentSummary". */ export interface DeploymentSummary { artifact_id: string; artifact_version: number; binding_count: number; drift_policy: string; id: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SaveDeploymentResult". */ export interface SaveDeploymentResult { artifact_id: string; artifact_version: number; deployment_id: string; saved: boolean; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ValidateDeploymentResult". */ export interface ValidateDeploymentResult { artifact_id: string; artifact_version: number; deployment_id: string; diagnostics: DependencyDiagnosticPayload[]; next_actions: NextActionsPayload; status: "runnable" | "unrunnable"; [k: string]: unknown; } /** * JSON projection of advisory workflow continuation guidance. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NextActionsPayload". */ export interface NextActionsPayload { can_continue: boolean; can_save_now: boolean | null; patch_examples: NextActionPatchExamplePayload[]; reason: string; recommended_next_tool: string | null; warnings: string[]; [k: string]: unknown; } /** * Concrete follow-up operation suggested to an API caller. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NextActionPatchExamplePayload". */ export interface NextActionPatchExamplePayload { description: string; request: JsonObject; tool: string; [k: string]: unknown; } /** * Draft step that calls one externally resolvable workflow capability. * * `output` writes node-local output fields into workflow state. Root * workflow output bindings live on `WorkflowDraft.output`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftUseStep". */ export interface DraftUseStep { desc?: string | null; /** * Canonical input bindings for this capability. Use path bindings for graph-to-local input and value bindings for literals. */ input?: StepInputBinding[]; /** * Canonical output bindings from node-local output paths to workflow state destinations. */ output?: OutputBinding[]; retry?: number | null; timeout_seconds?: number | null; use: string; } /** * Map one workflow graph source path into one node-local input path. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InputPathBinding". */ export interface InputPathBinding { /** * Workflow source path to read from input, state, or context. Prefer canonical strings such as `input.text` or `state.report`. Structural objects such as {'root': 'input', 'parts': ['text']} are also accepted as input. */ path: | string | { /** * @minItems 0 */ parts: string[]; root: "input" | "state" | "context"; }; /** * Node-local input path to populate. Prefer canonical strings such as `field` or `.` for the whole node input payload. Structural objects such as {'root': 'local', 'parts': ['field']} are also accepted as input. */ target: | string | { /** * @minItems 0 */ parts: string[]; root: "local"; }; } /** * Map one static value into one node-local input path. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InputValueBinding". */ export interface InputValueBinding { /** * Node-local input path that receives this literal JSON value. */ target: | string | { /** * @minItems 0 */ parts: string[]; root: "local"; }; /** * Literal JSON-compatible value to pass to the node. Use this for constants, not for values read from workflow input or state. */ value: | boolean | number | string | JsonValue[] | { [k: string]: JsonValue; } | null; } /** * Assign one recursively composed expression to a node-local target. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InputExpressionBinding". */ export interface InputExpressionBinding { expression: InputExpression; /** * Node-local path. Use the root marker `.` for the whole payload. */ target: | string | { /** * @minItems 0 */ parts: string[]; root: "local"; }; } /** * A strict JSON literal embedded in a node-local input expression. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "LiteralExpression". */ export interface LiteralExpression { kind: "literal"; value: JsonValue; } /** * Read one graph source path while resolving a composite input. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "PathExpression". */ export interface PathExpression { kind: "path"; /** * Readable graph path rooted at input, state, or context. */ path: | string | { /** * @minItems 0 */ parts: string[]; root: "input" | "state" | "context"; }; } /** * Resolve ordered child expressions into one JSON array. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ArrayExpression". */ export interface ArrayExpression { items: InputExpression[]; kind: "array"; } /** * Resolve named child expressions into one JSON object. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ObjectExpression". */ export interface ObjectExpression { fields: { [k: string]: InputExpression; }; kind: "object"; } /** * Map one node-local output path into one workflow state path. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "OutputBinding". */ export interface OutputBinding { /** * Node-local output path to read. Prefer canonical strings such as `result` or `.` for the whole node output payload. Structural objects such as {'root': 'local', 'parts': []} are also accepted as input. */ source: | string | { /** * @minItems 0 */ parts: string[]; root: "local"; }; /** * Writable workflow state path. Bare state is invalid; use a field path such as `state.echoed`. Structural objects such as {'root': 'state', 'parts': ['echoed']} are also accepted as input. */ target: | string | { /** * @minItems 1 */ parts: [string, ...string[]]; root: "state"; }; } /** * Draft step that delegates foreach construction to `WorkflowBuilder`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftForeachStep". */ export interface DraftForeachStep { foreach: DraftForeachPayload; } /** * Payload for one draft foreach step. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftForeachPayload". */ export interface DraftForeachPayload { as: string; concurrent?: ForeachConcurrentPolicy | null; item_error?: ForeachItemErrorPolicy; mode?: "serial" | "concurrent"; /** * Deprecated parse-only shorthand; use item_error. */ on_item_error?: ("fail" | "collect" | "skip") | null; /** * Readable graph path rooted at input, state, or context. */ over: | string | { /** * @minItems 0 */ parts: string[]; root: "input" | "state" | "context"; }; } /** * Concurrency policy for foreach frame admission. * * This controls workflow-level child frame admission. It does not imply * thread/process execution for sync node handlers; async runtime can use the * same policy to admit simultaneous async handler calls later. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ForeachConcurrentPolicy". */ export interface ForeachConcurrentPolicy { interrupt?: "quiesce"; max_active?: number; max_outstanding?: number; } /** * Policy for runtime failures inside one foreach item lineage. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ForeachItemErrorPolicy". */ export interface ForeachItemErrorPolicy { action?: "fail" | "skip" | "collect"; collect_to?: | ( | string | { /** * @minItems 1 */ parts: [string, ...string[]]; root: "state"; } ) | null; } /** * Draft step that pauses execution and waits for resume input. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftInterruptStep". */ export interface DraftInterruptStep { interrupt: DraftInterruptPayload; } /** * Payload for one draft interrupt step. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftInterruptPayload". */ export interface DraftInterruptPayload { kind: string; outcomes?: string[]; request?: StepInputBinding[]; request_schema?: SchemaRef | null; resume?: OutputBinding[]; resume_schema?: SchemaRef | null; } /** * JSON Schema object used at workflow and node boundaries. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SchemaRef". */ export interface SchemaRef { properties?: { [k: string]: unknown; }; required?: string[]; title?: string | null; type?: string | string[] | null; [k: string]: unknown; } /** * Draft step that lowers to core `EndNode`. * * Route to this step when the workflow should finish with a non-`ok` public * outcome. Routing directly to `__end__` remains the shorthand for `ok`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftEndStep". */ export interface DraftEndStep { end?: DraftEndPayload; } /** * Payload for one explicit workflow terminal outcome. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftEndPayload". */ export interface DraftEndPayload { outcome?: string; } /** * Draft step that delegates one boolean decision to `WorkflowBuilder.when`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftWhenStep". */ export interface DraftWhenStep { when: DraftWhenPayload; } /** * Payload for one boolean draft decision. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftWhenPayload". */ export interface DraftWhenPayload { if: ExistsCondition | NotCondition | VariadicCondition | BinaryCondition; otherwise?: string; then: string; } /** * Condition that is true when a graph path resolves to a present value. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ExistsCondition". */ export interface ExistsCondition { op: "exists"; /** * Readable graph path rooted at input, state, or context. */ path: | string | { /** * @minItems 0 */ parts: string[]; root: "input" | "state" | "context"; }; [k: string]: unknown; } /** * Condition that negates another condition expression. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NotCondition". */ export interface NotCondition { arg: ExistsCondition | NotCondition | VariadicCondition | BinaryCondition; op: "not"; [k: string]: unknown; } /** * Condition that combines one or more child conditions. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "VariadicCondition". */ export interface VariadicCondition { /** * @minItems 1 */ args: [ ExistsCondition | NotCondition | VariadicCondition | BinaryCondition, ...(ExistsCondition | NotCondition | VariadicCondition | BinaryCondition)[] ]; op: "and" | "or"; [k: string]: unknown; } /** * Condition that compares two operands. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "BinaryCondition". */ export interface BinaryCondition { left: PathOperand | LiteralOperand; op: "eq" | "ne" | "gt" | "ge" | "lt" | "le"; right: PathOperand | LiteralOperand; [k: string]: unknown; } /** * Condition operand resolved from a workflow graph path. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "PathOperand". */ export interface PathOperand { /** * Readable graph path rooted at input, state, or context. */ path: | string | { /** * @minItems 0 */ parts: string[]; root: "input" | "state" | "context"; }; [k: string]: unknown; } /** * Condition operand that carries a literal value. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "LiteralOperand". */ export interface LiteralOperand { value: unknown; [k: string]: unknown; } /** * Draft step that delegates ordered decisions to `WorkflowBuilder.choose`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftChooseStep". */ export interface DraftChooseStep { choose: DraftChoosePayload; } /** * Payload for an ordered first-true draft decision. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftChoosePayload". */ export interface DraftChoosePayload { /** * @minItems 1 */ clauses: [DraftChooseClause, ...DraftChooseClause[]]; default?: string; } /** * One ordered boolean clause in a draft choose decision. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftChooseClause". */ export interface DraftChooseClause { if: ExistsCondition | NotCondition | VariadicCondition | BinaryCondition; then: string; } /** * Draft step that delegates equality decisions to `WorkflowBuilder.match`. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftMatchStep". */ export interface DraftMatchStep { match: DraftMatchPayload; } /** * Payload for matching one graph value against ordered equality cases. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftMatchPayload". */ export interface DraftMatchPayload { /** * @minItems 1 */ cases: [DraftMatchCase, ...DraftMatchCase[]]; default?: string; value: string; } /** * One ordered equality case in a draft match decision. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftMatchCase". */ export interface DraftMatchCase { equals: unknown; then: string; } /** * Draft step that lowers to a native `SubgraphNode` boundary. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftSubgraphStep". */ export interface DraftSubgraphStep { subgraph: DraftSubgraphPayload; } /** * Declarative boundary contract for a referenced child workflow. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftSubgraphPayload". */ export interface DraftSubgraphPayload { desc?: string | null; input?: StepInputBinding[]; input_schema?: SchemaRef; /** * @minItems 1 */ outcomes?: [string, ...string[]]; output?: OutputBinding[]; output_schema?: SchemaRef; workflow: WorkflowRef; } /** * Structural reference to a child workflow contract. * * Core needs a workflow reference for graph shape and validation, but it must * not depend on artifact stores or MCP capability naming. Saved workflow * artifacts can use ``artifact_id`` plus ``version``; local compiled workflows * can use ``name``. Legacy strings parse as ``name`` unless they use the old * ``workflow..v`` display format. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WorkflowRef". */ export interface WorkflowRef { /** * Saved workflow artifact id, when referencing an immutable artifact. */ artifact_id?: string | null; /** * Local workflow registry name. */ name?: string | null; /** * Saved workflow artifact version. Requires artifact_id. */ version?: number | null; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RouteSourceParams". */ export interface RouteSourceParams { outcome?: string; step_id: string; } /** * Canonical persisted workspace envelope returned after reads and edits. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftWorkspaceResult". */ export interface DraftWorkspaceResult { diagnostics: DraftDiagnosticPayload[]; draft?: JsonObject; revision: number; status: "valid" | "invalid" | "conflict"; summary: DraftWorkspaceSummary; title: string | null; workspace_id: string; [k: string]: unknown; } /** * One validation or revision diagnostic attached to a draft workspace. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftDiagnosticPayload". */ export interface DraftDiagnosticPayload { code: string; details?: JsonObject; message: string; path: string; repair_hint?: string | null; step_id?: string | null; [k: string]: unknown; } /** * Compact graph facts included with every persisted workspace result. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DraftWorkspaceSummary". */ export interface DraftWorkspaceSummary { name: unknown; route_count: number; start: unknown; step_count: number; steps: string[]; [k: string]: unknown; } /** * Compiled raw plan and dependencies for one valid draft workspace. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CompileDraftWorkspaceSuccess". */ export interface CompileDraftWorkspaceSuccess { compiled_plan: JsonObject; required_capabilities: { [k: string]: RequiredCapabilityPayload; }; [k: string]: unknown; } /** * Validation-only result returned when a draft cannot be compiled. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InvalidDraftResult". */ export interface InvalidDraftResult { diagnostics: DraftDiagnosticPayload[]; status: "invalid"; [k: string]: unknown; } /** * Saved artifact result with source-binding guidance derived from a draft. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SavedDraftArtifactResult". */ export interface SavedDraftArtifactResult { artifact_id: string; required_logical_sources: string[]; saved: true; suggested_bindings: { [k: string]: string; }; version: number; [k: string]: unknown; } /** * Validation result when an invalid workspace is not saved as an artifact. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "UnsavedDraftArtifactResult". */ export interface UnsavedDraftArtifactResult { diagnostics: DraftDiagnosticPayload[]; revision: number; saved: false; status: "invalid"; workspace_id: string; [k: string]: unknown; } /** * Bootstrapped workspace plus the hints and next actions that shaped it. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CreateDraftWorkspaceFromCapabilityResult". */ export interface CreateDraftWorkspaceFromCapabilityResult { diagnostics: DraftDiagnosticPayload[]; draft?: JsonObject; next_actions: NextActionsPayload; revision: number; status: "valid" | "invalid" | "conflict"; summary: DraftWorkspaceSummary; title: string | null; workspace_id: string; wrapper_hints: WrapperAuthoringHintsPayload; [k: string]: unknown; } /** * Outcome of deleting one persisted draft workspace. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "DeleteDraftWorkspaceResult". */ export interface DeleteDraftWorkspaceResult { deleted: boolean; status: "deleted" | "not_found"; workspace_id: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "HandleDraftBranch". */ export interface HandleDraftBranch { outcome: string; step_id: string; } /** * Revision-scoped readable sources and writable authoring targets. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringContractInventoryPayload". */ export interface AuthoringContractInventoryPayload { entry_steps: AuthoringStepContractPayload[]; readable_sources: AuthoringPathOptionPayload[]; revision: number; selected_step_id: string | null; state_targets: AuthoringPathOptionPayload[]; step_input_targets: AuthoringPathOptionPayload[]; step_output_sources: AuthoringPathOptionPayload[]; warnings: string[]; workflow_outcomes: string[]; workflow_output_targets: AuthoringPathOptionPayload[]; workspace_id: string; [k: string]: unknown; } /** * Compact executable-step choice used by authoring inventories. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringStepContractPayload". */ export interface AuthoringStepContractPayload { description?: string; input_targets?: AuthoringPathOptionPayload[]; label: string; outcomes?: string[]; output_sources?: AuthoringPathOptionPayload[]; step_id: string; [k: string]: unknown; } /** * One schema-derived source or target available to an author. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "AuthoringPathOptionPayload". */ export interface AuthoringPathOptionPayload { availability: AuthoringPathAvailability; description?: string; label: string; origin: AuthoringPathOrigin; path: string; reason?: string; required: boolean; schema: JsonObject; uses: AuthoringPathUse[]; [k: string]: unknown; } /** * All persisted draft-workspace summaries. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListDraftWorkspacesResult". */ export interface ListDraftWorkspacesResult { workspaces: DraftWorkspaceResult[]; [k: string]: unknown; } /** * Presence-aware patch for one existing capability-backed draft step. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "CapabilityStepUpdate". */ export interface CapabilityStepUpdate { desc?: string | null; input?: StepInputBinding[] | null; retry?: number | null; timeout_seconds?: number | null; } /** * Valid draft document produced after applying a JSON Patch. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "PatchedDraftValidResult". */ export interface PatchedDraftValidResult { compiled_plan: JsonObject; diagnostics: DraftDiagnosticPayload[]; draft: JsonObject; status: "valid"; [k: string]: unknown; } /** * Invalid patch result, optionally retaining the applied draft document. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "PatchedDraftInvalidResult". */ export interface PatchedDraftInvalidResult { diagnostics: DraftDiagnosticPayload[]; draft?: JsonObject; status: "invalid"; [k: string]: unknown; } /** * Successful validation of one stateless draft document. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ValidDraftResult". */ export interface ValidDraftResult { compiled_plan: JsonObject; diagnostics: DraftDiagnosticPayload[]; status: "valid"; [k: string]: unknown; } /** * Health response shared by self-describing workflow transports. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "HealthResult". */ export interface HealthResult { status: "ok"; store_root: string; [k: string]: unknown; } /** * Run operation result with an optional caller-requested trace slice. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RunResult". */ export interface RunResult { artifact_id: string; artifact_version: number; deployment_id: string; diagnostics: DependencyDiagnosticPayload[]; error: string | null; interrupt: InterruptPayload | null; max_steps: number; next_actions: NextActionsPayload; outcome: string | null; output: JsonObject | null; resume_readiness: ResumeReadiness | null; run_id: string | null; status: RunStatus; steps_executed: number; steps_remaining: number; trace?: TraceEntryPayload[]; trace_count: number; trace_limit?: number; trace_start?: number; trace_truncated?: boolean; [k: string]: unknown; } /** * Persisted typed interrupt contract exposed to API clients. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InterruptPayload". */ export interface InterruptPayload { frame_id: string; id: string; kind: string; node_id: string; outcomes: string[]; payload: JsonObject; request_schema: JsonSchema; resumable: boolean; resume_schema: JsonSchema; route: InterruptRoutePayload | null; typed: boolean; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "JsonSchema". */ export interface JsonSchema { [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InterruptRoutePayload". */ export interface InterruptRoutePayload { frame_id: string; lineage_id: string; node_id: string; parent_frame_id: string; scope_id: string; workflow_ref: WorkflowRefPayload; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "WorkflowRefPayload". */ export interface WorkflowRefPayload { artifact_id?: string; name?: string; version?: number; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "TraceEntryPayload". */ export interface TraceEntryPayload { frame_id: string; next_node_id: string; node_id: string; outcome: string; output: JsonObject; resolved_input: JsonObject; state_changes: JsonObject; step_number: number | null; step_type: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListRunsResult". */ export interface ListRunsResult { cursor: string | null; limit: number; next_cursor: string | null; runs: RunSummary[]; total: number; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RunSummary". */ export interface RunSummary { artifact_id: string; artifact_version: number; created_at: string; deployment_id: string; diagnostic_count: number; resume_readiness: ResumeReadiness; run_id: string; status: RunStatus; updated_at: string; [k: string]: unknown; } /** * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "TraceRangeParams". */ export interface TraceRangeParams { /** * Maximum trace entries to return; full traces are never implicit. */ limit?: number; /** * Zero-based trace offset. */ start?: number; } /** * Run result where a bounded trace slice is always present. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "RunTraceResult". */ export interface RunTraceResult { artifact_id: string; artifact_version: number; deployment_id: string; diagnostics: DependencyDiagnosticPayload[]; error: string | null; interrupt: InterruptPayload | null; max_steps: number; next_actions: NextActionsPayload; outcome: string | null; output: JsonObject | null; resume_readiness: ResumeReadiness | null; run_id: string | null; status: RunStatus; steps_executed: number; steps_remaining: number; trace: TraceEntryPayload[]; trace_count: number; trace_limit: number; trace_start: number; trace_truncated: boolean; [k: string]: unknown; } /** * Stable source-diagnostics envelope with provider-specific extensions. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceDiagnosisResult". */ export interface SourceDiagnosisResult { auth?: SourceAuthDiagnosisPayload; catalog?: SourceCatalogDiagnosisPayload; diagnostics: DependencyDiagnosticPayload[]; enabled?: boolean; message?: string; source_id: string; status: string; transport?: SourceTransportDiagnosisPayload; [k: string]: unknown; } /** * Known auth-health fields reported by a diagnostics provider. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceAuthDiagnosisPayload". */ export interface SourceAuthDiagnosisPayload { auth_ref?: string | null; record_present?: boolean | null; scheme?: string | null; transport_supported?: boolean; [k: string]: unknown; } /** * Known catalog-health fields reported by a diagnostics provider. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceCatalogDiagnosisPayload". */ export interface SourceCatalogDiagnosisPayload { fetched_at_epoch_ms?: number | null; has_snapshot?: boolean; max_age_seconds?: number | null; node_count?: number; prompt_count?: number; resource_count?: number; [k: string]: unknown; } /** * Known transport-health fields reported by a diagnostics provider. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceTransportDiagnosisPayload". */ export interface SourceTransportDiagnosisPayload { configured?: boolean; kind?: string | null; [k: string]: unknown; } /** * Full source inventory with optional diagnostics supplied by the runtime. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "InspectSourceResult". */ export interface InspectSourceResult { capabilities: SourceCapabilityInventoryPayload; description: string | null; diagnostics?: SourceDiagnosisResult | SourceDiagnosticsUnavailablePayload; enabled: boolean; has_more: SourceCapabilityHasMorePayload; id: string; kind: "system" | "connection" | "python"; node_spec_count: number; permissions: SourcePermissionsPayload; policy: SourcePolicyPayload; preview: SourceCapabilityPreviewPayload; prompt_count: number; reducer_count: number; resource_count: number; tool_count: number; visibility: SourceVisibilityPayload; [k: string]: unknown; } /** * Capability names and detailed executable contracts owned by a source. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceCapabilityInventoryPayload". */ export interface SourceCapabilityInventoryPayload { node_spec_details: NodeSpecInventoryPayload[]; node_specs: string[]; prompts: string[]; reducer_details: ReducerInventoryPayload[]; reducers: string[]; resources: string[]; tools: string[]; [k: string]: unknown; } /** * Serializable executable contract owned by one capability source. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "NodeSpecInventoryPayload". */ export interface NodeSpecInventoryPayload { accepts_context: boolean; description: string | null; input_schema: JsonObject; is_async: boolean; name: string; outcomes: string[]; output_schema: JsonObject; [k: string]: unknown; } /** * Serializable pure-reducer contract owned by one capability source. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ReducerInventoryPayload". */ export interface ReducerInventoryPayload { config_schema: JsonObject; description: string | null; name: string; ref: CapabilityRefPayload; [k: string]: unknown; } /** * Fallback embedded in inspect results when diagnostics collection fails. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceDiagnosticsUnavailablePayload". */ export interface SourceDiagnosticsUnavailablePayload { message: string; status: "error"; [k: string]: unknown; } /** * Whether each compact capability preview omitted owned names. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceCapabilityHasMorePayload". */ export interface SourceCapabilityHasMorePayload { node_specs: boolean; prompts: boolean; reducers: boolean; resources: boolean; tools: boolean; [k: string]: unknown; } /** * JSON projection of source permission flags. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourcePermissionsPayload". */ export interface SourcePermissionsPayload { calls_upstream: boolean; mutates_auth: boolean; mutates_config: boolean; safe_for_workflow: boolean; [k: string]: unknown; } /** * JSON projection of deployment-binding policy for one source. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourcePolicyPayload". */ export interface SourcePolicyPayload { binding_required: boolean; platform: boolean; [k: string]: unknown; } /** * Small sorted capability-name sample used by compact source rows. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceCapabilityPreviewPayload". */ export interface SourceCapabilityPreviewPayload { node_specs: string[]; prompts: string[]; reducers: string[]; resources: string[]; tools: string[]; [k: string]: unknown; } /** * JSON projection of source visibility flags. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceVisibilityPayload". */ export interface SourceVisibilityPayload { admin_dashboard: boolean; client: boolean; planner: boolean; [k: string]: unknown; } /** * Cursor-paged compact source discovery result. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "ListSourcesResult". */ export interface ListSourcesResult { next_cursor: string | null; sources: SourceStatusPayload[]; total: number; [k: string]: unknown; } /** * Compact source metadata returned by source discovery. * * This interface was referenced by `WorkflowContractMap`'s JSON-Schema * via the `definition` "SourceStatusPayload". */ export interface SourceStatusPayload { description: string | null; enabled: boolean; has_more: SourceCapabilityHasMorePayload; id: string; kind: "system" | "connection" | "python"; node_spec_count: number; permissions: SourcePermissionsPayload; policy: SourcePolicyPayload; preview: SourceCapabilityPreviewPayload; prompt_count: number; reducer_count: number; resource_count: number; tool_count: number; visibility: SourceVisibilityPayload; [k: string]: unknown; } export type WorkflowOperationParams = WorkflowContractMap[Name]["params"]; export type WorkflowOperationResult = WorkflowContractMap[Name]["result"]; // Runtime JSON Schema is limited to parity-verified authored RPCs. export const workflowRuntimeContract = { "components": { "ArrayExpression": { "additionalProperties": false, "description": "Resolve ordered child expressions into one JSON array.", "properties": { "items": { "items": { "$ref": "#/components/schemas/InputExpression" }, "type": "array" }, "kind": { "const": "array", "type": "string" } }, "required": [ "kind", "items" ], "type": "object" }, "ArtifactCatalogEntryPayload": { "description": "Compact artifact row returned by discovery operations.", "properties": { "artifact_id": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "diagnostics": { "items": { "$ref": "#/components/schemas/DependencyDiagnosticPayload" }, "type": "array" }, "display_name": { "type": "string" }, "input_schema": { "$ref": "#/components/schemas/JsonObject" }, "kind": { "type": "string" }, "name": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_schema": { "$ref": "#/components/schemas/JsonObject" }, "required_sources": { "items": { "type": "string" }, "type": "array" }, "version": { "type": "integer" } }, "required": [ "name", "artifact_id", "version", "kind", "display_name", "description", "outcomes", "input_schema", "output_schema", "required_sources", "diagnostics" ], "type": "object" }, "ArtifactKindPayload": { "enum": [ "workflow", "wrapper" ], "type": "string" }, "AuthoringContractInventoryPayload": { "description": "Revision-scoped readable sources and writable authoring targets.", "properties": { "entry_steps": { "items": { "$ref": "#/components/schemas/AuthoringStepContractPayload" }, "type": "array" }, "readable_sources": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "revision": { "type": "integer" }, "selected_step_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "state_targets": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "step_input_targets": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "step_output_sources": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "warnings": { "items": { "type": "string" }, "type": "array" }, "workflow_outcomes": { "items": { "type": "string" }, "type": "array" }, "workflow_output_targets": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "workspace_id": { "type": "string" } }, "required": [ "workspace_id", "revision", "selected_step_id", "readable_sources", "step_input_targets", "step_output_sources", "state_targets", "workflow_output_targets", "entry_steps", "workflow_outcomes", "warnings" ], "type": "object" }, "AuthoringPathAvailability": { "enum": [ "available", "conditional" ], "type": "string" }, "AuthoringPathOptionPayload": { "description": "One schema-derived source or target available to an author.", "properties": { "availability": { "$ref": "#/components/schemas/AuthoringPathAvailability" }, "description": { "type": "string" }, "label": { "type": "string" }, "origin": { "$ref": "#/components/schemas/AuthoringPathOrigin" }, "path": { "type": "string" }, "reason": { "type": "string" }, "required": { "type": "boolean" }, "schema": { "$ref": "#/components/schemas/JsonObject" }, "uses": { "items": { "$ref": "#/components/schemas/AuthoringPathUse" }, "type": "array" } }, "required": [ "path", "label", "origin", "schema", "required", "availability", "uses" ], "type": "object" }, "AuthoringPathOrigin": { "enum": [ "workflow_input", "workflow_state", "runtime_context", "step_input", "step_output", "workflow_output" ], "type": "string" }, "AuthoringPathUse": { "enum": [ "step_input", "step_output_source", "state_target", "workflow_output" ], "type": "string" }, "AuthoringStepContractPayload": { "description": "Compact executable-step choice used by authoring inventories.", "properties": { "description": { "type": "string" }, "input_targets": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "label": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_sources": { "items": { "$ref": "#/components/schemas/AuthoringPathOptionPayload" }, "type": "array" }, "step_id": { "type": "string" } }, "required": [ "step_id", "label" ], "type": "object" }, "CapabilityCallResult": { "description": "Outcome returned by a direct node-spec or wrapper capability call.", "properties": { "deployment_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "diagnostics": { "items": { "$ref": "#/components/schemas/DependencyDiagnosticPayload" }, "type": "array" }, "kind": { "enum": [ "node_spec", "wrapper_artifact" ], "type": "string" }, "outcome": { "type": "string" }, "output": { "anyOf": [ { "$ref": "#/components/schemas/JsonObject" }, { "type": "null" } ] }, "qualified_name": { "type": "string" }, "source_id": { "type": "string" } }, "required": [ "qualified_name", "source_id", "kind", "deployment_id", "outcome", "output", "diagnostics" ], "type": "object" }, "CapabilityKindPayload": { "enum": [ "tool", "resource", "prompt", "node_spec", "reducer", "workflow" ], "type": "string" }, "CapabilityRefPayload": { "properties": { "capability_key": { "type": "string" }, "source": { "type": "string" } }, "required": [ "source", "capability_key" ], "type": "object" }, "CapabilityStepUpdate": { "additionalProperties": false, "description": "Presence-aware patch for one existing capability-backed draft step.", "properties": { "desc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null }, "input": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StepInputBinding" }, "type": "array" }, { "type": "null" } ], "default": null }, "retry": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null }, "timeout_seconds": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null } }, "type": "object" }, "CreateDraftWorkspaceFromCapabilityResult": { "description": "Bootstrapped workspace plus the hints and next actions that shaped it.", "properties": { "diagnostics": { "items": { "$ref": "#/components/schemas/DraftDiagnosticPayload" }, "type": "array" }, "draft": { "$ref": "#/components/schemas/JsonObject" }, "next_actions": { "$ref": "#/components/schemas/NextActionsPayload" }, "revision": { "type": "integer" }, "status": { "enum": [ "valid", "invalid", "conflict" ], "type": "string" }, "summary": { "$ref": "#/components/schemas/DraftWorkspaceSummary" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspace_id": { "type": "string" }, "wrapper_hints": { "$ref": "#/components/schemas/WrapperAuthoringHintsPayload" } }, "required": [ "workspace_id", "revision", "title", "status", "diagnostics", "summary", "wrapper_hints", "next_actions" ], "type": "object" }, "DependencyDiagnosticPayload": { "additionalProperties": true, "description": "JSON projection of one deployment dependency diagnostic.", "properties": { "bound_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "code": { "type": "string" }, "logical_ref": { "type": "string" }, "message": { "type": "string" }, "repair_hint": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "severity": { "type": "string" } }, "required": [ "severity", "code", "logical_ref", "bound_source", "message", "repair_hint" ], "type": "object" }, "DeploymentSummary": { "description": "Compact deployment row used by list operations.", "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "binding_count": { "type": "integer" }, "drift_policy": { "type": "string" }, "id": { "type": "string" } }, "required": [ "artifact_id", "artifact_version", "id", "binding_count", "drift_policy" ], "type": "object" }, "DraftDiagnosticPayload": { "description": "One validation or revision diagnostic attached to a draft workspace.", "properties": { "code": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonObject" }, "message": { "type": "string" }, "path": { "type": "string" }, "repair_hint": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "step_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "code", "path", "message" ], "type": "object" }, "DraftWorkspaceResult": { "description": "Canonical persisted workspace envelope returned after reads and edits.", "properties": { "diagnostics": { "items": { "$ref": "#/components/schemas/DraftDiagnosticPayload" }, "type": "array" }, "draft": { "$ref": "#/components/schemas/JsonObject" }, "revision": { "type": "integer" }, "status": { "enum": [ "valid", "invalid", "conflict" ], "type": "string" }, "summary": { "$ref": "#/components/schemas/DraftWorkspaceSummary" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspace_id": { "type": "string" } }, "required": [ "workspace_id", "revision", "title", "status", "diagnostics", "summary" ], "type": "object" }, "DraftWorkspaceSummary": { "description": "Compact graph facts included with every persisted workspace result.", "properties": { "name": {}, "route_count": { "type": "integer" }, "start": {}, "step_count": { "type": "integer" }, "steps": { "items": { "type": "string" }, "type": "array" } }, "required": [ "name", "start", "step_count", "route_count", "steps" ], "type": "object" }, "HealthResult": { "description": "Health response shared by self-describing workflow transports.", "properties": { "status": { "const": "ok", "type": "string" }, "store_root": { "type": "string" } }, "required": [ "status", "store_root" ], "type": "object" }, "InputExpression": { "discriminator": { "mapping": { "array": "#/components/schemas/ArrayExpression", "literal": "#/components/schemas/LiteralExpression", "object": "#/components/schemas/ObjectExpression", "path": "#/components/schemas/PathExpression" }, "propertyName": "kind" }, "oneOf": [ { "$ref": "#/components/schemas/LiteralExpression" }, { "$ref": "#/components/schemas/PathExpression" }, { "$ref": "#/components/schemas/ArrayExpression" }, { "$ref": "#/components/schemas/ObjectExpression" } ] }, "InputExpressionBinding": { "additionalProperties": false, "description": "Assign one recursively composed expression to a node-local target.", "properties": { "expression": { "$ref": "#/components/schemas/InputExpression" }, "target": { "description": "Node-local path. Use the root marker `.` for the whole payload.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "const": "local", "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] } }, "required": [ "target", "expression" ], "type": "object" }, "InputPathBinding": { "additionalProperties": false, "description": "Map one workflow graph source path into one node-local input path.", "properties": { "path": { "description": "Workflow source path to read from input, state, or context. Prefer canonical strings such as `input.text` or `state.report`. Structural objects such as {'root': 'input', 'parts': ['text']} are also accepted as input.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "enum": [ "input", "state", "context" ], "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] }, "target": { "description": "Node-local input path to populate. Prefer canonical strings such as `field` or `.` for the whole node input payload. Structural objects such as {'root': 'local', 'parts': ['field']} are also accepted as input.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "const": "local", "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] } }, "required": [ "target", "path" ], "type": "object" }, "InputValueBinding": { "additionalProperties": false, "description": "Map one static value into one node-local input path.", "properties": { "target": { "description": "Node-local input path that receives this literal JSON value.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "const": "local", "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] }, "value": { "$ref": "#/components/schemas/JsonValue", "description": "Literal JSON-compatible value to pass to the node. Use this for constants, not for values read from workflow input or state." } }, "required": [ "target", "value" ], "type": "object" }, "InspectCapabilityResult": { "anyOf": [ { "$ref": "#/components/schemas/NodeSpecCapabilityDetail" }, { "$ref": "#/components/schemas/WrapperArtifactCapabilityDetail" } ] }, "InterruptPayload": { "description": "Persisted typed interrupt contract exposed to API clients.", "properties": { "frame_id": { "type": "string" }, "id": { "type": "string" }, "kind": { "type": "string" }, "node_id": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "payload": { "$ref": "#/components/schemas/JsonObject" }, "request_schema": { "$ref": "#/components/schemas/JsonSchema" }, "resumable": { "type": "boolean" }, "resume_schema": { "$ref": "#/components/schemas/JsonSchema" }, "route": { "anyOf": [ { "$ref": "#/components/schemas/InterruptRoutePayload" }, { "type": "null" } ] }, "typed": { "type": "boolean" } }, "required": [ "id", "frame_id", "node_id", "kind", "payload", "resumable", "route", "outcomes", "request_schema", "resume_schema", "typed" ], "type": "object" }, "InterruptRoutePayload": { "properties": { "frame_id": { "type": "string" }, "lineage_id": { "type": "string" }, "node_id": { "type": "string" }, "parent_frame_id": { "type": "string" }, "scope_id": { "type": "string" }, "workflow_ref": { "$ref": "#/components/schemas/WorkflowRefPayload" } }, "required": [ "frame_id", "node_id", "scope_id", "lineage_id", "parent_frame_id", "workflow_ref" ], "type": "object" }, "JsonObject": { "additionalProperties": true, "type": "object" }, "JsonSchema": { "additionalProperties": true, "type": "object" }, "JsonValue": { "anyOf": [ { "type": "boolean" }, { "type": "integer" }, { "type": "number" }, { "type": "string" }, { "items": { "$ref": "#/components/schemas/JsonValue" }, "type": "array" }, { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object" }, { "type": "null" } ] }, "ListArtifactsResult": { "properties": { "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "nodes": { "items": { "$ref": "#/components/schemas/ArtifactCatalogEntryPayload" }, "type": "array" }, "total": { "type": "integer" } }, "required": [ "next_cursor", "total", "nodes" ], "type": "object" }, "ListCapabilitiesResult": { "description": "Cursor-paged planner-visible capability discovery result.", "properties": { "capabilities": { "items": { "anyOf": [ { "$ref": "#/components/schemas/NodeSpecCapabilitySummary" }, { "$ref": "#/components/schemas/WrapperArtifactCapabilitySummary" } ] }, "type": "array" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "total": { "type": "integer" } }, "required": [ "next_cursor", "total", "capabilities" ], "type": "object" }, "ListDeploymentsResult": { "properties": { "deployments": { "items": { "$ref": "#/components/schemas/DeploymentSummary" }, "type": "array" } }, "required": [ "deployments" ], "type": "object" }, "ListDraftWorkspacesResult": { "description": "All persisted draft-workspace summaries.", "properties": { "workspaces": { "items": { "$ref": "#/components/schemas/DraftWorkspaceResult" }, "type": "array" } }, "required": [ "workspaces" ], "type": "object" }, "ListRunsResult": { "properties": { "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "limit": { "type": "integer" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "runs": { "items": { "$ref": "#/components/schemas/RunSummary" }, "type": "array" }, "total": { "type": "integer" } }, "required": [ "runs", "total", "cursor", "next_cursor", "limit" ], "type": "object" }, "ListSourcesResult": { "description": "Cursor-paged compact source discovery result.", "properties": { "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sources": { "items": { "$ref": "#/components/schemas/SourceStatusPayload" }, "type": "array" }, "total": { "type": "integer" } }, "required": [ "next_cursor", "total", "sources" ], "type": "object" }, "LiteralExpression": { "additionalProperties": false, "description": "A strict JSON literal embedded in a node-local input expression.", "properties": { "kind": { "const": "literal", "type": "string" }, "value": { "$ref": "#/components/schemas/JsonValue" } }, "required": [ "kind", "value" ], "type": "object" }, "NextActionPatchExamplePayload": { "description": "Concrete follow-up operation suggested to an API caller.", "properties": { "description": { "type": "string" }, "request": { "$ref": "#/components/schemas/JsonObject" }, "tool": { "type": "string" } }, "required": [ "description", "tool", "request" ], "type": "object" }, "NextActionsPayload": { "description": "JSON projection of advisory workflow continuation guidance.", "properties": { "can_continue": { "type": "boolean" }, "can_save_now": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "patch_examples": { "items": { "$ref": "#/components/schemas/NextActionPatchExamplePayload" }, "type": "array" }, "reason": { "type": "string" }, "recommended_next_tool": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "warnings": { "items": { "type": "string" }, "type": "array" } }, "required": [ "can_continue", "can_save_now", "recommended_next_tool", "reason", "patch_examples", "warnings" ], "type": "object" }, "NodeSpecCapabilityDetail": { "description": "Full executable contract for one source node spec.", "properties": { "accepts_context": { "type": "boolean" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "input_schema": { "$ref": "#/components/schemas/JsonObject" }, "is_async": { "type": "boolean" }, "kind": { "const": "node_spec", "type": "string" }, "name": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_schema": { "$ref": "#/components/schemas/JsonObject" }, "source_id": { "type": "string" }, "wrapper_hints": { "$ref": "#/components/schemas/WrapperAuthoringHintsPayload" } }, "required": [ "name", "source_id", "description", "outcomes", "is_async", "input_schema", "output_schema", "wrapper_hints", "kind", "accepts_context" ], "type": "object" }, "NodeSpecCapabilitySummary": { "description": "Compact discovery row for one executable source node spec.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "input_fields": { "items": { "type": "string" }, "type": "array" }, "is_async": { "type": "boolean" }, "kind": { "const": "node_spec", "type": "string" }, "name": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_fields": { "items": { "type": "string" }, "type": "array" }, "source_id": { "type": "string" } }, "required": [ "name", "source_id", "description", "outcomes", "is_async", "input_fields", "output_fields", "kind" ], "type": "object" }, "ObjectExpression": { "additionalProperties": false, "description": "Resolve named child expressions into one JSON object.", "properties": { "fields": { "additionalProperties": { "$ref": "#/components/schemas/InputExpression" }, "type": "object" }, "kind": { "const": "object", "type": "string" } }, "required": [ "kind", "fields" ], "type": "object" }, "OutputBinding": { "additionalProperties": false, "description": "Map one node-local output path into one workflow state path.", "properties": { "source": { "description": "Node-local output path to read. Prefer canonical strings such as `result` or `.` for the whole node output payload. Structural objects such as {'root': 'local', 'parts': []} are also accepted as input.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "const": "local", "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] }, "target": { "description": "Writable workflow state path. Bare state is invalid; use a field path such as `state.echoed`. Structural objects such as {'root': 'state', 'parts': ['echoed']} are also accepted as input.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" }, "root": { "const": "state", "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] } }, "required": [ "source", "target" ], "type": "object" }, "PathExpression": { "additionalProperties": false, "description": "Read one graph source path while resolving a composite input.", "properties": { "kind": { "const": "path", "type": "string" }, "path": { "description": "Readable graph path rooted at input, state, or context.", "anyOf": [ { "description": "Canonical TOML-key path string.", "type": "string" }, { "additionalProperties": false, "description": "Structural path object accepted as input.", "properties": { "parts": { "items": { "minLength": 1, "type": "string" }, "minItems": 0, "type": "array" }, "root": { "enum": [ "input", "state", "context" ], "type": "string" } }, "required": [ "root", "parts" ], "type": "object" } ] } }, "required": [ "kind", "path" ], "type": "object" }, "RequiredCapabilityPayload": { "description": "Saved dependency contract for one artifact capability reference.", "properties": { "input_schema_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "input_schema_snapshot": { "anyOf": [ { "$ref": "#/components/schemas/JsonObject" }, { "type": "null" } ] }, "kind": { "$ref": "#/components/schemas/CapabilityKindPayload" }, "observed_at_epoch_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "observed_concrete_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "output_schema_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "output_schema_snapshot": { "anyOf": [ { "$ref": "#/components/schemas/JsonObject" }, { "type": "null" } ] }, "ref": { "$ref": "#/components/schemas/CapabilityRefPayload" } }, "required": [ "ref", "kind", "input_schema_hash", "input_schema_snapshot", "output_schema_hash", "output_schema_snapshot", "observed_concrete_source", "observed_at_epoch_ms" ], "type": "object" }, "ResumeReadiness": { "type": "string" }, "RunResult": { "description": "Run operation result with an optional caller-requested trace slice.", "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "deployment_id": { "type": "string" }, "diagnostics": { "items": { "$ref": "#/components/schemas/DependencyDiagnosticPayload" }, "type": "array" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "interrupt": { "anyOf": [ { "$ref": "#/components/schemas/InterruptPayload" }, { "type": "null" } ] }, "max_steps": { "type": "integer" }, "next_actions": { "$ref": "#/components/schemas/NextActionsPayload" }, "outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "output": { "anyOf": [ { "$ref": "#/components/schemas/JsonObject" }, { "type": "null" } ] }, "resume_readiness": { "anyOf": [ { "$ref": "#/components/schemas/ResumeReadiness" }, { "type": "null" } ] }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/RunStatus" }, "steps_executed": { "type": "integer" }, "steps_remaining": { "type": "integer" }, "trace": { "items": { "$ref": "#/components/schemas/TraceEntryPayload" }, "type": "array" }, "trace_count": { "type": "integer" }, "trace_limit": { "type": "integer" }, "trace_start": { "type": "integer" }, "trace_truncated": { "type": "boolean" } }, "required": [ "artifact_id", "artifact_version", "diagnostics", "next_actions", "deployment_id", "status", "run_id", "resume_readiness", "interrupt", "outcome", "error", "output", "trace_count", "max_steps", "steps_executed", "steps_remaining" ], "type": "object" }, "RunStatus": { "type": "string" }, "RunSummary": { "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "created_at": { "type": "string" }, "deployment_id": { "type": "string" }, "diagnostic_count": { "type": "integer" }, "resume_readiness": { "$ref": "#/components/schemas/ResumeReadiness" }, "run_id": { "type": "string" }, "status": { "$ref": "#/components/schemas/RunStatus" }, "updated_at": { "type": "string" } }, "required": [ "artifact_id", "artifact_version", "run_id", "deployment_id", "status", "resume_readiness", "diagnostic_count", "created_at", "updated_at" ], "type": "object" }, "RunTraceResult": { "description": "Run result where a bounded trace slice is always present.", "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "deployment_id": { "type": "string" }, "diagnostics": { "items": { "$ref": "#/components/schemas/DependencyDiagnosticPayload" }, "type": "array" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "interrupt": { "anyOf": [ { "$ref": "#/components/schemas/InterruptPayload" }, { "type": "null" } ] }, "max_steps": { "type": "integer" }, "next_actions": { "$ref": "#/components/schemas/NextActionsPayload" }, "outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "output": { "anyOf": [ { "$ref": "#/components/schemas/JsonObject" }, { "type": "null" } ] }, "resume_readiness": { "anyOf": [ { "$ref": "#/components/schemas/ResumeReadiness" }, { "type": "null" } ] }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/RunStatus" }, "steps_executed": { "type": "integer" }, "steps_remaining": { "type": "integer" }, "trace": { "items": { "$ref": "#/components/schemas/TraceEntryPayload" }, "type": "array" }, "trace_count": { "type": "integer" }, "trace_limit": { "type": "integer" }, "trace_start": { "type": "integer" }, "trace_truncated": { "type": "boolean" } }, "required": [ "artifact_id", "artifact_version", "diagnostics", "next_actions", "deployment_id", "status", "run_id", "resume_readiness", "interrupt", "outcome", "error", "output", "trace_count", "max_steps", "steps_executed", "steps_remaining", "trace", "trace_start", "trace_limit", "trace_truncated" ], "type": "object" }, "SourceBindingPayload": { "description": "JSON projection of a logical-to-concrete deployment source binding.", "properties": { "concrete_source": { "type": "string" }, "logical_source": { "type": "string" } }, "required": [ "logical_source", "concrete_source" ], "type": "object" }, "SourceCapabilityHasMorePayload": { "description": "Whether each compact capability preview omitted owned names.", "properties": { "node_specs": { "type": "boolean" }, "prompts": { "type": "boolean" }, "reducers": { "type": "boolean" }, "resources": { "type": "boolean" }, "tools": { "type": "boolean" } }, "required": [ "tools", "node_specs", "reducers", "prompts", "resources" ], "type": "object" }, "SourceCapabilityPreviewPayload": { "description": "Small sorted capability-name sample used by compact source rows.", "properties": { "node_specs": { "items": { "type": "string" }, "type": "array" }, "prompts": { "items": { "type": "string" }, "type": "array" }, "reducers": { "items": { "type": "string" }, "type": "array" }, "resources": { "items": { "type": "string" }, "type": "array" }, "tools": { "items": { "type": "string" }, "type": "array" } }, "required": [ "tools", "node_specs", "reducers", "prompts", "resources" ], "type": "object" }, "SourcePermissionsPayload": { "description": "JSON projection of source permission flags.", "properties": { "calls_upstream": { "type": "boolean" }, "mutates_auth": { "type": "boolean" }, "mutates_config": { "type": "boolean" }, "safe_for_workflow": { "type": "boolean" } }, "required": [ "safe_for_workflow", "calls_upstream", "mutates_config", "mutates_auth" ], "type": "object" }, "SourcePolicyPayload": { "description": "JSON projection of deployment-binding policy for one source.", "properties": { "binding_required": { "type": "boolean" }, "platform": { "type": "boolean" } }, "required": [ "platform", "binding_required" ], "type": "object" }, "SourceStatusPayload": { "description": "Compact source metadata returned by source discovery.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "enabled": { "type": "boolean" }, "has_more": { "$ref": "#/components/schemas/SourceCapabilityHasMorePayload" }, "id": { "type": "string" }, "kind": { "enum": [ "system", "connection", "python" ], "type": "string" }, "node_spec_count": { "type": "integer" }, "permissions": { "$ref": "#/components/schemas/SourcePermissionsPayload" }, "policy": { "$ref": "#/components/schemas/SourcePolicyPayload" }, "preview": { "$ref": "#/components/schemas/SourceCapabilityPreviewPayload" }, "prompt_count": { "type": "integer" }, "reducer_count": { "type": "integer" }, "resource_count": { "type": "integer" }, "tool_count": { "type": "integer" }, "visibility": { "$ref": "#/components/schemas/SourceVisibilityPayload" } }, "required": [ "id", "kind", "enabled", "visibility", "permissions", "policy", "description", "tool_count", "node_spec_count", "reducer_count", "prompt_count", "resource_count", "preview", "has_more" ], "type": "object" }, "SourceVisibilityPayload": { "description": "JSON projection of source visibility flags.", "properties": { "admin_dashboard": { "type": "boolean" }, "client": { "type": "boolean" }, "planner": { "type": "boolean" } }, "required": [ "planner", "client", "admin_dashboard" ], "type": "object" }, "StepInputBinding": { "anyOf": [ { "$ref": "#/components/schemas/InputPathBinding" }, { "$ref": "#/components/schemas/InputValueBinding" }, { "$ref": "#/components/schemas/InputExpressionBinding" } ] }, "TraceEntryPayload": { "properties": { "frame_id": { "type": "string" }, "next_node_id": { "type": "string" }, "node_id": { "type": "string" }, "outcome": { "type": "string" }, "output": { "$ref": "#/components/schemas/JsonObject" }, "resolved_input": { "$ref": "#/components/schemas/JsonObject" }, "state_changes": { "$ref": "#/components/schemas/JsonObject" }, "step_number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "step_type": { "type": "string" } }, "required": [ "frame_id", "node_id", "step_type", "step_number", "resolved_input", "outcome", "next_node_id", "output", "state_changes" ], "type": "object" }, "TraceRangeParams": { "additionalProperties": false, "properties": { "limit": { "default": 20, "description": "Maximum trace entries to return; full traces are never implicit.", "maximum": 100, "minimum": 1, "type": "integer" }, "start": { "default": 0, "description": "Zero-based trace offset.", "minimum": 0, "type": "integer" } }, "type": "object" }, "ValidateDeploymentResult": { "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "deployment_id": { "type": "string" }, "diagnostics": { "items": { "$ref": "#/components/schemas/DependencyDiagnosticPayload" }, "type": "array" }, "next_actions": { "$ref": "#/components/schemas/NextActionsPayload" }, "status": { "enum": [ "runnable", "unrunnable" ], "type": "string" } }, "required": [ "artifact_id", "artifact_version", "diagnostics", "next_actions", "deployment_id", "status" ], "type": "object" }, "WorkflowArtifactPayload": { "description": "Normalized immutable artifact returned by inspect operations.", "properties": { "created_from_catalog_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "type": "string" }, "input_schema": { "$ref": "#/components/schemas/JsonObject" }, "kind": { "$ref": "#/components/schemas/ArtifactKindPayload" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_schema": { "$ref": "#/components/schemas/JsonObject" }, "plan": { "$ref": "#/components/schemas/JsonObject" }, "required_capabilities": { "items": { "$ref": "#/components/schemas/RequiredCapabilityPayload" }, "type": "array" }, "title": { "type": "string" }, "version": { "type": "integer" }, "workflow_dependencies": { "additionalProperties": { "type": "integer" }, "type": "object" } }, "required": [ "id", "version", "title", "kind", "description", "input_schema", "output_schema", "outcomes", "plan", "required_capabilities", "workflow_dependencies", "created_from_catalog_version" ], "type": "object" }, "WorkflowDeploymentPayload": { "description": "Serialized deployment accepted and returned by workflow API surfaces.", "properties": { "artifact_id": { "type": "string" }, "artifact_version": { "type": "integer" }, "bindings": { "items": { "$ref": "#/components/schemas/SourceBindingPayload" }, "type": "array" }, "drift_policy": { "type": "string" }, "id": { "type": "string" } }, "required": [ "artifact_id", "artifact_version", "id", "bindings", "drift_policy" ], "type": "object" }, "WorkflowRefPayload": { "properties": { "artifact_id": { "type": "string" }, "name": { "type": "string" }, "version": { "type": "integer" } }, "type": "object" }, "WrapperArtifactCapabilityDetail": { "description": "Full callable contract for one saved wrapper artifact.", "properties": { "artifact_id": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "input_schema": { "$ref": "#/components/schemas/JsonObject" }, "is_async": { "type": "boolean" }, "kind": { "const": "wrapper_artifact", "type": "string" }, "name": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_schema": { "$ref": "#/components/schemas/JsonObject" }, "required_capabilities": { "additionalProperties": { "$ref": "#/components/schemas/RequiredCapabilityPayload" }, "type": "object" }, "source_id": { "type": "string" }, "title": { "type": "string" }, "version": { "type": "integer" }, "wrapper_hints": { "$ref": "#/components/schemas/WrapperAuthoringHintsPayload" } }, "required": [ "name", "source_id", "description", "outcomes", "is_async", "input_schema", "output_schema", "wrapper_hints", "kind", "artifact_id", "version", "title", "required_capabilities" ], "type": "object" }, "WrapperArtifactCapabilitySummary": { "description": "Compact discovery row for one saved wrapper artifact.", "properties": { "artifact_id": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "input_fields": { "items": { "type": "string" }, "type": "array" }, "is_async": { "type": "boolean" }, "kind": { "const": "wrapper_artifact", "type": "string" }, "name": { "type": "string" }, "outcomes": { "items": { "type": "string" }, "type": "array" }, "output_fields": { "items": { "type": "string" }, "type": "array" }, "source_id": { "type": "string" }, "title": { "type": "string" }, "version": { "type": "integer" } }, "required": [ "name", "source_id", "description", "outcomes", "is_async", "input_fields", "output_fields", "kind", "artifact_id", "version", "title" ], "type": "object" }, "WrapperAuthoringHintsPayload": { "description": "Transport-neutral projection of conservative wrapper scaffolding hints.", "properties": { "capability_name": { "type": "string" }, "confidence": { "enum": [ "high", "medium", "low" ], "type": "string" }, "declared_outcomes": { "items": { "type": "string" }, "type": "array" }, "input_map": { "additionalProperties": { "type": "string" }, "type": "object" }, "input_schema": { "$ref": "#/components/schemas/JsonObject" }, "missing_decisions": { "items": { "$ref": "#/components/schemas/WrapperMissingDecisionPayload" }, "type": "array" }, "notes": { "items": { "type": "string" }, "type": "array" }, "outcome_candidates": { "items": { "$ref": "#/components/schemas/WrapperOutcomeCandidatePayload" }, "type": "array" }, "outcome_policy": { "enum": [ "preserve_declared", "manual_mapping_required" ], "type": "string" }, "output_map": { "additionalProperties": { "type": "string" }, "type": "object" }, "output_schema": { "$ref": "#/components/schemas/JsonObject" }, "state_schema": { "$ref": "#/components/schemas/JsonObject" }, "suggested_wrapper_outcomes": { "items": { "type": "string" }, "type": "array" } }, "required": [ "capability_name", "confidence", "declared_outcomes", "suggested_wrapper_outcomes", "outcome_policy", "input_schema", "state_schema", "output_schema", "input_map", "output_map", "outcome_candidates", "missing_decisions", "notes" ], "type": "object" }, "WrapperMissingDecisionPayload": { "description": "One unresolved wrapper-authoring decision.", "properties": { "kind": { "enum": [ "choose_output_fields", "review_nested_output", "confirm_boolean_outcomes", "choose_error_mapping" ], "type": "string" }, "message": { "type": "string" } }, "required": [ "kind", "message" ], "type": "object" }, "WrapperOutcomeCandidatePayload": { "description": "Possible wrapper outcome mapping that still requires caller judgment.", "properties": { "automatic": { "type": "boolean" }, "candidate_outcomes": { "items": { "type": "string" }, "type": "array" }, "confidence": { "enum": [ "high", "medium", "low" ], "type": "string" }, "kind": { "const": "boolean_control_field", "type": "string" }, "reason": { "type": "string" }, "source": { "type": "string" } }, "required": [ "kind", "source", "candidate_outcomes", "confidence", "reason", "automatic" ], "type": "object" } }, "operations": { "workflow.artifacts.inspect": { "payload": { "additionalProperties": false, "properties": { "artifact_id": { "minLength": 1, "type": "string" }, "version": { "minimum": 1, "type": "integer" } }, "required": [ "artifact_id", "version" ], "type": "object" }, "success": { "$ref": "#/components/schemas/WorkflowArtifactPayload" } }, "workflow.artifacts.list": { "payload": { "additionalProperties": false, "properties": { "query": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "kind": { "anyOf": [ { "enum": [ "workflow", "wrapper" ], "type": "string" }, { "type": "null" } ], "default": null }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "limit": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" } }, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListArtifactsResult" } }, "workflow.capabilities.call": { "payload": { "additionalProperties": false, "properties": { "qualified_name": { "minLength": 1, "type": "string" }, "payload": { "additionalProperties": true, "type": "object" }, "deployment_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null } }, "required": [ "qualified_name" ], "type": "object" }, "success": { "$ref": "#/components/schemas/CapabilityCallResult" } }, "workflow.capabilities.inspect": { "payload": { "additionalProperties": false, "properties": { "qualified_name": { "minLength": 1, "type": "string" } }, "required": [ "qualified_name" ], "type": "object" }, "success": { "$ref": "#/components/schemas/InspectCapabilityResult" } }, "workflow.capabilities.list": { "payload": { "additionalProperties": false, "properties": { "query": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "source_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "limit": { "default": 50, "maximum": 200, "minimum": 1, "type": "integer" } }, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListCapabilitiesResult" } }, "workflow.deployments.inspect": { "payload": { "additionalProperties": false, "properties": { "deployment_id": { "minLength": 1, "type": "string" } }, "required": [ "deployment_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/WorkflowDeploymentPayload" } }, "workflow.deployments.list": { "payload": { "additionalProperties": false, "properties": {}, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListDeploymentsResult" } }, "workflow.deployments.validate": { "payload": { "additionalProperties": false, "properties": { "deployment_id": { "minLength": 1, "type": "string" }, "live_check": { "default": false, "type": "boolean" } }, "required": [ "deployment_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/ValidateDeploymentResult" } }, "workflow.draft_workspaces.add_step_from_capability": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" }, "capability_name": { "minLength": 1, "type": "string" }, "route_from_step": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "route_from_outcome": { "default": "ok", "minLength": 1, "type": "string" }, "routes": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null }, "input_map": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null }, "input_bindings": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StepInputBinding" }, "type": "array" }, { "type": "null" } ], "default": null }, "bind_outputs": { "additionalProperties": { "type": "string" }, "type": "object" }, "desc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null }, "retry": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null }, "timeout_seconds": { "anyOf": [ { "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" } ], "default": null } }, "required": [ "workspace_id", "revision", "step_id", "capability_name" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.create_empty": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "input_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "state_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "output_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "outcomes": { "items": { "type": "string" }, "type": "array" } }, "required": [ "workspace_id", "name" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.create_from_capability": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "capability_name": { "minLength": 1, "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "input_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "state_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "output_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "input": { "anyOf": [ { "items": { "$ref": "#/components/schemas/StepInputBinding" }, "type": "array" }, { "type": "null" } ], "default": null }, "output": { "anyOf": [ { "items": { "$ref": "#/components/schemas/OutputBinding" }, "type": "array" }, { "type": "null" } ], "default": null }, "input_map": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null }, "output_map": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null }, "error_message_source": { "anyOf": [ {}, { "type": "null" } ], "default": null } }, "required": [ "workspace_id", "capability_name" ], "type": "object" }, "success": { "$ref": "#/components/schemas/CreateDraftWorkspaceFromCapabilityResult" } }, "workflow.draft_workspaces.get": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "include_draft": { "default": false, "type": "boolean" } }, "required": [ "workspace_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.inspect_authoring_contract": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "selected_step_id": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null } }, "required": [ "workspace_id", "revision" ], "type": "object" }, "success": { "anyOf": [ { "$ref": "#/components/schemas/AuthoringContractInventoryPayload" }, { "$ref": "#/components/schemas/DraftWorkspaceResult" } ] } }, "workflow.draft_workspaces.list": { "payload": { "additionalProperties": false, "properties": {}, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListDraftWorkspacesResult" } }, "workflow.draft_workspaces.set_contract": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "input_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "state_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "output_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null }, "outcomes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null } }, "required": [ "workspace_id", "revision" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.set_route": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" }, "outcome": { "minLength": 1, "type": "string" }, "target": { "minLength": 1, "type": "string" } }, "required": [ "workspace_id", "revision", "step_id", "outcome", "target" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.set_start": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" } }, "required": [ "workspace_id", "revision", "step_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.set_step_input_bindings": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" }, "bindings": { "items": { "$ref": "#/components/schemas/StepInputBinding" }, "type": "array" } }, "required": [ "workspace_id", "revision", "step_id", "bindings" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.set_step_output_bindings": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" }, "bindings": { "items": { "$ref": "#/components/schemas/OutputBinding" }, "type": "array" } }, "required": [ "workspace_id", "revision", "step_id", "bindings" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.set_workflow_output_bindings": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "bindings": { "items": { "anyOf": [ { "$ref": "#/components/schemas/InputPathBinding" }, { "$ref": "#/components/schemas/InputValueBinding" } ], "description": "Simple canonical binding for node inputs or workflow outputs. Use either a path binding with `path`, or a literal binding with `value`; composite `expression` bindings are node-local only." }, "type": "array" } }, "required": [ "workspace_id", "revision", "bindings" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.update_capability_step": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" }, "revision": { "minimum": 1, "type": "integer" }, "step_id": { "minLength": 1, "type": "string" }, "update": { "$ref": "#/components/schemas/CapabilityStepUpdate" } }, "required": [ "workspace_id", "revision", "step_id", "update" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.draft_workspaces.validate": { "payload": { "additionalProperties": false, "properties": { "workspace_id": { "minLength": 1, "type": "string" } }, "required": [ "workspace_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/DraftWorkspaceResult" } }, "workflow.health": { "payload": { "additionalProperties": false, "properties": {}, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/HealthResult" } }, "workflow.runs.inspect": { "payload": { "additionalProperties": false, "properties": { "run_id": { "minLength": 1, "type": "string" } }, "required": [ "run_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/RunResult" } }, "workflow.runs.list": { "payload": { "additionalProperties": false, "properties": { "status": { "anyOf": [ { "enum": [ "completed", "failed", "interrupted" ], "type": "string" }, { "type": "null" } ], "default": null }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "limit": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" } }, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListRunsResult" } }, "workflow.runs.resume": { "payload": { "additionalProperties": false, "properties": { "run_id": { "minLength": 1, "type": "string" }, "resume_payload": { "additionalProperties": true, "type": "object" }, "resume_outcome": { "default": "submitted", "minLength": 1, "type": "string" }, "trace_range": { "anyOf": [ { "$ref": "#/components/schemas/TraceRangeParams" }, { "type": "null" } ], "default": null } }, "required": [ "run_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/RunResult" } }, "workflow.runs.start": { "payload": { "additionalProperties": false, "properties": { "deployment_id": { "minLength": 1, "type": "string" }, "workflow_input": { "additionalProperties": true, "type": "object" }, "trace_range": { "anyOf": [ { "$ref": "#/components/schemas/TraceRangeParams" }, { "type": "null" } ], "default": null }, "max_steps": { "anyOf": [ { "minimum": 1, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Optional run step budget. The server default applies when omitted; resume never accepts a replacement." } }, "required": [ "deployment_id" ], "type": "object" }, "success": { "$ref": "#/components/schemas/RunResult" } }, "workflow.runs.trace": { "payload": { "additionalProperties": false, "properties": { "run_id": { "minLength": 1, "type": "string" }, "trace_range": { "$ref": "#/components/schemas/TraceRangeParams" } }, "required": [ "run_id", "trace_range" ], "type": "object" }, "success": { "$ref": "#/components/schemas/RunTraceResult" } }, "workflow.sources.list": { "payload": { "additionalProperties": false, "properties": { "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null }, "limit": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" } }, "required": [], "type": "object" }, "success": { "$ref": "#/components/schemas/ListSourcesResult" } } } };