{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cotal-ai/json-schema/cotal-ai-manager-result-schema.json",
  "title": "ManagerResult",
  "description": "Native dispatch result union. The optional documented fields describe RemoteManagerAuthorityMaterial, including prepare credentials; other dispatched result arms use their own native contracts. This schema validates the object transport envelope, not every phase-specific result.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cotal-ai-auth-openapi.yml#/components/schemas/ManagerResult",
  "type": "object",
  "properties": {
    "v": {
      "const": 1
    },
    "kind": {
      "type": "string"
    },
    "operation": {
      "type": "string"
    },
    "space": {
      "type": "string",
      "minLength": 1
    },
    "owner": {
      "type": "string",
      "minLength": 1
    },
    "actor": {
      "type": "string",
      "minLength": 1
    },
    "instanceId": {
      "type": "string",
      "minLength": 1
    },
    "lifecycleUid": {
      "type": "string",
      "minLength": 1
    },
    "requestId": {
      "type": "string",
      "minLength": 1
    },
    "issuedAt": {
      "type": "integer",
      "minimum": 0
    },
    "expiresAt": {
      "type": "integer",
      "minimum": 0
    },
    "credentials": {
      "type": "object",
      "properties": {
        "supervisor": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "executor": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "serve": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "goalWriter": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "sessionLedger": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "runDriver": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "runMediator": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "sessionServing": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "retirementRequester": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "transferReader": {
          "type": "object",
          "required": [
            "jwt",
            "exp"
          ],
          "properties": {
            "jwt": {
              "type": "string",
              "minLength": 1
            },
            "exp": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "required": [
    "v",
    "kind",
    "requestId"
  ],
  "x-native-contract": {
    "name": "dispatchManagerAuthorityRequest return union; RemoteManagerAuthorityMaterial and native result types",
    "url": "https://github.com/Cotal-AI/Cotal/blob/main/implementations/auth/src/service.ts"
  }
}