components:
  schemas:
    AddConceptOptionRequest:
      properties:
        criteriaScores:
          additionalProperties:
            type: number
          title: Criteriascores
          type: object
        evidenceBackedCriteria:
          default: []
          items:
            type: string
          title: Evidencebackedcriteria
          type: array
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        title:
          title: Title
          type: string
      required:
        - title
        - criteriaScores
      title: AddConceptOptionRequest
      type: object
    AnalysedRef:
      properties:
        current:
          title: Current
          type: boolean
        key:
          title: Key
          type: string
        ref:
          title: Ref
          type: string
        revision:
          title: Revision
          type: integer
      required:
        - key
        - revision
        - ref
        - current
      title: AnalysedRef
      type: object
    AppliedPatchView:
      properties:
        nextStep:
          title: Nextstep
          type: string
        rerun:
          items:
            type: string
          title: Rerun
          type: array
        runId:
          title: Runid
          type: string
        versionId:
          title: Versionid
          type: string
      required:
        - runId
        - versionId
        - nextStep
      title: AppliedPatchView
      type: object
    ApprovalDecision:
      description: Body for ``POST /api/v1/assistant/proposals/{change_id}/decide``.
      properties:
        change_id:
          description: UUID of the proposal to decide on
          format: uuid
          title: Change Id
          type: string
        decision:
          $ref: '#/components/schemas/ApprovalDecisionType'
          description: Approve or reject
        reason:
          description: Human-written justification for the decision
          minLength: 1
          title: Reason
          type: string
        reviewer:
          description: Identifier of the human reviewer
          minLength: 1
          title: Reviewer
          type: string
      required:
        - change_id
        - decision
        - reason
        - reviewer
      title: ApprovalDecision
      type: object
    ApprovalDecisionType:
      description: The two possible human verdicts on a change proposal.
      enum:
        - approve
        - reject
      title: ApprovalDecisionType
      type: string
    ApprovalItem:
      description: One normalized approval, whatever it is about.
      properties:
        allowed_decisions:
          items:
            enum:
              - approve
              - reject
              - retry
              - rework
            type: string
          title: Allowed Decisions
          type: array
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        deadline:
          anyOf:
            - type: string
            - type: 'null'
          title: Deadline
        decidable:
          default: false
          title: Decidable
          type: boolean
        decision:
          anyOf:
            - $ref: '#/components/schemas/DecisionRecord'
            - type: 'null'
        detail:
          additionalProperties: true
          title: Detail
          type: object
        findings:
          items:
            $ref: '#/components/schemas/GateFinding'
          title: Findings
          type: array
        id:
          title: Id
          type: string
        kind:
          enum:
            - gate
            - flow_proposal
            - flow_version
            - flow_patch
            - tool_call
            - human_authority
            - design_change
            - design_loop
            - sketch
            - drawing
          title: Kind
          type: string
        not_decidable_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Not Decidable Reason
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        reason_held:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason Held
        reason_required_for:
          items:
            type: string
          title: Reason Required For
          type: array
        requested_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Requested By
        rework_targets:
          items:
            type: string
          title: Rework Targets
          type: array
        route:
          anyOf:
            - enum:
                - dashboard
                - elicitation
              type: string
            - type: 'null'
          title: Route
        status:
          enum:
            - pending
            - approved
            - rejected
            - expired
            - canceled
            - retried
            - reworked
          title: Status
          type: string
        summary:
          default: ''
          title: Summary
          type: string
        title:
          title: Title
          type: string
      required:
        - id
        - kind
        - status
        - title
      title: ApprovalItem
      type: object
    ApprovalListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ApprovalItem'
          title: Items
          type: array
        unscoped_count:
          default: 0
          title: Unscoped Count
          type: integer
      required:
        - items
      title: ApprovalListResponse
      type: object
    ApprovalRequest:
      description: Body for ``POST /v1/runs/{id}/approval``.
      properties:
        decision:
          enum:
            - approve
            - reject
            - retry
            - rework
          title: Decision
          type: string
        reason:
          default: ''
          maxLength: 2000
          title: Reason
          type: string
        to_phase:
          default: ''
          maxLength: 200
          title: To Phase
          type: string
      required:
        - decision
      title: ApprovalRequest
      type: object
    ApproveDesignLoopRequest:
      properties:
        approvedBy:
          title: Approvedby
          type: string
      required:
        - approvedBy
      title: ApproveDesignLoopRequest
      type: object
    ApproveSketchRequest:
      description: >-
        Human sign-off on a design_sketch work product (follow-up to
        MET-740/747).
      properties:
        approved_by:
          anyOf:
            - type: string
            - type: 'null'
          description: Identifier of the human approving this sketch.
          title: Approved By
      title: ApproveSketchRequest
      type: object
    ApproveSketchResponse:
      description: Result of approving a design_sketch — the gate's new state.
      properties:
        approved:
          title: Approved
          type: boolean
        approved_at:
          title: Approved At
          type: string
        node_id:
          title: Node Id
          type: string
      required:
        - node_id
        - approved
        - approved_at
      title: ApproveSketchResponse
      type: object
    ApproveTechnicalDrawingRequest:
      description: Human sign-off on a technical_drawing work product (FORGE-293).
      properties:
        approved_by:
          anyOf:
            - type: string
            - type: 'null'
          description: Identifier of the human approving this drawing.
          title: Approved By
      title: ApproveTechnicalDrawingRequest
      type: object
    ApproveTechnicalDrawingResponse:
      description: Result of approving a technical_drawing — the gate's new state.
      properties:
        approved:
          title: Approved
          type: boolean
        approved_at:
          title: Approved At
          type: string
        node_id:
          title: Node Id
          type: string
      required:
        - node_id
        - approved
        - approved_at
      title: ApproveTechnicalDrawingResponse
      type: object
    AssemblyJoint:
      description: |-
        One mate/joint between two committed parts (FORGE-271).

        Same shape as ``AssemblyDescription['joints'][n]`` (``types/twin.ts``) /
        the export panel's own ``JointRow`` -- a joint authored here and one
        authored via the URDF/SDF/USD export form are structurally identical.
      properties:
        anchor:
          default:
            - 0
            - 0
            - 0
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Anchor
          type: array
        axis:
          default:
            - 0
            - 0
            - 1
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Axis
          type: array
        base:
          minLength: 1
          title: Base
          type: string
        follower:
          minLength: 1
          title: Follower
          type: string
        limits:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Limits
        name:
          minLength: 1
          title: Name
          type: string
        type:
          title: Type
          type: string
      required:
        - name
        - type
        - base
        - follower
      title: AssemblyJoint
      type: object
    AssemblyPart:
      description: One primitive component of an assembly.
      properties:
        chamfer:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            If set, bevel every edge of the part by this distance (mm), applied
            before holes. Must be smaller than half the part's thinnest
            dimension. Use fillet OR chamfer.
          title: Chamfer
        fillet:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            If set, round every edge of the part by this radius (mm), applied
            before holes. Must be smaller than half the part's thinnest
            dimension or the fillet fails.
          title: Fillet
        holes:
          description: Mounting/fastener holes drilled into the part.
          items:
            $ref: '#/components/schemas/Hole'
          title: Holes
          type: array
        kind:
          description: Primitive kind.
          enum:
            - box
            - cylinder
            - cone
            - sphere
          title: Kind
          type: string
        name:
          description: Human name of the part (STEP PRODUCT).
          minLength: 1
          title: Name
          type: string
        parameters:
          additionalProperties:
            type: number
          description: 'Dimensions in mm (box: width/length/height; …).'
          title: Parameters
          type: object
        position:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          description: Optional [x, y, z] placement in mm.
          title: Position
      required:
        - name
        - kind
      title: AssemblyPart
      type: object
    AssemblyResponse:
      properties:
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        minio_object_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Minio Object Key
        model_url:
          title: Model Url
          type: string
        node_id:
          title: Node Id
          type: string
        part_count:
          title: Part Count
          type: integer
      required:
        - node_id
        - model_url
        - part_count
      title: AssemblyResponse
      type: object
    AssistantRequest:
      description: |-
        Body for ``POST /api/v1/assistant/request``.

        Every request must belong to a project. An IDE assistant submits a
        request to invoke an agent on a specific design work_product.
      properties:
        action:
          description: Agent action to perform (e.g. 'validate_stress', 'run_drc')
          minLength: 1
          title: Action
          type: string
        parameters:
          additionalProperties: true
          description: Action-specific parameters
          title: Parameters
          type: object
        project_id:
          description: Project this request belongs to
          minLength: 1
          title: Project Id
          type: string
        prompt:
          default: ''
          description: >-
            Free-text prompt or description for generative actions (e.g.
            generate_cad)
          title: Prompt
          type: string
        session_id:
          description: Session ID for grouping related requests
          format: uuid
          title: Session Id
          type: string
        target_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: UUID of the target work_product (optional for generative actions)
          title: Target Id
      required:
        - action
        - project_id
      title: AssistantRequest
      type: object
    AssistantResponse:
      description: Response returned by ``POST /api/v1/assistant/request``.
      properties:
        errors:
          description: Error messages, if any
          items:
            type: string
          title: Errors
          type: array
        request_id:
          description: Unique request identifier
          format: uuid
          title: Request Id
          type: string
        result:
          additionalProperties: true
          description: Action result payload
          title: Result
          type: object
        status:
          description: Request status (accepted, completed, failed)
          title: Status
          type: string
      required:
        - status
      title: AssistantResponse
      type: object
    AttemptPromotionRequest:
      properties:
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        k:
          default: 1
          title: K
          type: number
        level:
          title: Level
          type: string
        projectId:
          title: Projectid
          type: string
        reject:
          default: false
          title: Reject
          type: boolean
        requiredClaimIds:
          items:
            type: string
          title: Requiredclaimids
          type: array
      required:
        - projectId
        - level
        - requiredClaimIds
      title: AttemptPromotionRequest
      type: object
    AttemptPromotionResponse:
      properties:
        blockedReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Blockedreason
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        decidedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Decidedby
        gateId:
          title: Gateid
          type: string
        level:
          title: Level
          type: string
        promoted:
          title: Promoted
          type: boolean
        results:
          items:
            $ref: '#/components/schemas/RequiredClaimResultView'
          title: Results
          type: array
      required:
        - gateId
        - level
        - promoted
        - blockedReason
        - decidedBy
        - comment
        - results
      title: AttemptPromotionResponse
      type: object
    BaselineDetail:
      properties:
        approved_by:
          items:
            type: string
          title: Approved By
          type: array
        created_at:
          title: Created At
          type: string
        gate_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate Id
        id:
          title: Id
          type: string
        item_count:
          title: Item Count
          type: integer
        items:
          items:
            $ref: '#/components/schemas/BaselineItemRefResponse'
          title: Items
          type: array
        member_count:
          title: Member Count
          type: integer
        members:
          items:
            $ref: '#/components/schemas/BaselineMemberResponse'
          title: Members
          type: array
        name:
          title: Name
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        reason:
          default: ''
          title: Reason
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        source:
          default: manual
          title: Source
          type: string
      required:
        - id
        - name
        - created_at
        - approved_by
        - item_count
        - member_count
      title: BaselineDetail
      type: object
    BaselineDiffResponse:
      properties:
        a:
          $ref: '#/components/schemas/BaselineSummary'
        b:
          anyOf:
            - $ref: '#/components/schemas/BaselineSummary'
            - type: 'null'
        b_is_current:
          default: false
          title: B Is Current
          type: boolean
        counts:
          additionalProperties:
            type: integer
          title: Counts
          type: object
        items:
          items:
            $ref: '#/components/schemas/BaselineItemDiffResponse'
          title: Items
          type: array
      required:
        - a
        - items
        - counts
      title: BaselineDiffResponse
      type: object
    BaselineItemDiffResponse:
      properties:
        from_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: From Ref
        from_revision:
          anyOf:
            - type: integer
            - type: 'null'
          title: From Revision
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        status:
          title: Status
          type: string
        to_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: To Ref
        to_revision:
          anyOf:
            - type: integer
            - type: 'null'
          title: To Revision
      required:
        - key
        - item_type
        - name
        - status
      title: BaselineItemDiffResponse
      type: object
    BaselineItemRefResponse:
      properties:
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          default: ''
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        ref:
          title: Ref
          type: string
        revision:
          title: Revision
          type: integer
      required:
        - key
        - item_type
        - revision
        - ref
        - node_id
      title: BaselineItemRefResponse
      type: object
    BaselineListResponse:
      properties:
        baselines:
          items:
            $ref: '#/components/schemas/BaselineSummary'
          title: Baselines
          type: array
        total:
          title: Total
          type: integer
      required:
        - baselines
        - total
      title: BaselineListResponse
      type: object
    BaselineMemberResponse:
      properties:
        entity_id:
          title: Entity Id
          type: string
        entity_kind:
          title: Entity Kind
          type: string
        revision:
          title: Revision
          type: integer
      required:
        - entity_kind
        - entity_id
        - revision
      title: BaselineMemberResponse
      type: object
    BaselineSummary:
      properties:
        approved_by:
          items:
            type: string
          title: Approved By
          type: array
        created_at:
          title: Created At
          type: string
        gate_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate Id
        id:
          title: Id
          type: string
        item_count:
          title: Item Count
          type: integer
        member_count:
          title: Member Count
          type: integer
        name:
          title: Name
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        reason:
          default: ''
          title: Reason
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        source:
          default: manual
          title: Source
          type: string
      required:
        - id
        - name
        - created_at
        - approved_by
        - item_count
        - member_count
      title: BaselineSummary
      type: object
    Body_import_work_product_v1_twin_import_post:
      properties:
        description:
          default: ''
          description: Work product description
          title: Description
          type: string
        domain:
          anyOf:
            - type: string
            - type: 'null'
          description: Domain (mechanical, electronics)
          title: Domain
        file:
          contentMediaType: application/octet-stream
          description: Design file to import
          title: File
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to link to
          title: Project Id
        wp_type:
          anyOf:
            - type: string
            - type: 'null'
          description: Work product type
          title: Wp Type
      required:
        - file
      title: Body_import_work_product_v1_twin_import_post
      type: object
    Body_upload_and_convert_v1_convert_post:
      properties:
        file:
          contentMediaType: application/octet-stream
          description: STEP or IGES CAD file
          title: File
          type: string
      required:
        - file
      title: Body_upload_and_convert_v1_convert_post
      type: object
    BomComponentResponse:
      description: One BOM line item, in the dashboard's camelCase shape.
      properties:
        cadModelUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Cadmodelurl
        category:
          title: Category
          type: string
        datasheetUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Datasheeturl
        description:
          title: Description
          type: string
        designator:
          title: Designator
          type: string
        footprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Footprint
        id:
          title: Id
          type: string
        imageUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Imageurl
        manufacturer:
          title: Manufacturer
          type: string
        partNumber:
          title: Partnumber
          type: string
        priceCurrency:
          title: Pricecurrency
          type: string
        projectId:
          title: Projectid
          type: string
        purchaseUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseurl
        quantity:
          title: Quantity
          type: integer
        status:
          enum:
            - available
            - low_stock
            - out_of_stock
            - alternate_needed
          title: Status
          type: string
        unitPrice:
          title: Unitprice
          type: number
      required:
        - id
        - designator
        - partNumber
        - description
        - manufacturer
        - quantity
        - unitPrice
        - priceCurrency
        - status
        - category
        - projectId
      title: BomComponentResponse
      type: object
    BomListResponse:
      properties:
        components:
          items:
            $ref: '#/components/schemas/BomComponentResponse'
          title: Components
          type: array
        total:
          title: Total
          type: integer
      required:
        - components
        - total
      title: BomListResponse
      type: object
    BooleanCutRequest:
      description: >-
        Real boolean CSG operation between two committed CAD work products
        (MET-612).
      properties:
        cutter_node_id:
          minLength: 1
          title: Cutter Node Id
          type: string
        operation:
          default: subtract
          enum:
            - subtract
            - union
            - intersect
          title: Operation
          type: string
        result_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Result Name
        target_node_id:
          minLength: 1
          title: Target Node Id
          type: string
      required:
        - target_node_id
        - cutter_node_id
      title: BooleanCutRequest
      type: object
    BooleanCutResponse:
      description: The newly-committed result node of a boolean-cut operation.
      properties:
        node:
          $ref: '#/components/schemas/TwinNodeResponse'
        operation:
          title: Operation
          type: string
        result_area_mm2:
          title: Result Area Mm2
          type: number
        result_volume_mm3:
          title: Result Volume Mm3
          type: number
      required:
        - node
        - operation
        - result_volume_mm3
        - result_area_mm2
      title: BooleanCutResponse
      type: object
    BringupChecklistListEntry:
      properties:
        created_at:
          title: Created At
          type: string
        node_id:
          title: Node Id
          type: string
        statement:
          title: Statement
          type: string
        steps:
          items:
            $ref: '#/components/schemas/BringupStep'
          title: Steps
          type: array
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - node_id
        - created_at
        - title
        - statement
        - steps
      title: BringupChecklistListEntry
      type: object
    BringupChecklistListResponse:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/BringupChecklistListEntry'
          title: Entries
          type: array
      required:
        - entries
      title: BringupChecklistListResponse
      type: object
    BringupStep:
      properties:
        base:
          title: Base
          type: string
        follower:
          title: Follower
          type: string
        instruction:
          title: Instruction
          type: string
        joint_name:
          title: Joint Name
          type: string
        joint_type:
          title: Joint Type
          type: string
        step_number:
          title: Step Number
          type: integer
      required:
        - step_number
        - joint_name
        - joint_type
        - base
        - follower
        - instruction
      title: BringupStep
      type: object
    CallerBody:
      description: 'Who is proposing: the client and, if known, its model.'
      properties:
        client:
          anyOf:
            - type: string
            - type: 'null'
          title: Client
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
      title: CallerBody
      type: object
    CallerOperation:
      description: One tailoring operation from the caller's model (FORGE-481).
      properties:
        op:
          title: Op
          type: string
        phase:
          title: Phase
          type: string
        rationale:
          default: ''
          title: Rationale
          type: string
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
      required:
        - op
        - phase
      title: CallerOperation
      type: object
    CancelRequest:
      properties:
        reason:
          default: ''
          title: Reason
          type: string
      title: CancelRequest
      type: object
    Candidate:
      properties:
        manufacturer:
          title: Manufacturer
          type: string
        mpn:
          title: Mpn
          type: string
        specs:
          additionalProperties:
            type: number
          default: {}
          title: Specs
          type: object
      required:
        - mpn
        - manufacturer
      title: Candidate
      type: object
    CapabilityView:
      description: Per-phase tool coverage and the gap register for one flow.
      properties:
        flowId:
          title: Flowid
          type: string
        profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile
        report:
          additionalProperties: true
          title: Report
          type: object
        versionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Versionid
      required:
        - flowId
        - report
      title: CapabilityView
      type: object
    ChangeStatus:
      description: Lifecycle states for a design-change proposal.
      enum:
        - pending
        - approved
        - rejected
        - applied
        - expired
      title: ChangeStatus
      type: string
    ChannelListResponse:
      description: List of all channels.
      properties:
        channels:
          items:
            $ref: '#/components/schemas/ChannelResponse'
          title: Channels
          type: array
      required:
        - channels
      title: ChannelListResponse
      type: object
    ChannelResponse:
      description: Single channel.
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        scope_kind:
          title: Scope Kind
          type: string
      required:
        - id
        - name
        - scope_kind
        - created_at
      title: ChannelResponse
      type: object
    ChecklistResponse:
      description: Response for checklist generation.
      properties:
        coverage_percent:
          title: Coverage Percent
          type: number
        evidenced_items:
          title: Evidenced Items
          type: integer
        items:
          items:
            additionalProperties: true
            type: object
          title: Items
          type: array
        project_id:
          title: Project Id
          type: string
        target_markets:
          items:
            type: string
          title: Target Markets
          type: array
        total_items:
          title: Total Items
          type: integer
      required:
        - project_id
        - target_markets
        - total_items
        - evidenced_items
        - coverage_percent
        - items
      title: ChecklistResponse
      type: object
    ClaimRequest:
      properties:
        client:
          default: ''
          title: Client
          type: string
      title: ClaimRequest
      type: object
    CompileRequest:
      description: Compile a description into a spec WITHOUT building it (dry run).
      properties:
        description:
          description: Plain-English description.
          minLength: 1
          title: Description
          type: string
        model:
          anyOf:
            - type: string
            - type: 'null'
          description: LLM model override.
          title: Model
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Override the assembly name.
          title: Name
        provider:
          anyOf:
            - type: string
            - type: 'null'
          description: LLM provider override.
          title: Provider
      required:
        - description
      title: CompileRequest
      type: object
    CompileResponse:
      description: The compiled spec plus any geometric-feasibility warnings (not built).
      properties:
        buildable:
          description: True when the spec would build without geometry errors.
          title: Buildable
          type: boolean
        errors:
          description: >-
            Geometric-feasibility problems (e.g. oversize fillet); empty if
            buildable.
          items:
            type: string
          title: Errors
          type: array
        spec:
          $ref: '#/components/schemas/CreateAssemblyRequest-Output'
          description: The compiled declarative spec.
      required:
        - spec
        - buildable
      title: CompileResponse
      type: object
    CompletenessView:
      description: |-
        Dashboard-facing camelCase over the reused ``CompletenessResult``
        (left untouched -- its own field names stay snake_case internally).
      properties:
        covered:
          items:
            type: string
          title: Covered
          type: array
        missing:
          items:
            type: string
          title: Missing
          type: array
        productType:
          title: Producttype
          type: string
      required:
        - productType
      title: CompletenessView
      type: object
    ComponentHealth:
      description: Health snapshot for one downstream dependency.
      properties:
        latency_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Latency Ms
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        name:
          title: Name
          type: string
        status:
          $ref: '#/components/schemas/DependencyStatus'
      required:
        - name
        - status
      title: ComponentHealth
      type: object
    ConfidenceTier:
      description: |-
        Provenance tier for a memory record.

        Aligned with MET-462 property-extraction tiers so the same vocabulary
        flows from L1 extraction through to L3 reasoning:

        * ``VERBATIM`` — copied directly from a structured event field (1.0)
        * ``LLM_INFERRED`` — produced by an LLM synthesis step (0.6-0.8)
        * ``DERIVED`` — computed from other records (0.4-0.6)
      enum:
        - verbatim
        - llm_inferred
        - derived
      title: ConfidenceTier
      type: string
    ConflictPairView:
      properties:
        aId:
          title: Aid
          type: string
        aName:
          title: Aname
          type: string
        bId:
          title: Bid
          type: string
        bName:
          title: Bname
          type: string
        detail:
          title: Detail
          type: string
      required:
        - aId
        - aName
        - bId
        - bName
        - detail
      title: ConflictPairView
      type: object
    ConsolidationMode:
      description: How the orchestrator behaves on a given pass.
      enum:
        - background
        - on_demand
        - proactive
        - janitor
      title: ConsolidationMode
      type: string
    ConsolidationTheme:
      description: Semantic buckets for experience consolidation.
      enum:
        - mechanical_validation
        - power_analysis
        - circuit_design_rule
        - component_selection
        - firmware_build
        - simulation
        - compliance_check
        - misc
      title: ConsolidationTheme
      type: string
    ConsolidationTriggerRequest:
      description: Request body for ``POST /v1/memory/consolidate``.
      properties:
        fetchLimit:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          title: Fetchlimit
        minImportance:
          anyOf:
            - maximum: 1
              minimum: 0
              type: number
            - type: 'null'
          title: Minimportance
        mode:
          $ref: '#/components/schemas/ConsolidationMode'
          default: on_demand
          description: >-
            Consolidation mode. Defaults to on_demand since the REST endpoint is
            a manual trigger; the Temporal worker handles background.
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Projectid
        since:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Since
        theme:
          anyOf:
            - $ref: '#/components/schemas/ConsolidationTheme'
            - type: 'null'
        until:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Until
      title: ConsolidationTriggerRequest
      type: object
    ConsolidationTriggerResponse:
      description: Wire shape of a single consolidation pass result.
      properties:
        acceptedCount:
          title: Acceptedcount
          type: integer
        fetchedCount:
          title: Fetchedcount
          type: integer
        groupCount:
          title: Groupcount
          type: integer
        mode:
          $ref: '#/components/schemas/ConsolidationMode'
        newlyFailedCount:
          title: Newlyfailedcount
          type: integer
        rejectedCount:
          title: Rejectedcount
          type: integer
        rejectedReasons:
          items:
            type: string
          title: Rejectedreasons
          type: array
        revalidatedCount:
          title: Revalidatedcount
          type: integer
        synthesizedCount:
          title: Synthesizedcount
          type: integer
      required:
        - mode
        - fetchedCount
        - groupCount
        - synthesizedCount
        - acceptedCount
        - rejectedCount
        - revalidatedCount
        - newlyFailedCount
      title: ConsolidationTriggerResponse
      type: object
    ConstraintSuggestion:
      properties:
        parameter:
          title: Parameter
          type: string
        unit:
          default: mm
          title: Unit
          type: string
        value:
          title: Value
          type: number
      required:
        - parameter
        - value
      title: ConstraintSuggestion
      type: object
    ConversionResult:
      description: Response payload for a completed conversion.
      properties:
        cached:
          description: True if result was served from cache.
          title: Cached
          type: boolean
        glb_url:
          description: URL to download the GLB file.
          title: Glb Url
          type: string
        hash:
          description: SHA-256 content hash of the source file.
          title: Hash
          type: string
        metadata:
          additionalProperties: true
          description: Part tree, stats, materials.
          title: Metadata
          type: object
      required:
        - hash
        - glb_url
        - metadata
        - cached
      title: ConversionResult
      type: object
    CoverageResponse:
      description: Response for coverage queries.
      properties:
        coverage_percent:
          title: Coverage Percent
          type: number
        evidenced_items:
          title: Evidenced Items
          type: integer
        project_id:
          title: Project Id
          type: string
        total_items:
          title: Total Items
          type: integer
      required:
        - project_id
        - total_items
        - evidenced_items
        - coverage_percent
      title: CoverageResponse
      type: object
    CreateAssemblyRequest-Input:
      description: Author a multi-part assembly deterministically (no LLM) and commit it.
      properties:
        name:
          description: Assembly name.
          minLength: 1
          title: Name
          type: string
        parts:
          description: Parts to author + assemble.
          items:
            $ref: '#/components/schemas/AssemblyPart'
          minItems: 1
          title: Parts
          type: array
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to scope the cad_model to.
          title: Project Id
      required:
        - name
        - parts
      title: CreateAssemblyRequest
      type: object
    CreateAssemblyRequest-Output:
      description: Author a multi-part assembly deterministically (no LLM) and commit it.
      properties:
        name:
          description: Assembly name.
          minLength: 1
          title: Name
          type: string
        parts:
          description: Parts to author + assemble.
          items:
            $ref: '#/components/schemas/AssemblyPart'
          minItems: 1
          title: Parts
          type: array
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to scope the cad_model to.
          title: Project Id
      required:
        - name
        - parts
      title: CreateAssemblyRequest
      type: object
    CreateBringupChecklistRequest:
      properties:
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
      title: CreateBringupChecklistRequest
      type: object
    CreateBringupChecklistResponse:
      properties:
        node_id:
          title: Node Id
          type: string
        statement:
          title: Statement
          type: string
        steps:
          items:
            $ref: '#/components/schemas/BringupStep'
          title: Steps
          type: array
      required:
        - node_id
        - statement
        - steps
      title: CreateBringupChecklistResponse
      type: object
    CreateConstraintRequest:
      properties:
        expectedEvidence:
          default: ''
          title: Expectedevidence
          type: string
        limit:
          title: Limit
          type: number
        message:
          default: ''
          title: Message
          type: string
        metric:
          title: Metric
          type: string
        name:
          title: Name
          type: string
        operator:
          default: <=
          title: Operator
          type: string
        projectId:
          title: Projectid
          type: string
        severity:
          default: error
          title: Severity
          type: string
        targetNodeType:
          default: ''
          title: Targetnodetype
          type: string
        unit:
          default: ''
          title: Unit
          type: string
        verificationMethod:
          default: ''
          title: Verificationmethod
          type: string
      required:
        - projectId
        - name
        - metric
        - limit
      title: CreateConstraintRequest
      type: object
    CreateConstraintResponse:
      properties:
        constraintId:
          title: Constraintid
          type: string
        setWorkProductId:
          anyOf:
            - type: string
            - type: 'null'
          title: Setworkproductid
      required:
        - constraintId
        - setWorkProductId
      title: CreateConstraintResponse
      type: object
    CreateFirmwareScaffoldRequest:
      properties:
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
      title: CreateFirmwareScaffoldRequest
      type: object
    CreateFirmwareScaffoldResponse:
      properties:
        firmware_source_node_id:
          title: Firmware Source Node Id
          type: string
        joints:
          items:
            $ref: '#/components/schemas/FirmwareJointEntry'
          title: Joints
          type: array
        pinmap_node_id:
          title: Pinmap Node Id
          type: string
      required:
        - pinmap_node_id
        - firmware_source_node_id
        - joints
      title: CreateFirmwareScaffoldResponse
      type: object
    CreateLoadCaseRequest:
      description: Body for ``POST /v1/simulation/load-cases``.
      properties:
        fixedNodeSet:
          minLength: 1
          title: Fixednodeset
          type: string
        loadForceN:
          items:
            type: number
          maxItems: 3
          minItems: 3
          title: Loadforcen
          type: array
        loadNodeSet:
          minLength: 1
          title: Loadnodeset
          type: string
        material:
          additionalProperties: true
          minProperties: 1
          title: Material
          type: object
        name:
          maxLength: 200
          minLength: 1
          title: Name
          type: string
        projectId:
          minLength: 1
          title: Projectid
          type: string
        sourceOfLoads:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceofloads
        sourcePartNodeIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sourcepartnodeids
      required:
        - name
        - projectId
        - material
        - fixedNodeSet
        - loadNodeSet
        - loadForceN
      title: CreateLoadCaseRequest
      type: object
    CreateProjectRequest:
      description: Body for ``POST /v1/projects``.
      properties:
        description:
          default: ''
          description: Project description
          maxLength: 2000
          title: Description
          type: string
        name:
          description: Project name
          maxLength: 200
          minLength: 1
          title: Name
          type: string
        status:
          default: draft
          description: Initial project status
          title: Status
          type: string
      required:
        - name
      title: CreateProjectRequest
      type: object
    CreateProposalRequest:
      description: |-
        Body for ``POST /api/v1/assistant/proposals`` (MET-630).

        Lets a human create a design-change proposal directly from the
        dashboard (e.g. a parameter-panel "Regenerate" button) — previously
        proposals could only be created by an agent calling the
        ``twin.propose_change`` MCP tool.
      properties:
        agent_code:
          default: human
          description: Code identifying who/what is proposing the change
          minLength: 1
          title: Agent Code
          type: string
        description:
          description: What the change does
          minLength: 1
          title: Description
          type: string
        diff:
          additionalProperties: true
          description: 'Structured diff (e.g. {''action'': ''regenerate_geometry''})'
          title: Diff
          type: object
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        session_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Session Id
        work_products_affected:
          items:
            format: uuid
            type: string
          title: Work Products Affected
          type: array
      required:
        - description
      title: CreateProposalRequest
      type: object
    CreateReleaseRequest:
      properties:
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        project_id:
          title: Project Id
          type: string
      required:
        - project_id
      title: CreateReleaseRequest
      type: object
    CreateRunRequest:
      description: Body for ``POST /v1/runs``.
      properties:
        request:
          additionalProperties: true
          description: Opaque run input (goal, spec, config) handed to the harness.
          title: Request
          type: object
        start:
          default: true
          description: Transition queued -> running immediately after creation.
          title: Start
          type: boolean
      title: CreateRunRequest
      type: object
    CreateThreadRequest:
      description: Body for ``POST /api/v1/chat/threads``.
      properties:
        initial_message:
          anyOf:
            - type: string
            - type: 'null'
          description: If provided, a first message is created automatically
          title: Initial Message
        scope_entity_id:
          description: ID of the scoped entity
          title: Scope Entity Id
          type: string
        scope_kind:
          description: Scope type (session, approval, bom-entry, ...)
          title: Scope Kind
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional thread title
          title: Title
      required:
        - scope_kind
        - scope_entity_id
      title: CreateThreadRequest
      type: object
    CurrentItemRow:
      properties:
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        change_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Reason
        drafts:
          items:
            $ref: '#/components/schemas/RevisionStateResponse'
          title: Drafts
          type: array
        evidence_count:
          title: Evidence Count
          type: integer
        evidence_state:
          title: Evidence State
          type: string
        gate_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate Id
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Node Id
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
        revision:
          anyOf:
            - type: integer
            - type: 'null'
          title: Revision
        revision_count:
          title: Revision Count
          type: integer
        revision_status:
          title: Revision Status
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        validation_status:
          title: Validation Status
          type: string
      required:
        - key
        - item_type
        - name
        - revision_status
        - validation_status
        - revision_count
        - evidence_state
        - evidence_count
      title: CurrentItemRow
      type: object
    CurrentViewResponse:
      properties:
        counts:
          additionalProperties: true
          title: Counts
          type: object
        groups:
          items:
            $ref: '#/components/schemas/ItemGroup'
          title: Groups
          type: array
        items:
          items:
            $ref: '#/components/schemas/CurrentItemRow'
          title: Items
          type: array
        latest_baseline:
          anyOf:
            - $ref: '#/components/schemas/BaselineSummary'
            - type: 'null'
        other:
          items:
            $ref: '#/components/schemas/OtherRow'
          title: Other
          type: array
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        readiness:
          title: Readiness
          type: integer
        records:
          items:
            $ref: '#/components/schemas/RecordRowResponse'
          title: Records
          type: array
      required:
        - items
        - groups
        - records
        - other
        - counts
        - readiness
      title: CurrentViewResponse
      type: object
    DecisionRecord:
      description: Who decided, and through what (FORGE-507).
      properties:
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
        approver:
          anyOf:
            - type: string
            - type: 'null'
          title: Approver
        approver_verified:
          default: false
          title: Approver Verified
          type: boolean
        decided_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Decided At
        decision:
          title: Decision
          type: string
        on_behalf_of:
          anyOf:
            - type: string
            - type: 'null'
          title: On Behalf Of
        reason:
          default: ''
          title: Reason
          type: string
        surface:
          default: unknown
          enum:
            - dashboard
            - cli
            - agent
            - chat
            - unknown
          title: Surface
          type: string
      required:
        - decision
      title: DecisionRecord
      type: object
    DecisionRequest:
      additionalProperties: true
      description: >-
        Body for ``POST /v1/approvals/{id}/decision``.


        ``reviewer`` and ``approved_by`` are accepted (older clients send them)
        and

        ignored: the deciding human is the authenticated principal.
      properties:
        decision:
          enum:
            - approve
            - reject
            - retry
            - rework
          title: Decision
          type: string
        reason:
          default: ''
          maxLength: 2000
          title: Reason
          type: string
        to_phase:
          default: ''
          maxLength: 200
          title: To Phase
          type: string
      required:
        - decision
      title: DecisionRequest
      type: object
    DeltaTransform:
      description: >-
        Delta of a dragged group: translation (mm), or — additively, MET-611 —

        a single-axis rotation or scale. Exactly one kind is populated per
        request,

        matching whichever gizmo mode produced it on the client.
      properties:
        dx:
          default: 0
          title: Dx
          type: number
        dy:
          default: 0
          title: Dy
          type: number
        dz:
          default: 0
          title: Dz
          type: number
        rotation:
          anyOf:
            - $ref: '#/components/schemas/RotationDelta'
            - type: 'null'
        scale:
          anyOf:
            - $ref: '#/components/schemas/ScaleDelta'
            - type: 'null'
      title: DeltaTransform
      type: object
    DependencyStatus:
      description: Health status for a single component or the overall system.
      enum:
        - healthy
        - degraded
        - unhealthy
      title: DependencyStatus
      type: string
    DerivedPrdResponse:
      properties:
        markdown:
          title: Markdown
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        prose_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Prose Ref
        refs:
          items:
            type: string
          title: Refs
          type: array
        requirement_count:
          default: 0
          title: Requirement Count
          type: integer
        requirement_refs:
          items:
            type: string
          title: Requirement Refs
          type: array
        sources:
          items:
            $ref: '#/components/schemas/PrdSource'
          title: Sources
          type: array
        title:
          title: Title
          type: string
      required:
        - title
        - markdown
      title: DerivedPrdResponse
      type: object
    DesignChangeProposal:
      description: |-
        A proposed design change awaiting human review.

        Created by agents when they want to modify the Digital Twin.
        Must be approved before the change is applied.
      properties:
        agent_code:
          description: Code of the agent proposing the change
          minLength: 1
          title: Agent Code
          type: string
        change_id:
          description: Unique proposal identifier
          format: uuid
          title: Change Id
          type: string
        created_at:
          description: When the proposal was created
          format: date-time
          title: Created At
          type: string
        decided_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the proposal was approved or rejected
          title: Decided At
        decision_agent:
          anyOf:
            - type: string
            - type: 'null'
          description: For an agent decision, the agent that took it (FORGE-510)
          title: Decision Agent
        decision_on_behalf_of:
          anyOf:
            - type: string
            - type: 'null'
          description: For an agent decision, the human it acted for (FORGE-507)
          title: Decision On Behalf Of
        decision_reason:
          anyOf:
            - type: string
            - type: 'null'
          description: Reviewer's reason for the decision
          title: Decision Reason
        decision_surface:
          anyOf:
            - type: string
            - type: 'null'
          description: 'dashboard, cli or agent: where the decision was made (FORGE-507)'
          title: Decision Surface
        description:
          description: Human-readable description of what the change does
          minLength: 1
          title: Description
          type: string
        diff:
          additionalProperties: true
          description: Structured diff of the proposed changes
          title: Diff
          type: object
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project this proposal belongs to (for dashboard scoping, MET-518)
          title: Project Id
        requires_approval:
          default: true
          description: Whether this change requires explicit human approval
          title: Requires Approval
          type: boolean
        reviewer:
          anyOf:
            - type: string
            - type: 'null'
          description: Who approved or rejected the proposal
          title: Reviewer
        reviewer_verified:
          default: false
          description: Whether the reviewer identity was verified (FORGE-507)
          title: Reviewer Verified
          type: boolean
        session_id:
          description: Session under which this proposal was created
          format: uuid
          title: Session Id
          type: string
        status:
          $ref: '#/components/schemas/ChangeStatus'
          default: pending
          description: Current lifecycle status of the proposal
        work_products_affected:
          description: UUIDs of Digital Twin work_products affected by this change
          items:
            format: uuid
            type: string
          title: Work Products Affected
          type: array
      required:
        - agent_code
        - description
      title: DesignChangeProposal
      type: object
    DesignFlowListResponse:
      properties:
        defaultFlowId:
          title: Defaultflowid
          type: string
        flows:
          items:
            $ref: '#/components/schemas/DesignFlowView'
          title: Flows
          type: array
      required:
        - flows
        - defaultFlowId
      title: DesignFlowListResponse
      type: object
    DesignFlowView:
      properties:
        description:
          title: Description
          type: string
        graph:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Graph
        id:
          title: Id
          type: string
        isDefault:
          default: false
          title: Isdefault
          type: boolean
        label:
          title: Label
          type: string
        name:
          title: Name
          type: string
        phases:
          items:
            $ref: '#/components/schemas/PhaseView'
          title: Phases
          type: array
        valid:
          default: true
          title: Valid
          type: boolean
        version:
          title: Version
          type: string
        violations:
          items:
            type: string
          title: Violations
          type: array
      required:
        - id
        - name
        - label
        - description
        - version
      title: DesignFlowView
      type: object
    EditFlowRequest:
      description: >-
        A whole edited flow, plus the template it descends from.


        The editor sends the full flow rather than a patch. A patch would need
        the

        client and server to agree on how to apply it, and a disagreement there
        is

        a flow that is not what the person on the canvas was looking at when
        they

        pressed save.
      properties:
        baseTemplateId:
          title: Basetemplateid
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        phases:
          items:
            $ref: '#/components/schemas/EditPhase'
          title: Phases
          type: array
      required:
        - baseTemplateId
        - phases
      title: EditFlowRequest
      type: object
    EditGate:
      properties:
        autoApprove:
          default: false
          title: Autoapprove
          type: boolean
        criteria:
          items:
            type: string
          title: Criteria
          type: array
        enforceConstraints:
          default: false
          title: Enforceconstraints
          type: boolean
        gateId:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateid
        name:
          title: Name
          type: string
      required:
        - name
      title: EditGate
      type: object
    EditPhase:
      properties:
        condition:
          anyOf:
            - type: string
            - type: 'null'
          title: Condition
        dependsOn:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Dependson
        disciplines:
          items:
            type: string
          title: Disciplines
          type: array
        enforceDeliverables:
          default: true
          title: Enforcedeliverables
          type: boolean
        expectedArtifacts:
          items:
            type: string
          title: Expectedartifacts
          type: array
        gate:
          anyOf:
            - $ref: '#/components/schemas/EditGate'
            - type: 'null'
        id:
          title: Id
          type: string
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        objective:
          title: Objective
          type: string
        outcome:
          default: ''
          title: Outcome
          type: string
        requiredDeliverables:
          items:
            type: string
          title: Requireddeliverables
          type: array
        slots:
          items:
            $ref: '#/components/schemas/EditSlot'
          title: Slots
          type: array
        title:
          title: Title
          type: string
      required:
        - id
        - title
        - objective
      title: EditPhase
      type: object
    EditSlot:
      properties:
        derived:
          default: false
          title: Derived
          type: boolean
        itemKey:
          default: ''
          title: Itemkey
          type: string
        itemType:
          title: Itemtype
          type: string
        name:
          title: Name
          type: string
      required:
        - itemType
        - name
      title: EditSlot
      type: object
    EmittedJoint:
      description: |-
        What was actually written for one joint, post type-resolution
        (FORGE-240) -- e.g. a revolute joint with caller-supplied limits is
        emitted as a real bounded ``revolute`` type, not the unlimited
        ``continuous``/``PhysicsRevoluteJoint``-without-limits a caller might
        otherwise assume from the input alone. Lets the reporting agent state
        what the file actually contains instead of guessing or fabricating.
      properties:
        limits:
          anyOf:
            - $ref: '#/components/schemas/EmittedJointLimits'
            - type: 'null'
        name:
          title: Name
          type: string
        type:
          title: Type
          type: string
      required:
        - name
        - type
      title: EmittedJoint
      type: object
    EmittedJointLimits:
      properties:
        effort:
          anyOf:
            - type: number
            - type: 'null'
          title: Effort
        lower:
          title: Lower
          type: number
        upper:
          title: Upper
          type: number
        velocity:
          anyOf:
            - type: number
            - type: 'null'
          title: Velocity
      required:
        - lower
        - upper
      title: EmittedJointLimits
      type: object
    EvidenceResponse:
      description: Response for evidence operations.
      properties:
        checklist_item_id:
          title: Checklist Item Id
          type: string
        description:
          title: Description
          type: string
        evidence_type:
          title: Evidence Type
          type: string
        id:
          title: Id
          type: string
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
        uploaded_at:
          title: Uploaded At
          type: string
      required:
        - id
        - checklist_item_id
        - evidence_type
        - status
        - title
        - description
        - uploaded_at
      title: EvidenceResponse
      type: object
    EvidenceSummary:
      properties:
        id:
          title: Id
          type: string
        limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Limit
        margin:
          anyOf:
            - type: number
            - type: 'null'
          title: Margin
        method:
          title: Method
          type: string
        staleness:
          title: Staleness
          type: string
        tier:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tier
        value:
          anyOf:
            - type: number
            - type: 'null'
          title: Value
      required:
        - id
        - method
        - staleness
      title: EvidenceSummary
      type: object
    EvidenceType:
      description: Types of compliance evidence work_products.
      enum:
        - TEST_REPORT
        - DECLARATION
        - CERTIFICATE
        - TECHNICAL_FILE
        - RISK_ASSESSMENT
      title: EvidenceType
      type: string
    ExportFile:
      description: >-
        A generated file, fetched via ``GET
        /v1/cad-export/download/{export_id}/{filename}``.
      properties:
        download_url:
          title: Download Url
          type: string
        filename:
          title: Filename
          type: string
      required:
        - filename
        - download_url
      title: ExportFile
      type: object
    FallbackInfo:
      description: >-
        The most recent time a harness role ran on something other than its
        primary.
      properties:
        at:
          title: At
          type: string
        error:
          title: Error
          type: string
        fallback:
          title: Fallback
          type: string
        fallback_model:
          title: Fallback Model
          type: string
        primary:
          title: Primary
          type: string
        primary_model:
          title: Primary Model
          type: string
        reason:
          title: Reason
          type: string
        role:
          title: Role
          type: string
      required:
        - role
        - primary
        - primary_model
        - fallback
        - fallback_model
        - error
        - reason
        - at
      title: FallbackInfo
      type: object
    FeatureDiffResponse:
      properties:
        added:
          additionalProperties: true
          title: Added
          type: object
        changed:
          additionalProperties:
            $ref: '#/components/schemas/FieldDelta'
          title: Changed
          type: object
        currentWorkProductId:
          title: Currentworkproductid
          type: string
        previousWorkProductId:
          title: Previousworkproductid
          type: string
        removed:
          additionalProperties: true
          title: Removed
          type: object
      required:
        - currentWorkProductId
        - previousWorkProductId
        - changed
        - added
        - removed
      title: FeatureDiffResponse
      type: object
    FieldDelta:
      description: Change for a single metadata field.
      properties:
        from_value:
          title: From Value
        to_value:
          title: To Value
      required:
        - from_value
        - to_value
      title: FieldDelta
      type: object
    FileLinkCreateRequest:
      description: Request body for creating a file link.
      properties:
        source_path:
          description: Absolute path to the source file
          title: Source Path
          type: string
        tool:
          default: ''
          description: Tool identifier (kicad, freecad, cadquery)
          title: Tool
          type: string
        watch:
          default: true
          description: Enable file watching
          title: Watch
          type: boolean
      required:
        - source_path
      title: FileLinkCreateRequest
      type: object
    FileLinkResponse:
      description: API response for a file link.
      properties:
        created_at:
          title: Created At
          type: string
        last_synced_at:
          title: Last Synced At
          type: string
        source_hash:
          title: Source Hash
          type: string
        source_path:
          title: Source Path
          type: string
        sync_status:
          title: Sync Status
          type: string
        tool:
          title: Tool
          type: string
        watch:
          title: Watch
          type: boolean
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - source_path
        - tool
        - watch
        - sync_status
        - source_hash
        - last_synced_at
        - created_at
      title: FileLinkResponse
      type: object
    FirmwareJointEntry:
      properties:
        can_id:
          title: Can Id
          type: integer
        joint_name:
          title: Joint Name
          type: string
        joint_type:
          title: Joint Type
          type: string
        limits:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Limits
      required:
        - joint_name
        - joint_type
        - can_id
      title: FirmwareJointEntry
      type: object
    FixRequirementResponse:
      properties:
        conclusions:
          items:
            type: string
          title: Conclusions
          type: array
        proposedText:
          anyOf:
            - type: string
            - type: 'null'
          title: Proposedtext
        rationale:
          title: Rationale
          type: string
      required:
        - proposedText
        - rationale
        - conclusions
      title: FixRequirementResponse
      type: object
    FlowChangeView:
      properties:
        basis:
          default: ''
          title: Basis
          type: string
        op:
          title: Op
          type: string
        phase:
          title: Phase
          type: string
        rationale:
          title: Rationale
          type: string
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
      required:
        - op
        - phase
        - rationale
      title: FlowChangeView
      type: object
    FlowNeedsInputView:
      description: |-
        The proposal could not be made without guessing, so it asks instead.

        Carries no flow and no ``approvalId``: nothing was generated, stored or
        held. Answer the questions and resubmit the same request with them.
      properties:
        intent:
          title: Intent
          type: string
        message:
          title: Message
          type: string
        notes:
          items:
            type: string
          title: Notes
          type: array
        questions:
          items:
            $ref: '#/components/schemas/QuestionView'
          title: Questions
          type: array
        status:
          const: needs_input
          default: needs_input
          title: Status
          type: string
      required:
        - intent
        - questions
        - message
      title: FlowNeedsInputView
      type: object
    FlowPhaseState:
      description: One phase, as the live run view draws it.
      properties:
        artifacts:
          items:
            type: string
          title: Artifacts
          type: array
        disciplines:
          items:
            type: string
          title: Disciplines
          type: array
        gate:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate
        id:
          title: Id
          type: string
        status:
          title: Status
          type: string
        summary:
          default: ''
          title: Summary
          type: string
        title:
          title: Title
          type: string
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
      required:
        - id
        - title
        - status
      title: FlowPhaseState
      type: object
    FlowProposalView:
      description: |-
        A tailored flow, awaiting a human.

        ``approvalId`` is the held write. Nothing starts from a proposal: a run
        is created from the *approved* flow, and until somebody answers that
        approval there is nothing to run.
      properties:
        approvalId:
          title: Approvalid
          type: string
        assumptions:
          items:
            type: string
          title: Assumptions
          type: array
        baseTemplateId:
          title: Basetemplateid
          type: string
        baseVersion:
          title: Baseversion
          type: string
        capabilities:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Capabilities
        changes:
          items:
            $ref: '#/components/schemas/FlowChangeView'
          title: Changes
          type: array
        flow:
          $ref: '#/components/schemas/DesignFlowView'
        generatedBy:
          anyOf:
            - $ref: '#/components/schemas/GeneratedByView'
            - type: 'null'
        intent:
          title: Intent
          type: string
        intentModel:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Intentmodel
        openQuestions:
          items:
            $ref: '#/components/schemas/QuestionView'
          title: Openquestions
          type: array
        proposedBy:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: 'null'
              type: object
            - type: 'null'
          title: Proposedby
        requirementsPending:
          default: false
          title: Requirementspending
          type: boolean
        status:
          const: proposed
          default: proposed
          title: Status
          type: string
        valid:
          title: Valid
          type: boolean
        versionId:
          title: Versionid
          type: string
        violations:
          items:
            type: string
          title: Violations
          type: array
      required:
        - approvalId
        - versionId
        - baseTemplateId
        - baseVersion
        - intent
        - flow
        - valid
      title: FlowProposalView
      type: object
    FlowRunState:
      description: >-
        Live state of a design-flow run (FORGE-396).


        Read from the workflow itself rather than a cache of it. A projection
        that

        can be stale is a live view that is sometimes wrong, and nothing on the

        page would say which.
      properties:
        attempt:
          default: 1
          title: Attempt
          type: integer
        awaitingGate:
          anyOf:
            - type: string
            - type: 'null'
          title: Awaitinggate
        currentPhase:
          anyOf:
            - type: string
            - type: 'null'
          title: Currentphase
        detail:
          default: ''
          title: Detail
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        events:
          items:
            additionalProperties: true
            type: object
          title: Events
          type: array
        flow:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow
        flowContentHash:
          anyOf:
            - type: string
            - type: 'null'
          title: Flowcontenthash
        flowVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Flowversion
        flowVersionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Flowversionid
        gateFindings:
          items:
            type: string
          title: Gatefindings
          type: array
        gateReady:
          default: true
          title: Gateready
          type: boolean
        live:
          default: true
          title: Live
          type: boolean
        maxReworkCycles:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxreworkcycles
        phases:
          items:
            $ref: '#/components/schemas/FlowPhaseState'
          title: Phases
          type: array
        retriesLeft:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retriesleft
        reworkCycles:
          default: 0
          title: Reworkcycles
          type: integer
        reworksLeft:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reworksleft
        runId:
          title: Runid
          type: string
        status:
          title: Status
          type: string
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
      required:
        - runId
        - status
      title: FlowRunState
      type: object
    FlowVersionView:
      properties:
        approvalId:
          title: Approvalid
          type: string
        baseTemplateId:
          title: Basetemplateid
          type: string
        baseVersion:
          title: Baseversion
          type: string
        changes:
          items:
            type: string
          title: Changes
          type: array
        context:
          default: ''
          title: Context
          type: string
        flow:
          $ref: '#/components/schemas/DesignFlowView'
        origin:
          title: Origin
          type: string
        status:
          title: Status
          type: string
        valid:
          title: Valid
          type: boolean
        versionId:
          title: Versionid
          type: string
        violations:
          items:
            type: string
          title: Violations
          type: array
      required:
        - versionId
        - approvalId
        - baseTemplateId
        - baseVersion
        - status
        - origin
        - flow
        - valid
      title: FlowVersionView
      type: object
    FromTextRequest:
      description: Compile a plain-English description into an assembly, then build it.
      properties:
        description:
          description: Plain-English description of the part/assembly.
          minLength: 1
          title: Description
          type: string
        model:
          anyOf:
            - type: string
            - type: 'null'
          description: LLM model override for translation.
          title: Model
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Override the assembly name (else the model chooses one).
          title: Name
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to scope the cad_model to.
          title: Project Id
        provider:
          anyOf:
            - type: string
            - type: 'null'
          description: LLM provider override for translation.
          title: Provider
      required:
        - description
      title: FromTextRequest
      type: object
    FromTextResponse:
      description: The built assembly plus the spec the model generated (for review).
      properties:
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        minio_object_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Minio Object Key
        model_url:
          title: Model Url
          type: string
        node_id:
          title: Node Id
          type: string
        part_count:
          title: Part Count
          type: integer
        spec:
          $ref: '#/components/schemas/CreateAssemblyRequest-Output'
          description: The declarative spec compiled from the description.
      required:
        - node_id
        - model_url
        - part_count
        - spec
      title: FromTextResponse
      type: object
    GateFinding:
      description: One thing a gate found, classified so a UI need not parse prose.
      properties:
        kind:
          enum:
            - missing_deliverable
            - ungrounded
            - constraint_violation
            - analysis
            - geometry
            - other
          title: Kind
          type: string
        message:
          title: Message
          type: string
        severity:
          default: error
          enum:
            - error
            - warning
            - info
          title: Severity
          type: string
      required:
        - kind
        - message
      title: GateFinding
      type: object
    GateOpenedRequest:
      properties:
        gate:
          minLength: 1
          title: Gate
          type: string
        reason:
          default: ''
          title: Reason
          type: string
      required:
        - gate
      title: GateOpenedRequest
      type: object
    GateView:
      properties:
        autoApprove:
          default: false
          title: Autoapprove
          type: boolean
        criteria:
          items:
            type: string
          title: Criteria
          type: array
        enforceConstraints:
          default: false
          title: Enforceconstraints
          type: boolean
        gateId:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateid
        name:
          title: Name
          type: string
      required:
        - name
      title: GateView
      type: object
    GenerateFeatureRequest:
      properties:
        adapter:
          default: freecad
          title: Adapter
          type: string
        commit:
          default: true
          title: Commit
          type: boolean
        feature:
          additionalProperties: true
          title: Feature
          type: object
        material:
          default: aluminum_6061
          title: Material
          type: string
        name:
          title: Name
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        workProductId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workproductid
      required:
        - name
        - feature
      title: GenerateFeatureRequest
      type: object
    GenerateTestPlanRequest:
      properties:
        project_id:
          title: Project Id
          type: string
      required:
        - project_id
      title: GenerateTestPlanRequest
      type: object
    GenerateTestPlanResponse:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/TestPlanEntry'
          title: Entries
          type: array
        project_id:
          title: Project Id
          type: string
      required:
        - project_id
        - entries
      title: GenerateTestPlanResponse
      type: object
    GeneratedByView:
      description: The provider and model that actually produced a proposal (FORGE-468).
      properties:
        fellBackFrom:
          anyOf:
            - type: string
            - type: 'null'
          title: Fellbackfrom
        model:
          title: Model
          type: string
        provider:
          title: Provider
          type: string
      required:
        - provider
        - model
      title: GeneratedByView
      type: object
    GeometryDiffResponse:
      description: |-
        Real volume/area/bounding-box delta vs. a SUPERSEDES predecessor
        (FORGE-301) -- distinct from ``RevisionDiff`` above, which diffs one
        node's own metadata revisions and never sees geometry changes.
      properties:
        area_delta_mm2:
          title: Area Delta Mm2
          type: number
        current_area_mm2:
          title: Current Area Mm2
          type: number
        current_bounding_box:
          additionalProperties: true
          title: Current Bounding Box
          type: object
        current_volume_mm3:
          title: Current Volume Mm3
          type: number
        current_work_product_id:
          title: Current Work Product Id
          type: string
        previous_area_mm2:
          title: Previous Area Mm2
          type: number
        previous_bounding_box:
          additionalProperties: true
          title: Previous Bounding Box
          type: object
        previous_volume_mm3:
          title: Previous Volume Mm3
          type: number
        previous_work_product_id:
          title: Previous Work Product Id
          type: string
        volume_delta_mm3:
          title: Volume Delta Mm3
          type: number
      required:
        - current_work_product_id
        - previous_work_product_id
        - current_volume_mm3
        - previous_volume_mm3
        - volume_delta_mm3
        - current_area_mm2
        - previous_area_mm2
        - area_delta_mm2
        - current_bounding_box
        - previous_bounding_box
      title: GeometryDiffResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    HarnessEstimateResponse:
      properties:
        joints:
          items:
            $ref: '#/components/schemas/HarnessJointEntry'
          title: Joints
          type: array
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - joints
      title: HarnessEstimateResponse
      type: object
    HarnessJointEntry:
      properties:
        base:
          title: Base
          type: string
        cable_length_estimate_mm:
          title: Cable Length Estimate Mm
          type: number
        follower:
          title: Follower
          type: string
        joint_name:
          title: Joint Name
          type: string
        joint_type:
          title: Joint Type
          type: string
        segment_length_mm:
          title: Segment Length Mm
          type: number
        step_number:
          title: Step Number
          type: integer
      required:
        - step_number
        - joint_name
        - joint_type
        - base
        - follower
        - segment_length_mm
        - cable_length_estimate_mm
      title: HarnessJointEntry
      type: object
    HealthResponse:
      description: Top-level response from ``GET /health``.
      properties:
        auth_mode:
          default: 'off'
          title: Auth Mode
          type: string
        components:
          default: []
          items:
            $ref: '#/components/schemas/ComponentHealth'
          title: Components
          type: array
        status:
          $ref: '#/components/schemas/DependencyStatus'
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        uptime_seconds:
          title: Uptime Seconds
          type: number
        version:
          default: 0.1.0
          title: Version
          type: string
      required:
        - status
        - uptime_seconds
        - timestamp
      title: HealthResponse
      type: object
    HierarchicalBomLineResponse:
      description: One derived EBOM line, in the dashboard's camelCase shape.
      properties:
        componentId:
          title: Componentid
          type: string
        description:
          title: Description
          type: string
        hierarchyNodeId:
          title: Hierarchynodeid
          type: string
        manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: Manufacturer
        partNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Partnumber
        path:
          items:
            type: string
          title: Path
          type: array
        quantity:
          title: Quantity
          type: number
        source:
          title: Source
          type: string
        unitCost:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitcost
      required:
        - hierarchyNodeId
        - path
        - quantity
        - source
        - componentId
        - description
      title: HierarchicalBomLineResponse
      type: object
    HierarchicalBomResponse:
      properties:
        lines:
          items:
            $ref: '#/components/schemas/HierarchicalBomLineResponse'
          title: Lines
          type: array
        total:
          title: Total
          type: integer
      required:
        - lines
        - total
      title: HierarchicalBomResponse
      type: object
    HierarchyNodeResponse:
      description: One HierarchyNode, in the dashboard's camelCase shape.
      properties:
        cost:
          title: Cost
          type: number
        costBudget:
          anyOf:
            - type: number
            - type: 'null'
          title: Costbudget
        costBudgetDiscipline:
          anyOf:
            - type: string
            - type: 'null'
          title: Costbudgetdiscipline
        costBudgetOwner:
          anyOf:
            - type: string
            - type: 'null'
          title: Costbudgetowner
        costOverBudget:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Costoverbudget
        dissipationW:
          title: Dissipationw
          type: number
        drawAverageW:
          title: Drawaveragew
          type: number
        drawPeakW:
          title: Drawpeakw
          type: number
        id:
          title: Id
          type: string
        instanceOfBomItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Instanceofbomitemid
        interfaces:
          items:
            $ref: '#/components/schemas/InterfaceSummary'
          title: Interfaces
          type: array
        kind:
          title: Kind
          type: string
        massBudgetDiscipline:
          anyOf:
            - type: string
            - type: 'null'
          title: Massbudgetdiscipline
        massBudgetKg:
          anyOf:
            - type: number
            - type: 'null'
          title: Massbudgetkg
        massBudgetOwner:
          anyOf:
            - type: string
            - type: 'null'
          title: Massbudgetowner
        massKg:
          title: Masskg
          type: number
        massOverBudget:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Massoverbudget
        name:
          title: Name
          type: string
        outputW:
          title: Outputw
          type: number
        parentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentid
        placement:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Placement
        quantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantity
        realizedByWorkProductId:
          anyOf:
            - type: string
            - type: 'null'
          title: Realizedbyworkproductid
      required:
        - id
        - name
        - kind
        - massKg
        - cost
        - drawPeakW
        - drawAverageW
        - outputW
        - dissipationW
      title: HierarchyNodeResponse
      type: object
    HierarchyTreeResponse:
      properties:
        malformedBudgets:
          default: []
          items:
            $ref: '#/components/schemas/MalformedBudgetResponse'
          title: Malformedbudgets
          type: array
        nodes:
          items:
            $ref: '#/components/schemas/HierarchyNodeResponse'
          title: Nodes
          type: array
      required:
        - nodes
      title: HierarchyTreeResponse
      type: object
    HoldToolCallRequest:
      description: Park a tool call from another process in this ledger (FORGE-406).
      properties:
        arguments:
          additionalProperties: true
          title: Arguments
          type: object
        caller:
          default: untrusted
          title: Caller
          type: string
        client:
          anyOf:
            - type: string
            - type: 'null'
          title: Client
        project:
          anyOf:
            - type: string
            - type: 'null'
          title: Project
        reason:
          title: Reason
          type: string
        route:
          default: dashboard
          enum:
            - dashboard
            - elicitation
          title: Route
          type: string
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        source:
          default: mcp
          title: Source
          type: string
        timeout_seconds:
          anyOf:
            - exclusiveMinimum: 0
              maximum: 3600
              type: number
            - type: 'null'
          title: Timeout Seconds
        tool:
          title: Tool
          type: string
      required:
        - tool
        - reason
      title: HoldToolCallRequest
      type: object
    Hole:
      description: A mounting/fastener hole drilled into a part (local part frame, mm).
      properties:
        depth:
          anyOf:
            - type: number
            - type: 'null'
          description: Depth from the top face (mm); through-hole if omitted.
          title: Depth
        diameter:
          description: Hole diameter (mm).
          exclusiveMinimum: 0
          title: Diameter
          type: number
        x:
          description: Hole centre X in the part's local frame (mm).
          title: X
          type: number
        'y':
          description: Hole centre Y in the part's local frame (mm).
          title: 'Y'
          type: number
      required:
        - x
        - 'y'
        - diameter
      title: Hole
      type: object
    ImportWorkProductResponse:
      description: Response from a successful work product import.
      properties:
        content_hash:
          description: SHA-256 of file content
          title: Content Hash
          type: string
        created_at:
          description: ISO-8601 creation timestamp
          title: Created At
          type: string
        domain:
          description: Domain (mechanical, electronics, etc.)
          title: Domain
          type: string
        file_path:
          description: Stored file path
          title: File Path
          type: string
        format:
          description: File format (step, kicad_sch, etc.)
          title: Format
          type: string
        id:
          description: WorkProduct UUID
          title: Id
          type: string
        metadata:
          additionalProperties: true
          description: Extracted metadata
          title: Metadata
          type: object
        name:
          description: WorkProduct name
          title: Name
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Linked project ID
          title: Project Id
        wp_type:
          description: WorkProduct type
          title: Wp Type
          type: string
      required:
        - id
        - name
        - domain
        - wp_type
        - file_path
        - content_hash
        - format
        - created_at
      title: ImportWorkProductResponse
      type: object
    IngestDocumentRequest:
      description: >-
        Request body for L1 document ingestion via ``KnowledgeService``
        (MET-336).
      properties:
        content:
          minLength: 1
          title: Content
          type: string
        knowledgeType:
          $ref: '#/components/schemas/KnowledgeType'
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Projectid
        sourcePath:
          minLength: 1
          title: Sourcepath
          type: string
        sourceWorkProductId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Sourceworkproductid
      required:
        - content
        - sourcePath
        - knowledgeType
      title: IngestDocumentRequest
      type: object
    IngestDocumentResponse:
      description: L1 ingest result — mirrors ``IngestResult`` (MET-336).
      properties:
        chunksIndexed:
          title: Chunksindexed
          type: integer
        entryIds:
          items:
            format: uuid
            type: string
          title: Entryids
          type: array
        sourcePath:
          title: Sourcepath
          type: string
      required:
        - entryIds
        - chunksIndexed
        - sourcePath
      title: IngestDocumentResponse
      type: object
    IngestRequest:
      description: Request body for manual knowledge ingestion.
      properties:
        content:
          minLength: 1
          title: Content
          type: string
        knowledgeType:
          $ref: '#/components/schemas/KnowledgeType'
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Projectid
        sourcePath:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepath
        sourceWorkProductId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Sourceworkproductid
      required:
        - content
        - knowledgeType
      title: IngestRequest
      type: object
    IngestResponse:
      description: Response from the knowledge ingest endpoint.
      properties:
        embedded:
          title: Embedded
          type: boolean
        entryId:
          format: uuid
          title: Entryid
          type: string
      required:
        - entryId
        - embedded
      title: IngestResponse
      type: object
    InlineDecisionRequest:
      description: >-
        Body for ``POST /v1/approvals/{id}/inline-decision`` (FORGE-582).


        A person answered a gate in the MCP client's own prompt. The sidecar
        that

        asked records it here. ``approver`` is who the sidecar's authenticated

        MCP session says answered; it is recorded as verified only when this

        request itself is authenticated, the same rule a held tool call's inline

        answer follows (FORGE-473).
      properties:
        approver:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Approver
        approver_verified:
          default: false
          title: Approver Verified
          type: boolean
        decision:
          enum:
            - approve
            - reject
            - retry
            - rework
          title: Decision
          type: string
        reason:
          default: ''
          maxLength: 2000
          title: Reason
          type: string
        to_phase:
          default: ''
          maxLength: 200
          title: To Phase
          type: string
      required:
        - decision
      title: InlineDecisionRequest
      type: object
    InsightKind:
      description: What kind of statement the insight is.
      enum:
        - pattern
        - principle
        - failure_mode
        - observation
      title: InsightKind
      type: string
    InsightListResponse:
      description: Response body for ``GET /v1/memory/insights``.
      properties:
        includeStale:
          title: Includestale
          type: boolean
        insights:
          items:
            $ref: '#/components/schemas/InsightResponse'
          title: Insights
          type: array
        theme:
          anyOf:
            - $ref: '#/components/schemas/ConsolidationTheme'
            - type: 'null'
        total:
          title: Total
          type: integer
      required:
        - insights
        - total
        - includeStale
      title: InsightListResponse
      type: object
    InsightResponse:
      description: Wire shape of a single consolidated insight.
      properties:
        confidence:
          maximum: 1
          minimum: 0
          title: Confidence
          type: number
        confidenceTier:
          $ref: '#/components/schemas/ConfidenceTier'
        id:
          format: uuid
          title: Id
          type: string
        kind:
          $ref: '#/components/schemas/InsightKind'
        narrative:
          title: Narrative
          type: string
        status:
          $ref: '#/components/schemas/InsightStatus'
        supportingExperienceIds:
          items:
            format: uuid
            type: string
          title: Supportingexperienceids
          type: array
        synthesizedAt:
          format: date-time
          title: Synthesizedat
          type: string
        theme:
          $ref: '#/components/schemas/ConsolidationTheme'
      required:
        - id
        - theme
        - kind
        - narrative
        - confidence
        - confidenceTier
        - status
        - supportingExperienceIds
        - synthesizedAt
      title: InsightResponse
      type: object
    InsightStatus:
      description: |-
        Lifecycle state of a stored insight (MET-455).

        * ``ACTIVE`` — trusted; surfaced to agents normally.
        * ``STALE_WARN`` — confidence has decayed (or re-validation failed);
          flagged for review. Still readable, but consumers should treat it
          with caution / prefer fresher insights.
      enum:
        - active
        - stale_warn
      title: InsightStatus
      type: string
    IntentModelView:
      description: The structured intent (see ``orchestrator.design_flow.intent``).
      properties:
        intent:
          additionalProperties: true
          title: Intent
          type: object
        missingInputs:
          items:
            $ref: '#/components/schemas/QuestionView'
          title: Missinginputs
          type: array
      required:
        - intent
      title: IntentModelView
      type: object
    InterfaceQuantitySummary:
      properties:
        limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Limit
        metric:
          title: Metric
          type: string
        op:
          default: <=
          title: Op
          type: string
        unit:
          title: Unit
          type: string
      required:
        - metric
        - unit
      title: InterfaceQuantitySummary
      type: object
    InterfaceSummary:
      description: |-
        One interface touching a hierarchy node, dashboard-facing summary
        (not the full predicted/measured detail -- see the SYSTEM_ARCHITECTURE
        work product itself for that).
      properties:
        description:
          default: ''
          title: Description
          type: string
        interfaceType:
          default: ''
          title: Interfacetype
          type: string
        otherComponent:
          title: Othercomponent
          type: string
        quantities:
          items:
            $ref: '#/components/schemas/InterfaceQuantitySummary'
          title: Quantities
          type: array
      required:
        - otherComponent
      title: InterfaceSummary
      type: object
    InterferenceCheckResponse:
      description: |-
        Real boolean-intersection result between two named parts (FORGE-272)
        -- a pairwise clearance/interference check, not an ISO 286 fit
        classification (which this capability deliberately does not attempt;
        see ``api_gateway.twin.interference_check``'s module docstring).
      properties:
        interference_area_mm2:
          title: Interference Area Mm2
          type: number
        interference_volume_mm3:
          title: Interference Volume Mm3
          type: number
        interferes:
          title: Interferes
          type: boolean
        work_product_id_a:
          title: Work Product Id A
          type: string
        work_product_id_b:
          title: Work Product Id B
          type: string
      required:
        - work_product_id_a
        - work_product_id_b
        - interferes
        - interference_volume_mm3
        - interference_area_mm2
      title: InterferenceCheckResponse
      type: object
    ItemCurrentResponse:
      properties:
        node_id:
          title: Node Id
          type: string
        ref:
          title: Ref
          type: string
        revision:
          title: Revision
          type: integer
      required:
        - revision
        - node_id
        - ref
      title: ItemCurrentResponse
      type: object
    ItemDiffResponse:
      properties:
        a:
          additionalProperties: true
          title: A
          type: object
        a_ref:
          title: A Ref
          type: string
        b:
          additionalProperties: true
          title: B
          type: object
        b_ref:
          title: B Ref
          type: string
        dependents:
          items:
            additionalProperties: true
            type: object
          title: Dependents
          type: array
        fields:
          items:
            additionalProperties: true
            type: object
          title: Fields
          type: array
        geometry:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Geometry
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        parameters:
          items:
            additionalProperties: true
            type: object
          title: Parameters
          type: array
        requirements:
          items:
            additionalProperties: true
            type: object
          title: Requirements
          type: array
        warnings:
          items:
            type: string
          title: Warnings
          type: array
      required:
        - key
        - item_type
        - name
        - a
        - b
        - a_ref
        - b_ref
      title: ItemDiffResponse
      type: object
    ItemGroup:
      properties:
        count:
          title: Count
          type: integer
        item_type:
          title: Item Type
          type: string
        keys:
          items:
            type: string
          title: Keys
          type: array
      required:
        - item_type
        - count
        - keys
      title: ItemGroup
      type: object
    ItemHistoryResponse:
      properties:
        current:
          anyOf:
            - $ref: '#/components/schemas/ItemCurrentResponse'
            - type: 'null'
        item:
          $ref: '#/components/schemas/ItemResponse'
        lessons:
          default: []
          items:
            $ref: '#/components/schemas/ItemLessonResponse'
          title: Lessons
          type: array
        revisions:
          items:
            $ref: '#/components/schemas/ItemRevisionResponse'
          title: Revisions
          type: array
      required:
        - item
        - revisions
      title: ItemHistoryResponse
      type: object
    ItemLessonResponse:
      description: >-
        A rejected revision, kept as "already tried, failed because"
        (FORGE-530).
      properties:
        lesson:
          title: Lesson
          type: string
        node_id:
          title: Node Id
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        ref:
          title: Ref
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
      required:
        - ref
        - node_id
        - lesson
      title: ItemLessonResponse
      type: object
    ItemListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ItemResponse'
          title: Items
          type: array
        total:
          title: Total
          type: integer
      required:
        - items
        - total
      title: ItemListResponse
      type: object
    ItemResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        draft_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Node Id
        draft_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Ref
        draft_revision:
          anyOf:
            - type: integer
            - type: 'null'
          title: Draft Revision
        head_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Node Id
        head_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Ref
        head_revision:
          title: Head Revision
          type: integer
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - key
        - item_type
        - name
        - head_revision
        - created_at
        - updated_at
      title: ItemResponse
      type: object
    ItemRevisionResponse:
      properties:
        adopted:
          title: Adopted
          type: boolean
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        baselines:
          items:
            type: string
          title: Baselines
          type: array
        change_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Reason
        change_set:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Set
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        gate:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate
        is_head:
          title: Is Head
          type: boolean
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        node_id:
          title: Node Id
          type: string
        phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase
        revision:
          title: Revision
          type: integer
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        status:
          default: committed
          title: Status
          type: string
        status_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Reason
      required:
        - revision
        - node_id
        - is_head
        - adopted
      title: ItemRevisionResponse
      type: object
    IterateRequest:
      description: Request body for POST /v1/twin/nodes/{id}/iterate.
      properties:
        change_description:
          title: Change Description
          type: string
        metadata_updates:
          additionalProperties: true
          default: {}
          title: Metadata Updates
          type: object
      required:
        - change_description
      title: IterateRequest
      type: object
    JointLoadRequest:
      description: |-
        A posed serial chain, base-to-tip: ``links[i]`` is the link driven
        by (immediately outboard of) ``joints[i]``.
      properties:
        joints:
          items:
            $ref: '#/components/schemas/JointPositionInput'
          title: Joints
          type: array
        links:
          items:
            $ref: '#/components/schemas/LinkLoadInput'
          title: Links
          type: array
        payload_mass_kg:
          default: 0
          title: Payload Mass Kg
          type: number
        payload_position_world_mm:
          anyOf:
            - maxItems: 3
              minItems: 3
              prefixItems:
                - type: number
                - type: number
                - type: number
              type: array
            - type: 'null'
          title: Payload Position World Mm
      required:
        - links
        - joints
      title: JointLoadRequest
      type: object
    JointLoadResponse:
      properties:
        loads:
          items:
            $ref: '#/components/schemas/JointLoadResult'
          title: Loads
          type: array
        worst_joint:
          $ref: '#/components/schemas/JointLoadResult'
      required:
        - loads
        - worst_joint
      title: JointLoadResponse
      type: object
    JointLoadResult:
      properties:
        joint_name:
          title: Joint Name
          type: string
        reaction_force_n:
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Reaction Force N
          type: array
        reaction_moment_n_mm:
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Reaction Moment N Mm
          type: array
        supported_mass_kg:
          title: Supported Mass Kg
          type: number
      required:
        - joint_name
        - supported_mass_kg
        - reaction_force_n
        - reaction_moment_n_mm
      title: JointLoadResult
      type: object
    JointPositionInput:
      properties:
        name:
          title: Name
          type: string
        position_world_mm:
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Position World Mm
          type: array
      required:
        - name
        - position_world_mm
      title: JointPositionInput
      type: object
    JointSpec:
      description: |-
        One joint between two parts — the same shape FreeCAD's
        ``add_assembly_joint``/``list_joints`` already produce, so a caller can
        pass through what MET-721 reads from a live session, or supply a saved
        joint list manually.
      properties:
        anchor:
          description: Anchor point (mm).
          items:
            type: number
          maxItems: 3
          minItems: 3
          title: Anchor
          type: array
        axis:
          items:
            type: number
          maxItems: 3
          minItems: 3
          title: Axis
          type: array
        base:
          description: Link name of the base part.
          title: Base
          type: string
        follower:
          description: Link name of the follower part.
          title: Follower
          type: string
        limits:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          description: Required for 'slider' joints — {lower, upper, effort?, velocity?}.
          title: Limits
        name:
          minLength: 1
          title: Name
          type: string
        type:
          enum:
            - fixed
            - slider
            - revolute
            - cylindrical
            - ball
          title: Type
          type: string
      required:
        - name
        - type
        - base
        - follower
        - axis
        - anchor
      title: JointSpec
      type: object
    KnowledgeEntryResponse:
      description: API response model for a single knowledge entry.
      properties:
        chunkIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunkindex
        content:
          title: Content
          type: string
        createdAt:
          format: date-time
          title: Createdat
          type: string
        id:
          format: uuid
          title: Id
          type: string
        knowledgeType:
          $ref: '#/components/schemas/KnowledgeType'
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        sourcePath:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepath
        sourceWorkProductId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Sourceworkproductid
        totalChunks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalchunks
      required:
        - id
        - content
        - knowledgeType
        - metadata
        - createdAt
      title: KnowledgeEntryResponse
      type: object
    KnowledgeHitResponse:
      description: |-
        Wire shape of a single knowledge-base hit.

        Used by ``POST /v1/memory/search`` (design rationale) and
        ``GET /v1/memory/components/{name}`` (component context). Fields
        mirror ``digital_twin.knowledge.service.SearchHit``.
      properties:
        chunkIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunkindex
        content:
          title: Content
          type: string
        heading:
          anyOf:
            - type: string
            - type: 'null'
          title: Heading
        knowledgeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Knowledgetype
        similarityScore:
          title: Similarityscore
          type: number
        sourcePath:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepath
        sourceWorkProductId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Sourceworkproductid
        totalChunks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalchunks
      required:
        - content
        - similarityScore
      title: KnowledgeHitResponse
      type: object
    KnowledgeType:
      description: Categories of knowledge stored in the knowledge layer.
      enum:
        - design_decision
        - component
        - failure
        - constraint
        - session
      title: KnowledgeType
      type: string
    LinkEvidenceRequest:
      description: Request body for linking evidence to a checklist item.
      properties:
        checklist_item_id:
          description: Checklist item ID to link to
          title: Checklist Item Id
          type: string
        description:
          default: ''
          description: Evidence description
          title: Description
          type: string
        evidence_type:
          $ref: '#/components/schemas/EvidenceType'
          description: Type of evidence
        title:
          description: Evidence title
          title: Title
          type: string
        work_product_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: WorkProduct UUID
          title: Work Product Id
      required:
        - checklist_item_id
        - evidence_type
        - title
      title: LinkEvidenceRequest
      type: object
    LinkLoadInput:
      properties:
        com_world_mm:
          maxItems: 3
          minItems: 3
          prefixItems:
            - type: number
            - type: number
            - type: number
          title: Com World Mm
          type: array
        mass_kg:
          title: Mass Kg
          type: number
        name:
          title: Name
          type: string
      required:
        - name
        - com_world_mm
        - mass_kg
      title: LinkLoadInput
      type: object
    LoadCaseListResponse:
      properties:
        loadCases:
          items:
            $ref: '#/components/schemas/LoadCaseResponse'
          title: Loadcases
          type: array
        total:
          title: Total
          type: integer
      required:
        - loadCases
        - total
      title: LoadCaseListResponse
      type: object
    LoadCaseResponse:
      description: One load case, in the dashboard's camelCase shape.
      properties:
        createdAt:
          title: Createdat
          type: string
        fixedNodeSet:
          anyOf:
            - type: string
            - type: 'null'
          title: Fixednodeset
        id:
          title: Id
          type: string
        loadForceN:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Loadforcen
        loadNodeSet:
          anyOf:
            - type: string
            - type: 'null'
          title: Loadnodeset
        material:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Material
        name:
          title: Name
          type: string
        projectId:
          title: Projectid
          type: string
        sourceOfLoads:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceofloads
        updatedAt:
          title: Updatedat
          type: string
      required:
        - id
        - name
        - projectId
        - createdAt
        - updatedAt
      title: LoadCaseResponse
      type: object
    MalformedBudgetResponse:
      description: |-
        A budget this response had to ignore, and why (FORGE-414).

        Previously these were a server-side warning only, so the tab rendered no
        budget row and the reader concluded nobody had set one. Six of the ten
        budgets in the live twin were in that state. Naming them here costs one
        field and turns "there is no budget" into "your budget is unusable, here
        is what it needs".
      properties:
        detail:
          title: Detail
          type: string
        entityId:
          title: Entityid
          type: string
        missing:
          items:
            type: string
          title: Missing
          type: array
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - entityId
        - missing
        - detail
      title: MalformedBudgetResponse
      type: object
    ManufactureReleaseResponse:
      properties:
        content_base64:
          title: Content Base64
          type: string
        file_size_bytes:
          title: File Size Bytes
          type: integer
        filename:
          title: Filename
          type: string
        format:
          title: Format
          type: string
        process:
          title: Process
          type: string
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - process
        - format
        - filename
        - file_size_bytes
        - content_base64
      title: ManufactureReleaseResponse
      type: object
    ManufacturingContextBody:
      description: What the project can actually be made with (FORGE-463).
      properties:
        machines:
          items:
            type: string
          title: Machines
          type: array
        processes:
          items:
            type: string
          title: Processes
          type: array
        productionQuantity:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          title: Productionquantity
        route:
          anyOf:
            - $ref: '#/components/schemas/ManufacturingRoute'
            - type: 'null'
        stockMaterials:
          items:
            type: string
          title: Stockmaterials
          type: array
      title: ManufacturingContextBody
      type: object
    ManufacturingRoute:
      enum:
        - in_house
        - vendor
        - undecided
      title: ManufacturingRoute
      type: string
    MaturityGateSummary:
      properties:
        blockedReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Blockedreason
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        createdAt:
          title: Createdat
          type: string
        decidedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Decidedby
        gateId:
          title: Gateid
          type: string
        level:
          title: Level
          type: string
        promoted:
          title: Promoted
          type: boolean
      required:
        - gateId
        - level
        - promoted
        - blockedReason
        - decidedBy
        - comment
        - createdAt
      title: MaturityGateSummary
      type: object
    MemoryHitResponse:
      description: Wire shape of a single hit in the response payload.
      properties:
        agentCode:
          title: Agentcode
          type: string
        confidence:
          $ref: '#/components/schemas/ConfidenceTier'
        durationSeconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Durationseconds
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        experienceId:
          format: uuid
          title: Experienceid
          type: string
        importance:
          maximum: 1
          minimum: 0
          title: Importance
          type: number
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Projectid
        rank:
          minimum: 0
          title: Rank
          type: integer
        resultSummary:
          title: Resultsummary
          type: string
        runId:
          title: Runid
          type: string
        similarity:
          maximum: 1
          minimum: -1
          title: Similarity
          type: number
        stepId:
          title: Stepid
          type: string
        success:
          title: Success
          type: boolean
        taskType:
          title: Tasktype
          type: string
        timestamp:
          format: date-time
          title: Timestamp
          type: string
      required:
        - experienceId
        - similarity
        - rank
        - agentCode
        - taskType
        - runId
        - stepId
        - success
        - resultSummary
        - importance
        - confidence
        - timestamp
      title: MemoryHitResponse
      type: object
    MemoryRetrieveRequest:
      description: Request body for ``POST /v1/memory/retrieve``.
      properties:
        agentCode:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional filter to a specific agent.
          title: Agentcode
        goal:
          description: Natural-language description of the task.
          minLength: 1
          title: Goal
          type: string
        limit:
          default: 5
          description: Maximum number of experiences to return.
          maximum: 50
          minimum: 1
          title: Limit
          type: integer
        minSimilarity:
          anyOf:
            - maximum: 1
              minimum: -1
              type: number
            - type: 'null'
          description: >-
            Optional retrieval-confidence floor: drop hits whose cosine
            similarity is below this value. None = no floor.
          title: Minsimilarity
        onlySuccess:
          anyOf:
            - type: boolean
            - type: 'null'
          description: True = success-only, False = failures-only, None = no filter.
          title: Onlysuccess
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Optional project scope.
          title: Projectid
      required:
        - goal
      title: MemoryRetrieveRequest
      type: object
    MemoryRetrieveResponse:
      description: Response body for ``POST /v1/memory/retrieve``.
      properties:
        hits:
          items:
            $ref: '#/components/schemas/MemoryHitResponse'
          title: Hits
          type: array
        query:
          title: Query
          type: string
        totalFound:
          title: Totalfound
          type: integer
      required:
        - hits
        - query
        - totalFound
      title: MemoryRetrieveResponse
      type: object
    MemorySearchRequest:
      description: Request body for ``POST /v1/memory/search`` (design-rationale search).
      properties:
        limit:
          default: 5
          description: Maximum number of hits to return.
          maximum: 50
          minimum: 1
          title: Limit
          type: integer
        projectId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Optional project scope.
          title: Projectid
        query:
          description: Natural-language query against design-decision knowledge.
          minLength: 1
          title: Query
          type: string
      required:
        - query
      title: MemorySearchRequest
      type: object
    MemorySearchResponse:
      description: Response body for ``POST /v1/memory/search`` and the components GET.
      properties:
        hits:
          items:
            $ref: '#/components/schemas/KnowledgeHitResponse'
          title: Hits
          type: array
        query:
          title: Query
          type: string
        totalFound:
          title: Totalfound
          type: integer
      required:
        - hits
        - query
        - totalFound
      title: MemorySearchResponse
      type: object
    MessageResponse:
      description: Single message inside a thread response.
      properties:
        actor_id:
          title: Actor Id
          type: string
        actor_kind:
          title: Actor Kind
          type: string
        content:
          title: Content
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        graph_ref_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Graph Ref Label
        graph_ref_node:
          anyOf:
            - type: string
            - type: 'null'
          title: Graph Ref Node
        graph_ref_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Graph Ref Type
        id:
          title: Id
          type: string
        status:
          title: Status
          type: string
        thread_id:
          title: Thread Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - id
        - thread_id
        - actor_id
        - actor_kind
        - content
        - status
        - created_at
        - updated_at
      title: MessageResponse
      type: object
    MigrationApplyRequest:
      properties:
        approve:
          default: false
          description: 'Must be true: applying the plan writes to the twin.'
          title: Approve
          type: boolean
        plan:
          $ref: '#/components/schemas/MigrationPlan-Input'
          description: The plan exactly as the dry run returned it.
        reason:
          default: ''
          description: Why this plan is approved (kept in the log).
          title: Reason
          type: string
      required:
        - plan
      title: MigrationApplyRequest
      type: object
    MigrationApplyResponse:
      properties:
        approved_by:
          title: Approved By
          type: string
        approver_verified:
          title: Approver Verified
          type: boolean
        result:
          $ref: '#/components/schemas/MigrationResult'
      required:
        - result
        - approved_by
        - approver_verified
      title: MigrationApplyResponse
      type: object
    MigrationPlan-Input:
      description: A dry-run result. Pass it back unchanged to :meth:`ItemMigration.apply`.
      properties:
        counts_after:
          additionalProperties: true
          title: Counts After
          type: object
        counts_before:
          additionalProperties: true
          title: Counts Before
          type: object
        created_at:
          title: Created At
          type: string
        items:
          items:
            $ref: '#/components/schemas/ProposedItem'
          title: Items
          type: array
        low_confidence:
          items:
            additionalProperties: true
            type: object
          title: Low Confidence
          type: array
        plan_hash:
          default: ''
          title: Plan Hash
          type: string
        project_id:
          title: Project Id
          type: string
        records:
          items:
            $ref: '#/components/schemas/RecordAction'
          title: Records
          type: array
        skipped:
          items:
            additionalProperties: true
            type: object
          title: Skipped
          type: array
        twin_fingerprint:
          title: Twin Fingerprint
          type: string
      required:
        - project_id
        - twin_fingerprint
        - created_at
      title: MigrationPlan
      type: object
    MigrationPlan-Output:
      description: A dry-run result. Pass it back unchanged to :meth:`ItemMigration.apply`.
      properties:
        counts_after:
          additionalProperties: true
          title: Counts After
          type: object
        counts_before:
          additionalProperties: true
          title: Counts Before
          type: object
        created_at:
          title: Created At
          type: string
        items:
          items:
            $ref: '#/components/schemas/ProposedItem'
          title: Items
          type: array
        low_confidence:
          items:
            additionalProperties: true
            type: object
          title: Low Confidence
          type: array
        plan_hash:
          default: ''
          title: Plan Hash
          type: string
        project_id:
          title: Project Id
          type: string
        records:
          items:
            $ref: '#/components/schemas/RecordAction'
          title: Records
          type: array
        skipped:
          items:
            additionalProperties: true
            type: object
          title: Skipped
          type: array
        twin_fingerprint:
          title: Twin Fingerprint
          type: string
      required:
        - project_id
        - twin_fingerprint
        - created_at
      title: MigrationPlan
      type: object
    MigrationPlanResponse:
      properties:
        empty:
          title: Empty
          type: boolean
        plan:
          $ref: '#/components/schemas/MigrationPlan-Output'
        report:
          title: Report
          type: string
      required:
        - plan
        - report
        - empty
      title: MigrationPlanResponse
      type: object
    MigrationResult:
      description: What :meth:`ItemMigration.apply` did.
      properties:
        applied:
          title: Applied
          type: boolean
        by_type:
          additionalProperties:
            additionalProperties:
              type: integer
            type: object
          title: By Type
          type: object
        failures:
          items:
            additionalProperties:
              type: string
            type: object
          title: Failures
          type: array
        items_created:
          default: 0
          title: Items Created
          type: integer
        items_extended:
          default: 0
          title: Items Extended
          type: integer
        plan_hash:
          title: Plan Hash
          type: string
        project_id:
          title: Project Id
          type: string
        records_pinned:
          default: 0
          title: Records Pinned
          type: integer
        records_stale:
          default: 0
          title: Records Stale
          type: integer
        revisions_linked:
          default: 0
          title: Revisions Linked
          type: integer
        run_summaries_marked:
          default: 0
          title: Run Summaries Marked
          type: integer
      required:
        - project_id
        - plan_hash
        - applied
      title: MigrationResult
      type: object
    ModelInfo:
      properties:
        id:
          title: Id
          type: string
      required:
        - id
      title: ModelInfo
      type: object
    ModelsResponse:
      properties:
        models:
          items:
            $ref: '#/components/schemas/ModelInfo'
          title: Models
          type: array
        provider:
          title: Provider
          type: string
        source:
          title: Source
          type: string
      required:
        - provider
        - source
      title: ModelsResponse
      type: object
    NamedFace:
      description: |-
        One geometric face of a generated mesh (FORGE-277).

        Mirrors ``freecad.list_named_faces``'/``generate_mesh``'s ``faces``
        table (FORGE-239) in the dashboard's camelCase shape -- real
        coordinates for a face, not just its opaque gmsh-assigned name.
      properties:
        areaMm2:
          title: Areamm2
          type: number
        bboxMm:
          additionalProperties:
            items:
              type: number
            type: array
          title: Bboxmm
          type: object
        centroidMm:
          items:
            type: number
          title: Centroidmm
          type: array
        name:
          title: Name
          type: string
        normal:
          items:
            type: number
          title: Normal
          type: array
      required:
        - name
        - centroidMm
        - normal
        - areaMm2
        - bboxMm
      title: NamedFace
      type: object
    NamedFacesRequest:
      description: Body for ``POST /v1/simulation/named-faces``.
      properties:
        meshFile:
          minLength: 1
          title: Meshfile
          type: string
      required:
        - meshFile
      title: NamedFacesRequest
      type: object
    NamedFacesResponse:
      properties:
        faces:
          items:
            $ref: '#/components/schemas/NamedFace'
          title: Faces
          type: array
        meshFile:
          title: Meshfile
          type: string
      required:
        - meshFile
        - faces
      title: NamedFacesResponse
      type: object
    OkResponse:
      properties:
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
        ok:
          default: true
          title: Ok
          type: boolean
        provider:
          title: Provider
          type: string
      required:
        - provider
      title: OkResponse
      type: object
    OpenTaskRequest:
      properties:
        attempt:
          default: 1
          title: Attempt
          type: integer
        brief:
          additionalProperties: true
          title: Brief
          type: object
        phaseId:
          title: Phaseid
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        runId:
          title: Runid
          type: string
      required:
        - runId
        - phaseId
      title: OpenTaskRequest
      type: object
    OtherRow:
      properties:
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        type:
          title: Type
          type: string
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        validation_status:
          title: Validation Status
          type: string
      required:
        - node_id
        - name
        - type
        - validation_status
      title: OtherRow
      type: object
    OverhangCheckRequest:
      properties:
        build_axis:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Build Axis
        mesh_file:
          title: Mesh File
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        threshold_deg:
          anyOf:
            - type: number
            - type: 'null'
          title: Threshold Deg
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - mesh_file
      title: OverhangCheckRequest
      type: object
    OverhangCheckResponse:
      properties:
        build_axis:
          items:
            type: number
          title: Build Axis
          type: array
        dfm_pass:
          title: Dfm Pass
          type: boolean
        evidence_node_id:
          title: Evidence Node Id
          type: string
        faces:
          items:
            $ref: '#/components/schemas/OverhangFace'
          title: Faces
          type: array
        flagged_count:
          title: Flagged Count
          type: integer
        threshold_deg:
          title: Threshold Deg
          type: number
        total_faces:
          title: Total Faces
          type: integer
      required:
        - faces
        - flagged_count
        - total_faces
        - threshold_deg
        - build_axis
        - dfm_pass
        - evidence_node_id
      title: OverhangCheckResponse
      type: object
    OverhangFace:
      properties:
        area_mm2:
          anyOf:
            - type: number
            - type: 'null'
          title: Area Mm2
        flagged:
          title: Flagged
          type: boolean
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        normal:
          items:
            type: number
          title: Normal
          type: array
        tilt_from_vertical_deg:
          title: Tilt From Vertical Deg
          type: number
      required:
        - normal
        - tilt_from_vertical_deg
        - flagged
      title: OverhangFace
      type: object
    PartRef:
      description: One part of an assembly, referencing a Twin STEP work product.
      properties:
        color_rgba:
          anyOf:
            - items:
                type: number
              maxItems: 4
              minItems: 4
              type: array
            - type: 'null'
          description: >-
            [r, g, b, a], each 0-1. Attaches a <material><color> to this link's
            visual geometry in the exported URDF (SDF/USD requests ignore it —
            not yet wired to those formats). Authored design color, not a
            renderer-invented palette.
          title: Color Rgba
        density_kg_m3:
          anyOf:
            - type: number
            - type: 'null'
          title: Density Kg M3
        link_name:
          minLength: 1
          title: Link Name
          type: string
        material:
          anyOf:
            - type: string
            - type: 'null'
          title: Material
        node_id:
          description: Twin work-product node id (STEP file).
          minLength: 1
          title: Node Id
          type: string
      required:
        - node_id
        - link_name
      title: PartRef
      type: object
    PatchView:
      properties:
        added:
          items:
            type: string
          title: Added
          type: array
        approvalId:
          title: Approvalid
          type: string
        changes:
          items:
            type: string
          title: Changes
          type: array
        nextStep:
          title: Nextstep
          type: string
        notes:
          items:
            type: string
          title: Notes
          type: array
        preserved:
          items:
            type: string
          title: Preserved
          type: array
        removed:
          items:
            type: string
          title: Removed
          type: array
        rerun:
          items:
            type: string
          title: Rerun
          type: array
        runId:
          title: Runid
          type: string
        versionId:
          title: Versionid
          type: string
      required:
        - runId
        - approvalId
        - versionId
        - nextStep
      title: PatchView
      type: object
    PhaseView:
      properties:
        condition:
          anyOf:
            - type: string
            - type: 'null'
          title: Condition
        dependsOn:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Dependson
        disciplines:
          items:
            type: string
          title: Disciplines
          type: array
        enforceDeliverables:
          default: true
          title: Enforcedeliverables
          type: boolean
        expectedArtifacts:
          items:
            type: string
          title: Expectedartifacts
          type: array
        gate:
          anyOf:
            - $ref: '#/components/schemas/GateView'
            - type: 'null'
        id:
          title: Id
          type: string
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        objective:
          title: Objective
          type: string
        outcome:
          default: ''
          title: Outcome
          type: string
        requiredDeliverables:
          items:
            type: string
          title: Requireddeliverables
          type: array
        slots:
          items:
            $ref: '#/components/schemas/SlotView'
          title: Slots
          type: array
        title:
          title: Title
          type: string
      required:
        - id
        - title
        - objective
      title: PhaseView
      type: object
    PrdSource:
      properties:
        item_type:
          title: Item Type
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        node_id:
          title: Node Id
          type: string
        ref:
          title: Ref
          type: string
        requirement_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Requirement Count
      required:
        - ref
        - item_type
        - node_id
      title: PrdSource
      type: object
    ProjectListResponse:
      description: List of projects.
      properties:
        projects:
          items:
            $ref: '#/components/schemas/ProjectResponse'
          title: Projects
          type: array
        total:
          title: Total
          type: integer
      required:
        - projects
        - total
      title: ProjectListResponse
      type: object
    ProjectResponse:
      description: Dashboard-friendly representation of a hardware project.
      properties:
        agent_count:
          default: 0
          title: Agent Count
          type: integer
        created_at:
          title: Created At
          type: string
        description:
          title: Description
          type: string
        id:
          title: Id
          type: string
        last_updated:
          title: Last Updated
          type: string
        name:
          title: Name
          type: string
        status:
          title: Status
          type: string
        work_products:
          items:
            $ref: '#/components/schemas/ProjectWorkProductResponse'
          title: Work Products
          type: array
      required:
        - id
        - name
        - description
        - status
        - last_updated
        - created_at
      title: ProjectResponse
      type: object
    ProjectWorkProductResponse:
      description: A single work product within a project.
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        status:
          title: Status
          type: string
        type:
          title: Type
          type: string
        updated_at:
          title: Updated At
          type: string
      required:
        - id
        - name
        - type
        - status
        - updated_at
      title: ProjectWorkProductResponse
      type: object
    PromotionHistoryResponse:
      properties:
        gates:
          items:
            $ref: '#/components/schemas/MaturityGateSummary'
          title: Gates
          type: array
      required:
        - gates
      title: PromotionHistoryResponse
      type: object
    ProposalListResponse:
      description: Paginated list of design-change proposals.
      properties:
        proposals:
          items:
            $ref: '#/components/schemas/DesignChangeProposal'
          title: Proposals
          type: array
        total:
          title: Total
          type: integer
      required:
        - proposals
        - total
      title: ProposalListResponse
      type: object
    ProposeFlowRequest:
      properties:
        budget:
          anyOf:
            - type: string
            - type: 'null'
          title: Budget
        caller:
          anyOf:
            - $ref: '#/components/schemas/CallerBody'
            - type: 'null'
        intent:
          title: Intent
          type: string
        loadsAndUse:
          anyOf:
            - type: string
            - type: 'null'
          title: Loadsanduse
        manufacturingContext:
          anyOf:
            - $ref: '#/components/schemas/ManufacturingContextBody'
            - type: 'null'
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        operations:
          anyOf:
            - items:
                $ref: '#/components/schemas/CallerOperation'
              type: array
            - type: 'null'
          title: Operations
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        requirements:
          items:
            type: string
          title: Requirements
          type: array
        targetMaturity:
          anyOf:
            - $ref: '#/components/schemas/TargetMaturity'
            - type: 'null'
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
      required:
        - intent
      title: ProposeFlowRequest
      type: object
    ProposePatchRequest:
      description: A change to a running flow, written against the flow it was read from.
      properties:
        expectedContentHash:
          title: Expectedcontenthash
          type: string
        invalidate:
          items:
            type: string
          title: Invalidate
          type: array
        operations:
          items:
            additionalProperties: true
            type: object
          title: Operations
          type: array
        reason:
          title: Reason
          type: string
      required:
        - expectedContentHash
        - reason
      title: ProposePatchRequest
      type: object
    ProposedItem:
      description: An item the migration creates, or an existing item it extends.
      properties:
        confidence:
          default: high
          title: Confidence
          type: string
        existing_item:
          default: false
          title: Existing Item
          type: boolean
        head_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Node Id
        head_revision:
          default: 0
          title: Head Revision
          type: integer
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        review_reasons:
          items:
            type: string
          title: Review Reasons
          type: array
        revisions:
          items:
            $ref: '#/components/schemas/ProposedRevision'
          title: Revisions
          type: array
        rule:
          title: Rule
          type: string
        rules:
          items:
            type: string
          title: Rules
          type: array
      required:
        - key
        - item_type
        - name
        - rule
      title: ProposedItem
      type: object
    ProposedRevision:
      description: One node as a revision of a proposed item.
      properties:
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        evidence:
          title: Evidence
          type: string
        existing:
          default: false
          title: Existing
          type: boolean
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        revision:
          title: Revision
          type: integer
        rule:
          title: Rule
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        status:
          title: Status
          type: string
        status_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Reason
      required:
        - node_id
        - name
        - revision
        - status
        - rule
        - evidence
      title: ProposedRevision
      type: object
    ProviderInfo:
      properties:
        base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Url
        configured:
          title: Configured
          type: boolean
        family:
          title: Family
          type: string
        id:
          title: Id
          type: string
      required:
        - id
        - family
        - configured
      title: ProviderInfo
      type: object
    ProvidersResponse:
      properties:
        active_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Model
        active_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Provider
        fallback_count:
          default: 0
          title: Fallback Count
          type: integer
        last_fallback:
          anyOf:
            - $ref: '#/components/schemas/FallbackInfo'
            - type: 'null'
        providers:
          items:
            $ref: '#/components/schemas/ProviderInfo'
          title: Providers
          type: array
      title: ProvidersResponse
      type: object
    QuestionView:
      properties:
        answerType:
          title: Answertype
          type: string
        field:
          default: ''
          title: Field
          type: string
        id:
          title: Id
          type: string
        options:
          items:
            type: string
          title: Options
          type: array
        question:
          title: Question
          type: string
        required:
          default: true
          title: Required
          type: boolean
        source:
          default: metaforge
          title: Source
          type: string
        why:
          title: Why
          type: string
      required:
        - id
        - question
        - why
        - answerType
      title: QuestionView
      type: object
    RealizeHierarchyNodeRequest:
      properties:
        bomItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomitemid
        workProductId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workproductid
      title: RealizeHierarchyNodeRequest
      type: object
    RealizeHierarchyNodeResponse:
      properties:
        instanceOfBomItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Instanceofbomitemid
        nodeId:
          title: Nodeid
          type: string
        realizedByWorkProductId:
          anyOf:
            - type: string
            - type: 'null'
          title: Realizedbyworkproductid
      required:
        - nodeId
      title: RealizeHierarchyNodeResponse
      type: object
    RecordAction:
      description: 'One record update: a run-summary flag or a revision pin.'
      properties:
        action:
          title: Action
          type: string
        item_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Ref
        item_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Type
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        pinned_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Pinned Node Id
        reason:
          title: Reason
          type: string
        record_type:
          title: Record Type
          type: string
        staleness:
          anyOf:
            - type: string
            - type: 'null'
          title: Staleness
      required:
        - node_id
        - name
        - record_type
        - action
        - reason
      title: RecordAction
      type: object
    RecordPinResponse:
      description: One item revision a record depends on (FORGE-527).
      properties:
        itemKey:
          title: Itemkey
          type: string
        itemRef:
          title: Itemref
          type: string
        itemType:
          default: ''
          title: Itemtype
          type: string
        nodeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Nodeid
        revision:
          title: Revision
          type: integer
      required:
        - itemKey
        - revision
        - itemRef
      title: RecordPinResponse
      type: object
    RecordRowResponse:
      properties:
        analysed:
          items:
            $ref: '#/components/schemas/AnalysedRef'
          title: Analysed
          type: array
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        out_of_date:
          default: false
          title: Out Of Date
          type: boolean
        record_type:
          title: Record Type
          type: string
        staleness:
          anyOf:
            - type: string
            - type: 'null'
          title: Staleness
      required:
        - node_id
        - record_type
        - name
      title: RecordRowResponse
      type: object
    RecordStalenessResponse:
      description: Whether a record is still valid evidence (FORGE-527, spec section 20).
      properties:
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        staleFor:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Stalefor
        status:
          title: Status
          type: string
        supersededBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Supersededby
      required:
        - status
      title: RecordStalenessResponse
      type: object
    ReleaseDiff:
      properties:
        bom_delta:
          title: Bom Delta
          type: integer
        compared_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Compared To
        decision_delta:
          title: Decision Delta
          type: integer
        evidence_delta:
          title: Evidence Delta
          type: integer
        hierarchy_delta:
          title: Hierarchy Delta
          type: integer
      required:
        - compared_to
        - hierarchy_delta
        - bom_delta
        - evidence_delta
        - decision_delta
      title: ReleaseDiff
      type: object
    ReleasePackageListResponse:
      properties:
        releases:
          items:
            $ref: '#/components/schemas/ReleasePackageResponse'
          title: Releases
          type: array
      required:
        - releases
      title: ReleasePackageListResponse
      type: object
    ReleasePackageResponse:
      properties:
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        diff_from_previous:
          $ref: '#/components/schemas/ReleaseDiff'
        gate_status:
          title: Gate Status
          type: string
        node_id:
          title: Node Id
          type: string
        snapshot:
          $ref: '#/components/schemas/ReleaseSnapshot'
        statement:
          anyOf:
            - type: string
            - type: 'null'
          title: Statement
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - node_id
        - snapshot
        - diff_from_previous
        - gate_status
      title: ReleasePackageResponse
      type: object
    ReleaseSnapshot:
      properties:
        bom_item_ids:
          items:
            type: string
          title: Bom Item Ids
          type: array
        decision_ids:
          items:
            type: string
          title: Decision Ids
          type: array
        drawing_ids:
          items:
            type: string
          title: Drawing Ids
          type: array
        evidence_ids:
          items:
            type: string
          title: Evidence Ids
          type: array
        hierarchy_node_ids:
          items:
            type: string
          title: Hierarchy Node Ids
          type: array
      required:
        - hierarchy_node_ids
        - bom_item_ids
        - evidence_ids
        - decision_ids
        - drawing_ids
      title: ReleaseSnapshot
      type: object
    RepeatabilityContribution:
      properties:
        actuator:
          title: Actuator
          type: string
        contribution_mm:
          title: Contribution Mm
          type: number
        jacobian_mm_per_rad:
          anyOf:
            - type: number
            - type: 'null'
          title: Jacobian Mm Per Rad
        joint_name:
          title: Joint Name
          type: string
        resolution_rad:
          anyOf:
            - type: number
            - type: 'null'
          title: Resolution Rad
        source:
          title: Source
          type: string
      required:
        - joint_name
        - actuator
        - source
        - contribution_mm
      title: RepeatabilityContribution
      type: object
    RepeatabilityEstimateResponse:
      properties:
        contributions:
          items:
            $ref: '#/components/schemas/RepeatabilityContribution'
          title: Contributions
          type: array
        passes:
          title: Passes
          type: boolean
        requirement_mm:
          title: Requirement Mm
          type: number
        target_part:
          title: Target Part
          type: string
        warnings:
          items:
            type: string
          title: Warnings
          type: array
        work_product_id:
          title: Work Product Id
          type: string
        worst_case_repeatability_mm:
          title: Worst Case Repeatability Mm
          type: number
      required:
        - work_product_id
        - target_part
        - requirement_mm
        - worst_case_repeatability_mm
        - passes
        - contributions
        - warnings
      title: RepeatabilityEstimateResponse
      type: object
    RequiredClaimResultView:
      properties:
        decision:
          title: Decision
          type: string
        detail:
          title: Detail
          type: string
        requirementId:
          title: Requirementid
          type: string
        requirementName:
          title: Requirementname
          type: string
        waiverId:
          anyOf:
            - type: string
            - type: 'null'
          title: Waiverid
      required:
        - requirementId
        - requirementName
        - decision
        - detail
        - waiverId
      title: RequiredClaimResultView
      type: object
    RequiredSpec:
      properties:
        op:
          title: Op
          type: string
        value:
          title: Value
          type: number
      required:
        - op
        - value
      title: RequiredSpec
      type: object
    RequirementMatrixResponse:
      properties:
        revisionRefs:
          default: []
          items:
            type: string
          title: Revisionrefs
          type: array
        rows:
          items:
            $ref: '#/components/schemas/RequirementMatrixRow'
          title: Rows
          type: array
      required:
        - rows
      title: RequirementMatrixResponse
      type: object
    RequirementMatrixRow:
      properties:
        artefactIds:
          items:
            type: string
          title: Artefactids
          type: array
        detail:
          title: Detail
          type: string
        evidence:
          items:
            $ref: '#/components/schemas/EvidenceSummary'
          title: Evidence
          type: array
        expectedEvidence:
          default: ''
          title: Expectedevidence
          type: string
        limitText:
          title: Limittext
          type: string
        requirementId:
          title: Requirementid
          type: string
        requirementName:
          title: Requirementname
          type: string
        revisionRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Revisionref
        status:
          title: Status
          type: string
        verificationMethod:
          default: ''
          title: Verificationmethod
          type: string
      required:
        - requirementId
        - requirementName
        - limitText
        - status
        - detail
      title: RequirementMatrixRow
      type: object
    RequirementRecordView:
      description: |-
        One requirement's identity + quality diagnostics, dashboard-facing
        camelCase over the reused, already-shipped ``RequirementQualityRecord``
        (left untouched -- its own field names stay snake_case internally).
      properties:
        atomicity:
          title: Atomicity
          type: string
        clarity:
          title: Clarity
          type: string
        conflicts:
          items:
            type: string
          title: Conflicts
          type: array
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        quantified:
          title: Quantified
          type: string
        severity:
          title: Severity
          type: string
        text:
          title: Text
          type: string
        traceability:
          anyOf:
            - type: string
            - type: 'null'
          title: Traceability
        verificationReady:
          title: Verificationready
          type: string
      required:
        - id
        - name
        - text
        - severity
        - clarity
        - atomicity
        - quantified
        - traceability
        - verificationReady
      title: RequirementRecordView
      type: object
    RequirementSetQualityReport:
      properties:
        completeness:
          $ref: '#/components/schemas/CompletenessView'
        conflicts:
          items:
            $ref: '#/components/schemas/ConflictPairView'
          title: Conflicts
          type: array
        requirements:
          items:
            $ref: '#/components/schemas/RequirementRecordView'
          title: Requirements
          type: array
      required:
        - completeness
      title: RequirementSetQualityReport
      type: object
    ResolveHoldRequest:
      description: Close a hold nobody is waiting for any more (FORGE-466).
      properties:
        approver:
          anyOf:
            - type: string
            - type: 'null'
          title: Approver
        approver_verified:
          default: false
          title: Approver Verified
          type: boolean
        outcome:
          enum:
            - timed_out
            - canceled
            - approved
            - rejected
          title: Outcome
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      required:
        - outcome
      title: ResolveHoldRequest
      type: object
    RevisionDiff:
      description: Metadata diff between two revisions.
      properties:
        added:
          additionalProperties: true
          title: Added
          type: object
        changed:
          additionalProperties:
            $ref: '#/components/schemas/FieldDelta'
          title: Changed
          type: object
        removed:
          additionalProperties: true
          title: Removed
          type: object
        revision_a:
          title: Revision A
          type: integer
        revision_b:
          title: Revision B
          type: integer
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - revision_a
        - revision_b
        - changed
        - added
        - removed
      title: RevisionDiff
      type: object
    RevisionIndexEntry:
      properties:
        current:
          title: Current
          type: boolean
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        ref:
          title: Ref
          type: string
        revision:
          title: Revision
          type: integer
        revision_count:
          title: Revision Count
          type: integer
        status:
          title: Status
          type: string
        via:
          title: Via
          type: string
      required:
        - key
        - item_type
        - revision
        - ref
        - status
        - current
        - revision_count
        - via
      title: RevisionIndexEntry
      type: object
    RevisionIndexResponse:
      properties:
        nodes:
          additionalProperties:
            $ref: '#/components/schemas/RevisionIndexEntry'
          title: Nodes
          type: object
        project_id:
          title: Project Id
          type: string
      required:
        - project_id
        - nodes
      title: RevisionIndexResponse
      type: object
    RevisionStateResponse:
      properties:
        adopted:
          default: false
          title: Adopted
          type: boolean
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        change_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Reason
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        gate_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gate Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        node_id:
          title: Node Id
          type: string
        revision:
          title: Revision
          type: integer
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        status:
          title: Status
          type: string
      required:
        - revision
        - node_id
        - status
      title: RevisionStateResponse
      type: object
    Ros2LaunchRequest:
      properties:
        default_urdf_path:
          description: >-
            Default 'urdf_path' launch argument — e.g. a just-exported URDF's
            download_url.
          minLength: 1
          title: Default Urdf Path
          type: string
        include_joint_state_publisher_gui:
          default: true
          title: Include Joint State Publisher Gui
          type: boolean
        include_rviz:
          default: true
          title: Include Rviz
          type: boolean
        robot_name:
          minLength: 1
          title: Robot Name
          type: string
      required:
        - robot_name
        - default_urdf_path
      title: Ros2LaunchRequest
      type: object
    Ros2LaunchResponse:
      properties:
        default_urdf_path:
          title: Default Urdf Path
          type: string
        output_file:
          $ref: '#/components/schemas/ExportFile'
        robot_name:
          title: Robot Name
          type: string
      required:
        - output_file
        - robot_name
        - default_urdf_path
      title: Ros2LaunchResponse
      type: object
    RotationDelta:
      description: Single-axis rotation delta of a dragged group (MET-611).
      properties:
        angle_deg:
          title: Angle Deg
          type: number
        axis:
          enum:
            - x
            - 'y'
            - z
          title: Axis
          type: string
      required:
        - axis
        - angle_deg
      title: RotationDelta
      type: object
    RouteInfo:
      properties:
        configured:
          default: true
          title: Configured
          type: boolean
        model:
          title: Model
          type: string
        provider:
          title: Provider
          type: string
      required:
        - provider
        - model
      title: RouteInfo
      type: object
    RoutingResponse:
      description: >-
        The effective per-role routing and what roles without a route fall back
        to.
      properties:
        default_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Model
        default_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Provider
        effective_for_project:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/RouteInfo'
              type: object
            - type: 'null'
          title: Effective For Project
        problems:
          items:
            type: string
          title: Problems
          type: array
        projects:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/RouteInfo'
            type: object
          title: Projects
          type: object
        roles:
          additionalProperties:
            $ref: '#/components/schemas/RouteInfo'
          title: Roles
          type: object
      title: RoutingResponse
      type: object
    RunChangesResponse:
      properties:
        baselines:
          items:
            $ref: '#/components/schemas/BaselineSummary'
          title: Baselines
          type: array
        revisions:
          items:
            $ref: '#/components/schemas/RunRevisionRow'
          title: Revisions
          type: array
        run_id:
          title: Run Id
          type: string
      required:
        - run_id
        - revisions
        - baselines
      title: RunChangesResponse
      type: object
    RunLifecycleResponse:
      description: >-
        Where a design run stands, as separate answers per phase, plus a
        verdict.


        ``lifecycle`` holds the per-phase execution, eligibility, validity and

        objective status, the capability gaps, the requirement statuses and the

        completion verdict (``COMPLETED_VERIFIED`` only when every mandatory

        requirement passes with current evidence). ``limits`` lists anything
        that

        could not be read; an empty list means nothing was skipped.
      properties:
        lifecycle:
          additionalProperties: true
          title: Lifecycle
          type: object
        limits:
          items:
            type: string
          title: Limits
          type: array
        live:
          title: Live
          type: boolean
        nextStep:
          default: ''
          title: Nextstep
          type: string
        runId:
          title: Runid
          type: string
      required:
        - runId
        - live
      title: RunLifecycleResponse
      type: object
    RunListResponse:
      description: Body for ``GET /v1/runs``.
      properties:
        runs:
          items:
            $ref: '#/components/schemas/RunResponse'
          title: Runs
          type: array
        unscoped_count:
          default: 0
          title: Unscoped Count
          type: integer
      required:
        - runs
      title: RunListResponse
      type: object
    RunResponse:
      description: Serialized run state.
      properties:
        approval_deadline:
          anyOf:
            - type: number
            - type: 'null'
          title: Approval Deadline
        approval_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Approval Reason
        approved_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved By
        approver_verified:
          default: false
          title: Approver Verified
          type: boolean
        created_at:
          title: Created At
          type: number
        engine:
          anyOf:
            - type: string
            - type: 'null'
          title: Engine
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        flow_content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Content Hash
        flow_version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Version Id
        history:
          items:
            type: string
          title: History
          type: array
        id:
          title: Id
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        request:
          additionalProperties: true
          title: Request
          type: object
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
        status:
          title: Status
          type: string
        updated_at:
          title: Updated At
          type: number
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
      required:
        - id
        - status
        - request
        - created_at
        - updated_at
        - history
      title: RunResponse
      type: object
    RunRevisionRow:
      properties:
        baselined_by_gate:
          anyOf:
            - type: string
            - type: 'null'
          title: Baselined By Gate
        change_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Reason
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        is_current:
          title: Is Current
          type: boolean
        item_type:
          title: Item Type
          type: string
        key:
          title: Key
          type: string
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        ref:
          title: Ref
          type: string
        revision:
          title: Revision
          type: integer
        status:
          title: Status
          type: string
      required:
        - key
        - item_type
        - name
        - revision
        - ref
        - node_id
        - status
        - is_current
      title: RunRevisionRow
      type: object
    RunStatusResponse:
      description: Response from ``GET /api/v1/assistant/request/{run_id}``.
      properties:
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO timestamp when the run completed
          title: Completed At
        run_id:
          description: Workflow run identifier
          title: Run Id
          type: string
        status:
          description: 'Run status: pending, running, completed, failed'
          title: Status
          type: string
        steps:
          additionalProperties: true
          description: Per-step status and results
          title: Steps
          type: object
      required:
        - run_id
        - status
      title: RunStatusResponse
      type: object
    ScaleDelta:
      description: Single-axis scale delta of a dragged group (MET-611).
      properties:
        axis:
          enum:
            - x
            - 'y'
            - z
          title: Axis
          type: string
        factor:
          title: Factor
          type: number
      required:
        - axis
        - factor
      title: ScaleDelta
      type: object
    SdfAssemblyExportRequest:
      properties:
        joints:
          items:
            $ref: '#/components/schemas/JointSpec'
          title: Joints
          type: array
        mesh_format:
          default: stl
          enum:
            - stl
            - obj
          title: Mesh Format
          type: string
        model_name:
          default: model
          title: Model Name
          type: string
        parts:
          items:
            $ref: '#/components/schemas/PartRef'
          minItems: 1
          title: Parts
          type: array
        persist:
          default: true
          description: >-
            Commit this export as a robot_description Twin work product (default
            on). Set false to keep the pre-MET-740 throwaway-only behavior.
          title: Persist
          type: boolean
        persist_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Work-product display name (default: '<robot_name> robot
            description').
          title: Persist Name
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to link the persisted work product to.
          title: Project Id
        static:
          default: false
          title: Static
          type: boolean
        update_node_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            An existing robot_description node's id — when given, this export
            replaces that node's content and records a new version instead of
            creating a new node.
          title: Update Node Id
        world_name:
          anyOf:
            - type: string
            - type: 'null'
          title: World Name
      required:
        - parts
      title: SdfAssemblyExportRequest
      type: object
    SdfAssemblyExportResponse:
      properties:
        joint_names:
          items:
            type: string
          title: Joint Names
          type: array
        joints:
          default: []
          items:
            $ref: '#/components/schemas/EmittedJoint'
          title: Joints
          type: array
        link_names:
          items:
            type: string
          title: Link Names
          type: array
        mesh_files:
          items:
            $ref: '#/components/schemas/ExportFile'
          title: Mesh Files
          type: array
        model_name:
          title: Model Name
          type: string
        output_file:
          $ref: '#/components/schemas/ExportFile'
        robot_description_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Robot Description Node Id
      required:
        - output_file
        - mesh_files
        - model_name
        - link_names
        - joint_names
      title: SdfAssemblyExportResponse
      type: object
    SdfExportRequest:
      properties:
        density_kg_m3:
          anyOf:
            - type: number
            - type: 'null'
          title: Density Kg M3
        link_name:
          default: link
          title: Link Name
          type: string
        material:
          anyOf:
            - type: string
            - type: 'null'
          title: Material
        mesh_format:
          default: stl
          enum:
            - stl
            - obj
          title: Mesh Format
          type: string
        model_name:
          default: model
          title: Model Name
          type: string
        node_id:
          description: Twin work-product node id (STEP file).
          minLength: 1
          title: Node Id
          type: string
        static:
          default: false
          title: Static
          type: boolean
        world_name:
          anyOf:
            - type: string
            - type: 'null'
          title: World Name
      required:
        - node_id
      title: SdfExportRequest
      type: object
    SdfExportResponse:
      properties:
        center_of_mass_m:
          additionalProperties:
            type: number
          title: Center Of Mass M
          type: object
        density_kg_m3:
          title: Density Kg M3
          type: number
        inertia_kgm2:
          additionalProperties:
            type: number
          title: Inertia Kgm2
          type: object
        link_name:
          title: Link Name
          type: string
        mass_kg:
          title: Mass Kg
          type: number
        mesh_file:
          $ref: '#/components/schemas/ExportFile'
        model_name:
          title: Model Name
          type: string
        output_file:
          $ref: '#/components/schemas/ExportFile'
      required:
        - output_file
        - mesh_file
        - model_name
        - link_name
        - density_kg_m3
        - mass_kg
        - center_of_mass_m
        - inertia_kgm2
      title: SdfExportResponse
      type: object
    SearchResponse:
      description: Response from the knowledge search endpoint.
      properties:
        query:
          title: Query
          type: string
        results:
          items:
            $ref: '#/components/schemas/KnowledgeEntryResponse'
          title: Results
          type: array
        totalFound:
          title: Totalfound
          type: integer
      required:
        - results
        - query
        - totalFound
      title: SearchResponse
      type: object
    SelectComponentRequest:
      properties:
        candidates:
          items:
            $ref: '#/components/schemas/Candidate'
          title: Candidates
          type: array
        category:
          title: Category
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        purchaseUnit:
          title: Purchaseunit
          type: string
        quantity:
          default: 1
          title: Quantity
          type: integer
        rationale:
          title: Rationale
          type: string
        requiredSpecs:
          additionalProperties:
            $ref: '#/components/schemas/RequiredSpec'
          title: Requiredspecs
          type: object
        requirementIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Requirementids
        selectedMpn:
          title: Selectedmpn
          type: string
        title:
          title: Title
          type: string
      required:
        - candidates
        - requiredSpecs
        - selectedMpn
        - category
        - purchaseUnit
        - title
        - rationale
      title: SelectComponentRequest
      type: object
    SelectConceptRequest:
      properties:
        optionIds:
          items:
            type: string
          title: Optionids
          type: array
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        rationale:
          title: Rationale
          type: string
        requirementIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Requirementids
        selectedOptionId:
          title: Selectedoptionid
          type: string
        title:
          title: Title
          type: string
        weights:
          additionalProperties:
            type: number
          title: Weights
          type: object
      required:
        - optionIds
        - selectedOptionId
        - weights
        - title
        - rationale
      title: SelectConceptRequest
      type: object
    SendMessageRequest:
      description: Body for ``POST /api/v1/chat/threads/{thread_id}/messages``.
      properties:
        actor_id:
          description: ID of the actor sending the message
          title: Actor Id
          type: string
        actor_kind:
          description: 'Actor type: user | agent | system'
          title: Actor Kind
          type: string
        content:
          description: Message content
          minLength: 1
          title: Content
          type: string
        graph_ref_label:
          anyOf:
            - type: string
            - type: 'null'
          description: Digital-twin ref label
          title: Graph Ref Label
        graph_ref_node:
          anyOf:
            - type: string
            - type: 'null'
          description: Digital-twin node reference
          title: Graph Ref Node
        graph_ref_type:
          anyOf:
            - type: string
            - type: 'null'
          description: Digital-twin ref type
          title: Graph Ref Type
        model:
          anyOf:
            - type: string
            - type: 'null'
          description: Override model for this turn
          title: Model
        provider:
          anyOf:
            - type: string
            - type: 'null'
          description: Override provider id for this turn
          title: Provider
        tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Enabled MCP tool ids for this turn (None = all available)
          title: Tools
      required:
        - content
        - actor_id
        - actor_kind
      title: SendMessageRequest
      type: object
    SessionCreateRequest:
      description: Open a new externally-recorded agent session.
      properties:
        agent_code:
          title: Agent Code
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        task_type:
          title: Task Type
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - agent_code
        - task_type
      title: SessionCreateRequest
      type: object
    SessionEventCreateRequest:
      description: |-
        Append one event to a session timeline.

        ``type`` is the normalized capture vocabulary shared by every client
        adapter (MET-497): thought / action / decision / observation / error /
        result.
      properties:
        data:
          additionalProperties: true
          title: Data
          type: object
        message:
          title: Message
          type: string
        type:
          title: Type
          type: string
      required:
        - type
        - message
      title: SessionEventCreateRequest
      type: object
    SessionEventCreatedResponse:
      description: Ack for an appended event — carries the server-assigned sequence.
      properties:
        event_id:
          title: Event Id
          type: string
        seq:
          title: Seq
          type: integer
      required:
        - event_id
        - seq
      title: SessionEventCreatedResponse
      type: object
    SessionEventResponse:
      description: A single event within a session timeline.
      properties:
        agent_code:
          title: Agent Code
          type: string
        data:
          additionalProperties: true
          title: Data
          type: object
        id:
          title: Id
          type: string
        message:
          title: Message
          type: string
        timestamp:
          title: Timestamp
          type: string
        type:
          title: Type
          type: string
      required:
        - id
        - timestamp
        - type
        - agent_code
        - message
      title: SessionEventResponse
      type: object
    SessionJoint:
      properties:
        anchor:
          items:
            type: number
          title: Anchor
          type: array
        axis:
          items:
            type: number
          title: Axis
          type: array
        base:
          title: Base
          type: string
        follower:
          title: Follower
          type: string
        name:
          title: Name
          type: string
        type:
          enum:
            - fixed
            - slider
            - revolute
            - cylindrical
            - ball
          title: Type
          type: string
      required:
        - name
        - type
        - base
        - follower
        - axis
        - anchor
      title: SessionJoint
      type: object
    SessionJointsResponse:
      properties:
        joints:
          items:
            $ref: '#/components/schemas/SessionJoint'
          title: Joints
          type: array
      required:
        - joints
      title: SessionJointsResponse
      type: object
    SessionListResponse:
      description: List of sessions.
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/SessionResponse'
          title: Sessions
          type: array
        total:
          title: Total
          type: integer
        unscoped_count:
          default: 0
          title: Unscoped Count
          type: integer
      required:
        - sessions
        - total
      title: SessionListResponse
      type: object
    SessionObject:
      properties:
        kind:
          title: Kind
          type: string
        name:
          title: Name
          type: string
        obj_id:
          title: Obj Id
          type: string
        order:
          title: Order
          type: integer
      required:
        - obj_id
        - kind
        - name
        - order
      title: SessionObject
      type: object
    SessionResponse:
      description: Dashboard-friendly representation of an agent session.
      properties:
        agent_code:
          title: Agent Code
          type: string
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
        events:
          items:
            $ref: '#/components/schemas/SessionEventResponse'
          title: Events
          type: array
        id:
          title: Id
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        started_at:
          title: Started At
          type: string
        status:
          title: Status
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        task_type:
          title: Task Type
          type: string
      required:
        - id
        - agent_code
        - task_type
        - status
        - started_at
      title: SessionResponse
      type: object
    SessionSummary:
      properties:
        name:
          title: Name
          type: string
        object_count:
          title: Object Count
          type: integer
        objects:
          items:
            $ref: '#/components/schemas/SessionObject'
          title: Objects
          type: array
        session_id:
          title: Session Id
          type: string
      required:
        - session_id
        - name
        - object_count
        - objects
      title: SessionSummary
      type: object
    SessionUpdateRequest:
      description: Close out a session (status + optional summary).
      properties:
        status:
          title: Status
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
      required:
        - status
      title: SessionUpdateRequest
      type: object
    SetCredentialRequest:
      properties:
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          description: Raw API key (method=api_key).
          title: Api Key
        base_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional base_url override.
          title: Base Url
        method:
          default: api_key
          description: '''api_key'' or ''oauth''.'
          title: Method
          type: string
        provider:
          description: Registry provider id (e.g. openai, openai-codex).
          title: Provider
          type: string
        tokens:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: OAuth token blob in auth.json shape (method=oauth).
          title: Tokens
      required:
        - provider
      title: SetCredentialRequest
      type: object
    SetSelectionRequest:
      properties:
        model:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional model id.
          title: Model
        provider:
          description: Registry provider id to make active.
          title: Provider
          type: string
      required:
        - provider
      title: SetSelectionRequest
      type: object
    SimulationResultListResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SimulationResultResponse'
          title: Results
          type: array
        total:
          title: Total
          type: integer
      required:
        - results
        - total
      title: SimulationResultListResponse
      type: object
    SimulationResultResponse:
      description: One FEA result, in the dashboard's camelCase shape (FORGE-279).
      properties:
        analysedGeometry:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Analysedgeometry
        analysisType:
          anyOf:
            - type: string
            - type: 'null'
          title: Analysistype
        createdAt:
          title: Createdat
          type: string
        fieldQuantities:
          items:
            type: string
          title: Fieldquantities
          type: array
        fieldRanges:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Fieldranges
        fieldSizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Fieldsizebytes
        fixtures:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Fixtures
        hasField:
          default: false
          title: Hasfield
          type: boolean
        id:
          title: Id
          type: string
        loadCase:
          anyOf:
            - type: string
            - type: 'null'
          title: Loadcase
        loadCaseSpec:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Loadcasespec
        loads:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Loads
        maxDisplacementMm:
          anyOf:
            - type: number
            - type: 'null'
          title: Maxdisplacementmm
        maxTemperatureC:
          anyOf:
            - type: number
            - type: 'null'
          title: Maxtemperaturec
        maxVonMisesMpa:
          anyOf:
            - type: number
            - type: 'null'
          title: Maxvonmisesmpa
        meshConvergence:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meshconvergence
        meshStats:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meshstats
        name:
          title: Name
          type: string
        projectId:
          title: Projectid
          type: string
        updatedAt:
          title: Updatedat
          type: string
      required:
        - id
        - name
        - projectId
        - createdAt
        - updatedAt
      title: SimulationResultResponse
      type: object
    SlotView:
      description: 'A deliverable slot: one item the phase writes (FORGE-524).'
      properties:
        derived:
          default: false
          title: Derived
          type: boolean
        itemKey:
          title: Itemkey
          type: string
        itemType:
          title: Itemtype
          type: string
        name:
          title: Name
          type: string
      required:
        - itemType
        - name
        - itemKey
      title: SlotView
      type: object
    SourceDeleteResponse:
      description: Envelope for ``DELETE /knowledge/sources/{path}``.
      properties:
        deletedChunks:
          title: Deletedchunks
          type: integer
        sourcePath:
          title: Sourcepath
          type: string
      required:
        - sourcePath
        - deletedChunks
      title: SourceDeleteResponse
      type: object
    SourceDetailResponse:
      description: >-
        Per-source detail — adds an empty ``chunks`` list for parity with the
        MCP resource.
      properties:
        chunks:
          items:
            additionalProperties: true
            type: object
          title: Chunks
          type: array
        fragmentCount:
          title: Fragmentcount
          type: integer
        indexedAt:
          format: date-time
          title: Indexedat
          type: string
        knowledgeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Knowledgetype
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        sourcePath:
          title: Sourcepath
          type: string
      required:
        - sourcePath
        - fragmentCount
        - indexedAt
      title: SourceDetailResponse
      type: object
    SourceListResponse:
      description: Envelope for ``GET /knowledge/sources``.
      properties:
        sources:
          items:
            $ref: '#/components/schemas/SourceSummaryResponse'
          title: Sources
          type: array
        total:
          title: Total
          type: integer
      required:
        - sources
        - total
      title: SourceListResponse
      type: object
    SourceSummaryResponse:
      description: >-
        One row from ``GET /knowledge/sources`` — mirrors ``SourceSummary``
        (MET-411).
      properties:
        fragmentCount:
          title: Fragmentcount
          type: integer
        indexedAt:
          format: date-time
          title: Indexedat
          type: string
        knowledgeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Knowledgetype
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        sourcePath:
          title: Sourcepath
          type: string
      required:
        - sourcePath
        - fragmentCount
        - indexedAt
      title: SourceSummaryResponse
      type: object
    StartDesignLoopRequest:
      properties:
        deflectionLimitMm:
          title: Deflectionlimitmm
          type: number
        loadN:
          title: Loadn
          type: number
        material:
          default: aluminum_6061
          title: Material
          type: string
        maxIterations:
          default: 60
          title: Maxiterations
          type: integer
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        requirementIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Requirementids
        sfLimit:
          default: 2
          title: Sflimit
          type: number
        wallMaxMm:
          anyOf:
            - type: number
            - type: 'null'
          title: Wallmaxmm
        wallMinMm:
          default: 0.5
          title: Wallminmm
          type: number
        workProductId:
          title: Workproductid
          type: string
      required:
        - workProductId
        - loadN
        - deflectionLimitMm
      title: StartDesignLoopRequest
      type: object
    SubmitRequest:
      properties:
        artifacts:
          items:
            type: string
          title: Artifacts
          type: array
        client:
          default: ''
          title: Client
          type: string
        summary:
          title: Summary
          type: string
      required:
        - summary
      title: SubmitRequest
      type: object
    SynthesizeRequest:
      properties:
        delta:
          $ref: '#/components/schemas/DeltaTransform'
        group_name:
          minLength: 1
          title: Group Name
          type: string
        obj_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Obj Id
        property_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Property Path
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
      required:
        - group_name
        - delta
      title: SynthesizeRequest
      type: object
    SynthesizeResponse:
      properties:
        binding_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Binding Error
        bound:
          default: false
          title: Bound
          type: boolean
        conflict_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Conflict Reason
        constraint:
          anyOf:
            - $ref: '#/components/schemas/ConstraintSuggestion'
            - type: 'null'
        expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Expression
        status:
          enum:
            - ok
            - conflict
            - noop
          title: Status
          type: string
        suggestion:
          title: Suggestion
          type: string
      required:
        - status
        - suggestion
      title: SynthesizeResponse
      type: object
    TargetMaturity:
      enum:
        - concept
        - sim_validated
        - physically_validated
        - released
      title: TargetMaturity
      type: string
    TechnicalDrawingDimension:
      description: One toleranced dimension on a technical_drawing (FORGE-293).
      properties:
        feature:
          title: Feature
          type: string
        nominal_mm:
          title: Nominal Mm
          type: number
        tolerance_minus_mm:
          default: 0
          title: Tolerance Minus Mm
          type: number
        tolerance_plus_mm:
          default: 0
          title: Tolerance Plus Mm
          type: number
      required:
        - feature
        - nominal_mm
      title: TechnicalDrawingDimension
      type: object
    TechnicalDrawingGdtCallout:
      description: One GD&T callout (ASME Y14.5 style) on a technical_drawing (FORGE-293).
      properties:
        datum_refs:
          items:
            type: string
          title: Datum Refs
          type: array
        feature:
          title: Feature
          type: string
        symbol:
          title: Symbol
          type: string
        tolerance_value_mm:
          title: Tolerance Value Mm
          type: number
      required:
        - feature
        - symbol
        - tolerance_value_mm
      title: TechnicalDrawingGdtCallout
      type: object
    TechnicalDrawingListResponse:
      description: A part's real recorded technical drawings, oldest first (FORGE-293).
      properties:
        drawings:
          items:
            $ref: '#/components/schemas/TechnicalDrawingSummary'
          title: Drawings
          type: array
      required:
        - drawings
      title: TechnicalDrawingListResponse
      type: object
    TechnicalDrawingSummary:
      description: A real recorded technical_drawing work product, listed for a part.
      properties:
        approved:
          title: Approved
          type: boolean
        approved_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved At
        approved_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved By
        created_at:
          title: Created At
          type: string
        dimensions:
          items:
            $ref: '#/components/schemas/TechnicalDrawingDimension'
          title: Dimensions
          type: array
        gdt_callouts:
          items:
            $ref: '#/components/schemas/TechnicalDrawingGdtCallout'
          title: Gdt Callouts
          type: array
        inspection_requirements:
          items:
            type: string
          title: Inspection Requirements
          type: array
        name:
          title: Name
          type: string
        node_id:
          title: Node Id
          type: string
        part_name:
          title: Part Name
          type: string
        surface_finishes:
          items:
            $ref: '#/components/schemas/TechnicalDrawingSurfaceFinish'
          title: Surface Finishes
          type: array
      required:
        - node_id
        - created_at
        - name
        - part_name
        - dimensions
        - gdt_callouts
        - surface_finishes
        - inspection_requirements
        - approved
      title: TechnicalDrawingSummary
      type: object
    TechnicalDrawingSurfaceFinish:
      description: One surface-finish requirement on a technical_drawing (FORGE-293).
      properties:
        feature:
          title: Feature
          type: string
        ra_um:
          title: Ra Um
          type: number
      required:
        - feature
        - ra_um
      title: TechnicalDrawingSurfaceFinish
      type: object
    TestPlanEntry:
      properties:
        acceptance_value:
          title: Acceptance Value
          type: string
        node_id:
          title: Node Id
          type: string
        requirement_id:
          title: Requirement Id
          type: string
        step:
          title: Step
          type: string
      required:
        - node_id
        - requirement_id
        - step
        - acceptance_value
      title: TestPlanEntry
      type: object
    TestPlanListEntry:
      properties:
        acceptance_value:
          title: Acceptance Value
          type: string
        created_at:
          title: Created At
          type: string
        node_id:
          title: Node Id
          type: string
        requirement_id:
          title: Requirement Id
          type: string
        step:
          title: Step
          type: string
      required:
        - node_id
        - requirement_id
        - step
        - acceptance_value
        - created_at
      title: TestPlanListEntry
      type: object
    TestPlanListResponse:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/TestPlanListEntry'
          title: Entries
          type: array
      required:
        - entries
      title: TestPlanListResponse
      type: object
    ThreadListResponse:
      description: Paginated list of thread summaries.
      properties:
        page:
          title: Page
          type: integer
        per_page:
          title: Per Page
          type: integer
        threads:
          items:
            $ref: '#/components/schemas/ThreadSummaryResponse'
          title: Threads
          type: array
        total:
          title: Total
          type: integer
      required:
        - threads
        - total
        - page
        - per_page
      title: ThreadListResponse
      type: object
    ThreadResponse:
      description: Full thread with its messages.
      properties:
        archived:
          title: Archived
          type: boolean
        channel_id:
          title: Channel Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        last_message_at:
          format: date-time
          title: Last Message At
          type: string
        messages:
          items:
            $ref: '#/components/schemas/MessageResponse'
          title: Messages
          type: array
        scope_entity_id:
          title: Scope Entity Id
          type: string
        scope_kind:
          title: Scope Kind
          type: string
        title:
          title: Title
          type: string
      required:
        - id
        - channel_id
        - scope_kind
        - scope_entity_id
        - title
        - archived
        - created_at
        - last_message_at
      title: ThreadResponse
      type: object
    ThreadSummaryResponse:
      description: Thread without messages -- used in list views.
      properties:
        archived:
          title: Archived
          type: boolean
        channel_id:
          title: Channel Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        last_message_at:
          format: date-time
          title: Last Message At
          type: string
        message_count:
          default: 0
          title: Message Count
          type: integer
        scope_entity_id:
          title: Scope Entity Id
          type: string
        scope_kind:
          title: Scope Kind
          type: string
        title:
          title: Title
          type: string
      required:
        - id
        - channel_id
        - scope_kind
        - scope_entity_id
        - title
        - archived
        - created_at
        - last_message_at
      title: ThreadSummaryResponse
      type: object
    ToolInfo:
      properties:
        capability:
          anyOf:
            - type: string
            - type: 'null'
          title: Capability
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        server:
          title: Server
          type: string
      required:
        - id
        - name
        - server
      title: ToolInfo
      type: object
    TraceabilityCoverage:
      description: |-
        Percentages (0-100), spec section 33. `None` when the denominator is
        zero -- an empty set has no meaningful coverage ratio, not 0% or 100%.
      properties:
        critical_requirements_to_evidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Critical Requirements To Evidence
        needs_to_requirements:
          anyOf:
            - type: number
            - type: 'null'
          title: Needs To Requirements
        requirements_to_architecture:
          anyOf:
            - type: number
            - type: 'null'
          title: Requirements To Architecture
        requirements_to_verification:
          anyOf:
            - type: number
            - type: 'null'
          title: Requirements To Verification
        verification_to_evidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Verification To Evidence
      title: TraceabilityCoverage
      type: object
    TwinNodeListResponse:
      description: Paginated list of twin nodes.
      properties:
        nodes:
          items:
            $ref: '#/components/schemas/TwinNodeResponse'
          title: Nodes
          type: array
        total:
          title: Total
          type: integer
      required:
        - nodes
        - total
      title: TwinNodeListResponse
      type: object
    TwinNodeResponse:
      description: Single node in the Digital Twin graph, shaped for the dashboard.
      properties:
        assembly:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Assembly
        assemblyParts:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Assemblyparts
        dependsOn:
          anyOf:
            - items:
                $ref: '#/components/schemas/RecordPinResponse'
              type: array
            - type: 'null'
          title: Dependson
        domain:
          title: Domain
          type: string
        geometryParameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Geometryparameters
        hasScript:
          default: false
          title: Hasscript
          type: boolean
        id:
          title: Id
          type: string
        meshStats:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meshstats
        name:
          title: Name
          type: string
        poses:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  type: number
                type: object
              type: object
            - type: 'null'
          title: Poses
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        properties:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
          title: Properties
          type: object
        staleness:
          anyOf:
            - $ref: '#/components/schemas/RecordStalenessResponse'
            - type: 'null'
        status:
          title: Status
          type: string
        technicalDrawing:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Technicaldrawing
        type:
          title: Type
          type: string
        updatedAt:
          title: Updatedat
          type: string
      required:
        - id
        - name
        - type
        - domain
        - status
        - properties
        - updatedAt
      title: TwinNodeResponse
      type: object
    TwinNodeScriptResponse:
      description: The current generation script text for a CAD_MODEL node (MET-630).
      properties:
        git_commit_sha:
          anyOf:
            - type: string
            - type: 'null'
          title: Git Commit Sha
        git_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Git Path
        node_id:
          title: Node Id
          type: string
        script_node_id:
          title: Script Node Id
          type: string
        script_source:
          title: Script Source
          type: string
      required:
        - node_id
        - script_node_id
        - script_source
      title: TwinNodeScriptResponse
      type: object
    TwinRelationshipListResponse:
      description: List of edges for the Digital Twin graph.
      properties:
        relationships:
          items:
            $ref: '#/components/schemas/TwinRelationshipResponse'
          title: Relationships
          type: array
        total:
          title: Total
          type: integer
      required:
        - relationships
        - total
      title: TwinRelationshipListResponse
      type: object
    TwinRelationshipResponse:
      description: A single directed edge in the Digital Twin graph.
      properties:
        id:
          title: Id
          type: string
        label:
          title: Label
          type: string
        sourceId:
          title: Sourceid
          type: string
        targetId:
          title: Targetid
          type: string
        type:
          title: Type
          type: string
      required:
        - id
        - sourceId
        - targetId
        - type
        - label
      title: TwinRelationshipResponse
      type: object
    UpdateAssemblyJointsRequest:
      description: >-
        Body for ``PATCH /nodes/{node_id}/assembly-joints`` -- whole-list
        replace.
      properties:
        joints:
          items:
            $ref: '#/components/schemas/AssemblyJoint'
          title: Joints
          type: array
      required:
        - joints
      title: UpdateAssemblyJointsRequest
      type: object
    UpdateAssemblyJointsResponse:
      properties:
        assembly:
          additionalProperties: true
          title: Assembly
          type: object
        nodeId:
          title: Nodeid
          type: string
      required:
        - nodeId
        - assembly
      title: UpdateAssemblyJointsResponse
      type: object
    UpdateProjectRequest:
      description: Body for ``PATCH /v1/projects/{id}``. Only supplied fields change.
      properties:
        description:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          title: Description
        name:
          anyOf:
            - maxLength: 200
              minLength: 1
              type: string
            - type: 'null'
          title: Name
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      title: UpdateProjectRequest
      type: object
    UpdateThreadScopeRequest:
      description: >-
        Body for ``PATCH /api/v1/chat/threads/{id}/scope`` (MET-580).


        Rescopes an EXISTING thread in place, preserving its conversation —
        unlike

        ``CreateThreadRequest``, which always starts a fresh thread.
      properties:
        scope_entity_id:
          description: ID of the scoped entity
          title: Scope Entity Id
          type: string
        scope_kind:
          description: Scope type (session, approval, project, ...)
          title: Scope Kind
          type: string
      required:
        - scope_kind
        - scope_entity_id
      title: UpdateThreadScopeRequest
      type: object
    UrdfAssemblyExportRequest:
      properties:
        joints:
          items:
            $ref: '#/components/schemas/JointSpec'
          title: Joints
          type: array
        mesh_angular_tolerance:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            Max angle (radians) between adjacent facet normals. Omit for OCCT's
            default.
          title: Mesh Angular Tolerance
        mesh_format:
          default: stl
          enum:
            - stl
            - obj
          title: Mesh Format
          type: string
        mesh_tolerance:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            Max linear deviation (mm) between the tessellated mesh and the true
            CAD surface, applied to every part — smaller means more triangles on
            curves/fillets and less visible faceting. Omit to keep OCCT's
            default.
          title: Mesh Tolerance
        mesh_uri_prefix:
          default: ''
          title: Mesh Uri Prefix
          type: string
        parts:
          items:
            $ref: '#/components/schemas/PartRef'
          minItems: 1
          title: Parts
          type: array
        persist:
          default: true
          description: >-
            Commit this export as a robot_description Twin work product (default
            on). Set false to keep the pre-MET-740 throwaway-only behavior.
          title: Persist
          type: boolean
        persist_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Work-product display name (default: '<robot_name> robot
            description').
          title: Persist Name
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to link the persisted work product to.
          title: Project Id
        robot_name:
          default: robot
          title: Robot Name
          type: string
        update_node_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            An existing robot_description node's id — when given, this export
            replaces that node's content and records a new version instead of
            creating a new node.
          title: Update Node Id
        xacro:
          default: false
          title: Xacro
          type: boolean
      required:
        - parts
      title: UrdfAssemblyExportRequest
      type: object
    UrdfAssemblyExportResponse:
      properties:
        joint_names:
          items:
            type: string
          title: Joint Names
          type: array
        joints:
          default: []
          items:
            $ref: '#/components/schemas/EmittedJoint'
          title: Joints
          type: array
        link_names:
          items:
            type: string
          title: Link Names
          type: array
        mesh_files:
          items:
            $ref: '#/components/schemas/ExportFile'
          title: Mesh Files
          type: array
        output_file:
          $ref: '#/components/schemas/ExportFile'
        robot_description_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Robot Description Node Id
        robot_name:
          title: Robot Name
          type: string
      required:
        - output_file
        - mesh_files
        - robot_name
        - link_names
        - joint_names
      title: UrdfAssemblyExportResponse
      type: object
    UrdfExportRequest:
      properties:
        density_kg_m3:
          anyOf:
            - type: number
            - type: 'null'
          title: Density Kg M3
        link_name:
          default: base_link
          title: Link Name
          type: string
        material:
          anyOf:
            - type: string
            - type: 'null'
          title: Material
        mesh_format:
          default: stl
          enum:
            - stl
            - obj
          title: Mesh Format
          type: string
        mesh_uri_prefix:
          default: ''
          title: Mesh Uri Prefix
          type: string
        node_id:
          description: Twin work-product node id (STEP file).
          minLength: 1
          title: Node Id
          type: string
        xacro:
          default: false
          title: Xacro
          type: boolean
      required:
        - node_id
      title: UrdfExportRequest
      type: object
    UrdfExportResponse:
      properties:
        center_of_mass_m:
          additionalProperties:
            type: number
          title: Center Of Mass M
          type: object
        density_kg_m3:
          title: Density Kg M3
          type: number
        inertia_kgm2:
          additionalProperties:
            type: number
          title: Inertia Kgm2
          type: object
        link_name:
          title: Link Name
          type: string
        mass_kg:
          title: Mass Kg
          type: number
        mesh_file:
          $ref: '#/components/schemas/ExportFile'
        output_file:
          $ref: '#/components/schemas/ExportFile'
      required:
        - output_file
        - mesh_file
        - link_name
        - density_kg_m3
        - mass_kg
        - center_of_mass_m
        - inertia_kgm2
      title: UrdfExportResponse
      type: object
    UsdAssemblyExportRequest:
      properties:
        joints:
          items:
            $ref: '#/components/schemas/JointSpec'
          title: Joints
          type: array
        parts:
          items:
            $ref: '#/components/schemas/PartRef'
          minItems: 1
          title: Parts
          type: array
        persist:
          default: true
          description: >-
            Commit this export as a robot_description Twin work product (default
            on). Set false to keep the pre-MET-740 throwaway-only behavior.
          title: Persist
          type: boolean
        persist_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Work-product display name (default: '<robot_name> robot
            description').
          title: Persist Name
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project to link the persisted work product to.
          title: Project Id
        robot_name:
          default: robot
          title: Robot Name
          type: string
        update_node_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            An existing robot_description node's id — when given, this export
            replaces that node's content and records a new version instead of
            creating a new node.
          title: Update Node Id
      required:
        - parts
      title: UsdAssemblyExportRequest
      type: object
    UsdAssemblyExportResponse:
      properties:
        joint_names:
          items:
            type: string
          title: Joint Names
          type: array
        joints:
          default: []
          items:
            $ref: '#/components/schemas/EmittedJoint'
          title: Joints
          type: array
        link_names:
          items:
            type: string
          title: Link Names
          type: array
        mesh_files:
          items:
            $ref: '#/components/schemas/ExportFile'
          title: Mesh Files
          type: array
        output_file:
          $ref: '#/components/schemas/ExportFile'
        robot_description_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Robot Description Node Id
        robot_name:
          title: Robot Name
          type: string
      required:
        - output_file
        - mesh_files
        - robot_name
        - link_names
        - joint_names
      title: UsdAssemblyExportResponse
      type: object
    UsdExportRequest:
      properties:
        density_kg_m3:
          anyOf:
            - type: number
            - type: 'null'
          title: Density Kg M3
        material:
          anyOf:
            - type: string
            - type: 'null'
          title: Material
        node_id:
          description: Twin work-product node id (STEP file).
          minLength: 1
          title: Node Id
          type: string
        prim_name:
          default: model
          title: Prim Name
          type: string
      required:
        - node_id
      title: UsdExportRequest
      type: object
    UsdExportResponse:
      properties:
        center_of_mass_m:
          additionalProperties:
            type: number
          title: Center Of Mass M
          type: object
        density_kg_m3:
          title: Density Kg M3
          type: number
        inertia_kgm2:
          additionalProperties:
            type: number
          title: Inertia Kgm2
          type: object
        mass_kg:
          title: Mass Kg
          type: number
        mesh_file:
          $ref: '#/components/schemas/ExportFile'
        output_file:
          $ref: '#/components/schemas/ExportFile'
        prim_name:
          title: Prim Name
          type: string
        triangle_count:
          title: Triangle Count
          type: integer
      required:
        - output_file
        - mesh_file
        - prim_name
        - triangle_count
        - density_kg_m3
        - mass_kg
        - center_of_mass_m
        - inertia_kgm2
      title: UsdExportResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ValidationView:
      properties:
        valid:
          title: Valid
          type: boolean
        violations:
          items:
            type: string
          title: Violations
          type: array
      required:
        - valid
      title: ValidationView
      type: object
    WorkProductRevision:
      description: A single snapshot in a work product's revision history.
      properties:
        change_description:
          title: Change Description
          type: string
        content_hash:
          title: Content Hash
          type: string
        created_at:
          title: Created At
          type: string
        metadata_snapshot:
          additionalProperties: true
          title: Metadata Snapshot
          type: object
        revision:
          title: Revision
          type: integer
      required:
        - revision
        - created_at
        - content_hash
        - change_description
        - metadata_snapshot
      title: WorkProductRevision
      type: object
    WorkProductVersionHistory:
      description: Full version history for a work product.
      properties:
        revisions:
          items:
            $ref: '#/components/schemas/WorkProductRevision'
          title: Revisions
          type: array
        total:
          title: Total
          type: integer
        work_product_id:
          title: Work Product Id
          type: string
      required:
        - work_product_id
        - revisions
        - total
      title: WorkProductVersionHistory
      type: object
info:
  description: HTTP/WebSocket front door for the MetaForge platform
  title: MetaForge Gateway
  version: 0.1.0
openapi: 3.1.0
paths:
  /health:
    get:
      description: Return the aggregated health of the gateway and its dependencies.
      operationId: health_check_health_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
          description: Successful Response
      summary: Health Check
      tags:
        - health
  /v1/approvals:
    get:
      description: >-
        Every approval, normalized. ``status=decided`` and ``all`` are the audit
        views.
      operationId: list_approvals_v1_approvals_get
      parameters:
        - in: query
          name: status
          required: false
          schema:
            default: pending
            enum:
              - pending
              - decided
              - all
            title: Status
            type: string
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - in: query
          name: kind
          required: false
          schema:
            anyOf:
              - enum:
                  - gate
                  - flow_proposal
                  - flow_version
                  - flow_patch
                  - tool_call
                  - human_authority
                  - design_change
                  - design_loop
                  - sketch
                  - drawing
                type: string
              - type: 'null'
            title: Kind
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Approvals
      tags:
        - approvals
  /v1/approvals/{approval_id}:
    get:
      operationId: get_approval_v1_approvals__approval_id__get
      parameters:
        - in: path
          name: approval_id
          required: true
          schema:
            title: Approval Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalItem'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Approval
      tags:
        - approvals
  /v1/approvals/{approval_id}/decision:
    post:
      description: |-
        Decide an approval of any kind.

        The deciding human is the authenticated principal for every kind. A
        ``reviewer`` or ``approved_by`` in the body is ignored and logged.
      operationId: decide_approval_v1_approvals__approval_id__decision_post
      parameters:
        - in: path
          name: approval_id
          required: true
          schema:
            title: Approval Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalItem'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Decide Approval
      tags:
        - approvals
  /v1/approvals/{approval_id}/inline-decision:
    post:
      description: >-
        Record a gate decision a person gave in the MCP client's chat
        (FORGE-582).


        Gates only: a held tool call's inline answer has its own route

        (``/v1/tool-approvals/{id}/resolve``). The decision goes through the
        same

        ``service.decide`` as a dashboard click, so a gate that is not ready

        still cannot be approved, and retry and rework caps still apply.
      operationId: decide_inline_v1_approvals__approval_id__inline_decision_post
      parameters:
        - in: path
          name: approval_id
          required: true
          schema:
            title: Approval Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InlineDecisionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalItem'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Decide Inline
      tags:
        - approvals
  /v1/assistant/proposals:
    get:
      description: >-
        List pending design-change proposals, optionally filtered by
        session/project.
      operationId: list_proposals_v1_assistant_proposals_get
      parameters:
        - in: query
          name: session_id
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Session Id
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProposalListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Proposals
      tags:
        - assistant
    post:
      description: |-
        Create a design-change proposal directly from a human (MET-630).

        Same underlying ``ApprovalWorkflow.propose_change`` an agent's
        ``twin.propose_change`` MCP call uses — a human (e.g. via a dashboard
        parameter panel) can submit one just as well, and it goes through the
        identical review/apply pipeline (``decide`` → apply executor).
      operationId: create_proposal_v1_assistant_proposals_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProposalRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DesignChangeProposal'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Proposal
      tags:
        - assistant
  /v1/assistant/proposals/{change_id}:
    get:
      description: Return a single design-change proposal.
      operationId: get_proposal_v1_assistant_proposals__change_id__get
      parameters:
        - in: path
          name: change_id
          required: true
          schema:
            format: uuid
            title: Change Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DesignChangeProposal'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Proposal
      tags:
        - assistant
  /v1/assistant/proposals/{change_id}/decide:
    post:
      description: >-
        Approve or reject a pending design-change proposal.


        On approval, run the proposal's diff via the apply executor (if wired)
        so the

        change is actually applied to the twin (HITL: propose → approve →
        apply).
      operationId: decide_proposal_v1_assistant_proposals__change_id__decide_post
      parameters:
        - in: path
          name: change_id
          required: true
          schema:
            format: uuid
            title: Change Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalDecision'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DesignChangeProposal'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Decide Proposal
      tags:
        - assistant
  /v1/assistant/request:
    post:
      description: |-
        Submit a request to an agent via the orchestrator.

        Looks up the workflow definition for ``body.action``, creates a
        WorkflowRun, and dispatches it through the Scheduler.
      operationId: submit_request_v1_assistant_request_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Submit Request
      tags:
        - assistant
  /v1/assistant/request/{run_id}:
    get:
      description: Poll the status of a workflow run.
      operationId: get_run_status_v1_assistant_request__run_id__get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunStatusResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Run Status
      tags:
        - assistant
  /v1/assistant/sessions/{session_id}/events:
    get:
      description: SSE endpoint — streams real-time events for *session_id*.
      operationId: session_events_v1_assistant_sessions__session_id__events_get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            format: uuid
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Session Events
      tags:
        - assistant
  /v1/bom:
    get:
      description: >-
        List BOM components, optionally scoped to a project and/or filtered

        by ``category`` (case-insensitive exact match against

        ``BOMItem.specifications.category``, e.g. ``category=fastener`` for a

        fastener list -- FORGE-294, gap G-H2).


        Empty (``{components: [], total: 0}``) when the project has no BOM — not
        a

        404, so the dashboard renders a clean empty state.
      operationId: list_bom_v1_bom_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - in: query
          name: category
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Category
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BomListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Bom
      tags:
        - bom
  /v1/bom/hierarchical:
    get:
      description: |-
        Derive the hierarchical BOM (EBOM) -- FORGE-267, gap G-C3 -- from
        every "product"-kind HierarchyNode's CONTAINS tree in a project.

        Empty (not an error) when the project has no product hierarchy yet
        (FORGE-260's tools haven't been used for it) -- matches the flat BOM's
        own convention.
      operationId: list_hierarchical_bom_v1_bom_hierarchical_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HierarchicalBomResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Hierarchical Bom
      tags:
        - bom
  /v1/bom/risk:
    get:
      operationId: get_bom_risk_v1_bom_risk_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Bom Risk V1 Bom Risk Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Bom Risk
      tags:
        - bom
  /v1/bringup:
    get:
      operationId: list_bringup_checklists_v1_bringup_get
      parameters:
        - in: query
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BringupChecklistListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Bringup Checklists
      tags:
        - bringup
    post:
      operationId: create_bringup_checklist_v1_bringup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBringupChecklistRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBringupChecklistResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Bringup Checklist
      tags:
        - bringup
  /v1/cad-export/download/{export_id}/{filename}:
    get:
      operationId: download_export_file_v1_cad_export_download__export_id___filename__get
      parameters:
        - in: path
          name: export_id
          required: true
          schema:
            title: Export Id
            type: string
        - in: path
          name: filename
          required: true
          schema:
            title: Filename
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Download Export File
      tags:
        - cad-export
  /v1/cad-export/ros2-launch:
    post:
      operationId: generate_ros2_launch_v1_cad_export_ros2_launch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Ros2LaunchRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ros2LaunchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Generate Ros2 Launch
      tags:
        - cad-export
  /v1/cad-export/sdf:
    post:
      operationId: export_sdf_v1_cad_export_sdf_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SdfExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdfExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Sdf
      tags:
        - cad-export
  /v1/cad-export/sdf-assembly:
    post:
      operationId: export_sdf_assembly_v1_cad_export_sdf_assembly_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SdfAssemblyExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdfAssemblyExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Sdf Assembly
      tags:
        - cad-export
  /v1/cad-export/sessions/{session_id}:
    get:
      operationId: get_session_summary_v1_cad_export_sessions__session_id__get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Session Summary
      tags:
        - cad-export
  /v1/cad-export/sessions/{session_id}/joints:
    get:
      operationId: get_session_joints_v1_cad_export_sessions__session_id__joints_get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionJointsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Session Joints
      tags:
        - cad-export
  /v1/cad-export/urdf:
    post:
      operationId: export_urdf_v1_cad_export_urdf_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UrdfExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrdfExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Urdf
      tags:
        - cad-export
  /v1/cad-export/urdf-assembly:
    post:
      operationId: export_urdf_assembly_v1_cad_export_urdf_assembly_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UrdfAssemblyExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrdfAssemblyExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Urdf Assembly
      tags:
        - cad-export
  /v1/cad-export/usd:
    post:
      operationId: export_usd_v1_cad_export_usd_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsdExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsdExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Usd
      tags:
        - cad-export
  /v1/cad-export/usd-assembly:
    post:
      operationId: export_usd_assembly_v1_cad_export_usd_assembly_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsdAssemblyExportRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsdAssemblyExportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Usd Assembly
      tags:
        - cad-export
  /v1/cad/assembly:
    post:
      description: Author + commit a multi-part assembly from a declarative spec.
      operationId: create_assembly_v1_cad_assembly_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssemblyRequest-Input'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssemblyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Assembly
      tags:
        - cad
  /v1/cad/compile:
    post:
      description: >-
        Compile a description into a spec and check it — but do NOT build (dry
        run).


        Returns the spec for review plus any geometric-feasibility warnings, so
        the

        caller can tweak it (or save it and run ``/assembly``) before
        committing.
      operationId: compile_assembly_v1_cad_compile_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompileRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompileResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Compile Assembly
      tags:
        - cad
  /v1/cad/from-text:
    post:
      description: >-
        Compile a plain-English description into a spec (LLM), then build it.


        The LLM only produces the small declarative spec — the geometry itself
        is

        authored deterministically by the same builder as ``/assembly``, so the

        output is reproducible and the spec is returned for review.
      operationId: create_assembly_from_text_v1_cad_from_text_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FromTextRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FromTextResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Assembly From Text
      tags:
        - cad
  /v1/chat/channels:
    get:
      description: Return all available chat channels.
      operationId: list_channels_v1_chat_channels_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelListResponse'
          description: Successful Response
      summary: List Channels
      tags:
        - chat
  /v1/chat/threads:
    get:
      description: List threads with optional filtering and pagination.
      operationId: list_threads_v1_chat_threads_get
      parameters:
        - description: Filter by channel ID
          in: query
          name: channel_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by channel ID
            title: Channel Id
        - description: Filter by scope kind
          in: query
          name: scope_kind
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by scope kind
            title: Scope Kind
        - description: Filter by scope entity ID
          in: query
          name: entity_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by scope entity ID
            title: Entity Id
        - description: Include archived threads
          in: query
          name: include_archived
          required: false
          schema:
            default: false
            description: Include archived threads
            title: Include Archived
            type: boolean
        - description: Page number (1-indexed)
          in: query
          name: page
          required: false
          schema:
            default: 1
            description: Page number (1-indexed)
            minimum: 1
            title: Page
            type: integer
        - description: Results per page
          in: query
          name: per_page
          required: false
          schema:
            default: 20
            description: Results per page
            maximum: 100
            minimum: 1
            title: Per Page
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Threads
      tags:
        - chat
    post:
      description: Create a new thread, optionally with an initial message.
      operationId: create_thread_v1_chat_threads_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateThreadRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Thread
      tags:
        - chat
  /v1/chat/threads/{thread_id}:
    get:
      description: Return a single thread with all its messages.
      operationId: get_thread_v1_chat_threads__thread_id__get
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            title: Thread Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Thread
      tags:
        - chat
  /v1/chat/threads/{thread_id}/messages:
    post:
      description: |-
        Append a message to an existing thread.

        After persisting the user message, the handler routes it to the
        appropriate domain agent (when an LLM is configured).  The agent's
        response is inserted into the thread automatically.
      operationId: send_message_v1_chat_threads__thread_id__messages_post
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            title: Thread Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Send Message
      tags:
        - chat
  /v1/chat/threads/{thread_id}/scope:
    patch:
      description: >-
        Rescope an EXISTING thread in place (MET-580).


        Unlike ``POST /threads``, this preserves the conversation — the same

        thread continues, and its next turn's project brief (if scoped to a

        project) reflects the new scope. The agent-callable
        ``chat.set_project_scope``

        native tool goes through the same ``apply_thread_scope`` helper, so a
        human

        hitting this endpoint and the agent switching scope mid-turn behave

        identically and both broadcast the same ``scope.changed`` SSE event.
      operationId: update_thread_scope_v1_chat_threads__thread_id__scope_patch
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            title: Thread Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateThreadScopeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Thread Scope
      tags:
        - chat
  /v1/chat/threads/{thread_id}/stream:
    get:
      description: >-
        Stream real-time events for a chat thread via Server-Sent Events.


        The client receives events as they occur:


        - ``message.created`` -- a new message was added

        - ``agent.typing``    -- an agent is processing

        - ``context.stats``   -- the turn's context-window snapshot: tokens used
        vs.
          the model's window, broken down by system prompt / project brief / history /
          tool schemas / message, with included-vs-available counts (harness turns)
        - ``agent.step``      -- one reasoning/tool-call step in the agent's
        trace

        - ``message.delta``   -- one token/chunk of the streaming answer

        - ``agent.done``      -- an agent finished

        - ``error``           -- an error occurred


        The connection stays open until the client disconnects or the server

        closes the stream.
      operationId: stream_thread_events_v1_chat_threads__thread_id__stream_get
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            title: Thread Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Stream Thread Events
      tags:
        - chat
  /v1/chat/tool_approvals:
    get:
      description: >-
        Tool-call approvals: the ones awaiting a decision, or every one.


        Overdue holds are expired first, so nothing listed as pending is a call

        whose waiter has already given up (FORGE-466). ``status=all`` is the
        audit

        view (FORGE-473): every entry whichever route answered it, each carrying

        its ``route``, outcome and approver.


        ``project_id`` scopes the queue. Unscoped before, so a reviewer working

        on one project saw every project's held writes in one list -- and a held

        write names a tool and a caller, not a product, so there was no way to

        tell from the row which one it belonged to. Approvals whose tool call

        carried no project are counted rather than dropped: an approval that

        quietly disappears is the one nobody answers.
      operationId: list_pending_approvals_v1_chat_tool_approvals_get
      parameters:
        - in: query
          name: status
          required: false
          schema:
            default: pending
            enum:
              - pending
              - all
            title: Status
            type: string
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Pending Approvals
      tags:
        - chat-tool-approvals
    post:
      description: |-
        Create a held approval and return it.

        This exists because the approval store is process-level (an
        ``InMemoryRunStore`` in *this* process), and the MCP sidecar is a
        different process. Before FORGE-406 a sidecar could only hold calls in
        its own memory, where the dashboard — served from here — would never see
        them. So the sidecar parks them here instead, and there is exactly one
        ledger rather than one per process.

        A second store would have been the more obvious fix and the wrong one:
        two queues means a reviewer clearing one while the other fills, and no
        page that shows both.
      operationId: hold_tool_call_v1_chat_tool_approvals_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldToolCallRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Hold Tool Call
      tags:
        - chat-tool-approvals
  /v1/chat/tool_approvals/{run_id}:
    get:
      operationId: get_approval_v1_chat_tool_approvals__run_id__get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Approval
      tags:
        - chat-tool-approvals
    post:
      description: |-
        Record the decision, attributed to whoever made this request.

        The identity comes from the request, not the body (FORGE-393). A client
        cannot nominate the approver, which is the whole point: some tools write
        the approver's name down as their result.
      operationId: submit_tool_approval_v1_chat_tool_approvals__run_id__post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Submit Tool Approval
      tags:
        - chat-tool-approvals
  /v1/chat/tool_approvals/{run_id}/resolve:
    post:
      description: >-
        The waiting side stopped waiting: close the hold so nobody answers it.


        Idempotent. A hold already ``timed_out`` or ``canceled`` comes back as
        it

        is with 200, so a retry after a lost response is harmless. A hold a
        human

        already decided is 409: the waiter must read the decision back rather

        than overwrite it, because an approval that landed in the last instant
        is

        still an approval.
      operationId: resolve_unanswered_hold_v1_chat_tool_approvals__run_id__resolve_post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveHoldRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Resolve Unanswered Hold
      tags:
        - chat-tool-approvals
  /v1/client-tasks:
    get:
      description: Tasks, open ones by default. ``status=all`` lists every state.
      operationId: list_tasks_v1_client_tasks_get
      parameters:
        - in: query
          name: status
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: open
            title: Status
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - in: query
          name: run_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Run Id
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Tasks V1 Client Tasks Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Tasks
      tags:
        - client-tasks
    post:
      description: Post a phase for the client. Idempotent on ``run:phase:attempt``.
      operationId: open_task_v1_client_tasks_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenTaskRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Open Task V1 Client Tasks Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Open Task
      tags:
        - client-tasks
  /v1/client-tasks/{task_id}:
    get:
      operationId: get_task_v1_client_tasks__task_id__get
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            title: Task Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Task V1 Client Tasks  Task Id  Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Task
      tags:
        - client-tasks
  /v1/client-tasks/{task_id}/cancel:
    post:
      description: >-
        Withdraw a task nobody will wait on any more (the worker's activity
        ended).
      operationId: cancel_task_v1_client_tasks__task_id__cancel_post
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            title: Task Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Cancel Task V1 Client Tasks  Task Id  Cancel Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Cancel Task
      tags:
        - client-tasks
  /v1/client-tasks/{task_id}/claim:
    post:
      description: Take a task and get its full brief.
      operationId: claim_task_v1_client_tasks__task_id__claim_post
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            title: Task Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Claim Task V1 Client Tasks  Task Id  Claim Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Claim Task
      tags:
        - client-tasks
  /v1/client-tasks/{task_id}/submit:
    post:
      description: Hand the phase back. The run's gate then checks the twin as usual.
      operationId: submit_task_v1_client_tasks__task_id__submit_post
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            title: Task Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Submit Task V1 Client Tasks  Task Id  Submit Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Submit Task
      tags:
        - client-tasks
  /v1/compliance/{project_id}/checklist:
    get:
      description: |-
        Generate a compliance checklist for the given project and markets.

        Markets are provided as a comma-separated query parameter, e.g.
        ``?markets=UKCA,CE,FCC``.
      operationId: get_checklist_v1_compliance__project_id__checklist_get
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
        - description: Comma-separated regime codes
          in: query
          name: markets
          required: false
          schema:
            default: UKCA,CE
            description: Comma-separated regime codes
            title: Markets
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecklistResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Checklist
      tags:
        - compliance
  /v1/compliance/{project_id}/coverage:
    get:
      description: Get evidence coverage statistics for a project.
      operationId: get_coverage_v1_compliance__project_id__coverage_get
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoverageResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Coverage
      tags:
        - compliance
  /v1/compliance/{project_id}/evidence:
    post:
      description: Link a piece of evidence to a compliance checklist item.
      operationId: link_evidence_v1_compliance__project_id__evidence_post
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkEvidenceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvidenceResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Link Evidence
      tags:
        - compliance
  /v1/compliance/{project_id}/evidence/{item_id}:
    get:
      description: Retrieve all evidence records for a checklist item.
      operationId: get_evidence_v1_compliance__project_id__evidence__item_id__get
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
        - in: path
          name: item_id
          required: true
          schema:
            title: Item Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EvidenceResponse'
                title: >-
                  Response Get Evidence V1 Compliance  Project Id  Evidence 
                  Item Id  Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Evidence
      tags:
        - compliance
  /v1/component-selection/select:
    post:
      operationId: select_component_v1_component_selection_select_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectComponentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Select Component V1 Component Selection Select Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Select Component
      tags:
        - component-selection
  /v1/constraint/synthesize:
    post:
      description: >-
        Turn a drag delta into a parametric constraint, and — when the dragged

        group maps to a live FreeCAD session object (``session_id`` +
        ``obj_id``) —

        **bind it into the model** so Apply re-parameterizes and re-solves
        (MET-531).


        Without a session/object it stays a suggestion-only stub (MET-519).
        Binding

        is best-effort: an adapter error leaves the suggestion intact with

        ``bound=False`` and a ``binding_error``.
      operationId: synthesize_constraint_v1_constraint_synthesize_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SynthesizeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SynthesizeResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Synthesize Constraint
      tags:
        - constraint
  /v1/controls/repeatability-estimate:
    get:
      operationId: get_repeatability_estimate_v1_controls_repeatability_estimate_get
      parameters:
        - in: query
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
        - in: query
          name: requirement_mm
          required: false
          schema:
            default: 0.5
            title: Requirement Mm
            type: number
        - in: query
          name: end_effector_part
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: End Effector Part
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepeatabilityEstimateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Repeatability Estimate
      tags:
        - controls
  /v1/convert:
    post:
      description: >-
        Upload a STEP/IGES file and convert to GLB.


        Returns the conversion result with a URL to the GLB file and metadata.

        Results are cached by content hash — re-uploading the same file is
        instant.
      operationId: upload_and_convert_v1_convert_post
      parameters:
        - in: query
          name: quality
          required: false
          schema:
            default: standard
            pattern: ^(preview|standard|fine)$
            title: Quality
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_and_convert_v1_convert_post'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionResult'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Upload And Convert
      tags:
        - convert
  /v1/convert/{file_hash}:
    get:
      description: Retrieve a cached conversion result by content hash.
      operationId: get_conversion_v1_convert__file_hash__get
      parameters:
        - in: path
          name: file_hash
          required: true
          schema:
            title: File Hash
            type: string
        - in: query
          name: quality
          required: false
          schema:
            default: standard
            pattern: ^(preview|standard|fine)$
            title: Quality
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionResult'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Conversion
      tags:
        - convert
  /v1/convert/{file_hash}/glb:
    get:
      description: Download the converted GLB file.
      operationId: get_glb_v1_convert__file_hash__glb_get
      parameters:
        - in: path
          name: file_hash
          required: true
          schema:
            title: File Hash
            type: string
        - in: query
          name: quality
          required: false
          schema:
            default: standard
            pattern: ^(preview|standard|fine)$
            title: Quality
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Glb
      tags:
        - convert
  /v1/convert/{file_hash}/metadata:
    get:
      description: Retrieve conversion metadata (part tree, stats, materials).
      operationId: get_metadata_v1_convert__file_hash__metadata_get
      parameters:
        - in: path
          name: file_hash
          required: true
          schema:
            title: File Hash
            type: string
        - in: query
          name: quality
          required: false
          schema:
            default: standard
            pattern: ^(preview|standard|fine)$
            title: Quality
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Metadata V1 Convert  File Hash  Metadata Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Metadata
      tags:
        - convert
  /v1/decisions:
    get:
      operationId: list_related_decisions_v1_decisions_get
      parameters:
        - in: query
          name: related_to
          required: true
          schema:
            title: Related To
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Related Decisions V1 Decisions Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Related Decisions
      tags:
        - decisions
  /v1/design-flows:
    get:
      description: Every launchable flow, as the gateway will actually run it.
      operationId: list_design_flows_v1_design_flows_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DesignFlowListResponse'
          description: Successful Response
      summary: List Design Flows
      tags:
        - design-flows
  /v1/design-flows/intent:
    post:
      description: >-
        Compile an intent into its structured model. Stores nothing, starts
        nothing.


        Deterministic: no model call, and no value the person did not state. Use

        it before proposing to see what was understood and what is still
        unknown.
      operationId: compile_flow_intent_v1_design_flows_intent_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProposeFlowRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentModelView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Compile Flow Intent
      tags:
        - design-flows
  /v1/design-flows/propose:
    post:
      description: >-
        Tailor a template to a project's intent, and hold it for a human.


        The response carries an ``approvalId``, not a run. FORGE-398's rule is

        that nothing starts before approval, and the way to make that true is
        for

        the endpoint that generates a flow to have no ability to start one.


        If the manufacturing route, target maturity or loads are missing, the

        answer is ``200`` with ``status: "needs_input"`` and the questions to

        answer -- no flow, no stored version, no held approval (FORGE-463). A

        generator that guesses those produces a flow that reads as tailored and

        is not.
      operationId: propose_flow_v1_design_flows_propose_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProposeFlowRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowNeedsInputView'
          description: Inputs missing; nothing held
        '201':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/FlowProposalView'
                  - $ref: '#/components/schemas/FlowNeedsInputView'
                title: Response Propose Flow V1 Design Flows Propose Post
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Propose Flow
      tags:
        - design-flows
  /v1/design-flows/validate:
    post:
      description: >-
        Check an edit without saving it.


        The editor calls this as the canvas changes, so a person sees a rule
        break

        while they are looking at the thing that broke it -- rather than at
        save,

        by which point they have made five more changes and have to work out
        which

        one the message is about.
      operationId: validate_edited_flow_v1_design_flows_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditFlowRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Validate Edited Flow
      tags:
        - design-flows
  /v1/design-flows/versions:
    post:
      description: >-
        Save an edit as a new version, held for approval.


        Never mutates an existing version. A run pins the version it started on,

        so a version changing underneath would make a completed run's provenance

        a lie -- and an approval that can be edited afterwards is not an
        approval.
      operationId: save_edited_flow_v1_design_flows_versions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditFlowRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Save Edited Flow
      tags:
        - design-flows
  /v1/design-flows/versions/{version_id}:
    get:
      operationId: get_flow_version_v1_design_flows_versions__version_id__get
      parameters:
        - in: path
          name: version_id
          required: true
          schema:
            title: Version Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Flow Version
      tags:
        - design-flows
  /v1/design-flows/versions/{version_id}/capabilities:
    get:
      description: The same assessment for a saved (tailored or edited) flow version.
      operationId: >-
        version_capabilities_v1_design_flows_versions__version_id__capabilities_get
      parameters:
        - in: path
          name: version_id
          required: true
          schema:
            title: Version Id
            type: string
        - in: query
          name: profile
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Profile
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapabilityView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Version Capabilities
      tags:
        - design-flows
  /v1/design-flows/{flow_id}:
    get:
      description: One flow, for the run detail view and the plan canvas.
      operationId: get_design_flow_v1_design_flows__flow_id__get
      parameters:
        - in: path
          name: flow_id
          required: true
          schema:
            title: Flow Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DesignFlowView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Design Flow
      tags:
        - design-flows
  /v1/design-flows/{flow_id}/capabilities:
    get:
      description: |-
        Can this template be run with the tools that exist and answer right now?

        ``profile`` narrows coverage to the tools a client connected with that
        MCP profile is served.
      operationId: flow_capabilities_v1_design_flows__flow_id__capabilities_get
      parameters:
        - in: path
          name: flow_id
          required: true
          schema:
            title: Flow Id
            type: string
        - in: query
          name: profile
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Profile
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapabilityView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Flow Capabilities
      tags:
        - design-flows
  /v1/design-loop/start:
    post:
      operationId: start_design_loop_v1_design_loop_start_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartDesignLoopRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Start Design Loop V1 Design Loop Start Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Start Design Loop
      tags:
        - design-loop
  /v1/design-loop/{loop_id}:
    get:
      operationId: get_design_loop_v1_design_loop__loop_id__get
      parameters:
        - in: path
          name: loop_id
          required: true
          schema:
            title: Loop Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Design Loop V1 Design Loop  Loop Id  Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Design Loop
      tags:
        - design-loop
  /v1/design-loop/{loop_id}/approve:
    post:
      operationId: approve_design_loop_v1_design_loop__loop_id__approve_post
      parameters:
        - in: path
          name: loop_id
          required: true
          schema:
            title: Loop Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveDesignLoopRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: >-
                  Response Approve Design Loop V1 Design Loop  Loop Id  Approve
                  Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Approve Design Loop
      tags:
        - design-loop
  /v1/dfm/overhang-check:
    post:
      operationId: run_overhang_check_v1_dfm_overhang_check_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverhangCheckRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OverhangCheckResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Run Overhang Check
      tags:
        - dfm
  /v1/evals:
    get:
      operationId: get_evals_v1_evals_get
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Evals V1 Evals Get
                type: object
          description: Successful Response
      summary: Get Evals
      tags:
        - evals
  /v1/features/generate:
    post:
      operationId: generate_feature_v1_features_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateFeatureRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Generate Feature V1 Features Generate Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Generate Feature
      tags:
        - features
  /v1/features/{work_product_id}/diff:
    get:
      operationId: get_feature_diff_v1_features__work_product_id__diff_get
      parameters:
        - in: path
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureDiffResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Feature Diff
      tags:
        - features
  /v1/firmware/scaffold:
    post:
      operationId: create_firmware_scaffold_v1_firmware_scaffold_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFirmwareScaffoldRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFirmwareScaffoldResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Firmware Scaffold
      tags:
        - firmware
  /v1/harness/credentials:
    post:
      description: >-
        Store a provider credential so the runtime uses it (no restart).


        ``api_key`` → the gateway auth store; ``oauth`` → the Codex
        ``auth.json`` the

        codex adapter reads. Validates the provider against the registry.
      operationId: set_credential_v1_harness_credentials_post
      parameters:
        - in: header
          name: x-metaforge-admin
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Metaforge-Admin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCredentialRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Set Credential
      tags:
        - harness
  /v1/harness/credentials/{provider}:
    delete:
      description: >-
        Forget a provider's stored API key (and clear the selection if it
        pointed there).
      operationId: delete_credential_v1_harness_credentials__provider__delete
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            title: Provider
            type: string
        - in: header
          name: x-metaforge-admin
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Metaforge-Admin
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Credential
      tags:
        - harness
  /v1/harness/models:
    get:
      description: >-
        Models for a provider. OpenAI-compatible + configured → live-fetched;
        else empty.
      operationId: list_models_v1_harness_models_get
      parameters:
        - description: Provider id
          in: query
          name: provider
          required: true
          schema:
            description: Provider id
            title: Provider
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Models
      tags:
        - harness
  /v1/harness/providers:
    get:
      description: >-
        List registered providers (configured ones first) + the active
        selection.
      operationId: list_providers_v1_harness_providers_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvidersResponse'
          description: Successful Response
      summary: List Providers
      tags:
        - harness
  /v1/harness/routing:
    get:
      description: |-
        Which provider and model each role is routed to.

        A role absent from ``roles`` is served by the durable harness selection
        (``default_provider`` / ``default_model``).
      operationId: get_routing_v1_harness_routing_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoutingResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Routing
      tags:
        - harness
  /v1/harness/selection:
    put:
      description: >-
        Set the durable active provider/model (overrides the METAFORGE_LLM_*
        env).
      operationId: set_selection_v1_harness_selection_put
      parameters:
        - in: header
          name: x-metaforge-admin
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Metaforge-Admin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSelectionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Set Selection
      tags:
        - harness
  /v1/harness/tools:
    get:
      description: >-
        MCP tools/connectors reachable via the gateway's bridge (empty if none
        wired).
      operationId: list_tools_v1_harness_tools_get
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ToolInfo'
                title: Response List Tools V1 Harness Tools Get
                type: array
          description: Successful Response
      summary: List Tools
      tags:
        - harness
  /v1/knowledge/documents:
    post:
      description: >-
        Ingest a document (markdown / plain text) via the L1
        ``KnowledgeService``.


        Backs the ``forge ingest <path>`` CLI (MET-336). Heading-aware

        chunking, dedup, and citation metadata are handled by the

        underlying provider — the route is a thin pass-through.
      operationId: ingest_document_v1_knowledge_documents_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestDocumentRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestDocumentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Ingest Document
      tags:
        - knowledge
  /v1/knowledge/ingest:
    post:
      description: |-
        Manually ingest a knowledge entry.

        Routes through ``KnowledgeService`` when available so the chunk
        pipeline, dedup, and citation-field round-trip apply consistently
        with ``/documents`` and ``/search`` (MET-390).
      operationId: ingest_knowledge_v1_knowledge_ingest_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Ingest Knowledge
      tags:
        - knowledge
  /v1/knowledge/search:
    get:
      description: |-
        Semantic search over indexed knowledge.

        Routes through ``KnowledgeService`` when available so it shares
        the same backend as ``/ingest`` and ``/documents`` (MET-390).

        ``project_id`` (MET-670) mirrors the ``projectId`` filter already
        on ``/sources`` and ``/ingest``: without it, ``KnowledgeService.search``
        falls back to the ``default`` tenant, so a project-scoped ingest was
        never searchable from a project-scoped UI — the search box silently
        returned whatever unrelated content happened to live under
        ``default`` instead of the active project's own sources.
      operationId: search_knowledge_v1_knowledge_search_get
      parameters:
        - description: Search query
          in: query
          name: query
          required: true
          schema:
            description: Search query
            minLength: 1
            title: Query
            type: string
        - description: Filter by knowledge type
          in: query
          name: knowledgeType
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/KnowledgeType'
              - type: 'null'
            description: Filter by knowledge type
            title: Knowledgetype
        - description: Scope search to a project UUID
          in: query
          name: projectId
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            description: Scope search to a project UUID
            title: Projectid
        - description: Max results
          in: query
          name: limit
          required: false
          schema:
            default: 5
            description: Max results
            maximum: 50
            minimum: 1
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Search Knowledge
      tags:
        - knowledge
  /v1/knowledge/sources:
    get:
      description: |-
        List ingested knowledge sources via ``KnowledgeService.list_sources()``.

        Backs the ``forge sources list`` CLI (MET-411). Mirrors the schema
        surfaced by the ``metaforge://knowledge/sources`` MCP resource.
      operationId: list_knowledge_sources_v1_knowledge_sources_get
      parameters:
        - description: Filter by knowledge type
          in: query
          name: knowledgeType
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/KnowledgeType'
              - type: 'null'
            description: Filter by knowledge type
            title: Knowledgetype
        - description: Filter by project UUID
          in: query
          name: projectId
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            description: Filter by project UUID
            title: Projectid
        - description: Max sources to return
          in: query
          name: limit
          required: false
          schema:
            default: 100
            description: Max sources to return
            maximum: 1000
            minimum: 1
            title: Limit
            type: integer
        - description: Pagination offset
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: Pagination offset
            minimum: 0
            title: Offset
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Knowledge Sources
      tags:
        - knowledge
  /v1/knowledge/sources/{source_path}:
    delete:
      description: >-
        Delete every chunk for a source via
        ``KnowledgeService.delete_by_source()``.


        Backs the ``forge sources delete`` CLI (MET-411). Returns the

        chunk count the backend removed; ``0`` when the source was already

        absent — callers treat that as a no-op rather than an error.
      operationId: delete_knowledge_source_v1_knowledge_sources__source_path__delete
      parameters:
        - in: path
          name: source_path
          required: true
          schema:
            title: Source Path
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceDeleteResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Knowledge Source
      tags:
        - knowledge
    get:
      description: |-
        Per-source detail — looks up by exact ``source_path`` match.

        No dedicated single-source accessor exists in the ``KnowledgeService``
        contract, so we list and find — fine for CLI usage where the user
        has already picked a known path. Returns 404 when the source isn't
        registered.
      operationId: get_knowledge_source_v1_knowledge_sources__source_path__get
      parameters:
        - in: path
          name: source_path
          required: true
          schema:
            title: Source Path
            type: string
        - description: Filter by project UUID
          in: query
          name: projectId
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            description: Filter by project UUID
            title: Projectid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceDetailResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Knowledge Source
      tags:
        - knowledge
  /v1/knowledge/{entry_id}:
    get:
      description: Retrieve a single knowledge entry by ID.
      operationId: get_knowledge_entry_v1_knowledge__entry_id__get
      parameters:
        - in: path
          name: entry_id
          required: true
          schema:
            format: uuid
            title: Entry Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeEntryResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Knowledge Entry
      tags:
        - knowledge
  /v1/manufacture/release:
    get:
      operationId: release_for_manufacture_v1_manufacture_release_get
      parameters:
        - in: query
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
        - description: '''3d_print'' (-> STL) or ''cnc'' (-> STEP)'
          in: query
          name: process
          required: true
          schema:
            description: '''3d_print'' (-> STL) or ''cnc'' (-> STEP)'
            title: Process
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManufactureReleaseResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Release For Manufacture
      tags:
        - manufacture
  /v1/memory/components/{name}:
    get:
      description: |-
        Component usage / relationship knowledge for ``name`` (MET-471).

        Wraps ``MemoryClient.get_component_context``: a typed convenience
        over the L1 knowledge base keyed off ``KnowledgeType.COMPONENT``.
        Empty / whitespace ``name`` returns 422 — that's a client bug, not
        a backend gap.
      operationId: get_component_context_v1_memory_components__name__get
      parameters:
        - in: path
          name: name
          required: true
          schema:
            title: Name
            type: string
        - in: query
          name: limit
          required: false
          schema:
            default: 5
            maximum: 50
            minimum: 1
            title: Limit
            type: integer
        - in: query
          name: projectId
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Projectid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemorySearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Component Context
      tags:
        - memory
  /v1/memory/consolidate:
    post:
      description: |-
        Trigger one consolidation pass synchronously.

        Defaults to ``on_demand`` mode (manual triage with the importance
        floor relaxed). Pass ``mode=background`` to run the standard pass
        or ``mode=janitor`` to re-validate previously-stored insights
        without synthesizing new ones.
      operationId: trigger_consolidation_v1_memory_consolidate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsolidationTriggerRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsolidationTriggerResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Trigger Consolidation
      tags:
        - memory
  /v1/memory/insights:
    get:
      description: |-
        List consolidated insights, newest first.

        Excludes ``STALE_WARN`` insights by default — agents should act on
        fresh lessons. Pass ``includeStale=true`` for an audit / review view
        that includes faded insights. Optional ``theme`` narrows to one
        consolidation theme.
      operationId: list_insights_v1_memory_insights_get
      parameters:
        - in: query
          name: theme
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ConsolidationTheme'
              - type: 'null'
            title: Theme
        - in: query
          name: includeStale
          required: false
          schema:
            default: false
            title: Includestale
            type: boolean
        - in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 500
            minimum: 1
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Insights
      tags:
        - memory
  /v1/memory/retrieve:
    post:
      description: |-
        Return experiences most similar to the supplied goal.

        Body shape matches ``MemoryRetrieveRequest``. The response carries
        ``hits`` sorted by descending similarity, plus the echoed ``query``
        and ``total_found`` so callers can paginate without re-derivation.
      operationId: retrieve_similar_experience_v1_memory_retrieve_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryRetrieveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryRetrieveResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Retrieve Similar Experience
      tags:
        - memory
  /v1/memory/search:
    post:
      description: |-
        Semantic search over design-decision knowledge (MET-471).

        Wraps ``MemoryClient.search_design_rationale``: a typed convenience
        over the L1 knowledge base that asks "why was X decided?" and
        returns ranked hits keyed off ``KnowledgeType.DESIGN_DECISION``.
        Requires the gateway to have wired a knowledge_service on
        ``app.state.knowledge_service``; the 503 from ``_get_client``
        covers the case where the service hasn't initialised.
      operationId: search_design_rationale_v1_memory_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemorySearchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemorySearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Search Design Rationale
      tags:
        - memory
  /v1/projects:
    get:
      description: List all hardware projects.
      operationId: list_projects_v1_projects_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectListResponse'
          description: Successful Response
      summary: List Projects
      tags:
        - projects
    post:
      description: Create a new hardware project (starts with no work products).
      operationId: create_project_v1_projects_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Project
      tags:
        - projects
  /v1/projects/{project_id}:
    delete:
      description: Delete a project by ID.
      operationId: delete_project_v1_projects__project_id__delete
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Project
      tags:
        - projects
    get:
      description: Get a single project by ID.
      operationId: get_project_v1_projects__project_id__get
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Project
      tags:
        - projects
    patch:
      description: Rename, redescribe, or change the status of an existing project.
      operationId: update_project_v1_projects__project_id__patch
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Project
      tags:
        - projects
  /v1/projects/{project_id}/work-products/{work_product_id}:
    delete:
      description: |-
        Remove a work-product link from a project (MET-484).

        Lets callers clean up duplicate/stale work-product references without
        deleting the project. 404 if no matching link exists.
      operationId: >-
        unlink_work_product_v1_projects__project_id__work_products__work_product_id__delete
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
        - in: path
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Unlink Work Product
      tags:
        - projects
  /v1/promotion:
    get:
      operationId: list_promotions_v1_promotion_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromotionHistoryResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Promotions
      tags:
        - promotion
  /v1/promotion/attempt:
    post:
      description: |-
        Promote (or veto), attributed to whoever made this request.

        A dashboard click is a human act, so this route needs no separate
        approval hop the way the MCP path does — but the authority is still read
        off the request rather than the body (FORGE-393).
      operationId: attempt_promotion_route_v1_promotion_attempt_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttemptPromotionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttemptPromotionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Attempt Promotion Route
      tags:
        - promotion
  /v1/releases:
    get:
      operationId: list_releases_v1_releases_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePackageListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Releases
      tags:
        - releases
    post:
      operationId: create_release_v1_releases_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReleaseRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePackageResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Release
      tags:
        - releases
  /v1/requirements/constraints:
    post:
      description: |-
        FORGE-259: create one structured constraint (metric/operator/limit/
        unit/target_node_type) from the dashboard's constraint editor. Live
        pass/fail/no_data status for it then comes from the existing
        GET /v1/requirements/matrix, computed from real Claim/Evidence data --
        this route only ever records the requirement's own declaration.
      operationId: create_constraint_v1_requirements_constraints_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConstraintRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConstraintResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Constraint
      tags:
        - requirements
  /v1/requirements/coverage:
    get:
      description: |-
        FORGE-297 (gap G-I1): the 5 traceability coverage percentages
        (needs->requirements, requirements->architecture, requirements->
        verification, verification->evidence, critical_requirements->evidence),
        computed live by ``TraceabilityAgent`` (FORGE-56/73) -- previously real,
        tested code with no gateway route exposing it at all.
      operationId: get_requirement_coverage_v1_requirements_coverage_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceabilityCoverage'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Requirement Coverage
      tags:
        - requirements
  /v1/requirements/matrix:
    get:
      description: |-
        FORGE-318: requirements x claims x evidence, one row per real
        requirement -- status (pass/uncertain/fail/no_data/stale) derived live
        from current claim + evidence staleness state, never cached.
      operationId: get_requirement_matrix_v1_requirements_matrix_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequirementMatrixResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Requirement Matrix
      tags:
        - requirements
  /v1/requirements/quality:
    get:
      operationId: get_requirement_quality_v1_requirements_quality_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
        - in: query
          name: product_type
          required: false
          schema:
            default: generic
            title: Product Type
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequirementSetQualityReport'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Requirement Quality
      tags:
        - requirements
  /v1/requirements/{requirement_id}/fix:
    post:
      description: |-
        Generate a proposed rewrite for one flawed requirement -- diagnoses
        with the same deterministic linter the quality report already used,
        then asks the Requirement Author agent for a corrected version linked
        back to the original via REFINES. Never writes anything itself; the
        caller applies the resulting patch through the normal review path.
      operationId: propose_requirement_fix_v1_requirements__requirement_id__fix_post
      parameters:
        - in: path
          name: requirement_id
          required: true
          schema:
            title: Requirement Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FixRequirementResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Propose Requirement Fix
      tags:
        - requirements
  /v1/robot/joint-loads:
    post:
      operationId: compute_joint_loads_v1_robot_joint_loads_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JointLoadRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JointLoadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Compute Joint Loads
      tags:
        - robot-loads
  /v1/runs:
    get:
      description: |-
        Every run, or one project's.

        Unfiltered before: `/runs` showed every project's work in one list, and
        the project a run belonged to was only inside its request blob. Passing
        ``project_id`` scopes it; the response says how many runs were left out
        for having no project, so they do not simply vanish.
      operationId: list_runs_v1_runs_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Runs
      tags:
        - runs
    post:
      operationId: create_run_v1_runs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRunRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Run
      tags:
        - runs
  /v1/runs/usage/summary:
    get:
      description: LLM tokens and cost across all runs for the trailing window (FORGE-476).
      operationId: get_usage_summary_v1_runs_usage_summary_get
      parameters:
        - in: query
          name: window_hours
          required: false
          schema:
            default: 24
            title: Window Hours
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Usage Summary V1 Runs Usage Summary Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Usage Summary
      tags:
        - runs
  /v1/runs/{run_id}:
    get:
      operationId: get_run_v1_runs__run_id__get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Run
      tags:
        - runs
  /v1/runs/{run_id}/approval:
    post:
      description: >-
        Answer the gate this run is parked at.


        Async so the store transition — which resolves the in-process executor's

        gate future via the coordinator — runs on the event-loop thread (future

        resolution is not thread-safe from FastAPI's sync worker pool).


        On Temporal the decision is also *signalled* into the workflow, which is

        what actually resumes it (FORGE-401). The store transition stays,
        because

        the run list, the SSE stream and the ledger all read from it.


        The deciding human comes from the request, never the body (FORGE-393).
      operationId: submit_approval_v1_runs__run_id__approval_post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Submit Approval
      tags:
        - runs
  /v1/runs/{run_id}/events:
    get:
      description: >-
        SSE stream of a run's status transitions until it reaches a terminal
        state.
      operationId: stream_run_events_v1_runs__run_id__events_get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Stream Run Events
      tags:
        - runs
  /v1/runs/{run_id}/flow-state:
    get:
      description: >-
        Phase-by-phase state of a design-flow run.


        Queries the Temporal workflow. A workflow query is answered by a
        *worker*,

        so with none running there is nobody to answer -- which is reported as

        ``live: false`` with a reason rather than as an empty flow, because an

        empty flow and a flow nobody can see render identically and mean
        opposite

        things.
      operationId: get_flow_state_v1_runs__run_id__flow_state_get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunState'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Flow State
      tags:
        - runs
  /v1/runs/{run_id}/gate-opened:
    post:
      description: >-
        Record that a run's workflow has opened a gate (FORGE-489).


        Called by the design-flow worker's announcer. The workflow is the

        authority on whether a gate is open, so this first re-reads it

        (``_reconcile_run``). Only when the workflow cannot be asked does it
        fall

        back to the worker's word. Either way it moves the *record* to

        ``awaiting_approval``, which is what lists the run on the Approvals page

        and publishes the change on its SSE stream. It never approves: a
        decision

        still has to come through ``/approval``, and the workflow ignores one
        for

        a gate that is not open.
      operationId: gate_opened_v1_runs__run_id__gate_opened_post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GateOpenedRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Gate Opened
      tags:
        - runs
  /v1/runs/{run_id}/lifecycle:
    get:
      description: The lifecycle view of one design run, with its completion verdict.
      operationId: get_run_lifecycle_v1_runs__run_id__lifecycle_get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunLifecycleResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Run Lifecycle
      tags:
        - runs
  /v1/runs/{run_id}/patches:
    post:
      description: |-
        Plan a change to a running flow and hold it for a person.

        Nothing changes until somebody approves the approval this returns, and
        then ``POST /v1/runs/{run_id}/patches/{version_id}/apply`` applies it at
        the run's next gate. Only the phases the change touches re-run.
      operationId: propose_run_patch_v1_runs__run_id__patches_post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProposePatchRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Propose Run Patch
      tags:
        - runs
  /v1/runs/{run_id}/patches/{version_id}/apply:
    post:
      description: Apply an approved patch. Refused unless approved and still current.
      operationId: apply_run_patch_v1_runs__run_id__patches__version_id__apply_post
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
        - in: path
          name: version_id
          required: true
          schema:
            title: Version Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPatchView'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Apply Run Patch
      tags:
        - runs
  /v1/sessions:
    get:
      description: |-
        List all agent sessions.

        Merges internal Temporal ``WorkflowRun``s with externally-recorded
        agent sessions (MET-493) so MCP/CLI-driven work shows up alongside
        autonomous runs. Most-recent-first.

        ``project_id`` scopes to one project (MET-516). Internal Temporal runs
        carry no project, so they're excluded when a project filter is set.
      operationId: list_sessions_v1_sessions_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Sessions
      tags:
        - sessions
    post:
      description: Open a new externally-recorded agent session.
      operationId: create_session_v1_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Session
      tags:
        - sessions
  /v1/sessions/{session_id}:
    get:
      description: Get a single session by ID (store first, then workflow engine).
      operationId: get_session_v1_sessions__session_id__get
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Session
      tags:
        - sessions
    patch:
      description: Complete a session (set terminal status + optional summary).
      operationId: update_session_v1_sessions__session_id__patch
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Session
      tags:
        - sessions
  /v1/sessions/{session_id}/events:
    post:
      description: Append one event (thought / action / decision / …) to a session.
      operationId: append_session_event_v1_sessions__session_id__events_post
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionEventCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionEventCreatedResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Append Session Event
      tags:
        - sessions
  /v1/simulation/load-cases:
    get:
      description: |-
        List load cases, optionally scoped to a project.

        Empty (not a 404) when the project has none yet, matching ``/v1/bom``.
      operationId: list_load_cases_v1_simulation_load_cases_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadCaseListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Load Cases
      tags:
        - simulation
    post:
      description: |-
        Create a load case, via the same document-recorder path
        ``twin.record_document(document_type='load_case')`` uses (see module
        docstring) so a dashboard-authored and agent-authored case are
        indistinguishable on the twin.
      operationId: create_load_case_v1_simulation_load_cases_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLoadCaseRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadCaseResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Load Case
      tags:
        - simulation
  /v1/simulation/named-faces:
    post:
      description: |-
        Named-face geometry for an already-generated mesh (FORGE-277).

        Backs the dashboard's geometric boundary-condition face picker: given a
        mesh file path (from an earlier ``freecad.generate_mesh`` call, e.g.
        surfaced in a forge chat turn), returns each named surface group's real
        centroid/normal/area/bbox so the dashboard can render pickable face
        patches instead of a blind "type the gmsh group name" text field.
      operationId: list_named_faces_v1_simulation_named_faces_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NamedFacesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamedFacesResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Named Faces
      tags:
        - simulation
  /v1/simulation/results:
    get:
      description: |-
        List FEA results, optionally scoped to a project (FORGE-279).

        Empty (not a 404) when the project has none yet, matching
        ``list_load_cases``. Creation is agent-driven only (see module
        docstring) — there is no corresponding POST.
      operationId: list_simulation_results_v1_simulation_results_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulationResultListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Simulation Results
      tags:
        - simulation
  /v1/simulation/results/{result_id}/field:
    get:
      description: |-
        Serve a simulation_result's 3D result field (FORGE-532).

        404 ``field not stored`` for a result recorded without one (every
        result before FORGE-532, or one whose MinIO write failed); the
        dashboard treats that as "show the numbers only".
      operationId: get_simulation_result_field_v1_simulation_results__result_id__field_get
      parameters:
        - in: path
          name: result_id
          required: true
          schema:
            title: Result Id
            type: string
      responses:
        '200':
          content:
            application/vnd.metaforge.sim-field+json: {}
          description: >-
            The result's gzipped metaforge.sim_field JSON payload
            (Content-Encoding: gzip).
        '404':
          description: No such result, or the result has no stored field.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Simulation Result Field
      tags:
        - simulation
  /v1/technical-drawings:
    get:
      operationId: list_technical_drawings_v1_technical_drawings_get
      parameters:
        - in: query
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TechnicalDrawingListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Technical Drawings
      tags:
        - technical-drawings
  /v1/testplans:
    get:
      operationId: list_test_plan_v1_testplans_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPlanListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Test Plan
      tags:
        - testplans
    post:
      operationId: generate_test_plan_v1_testplans_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTestPlanRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTestPlanResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Generate Test Plan
      tags:
        - testplans
  /v1/trade-study/options:
    get:
      operationId: list_concept_options_v1_trade_study_options_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Concept Options V1 Trade Study Options Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Concept Options
      tags:
        - trade-study
    post:
      operationId: add_concept_option_v1_trade_study_options_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddConceptOptionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Add Concept Option V1 Trade Study Options Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Add Concept Option
      tags:
        - trade-study
  /v1/trade-study/select:
    post:
      operationId: select_concept_v1_trade_study_select_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectConceptRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Select Concept V1 Trade Study Select Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Select Concept
      tags:
        - trade-study
  /v1/twin/baselines:
    get:
      description: A project's baselines, newest first.
      operationId: list_baselines_v1_twin_baselines_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaselineListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Baselines
      tags:
        - twin
  /v1/twin/baselines/diff:
    get:
      description: >-
        Per item: unchanged, changed (@x -> @y), added or removed between ``a``
        and ``b``.
      operationId: diff_baselines_route_v1_twin_baselines_diff_get
      parameters:
        - description: Baseline id
          in: query
          name: a
          required: true
          schema:
            description: Baseline id
            title: A
            type: string
        - description: Baseline id, or 'current' for the project's current items
          in: query
          name: b
          required: true
          schema:
            description: Baseline id, or 'current' for the project's current items
            title: B
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaselineDiffResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Diff Baselines Route
      tags:
        - twin
  /v1/twin/baselines/{baseline_id}:
    get:
      description: One baseline with its item pins and constraint/entity members.
      operationId: get_baseline_v1_twin_baselines__baseline_id__get
      parameters:
        - in: path
          name: baseline_id
          required: true
          schema:
            title: Baseline Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaselineDetail'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Baseline
      tags:
        - twin
  /v1/twin/current-view:
    get:
      description: >-
        The project's current items, records, counts and readiness (current
        items only).
      operationId: get_current_view_v1_twin_current_view_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentViewResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Current View
      tags:
        - twin
  /v1/twin/hierarchy:
    get:
      description: |-
        List a project's hierarchy nodes, each with its parent link and its
        own rolled-up mass/cost.

        Empty (not a 404) when the project has none yet, matching ``/v1/bom``.
        Note: computes one rollup per node (each its own subtree walk) -- fine
        at the scale a hand-built product hierarchy actually reaches, not
        optimized for a tree of thousands of nodes.
      operationId: get_hierarchy_tree_v1_twin_hierarchy_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HierarchyTreeResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Hierarchy Tree
      tags:
        - twin
  /v1/twin/hierarchy/{node_id}/realize:
    post:
      description: >-
        "Replace placeholder with part": attach or replace ``node_id``'s

        REALIZED_BY (a cad_model work product, e.g. from ``POST
        /v1/twin/import``)

        and/or INSTANCE_OF (a BOMItem) geometry -- the dashboard's own action

        reuses the SAME bound callable ``twin.realize_hierarchy_node`` uses.
      operationId: realize_hierarchy_node_v1_twin_hierarchy__node_id__realize_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RealizeHierarchyNodeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealizeHierarchyNodeResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Realize Hierarchy Node
      tags:
        - twin
  /v1/twin/import:
    post:
      description: |-
        Upload a design file and register it as a work product in the Twin.

        Accepts STEP, IGES, KiCad (.kicad_sch, .kicad_pcb), and FreeCAD
        (.FCStd) files. Metadata is extracted automatically based on file type.
      operationId: import_work_product_v1_twin_import_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_import_work_product_v1_twin_import_post
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportWorkProductResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Import Work Product
      tags:
        - twin
  /v1/twin/interference-check:
    get:
      description: |-
        Real boolean-intersection clearance/interference check between two
        named parts' committed STEP geometry (FORGE-272, gap G-D4).

        Deliberately a pairwise check on two caller-named parts, not an
        all-pairs sweep across an entire assembly, and deliberately not an ISO
        286 tolerance-grade/fit classification -- see
        ``api_gateway.twin.interference_check``'s module docstring for why
        both are out of scope here.
      operationId: check_interference_v1_twin_interference_check_get
      parameters:
        - in: query
          name: work_product_id_a
          required: true
          schema:
            title: Work Product Id A
            type: string
        - in: query
          name: work_product_id_b
          required: true
          schema:
            title: Work Product Id B
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InterferenceCheckResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Check Interference
      tags:
        - twin
  /v1/twin/items:
    get:
      description: Versioned definitions, each at its current head.
      operationId: list_twin_items_v1_twin_items_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - description: e.g. cad_model, constraint_set
          in: query
          name: item_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: e.g. cad_model, constraint_set
            title: Item Type
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Twin Items
      tags:
        - twin
  /v1/twin/items/{key}/diff:
    get:
      description: >-
        Geometry delta, parameter, requirement and field changes between two
        revisions.
      operationId: get_item_diff_v1_twin_items__key__diff_get
      parameters:
        - in: path
          name: key
          required: true
          schema:
            title: Key
            type: string
        - description: Older revision, e.g. 2 or @2
          in: query
          name: a
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Older revision, e.g. 2 or @2
            title: A
        - description: Newer revision; defaults to the current one
          in: query
          name: b
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Newer revision; defaults to the current one
            title: B
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemDiffResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Item Diff
      tags:
        - twin
  /v1/twin/items/{key}/prd:
    get:
      description: >-
        One prd prose revision (``KEY`` or ``KEY@n``) with the current
        requirements.
      operationId: get_item_prd_v1_twin_items__key__prd_get
      parameters:
        - in: path
          name: key
          required: true
          schema:
            title: Key
            type: string
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - description: 'Read as this design-flow run: include its open drafts'
          in: query
          name: run_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Read as this design-flow run: include its open drafts'
            title: Run Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DerivedPrdResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Item Prd
      tags:
        - twin
  /v1/twin/items/{key}/revisions:
    get:
      description: >-
        Every revision of one item, oldest first. ``key`` may carry an ``@n``
        suffix.
      operationId: get_item_revisions_v1_twin_items__key__revisions_get
      parameters:
        - in: path
          name: key
          required: true
          schema:
            title: Key
            type: string
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - description: 'Read as this design-flow run: include its open drafts'
          in: query
          name: run_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Read as this design-flow run: include its open drafts'
            title: Run Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemHistoryResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Item Revisions
      tags:
        - twin
  /v1/twin/links:
    get:
      description: >-
        List file links with live sync status, optionally scoped to a project.


        A link has no project of its own; scoping (MET-517) keeps only links
        whose

        linked work product belongs to ``project_id``.
      operationId: list_file_links_v1_twin_links_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FileLinkResponse'
                title: Response List File Links V1 Twin Links Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List File Links
      tags:
        - twin
  /v1/twin/nodes:
    get:
      description: |-
        List work-product nodes in the Digital Twin.

        ``project_id`` scopes the view to a single project (MET-491). Omitted
        or empty returns every node (including unscoped legacy nodes) —
        preserving the prior global behaviour. A specific ``project_id``
        returns only that project's nodes; unscoped nodes are excluded.

        FORGE-525: a design-flow run's drafts are left out until its gate
        approves them (and for good if it never does); ``include_drafts=true``
        lists them too.
      operationId: list_twin_nodes_v1_twin_nodes_get
      parameters:
        - in: query
          name: domain
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Domain
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
        - in: query
          name: include_drafts
          required: false
          schema:
            default: false
            title: Include Drafts
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwinNodeListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Twin Nodes
      tags:
        - twin
  /v1/twin/nodes/boolean-cut:
    post:
      description: >-
        Real CSG boolean-cut between two committed STEP work products (MET-612).


        A direct-commit endpoint, not the ``twin.propose_change``/apply HITL

        pipeline — a human cutting their own open model is not meaningfully

        different from clicking Save (same rationale as
        ``twin.record_document``,

        whose apply executor doesn't fit this action either). Drives the

        containerized CadQuery adapter via the shared MCP bridge, then commits
        the

        result through the geometry recorder with provenance edges to both
        inputs.
      operationId: boolean_cut_nodes_v1_twin_nodes_boolean_cut_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BooleanCutRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BooleanCutResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Boolean Cut Nodes
      tags:
        - twin
  /v1/twin/nodes/{node_id}:
    delete:
      description: >-
        Delete a work-product node, its project links, and its MinIO blob
        (MET-484).


        Without ``cascade`` a delete that would orphan dependents returns 409.

        Best-effort on the blob (a storage failure doesn't block the delete).
      operationId: delete_node_v1_twin_nodes__node_id__delete
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
        - description: Also delete dependents that would orphan
          in: query
          name: cascade
          required: false
          schema:
            default: false
            description: Also delete dependents that would orphan
            title: Cascade
            type: boolean
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Node
      tags:
        - twin
    get:
      description: Get a single work-product node by ID.
      operationId: get_twin_node_v1_twin_nodes__node_id__get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwinNodeResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Twin Node
      tags:
        - twin
  /v1/twin/nodes/{node_id}/approve-sketch:
    post:
      description: >-
        Human sign-off on a design_sketch work product (follow-up to
        MET-740/747).


        The forge/agent side creates a sketch as unapproved
        (twin.commit_design_sketch);

        this is the dashboard's side of the gate — a human explicitly approving
        it

        before the calling agent is expected to proceed to real CAD/build work.
      operationId: approve_design_sketch_v1_twin_nodes__node_id__approve_sketch_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveSketchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApproveSketchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Approve Design Sketch
      tags:
        - twin
  /v1/twin/nodes/{node_id}/approve-technical-drawing:
    post:
      description: >-
        Human sign-off on a technical_drawing work product (FORGE-293, gap
        G-H1).


        Mirrors ``approve_design_sketch`` above -- a real work product, a real

        approval gate, not a dashboard-local checkbox.
      operationId: >-
        approve_technical_drawing_v1_twin_nodes__node_id__approve_technical_drawing_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveTechnicalDrawingRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApproveTechnicalDrawingResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Approve Technical Drawing
      tags:
        - twin
  /v1/twin/nodes/{node_id}/assembly-joints:
    patch:
      description: >-
        Add/edit/delete mates+joints on an already-committed assembly node
        (FORGE-271).


        Whole-list replace -- matches how the URDF/SDF/USD export panel's own

        manual joint-list form already works (FORGE-245/MET-740). Persisted

        directly onto ``metadata.assembly.joints``: a joint is a logical

        annotation, not new geometry, so this deliberately skips the full

        ``VersionService`` revision machinery ``/nodes/{id}/iterate`` uses for

        an actual re-export -- editing joints here never touches the underlying

        committed blob.


        Unlike the export panel, this does NOT require a live FreeCAD session or

        re-running an export -- it works on any already-committed node, any

        time, which is the whole point (FORGE-245's own fix only got joints

        persisted onto the node at commit time; this is what makes them

        editable afterward).
      operationId: update_assembly_joints_v1_twin_nodes__node_id__assembly_joints_patch
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAssemblyJointsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAssemblyJointsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Assembly Joints
      tags:
        - twin
  /v1/twin/nodes/{node_id}/diff:
    get:
      description: Return a metadata diff between two revisions (1-indexed).
      operationId: diff_versions_v1_twin_nodes__node_id__diff_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
        - in: query
          name: v1
          required: true
          schema:
            title: V1
            type: integer
        - in: query
          name: v2
          required: true
          schema:
            title: V2
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionDiff'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Diff Versions
      tags:
        - twin
  /v1/twin/nodes/{node_id}/file:
    get:
      description: >-
        Stream a work product's stored file for download / open / preview.


        ``download=false`` (default) returns the blob inline with a preview

        content-type so the dashboard can render PDFs, images, text, and BOMs

        in place; ``download=true`` forces a ``Content-Disposition:
        attachment``.
      operationId: download_node_file_v1_twin_nodes__node_id__file_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
        - description: Force attachment download vs inline preview
          in: query
          name: download
          required: false
          schema:
            default: false
            description: Force attachment download vs inline preview
            title: Download
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Download Node File
      tags:
        - twin
  /v1/twin/nodes/{node_id}/files/{filename}:
    get:
      description: |-
        Stream one of a work product's NAMED blobs (MET-740 follow-up).

        ``GET /nodes/{id}/file`` only ever serves the primary blob. A
        ``robot_description`` node stores N additional mesh blobs (one per
        URDF link) under ``metadata["mesh_files"]`` (link filename -> MinIO
        object key) — this resolves any of THOSE by filename, or falls back to
        the primary blob if ``filename`` matches it, so the dashboard's
        existing URDF preview (which expects every mesh reachable at
        ``{some_base_url}/{filename}``, exactly like a fresh export's
        ``_cad_exports/{export_id}/`` directory) can point straight at a
        persisted node with zero re-export round trip.
      operationId: download_node_named_file_v1_twin_nodes__node_id__files__filename__get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
        - in: path
          name: filename
          required: true
          schema:
            title: Filename
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Download Node Named File
      tags:
        - twin
  /v1/twin/nodes/{node_id}/geometry-diff:
    get:
      description: >-
        Diff a work product's real geometry against its SUPERSEDES predecessor.


        Unlike ``/diff`` above (a metadata-revision diff on the SAME node --

        ``/iterate`` never changes the underlying blob, so no two revisions of
        one

        node ever have different geometry), this walks the real SUPERSEDES edge
        a

        re-committed, same-named CAD_MODEL gets (``api_gateway.twin.geometry_

        recorder``) and compares the two NODES' actual STEP files.
      operationId: diff_geometry_v1_twin_nodes__node_id__geometry_diff_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeometryDiffResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Diff Geometry
      tags:
        - twin
  /v1/twin/nodes/{node_id}/iterate:
    post:
      description: Record a new revision and apply metadata updates to a work product.
      operationId: iterate_work_product_v1_twin_nodes__node_id__iterate_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IterateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkProductRevision'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Iterate Work Product
      tags:
        - twin
  /v1/twin/nodes/{node_id}/link:
    delete:
      description: Remove the file link for a work product.
      operationId: delete_file_link_v1_twin_nodes__node_id__link_delete
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete File Link
      tags:
        - twin
    get:
      description: Get the file link for a work product, with live sync status.
      operationId: get_file_link_v1_twin_nodes__node_id__link_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileLinkResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get File Link
      tags:
        - twin
    post:
      description: |-
        Link a work product to an external source file.

        The source file must exist on the gateway's filesystem. Once linked,
        you can call ``POST /sync`` to re-import changes, or enable ``watch``
        for automatic detection.
      operationId: create_file_link_v1_twin_nodes__node_id__link_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileLinkCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileLinkResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create File Link
      tags:
        - twin
  /v1/twin/nodes/{node_id}/model:
    get:
      description: |-
        Convert a CAD work-product's STEP file to GLB and return the URL.

        Reads the STEP file from the shared adapter workspace, converts it
        via the OCCT converter, and returns the GLB URL + metadata.
      operationId: get_node_model_v1_twin_nodes__node_id__model_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
        - in: query
          name: quality
          required: false
          schema:
            default: standard
            pattern: ^(preview|standard|fine)$
            title: Quality
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Node Model V1 Twin Nodes  Node Id  Model Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Node Model
      tags:
        - twin
  /v1/twin/nodes/{node_id}/script:
    get:
      description: >-
        The current git-versioned generation script for a CAD_MODEL node
        (MET-630).


        Lets a dashboard parameter panel seed a regeneration proposal with the

        script as it stands today, rather than the user retyping it from
        scratch.

        404 when the node has no linked script (imported geometry, or the git

        backend isn't configured).
      operationId: get_node_script_v1_twin_nodes__node_id__script_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwinNodeScriptResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Node Script
      tags:
        - twin
  /v1/twin/nodes/{node_id}/sync:
    post:
      description: |-
        Manually trigger a sync for a linked work product.

        Re-reads the source file, extracts metadata, and updates the Twin
        node if the file has changed.
      operationId: sync_file_link_v1_twin_nodes__node_id__sync_post
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Sync File Link V1 Twin Nodes  Node Id  Sync Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Sync File Link
      tags:
        - twin
  /v1/twin/nodes/{node_id}/versions:
    get:
      description: Return the full revision history for a work product.
      operationId: get_version_history_v1_twin_nodes__node_id__versions_get
      parameters:
        - in: path
          name: node_id
          required: true
          schema:
            format: uuid
            title: Node Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkProductVersionHistory'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Version History
      tags:
        - twin
  /v1/twin/projects/{project_id}/item-migration/apply:
    post:
      description: >-
        Apply a reviewed plan. Requires ``approve: true``; refused when the twin
        changed.
      operationId: >-
        apply_item_migration_v1_twin_projects__project_id__item_migration_apply_post
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MigrationApplyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationApplyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Apply Item Migration
      tags:
        - twin
  /v1/twin/projects/{project_id}/item-migration/plan:
    post:
      description: >-
        Dry run: how the project's legacy nodes would become items. Writes
        nothing.
      operationId: >-
        plan_item_migration_v1_twin_projects__project_id__item_migration_plan_post
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationPlanResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Plan Item Migration
      tags:
        - twin
  /v1/twin/projects/{project_id}/prd:
    get:
      description: The project's prd, rendered from its current prose and requirements.
      operationId: get_project_prd_v1_twin_projects__project_id__prd_get
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
        - description: 'Read as this design-flow run: include its open drafts'
          in: query
          name: run_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Read as this design-flow run: include its open drafts'
            title: Run Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DerivedPrdResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Project Prd
      tags:
        - twin
  /v1/twin/relationships:
    get:
      description: |-
        List edges in the Digital Twin graph.

        ``project_id`` scopes the view to a single project (MET-491), matching
        ``list_twin_nodes``. Omitted or empty returns every edge (including
        unscoped legacy nodes) — preserving the prior global behaviour.
      operationId: list_twin_relationships_v1_twin_relationships_get
      parameters:
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwinRelationshipListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Twin Relationships
      tags:
        - twin
  /v1/twin/revision-index:
    get:
      description: >-
        Node id -> ``KEY@n`` for every revision (and constraint-set constraint)
        of the project.
      operationId: get_revision_index_v1_twin_revision_index_get
      parameters:
        - in: query
          name: project_id
          required: true
          schema:
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionIndexResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Revision Index
      tags:
        - twin
  /v1/twin/runs/{run_id}/changes:
    get:
      description: >-
        Revisions a design-flow run produced, and the baselines its gates
        recorded.
      operationId: get_run_changes_v1_twin_runs__run_id__changes_get
      parameters:
        - in: path
          name: run_id
          required: true
          schema:
            title: Run Id
            type: string
        - in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunChangesResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Run Changes
      tags:
        - twin
  /v1/wiring/harness-estimate:
    get:
      operationId: get_harness_estimate_v1_wiring_harness_estimate_get
      parameters:
        - in: query
          name: work_product_id
          required: true
          schema:
            title: Work Product Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HarnessEstimateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Harness Estimate
      tags:
        - wiring
