> ## Documentation Index
> Fetch the complete documentation index at: https://checkfu.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an Automation

> Update mutable configuration under optimistic versioning: `expected_version` must match the live version or the request conflicts. AdmissionFilter Check and Outcome evaluator setup use the same create-time vocabulary and retain their distinct defaults and authority; edits affect only later accepted firings, while every existing firing retains its frozen filter, rubric, and resource declarations. Trigger kind, target kind, creator, and SurfaceScope never change, and cursor, delivery, and dedupe state are trusted firing state rather than caller-set configuration. Supplying a new `ingest_secret` rotates a webhook Automation's inbound signing key. `metadata` is replaced whole rather than merged per key, and an empty object clears it; omitting it leaves the bag untouched.

Checkfu support posture: alpha; hosted. Required evidence journey: automation-firing. Deployment-specific readiness and the latest proven release are available from GET /v1/support/capabilities.



## OpenAPI

````yaml /openapi.json patch /v1/automations/{id}
openapi: 3.1.0
info:
  title: Checkfu API
  version: '2026-08-29'
  description: >-
    Authentication is declared per operation: API-key, runtime, or connector
    bearer; Automation signature; or credential-free pairing redemption. Every
    general Checkfu REST request requires the dated `Checkfu-Version` header
    (one of: 2026-08-29); the three MCP JSON-RPC transports use
    `MCP-Protocol-Version`, A2A uses `A2A-Version`, and the provider OAuth
    callback carries neither Checkfu header. API keys resolve one Workspace
    without a request selector; authenticated responses identify it with
    `Checkfu-Workspace-Id`.
servers:
  - url: https://api.checkfu.com
security:
  - bearerAuth: []
tags:
  - name: organizations
  - name: sourceRepositories
  - name: tenants
  - name: workspaces
  - name: principals
  - name: principalGroups
  - name: principalAccessCredentials
  - name: apiKeys
  - name: agents
  - name: harnesses
  - name: harnessRuntime
  - name: computerProfiles
  - name: permissionAssignments
  - name: actionPolicies
  - name: files
  - name: memoryStores
  - name: dreams
  - name: modelCredentials
  - name: modelRoutingProfiles
  - name: blueprintInstallations
  - name: toolSources
  - name: skills
  - name: skillSources
  - name: agentSources
  - name: skillProposals
  - name: instructionProposals
  - name: catalog
  - name: concepts
  - name: support
  - name: connections
  - name: connectionVaults
  - name: connectionAssignments
  - name: connectedRuntimes
  - name: projects
  - name: collaboration
  - name: automationGraphs
  - name: automations
  - name: actionApprovals
  - name: standingApprovals
  - name: usage
  - name: models
  - name: outcomes
  - name: budgets
  - name: billing
  - name: sessions
  - name: audit
  - name: sessionExports
  - name: runs
  - name: runnerPools
  - name: transcripts
  - name: sessionWatches
  - name: sessionHandoffs
  - name: sessionCapsules
  - name: sessionTrajectories
  - name: webhookEndpoints
  - name: integrationGateway
  - name: agentDeployments
  - name: workEnvironments
  - name: computers
  - name: computerScreens
  - name: computerBrowserObservations
  - name: computerBrowserActions
  - name: environments
  - name: vaults
  - name: apiMcp
  - name: a2a
paths:
  /v1/automations/{id}:
    patch:
      tags:
        - automations
      summary: Update an Automation
      description: >-
        Update mutable configuration under optimistic versioning:
        `expected_version` must match the live version or the request conflicts.
        AdmissionFilter Check and Outcome evaluator setup use the same
        create-time vocabulary and retain their distinct defaults and authority;
        edits affect only later accepted firings, while every existing firing
        retains its frozen filter, rubric, and resource declarations. Trigger
        kind, target kind, creator, and SurfaceScope never change, and cursor,
        delivery, and dedupe state are trusted firing state rather than
        caller-set configuration. Supplying a new `ingest_secret` rotates a
        webhook Automation's inbound signing key. `metadata` is replaced whole
        rather than merged per key, and an empty object clears it; omitting it
        leaves the bag untouched.


        Checkfu support posture: alpha; hosted. Required evidence journey:
        automation-firing. Deployment-specific readiness and the latest proven
        release are available from GET /v1/support/capabilities.
      operationId: automations.patchAutomation
      parameters:
        - name: id
          in: path
          schema:
            $ref: '#/components/schemas/AutomationId'
          required: true
        - name: checkfu-version
          in: header
          schema:
            type: string
            enum:
              - '2026-08-29'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAutomation'
        required: true
      responses:
        '200':
          description: Automation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation_3'
          headers:
            checkfu-workspace-id:
              description: The Workspace resolved from the authenticated bearer credential.
              required: true
              schema:
                $ref: '#/components/schemas/WorkspaceId'
        '400':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationMalformedError'
        '401':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - auth.invalid_key
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#auth-invalid-key
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '403':
          description: >-
            The organization, tenant, or workspace backing this key is
            administratively disabled. | Deployment governance or retention
            policy denied the request.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - auth.disabled_tenancy
                          message:
                            type: string
                          more:
                            type: string
                            enum:
                              - >-
                                https://docs.checkfu.com/reference/errors#auth-disabled-tenancy
                            description: >-
                              Stable public documentation and remedy for this
                              error type.
                        required:
                          - type
                          - message
                          - more
                        additionalProperties: false
                    additionalProperties: false
                  - $ref: '#/components/schemas/PolicyDeniedError'
        '404':
          description: >-
            The requested resource does not exist in the resolved deployment
            boundary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationNotFoundError'
        '409':
          description: The request conflicts with the resource's current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationConflictError'
        '429':
          description: Typed Checkfu wire error
          headers:
            retry-after:
              description: >-
                Delay in seconds for rate limits or deployment quotas with a
                known release or UTC reset boundary
              required: false
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - budget.exceeded
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#budget-exceeded
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '500':
          description: >-
            An unexpected internal failure occurred; the message contains an
            opaque incident reference.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeInternalError'
        '503':
          description: >-
            The MemoryStore backend cannot serve the operation and applied no
            write.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryBackendUnavailableError'
      security:
        - bearerAuth: []
