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

# Publish private Tool source

> Requires `services:publish`. Publishes selected source, manifest and optional authored view/browser app as an immutable private Tool version. Entry point must be one of the selected files; duplicate/traversal paths are rejected. A returned failed build is not usable publication, and schema declarations do not prove fidelity to an external dependency.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/service-builds
openapi: 3.1.0
info:
  title: Firedrill API
  version: '2026-10-14'
  description: >-
    Authenticated simulation coordination, retained evidence and controlled
    Tools. Your customer-owned runner executes the target. This reference covers
    the documented JSON workflows; Tool-native HTTP routes and MCP methods are
    discovered from the selected Tool. Structural schemas do not replace
    canonical validation or capability checks.
servers:
  - url: https://api.firedrill.run
security:
  - FiredrillCredential: []
tags:
  - name: discovery
    description: Capabilities, authority and structural authoring schemas.
  - name: projects
    description: Projects and their logical environment.
  - name: simulations
    description: Preparation, queued batches and cancellation.
  - name: runs
    description: Individual recorded executions.
  - name: reports
    description: Retained observations, distributions and descriptive comparisons.
  - name: assessment
    description: Optional semantic assessment and authored scenario ranking.
  - name: evidence
    description: Authenticated captured files.
  - name: runner-protocol
    description: Advanced customer-runner coordination; native SDKs manage this protocol.
  - name: scenarios
    description: Immutable retained versions of repository-authored scenarios.
  - name: credentials
    description: Expiring scoped CI credentials.
  - name: authentication
    description: Human-approved sign-in boundaries.
  - name: tools
    description: Tool releases, data, instances and observations.
  - name: tool-connections
    description: Bounded target/manual grants, separate from control authority.
  - name: tool-lifecycle
    description: Epoch-fenced reusable Tool actions and exact-key recovery.
