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

# Replace the whole manifest, persist, and reload the fleet

> Replace the WHOLE manifest fleet-wide and persist it.

The posted ``manifest_text`` is the PRESERVED view (``!ENV`` markers intact); the
server loads it to the preserved document and pushes it through the pipeline —
validate the RESOLVED projection, persist verbatim (no secret bakes to disk),
reload locally, and broadcast the reload so every worker re-reads the persisted
store. The response embeds the per-origin fleet report as its ``fanout`` summary.
A persisted replacement reaches the whole fleet, so there is no ``targets``.

Authority-changing — the manifest governs ``api_tools`` + module loading — so it
is off the default MCP surface (tier 2), projectable via an explicit
``api_tools.include``.



## OpenAPI

````yaml /openapi.json post /api/manifest/replace
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/manifest/replace:
    post:
      tags:
        - manifest
      summary: Replace the whole manifest, persist, and reload the fleet
      description: >-
        Replace the WHOLE manifest fleet-wide and persist it.


        The posted ``manifest_text`` is the PRESERVED view (``!ENV`` markers
        intact); the

        server loads it to the preserved document and pushes it through the
        pipeline —

        validate the RESOLVED projection, persist verbatim (no secret bakes to
        disk),

        reload locally, and broadcast the reload so every worker re-reads the
        persisted

        store. The response embeds the per-origin fleet report as its ``fanout``
        summary.

        A persisted replacement reaches the whole fleet, so there is no
        ``targets``.


        Authority-changing — the manifest governs ``api_tools`` + module loading
        — so it

        is off the default MCP surface (tier 2), projectable via an explicit

        ``api_tools.include``.
      operationId: post_api_manifest_replace
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManifestReplace'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReloadingError'
          description: The server is applying a config reload; retry shortly.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ManifestReplace:
      description: >-
        A full-manifest replacement carrying the manifest TEXT verbatim — the

        PRESERVED view (``!ENV`` markers intact). The server loads it to the
        preserved

        document and persists it through the pipeline, so it owns resolution and
        no

        secret bakes to disk. There is no ``targets``: a persisted replacement
        reaches

        the whole fleet.
      properties:
        manifest_text:
          title: Manifest Text
          type: string
      required:
        - manifest_text
      title: ManifestReplace
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
    ReloadingError:
      properties:
        error:
          const: reloading — the server is applying a config reload; retry shortly
          type: string
        reloading:
          const: true
          type: boolean
      required:
        - error
        - reloading
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````