components:
  schemas:
    AutomationId:
      type: string
      allOf:
        - pattern: ^auto_[0-9a-f]{32}$
    PatchAutomation:
      anyOf:
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime:
              anyOf:
                - $ref: '#/components/schemas/ConnectedRuntimeId'
                - type: 'null'
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Objects_125'
            trigger:
              $ref: '#/components/schemas/Objects_126'
            input:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - snapshot
                prompt:
                  $ref: '#/components/schemas/AutomationPrompt'
                outcome:
                  type: object
                  properties:
                    rubric:
                      type: string
                      allOf:
                        - minLength: 1
                        - maxLength: 65536
                    max_iterations:
                      type: integer
                      allOf:
                        - minimum: 1
                          maximum: 20
                    deliverables:
                      $ref: >-
                        #/components/schemas/CurrentOutcomeDeliverablesDistinctPaths
                    report:
                      type: object
                      properties:
                        extraction:
                          type: string
                          enum:
                            - json
                            - model
                        outputs:
                          $ref: '#/components/schemas/OutcomeReportDistinctOutputKeys'
                      required:
                        - extraction
                        - outputs
                      additionalProperties: false
                  required:
                    - rubric
                  additionalProperties: false
                flow_review:
                  $ref: '#/components/schemas/Objects_127'
                mounts:
                  $ref: '#/components/schemas/AutomationMounts'
                prompt_template: false
              required:
                - kind
                - prompt
              additionalProperties: false
            ingest_secret: false
          required:
            - expected_version
          additionalProperties: false
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime: false
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Union_237'
            trigger:
              $ref: '#/components/schemas/Objects_126'
            input: false
            ingest_secret: false
          required:
            - expected_version
          additionalProperties: false
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime: false
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Union_237'
            trigger:
              $ref: '#/components/schemas/Objects_130'
            input: false
            ingest_secret:
              type: string
              allOf:
                - pattern: ^whsec_[A-Za-z0-9_-]{43}$
          required:
            - expected_version
          additionalProperties: false
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime:
              anyOf:
                - $ref: '#/components/schemas/ConnectedRuntimeId'
                - type: 'null'
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Objects_125'
            trigger:
              $ref: '#/components/schemas/Objects_130'
            input:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - template
                prompt_template:
                  $ref: '#/components/schemas/AutomationPrompt'
                outcome:
                  type: object
                  properties:
                    rubric:
                      type: string
                      allOf:
                        - minLength: 1
                        - maxLength: 65536
                    max_iterations:
                      type: integer
                      allOf:
                        - minimum: 1
                          maximum: 20
                    deliverables:
                      $ref: >-
                        #/components/schemas/CurrentOutcomeDeliverablesDistinctPaths
                    report:
                      type: object
                      properties:
                        extraction:
                          type: string
                          enum:
                            - json
                            - model
                        outputs:
                          $ref: '#/components/schemas/OutcomeReportDistinctOutputKeys'
                      required:
                        - extraction
                        - outputs
                      additionalProperties: false
                  required:
                    - rubric
                  additionalProperties: false
                flow_review:
                  $ref: '#/components/schemas/Objects_127'
                mounts:
                  $ref: '#/components/schemas/AutomationMounts'
                prompt: false
              required:
                - kind
                - prompt_template
              additionalProperties: false
            ingest_secret:
              type: string
              allOf:
                - pattern: ^whsec_[A-Za-z0-9_-]{43}$
          required:
            - expected_version
          additionalProperties: false
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime:
              anyOf:
                - $ref: '#/components/schemas/ConnectedRuntimeId'
                - type: 'null'
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Objects_125'
            trigger:
              $ref: '#/components/schemas/Objects_132'
            input:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - template
                prompt_template:
                  $ref: '#/components/schemas/AutomationPrompt'
                outcome:
                  type: object
                  properties:
                    rubric:
                      type: string
                      allOf:
                        - minLength: 1
                        - maxLength: 65536
                    max_iterations:
                      type: integer
                      allOf:
                        - minimum: 1
                          maximum: 20
                    deliverables:
                      $ref: >-
                        #/components/schemas/CurrentOutcomeDeliverablesDistinctPaths
                    report:
                      type: object
                      properties:
                        extraction:
                          type: string
                          enum:
                            - json
                            - model
                        outputs:
                          $ref: '#/components/schemas/OutcomeReportDistinctOutputKeys'
                      required:
                        - extraction
                        - outputs
                      additionalProperties: false
                  required:
                    - rubric
                  additionalProperties: false
                flow_review:
                  $ref: '#/components/schemas/Objects_127'
                mounts:
                  $ref: '#/components/schemas/AutomationMounts'
                prompt: false
              required:
                - kind
                - prompt_template
              additionalProperties: false
            ingest_secret: false
          required:
            - expected_version
          additionalProperties: false
        - type: object
          properties:
            expected_version:
              type: integer
              allOf:
                - exclusiveMinimum: 0
            name:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 255
            description:
              anyOf:
                - type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 4096
                - type: 'null'
            identity:
              $ref: '#/components/schemas/Objects_124'
            external_id: false
            connected_runtime: false
            metadata:
              $ref: '#/components/schemas/ResourceMetadata'
            target:
              $ref: '#/components/schemas/Objects_136'
            trigger:
              $ref: '#/components/schemas/Objects_126'
            input: false
            ingest_secret: false
          required:
            - expected_version
          additionalProperties: false
    Automation_3:
      anyOf:
        - $ref: '#/components/schemas/Objects_137'
        - $ref: '#/components/schemas/Objects_138'
        - $ref: '#/components/schemas/Objects_140'
        - $ref: '#/components/schemas/Objects_141'
        - $ref: '#/components/schemas/Objects_142'
        - $ref: '#/components/schemas/Objects_143'
    WorkspaceId:
      type: string
      allOf:
        - pattern: ^wrkspc_[0-9a-f]{32}$
    ValidationMalformedError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.malformed
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-malformed
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        The request could not be decoded or violated a declared input
        constraint.
    PolicyDeniedError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - policy.denied
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#policy-denied
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: Deployment governance or retention policy denied the request.
    ValidationNotFoundError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.not_found
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-not-found
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        The requested resource does not exist in the resolved deployment
        boundary.
    ValidationConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.conflict
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-conflict
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: The request conflicts with the resource's current state.
    RuntimeInternalError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - runtime.internal
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#runtime-internal
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        An unexpected internal failure occurred; the message contains an opaque
        incident reference.
    MemoryBackendUnavailableError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - memory.backend_unavailable
            message:
              type: string
            more:
              type: string
              enum:
                - >-
                  https://docs.checkfu.com/reference/errors#memory-backend-unavailable
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: The MemoryStore backend cannot serve the operation and applied no write.
    Objects_124:
      type: object
      properties:
        acted_as:
          $ref: '#/components/schemas/PrincipalId'
      required:
        - acted_as
      additionalProperties: false
    ConnectedRuntimeId:
      type: string
      allOf:
        - pattern: ^crt_[0-9a-f]{32}$
    ResourceMetadata:
      type: object
      additionalProperties:
        type: string
        allOf:
          - maxLength: 512
      allOf:
        - propertyNames:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 64
        - maxProperties: 16
          description: at most 16 correlation pairs with keys of 1 to 64 characters
    Objects_125:
      type: object
      properties:
        kind:
          type: string
          enum:
            - agent_definition
        agent_deployment_id:
          $ref: '#/components/schemas/AgentDeploymentId'
        agent_deployment_revision_selection:
          $ref: '#/components/schemas/AgentDeploymentRevisionSelection'
        budget:
          $ref: '#/components/schemas/SessionBudgetRequest'
      required:
        - kind
        - agent_deployment_id
        - agent_deployment_revision_selection
      additionalProperties: false
    Objects_126:
      type: object
      properties:
        kind:
          type: string
          enum:
            - schedule
        cron:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        timezone:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        dedupe_key: false
        source: false
        filter: false
      required:
        - kind
        - cron
        - timezone
      additionalProperties: false
    AutomationPrompt:
      type: string
      allOf:
        - minLength: 1
        - maxLength: 65536
    CurrentOutcomeDeliverablesDistinctPaths:
      type: array
      items:
        type: string
        allOf:
          - pattern: ^\/\S+$
      allOf:
        - minItems: 1
        - maxItems: 32
        - uniqueItems: true
          description: Outcome deliverables with distinct paths
    OutcomeReportDistinctOutputKeys:
      type: array
      items:
        anyOf:
          - type: object
            properties:
              key:
                type: string
                allOf:
                  - pattern: ^[a-z][a-z0-9_]{0,49}$
              title:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 200
              description:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 4096
              type:
                type: string
                enum:
                  - string
              acceptance:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - one_of
                  values:
                    $ref: >-
                      #/components/schemas/OutcomeReportDistinctStringAcceptanceValues
                required:
                  - kind
                  - values
                additionalProperties: false
            required:
              - key
              - title
              - type
            additionalProperties: false
          - type: object
            properties:
              key:
                type: string
                allOf:
                  - pattern: ^[a-z][a-z0-9_]{0,49}$
              title:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 200
              description:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 4096
              type:
                type: string
                enum:
                  - integer
              acceptance:
                $ref: '#/components/schemas/OutcomeReportNumericAcceptanceRange'
            required:
              - key
              - title
              - type
            additionalProperties: false
          - type: object
            properties:
              key:
                type: string
                allOf:
                  - pattern: ^[a-z][a-z0-9_]{0,49}$
              title:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 200
              description:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 4096
              type:
                type: string
                enum:
                  - number
              acceptance:
                $ref: '#/components/schemas/OutcomeReportNumericAcceptanceRange'
            required:
              - key
              - title
              - type
            additionalProperties: false
          - type: object
            properties:
              key:
                type: string
                allOf:
                  - pattern: ^[a-z][a-z0-9_]{0,49}$
              title:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 200
              description:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 4096
              type:
                type: string
                enum:
                  - boolean
              acceptance:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - equals
                  value:
                    type: boolean
                required:
                  - kind
                  - value
                additionalProperties: false
            required:
              - key
              - title
              - type
            additionalProperties: false
      allOf:
        - minItems: 1
        - maxItems: 32
    Objects_127:
      type: object
      properties:
        model_routing_profile_key:
          type: string
          allOf:
            - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
        tier:
          $ref: '#/components/schemas/Union_138'
        criteria:
          $ref: '#/components/schemas/UniqueFlowReviewCriteria'
      required:
        - model_routing_profile_key
        - criteria
      additionalProperties: false
    AutomationMounts:
      type: array
      items:
        anyOf:
          - $ref: '#/components/schemas/Union_230'
          - $ref: '#/components/schemas/Objects_129'
          - type: object
            properties:
              store:
                $ref: '#/components/schemas/MemoryStoreId'
              access:
                $ref: '#/components/schemas/Union_233'
              instructions:
                type: string
                allOf:
                  - minLength: 1
                  - maxLength: 4096
            required:
              - store
              - access
            additionalProperties: false
    Union_237:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - steps
            agent_deployment_id: false
            agent_deployment_revision_selection: false
            memory_store: false
            sessions: false
            budget: false
            steps:
              $ref: '#/components/schemas/AutomationStepGroups'
            dag: false
          required:
            - kind
            - steps
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - steps
            agent_deployment_id: false
            agent_deployment_revision_selection: false
            memory_store: false
            sessions: false
            budget: false
            dag:
              $ref: '#/components/schemas/AutomationStepDagDataflow'
            steps: false
          required:
            - kind
            - dag
          additionalProperties: false
    Objects_130:
      type: object
      properties:
        kind:
          type: string
          enum:
            - webhook
        dedupe_key:
          type: object
          properties:
            kind:
              type: string
              enum:
                - json_pointer
            pointer:
              type: string
              allOf:
                - maxLength: 512
                - pattern: ^(?:\/(?:[^~/]|~[01])*)*$
          required:
            - kind
            - pointer
          additionalProperties: false
        filter:
          type: object
          properties:
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/Union_235'
              allOf:
                - maxItems: 32
            check:
              $ref: '#/components/schemas/Objects_131'
          required:
            - predicates
          additionalProperties: false
        cron: false
        timezone: false
        source: false
      required:
        - kind
        - dedupe_key
      additionalProperties: false
    Objects_132:
      type: object
      properties:
        kind:
          type: string
          enum:
            - subscription
        source:
          $ref: '#/components/schemas/Union_236'
        cron: false
        timezone: false
        dedupe_key: false
        filter: false
      required:
        - kind
        - source
      additionalProperties: false
    Objects_136:
      type: object
      properties:
        kind:
          type: string
          enum:
            - dream
        memory_store:
          $ref: '#/components/schemas/MemoryStoreId'
        sessions:
          $ref: '#/components/schemas/Objects_115'
        model_routing_profile_key:
          type: string
          allOf:
            - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
        instructions:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 4096
        review:
          type: boolean
        agent_deployment_id: false
        agent_deployment_revision_selection: false
        budget: false
      required:
        - kind
        - memory_store
        - sessions
      additionalProperties: false
    Objects_137:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        target:
          $ref: '#/components/schemas/Objects_125'
        surface_scope_id:
          anyOf:
            - $ref: '#/components/schemas/SurfaceScopeId'
            - type: 'null'
        trigger:
          $ref: '#/components/schemas/Objects_126'
        input:
          type: object
          properties:
            kind:
              type: string
              enum:
                - snapshot
            prompt:
              $ref: '#/components/schemas/AutomationPrompt'
            outcome:
              $ref: '#/components/schemas/Objects_134'
            flow_review:
              $ref: '#/components/schemas/Objects_127'
            mounts:
              $ref: '#/components/schemas/AutomationMounts'
            prompt_template: false
          required:
            - kind
            - prompt
          additionalProperties: false
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - target
        - surface_scope_id
        - trigger
        - input
      additionalProperties: false
    Objects_138:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        target:
          $ref: '#/components/schemas/Objects_125'
        surface_scope_id:
          anyOf:
            - $ref: '#/components/schemas/SurfaceScopeId'
            - type: 'null'
        trigger:
          $ref: '#/components/schemas/Objects_130'
        input:
          $ref: '#/components/schemas/Objects_139'
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - target
        - surface_scope_id
        - trigger
        - input
      additionalProperties: false
    Objects_140:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        target:
          $ref: '#/components/schemas/Objects_125'
        surface_scope_id:
          $ref: '#/components/schemas/SurfaceScopeId'
        trigger:
          $ref: '#/components/schemas/Objects_132'
        input:
          $ref: '#/components/schemas/Objects_139'
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - target
        - surface_scope_id
        - trigger
        - input
      additionalProperties: false
    Objects_141:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        target:
          $ref: '#/components/schemas/Union_237'
        surface_scope_id:
          anyOf:
            - $ref: '#/components/schemas/SurfaceScopeId'
            - type: 'null'
        trigger:
          $ref: '#/components/schemas/Objects_126'
        input: false
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - target
        - surface_scope_id
        - trigger
      additionalProperties: false
    Objects_142:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        target:
          $ref: '#/components/schemas/Union_237'
        surface_scope_id:
          anyOf:
            - $ref: '#/components/schemas/SurfaceScopeId'
            - type: 'null'
        trigger:
          $ref: '#/components/schemas/Objects_130'
        input: false
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - target
        - surface_scope_id
        - trigger
      additionalProperties: false
    Objects_143:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AutomationId'
        workspace_id:
          $ref: '#/components/schemas/WorkspaceId'
        version:
          type: integer
          allOf:
            - exclusiveMinimum: 0
        name:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 255
        description:
          $ref: '#/components/schemas/Union_241'
        external_id:
          $ref: '#/components/schemas/Union_242'
        created_by:
          $ref: '#/components/schemas/PrincipalId'
        identity:
          $ref: '#/components/schemas/Objects_124'
        environment_id:
          $ref: '#/components/schemas/EnvironmentId'
        connected_runtime:
          $ref: '#/components/schemas/Union_243'
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        status:
          $ref: '#/components/schemas/Union_216'
        paused_reason:
          $ref: '#/components/schemas/Union_244'
        last_run_at:
          $ref: '#/components/schemas/Union_245'
        last_session_id:
          $ref: '#/components/schemas/Union_246'
        last_run_id:
          $ref: '#/components/schemas/Union_247'
        next_run_at:
          $ref: '#/components/schemas/Union_248'
        created_at:
          type: string
        updated_at:
          type: string
        last_dream_id:
          anyOf:
            - $ref: '#/components/schemas/DreamId'
            - type: 'null'
        dream_cursor:
          type: integer
          allOf:
            - minimum: 0
        target:
          $ref: '#/components/schemas/Objects_136'
        surface_scope_id:
          anyOf:
            - $ref: '#/components/schemas/SurfaceScopeId'
            - type: 'null'
        trigger:
          $ref: '#/components/schemas/Objects_126'
        input: false
      required:
        - id
        - workspace_id
        - version
        - name
        - description
        - external_id
        - created_by
        - identity
        - connected_runtime
        - status
        - paused_reason
        - last_run_at
        - last_session_id
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
        - last_dream_id
        - dream_cursor
        - target
        - surface_scope_id
        - trigger
      additionalProperties: false
    PrincipalId:
      type: string
      allOf:
        - pattern: ^prin_[0-9a-f]{32}$
    AgentDeploymentId:
      type: string
      allOf:
        - pattern: ^adep_[0-9a-f]{32}$
    AgentDeploymentRevisionSelection:
      anyOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - current
          required:
            - type
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - pinned
            revision_number:
              type: integer
              allOf:
                - exclusiveMinimum: 0
          required:
            - type
            - revision_number
          additionalProperties: false
    SessionBudgetRequest:
      type: object
      properties:
        limit:
          $ref: '#/components/schemas/SessionBudgetRequestSafeLimit'
        metric:
          type: string
          enum:
            - model_tokens
            - model_spend
            - session_runtime_ms
            - total_spend
      required:
        - limit
      additionalProperties: false
      description: >-
        A create-time Session spending cap compiled into one session-scoped
        pause_session Budget.
    OutcomeReportDistinctStringAcceptanceValues:
      type: array
      items:
        type: string
      allOf:
        - minItems: 1
        - maxItems: 32
    OutcomeReportNumericAcceptanceRange:
      type: object
      properties:
        kind:
          type: string
          enum:
            - range
        minimum:
          type: number
        maximum:
          type: number
      required:
        - kind
      additionalProperties: false
    Union_138:
      type: string
      enum:
        - default
        - planning
        - tool_loop
    UniqueFlowReviewCriteria:
      type: array
      items:
        type: object
        properties:
          key:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 64
              - pattern: ^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$
          description:
            $ref: '#/components/schemas/FlowReviewCriterionDescription'
          severity:
            type: string
            enum:
              - low
              - medium
              - high
        required:
          - key
          - description
          - severity
        additionalProperties: false
      allOf:
        - minItems: 1
        - maxItems: 16
    Union_230:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - project
            project_id:
              $ref: '#/components/schemas/ProjectId'
            mount_path:
              $ref: '#/components/schemas/MountPath'
            revision_policy:
              $ref: '#/components/schemas/Union_231'
            access:
              $ref: '#/components/schemas/Union_232'
            writeback:
              type: 'null'
          required:
            - kind
            - project_id
            - mount_path
            - revision_policy
            - access
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - project
            project_id:
              $ref: '#/components/schemas/ProjectId'
            mount_path:
              $ref: '#/components/schemas/MountPath'
            revision_policy:
              $ref: '#/components/schemas/Union_231'
            access:
              type: string
              enum:
                - read_write
            writeback:
              $ref: '#/components/schemas/Objects_128'
          required:
            - kind
            - project_id
            - mount_path
            - revision_policy
            - access
            - writeback
          additionalProperties: false
    Objects_129:
      type: object
      properties:
        kind:
          type: string
          enum:
            - file
        file_id:
          $ref: '#/components/schemas/FileId'
        mount_path:
          $ref: '#/components/schemas/MountPath'
        access:
          type: string
          enum:
            - read_only
      required:
        - kind
        - file_id
        - mount_path
        - access
      additionalProperties: false
    MemoryStoreId:
      type: string
      allOf:
        - pattern: ^memstore_[0-9a-f]{32}$
    Union_233:
      type: string
      enum:
        - read_only
        - read_write
    AutomationStepGroups:
      type: array
      items:
        $ref: '#/components/schemas/Objects_133'
      allOf:
        - minItems: 1
        - maxItems: 20
    AutomationStepDagDataflow:
      type: object
      properties:
        nodes:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/Objects_133'
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - decision
                  id:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                  condition:
                    anyOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - predicates
                          predicates:
                            type: array
                            items:
                              $ref: '#/components/schemas/Union_235'
                            allOf:
                              - minItems: 1
                              - maxItems: 10
                          check: false
                          input:
                            $ref: '#/components/schemas/Objects_135'
                        required:
                          - kind
                          - predicates
                          - input
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - check
                          check:
                            type: object
                            properties:
                              model_routing_profile_key:
                                type: string
                                allOf:
                                  - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
                              tier:
                                $ref: '#/components/schemas/Union_138'
                              instructions:
                                type: string
                                allOf:
                                  - minLength: 1
                                  - maxLength: 4096
                              failure:
                                type: string
                                enum:
                                  - fail_closed
                            required:
                              - model_routing_profile_key
                              - instructions
                              - failure
                            additionalProperties: false
                          predicates: false
                          input:
                            $ref: '#/components/schemas/Objects_135'
                        required:
                          - kind
                          - check
                          - input
                        additionalProperties: false
                required:
                  - kind
                  - id
                  - condition
                additionalProperties: false
          allOf:
            - minItems: 1
            - maxItems: 20
        edges:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - then
                  from:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                  to:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                required:
                  - kind
                  - from
                  - to
                additionalProperties: false
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - output
                  from:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                  to:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                required:
                  - kind
                  - from
                  - to
                additionalProperties: false
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - continue
                  from:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                  to:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                required:
                  - kind
                  - from
                  - to
                additionalProperties: false
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - otherwise
                  from:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 64
                      - pattern: ^[A-Za-z0-9_]+$
                  to:
                    anyOf:
                      - type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 64
                          - pattern: ^[A-Za-z0-9_]+$
                      - type: 'null'
                required:
                  - kind
                  - from
                  - to
                additionalProperties: false
          allOf:
            - maxItems: 320
      required:
        - nodes
        - edges
      additionalProperties: false
    Union_235:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - exists
            pointer:
              type: string
              allOf:
                - maxLength: 512
                - pattern: ^(?:\/(?:[^~/]|~[01])*)*$
            value: false
          required:
            - kind
            - pointer
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - equals
            pointer:
              type: string
              allOf:
                - maxLength: 512
                - pattern: ^(?:\/(?:[^~/]|~[01])*)*$
            value:
              type: string
              allOf:
                - maxLength: 4096
          required:
            - kind
            - pointer
            - value
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - contains
            pointer:
              type: string
              allOf:
                - maxLength: 512
                - pattern: ^(?:\/(?:[^~/]|~[01])*)*$
            value:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 4096
          required:
            - kind
            - pointer
            - value
          additionalProperties: false
    Objects_131:
      type: object
      properties:
        model_routing_profile_key:
          type: string
          allOf:
            - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
        tier:
          $ref: '#/components/schemas/Union_138'
        instructions:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 4096
        failure:
          type: string
          enum:
            - fail_open
            - fail_closed
      required:
        - model_routing_profile_key
        - instructions
        - failure
      additionalProperties: false
    Union_236:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - conversation
            conversation:
              $ref: '#/components/schemas/Union_201'
            resource_type: false
            external_id: false
          required:
            - kind
            - conversation
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - resource
            resource_type:
              type: string
              allOf:
                - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
            external_id:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 512
            conversation: false
          required:
            - kind
            - resource_type
            - external_id
          additionalProperties: false
    Objects_115:
      type: object
      properties:
        kind:
          type: string
          enum:
            - since_last
        limit:
          type: integer
          allOf:
            - exclusiveMinimum: 0
            - maximum: 100
      required:
        - kind
      additionalProperties: false
    Union_241:
      anyOf:
        - type: string
          allOf:
            - minLength: 1
            - maxLength: 4096
        - type: 'null'
    Union_242:
      anyOf:
        - type: string
          allOf:
            - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
        - type: 'null'
    EnvironmentId:
      type: string
      allOf:
        - pattern: ^env_[0-9a-f]{32}$
    Union_243:
      anyOf:
        - $ref: '#/components/schemas/ConnectedRuntimeId'
        - type: 'null'
    Union_216:
      type: string
      enum:
        - active
        - paused
    Union_244:
      anyOf:
        - $ref: '#/components/schemas/Union_217'
        - type: 'null'
    Union_245:
      anyOf:
        - type: string
        - type: 'null'
    Union_246:
      anyOf:
        - $ref: '#/components/schemas/SessionId'
        - type: 'null'
    Union_247:
      anyOf:
        - $ref: '#/components/schemas/RunId'
        - type: 'null'
    Union_248:
      anyOf:
        - type: string
        - type: 'null'
    SurfaceScopeId:
      type: string
      allOf:
        - pattern: ^surf_[0-9a-f]{32}$
    Objects_134:
      type: object
      properties:
        rubric:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 65536
        max_iterations:
          type: integer
          allOf:
            - minimum: 1
              maximum: 20
        deliverables:
          type: array
          items:
            type: string
            allOf:
              - pattern: ^\/\S+$
          allOf:
            - minItems: 1
            - maxItems: 32
        report:
          type: object
          properties:
            extraction:
              type: string
              enum:
                - json
                - model
            outputs:
              $ref: '#/components/schemas/OutcomeReportDistinctOutputKeys'
          required:
            - extraction
            - outputs
          additionalProperties: false
      required:
        - rubric
      additionalProperties: false
    Objects_139:
      type: object
      properties:
        kind:
          type: string
          enum:
            - template
        prompt_template:
          $ref: '#/components/schemas/AutomationPrompt'
        outcome:
          $ref: '#/components/schemas/Objects_134'
        flow_review:
          $ref: '#/components/schemas/Objects_127'
        mounts:
          $ref: '#/components/schemas/AutomationMounts'
        prompt: false
      required:
        - kind
        - prompt_template
      additionalProperties: false
    DreamId:
      type: string
      allOf:
        - pattern: ^drm_[0-9a-f]{32}$
    SessionBudgetRequestSafeLimit:
      type: integer
      allOf:
        - exclusiveMinimum: 0
    FlowReviewCriterionDescription:
      type: string
      allOf:
        - minLength: 1
        - maxLength: 1024
    ProjectId:
      type: string
      allOf:
        - pattern: ^prj_[0-9a-f]{32}$
    MountPath:
      type: string
      allOf:
        - minLength: 2
        - maxLength: 1024
    Union_231:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - latest
          required:
            - kind
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - pinned
            revision:
              type: integer
              allOf:
                - exclusiveMinimum: 0
          required:
            - kind
            - revision
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - ref
            ref:
              $ref: '#/components/schemas/GitReference'
          required:
            - kind
            - ref
          additionalProperties: false
    Union_232:
      type: string
      enum:
        - read_only
        - read_write
    Objects_128:
      type: object
      properties:
        kind:
          type: string
          enum:
            - pull_request
        commit_message:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 4096
        pull_request_title:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 256
        pull_request_body:
          type: string
          allOf:
            - maxLength: 16384
      required:
        - kind
      additionalProperties: false
    FileId:
      type: string
      allOf:
        - pattern: ^file_[0-9a-f]{32}$
    Objects_133:
      type: object
      properties:
        id:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 64
            - pattern: ^[A-Za-z0-9_]+$
        name:
          type: string
          allOf:
            - maxLength: 255
        condition:
          anyOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - predicates
                predicates:
                  type: array
                  items:
                    $ref: '#/components/schemas/Union_235'
                  allOf:
                    - minItems: 1
                    - maxItems: 10
                check: false
                input:
                  anyOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - trigger_payload
                      required:
                        - kind
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - previous_step_output
                      required:
                        - kind
                      additionalProperties: false
              required:
                - kind
                - predicates
              additionalProperties: false
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - check
                check:
                  $ref: '#/components/schemas/Objects_131'
                predicates: false
                input:
                  anyOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - trigger_payload
                      required:
                        - kind
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - previous_step_output
                      required:
                        - kind
                      additionalProperties: false
              required:
                - kind
                - check
              additionalProperties: false
        group:
          type: string
          allOf:
            - minLength: 1
            - maxLength: 64
            - pattern: ^[A-Za-z0-9_]+$
        action:
          anyOf:
            - anyOf:
                - type: object
                  properties:
                    action:
                      type: string
                      enum:
                        - run_agent
                    agent:
                      $ref: '#/components/schemas/AgentId'
                    agent_deployment_revision_selection:
                      $ref: '#/components/schemas/AgentDeploymentRevisionSelection'
                    outcome:
                      $ref: '#/components/schemas/Objects_134'
                    prompt:
                      type: string
                      allOf:
                        - minLength: 1
                        - maxLength: 16384
                    input: false
                  required:
                    - action
                    - agent
                    - prompt
                  additionalProperties: false
                - type: object
                  properties:
                    action:
                      type: string
                      enum:
                        - run_agent
                    agent:
                      $ref: '#/components/schemas/AgentId'
                    agent_deployment_revision_selection:
                      $ref: '#/components/schemas/AgentDeploymentRevisionSelection'
                    outcome:
                      $ref: '#/components/schemas/Objects_134'
                    prompt:
                      type: string
                      allOf:
                        - minLength: 1
                        - maxLength: 16384
                    input:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - trigger_payload
                      required:
                        - kind
                      additionalProperties: false
                  required:
                    - action
                    - agent
                    - prompt
                    - input
                  additionalProperties: false
                - type: object
                  properties:
                    action:
                      type: string
                      enum:
                        - run_agent
                    agent:
                      $ref: '#/components/schemas/AgentId'
                    agent_deployment_revision_selection:
                      $ref: '#/components/schemas/AgentDeploymentRevisionSelection'
                    outcome:
                      $ref: '#/components/schemas/Objects_134'
                    input:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - previous_step_output
                      required:
                        - kind
                      additionalProperties: false
                    prompt: false
                  required:
                    - action
                    - agent
                    - input
                  additionalProperties: false
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - check
                check:
                  $ref: '#/components/schemas/Objects_131'
              required:
                - action
                - check
              additionalProperties: false
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - call_connection
                connection:
                  $ref: '#/components/schemas/ConnectionId'
                tool:
                  type: string
                  allOf:
                    - pattern: ^[a-z0-9](?:[a-z0-9._-]{0,93})$
                arguments:
                  $ref: '#/components/schemas/AutomationStepArguments'
                acted_as: false
              required:
                - action
                - connection
                - tool
              additionalProperties: false
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - request_approval
                approver:
                  $ref: '#/components/schemas/PrincipalId'
                message:
                  type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 16384
                timeout_seconds:
                  type: integer
                  allOf:
                    - exclusiveMinimum: 0
                    - maximum: 604800
              required:
                - action
                - approver
                - message
              additionalProperties: false
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - wait
                seconds:
                  type: integer
                  allOf:
                    - exclusiveMinimum: 0
                    - maximum: 604800
              required:
                - action
                - seconds
              additionalProperties: false
      required:
        - id
        - action
      additionalProperties: false
    Objects_135:
      type: object
      properties:
        kind:
          type: string
          enum:
            - previous_step_output
      required:
        - kind
      additionalProperties: false
    Union_201:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - ambient
                - direct
            root_external_id:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 512
            thread_external_id:
              type: 'null'
          required:
            - kind
            - root_external_id
            - thread_external_id
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - thread
            root_external_id:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 512
            thread_external_id:
              type: string
              allOf:
                - minLength: 1
                - maxLength: 512
          required:
            - kind
            - root_external_id
            - thread_external_id
          additionalProperties: false
    Union_217:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - manual
            error_type: false
          required:
            - kind
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - error
            error_type:
              $ref: '#/components/schemas/Union_218'
          required:
            - kind
            - error_type
          additionalProperties: false
    SessionId:
      type: string
      allOf:
        - pattern: ^sess_[0-9a-f]{32}$
    RunId:
      type: string
      allOf:
        - pattern: ^run_[0-9a-f]{32}$
    GitReference:
      type: string
      allOf:
        - minLength: 1
        - maxLength: 1024
        - pattern: ^\S+$
    AgentId:
      type: string
      allOf:
        - pattern: ^agent_[0-9a-f]{32}$
    ConnectionId:
      type: string
      allOf:
        - pattern: ^conn_[0-9a-f]{32}$
    AutomationStepArguments:
      type: object
      additionalProperties:
        description: >-
          A value in the JSON data model: null, boolean, finite number, string,
          array, or object.
        allOf:
          - x-checkfu-json-budget:
              maximumBytes: 8192
              maximumDepth: 64
              maximumNodes: 8192
              maximumInspectionWork: 8192
      allOf:
        - x-checkfu-json-budget:
            maximumBytes: 8192
            maximumDepth: 64
            maximumNodes: 8192
            maximumInspectionWork: 8192
        - maxProperties: 8192
          description: JSON tool arguments of at most 8192 bytes
    Union_218:
      type: string
      enum:
        - validation.malformed
        - validation.prompt_integrity_review_required
        - validation.not_found
        - validation.conflict
        - validation.idempotency_conflict
        - validation.idempotency_in_progress
        - validation.payload_too_large
        - validation.range_too_large
        - auth.invalid_key
        - auth.disabled_tenancy
        - policy.denied
        - budget.exceeded
        - model.no_eligible_model
        - model.credential_rejected
        - model.platform_supply_unavailable
        - model.platform_capacity_reached
        - billing.entitlement_unavailable
        - billing.usage_limit_reached
        - billing.payment_required
        - billing.seat_activation_unavailable
        - memory.not_found
        - memory.conflict
        - memory.read_only
        - memory.invalid_path
        - memory.backend_unavailable
        - memory.curation_failed
        - runtime.invalid_transition
        - runtime.primary_thread
        - runtime.checkpoint_expired
        - runtime.session_history_unavailable
        - runtime.harness_unavailable
        - runtime.harness_failed
        - runtime.runner_unavailable
        - runtime.lease_lost
        - runtime.start_timeout
        - runtime.provisioning_suspended
        - runtime.turn_deadline_exceeded
        - runtime.observation_gap
        - runtime.observation_conflict
        - runtime.attestation_invalid
        - runtime.harness_incompatible
        - runtime.internal
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````