paths:
  /v1/service-builds:
    post:
      tags:
        - tools
      summary: Publish private Tool source
      description: >-
        Requires `services:publish`. Publishes selected source, manifest and
        optional authored view/browser app as an immutable private Tool version.
        Entry point must be one of the selected files; duplicate/traversal paths
        are rejected. A returned failed build is not usable publication, and
        schema declarations do not prove fidelity to an external dependency.
      operationId: tool_builds_publish
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishBuildInput'
      responses:
        '200':
          description: The retained resource or operation response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceBuild'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '410':
          $ref: '#/components/responses/Gone'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/InvalidInput'
        '429':
          $ref: '#/components/responses/Capacity'
        '500':
          $ref: '#/components/responses/Internal'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        Save a unique stable key for this exact logical action, at most 200
        characters. Reuse it with identical input after an uncertain response. A
        new key is new intent; it must not be used merely to recover an accepted
        action.
      schema:
        type: string
        minLength: 1
        maxLength: 200
  schemas:
    PublishBuildInput:
      type: object
      properties:
        projectId:
          type: string
          minLength: 1
          maxLength: 160
        environmentId:
          type: string
          minLength: 1
          maxLength: 160
        entryPoint:
          type: string
          minLength: 1
          maxLength: 240
          pattern: ^[A-Za-z0-9][A-Za-z0-9_./-]*\.(?:ts|js|mjs)$
        manifest:
          type: object
          properties:
            schemaVersion:
              type: number
              const: 1
            id:
              type: string
              minLength: 1
              maxLength: 96
              pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
            version:
              type: string
              pattern: >-
                ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$
            engine:
              type: string
              minLength: 1
              maxLength: 128
            capabilities:
              type: array
              items:
                type: string
                enum:
                  - state.read
                  - state.write
                  - clock.read
                  - clock.schedule
                  - random.draw
                  - event.emit
            state:
              default: []
              type: array
              items:
                type: object
                properties:
                  namespace:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  schema:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/SharedDefinitionsSchema0'
                  description:
                    type: string
                    minLength: 1
                    maxLength: 1000
                required:
                  - namespace
                  - schema
                additionalProperties: false
            operations:
              minItems: 1
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                    pattern: >-
                      ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                  description:
                    type: string
                    minLength: 1
                    maxLength: 1000
                  inputSchema:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/SharedDefinitionsSchema0'
                  outputSchema:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/SharedDefinitionsSchema0'
                  declaredErrors:
                    default: []
                    type: array
                    items:
                      type: string
                      pattern: ^[A-Z][A-Z0-9_]*$
                  idempotency:
                    type: string
                    enum:
                      - none
                      - optional
                      - required
                  fidelity:
                    type: string
                    enum:
                      - contract
                      - stateful
                      - behavioral
                      - validated
                  mcp:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 128
                        pattern: ^[A-Za-z0-9_.-]+$
                      description:
                        type: string
                        minLength: 1
                        maxLength: 1000
                    required:
                      - name
                    additionalProperties: false
                required:
                  - id
                  - inputSchema
                  - outputSchema
                  - idempotency
                  - fidelity
                additionalProperties: false
            events:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                    pattern: >-
                      ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                  payloadSchema:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/SharedDefinitionsSchema0'
                required:
                  - id
                  - payloadSchema
                additionalProperties: false
            faults:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  appliesTo:
                    minItems: 1
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 160
                      pattern: >-
                        ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                  timing:
                    type: string
                    enum:
                      - before
                      - after_commit
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        pattern: ^[A-Z][A-Z0-9_]*$
                      message:
                        type: string
                        minLength: 1
                        maxLength: 1000
                      retryable:
                        type: boolean
                    required:
                      - code
                      - message
                      - retryable
                    additionalProperties: false
                required:
                  - id
                  - appliesTo
                  - timing
                  - error
                additionalProperties: false
            subscriptions:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  event:
                    type: object
                    properties:
                      packageId:
                        type: string
                        minLength: 1
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      instanceId:
                        type: string
                        minLength: 1
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      eventId:
                        type: string
                        minLength: 1
                        maxLength: 160
                        pattern: >-
                          ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                    required:
                      - packageId
                      - eventId
                    additionalProperties: false
                required:
                  - id
                  - event
                additionalProperties: false
            http:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  operationId:
                    type: string
                    minLength: 1
                    maxLength: 160
                    pattern: >-
                      ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                  method:
                    type: string
                    enum:
                      - DELETE
                      - GET
                      - PATCH
                      - POST
                      - PUT
                  path:
                    type: string
                    minLength: 1
                    maxLength: 512
                  auth:
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: bearer
                          schemes:
                            default:
                              - Bearer
                            minItems: 1
                            type: array
                            items:
                              type: string
                              minLength: 1
                              maxLength: 64
                              pattern: ^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
                        required:
                          - kind
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: header
                          name:
                            type: string
                            minLength: 1
                            maxLength: 128
                            pattern: ^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
                        required:
                          - kind
                          - name
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: query
                          name:
                            type: string
                            minLength: 1
                            maxLength: 128
                            pattern: ^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
                        required:
                          - kind
                          - name
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: basic
                          token:
                            type: string
                            enum:
                              - username
                              - password
                          username:
                            type: string
                            minLength: 1
                            maxLength: 128
                        required:
                          - kind
                          - token
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: none
                        required:
                          - kind
                        additionalProperties: false
                  requestBody:
                    type: string
                    enum:
                      - none
                      - json
                      - form
                      - text
                  response:
                    type: object
                    properties:
                      successStatus:
                        type: integer
                        minimum: 200
                        maximum: 299
                      errors:
                        default: []
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              pattern: ^[A-Z][A-Z0-9_]*$
                            status:
                              type: integer
                              minimum: 400
                              maximum: 599
                          required:
                            - code
                            - status
                          additionalProperties: false
                    required:
                      - successStatus
                    additionalProperties: false
                required:
                  - id
                  - operationId
                  - method
                  - path
                  - auth
                  - requestBody
                  - response
                additionalProperties: false
            callbacks:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  eventId:
                    type: string
                    minLength: 1
                    maxLength: 160
                    pattern: >-
                      ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*)*$
                  receiverId:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  method:
                    type: string
                    enum:
                      - POST
                      - PUT
                  path:
                    type: string
                    minLength: 1
                    maxLength: 512
                  idempotencyHeader:
                    type: string
                    minLength: 1
                    maxLength: 128
                    pattern: ^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
                  signature:
                    default:
                      kind: none
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: none
                        required:
                          - kind
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: hmac-sha256
                          header:
                            type: string
                            minLength: 1
                            maxLength: 128
                            pattern: ^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
                          prefix:
                            default: sha256=
                            type: string
                            maxLength: 32
                        required:
                          - kind
                          - header
                        additionalProperties: false
                  retry:
                    default:
                      delaysUs: []
                    type: object
                    properties:
                      delaysUs:
                        default: []
                        maxItems: 9
                        type: array
                        items:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                    additionalProperties: false
                  timeoutMs:
                    default: 5000
                    type: integer
                    minimum: 100
                    maximum: 30000
                required:
                  - id
                  - eventId
                  - receiverId
                  - method
                  - path
                  - idempotencyHeader
                additionalProperties: false
            compatibility:
              default: []
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  mode:
                    type: string
                    const: translated
                  protocol:
                    type: string
                    const: http
                  service:
                    type: string
                    minLength: 1
                    maxLength: 256
                  apiVersion:
                    type: string
                    minLength: 1
                    maxLength: 128
                  client:
                    type: object
                    properties:
                      ecosystem:
                        type: string
                        enum:
                          - npm
                          - pypi
                          - other
                      name:
                        type: string
                        minLength: 1
                        maxLength: 256
                      version:
                        type: string
                        minLength: 1
                        maxLength: 128
                    required:
                      - ecosystem
                      - name
                      - version
                    additionalProperties: false
                  configuration:
                    type: object
                    properties:
                      endpoint:
                        type: string
                        minLength: 1
                        maxLength: 128
                      credential:
                        type: string
                        minLength: 1
                        maxLength: 128
                    required:
                      - endpoint
                      - credential
                    additionalProperties: false
                  routes:
                    minItems: 1
                    type: array
                    items:
                      type: object
                      properties:
                        routeId:
                          type: string
                          minLength: 1
                          maxLength: 96
                          pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                        clientMethod:
                          type: string
                          minLength: 1
                          maxLength: 256
                      required:
                        - routeId
                        - clientMethod
                      additionalProperties: false
                  flows:
                    minItems: 1
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          maxLength: 96
                          pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                        description:
                          type: string
                          minLength: 1
                          maxLength: 1000
                        routeIds:
                          minItems: 1
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 96
                            pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      required:
                        - id
                        - description
                        - routeIds
                      additionalProperties: false
                  limitations:
                    minItems: 1
                    maxItems: 100
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 1000
                required:
                  - id
                  - mode
                  - protocol
                  - service
                  - client
                  - configuration
                  - routes
                  - flows
                  - limitations
                additionalProperties: false
            connections:
              maxItems: 32
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 96
                    pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                  title:
                    type: string
                    minLength: 1
                    maxLength: 200
                  protocol:
                    type: string
                    enum:
                      - http
                      - mcp
                      - cli
                  environment:
                    type: object
                    propertyNames:
                      type: string
                      pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                    additionalProperties:
                      type: string
                      enum:
                        - FIREDRILL_HTTP_URL
                        - FIREDRILL_HTTP_TOKEN
                        - FIREDRILL_MCP_URL
                        - FIREDRILL_MCP_TOKEN
                        - FIREDRILL_CLI_URL
                        - FIREDRILL_CLI_TOKEN
                  instructions:
                    type: string
                    minLength: 1
                    maxLength: 2000
                required:
                  - id
                  - title
                  - protocol
                  - environment
                additionalProperties: false
          required:
            - schemaVersion
            - id
            - version
            - engine
            - capabilities
            - operations
          additionalProperties: false
        view:
          type: object
          properties:
            schemaVersion:
              type: number
              const: 1
            title:
              type: string
              minLength: 1
              maxLength: 120
            records:
              default: []
              maxItems: 8
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    maxLength: 64
                    pattern: ^[a-z][a-z0-9_-]*$
                  title:
                    type: string
                    minLength: 1
                    maxLength: 120
                  operationId:
                    type: string
                    minLength: 1
                    maxLength: 160
                  arguments:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/SharedDefinitionsSchema0'
                  rowsPath:
                    maxItems: 8
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 128
                  columns:
                    minItems: 1
                    maxItems: 16
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                          minLength: 1
                          maxLength: 120
                        path:
                          maxItems: 8
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 128
                      required:
                        - label
                        - path
                      additionalProperties: false
                required:
                  - id
                  - title
                  - operationId
                  - arguments
                  - rowsPath
                  - columns
                additionalProperties: false
            forms:
              default: []
              maxItems: 8
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    maxLength: 64
                    pattern: ^[a-z][a-z0-9_-]*$
                  title:
                    type: string
                    minLength: 1
                    maxLength: 120
                  operationId:
                    type: string
                    minLength: 1
                    maxLength: 160
                  fields:
                    maxItems: 24
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          minLength: 1
                          maxLength: 100
                        label:
                          type: string
                          minLength: 1
                          maxLength: 120
                        kind:
                          type: string
                          enum:
                            - text
                            - integer
                            - number
                            - boolean
                      required:
                        - name
                        - label
                        - kind
                      additionalProperties: false
                required:
                  - id
                  - title
                  - operationId
                  - fields
                additionalProperties: false
          required:
            - schemaVersion
            - title
          additionalProperties: false
        ui:
          type: object
          properties:
            entryPath:
              type: string
              minLength: 1
              maxLength: 512
              pattern: >-
                ^[A-Za-z0-9_-][A-Za-z0-9._-]*(?:\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
            assets:
              minItems: 1
              maxItems: 256
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                    minLength: 1
                    maxLength: 512
                    pattern: >-
                      ^[A-Za-z0-9_-][A-Za-z0-9._-]*(?:\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
                  base64:
                    type: string
                    maxLength: 5592408
                    pattern: >-
                      ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                required:
                  - path
                  - base64
                additionalProperties: false
          required:
            - entryPath
            - assets
          additionalProperties: false
        conformance:
          type: object
          properties:
            schemaVersion:
              type: number
              const: 1
            cases:
              minItems: 1
              maxItems: 20
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                  seed:
                    default: '1'
                    type: string
                    pattern: ^(0|[1-9][0-9]*)$
                  actorOperations:
                    maxItems: 256
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 160
                  records:
                    default: []
                    maxItems: 1000
                    type: array
                    items:
                      type: object
                      properties:
                        namespace:
                          type: string
                          maxLength: 96
                        rowId:
                          type: string
                          maxLength: 512
                        value:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            $ref: '#/components/schemas/SharedDefinitionsSchema0'
                      required:
                        - namespace
                        - rowId
                        - value
                      additionalProperties: false
                  steps:
                    minItems: 1
                    maxItems: 16
                    type: array
                    items:
                      type: object
                      properties:
                        operationId:
                          type: string
                          minLength: 1
                          maxLength: 160
                        arguments:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            $ref: '#/components/schemas/SharedDefinitionsSchema0'
                        expect:
                          minItems: 1
                          maxItems: 16
                          type: array
                          items:
                            type: object
                            properties:
                              path:
                                type: string
                                maxLength: 512
                              expected:
                                $ref: '#/components/schemas/SharedDefinitionsSchema0'
                            required:
                              - path
                              - expected
                            additionalProperties: false
                      required:
                        - operationId
                        - arguments
                        - expect
                      additionalProperties: false
                required:
                  - id
                  - actorOperations
                  - steps
                additionalProperties: false
          required:
            - schemaVersion
            - cases
          additionalProperties: false
        datasetPolicy:
          type: object
          properties:
            schemaVersion:
              type: string
              const: 2026-10-15-dataset-policy.1
            constraints:
              minItems: 1
              maxItems: 64
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[a-z][a-z0-9_-]{0,63}$
                      kind:
                        type: string
                        const: unique
                      namespace:
                        type: string
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      pointers:
                        minItems: 1
                        maxItems: 8
                        type: array
                        items:
                          type: string
                          maxLength: 512
                    required:
                      - id
                      - kind
                      - namespace
                      - pointers
                    additionalProperties: false
                  - type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[a-z][a-z0-9_-]{0,63}$
                      kind:
                        type: string
                        const: reference
                      namespace:
                        type: string
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      pointer:
                        type: string
                        maxLength: 512
                      targetNamespace:
                        type: string
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      targetPointer:
                        type: string
                        maxLength: 512
                      optional:
                        type: boolean
                    required:
                      - id
                      - kind
                      - namespace
                      - pointer
                      - targetNamespace
                    additionalProperties: false
                  - type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[a-z][a-z0-9_-]{0,63}$
                      kind:
                        type: string
                        const: count
                      namespace:
                        type: string
                        maxLength: 96
                        pattern: ^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$
                      min:
                        type: integer
                        minimum: 0
                        maximum: 100000
                      max:
                        type: integer
                        minimum: 0
                        maximum: 100000
                    required:
                      - id
                      - kind
                      - namespace
                    additionalProperties: false
          required:
            - schemaVersion
            - constraints
          additionalProperties: false
        files:
          minItems: 1
          maxItems: 128
          type: array
          items:
            type: object
            properties:
              path:
                type: string
                minLength: 1
                maxLength: 240
                pattern: ^[A-Za-z0-9][A-Za-z0-9_./-]*\.(?:ts|js|mjs)$
              content:
                type: string
                maxLength: 1048576
            required:
              - path
              - content
            additionalProperties: false
      required:
        - projectId
        - environmentId
        - entryPoint
        - manifest
        - files
      additionalProperties: false
    ServiceBuild:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        status:
          type: string
        manifest:
          $ref: '#/components/schemas/ServiceManifest'
        sourceDigest:
          type: string
        manifestDigest:
          type: string
        artifactDigest:
          anyOf:
            - type: 'null'
            - type: string
        view:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/ServiceView'
        viewDigest:
          anyOf:
            - type: 'null'
            - type: string
        datasetPolicy:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/DatasetPolicy'
        datasetPolicyDigest:
          anyOf:
            - type: 'null'
            - type: string
        publicationDigest:
          anyOf:
            - type: 'null'
            - type: string
        failure:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/ServiceBuildFailure'
        createdAt:
          type: string
      required:
        - id
        - projectId
        - status
        - manifest
        - sourceDigest
        - manifestDigest
        - artifactDigest
        - createdAt
    SharedDefinitionsSchema0:
      description: >-
        Any JSON value: null, boolean, finite number, string, array or object.
        The request transport must contain valid JSON; canonical validation
        rejects nonfinite numbers.
    ServiceManifest:
      type: object
      properties: {}
      required: []
      additionalProperties:
        $ref: '#/components/schemas/JsonValue'
    ServiceView:
      type: object
      properties:
        schemaVersion:
          type: number
          const: 1
        title:
          type: string
        records:
          anyOf:
            - type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  operationId:
                    type: string
                  arguments:
                    type: object
                    properties: {}
                    required: []
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                  rowsPath:
                    type: array
                    items:
                      type: string
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                        path:
                          type: array
                          items:
                            type: string
                      required:
                        - label
                        - path
                required:
                  - id
                  - title
                  - operationId
                  - arguments
                  - rowsPath
                  - columns
        forms:
          anyOf:
            - type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  operationId:
                    type: string
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        label:
                          type: string
                        kind:
                          type: string
                          enum:
                            - number
                            - boolean
                            - text
                            - integer
                      required:
                        - name
                        - label
                        - kind
                required:
                  - id
                  - title
                  - operationId
                  - fields
      required:
        - schemaVersion
        - title
    DatasetPolicy:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-15-dataset-policy.1
        constraints:
          type: array
          items:
            $ref: '#/components/schemas/DatasetConstraint'
      required:
        - schemaVersion
        - constraints
    ServiceBuildFailure:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-17-service-build-diagnostics.1
        code:
          type: string
          const: FD_SERVICE_BUILD_FAILED
        diagnostics:
          type: array
          items:
            $ref: '#/components/schemas/ServiceBuildDiagnostic'
        truncated:
          type: boolean
      required:
        - schemaVersion
        - code
        - diagnostics
        - truncated
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            repair:
              type: string
            requestId:
              type: string
            details:
              anyOf:
                - type: 'null'
                - type: string
                - type: number
                - type: boolean
                  const: false
                - type: boolean
                  const: true
                - type: array
                  items:
                    $ref: '#/components/schemas/JsonValue'
                - type: object
                  properties: {}
                  required: []
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            validation:
              anyOf:
                - $ref: '#/components/schemas/ValidationDiagnostics'
          required:
            - code
            - message
            - repair
            - requestId
      required:
        - error
    JsonValue:
      description: >-
        Any JSON value: null, boolean, finite number, string, array or object.
        The request transport must contain valid JSON; canonical validation
        rejects nonfinite numbers.
    DatasetConstraint:
      anyOf:
        - type: object
          properties:
            id:
              type: string
            kind:
              type: string
              const: count
            namespace:
              type: string
            min:
              anyOf:
                - type: number
            max:
              anyOf:
                - type: number
          required:
            - id
            - kind
            - namespace
        - type: object
          properties:
            id:
              type: string
            kind:
              type: string
              const: unique
            namespace:
              type: string
            pointers:
              type: array
              items:
                type: string
          required:
            - id
            - kind
            - namespace
            - pointers
        - type: object
          properties:
            id:
              type: string
            kind:
              type: string
              const: reference
            namespace:
              type: string
            pointer:
              type: string
            targetNamespace:
              type: string
            targetPointer:
              anyOf:
                - type: string
            optional:
              anyOf:
                - type: boolean
                  const: false
                - type: boolean
                  const: true
          required:
            - id
            - kind
            - namespace
            - pointer
            - targetNamespace
    ServiceBuildDiagnostic:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ServiceBuildDiagnosticCode'
        message:
          type: string
        repair:
          type: string
        file:
          anyOf:
            - type: string
        line:
          anyOf:
            - type: number
        column:
          anyOf:
            - type: number
      required:
        - code
        - message
        - repair
    ValidationDiagnostics:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
        totalIssues:
          type: number
        omittedIssues:
          type: number
      required:
        - issues
        - totalIssues
        - omittedIssues
    ServiceBuildDiagnosticCode:
      type: string
      enum:
        - SOURCE_SYNTAX
        - SOURCE_IMPORT_DENIED
        - SOURCE_IMPORT_UNRESOLVED
        - SOURCE_BOUNDARY
        - SOURCE_LIMIT
        - SOURCE_EXTENSION
        - SOURCE_COMPILE
    ValidationIssue:
      type: object
      properties:
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: number
        code:
          type: string
        message:
          type: string
        pathTruncated:
          anyOf:
            - type: boolean
              const: true
      required:
        - path
        - code
        - message
  responses:
    BadRequest:
      description: >-
        Malformed request or missing operation key. Repair the input before
        retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: >-
        Missing, expired or revoked authority. Complete supported sign-in or use
        an authorized credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: >-
        The current capability, actor, audience or ownership grant does not
        allow this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: The exact resource is unavailable under the current authority and scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: >-
        Selected context, epoch, revision, lease or saved operation intent
        conflicts; inspect retained state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Gone:
      description: >-
        Retained content is expired, deleted or unavailable under its retention
        fence. Metadata is not a replacement payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    PayloadTooLarge:
      description: >-
        Request, response or retained-resource size exceeds this operation’s
        enforced bound.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    UnsupportedMediaType:
      description: Send the documented JSON or exact artifact media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InvalidInput:
      description: >-
        Input failed canonical validation. Inspect error.validation and repair
        the indicated fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Capacity:
      description: >-
        Bounded capacity or resource admission rejected the operation. Inspect
        retained work before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Internal:
      description: >-
        The service could not complete the request. Inspect retained state
        before exact-key recovery.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unavailable:
      description: >-
        A required service, provider or authority check is unavailable. Existing
        evidence remains separate from this failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    FiredrillCredential:
      type: http
      scheme: bearer
      description: >-
        Opaque Firedrill interactive or scoped machine credential. The CLI
        handles human-approved login; CI stores its scoped credential as
        FIREDRILL_TOKEN. Capabilities and project/environment ownership are
        rechecked at use.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.