跳至正文

数据结构与字段 ​

本页根据随站点发布的 OpenAPI 生成。可选不表示允许 null;只有类型明确包含 null 时才能传 null。嵌套必填列指该字段所在对象,父对象可选时只在提供父对象后校验。

工具与 UI 的 Schema 方言 ​

Schema 支持 type、properties、required、additionalProperties:false、items、enum、minimum/maximum、minLength/maxLength、minItems/maxItems、description/title。对象关闭额外字段,最大递归 12 层;默认字符串上限 65536、数组上限 1000。不支持 $ref、pattern、format、oneOf 或远端解析。这里指工具输入输出和 UI Props 的业务 Schema,不是 OpenAPI 文件自身的 Schema 特性。

Ref ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
versionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "version": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
    }
  },
  "required": [
    "id",
    "version"
  ],
  "additionalProperties": false
}

Application ​

字段类型本层必填默认值与约束
idstring是—
namestring是—
revisioninteger是—
status枚举是enum: ["DRAFT","ACTIVE","SUSPENDED","ARCHIVED"]
defaultAgentRef / null是—
statusReasonstring否maxLength: 512
permissionProviderBusinessProvider否—
contextProviderContextProvider否—
securityEpochinteger否minimum: 0
evaluationGateEvaluationGate否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "revision": {
      "type": "integer"
    },
    "status": {
      "enum": [
        "DRAFT",
        "ACTIVE",
        "SUSPENDED",
        "ARCHIVED"
      ]
    },
    "defaultAgent": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusReason": {
      "type": "string",
      "maxLength": 512
    },
    "permissionProvider": {
      "$ref": "#/components/schemas/BusinessProvider"
    },
    "contextProvider": {
      "$ref": "#/components/schemas/ContextProvider"
    },
    "securityEpoch": {
      "type": "integer",
      "minimum": 0
    },
    "evaluationGate": {
      "$ref": "#/components/schemas/EvaluationGate"
    }
  },
  "required": [
    "id",
    "name",
    "revision",
    "status",
    "defaultAgent"
  ],
  "additionalProperties": false
}

CreateApplication ​

字段类型本层必填默认值与约束
idstring是—
namestring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

CreateToken ​

subjectId 非空;tenantId 默认为空字符串。原始 token 仅签发时返回。

字段类型本层必填默认值与约束
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring否maxLength: 128
role枚举否default: "USER";enum: ["USER","APP_ADMIN"]
ttlSecondsinteger否default: 86400;minimum: 60;maximum: 2592000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "role": {
      "enum": [
        "USER",
        "APP_ADMIN"
      ],
      "default": "USER"
    },
    "ttlSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 2592000,
      "default": 86400
    }
  },
  "required": [
    "subjectId"
  ],
  "additionalProperties": false
}

DefaultAgent ​

字段类型本层必填默认值与约束
agentIdstring是—
versionstring是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "agentId": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "agentId",
    "version"
  ],
  "additionalProperties": false
}

Token ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
subjectIdstring是—
tenantIdstring是—
rolestring是—
expiresAtinteger是format: "int64"
revokedboolean是—
tokenstring否Only returned once by POST tokens
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "expiresAt": {
      "type": "integer",
      "format": "int64"
    },
    "revoked": {
      "type": "boolean"
    },
    "token": {
      "type": "string",
      "description": "Only returned once by POST tokens"
    }
  },
  "required": [
    "id",
    "appId",
    "subjectId",
    "tenantId",
    "role",
    "expiresAt",
    "revoked"
  ],
  "additionalProperties": false
}

Definition ​

根据 Registry kind 选择对应定义;不把不同类别的字段混合提交。

类型:AgentDefinition / ToolDefinition / KnowledgeDefinition / UiDefinition / ProviderDefinition / ModelDefinition / BindingDefinition / ProfileDefinition。—

完整机器定义
json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/AgentDefinition"
    },
    {
      "$ref": "#/components/schemas/ToolDefinition"
    },
    {
      "$ref": "#/components/schemas/KnowledgeDefinition"
    },
    {
      "$ref": "#/components/schemas/UiDefinition"
    },
    {
      "$ref": "#/components/schemas/ProviderDefinition"
    },
    {
      "$ref": "#/components/schemas/ModelDefinition"
    },
    {
      "$ref": "#/components/schemas/BindingDefinition"
    },
    {
      "$ref": "#/components/schemas/ProfileDefinition"
    }
  ]
}

Registration ​

字段类型本层必填默认值与约束
idstring是—
versionstring是—
definitionDefinition是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "definition": {
      "$ref": "#/components/schemas/Definition"
    }
  },
  "required": [
    "id",
    "version",
    "definition"
  ],
  "additionalProperties": false
}

Registry ​

字段类型本层必填默认值与约束
idstring是—
versionstring是—
kindstring是—
appIdstring是—
revisioninteger是—
status枚举是enum: ["DRAFT","PUBLISHED","REVOKED"]
definitionDefinition是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "revision": {
      "type": "integer"
    },
    "status": {
      "enum": [
        "DRAFT",
        "PUBLISHED",
        "REVOKED"
      ]
    },
    "definition": {
      "$ref": "#/components/schemas/Definition"
    }
  },
  "required": [
    "id",
    "version",
    "kind",
    "appId",
    "revision",
    "status",
    "definition"
  ],
  "additionalProperties": false
}

AgentDefinition ​

允许列表默认空;delegatedCapabilities 采用 kind/id@version。根 Agent 与子 Agent 共用根任务预算。

字段类型本层必填默认值与约束
systemPromptstring是minLength: 1;maxLength: 32768
modelProfileRef是—
allowedTools数组:Ref否default: []
allowedKnowledge数组:Ref否default: []
allowedAgents数组:Ref否default: []
allowedUi数组:Ref否default: []
delegatedCapabilities数组:string否kind/id@version for all delegated capabilities, including descendant ceilings
limitsobject否不允许额外字段;根调用汇总全树;子调用按自己的定义预留父级剩余额度,结束归还未用容量。供应商 Token 与费用在网络发送前原子预留。
limits.maxStepsinteger否default: 8;minimum: 1;maximum: 32
limits.maxToolCallsinteger否default: 16;minimum: 0;maximum: 64
limits.maxDepthinteger否default: 3;minimum: 0;maximum: 8
limits.timeoutSecondsinteger否default: 120;minimum: 1;maximum: 600
limits.maxTokensinteger否default: 32000;minimum: 256;maximum: 1000000;字符预算的旧字段;与 maxBudgetUnits 不能同时设置。
limits.maxAgentCallsinteger否default: 8;minimum: 0;maximum: 64
limits.maxBudgetUnitsinteger否default: 32000;minimum: 256;maximum: 1000000
limits.maxProviderTokensinteger否minimum: 0;maximum: 1000000000000
limits.maxCostobject否不允许额外字段
limits.maxCost.currencystring是pattern: "^[A-Z]{3}$"
limits.maxCost.amountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
entryPolicyobject否不允许额外字段;Direct chat entry authorization. Omitted means APPLICATION. Delegation is separately authorized by allowedAgents. RESTRICTED filters are combined with AND; values inside each filter use OR.
entryPolicy.modestring否default: "APPLICATION";enum: ["APPLICATION","RESTRICTED","INTERNAL_ONLY"]
entryPolicy.roles数组:string否maxItems: 256;uniqueItems: true
entryPolicy.subjects数组:string否maxItems: 256;uniqueItems: true
entryPolicy.tenants数组:string否maxItems: 256;uniqueItems: true
permissions数组:string否maxItems: 64;uniqueItems: true;业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。
requiredCapabilities数组:string否maxItems: 5;uniqueItems: true
allowedModelRegions数组:string否minItems: 1;maxItems: 32;uniqueItems: true
knowledgeRoutingKnowledgeRoutingPolicy否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "systemPrompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32768
    },
    "modelProfile": {
      "$ref": "#/components/schemas/Ref"
    },
    "allowedTools": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Ref"
      },
      "default": []
    },
    "allowedKnowledge": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Ref"
      },
      "default": []
    },
    "allowedAgents": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Ref"
      },
      "default": []
    },
    "allowedUi": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Ref"
      },
      "default": []
    },
    "delegatedCapabilities": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "kind/id@version for all delegated capabilities, including descendant ceilings"
    },
    "limits": {
      "type": "object",
      "properties": {
        "maxSteps": {
          "type": "integer",
          "minimum": 1,
          "maximum": 32,
          "default": 8
        },
        "maxToolCalls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 64,
          "default": 16
        },
        "maxDepth": {
          "type": "integer",
          "minimum": 0,
          "maximum": 8,
          "default": 3
        },
        "timeoutSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 600,
          "default": 120
        },
        "maxTokens": {
          "type": "integer",
          "minimum": 256,
          "maximum": 1000000,
          "default": 32000,
          "deprecated": true,
          "description": "字符预算的旧字段;与 maxBudgetUnits 不能同时设置。"
        },
        "maxAgentCalls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 64,
          "default": 8
        },
        "maxBudgetUnits": {
          "type": "integer",
          "minimum": 256,
          "maximum": 1000000,
          "default": 32000
        },
        "maxProviderTokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "maxCost": {
          "type": "object",
          "properties": {
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "amount": {
              "type": "string",
              "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
            }
          },
          "required": [
            "currency",
            "amount"
          ],
          "additionalProperties": false
        }
      },
      "required": [],
      "additionalProperties": false,
      "not": {
        "required": [
          "maxTokens",
          "maxBudgetUnits"
        ]
      },
      "description": "根调用汇总全树;子调用按自己的定义预留父级剩余额度,结束归还未用容量。供应商 Token 与费用在网络发送前原子预留。"
    },
    "entryPolicy": {
      "type": "object",
      "description": "Direct chat entry authorization. Omitted means APPLICATION. Delegation is separately authorized by allowedAgents. RESTRICTED filters are combined with AND; values inside each filter use OR.",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "APPLICATION",
            "RESTRICTED",
            "INTERNAL_ONLY"
          ],
          "default": "APPLICATION"
        },
        "roles": {
          "type": "array",
          "maxItems": 256,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "subjects": {
          "type": "array",
          "maxItems": 256,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "tenants": {
          "type": "array",
          "maxItems": 256,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        }
      },
      "additionalProperties": false
    },
    "permissions": {
      "type": "array",
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.:-]{0,127}$"
      },
      "description": "业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。"
    },
    "requiredCapabilities": {
      "type": "array",
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "toolCalling",
          "structuredOutput",
          "vision",
          "audio",
          "streaming"
        ]
      }
    },
    "allowedModelRegions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9-]{0,63}$"
      }
    },
    "knowledgeRouting": {
      "$ref": "#/components/schemas/KnowledgeRoutingPolicy"
    }
  },
  "required": [
    "systemPrompt",
    "modelProfile"
  ],
  "additionalProperties": false
}

ToolDefinition ​

roles 必须为非空 USER/APP_ADMIN 数组;effect 为 READ、COMPUTE、WRITE、DANGEROUS。后者要求用户确认。

字段类型本层必填默认值与约束
descriptionstring否—
endpointstring是format: "uri"
secretRefstring否—
effect枚举是enum: ["READ","COMPUTE","WRITE","DANGEROUS"]
roles数组:枚举是minItems: 1
inputSchemaobject是—
outputSchemaobject是—
leaseRequiredboolean否default: false
permissions数组:string否maxItems: 64;uniqueItems: true;业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。
完整机器定义
json
{
  "type": "object",
  "properties": {
    "description": {
      "type": "string"
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "secretRef": {
      "type": "string"
    },
    "effect": {
      "enum": [
        "READ",
        "COMPUTE",
        "WRITE",
        "DANGEROUS"
      ]
    },
    "roles": {
      "type": "array",
      "minItems": 1,
      "items": {
        "enum": [
          "USER",
          "APP_ADMIN"
        ]
      }
    },
    "inputSchema": {
      "type": "object",
      "additionalProperties": true
    },
    "outputSchema": {
      "type": "object",
      "additionalProperties": true
    },
    "leaseRequired": {
      "type": "boolean",
      "default": false
    },
    "permissions": {
      "type": "array",
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.:-]{0,127}$"
      },
      "description": "业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。"
    }
  },
  "required": [
    "endpoint",
    "effect",
    "roles",
    "inputSchema",
    "outputSchema"
  ],
  "additionalProperties": false
}

KnowledgeDefinition ​

INLINE 要求 1–100 篇 documents,每篇 text 1–16384 字符;REMOTE 必须有 endpoint;MANAGED 通过独立文档接口导入。

字段类型本层必填默认值与约束
descriptionstring否—
mode枚举是enum: ["INLINE","REMOTE","MANAGED"]
endpointstring否format: "uri"
secretRefstring否—
topKinteger否default: 3;minimum: 1;maximum: 10
documents数组:object否minItems: 1;maxItems: 100
documents[].idstring是—
documents[].textstring是—
documents[].titlestring否—
documents[].sourcestring否—
documents[].tenantIdstring否—
leaseRequiredboolean否default: false
permissions数组:string否maxItems: 64;uniqueItems: true;业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。
callbackProtocolVersionstring否const: "1.0";仅 REMOTE;缺省沿用旧 documents 合同。
mandatoryFilters数组:枚举否maxItems: 2;uniqueItems: true
tags数组:string否maxItems: 16;uniqueItems: true
chunkingDocumentChunkingPolicy否—
retrievalKnowledgeRetrieval否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "description": {
      "type": "string"
    },
    "mode": {
      "enum": [
        "INLINE",
        "REMOTE",
        "MANAGED"
      ]
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "secretRef": {
      "type": "string"
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 3
    },
    "documents": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "text"
        ],
        "additionalProperties": false
      }
    },
    "leaseRequired": {
      "type": "boolean",
      "default": false
    },
    "permissions": {
      "type": "array",
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.:-]{0,127}$"
      },
      "description": "业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。"
    },
    "callbackProtocolVersion": {
      "const": "1.0",
      "description": "仅 REMOTE;缺省沿用旧 documents 合同。"
    },
    "mandatoryFilters": {
      "type": "array",
      "items": {
        "enum": [
          "TENANT",
          "SUBJECT"
        ]
      },
      "uniqueItems": true,
      "maxItems": 2
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "maxItems": 16,
      "uniqueItems": true
    },
    "chunking": {
      "$ref": "#/components/schemas/DocumentChunkingPolicy"
    },
    "retrieval": {
      "$ref": "#/components/schemas/KnowledgeRetrieval"
    }
  },
  "required": [
    "mode"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "required": [
          "callbackProtocolVersion"
        ]
      },
      "then": {
        "properties": {
          "mode": {
            "const": "REMOTE"
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "mandatoryFilters"
        ]
      },
      "then": {
        "required": [
          "callbackProtocolVersion"
        ],
        "properties": {
          "callbackProtocolVersion": {
            "const": "1.0"
          },
          "mode": {
            "const": "REMOTE"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "callbackProtocolVersion": {
            "const": "1.0"
          },
          "permissions": {
            "minItems": 1
          }
        },
        "required": [
          "callbackProtocolVersion",
          "permissions"
        ]
      },
      "then": {
        "required": [
          "mandatoryFilters"
        ],
        "properties": {
          "mandatoryFilters": {
            "contains": {
              "const": "SUBJECT"
            }
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "chunking"
        ]
      },
      "then": {
        "properties": {
          "mode": {
            "const": "MANAGED"
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "retrieval"
        ]
      },
      "then": {
        "properties": {
          "mode": {
            "const": "MANAGED"
          }
        }
      }
    }
  ]
}

UiDefinition ​

字段类型本层必填默认值与约束
descriptionstring否—
propsSchemaobject是—
fallbackstring是minLength: 1
permissions数组:string否maxItems: 64;uniqueItems: true;业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。
完整机器定义
json
{
  "type": "object",
  "properties": {
    "description": {
      "type": "string"
    },
    "propsSchema": {
      "type": "object",
      "additionalProperties": true
    },
    "fallback": {
      "type": "string",
      "minLength": 1
    },
    "permissions": {
      "type": "array",
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.:-]{0,127}$"
      },
      "description": "业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。"
    }
  },
  "required": [
    "propsSchema",
    "fallback"
  ],
  "additionalProperties": false
}

ProviderDefinition ​

stream=true 可用于 OPENAI_CHAT 与 REMOTE 1.0;REMOTE 事件、身份及终结要求见 RemoteModelRequest/RemoteModelStreamFrame。endpoint 为完整请求地址,受出站白名单和密钥 origin 绑定限制。

字段类型本层必填默认值与约束
mode枚举是enum: ["OPENAI_CHAT","REMOTE"]
endpointstring是format: "uri"
secretRefstring否—
streamboolean否default: false;OPENAI_CHAT 为原生 SSE;REMOTE 为版本 1.0 的统一模型 SSE。stream 默认 false,模型必须显式声明 streaming=true。
leaseRequiredboolean否default: false
完整机器定义
json
{
  "type": "object",
  "properties": {
    "mode": {
      "enum": [
        "OPENAI_CHAT",
        "REMOTE"
      ]
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "secretRef": {
      "type": "string"
    },
    "stream": {
      "type": "boolean",
      "default": false,
      "description": "OPENAI_CHAT 为原生 SSE;REMOTE 为版本 1.0 的统一模型 SSE。stream 默认 false,模型必须显式声明 streaming=true。"
    },
    "leaseRequired": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "mode",
    "endpoint"
  ],
  "additionalProperties": false
}

ModelDefinition ​

字段类型本层必填默认值与约束
providerRef是—
modelIdstring是—
pricingobject否不允许额外字段
pricing.currencystring是pattern: "^[A-Z]{3}$"
pricing.inputPerMillionnumber是minimum: 0;maximum: 1000000
pricing.outputPerMillionnumber是minimum: 0;maximum: 1000000
capabilitiesModelCapabilities否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "provider": {
      "$ref": "#/components/schemas/Ref"
    },
    "modelId": {
      "type": "string"
    },
    "pricing": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "inputPerMillion": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "outputPerMillion": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        }
      },
      "required": [
        "currency",
        "inputPerMillion",
        "outputPerMillion"
      ],
      "additionalProperties": false
    },
    "capabilities": {
      "$ref": "#/components/schemas/ModelCapabilities"
    }
  },
  "required": [
    "provider",
    "modelId"
  ],
  "additionalProperties": false
}

BindingDefinition ​

scope 省略表示当前应用,也可明确填写当前 appId;global 绑定仅平台管理员授权。

字段类型本层必填默认值与约束
modelRef是—
scopestring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "model": {
      "$ref": "#/components/schemas/Ref"
    },
    "scope": {
      "type": "string"
    }
  },
  "required": [
    "model"
  ],
  "additionalProperties": false
}

ProfileDefinition ​

字段类型本层必填默认值与约束
bindingRef是—
maxOutputTokensinteger否default: 1024;minimum: 1;maximum: 32768
outputSchemaobject否平台闭合 Schema 方言;根为 object,嵌套对象全部属性 required,完整输出验证后才发送文字。
fallbackBindings数组:Ref否maxItems: 7;uniqueItems: true;固定候选绑定版本;与主绑定不能重复,全部候选必须符合智能体兼容性。
routingModelRoutingPolicy否—
parametersModelGenerationParameters否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "binding": {
      "$ref": "#/components/schemas/Ref"
    },
    "maxOutputTokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32768,
      "default": 1024
    },
    "outputSchema": {
      "type": "object",
      "description": "平台闭合 Schema 方言;根为 object,嵌套对象全部属性 required,完整输出验证后才发送文字。",
      "additionalProperties": true
    },
    "fallbackBindings": {
      "type": "array",
      "maxItems": 7,
      "uniqueItems": true,
      "items": {
        "$ref": "#/components/schemas/Ref"
      },
      "description": "固定候选绑定版本;与主绑定不能重复,全部候选必须符合智能体兼容性。"
    },
    "routing": {
      "$ref": "#/components/schemas/ModelRoutingPolicy"
    },
    "parameters": {
      "$ref": "#/components/schemas/ModelGenerationParameters"
    }
  },
  "required": [
    "binding"
  ],
  "additionalProperties": false
}

ChatRequest ​

agentId 非空时必须同时提供 agentVersion;appId 若提供须等于路径。conversationId 省略/null 创建会话;context 与 client 不是可信身份。

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
appIdstring否—
agentIdstring / null否—
agentVersionstring否—
conversationIdstring / null否—
messageobject是不允许额外字段
message.rolestring是const: "user"
message.contentstring是minLength: 1;maxLength: 16384
contextobject否—
clientobject否不允许额外字段
client.platformstring否—
client.uiCapabilities数组:string否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "appId": {
      "type": "string"
    },
    "agentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "agentVersion": {
      "type": "string"
    },
    "conversationId": {
      "type": [
        "string",
        "null"
      ]
    },
    "message": {
      "type": "object",
      "properties": {
        "role": {
          "const": "user"
        },
        "content": {
          "type": "string",
          "minLength": 1,
          "maxLength": 16384
        }
      },
      "required": [
        "role",
        "content"
      ],
      "additionalProperties": false
    },
    "context": {
      "type": "object",
      "additionalProperties": true
    },
    "client": {
      "type": "object",
      "properties": {
        "platform": {
          "type": "string"
        },
        "uiCapabilities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [],
      "additionalProperties": false
    }
  },
  "required": [
    "protocolVersion",
    "message"
  ],
  "additionalProperties": false
}

Confirmation ​

字段类型本层必填默认值与约束
confirmationIdstring是—
decision枚举是enum: ["approve","reject"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "confirmationId": {
      "type": "string"
    },
    "decision": {
      "enum": [
        "approve",
        "reject"
      ]
    }
  },
  "required": [
    "confirmationId",
    "decision"
  ],
  "additionalProperties": false
}

Run ​

202 返回的 Run 尚未完成;终态为 SUCCEEDED、FAILED、CANCELLED、TIMED_OUT。

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
subjectIdstring否—
tenantIdstring否—
status枚举是enum: ["QUEUED","RUNNING","WAITING_CONFIRMATION","SUCCEEDED","FAILED","CANCELLED","TIMED_OUT"]
lastSequenceinteger是—
traceIdstring是—
conversationIdstring是—
messageIdstring是—
createdAtinteger否—
deadlineinteger否—
finishedAtinteger否—
errorCodestring / null否—
agentRef否—
ownerIdstring否—
archivedboolean否—
usageobject否—
knowledgeAccessEpochinteger否minimum: 0;Application knowledge permission generation; previous runs/conversations become unavailable after a policy change
securityEpochinteger否minimum: 0
modelLedgerboolean否—
modelAccountingModelAccountingSummary否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "appId",
    "status",
    "lastSequence",
    "traceId",
    "conversationId",
    "messageId"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "status": {
      "enum": [
        "QUEUED",
        "RUNNING",
        "WAITING_CONFIRMATION",
        "SUCCEEDED",
        "FAILED",
        "CANCELLED",
        "TIMED_OUT"
      ]
    },
    "lastSequence": {
      "type": "integer"
    },
    "traceId": {
      "type": "string"
    },
    "conversationId": {
      "type": "string"
    },
    "messageId": {
      "type": "string"
    },
    "createdAt": {
      "type": "integer"
    },
    "deadline": {
      "type": "integer"
    },
    "finishedAt": {
      "type": "integer"
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "agent": {
      "$ref": "#/components/schemas/Ref"
    },
    "ownerId": {
      "type": "string"
    },
    "archived": {
      "type": "boolean"
    },
    "usage": {
      "type": "object"
    },
    "knowledgeAccessEpoch": {
      "type": "integer",
      "minimum": 0,
      "description": "Application knowledge permission generation; previous runs/conversations become unavailable after a policy change"
    },
    "securityEpoch": {
      "type": "integer",
      "minimum": 0
    },
    "modelLedger": {
      "type": "boolean"
    },
    "modelAccounting": {
      "$ref": "#/components/schemas/ModelAccountingSummary"
    }
  }
}

Error ​

字段类型本层必填默认值与约束
errorobject是不允许额外字段
error.codestring是—
error.messagestring是—
error.traceIdstring是—
error.retryableboolean是—
error.detailsobject是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "traceId": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        },
        "details": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "required": [
        "code",
        "message",
        "traceId",
        "retryable",
        "details"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "error"
  ],
  "additionalProperties": false
}

AgentEvent ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
event枚举是enum: ["message.started","status.changed","text.delta","agent.started","agent.completed","tool.started","tool.completed","knowledge.retrieved","citation.created","ui.created","confirmation.required","usage.updated","error","message.completed","model.started","model.completed","knowledge.planned","knowledge.fused","citation.verified"]
runIdstring是—
traceIdstring是—
conversationIdstring是—
messageIdstring是—
sequenceinteger是minimum: 1
dataobject是—
完整机器定义
json
{
  "title": "SparkTide AgentEvent 1.0",
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "event": {
      "enum": [
        "message.started",
        "status.changed",
        "text.delta",
        "agent.started",
        "agent.completed",
        "tool.started",
        "tool.completed",
        "knowledge.retrieved",
        "citation.created",
        "ui.created",
        "confirmation.required",
        "usage.updated",
        "error",
        "message.completed",
        "model.started",
        "model.completed",
        "knowledge.planned",
        "knowledge.fused",
        "citation.verified"
      ]
    },
    "runId": {
      "type": "string"
    },
    "traceId": {
      "type": "string"
    },
    "conversationId": {
      "type": "string"
    },
    "messageId": {
      "type": "string"
    },
    "sequence": {
      "type": "integer",
      "minimum": 1
    },
    "data": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "protocolVersion",
    "event",
    "runId",
    "traceId",
    "conversationId",
    "messageId",
    "sequence",
    "data"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "event": {
            "const": "message.started"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "status.changed"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "text.delta"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              }
            },
            "required": [
              "text"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "agent.started"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "agent.completed"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "result": {
                "$ref": "#/components/schemas/AgentResult"
              },
              "usage": {
                "$ref": "#/components/schemas/AgentBudgetUsage"
              },
              "errorCode": {
                "type": "string"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "status"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "tool.started"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "callId": {
                "type": "string"
              },
              "toolId": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "effect": {
                "enum": [
                  "READ",
                  "COMPUTE",
                  "WRITE",
                  "DANGEROUS"
                ]
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "callId",
              "toolId",
              "version",
              "effect"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "tool.completed"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "callId": {
                "type": "string"
              },
              "toolId": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "callId",
              "toolId",
              "status"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "knowledge.retrieved"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "knowledgeId": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "knowledgeVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "status": {
                "enum": [
                  "SUCCEEDED",
                  "EMPTY",
                  "FAILED"
                ]
              },
              "errorCode": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "retrievalId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "selectionReason": {
                "enum": [
                  "MODEL_REQUEST",
                  "EAGER",
                  "RULE_ALWAYS",
                  "TRUSTED_CONTEXT",
                  "QUERY_MATCH",
                  "TAG_MATCH",
                  "DESCRIPTION_TAG_MATCH"
                ]
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "knowledgeId",
              "count"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "citation.created"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "documentId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "knowledgeId": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/KnowledgeSource"
              },
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true,
                "description": "最多 4096 UTF-8 字节、嵌套深度 8;有限 JSON 值。"
              },
              "itemId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "retrievalId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "knowledgeVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "fusionScore": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "chunkId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "id",
              "documentId",
              "title",
              "source",
              "knowledgeId"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "ui.created"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "component": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "props": {
                "type": "object"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "component",
              "version",
              "props"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "confirmation.required"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "confirmationId": {
                "type": "string"
              },
              "toolId": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "arguments": {
                "type": "object"
              },
              "argumentsHash": {
                "type": "string"
              },
              "expiresAt": {
                "type": "integer"
              }
            },
            "required": [
              "confirmationId",
              "toolId",
              "version",
              "arguments",
              "argumentsHash",
              "expiresAt"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "usage.updated"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "budgetUnits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              "steps": {
                "type": "integer"
              },
              "toolCalls": {
                "type": "integer"
              },
              "providerUsage": {
                "type": "object"
              },
              "cost": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "source": {
                    "const": "configured-pricing"
                  },
                  "amounts": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "source",
                  "amounts"
                ]
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "agentCalls": {
                "type": "integer",
                "minimum": 0,
                "maximum": 64
              },
              "scopeUsage": {
                "$ref": "#/components/schemas/AgentBudgetUsage"
              },
              "modelInvocationIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "uniqueItems": true,
                "maxItems": 256
              },
              "citationIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "uniqueItems": true,
                "maxItems": 256
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "budgetUnits",
              "steps",
              "toolCalls",
              "providerUsage",
              "cost"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "error"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "message.completed"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "model.started"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "invocationId": {
                "type": "string"
              },
              "stepId": {
                "type": "string"
              },
              "attempt": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "binding": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "id",
                  "version"
                ],
                "additionalProperties": false
              },
              "model": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
                  },
                  "scope": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "scope"
                ],
                "additionalProperties": false
              },
              "selectionReason": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "invocationId",
              "stepId",
              "attempt",
              "binding",
              "model",
              "selectionReason"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "model.completed"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "invocationId": {
                "type": "string"
              },
              "stepId": {
                "type": "string"
              },
              "attempt": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "binding": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "id",
                  "version"
                ],
                "additionalProperties": false
              },
              "model": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  },
                  "version": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
                  },
                  "scope": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "scope"
                ],
                "additionalProperties": false
              },
              "selectionReason": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "RESPONDED",
                  "FAILED",
                  "SKIPPED"
                ]
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "outputStarted": {
                "type": "boolean"
              },
              "usage": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true
              },
              "cost": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "invocationId",
              "stepId",
              "attempt",
              "binding",
              "model",
              "selectionReason",
              "status",
              "errorCode",
              "outputStarted",
              "usage",
              "cost"
            ],
            "additionalProperties": true
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "knowledge.planned"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "retrievalId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "mode": {
                "enum": [
                  "EAGER",
                  "AUTO",
                  "ON_DEMAND"
                ]
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/KnowledgeSelectedSource"
                },
                "maxItems": 16
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "agentVersion",
              "retrievalId",
              "mode",
              "sources"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "knowledge.fused"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string"
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "agentId": {
                "type": "string"
              },
              "agentVersion": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
              },
              "retrievalId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 50
              },
              "rerank": {
                "enum": [
                  "NONE",
                  "LEXICAL"
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "retrievals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 64
                  },
                  "contextChars": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65536
                  }
                },
                "required": [
                  "retrievals",
                  "contextChars"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "agentCallId",
              "parentAgentCallId",
              "depth",
              "agentId",
              "agentVersion",
              "retrievalId",
              "count",
              "rerank",
              "usage"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "event": {
            "const": "citation.verified"
          }
        }
      },
      "then": {
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "agentCallId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "agentId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "agentVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "parentAgentCallId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              },
              "references": {
                "type": "array",
                "maxItems": 256,
                "items": {
                  "$ref": "#/components/schemas/CitationVerification"
                }
              }
            },
            "required": [
              "agentCallId",
              "agentId",
              "agentVersion",
              "parentAgentCallId",
              "depth",
              "references"
            ],
            "additionalProperties": false
          }
        }
      }
    }
  ]
}

ToolExecution ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
runIdstring是—
subjectIdstring否—
tenantIdstring否—
rolestring否—
toolIdstring否—
versionstring否—
effectstring否—
inputHashstring是—
idempotencyKeystring否—
errorCodestring否—
resultHashstring否—
reasonstring否—
evidencestring否—
reconciledBystring否—
statusstring是enum: ["RUNNING","SUCCEEDED","FAILED","UNKNOWN"]
revisioninteger是—
createdAtinteger否—
finishedAtinteger否—
reconciledAtinteger否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "runId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "toolId": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "effect": {
      "type": "string"
    },
    "inputHash": {
      "type": "string"
    },
    "idempotencyKey": {
      "type": "string"
    },
    "errorCode": {
      "type": "string"
    },
    "resultHash": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "evidence": {
      "type": "string"
    },
    "reconciledBy": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "RUNNING",
        "SUCCEEDED",
        "FAILED",
        "UNKNOWN"
      ]
    },
    "revision": {
      "type": "integer"
    },
    "createdAt": {
      "type": "integer"
    },
    "finishedAt": {
      "type": "integer"
    },
    "reconciledAt": {
      "type": "integer"
    }
  },
  "required": [
    "id",
    "appId",
    "runId",
    "status",
    "revision",
    "inputHash"
  ],
  "additionalProperties": false
}

DocumentAccess ​

字段类型本层必填默认值与约束
enabledboolean是—
subjects数组:string是maxItems: 256;uniqueItems: true
tenants数组:string是maxItems: 256;uniqueItems: true
roles数组:string是maxItems: 256;uniqueItems: true
revisioninteger是minimum: 0
reasonstring否minLength: 1;maxLength: 1024
updatedAtinteger否—
updatedBystring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "subjects": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "maxItems": 256,
      "uniqueItems": true
    },
    "tenants": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "maxItems": 256,
      "uniqueItems": true
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "USER",
          "APP_ADMIN"
        ]
      },
      "maxItems": 256,
      "uniqueItems": true
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "updatedAt": {
      "type": "integer"
    },
    "updatedBy": {
      "type": "string"
    }
  },
  "required": [
    "enabled",
    "subjects",
    "tenants",
    "roles",
    "revision"
  ],
  "additionalProperties": false
}

BusinessContextSchema ​

类型:object。平台有限 JSON Schema 方言,根必须为 object,所有对象 additionalProperties=false;不能包含身份字段。

完整机器定义
json
{
  "type": "object",
  "description": "平台有限 JSON Schema 方言,根必须为 object,所有对象 additionalProperties=false;不能包含身份字段。"
}

BusinessProvider ​

字段类型本层必填默认值与约束
endpointstring否format: "uri"
secretRefstring否minLength: 1
timeoutMsinteger否default: 2000;minimum: 100;maximum: 10000
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "secretRef": {
      "type": "string",
      "minLength": 1
    },
    "timeoutMs": {
      "type": "integer",
      "minimum": 100,
      "maximum": 10000,
      "default": 2000
    }
  },
  "description": "空对象停用;非空对象必须有 endpoint 与 secretRef。配置变更需 reason,递增 securityEpoch。",
  "dependentRequired": {
    "endpoint": [
      "secretRef"
    ],
    "secretRef": [
      "endpoint"
    ],
    "timeoutMs": [
      "endpoint",
      "secretRef"
    ]
  }
}

ContextProvider ​

字段类型本层必填默认值与约束
endpointstring否format: "uri"
secretRefstring否minLength: 1
timeoutMsinteger否default: 2000;minimum: 100;maximum: 10000
schemaBusinessContextSchema否—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "secretRef": {
      "type": "string",
      "minLength": 1
    },
    "timeoutMs": {
      "type": "integer",
      "minimum": 100,
      "maximum": 10000,
      "default": 2000
    },
    "schema": {
      "$ref": "#/components/schemas/BusinessContextSchema"
    }
  },
  "description": "空对象停用;非空对象必须有 endpoint 与 secretRef。配置变更需 reason,递增 securityEpoch。",
  "dependentRequired": {
    "endpoint": [
      "secretRef",
      "schema"
    ],
    "secretRef": [
      "endpoint",
      "schema"
    ],
    "schema": [
      "endpoint",
      "secretRef"
    ],
    "timeoutMs": [
      "endpoint",
      "secretRef",
      "schema"
    ]
  }
}

BusinessIdentity ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
appIdstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring是maxLength: 128
rolestring是enum: ["USER","APP_ADMIN"]
runIdstring是maxLength: 128
traceIdstring是maxLength: 128
deadlineinteger是minimum: 1
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "protocolVersion": {
      "type": "string",
      "const": "1.0"
    },
    "appId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "role": {
      "type": "string",
      "enum": [
        "USER",
        "APP_ADMIN"
      ]
    },
    "runId": {
      "type": "string",
      "maxLength": 128
    },
    "traceId": {
      "type": "string",
      "maxLength": 128
    },
    "deadline": {
      "type": "integer",
      "minimum": 1
    }
  },
  "required": [
    "protocolVersion",
    "appId",
    "subjectId",
    "tenantId",
    "role",
    "runId",
    "traceId",
    "deadline"
  ],
  "description": "认证回调主体;deadline 为 UTC 毫秒,失效请求拒绝。入口解析或历史读取的 runId/traceId 可能为空。"
}

PermissionCallback ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
appIdstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring是maxLength: 128
rolestring是enum: ["USER","APP_ADMIN","PLATFORM_ADMIN"];调用方角色;平台管理员经平台令牌访问应用资源时为 PLATFORM_ADMIN
runIdstring是maxLength: 128
traceIdstring是maxLength: 128
deadlineinteger是minimum: 1
resourceobject是不允许额外字段
resource.idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
resource.versionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
resource.kindstring是enum: ["agents","tools","knowledge","ui-capabilities"]
actionstring是enum: ["DISCOVER","EXECUTE","READ_HISTORY"]
requiredPermissions数组:string是minItems: 1;maxItems: 64;uniqueItems: true
argumentsobject是调用参数;历史检查保留原执行参数,不可用来覆盖身份。
untrustedContextobject是客户端上下文,不能提供授权。
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "protocolVersion": {
      "type": "string",
      "const": "1.0"
    },
    "appId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "role": {
      "type": "string",
      "description": "调用方角色;平台管理员经平台令牌访问应用资源时为 PLATFORM_ADMIN",
      "enum": [
        "USER",
        "APP_ADMIN",
        "PLATFORM_ADMIN"
      ]
    },
    "runId": {
      "type": "string",
      "maxLength": 128
    },
    "traceId": {
      "type": "string",
      "maxLength": 128
    },
    "deadline": {
      "type": "integer",
      "minimum": 1
    },
    "resource": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,63}$"
        },
        "version": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
        },
        "kind": {
          "type": "string",
          "enum": [
            "agents",
            "tools",
            "knowledge",
            "ui-capabilities"
          ]
        }
      },
      "required": [
        "kind",
        "id",
        "version"
      ]
    },
    "action": {
      "type": "string",
      "enum": [
        "DISCOVER",
        "EXECUTE",
        "READ_HISTORY"
      ]
    },
    "requiredPermissions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.:-]{0,127}$"
      }
    },
    "arguments": {
      "type": "object",
      "description": "调用参数;历史检查保留原执行参数,不可用来覆盖身份。"
    },
    "untrustedContext": {
      "type": "object",
      "description": "客户端上下文,不能提供授权。"
    }
  },
  "required": [
    "protocolVersion",
    "appId",
    "subjectId",
    "tenantId",
    "role",
    "runId",
    "traceId",
    "deadline",
    "resource",
    "action",
    "requiredPermissions",
    "arguments",
    "untrustedContext"
  ]
}

PermissionDecision ​

字段类型本层必填默认值与约束
allowedboolean是—
decisionIdstring是minLength: 1;maxLength: 128
reasonstring否maxLength: 1024
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "allowed": {
      "type": "boolean"
    },
    "decisionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "reason": {
      "type": "string",
      "maxLength": 1024
    }
  },
  "required": [
    "allowed",
    "decisionId"
  ]
}

TrustedContextResult ​

字段类型本层必填默认值与约束
contextobject是遵守应用配置 Schema,最大 16 KiB。
sourcestring是minLength: 1;maxLength: 128
revisionstring是minLength: 1;maxLength: 128
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "object",
      "description": "遵守应用配置 Schema,最大 16 KiB。"
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "revision": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "context",
    "source",
    "revision"
  ]
}

ReleaseResource ​

字段类型本层必填默认值与约束
kindstring是enum: ["agents","tools","knowledge","ui-capabilities","model-providers","models","model-bindings","model-profiles"]
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
versionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
revisioninteger是minimum: 1
完整机器定义
json
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "agents",
        "tools",
        "knowledge",
        "ui-capabilities",
        "model-providers",
        "models",
        "model-bindings",
        "model-profiles"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "version": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    }
  },
  "required": [
    "kind",
    "id",
    "version",
    "revision"
  ],
  "additionalProperties": false
}

ReleaseRequest ​

字段类型本层必填默认值与约束
resources数组:ReleaseResource是minItems: 1;maxItems: 64;同一 kind/id/version 不能重复;可以包含已发布依赖。
defaultAgentRef否—
reasonstring否maxLength: 512;发布时必须为非空文本;预检可为空。
完整机器定义
json
{
  "type": "object",
  "properties": {
    "resources": {
      "type": "array",
      "minItems": 1,
      "maxItems": 64,
      "items": {
        "$ref": "#/components/schemas/ReleaseResource"
      },
      "description": "同一 kind/id/version 不能重复;可以包含已发布依赖。"
    },
    "defaultAgent": {
      "$ref": "#/components/schemas/Ref"
    },
    "reason": {
      "type": "string",
      "maxLength": 512,
      "description": "发布时必须为非空文本;预检可为空。"
    }
  },
  "required": [
    "resources"
  ],
  "additionalProperties": false
}

ReleasePlan ​

字段类型本层必填默认值与约束
validboolean是—
planHashstring / null是—
applicationRevisioninteger是—
resources数组:ReleaseResource是—
defaultAgentRef / null是—
dependencyCountinteger是—
errors数组:object是—
errors[].resourcestring是—
errors[].codestring是—
errors[].messagestring是—
evaluationGateEvaluationGateReport否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "planHash": {
      "type": [
        "string",
        "null"
      ]
    },
    "applicationRevision": {
      "type": "integer"
    },
    "resources": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReleaseResource"
      }
    },
    "defaultAgent": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "dependencyCount": {
      "type": "integer"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "resource",
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    },
    "evaluationGate": {
      "$ref": "#/components/schemas/EvaluationGateReport"
    }
  },
  "required": [
    "valid",
    "planHash",
    "applicationRevision",
    "resources",
    "defaultAgent",
    "dependencyCount",
    "errors"
  ],
  "additionalProperties": false
}

ReleaseRecord ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
subjectIdstring是—
createdAtinteger是—
reasonstring是—
planHashstring是—
resources数组:object是—
resources[].kindstring是enum: ["agents","tools","knowledge","ui-capabilities","model-providers","models","model-bindings","model-profiles"]
resources[].idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
resources[].versionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
resources[].revisioninteger是minimum: 1
resources[].statusstring是const: "PUBLISHED"
previousDefaultAgentRef / null是—
defaultAgentRef / null是—
applicationRevisioninteger是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "createdAt": {
      "type": "integer"
    },
    "reason": {
      "type": "string"
    },
    "planHash": {
      "type": "string"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "agents",
              "tools",
              "knowledge",
              "ui-capabilities",
              "model-providers",
              "models",
              "model-bindings",
              "model-profiles"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,63}$"
          },
          "version": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "const": "PUBLISHED"
          }
        },
        "required": [
          "kind",
          "id",
          "version",
          "revision",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "previousDefaultAgent": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "defaultAgent": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "applicationRevision": {
      "type": "integer"
    }
  },
  "required": [
    "id",
    "appId",
    "subjectId",
    "createdAt",
    "reason",
    "planHash",
    "resources",
    "previousDefaultAgent",
    "defaultAgent",
    "applicationRevision"
  ],
  "additionalProperties": false
}

ReleasePage ​

字段类型本层必填默认值与约束
items数组:ReleaseRecord是—
nextOffsetinteger / null是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReleaseRecord"
      }
    },
    "nextOffset": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "nextOffset"
  ],
  "additionalProperties": false
}

ModelCapabilities ​

字段类型本层必填默认值与约束
toolCallingboolean否—
structuredOutputboolean否—
visionboolean否—
audioboolean否—
streamingboolean否—
contextWindowinteger否minimum: 1;maximum: 10000000
maxOutputTokensinteger否minimum: 1;maximum: 10000000
regions数组:string否minItems: 1;maxItems: 32;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "description": "维护者声明;省略为未知,true 非供应商探测证明。",
  "properties": {
    "toolCalling": {
      "type": "boolean"
    },
    "structuredOutput": {
      "type": "boolean"
    },
    "vision": {
      "type": "boolean"
    },
    "audio": {
      "type": "boolean"
    },
    "streaming": {
      "type": "boolean"
    },
    "contextWindow": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000000
    },
    "maxOutputTokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000000
    },
    "regions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9-]{0,63}$"
      }
    }
  }
}

ModelCompatibilityReport ​

字段类型本层必填默认值与约束
validboolean是—
evidencestring是const: "DECLARED"
contextEstimatorstring是const: "UTF8_BYTES_ESTIMATE"
checks数组:object是—
checks[].resourcestring是—
checks[].modelobject是—
checks[].model.scopestring是—
checks[].model.idstring是—
checks[].model.versionstring是—
checks[].capabilityStatesobject是—
checks[].evidencestring是const: "DECLARED"
checks[].outputTokensinteger是—
checks[].modelLimitsobject是—
checks[].modelLimits.contextWindowinteger否—
checks[].modelLimits.maxOutputTokensinteger否—
checks[].regions数组:string是—
checks[].bindingRef否—
errors数组:object是—
errors[].resourcestring是—
errors[].codestring是—
errors[].messagestring是—
warnings数组:object是—
warnings[].resourcestring是—
warnings[].codestring是—
warnings[].messagestring是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "valid",
    "evidence",
    "contextEstimator",
    "checks",
    "errors",
    "warnings"
  ],
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "evidence": {
      "const": "DECLARED"
    },
    "contextEstimator": {
      "const": "UTF8_BYTES_ESTIMATE"
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "resource",
          "model",
          "capabilityStates",
          "evidence",
          "outputTokens",
          "modelLimits",
          "regions"
        ],
        "properties": {
          "resource": {
            "type": "string"
          },
          "model": {
            "type": "object",
            "properties": {
              "scope": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "scope",
              "id",
              "version"
            ]
          },
          "capabilityStates": {
            "type": "object",
            "additionalProperties": {
              "enum": [
                "DECLARED_SUPPORTED",
                "UNKNOWN",
                "UNSUPPORTED"
              ]
            }
          },
          "evidence": {
            "const": "DECLARED"
          },
          "outputTokens": {
            "type": "integer"
          },
          "modelLimits": {
            "type": "object",
            "properties": {
              "contextWindow": {
                "type": "integer"
              },
              "maxOutputTokens": {
                "type": "integer"
              }
            }
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "binding": {
            "$ref": "#/components/schemas/Ref"
          }
        }
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "resource",
          "code",
          "message"
        ],
        "properties": {
          "resource": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "resource",
          "code",
          "message"
        ],
        "properties": {
          "resource": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}

ModelRoutingPolicy ​

字段类型本层必填默认值与约束
strategy枚举否default: "ORDERED";enum: ["ORDERED","LOWEST_COST"]
fallbackOn数组:枚举否uniqueItems: true;省略允许四种瞬时错误(含 MODEL_CIRCUIT_OPEN),空数组关闭故障切换。已开始文字或工具参数输出时始终禁止切换。
maxAttemptsinteger否minimum: 1;maximum: 8;默认候选数,不能超过实际候选数。
attemptTimeoutSecondsinteger否default: 60;minimum: 1;maximum: 60
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "strategy": {
      "enum": [
        "ORDERED",
        "LOWEST_COST"
      ],
      "default": "ORDERED"
    },
    "fallbackOn": {
      "type": "array",
      "items": {
        "enum": [
          "MODEL_UNAVAILABLE",
          "MODEL_TIMED_OUT",
          "MODEL_RATE_LIMITED",
          "MODEL_CIRCUIT_OPEN"
        ]
      },
      "uniqueItems": true,
      "description": "省略允许四种瞬时错误(含 MODEL_CIRCUIT_OPEN),空数组关闭故障切换。已开始文字或工具参数输出时始终禁止切换。"
    },
    "maxAttempts": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8,
      "description": "默认候选数,不能超过实际候选数。"
    },
    "attemptTimeoutSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 60
    }
  }
}

ModelGenerationParameters ​

字段类型本层必填默认值与约束
temperaturenumber否minimum: 0;maximum: 2
topPnumber否maximum: 1;exclusiveMinimum: 0
seedinteger否minimum: 0;maximum: 2147483647
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
    },
    "topP": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "seed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    }
  }
}

ModelProviderUsage ​

字段类型本层必填默认值与约束
prompt_tokensinteger / null是minimum: 0;maximum: 1000000000
completion_tokensinteger / null是minimum: 0;maximum: 1000000000
total_tokensinteger / null是minimum: 0;maximum: 1000000000
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "prompt_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 1000000000
    },
    "completion_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 1000000000
    },
    "total_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 1000000000
    }
  },
  "required": [
    "prompt_tokens",
    "completion_tokens",
    "total_tokens"
  ],
  "description": "null 表示没有可信回执,不是零。"
}

ModelBilledCost ​

字段类型本层必填默认值与约束
currencystring是pattern: "^[A-Z]{3}$"
amountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "amount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    }
  },
  "required": [
    "currency",
    "amount"
  ],
  "description": "供应商实际账单金额;与配置价目费用独立保存。"
}

ModelReconciliationRequest ​

字段类型本层必填默认值与约束
providerUsageobject是不允许额外字段;完整整数用量;total_tokens 不得低于输入加输出。
providerUsage.prompt_tokensinteger是minimum: 0;maximum: 1000000000
providerUsage.completion_tokensinteger是minimum: 0;maximum: 1000000000
providerUsage.total_tokensinteger是minimum: 0;maximum: 1000000000
billedCostModelBilledCost否—
providerRequestIdstring否minLength: 1;maxLength: 256
reasonstring是minLength: 1;maxLength: 1024
evidencestring是minLength: 1;maxLength: 2048
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "providerUsage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "prompt_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        },
        "completion_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        },
        "total_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        }
      },
      "required": [
        "prompt_tokens",
        "completion_tokens",
        "total_tokens"
      ],
      "description": "完整整数用量;total_tokens 不得低于输入加输出。"
    },
    "billedCost": {
      "$ref": "#/components/schemas/ModelBilledCost"
    },
    "providerRequestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "evidence": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    }
  },
  "required": [
    "providerUsage",
    "reason",
    "evidence"
  ]
}

ModelReconciliation ​

字段类型本层必填默认值与约束
providerUsageobject是不允许额外字段;完整整数用量;total_tokens 不得低于输入加输出。
providerUsage.prompt_tokensinteger是minimum: 0;maximum: 1000000000
providerUsage.completion_tokensinteger是minimum: 0;maximum: 1000000000
providerUsage.total_tokensinteger是minimum: 0;maximum: 1000000000
billedCostModelBilledCost否—
providerRequestIdstring否minLength: 1;maxLength: 256
reasonstring是minLength: 1;maxLength: 1024
evidencestring是minLength: 1;maxLength: 2048
recordedAtinteger是minimum: 0;maximum: 9223372036854776000
recordedBystring是—
usageSourcestring是const: "PROVIDER_RECONCILIATION"
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "providerUsage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "prompt_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        },
        "completion_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        },
        "total_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        }
      },
      "required": [
        "prompt_tokens",
        "completion_tokens",
        "total_tokens"
      ],
      "description": "完整整数用量;total_tokens 不得低于输入加输出。"
    },
    "billedCost": {
      "$ref": "#/components/schemas/ModelBilledCost"
    },
    "providerRequestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "evidence": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "recordedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "recordedBy": {
      "type": "string"
    },
    "usageSource": {
      "const": "PROVIDER_RECONCILIATION"
    }
  },
  "required": [
    "providerUsage",
    "reason",
    "evidence",
    "recordedAt",
    "recordedBy",
    "usageSource"
  ]
}

ModelAccountingSummary ​

字段类型本层必填默认值与约束
coverage枚举是enum: ["COMPLETE","LEGACY"];COMPLETE 表示该 Run 启用账本;LEGACY 不补造历史调用。
invocationsinteger是minimum: 0;maximum: 1000000
sentinteger是minimum: 0;maximum: 1000000
notSentinteger是minimum: 0;maximum: 1000000
unknownCostInvocationsinteger是minimum: 0;maximum: 1000000
providerUsageModelProviderUsage是—
costobject / null是不允许额外字段
cost.sourcestring是const: "configured-pricing"
cost.amountsobject是—
knownConfiguredAmountsobject是按币种累计十进制金额,不自动换算。
providerBilledAmountsobject是按币种累计十进制金额,不自动换算。
billedCompleteboolean是—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "coverage": {
      "enum": [
        "COMPLETE",
        "LEGACY"
      ],
      "description": "COMPLETE 表示该 Run 启用账本;LEGACY 不补造历史调用。"
    },
    "invocations": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "sent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "notSent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "unknownCostInvocations": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "providerUsage": {
      "$ref": "#/components/schemas/ModelProviderUsage"
    },
    "cost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "source": {
          "const": "configured-pricing"
        },
        "amounts": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "source",
        "amounts"
      ],
      "additionalProperties": false
    },
    "knownConfiguredAmounts": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "按币种累计十进制金额,不自动换算。"
    },
    "providerBilledAmounts": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "按币种累计十进制金额,不自动换算。"
    },
    "billedComplete": {
      "type": "boolean"
    }
  },
  "required": [
    "coverage",
    "invocations",
    "sent",
    "notSent",
    "unknownCostInvocations",
    "providerUsage",
    "cost",
    "knownConfiguredAmounts",
    "providerBilledAmounts",
    "billedComplete"
  ]
}

ModelInvocation ​

字段类型本层必填默认值与约束
idstring是—
invocationIdstring是—
runIdstring是—
appIdstring是—
subjectIdstring是—
tenantIdstring是—
stepIdstring是—
agentCallIdstring是—
parentAgentCallIdstring / null是—
agentIdstring是—
depthinteger是minimum: 0;maximum: 8
attemptinteger是minimum: 1;maximum: 8
bindingRef是—
modelobject是不允许额外字段
model.idstring是—
model.versionstring是—
model.scopestring是—
providerobject是不允许额外字段
provider.idstring是—
provider.versionstring是—
provider.scopestring是—
selectionReasonstring是—
status枚举是enum: ["RUNNING","RESPONDED","FAILED","SKIPPED","UNKNOWN"]
sendState枚举是enum: ["NOT_SENT","SENT"];SENT 表示进入发送边界,可能被接收;不证明供应商收到。
outputStartedboolean是—
pricingobject是当次固定模型价目,未配置时为空对象。
pricingVersionstring是—
pricingHashstring是—
inputHashstring否—
usageModelProviderUsage是—
usageSource枚举是enum: ["UNKNOWN","PROVIDER"]
costobject / null是不允许额外字段
cost.sourcestring是const: "configured-pricing"
cost.amountsobject是—
createdAtinteger是minimum: 0;maximum: 9223372036854776000
sentAtinteger否minimum: 0;maximum: 9223372036854776000
receiptAtinteger否minimum: 0;maximum: 9223372036854776000
finishedAtinteger / null否—
revisioninteger是minimum: 1;maximum: 2147483647
errorCodestring / null否—
effectiveUsageModelProviderUsage是—
effectiveCostobject / null是不允许额外字段
effectiveCost.sourcestring是const: "configured-pricing"
effectiveCost.amountsobject是—
costDifferenceobject / null是仅可比币种有完整配置金额时返回账单减配置费用。
costDifference.currencystring否—
costDifference.amountstring否—
reconciliationModelReconciliation否—
reconciliationHistory数组:ModelReconciliation否maxItems: 100;明细接口返回;列表不返回历史数组。
effectiveUsageSource枚举是enum: ["NOT_SENT","UNKNOWN","PROVIDER","PROVIDER_RECONCILIATION"]
agentVersionstring否pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "invocationId": {
      "type": "string"
    },
    "runId": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "stepId": {
      "type": "string"
    },
    "agentCallId": {
      "type": "string"
    },
    "parentAgentCallId": {
      "type": [
        "string",
        "null"
      ]
    },
    "agentId": {
      "type": "string"
    },
    "depth": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8
    },
    "attempt": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8
    },
    "binding": {
      "$ref": "#/components/schemas/Ref"
    },
    "model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "provider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "selectionReason": {
      "type": "string"
    },
    "status": {
      "enum": [
        "RUNNING",
        "RESPONDED",
        "FAILED",
        "SKIPPED",
        "UNKNOWN"
      ]
    },
    "sendState": {
      "enum": [
        "NOT_SENT",
        "SENT"
      ],
      "description": "SENT 表示进入发送边界,可能被接收;不证明供应商收到。"
    },
    "outputStarted": {
      "type": "boolean"
    },
    "pricing": {
      "type": "object",
      "description": "当次固定模型价目,未配置时为空对象。",
      "additionalProperties": true
    },
    "pricingVersion": {
      "type": "string"
    },
    "pricingHash": {
      "type": "string"
    },
    "inputHash": {
      "type": "string"
    },
    "usage": {
      "$ref": "#/components/schemas/ModelProviderUsage"
    },
    "usageSource": {
      "enum": [
        "UNKNOWN",
        "PROVIDER"
      ]
    },
    "cost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "source": {
          "const": "configured-pricing"
        },
        "amounts": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "source",
        "amounts"
      ],
      "additionalProperties": false
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "sentAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "receiptAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "finishedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "effectiveUsage": {
      "$ref": "#/components/schemas/ModelProviderUsage"
    },
    "effectiveCost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "source": {
          "const": "configured-pricing"
        },
        "amounts": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "source",
        "amounts"
      ],
      "additionalProperties": false
    },
    "costDifference": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      },
      "description": "仅可比币种有完整配置金额时返回账单减配置费用。"
    },
    "reconciliation": {
      "$ref": "#/components/schemas/ModelReconciliation"
    },
    "reconciliationHistory": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/ModelReconciliation"
      },
      "description": "明细接口返回;列表不返回历史数组。"
    },
    "effectiveUsageSource": {
      "enum": [
        "NOT_SENT",
        "UNKNOWN",
        "PROVIDER",
        "PROVIDER_RECONCILIATION"
      ]
    },
    "agentVersion": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
    }
  },
  "required": [
    "id",
    "invocationId",
    "runId",
    "appId",
    "subjectId",
    "tenantId",
    "stepId",
    "agentCallId",
    "parentAgentCallId",
    "agentId",
    "depth",
    "attempt",
    "binding",
    "model",
    "provider",
    "selectionReason",
    "status",
    "sendState",
    "outputStarted",
    "pricing",
    "pricingVersion",
    "pricingHash",
    "usage",
    "usageSource",
    "cost",
    "createdAt",
    "revision",
    "effectiveUsage",
    "effectiveCost",
    "costDifference",
    "effectiveUsageSource"
  ],
  "additionalProperties": false
}

ModelInvocationPage ​

字段类型本层必填默认值与约束
items数组:ModelInvocation是—
summaryModelAccountingSummary是—
totalinteger是minimum: 0;maximum: 1000000
limitinteger是minimum: 1;maximum: 100
offsetinteger是minimum: 0;maximum: 1000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ModelInvocation"
      }
    },
    "summary": {
      "$ref": "#/components/schemas/ModelAccountingSummary"
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "items",
    "summary",
    "total",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}

ModelHealthPolicy ​

字段类型本层必填默认值与约束
failureThresholdinteger是minimum: 1;maximum: 20
failureWindowSecondsinteger是minimum: 10;maximum: 3600
openSecondsinteger是minimum: 1;maximum: 3600
probeIntervalSecondsinteger是minimum: 10;maximum: 3600
probeTimeoutSecondsinteger是minimum: 1;maximum: 10
probesPerMinuteinteger是minimum: 1;maximum: 60
autoProbeboolean是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "failureThreshold": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "failureWindowSeconds": {
      "type": "integer",
      "minimum": 10,
      "maximum": 3600
    },
    "openSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3600
    },
    "probeIntervalSeconds": {
      "type": "integer",
      "minimum": 10,
      "maximum": 3600
    },
    "probeTimeoutSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "probesPerMinute": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60
    },
    "autoProbe": {
      "type": "boolean"
    }
  },
  "required": [
    "failureThreshold",
    "failureWindowSeconds",
    "openSeconds",
    "probeIntervalSeconds",
    "probeTimeoutSeconds",
    "probesPerMinute",
    "autoProbe"
  ],
  "additionalProperties": false
}

ModelHealthState ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
modelobject是不允许额外字段
model.idstring是—
model.versionstring是—
model.scopestring是—
providerobject是不允许额外字段
provider.idstring是—
provider.versionstring是—
provider.scopestring是—
bindingRef是—
state枚举是enum: ["CLOSED","OPEN","HALF_OPEN","BLOCKED"]
generationinteger是minimum: 1;maximum: 2147483647
revisioninteger是minimum: 1;maximum: 2147483647
readyAtinteger是minimum: 0;maximum: 9223372036854776000
lastProbeAtinteger是minimum: 0;maximum: 9223372036854776000
activeProbeobject / null是不允许额外字段
activeProbe.idstring是—
activeProbe.expiresAtinteger是minimum: 0;maximum: 9223372036854776000
policyModelHealthPolicy是—
recentFailuresinteger是minimum: 0;maximum: 20
updatedAtinteger否minimum: 0;maximum: 9223372036854776000
lastSuccessAtinteger否minimum: 0;maximum: 9223372036854776000
lastFailureAtinteger否minimum: 0;maximum: 9223372036854776000
lastErrorCodestring / null否—
lastResetReasonstring否—
lastProbeIdstring否—
lastProbeFinishedAtinteger否minimum: 0;maximum: 9223372036854776000
verifiedChecks数组:object否maxItems: 4
verifiedChecks[].check枚举是enum: ["TEXT","TOOL_CALLING","STREAMING","STRUCTURED_OUTPUT"]
verifiedChecks[].status枚举是enum: ["PASSED","FAILED","UNSUPPORTED","UNKNOWN","SKIPPED","PENDING"]
verifiedChecks[].checkedAtinteger是minimum: 0;maximum: 9223372036854776000
verifiedChecks[].evidencestring是const: "SYNTHETIC_PROBE"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "provider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "binding": {
      "$ref": "#/components/schemas/Ref"
    },
    "state": {
      "enum": [
        "CLOSED",
        "OPEN",
        "HALF_OPEN",
        "BLOCKED"
      ]
    },
    "generation": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "readyAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "lastProbeAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "activeProbe": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "expiresAt": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9223372036854776000
        }
      },
      "required": [
        "id",
        "expiresAt"
      ],
      "additionalProperties": false
    },
    "policy": {
      "$ref": "#/components/schemas/ModelHealthPolicy"
    },
    "recentFailures": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20
    },
    "updatedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "lastSuccessAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "lastFailureAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "lastErrorCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastResetReason": {
      "type": "string"
    },
    "lastProbeId": {
      "type": "string"
    },
    "lastProbeFinishedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "verifiedChecks": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "type": "object",
        "properties": {
          "check": {
            "enum": [
              "TEXT",
              "TOOL_CALLING",
              "STREAMING",
              "STRUCTURED_OUTPUT"
            ]
          },
          "status": {
            "enum": [
              "PASSED",
              "FAILED",
              "UNSUPPORTED",
              "UNKNOWN",
              "SKIPPED",
              "PENDING"
            ]
          },
          "checkedAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9223372036854776000
          },
          "evidence": {
            "const": "SYNTHETIC_PROBE"
          }
        },
        "required": [
          "check",
          "status",
          "checkedAt",
          "evidence"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "appId",
    "model",
    "provider",
    "binding",
    "state",
    "generation",
    "revision",
    "readyAt",
    "lastProbeAt",
    "activeProbe",
    "policy",
    "recentFailures"
  ],
  "additionalProperties": false
}

ModelProbeCheck ​

字段类型本层必填默认值与约束
check枚举是enum: ["TEXT","TOOL_CALLING","STREAMING","STRUCTURED_OUTPUT"]
status枚举是enum: ["PENDING","PASSED","FAILED","UNSUPPORTED","UNKNOWN","SKIPPED"]
sendState枚举是enum: ["NOT_SENT","SENT"]
usageModelProviderUsage是—
costobject / null是不允许额外字段
cost.sourcestring是const: "configured-pricing"
cost.amountsobject是—
sentAtinteger否minimum: 0;maximum: 9223372036854776000
receiptAtinteger否minimum: 0;maximum: 9223372036854776000
errorCodestring否—
latencyMsinteger否minimum: 0;maximum: 9223372036854776000
responseCompletedboolean否供应商响应已按协议完整终结;仅完整回执允许自动释放费用预留
完整机器定义
json
{
  "type": "object",
  "properties": {
    "check": {
      "enum": [
        "TEXT",
        "TOOL_CALLING",
        "STREAMING",
        "STRUCTURED_OUTPUT"
      ]
    },
    "status": {
      "enum": [
        "PENDING",
        "PASSED",
        "FAILED",
        "UNSUPPORTED",
        "UNKNOWN",
        "SKIPPED"
      ]
    },
    "sendState": {
      "enum": [
        "NOT_SENT",
        "SENT"
      ]
    },
    "usage": {
      "$ref": "#/components/schemas/ModelProviderUsage"
    },
    "cost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "source": {
          "const": "configured-pricing"
        },
        "amounts": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "source",
        "amounts"
      ],
      "additionalProperties": false
    },
    "sentAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "receiptAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "errorCode": {
      "type": "string"
    },
    "latencyMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "responseCompleted": {
      "type": "boolean",
      "description": "供应商响应已按协议完整终结;仅完整回执允许自动释放费用预留"
    }
  },
  "required": [
    "check",
    "status",
    "sendState",
    "usage",
    "cost"
  ],
  "additionalProperties": false
}

ModelProbe ​

字段类型本层必填默认值与约束
idstring是—
healthIdstring是—
appIdstring是—
bindingRef是—
modelobject是不允许额外字段
model.idstring是—
model.versionstring是—
model.scopestring是—
providerobject是不允许额外字段
provider.idstring是—
provider.versionstring是—
provider.scopestring是—
createdAtinteger是minimum: 0;maximum: 9223372036854776000
status枚举是enum: ["RUNNING","COMPLETED","UNKNOWN","SUPERSEDED"]
generationinteger是minimum: 1;maximum: 2147483647
checks数组:ModelProbeCheck是minItems: 1;maxItems: 4
reasonstring是minLength: 1;maxLength: 512
requestedBystring是—
maxOutputTokensPerCheckinteger是minimum: 1;maximum: 32
pricingobject是—
pricingVersionstring是—
evidencestring是const: "SYNTHETIC_PROBE"
finishedAtinteger否minimum: 0;maximum: 9223372036854776000
errorCodestring否—
priorHealthStatestring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "healthId": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "binding": {
      "$ref": "#/components/schemas/Ref"
    },
    "model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "provider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "scope"
      ],
      "additionalProperties": false
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "status": {
      "enum": [
        "RUNNING",
        "COMPLETED",
        "UNKNOWN",
        "SUPERSEDED"
      ]
    },
    "generation": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "checks": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "items": {
        "$ref": "#/components/schemas/ModelProbeCheck"
      }
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "requestedBy": {
      "type": "string"
    },
    "maxOutputTokensPerCheck": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32
    },
    "pricing": {
      "type": "object",
      "additionalProperties": true
    },
    "pricingVersion": {
      "type": "string"
    },
    "evidence": {
      "const": "SYNTHETIC_PROBE"
    },
    "finishedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    },
    "errorCode": {
      "type": "string"
    },
    "priorHealthState": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "healthId",
    "appId",
    "binding",
    "model",
    "provider",
    "createdAt",
    "status",
    "generation",
    "checks",
    "reason",
    "requestedBy",
    "maxOutputTokensPerCheck",
    "pricing",
    "pricingVersion",
    "evidence"
  ],
  "additionalProperties": false
}

ModelProbeRequest ​

字段类型本层必填默认值与约束
checks数组:枚举是minItems: 1;maxItems: 4;uniqueItems: true;必须包含 TEXT;固定合成提示词,不执行业务工具。
reasonstring是minLength: 1;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "properties": {
    "checks": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "uniqueItems": true,
      "items": {
        "enum": [
          "TEXT",
          "TOOL_CALLING",
          "STREAMING",
          "STRUCTURED_OUTPUT"
        ]
      },
      "description": "必须包含 TEXT;固定合成提示词,不执行业务工具。"
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "required": [
    "checks",
    "reason"
  ],
  "additionalProperties": false
}

ModelHealthResetRequest ​

字段类型本层必填默认值与约束
reasonstring是minLength: 1;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "required": [
    "reason"
  ],
  "additionalProperties": false
}

ModelProbeResult ​

字段类型本层必填默认值与约束
probeModelProbe是—
healthModelHealthState是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "probe": {
      "$ref": "#/components/schemas/ModelProbe"
    },
    "health": {
      "$ref": "#/components/schemas/ModelHealthState"
    }
  },
  "required": [
    "probe",
    "health"
  ],
  "additionalProperties": false
}

ModelProbePage ​

字段类型本层必填默认值与约束
items数组:ModelProbe是—
totalinteger是minimum: 0;maximum: 2147483647
limitinteger是minimum: 1;maximum: 100
offsetinteger是minimum: 0;maximum: 1000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ModelProbe"
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}

RemoteModelUsage ​

字段类型本层必填默认值与约束
prompt_tokensinteger否minimum: 0;maximum: 1000000000
completion_tokensinteger否minimum: 0;maximum: 1000000000
total_tokensinteger否minimum: 0;maximum: 1000000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "prompt_tokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "completion_tokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "total_tokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    }
  },
  "required": [],
  "additionalProperties": false
}

RemoteModelToolCall ​

字段类型本层必填默认值与约束
idstring是minLength: 1;maxLength: 128;pattern: "\S"
typestring是const: "function"
functionobject是不允许额外字段
function.namestring是minLength: 1;maxLength: 128;pattern: "\S"
function.argumentsstring是完整闭合 JSON 对象,拒绝重复属性、尾随 JSON 与 null
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "\\S"
    },
    "type": {
      "const": "function"
    },
    "function": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "\\S"
        },
        "arguments": {
          "type": "string",
          "description": "完整闭合 JSON 对象,拒绝重复属性、尾随 JSON 与 null"
        }
      },
      "required": [
        "name",
        "arguments"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "type",
    "function"
  ],
  "additionalProperties": false
}

RemoteModelMessage ​

字段类型本层必填默认值与约束
role枚举是enum: ["system","user","assistant","tool"]
contentstring / null否—
tool_calls数组:RemoteModelToolCall否maxItems: 16
tool_call_idstring否minLength: 1;maxLength: 128;pattern: "\S"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "role": {
      "enum": [
        "system",
        "user",
        "assistant",
        "tool"
      ]
    },
    "content": {
      "type": [
        "string",
        "null"
      ]
    },
    "tool_calls": {
      "type": "array",
      "maxItems": 16,
      "items": {
        "$ref": "#/components/schemas/RemoteModelToolCall"
      }
    },
    "tool_call_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "\\S"
    }
  },
  "required": [
    "role"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "role": {
            "const": "tool"
          }
        }
      },
      "then": {
        "required": [
          "tool_call_id"
        ]
      },
      "else": {
        "not": {
          "required": [
            "tool_call_id"
          ]
        }
      }
    },
    {
      "if": {
        "properties": {
          "role": {
            "const": "assistant"
          }
        }
      },
      "then": {
        "anyOf": [
          {
            "required": [
              "content"
            ],
            "properties": {
              "content": {
                "type": "string"
              }
            }
          },
          {
            "required": [
              "tool_calls"
            ],
            "properties": {
              "tool_calls": {
                "minItems": 1
              }
            }
          }
        ]
      },
      "else": {
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          }
        },
        "not": {
          "required": [
            "tool_calls"
          ]
        }
      }
    }
  ]
}

RemoteModelRequest ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
invocationIdstring是minLength: 1;maxLength: 256;pattern: "\S"
deadlineinteger是minimum: 1;maximum: 9223372036854776000;绝对 UTC 毫秒;回调最多等待 60 秒
purpose枚举是enum: ["BUSINESS","SYNTHETIC_PROBE"]
appIdstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
subjectIdstring否minLength: 1;maxLength: 256;pattern: "\S"
tenantIdstring否—
runIdstring否minLength: 1;maxLength: 256;pattern: "\S"
traceIdstring否minLength: 1;maxLength: 256;pattern: "\S"
modelstring是minLength: 1;maxLength: 128;pattern: "\S"
messages数组:RemoteModelMessage是minItems: 1;maxItems: 256
tools数组:object否maxItems: 128
max_completion_tokensinteger是minimum: 1;maximum: 10000000
streamboolean是—
response_formatobject否—
tool_choice对象否合成探测或受控模型请求中的工具选择
temperaturenumber否minimum: 0;maximum: 2
top_pnumber否maximum: 1;exclusiveMinimum: 0
seedinteger否minimum: 0;maximum: 9223372036854776000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "invocationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "\\S"
    },
    "deadline": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9223372036854776000,
      "description": "绝对 UTC 毫秒;回调最多等待 60 秒"
    },
    "purpose": {
      "enum": [
        "BUSINESS",
        "SYNTHETIC_PROBE"
      ]
    },
    "appId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "\\S"
    },
    "tenantId": {
      "type": "string"
    },
    "runId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "\\S"
    },
    "traceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "\\S"
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "\\S"
    },
    "messages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 256,
      "items": {
        "$ref": "#/components/schemas/RemoteModelMessage"
      }
    },
    "tools": {
      "type": "array",
      "maxItems": 128,
      "items": {
        "type": "object"
      }
    },
    "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000000
    },
    "stream": {
      "type": "boolean"
    },
    "response_format": {
      "type": "object"
    },
    "tool_choice": {
      "description": "合成探测或受控模型请求中的工具选择"
    },
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
    },
    "top_p": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "seed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9223372036854776000
    }
  },
  "required": [
    "protocolVersion",
    "invocationId",
    "deadline",
    "purpose",
    "appId",
    "model",
    "messages",
    "max_completion_tokens",
    "stream"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "purpose": {
            "const": "BUSINESS"
          }
        }
      },
      "then": {
        "required": [
          "subjectId",
          "tenantId",
          "runId",
          "traceId"
        ]
      },
      "else": {
        "not": {
          "anyOf": [
            {
              "required": [
                "subjectId"
              ]
            },
            {
              "required": [
                "tenantId"
              ]
            },
            {
              "required": [
                "runId"
              ]
            },
            {
              "required": [
                "traceId"
              ]
            }
          ]
        }
      }
    }
  ],
  "description": "REMOTE 1.0 回调;平台出站认证,SDK 独立凭据与消费应用白名单验证。JSON 正文最大 1 MiB;身份来自平台授权。"
}

RemoteModelResponse ​

字段类型本层必填默认值与约束
message对象是—
usageRemoteModelUsage是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "message": {
      "allOf": [
        {
          "$ref": "#/components/schemas/RemoteModelMessage"
        },
        {
          "properties": {
            "role": {
              "const": "assistant"
            }
          }
        }
      ]
    },
    "usage": {
      "$ref": "#/components/schemas/RemoteModelUsage"
    }
  },
  "required": [
    "message",
    "usage"
  ],
  "additionalProperties": false
}

RemoteModelTextDelta ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
typestring是const: "text.delta"
textstring是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "type": {
      "const": "text.delta"
    },
    "text": {
      "type": "string"
    }
  },
  "required": [
    "protocolVersion",
    "type",
    "text"
  ],
  "additionalProperties": false
}

RemoteModelToolDelta ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
typestring是const: "tool.delta"
indexinteger是minimum: 0;maximum: 15
idstring否minLength: 1;maxLength: 128;pattern: "\S"
namestring否minLength: 1;maxLength: 128;pattern: "\S"
argumentsstring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "type": {
      "const": "tool.delta"
    },
    "index": {
      "type": "integer",
      "minimum": 0,
      "maximum": 15
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "\\S"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "\\S"
    },
    "arguments": {
      "type": "string"
    }
  },
  "required": [
    "protocolVersion",
    "type",
    "index"
  ],
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "id"
      ]
    },
    {
      "required": [
        "name"
      ]
    },
    {
      "required": [
        "arguments"
      ]
    }
  ]
}

RemoteModelUsageDelta ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
typestring是const: "usage"
usageRemoteModelUsage是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "type": {
      "const": "usage"
    },
    "usage": {
      "$ref": "#/components/schemas/RemoteModelUsage"
    }
  },
  "required": [
    "protocolVersion",
    "type",
    "usage"
  ],
  "additionalProperties": false
}

RemoteModelCompleted ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
typestring是const: "model.completed"
finishReason枚举是enum: ["STOP","TOOL_CALLS","LENGTH"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "type": {
      "const": "model.completed"
    },
    "finishReason": {
      "enum": [
        "STOP",
        "TOOL_CALLS",
        "LENGTH"
      ]
    }
  },
  "required": [
    "protocolVersion",
    "type",
    "finishReason"
  ],
  "additionalProperties": false
}

RemoteModelError ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
typestring是const: "model.error"
code枚举是enum: ["MODEL_UNAVAILABLE","MODEL_TIMED_OUT","MODEL_RATE_LIMITED","MODEL_AUTH_FAILED","MODEL_REQUEST_REJECTED","MODEL_FEATURE_UNSUPPORTED","MODEL_PROTOCOL_ERROR"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "type": {
      "const": "model.error"
    },
    "code": {
      "enum": [
        "MODEL_UNAVAILABLE",
        "MODEL_TIMED_OUT",
        "MODEL_RATE_LIMITED",
        "MODEL_AUTH_FAILED",
        "MODEL_REQUEST_REJECTED",
        "MODEL_FEATURE_UNSUPPORTED",
        "MODEL_PROTOCOL_ERROR"
      ]
    }
  },
  "required": [
    "protocolVersion",
    "type",
    "code"
  ],
  "additionalProperties": false
}

RemoteModelStreamFrame ​

类型:RemoteModelTextDelta / RemoteModelToolDelta / RemoteModelUsageDelta / RemoteModelCompleted / RemoteModelError。每个 JSON 对象为一条 data: SSE 帧;必须明确终结,拒绝 [DONE]、未知帧/字段、重复终结和截断。最大 4 MiB;工具参数拼接后必须是闭合 JSON 对象。

完整机器定义
json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/RemoteModelTextDelta"
    },
    {
      "$ref": "#/components/schemas/RemoteModelToolDelta"
    },
    {
      "$ref": "#/components/schemas/RemoteModelUsageDelta"
    },
    {
      "$ref": "#/components/schemas/RemoteModelCompleted"
    },
    {
      "$ref": "#/components/schemas/RemoteModelError"
    }
  ],
  "description": "每个 JSON 对象为一条 data: SSE 帧;必须明确终结,拒绝 [DONE]、未知帧/字段、重复终结和截断。最大 4 MiB;工具参数拼接后必须是闭合 JSON 对象。"
}

RemoteModelFailure ​

字段类型本层必填默认值与约束
errorobject是不允许额外字段
error.code枚举是enum: ["MODEL_UNAVAILABLE","MODEL_TIMED_OUT","MODEL_RATE_LIMITED","MODEL_AUTH_FAILED","MODEL_REQUEST_REJECTED","MODEL_FEATURE_UNSUPPORTED","MODEL_PROTOCOL_ERROR"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "MODEL_UNAVAILABLE",
            "MODEL_TIMED_OUT",
            "MODEL_RATE_LIMITED",
            "MODEL_AUTH_FAILED",
            "MODEL_REQUEST_REJECTED",
            "MODEL_FEATURE_UNSUPPORTED",
            "MODEL_PROTOCOL_ERROR"
          ]
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "error"
  ],
  "additionalProperties": false,
  "description": "REMOTE 非 2xx 的受控错误合同;平台优先读取代码,错误正文不进入用户事件。协议/认证错误不因 HTTP 5xx 变成可重试故障。"
}

QuotaPolicy ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
scopestring是enum: ["APP","TENANT","USER","MODEL"]
valuestring否default: "*";minLength: 1;maxLength: 256;USER 通配按可信 tenantId/subjectId 分桶;MODEL 为 scope/models/id@version 或 *
periodstring是enum: ["MINUTE","HOUR","DAY","MONTH"];UTC 固定窗口,多条规则同时生效
enabledboolean否default: true
maxAmountstring否pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
currencystring否pattern: "^[A-Z]{3}$"
unknownPriceModestring否enum: ["REJECT","SEPARATE"];金额规则必须 REJECT;SEPARATE 必须另设未知价请求额度,不能带 maxAmount
maxConcurrentRunsinteger否minimum: 0;maximum: 1000000000000
maxRunRequestsinteger否minimum: 0;maximum: 1000000000000
maxConcurrentModelsinteger否minimum: 0;maximum: 1000000000000
maxModelRequestsinteger否minimum: 0;maximum: 1000000000000
maxTokensinteger否minimum: 0;maximum: 1000000000000
maxUnpricedRequestsinteger否minimum: 0;maximum: 1000000000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "scope": {
      "type": "string",
      "enum": [
        "APP",
        "TENANT",
        "USER",
        "MODEL"
      ]
    },
    "value": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "default": "*",
      "description": "USER 通配按可信 tenantId/subjectId 分桶;MODEL 为 scope/models/id@version 或 *"
    },
    "period": {
      "type": "string",
      "enum": [
        "MINUTE",
        "HOUR",
        "DAY",
        "MONTH"
      ],
      "description": "UTC 固定窗口,多条规则同时生效"
    },
    "enabled": {
      "type": "boolean",
      "default": true
    },
    "maxAmount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "unknownPriceMode": {
      "type": "string",
      "enum": [
        "REJECT",
        "SEPARATE"
      ],
      "description": "金额规则必须 REJECT;SEPARATE 必须另设未知价请求额度,不能带 maxAmount"
    },
    "maxConcurrentRuns": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "maxRunRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "maxConcurrentModels": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "maxModelRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "maxTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "maxUnpricedRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000000
    }
  },
  "required": [
    "id",
    "scope",
    "period"
  ],
  "additionalProperties": false,
  "description": "至少一个上限;零代表禁止。MODEL 不接受 Run 上限,币种须与模型价目一致。已有策略范围/周期/币种不可修改。token/金额预留要求 capabilities.contextWindow,计量以完整终结回执或对账为准。"
}

QuotaConfigurationRequest ​

字段类型本层必填默认值与约束
policies数组:QuotaPolicy是maxItems: 64
reasonstring是minLength: 1;maxLength: 1024
完整机器定义
json
{
  "type": "object",
  "properties": {
    "policies": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/QuotaPolicy"
      },
      "maxItems": 64
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    }
  },
  "required": [
    "policies",
    "reason"
  ],
  "additionalProperties": false
}

QuotaConfiguration ​

字段类型本层必填默认值与约束
appIdstring是—
revisioninteger是minimum: 0
policies数组:QuotaPolicy是—
reasonstring否—
updatedAtinteger否minimum: 0;maximum: 9000000000000000
updatedBystring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "appId": {
      "type": "string"
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "policies": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/QuotaPolicy"
      }
    },
    "reason": {
      "type": "string"
    },
    "updatedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "updatedBy": {
      "type": "string"
    }
  },
  "required": [
    "appId",
    "revision",
    "policies"
  ],
  "additionalProperties": false
}

QuotaBucket ​

字段类型本层必填默认值与约束
periodStartinteger是minimum: 0;maximum: 9000000000000000
periodEndinteger是minimum: 0;maximum: 9000000000000000
runRequestsinteger是minimum: 0;maximum: 9000000000000000
modelRequestsinteger是minimum: 0;maximum: 9000000000000000
unpricedRequestsinteger是minimum: 0;maximum: 9000000000000000
heldTokensinteger是minimum: 0;maximum: 9000000000000000
chargedTokensinteger是minimum: 0;maximum: 9000000000000000
idstring是—
appIdstring是—
policyIdstring是—
scopeKeystring是—
scopestring是—
periodstring是enum: ["MINUTE","HOUR","DAY","MONTH","RUN"]
subjectIdstring / null是—
tenantIdstring / null是—
modelstring / null是—
currencystring / null是—
heldAmountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
chargedAmountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
runIdstring否—
agentCallIdstring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "periodStart": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "periodEnd": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "runRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "modelRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "unpricedRequests": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "heldTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "chargedTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "policyId": {
      "type": "string"
    },
    "scopeKey": {
      "type": "string"
    },
    "scope": {
      "type": "string"
    },
    "period": {
      "type": "string",
      "enum": [
        "MINUTE",
        "HOUR",
        "DAY",
        "MONTH",
        "RUN"
      ]
    },
    "subjectId": {
      "type": [
        "string",
        "null"
      ]
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "heldAmount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    },
    "chargedAmount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    },
    "runId": {
      "type": "string"
    },
    "agentCallId": {
      "type": "string"
    }
  },
  "required": [
    "periodStart",
    "periodEnd",
    "runRequests",
    "modelRequests",
    "unpricedRequests",
    "heldTokens",
    "chargedTokens",
    "id",
    "appId",
    "policyId",
    "scopeKey",
    "scope",
    "period",
    "subjectId",
    "tenantId",
    "model",
    "currency",
    "heldAmount",
    "chargedAmount"
  ],
  "additionalProperties": false,
  "description": "RUN 桶是内部根与子智能体调用额度,固定使用原始任务周期;公开策略仍只允许 UTC 分钟、小时、日、月。调用预留与应用预留原子登记,未知用量保留额度。"
}

QuotaReservationPart ​

字段类型本层必填默认值与约束
bucketIdstring是—
scopeKeystring是—
policyIdstring是—
tokenBudgetboolean是—
moneyBudgetboolean是—
currencystring / null是—
heldTokensinteger是minimum: 0;maximum: 9000000000000000
chargedTokensinteger是minimum: 0;maximum: 9000000000000000
heldAmountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
chargedAmountstring是pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "bucketId": {
      "type": "string"
    },
    "scopeKey": {
      "type": "string"
    },
    "policyId": {
      "type": "string"
    },
    "tokenBudget": {
      "type": "boolean"
    },
    "moneyBudget": {
      "type": "boolean"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "heldTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "chargedTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "heldAmount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    },
    "chargedAmount": {
      "type": "string",
      "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
    }
  },
  "required": [
    "bucketId",
    "scopeKey",
    "policyId",
    "tokenBudget",
    "moneyBudget",
    "currency",
    "heldTokens",
    "chargedTokens",
    "heldAmount",
    "chargedAmount"
  ],
  "additionalProperties": false
}

QuotaReservation ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
runIdstring是—
modelstring是—
probeIdstring是—
probeCheckstring是—
purposestring是enum: ["BUSINESS","SYNTHETIC_PROBE"]
statusstring是enum: ["HELD","UNKNOWN","SETTLED"]
subjectIdstring / null是—
tenantIdstring / null是—
createdAtinteger是minimum: 0;maximum: 9000000000000000
deadlineinteger是minimum: 0;maximum: 9000000000000000
finishedAtinteger否minimum: 0;maximum: 9000000000000000
configRevisioninteger是minimum: 0;maximum: 9000000000000000
revisioninteger是minimum: 0;maximum: 9000000000000000
pricingobject是固定发布模型价目;未知价为空对象
parts数组:QuotaReservationPart是—
providerUsageModelProviderUsage否—
billedCostobject / null否不允许额外字段
billedCost.currencystring否—
billedCost.amountstring否pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$"
usageSourcestring否—
reconciliationHistory数组:object否maxItems: 100
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "runId": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "probeId": {
      "type": "string"
    },
    "probeCheck": {
      "type": "string"
    },
    "purpose": {
      "type": "string",
      "enum": [
        "BUSINESS",
        "SYNTHETIC_PROBE"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "HELD",
        "UNKNOWN",
        "SETTLED"
      ]
    },
    "subjectId": {
      "type": [
        "string",
        "null"
      ]
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "deadline": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "finishedAt": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "configRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "pricing": {
      "type": "object",
      "description": "固定发布模型价目;未知价为空对象"
    },
    "parts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/QuotaReservationPart"
      }
    },
    "providerUsage": {
      "$ref": "#/components/schemas/ModelProviderUsage"
    },
    "billedCost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string",
          "pattern": "^[0-9]{1,13}(\\.[0-9]{1,12})?$"
        }
      },
      "additionalProperties": false
    },
    "usageSource": {
      "type": "string"
    },
    "reconciliationHistory": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "maxItems": 100
    }
  },
  "required": [
    "id",
    "appId",
    "runId",
    "model",
    "purpose",
    "status",
    "createdAt",
    "deadline",
    "configRevision",
    "revision",
    "pricing",
    "parts",
    "probeId",
    "probeCheck",
    "subjectId",
    "tenantId"
  ],
  "additionalProperties": false,
  "description": "BUSINESS 在模型调用账本对账;合成探测通过预留对账,仅修正预算事实,不修改探测原回执或健康结论。"
}

QuotaUsagePage ​

字段类型本层必填默认值与约束
items数组:QuotaBucket是—
totalinteger是minimum: 0;maximum: 9000000000000000
limitinteger是minimum: 1;maximum: 100
offsetinteger是minimum: 0;maximum: 1000000
nowinteger是minimum: 0;maximum: 9000000000000000
accountingstring是const: "CONFIGURED_PRICING_WITH_PROVIDER_RECONCILIATION"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/QuotaBucket"
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "now": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "accounting": {
      "type": "string",
      "const": "CONFIGURED_PRICING_WITH_PROVIDER_RECONCILIATION"
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset",
    "now",
    "accounting"
  ],
  "additionalProperties": false
}

QuotaReservationPage ​

字段类型本层必填默认值与约束
items数组:QuotaReservation是—
totalinteger是minimum: 0;maximum: 9000000000000000
limitinteger是minimum: 1;maximum: 100
offsetinteger是minimum: 0;maximum: 1000000
nowinteger是minimum: 0;maximum: 9000000000000000
accountingstring是const: "CONFIGURED_PRICING_WITH_PROVIDER_RECONCILIATION"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/QuotaReservation"
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "now": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9000000000000000
    },
    "accounting": {
      "type": "string",
      "const": "CONFIGURED_PRICING_WITH_PROVIDER_RECONCILIATION"
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset",
    "now",
    "accounting"
  ],
  "additionalProperties": false
}

AgentBudgetUsage ​

字段类型本层必填默认值与约束
stepsinteger是minimum: 0;maximum: 32
toolCallsinteger是minimum: 0;maximum: 64
agentCallsinteger是minimum: 0;maximum: 64
budgetUnitsinteger是minimum: 0;maximum: 1000000
modelInvocationIds数组:string是maxItems: 256;uniqueItems: true
citationIds数组:string是maxItems: 256;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "properties": {
    "steps": {
      "type": "integer",
      "minimum": 0,
      "maximum": 32
    },
    "toolCalls": {
      "type": "integer",
      "minimum": 0,
      "maximum": 64
    },
    "agentCalls": {
      "type": "integer",
      "minimum": 0,
      "maximum": 64
    },
    "budgetUnits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "modelInvocationIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true,
      "maxItems": 256
    },
    "citationIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true,
      "maxItems": 256
    }
  },
  "additionalProperties": false,
  "required": [
    "steps",
    "toolCalls",
    "agentCalls",
    "budgetUnits",
    "modelInvocationIds",
    "citationIds"
  ]
}

AgentResult ​

字段类型本层必填默认值与约束
agentCallIdstring是minLength: 1
parentAgentCallIdstring / null是—
depthinteger是minimum: 0;maximum: 8
agentIdstring是minLength: 1
agentVersionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
statusstring是const: "SUCCEEDED"
textstring是—
outputobject / object是—
usageAgentBudgetUsage是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "agentCallId": {
      "type": "string",
      "minLength": 1
    },
    "parentAgentCallId": {
      "type": [
        "string",
        "null"
      ]
    },
    "depth": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8
    },
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "agentVersion": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
    },
    "status": {
      "const": "SUCCEEDED"
    },
    "text": {
      "type": "string"
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "TEXT"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "value"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "JSON"
            },
            "value": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "required": [
            "type",
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "usage": {
      "$ref": "#/components/schemas/AgentBudgetUsage"
    }
  },
  "additionalProperties": false,
  "required": [
    "agentCallId",
    "parentAgentCallId",
    "depth",
    "agentId",
    "agentVersion",
    "status",
    "text",
    "output",
    "usage"
  ]
}

KnowledgeFilter ​

字段类型本层必填默认值与约束
appIdstring是minLength: 1;maxLength: 64;pattern: "^[a-z][a-z0-9-]{0,63}$"
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring是minLength: 0;maxLength: 128
required数组:枚举是maxItems: 2;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "properties": {
    "appId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    },
    "required": {
      "type": "array",
      "items": {
        "enum": [
          "TENANT",
          "SUBJECT"
        ]
      },
      "uniqueItems": true,
      "maxItems": 2
    }
  },
  "required": [
    "appId",
    "subjectId",
    "tenantId",
    "required"
  ],
  "additionalProperties": false
}

KnowledgeSource ​

字段类型本层必填默认值与约束
type枚举是enum: ["DOCUMENT","URL","INLINE"]
idstring是minLength: 1;maxLength: 128
uristring否minLength: 1;maxLength: 2048;pattern: "^https?😕/"
versionstring否minLength: 0;maxLength: 128
pageinteger否minimum: 1;maximum: 1000000
locatorstring否minLength: 0;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "properties": {
    "type": {
      "enum": [
        "DOCUMENT",
        "URL",
        "INLINE"
      ]
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "uri": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^https?://"
    },
    "version": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "locator": {
      "type": "string",
      "minLength": 0,
      "maxLength": 512
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "type": {
            "const": "URL"
          }
        },
        "required": [
          "type"
        ]
      },
      "then": {
        "required": [
          "uri"
        ]
      }
    }
  ]
}

KnowledgeItem ​

字段类型本层必填默认值与约束
idstring是minLength: 1;maxLength: 128;pattern: "^[a-zA-Z0-9_.:-]{1,128}$"
documentIdstring否minLength: 1;maxLength: 128;pattern: "^[a-zA-Z0-9_.:-]{1,128}$"
contentstring是minLength: 1;maxLength: 16384
titlestring否minLength: 0;maxLength: 512
sourceKnowledgeSource是—
scorenumber否minimum: 0;maximum: 1
metadataobject否最多 4096 UTF-8 字节、嵌套深度 8;有限 JSON 值。
tenantIdstring否minLength: 0;maxLength: 128
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_.:-]{1,128}$"
    },
    "documentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_.:-]{1,128}$"
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "title": {
      "type": "string",
      "minLength": 0,
      "maxLength": 512
    },
    "source": {
      "$ref": "#/components/schemas/KnowledgeSource"
    },
    "score": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true,
      "description": "最多 4096 UTF-8 字节、嵌套深度 8;有限 JSON 值。"
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    }
  },
  "required": [
    "id",
    "content",
    "source"
  ],
  "additionalProperties": false
}

KnowledgeCallbackRequest ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
appIdstring是minLength: 1;maxLength: 64
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring是minLength: 0;maxLength: 128
knowledgeIdstring是minLength: 1;maxLength: 64
versionstring是minLength: 1;maxLength: 64
querystring是minLength: 1;maxLength: 16384
topKinteger是minimum: 1;maximum: 10
filtersKnowledgeFilter是—
runIdstring是minLength: 1;maxLength: 128
traceIdstring是minLength: 1;maxLength: 128
executionIdstring是minLength: 1;maxLength: 128
deadlineinteger是minimum: 1;maximum: 9223372036854776000
trustedContextobject是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "appId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    },
    "knowledgeId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "filters": {
      "$ref": "#/components/schemas/KnowledgeFilter"
    },
    "runId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "traceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "executionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "deadline": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9223372036854776000
    },
    "trustedContext": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "protocolVersion",
    "appId",
    "subjectId",
    "tenantId",
    "knowledgeId",
    "version",
    "query",
    "topK",
    "filters",
    "runId",
    "traceId",
    "executionId",
    "deadline",
    "trustedContext"
  ],
  "additionalProperties": false
}

KnowledgeCallbackResult ​

字段类型本层必填默认值与约束
protocolVersionstring是const: "1.0"
items数组:KnowledgeItem是maxItems: 100
appliedFilters数组:枚举是maxItems: 2;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "properties": {
    "protocolVersion": {
      "const": "1.0"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeItem"
      },
      "maxItems": 100
    },
    "appliedFilters": {
      "type": "array",
      "items": {
        "enum": [
          "TENANT",
          "SUBJECT"
        ]
      },
      "uniqueItems": true,
      "maxItems": 2
    }
  },
  "required": [
    "protocolVersion",
    "items",
    "appliedFilters"
  ],
  "additionalProperties": false,
  "description": "完整结果上限 1 MiB;id 不重复。空结果正常无匹配;必须确认定义要求的全部过滤。"
}

KnowledgeCallbackError ​

字段类型本层必填默认值与约束
errorobject是不允许额外字段
error.code枚举是enum: ["KNOWLEDGE_ACCESS_DENIED","KNOWLEDGE_TIMED_OUT","KNOWLEDGE_UNAVAILABLE","KNOWLEDGE_RATE_LIMITED","KNOWLEDGE_REQUEST_REJECTED","KNOWLEDGE_PROTOCOL_ERROR"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "KNOWLEDGE_ACCESS_DENIED",
            "KNOWLEDGE_TIMED_OUT",
            "KNOWLEDGE_UNAVAILABLE",
            "KNOWLEDGE_RATE_LIMITED",
            "KNOWLEDGE_REQUEST_REJECTED",
            "KNOWLEDGE_PROTOCOL_ERROR"
          ]
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "error"
  ],
  "additionalProperties": false
}

KnowledgeRouteRule ​

字段类型本层必填默认值与约束
knowledgeRef是—
queryTerms数组:string否maxItems: 16;uniqueItems: true
tags数组:string否maxItems: 16;uniqueItems: true
contextEqualsobject否—
priorityinteger否minimum: 0;maximum: 100
alwaysboolean否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "knowledge": {
      "$ref": "#/components/schemas/Ref"
    },
    "queryTerms": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "maxItems": 16,
      "uniqueItems": true
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "maxItems": 16,
      "uniqueItems": true
    },
    "contextEquals": {
      "type": "object",
      "maxProperties": 16,
      "propertyNames": {
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$"
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 0,
        "maxLength": 128
      }
    },
    "priority": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "always": {
      "type": "boolean"
    }
  },
  "required": [
    "knowledge"
  ],
  "additionalProperties": false,
  "description": "仅引用当前 Agent.allowedKnowledge 精确版本;条件需要 always=true、词项/标签或可信上下文。上下文与词项条件同时配置时共同匹配。规则来源不能重复。"
}

KnowledgeRoutingPolicy ​

字段类型本层必填默认值与约束
mode枚举否default: "AUTO";enum: ["EAGER","AUTO","ON_DEMAND"]
failurePolicy枚举否default: "FAIL_FAST";enum: ["FAIL_FAST","SKIP_TRANSIENT"]
rerank枚举否default: "NONE";enum: ["NONE","LEXICAL"]
maxSourcesinteger否minimum: 1;maximum: 16
topKinteger否minimum: 1;maximum: 50
maxRetrievalsinteger否minimum: 1;maximum: 64
maxQueriesPerSourceinteger否minimum: 1;maximum: 16
sourceTimeoutSecondsinteger否minimum: 1;maximum: 60
sourceMaxCharsinteger否minimum: 1;maximum: 65536
maxContextCharsinteger否minimum: 1;maximum: 65536
rules数组:KnowledgeRouteRule否maxItems: 64
完整机器定义
json
{
  "type": "object",
  "properties": {
    "mode": {
      "enum": [
        "EAGER",
        "AUTO",
        "ON_DEMAND"
      ],
      "default": "AUTO"
    },
    "failurePolicy": {
      "enum": [
        "FAIL_FAST",
        "SKIP_TRANSIENT"
      ],
      "default": "FAIL_FAST"
    },
    "rerank": {
      "enum": [
        "NONE",
        "LEXICAL"
      ],
      "default": "NONE"
    },
    "maxSources": {
      "type": "integer",
      "minimum": 1,
      "maximum": 16
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "maxRetrievals": {
      "type": "integer",
      "minimum": 1,
      "maximum": 64
    },
    "maxQueriesPerSource": {
      "type": "integer",
      "minimum": 1,
      "maximum": 16
    },
    "sourceTimeoutSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60
    },
    "sourceMaxChars": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "maxContextChars": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeRouteRule"
      },
      "maxItems": 64
    }
  },
  "required": [],
  "additionalProperties": false
}

KnowledgeSelectedSource ​

字段类型本层必填默认值与约束
idstring是minLength: 1;maxLength: 64
versionstring是minLength: 1;maxLength: 64
reason枚举是enum: ["MODEL_REQUEST","EAGER","RULE_ALWAYS","TRUSTED_CONTEXT","QUERY_MATCH","TAG_MATCH","DESCRIPTION_TAG_MATCH"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "reason": {
      "enum": [
        "MODEL_REQUEST",
        "EAGER",
        "RULE_ALWAYS",
        "TRUSTED_CONTEXT",
        "QUERY_MATCH",
        "TAG_MATCH",
        "DESCRIPTION_TAG_MATCH"
      ]
    }
  },
  "required": [
    "id",
    "version",
    "reason"
  ],
  "additionalProperties": false
}

DocumentChunkingPolicy ​

字段类型本层必填默认值与约束
strategy枚举否default: "CHARACTER";enum: ["CHARACTER","PARAGRAPH","MARKDOWN"]
maxCharsinteger否default: 2000;minimum: 128;maximum: 8192
overlapCharsinteger否default: 0;minimum: 0;maximum: 4096
preserveParagraphsboolean否—
preserveCodeBlocksboolean否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "strategy": {
      "enum": [
        "CHARACTER",
        "PARAGRAPH",
        "MARKDOWN"
      ],
      "default": "CHARACTER"
    },
    "maxChars": {
      "type": "integer",
      "minimum": 128,
      "maximum": 8192,
      "default": 2000
    },
    "overlapChars": {
      "type": "integer",
      "minimum": 0,
      "maximum": 4096,
      "default": 0
    },
    "preserveParagraphs": {
      "type": "boolean"
    },
    "preserveCodeBlocks": {
      "type": "boolean"
    }
  },
  "required": [],
  "additionalProperties": false,
  "description": "仅 MANAGED;overlapChars <= maxChars/2,非 CHARACTER 必须为 0。段落保护默认非 CHARACTER 启用;代码保护默认仅 MARKDOWN 启用。CHARACTER 不允许段落保护,非 MARKDOWN 不允许代码保护。缺省 chunking 保留旧 2000 字符策略。"
}

ManagedDocumentContent ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
textstring是minLength: 1;maxLength: 65536
titlestring否minLength: 0;maxLength: 512
sourcestring否minLength: 0;maxLength: 2048
tenantIdstring否minLength: 0;maxLength: 128
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536
    },
    "title": {
      "type": "string",
      "minLength": 0,
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "minLength": 0,
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    }
  },
  "required": [
    "id",
    "text"
  ],
  "additionalProperties": false
}

ManagedDocumentImport ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
textstring是minLength: 1;maxLength: 65536
titlestring否minLength: 0;maxLength: 512
sourcestring否minLength: 0;maxLength: 2048
tenantIdstring否minLength: 0;maxLength: 128
duplicatePolicy枚举否default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"]
expectedDocumentVersionstring否pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536
    },
    "title": {
      "type": "string",
      "minLength": 0,
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "minLength": 0,
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    },
    "duplicatePolicy": {
      "enum": [
        "UPSERT",
        "SKIP",
        "REJECT"
      ],
      "default": "UPSERT"
    },
    "expectedDocumentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "id",
    "text"
  ],
  "additionalProperties": false
}

ManagedDocumentResult ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
status枚举是enum: ["INDEXED","UNCHANGED","SKIPPED"]
chunkCountinteger是minimum: 1;maximum: 512
documentVersionstring是pattern: "^[a-f0-9]{64}$"
contentHashstring是pattern: "^[a-f0-9]{64}$"
chunkingHashstring是pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "status": {
      "enum": [
        "INDEXED",
        "UNCHANGED",
        "SKIPPED"
      ]
    },
    "chunkCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 512
    },
    "documentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "contentHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "chunkingHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "id",
    "status",
    "chunkCount",
    "documentVersion",
    "contentHash",
    "chunkingHash"
  ],
  "additionalProperties": false
}

ManagedDocumentBatchItem ​

类型:ManagedDocumentResult / object / object。—

完整机器定义
json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/ManagedDocumentResult"
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 0,
          "maxLength": 128
        },
        "status": {
          "const": "FAILED"
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "status",
        "error"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
          "not": {
            "enum": [
              ".",
              ".."
            ]
          }
        },
        "status": {
          "const": "NOT_IMPORTED"
        },
        "chunkCount": {
          "type": "integer"
        },
        "documentVersion": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "contentHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "chunkingHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "id",
        "status",
        "chunkCount",
        "documentVersion",
        "contentHash",
        "chunkingHash"
      ],
      "additionalProperties": false
    }
  ]
}

ManagedDocumentBatchResult ​

字段类型本层必填默认值与约束
atomicboolean是—
status枚举是enum: ["SUCCEEDED","PARTIAL","REJECTED"]
items数组:ManagedDocumentBatchItem是minItems: 1;maxItems: 25
indexedinteger是minimum: 0;maximum: 25
unchangedinteger是minimum: 0;maximum: 25
skippedinteger是minimum: 0;maximum: 25
failedinteger是minimum: 0;maximum: 25
完整机器定义
json
{
  "type": "object",
  "properties": {
    "atomic": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "SUCCEEDED",
        "PARTIAL",
        "REJECTED"
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ManagedDocumentBatchItem"
      },
      "minItems": 1,
      "maxItems": 25
    },
    "indexed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 25
    },
    "unchanged": {
      "type": "integer",
      "minimum": 0,
      "maximum": 25
    },
    "skipped": {
      "type": "integer",
      "minimum": 0,
      "maximum": 25
    },
    "failed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 25
    }
  },
  "required": [
    "atomic",
    "status",
    "items",
    "indexed",
    "unchanged",
    "skipped",
    "failed"
  ],
  "additionalProperties": false
}

ManagedDocumentBatchRequest ​

字段类型本层必填默认值与约束
documents数组:ManagedDocumentImport是minItems: 1;maxItems: 25
atomicboolean否default: true
duplicatePolicy枚举否default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "documents": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ManagedDocumentImport"
      },
      "minItems": 1,
      "maxItems": 25
    },
    "atomic": {
      "type": "boolean",
      "default": true
    },
    "duplicatePolicy": {
      "enum": [
        "UPSERT",
        "SKIP",
        "REJECT"
      ],
      "default": "UPSERT"
    }
  },
  "required": [
    "documents"
  ],
  "additionalProperties": false,
  "description": "唯一文档 ID,正文总计 <= 1048576 UTF-16 字符;atomic 默认 true,失败有明细且零写入;false 每条独立事务。document 中 duplicatePolicy 可覆盖批次策略。"
}

ManagedDocumentRebuildRequest ​

字段类型本层必填默认值与约束
sourceVersionstring是maxLength: 64;pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
documentIds数组:string是minItems: 1;maxItems: 25;uniqueItems: true
atomicboolean否default: true
duplicatePolicy枚举否default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "sourceVersion": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
      "maxLength": 64
    },
    "documentIds": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
        "not": {
          "enum": [
            ".",
            ".."
          ]
        }
      },
      "minItems": 1,
      "maxItems": 25,
      "uniqueItems": true
    },
    "atomic": {
      "type": "boolean",
      "default": true
    },
    "duplicatePolicy": {
      "enum": [
        "UPSERT",
        "SKIP",
        "REJECT"
      ],
      "default": "UPSERT"
    }
  },
  "required": [
    "sourceVersion",
    "documentIds"
  ],
  "additionalProperties": false,
  "description": "源必须同一资源不同的 PUBLISHED MANAGED 版本,目标 DRAFT;逐个文档检查租户与 ACL;不返回正文,不自动发布。"
}

ManagedDocumentChunkPreview ​

字段类型本层必填默认值与约束
textstring是minLength: 1;maxLength: 8192
startOffsetinteger是minimum: 0;maximum: 65536
endOffsetinteger是minimum: 1;maximum: 65536
完整机器定义
json
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8192
    },
    "startOffset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 65536
    },
    "endOffset": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    }
  },
  "required": [
    "text",
    "startOffset",
    "endOffset"
  ],
  "additionalProperties": false
}

ManagedDocumentPreview ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
documentVersionstring是pattern: "^[a-f0-9]{64}$"
chunkingHashstring是pattern: "^[a-f0-9]{64}$"
chunkingDocumentChunkingPolicy是空对象表示未声明分块配置的旧策略。显式配置的预览返回完整有效参数。
chunkCountinteger是minimum: 1;maximum: 512
chunks数组:ManagedDocumentChunkPreview是minItems: 1;maxItems: 2048
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "documentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "chunkingHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "chunking": {
      "$ref": "#/components/schemas/DocumentChunkingPolicy",
      "description": "空对象表示未声明分块配置的旧策略。显式配置的预览返回完整有效参数。"
    },
    "chunkCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 512
    },
    "chunks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ManagedDocumentChunkPreview"
      },
      "minItems": 1,
      "maxItems": 2048
    }
  },
  "required": [
    "id",
    "documentVersion",
    "chunkingHash",
    "chunking",
    "chunkCount",
    "chunks"
  ],
  "additionalProperties": false
}

ManagedDocumentSummary ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
status枚举是enum: ["INDEXED","UNCHANGED","SKIPPED"]
chunkCountinteger是minimum: 1;maximum: 512
documentVersionstring是pattern: "^[a-f0-9]{64}$"
contentHashstring是pattern: "^[a-f0-9]{64}$"
chunkingHashstring是pattern: "^[a-f0-9]{64}$"
titlestring否minLength: 0;maxLength: 512
sourcestring否minLength: 0;maxLength: 2048
tenantIdstring否minLength: 0;maxLength: 128
chunkingobject否—
rebuildSourceRef否—
ingestionIngestionFile否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "status": {
      "enum": [
        "INDEXED",
        "UNCHANGED",
        "SKIPPED"
      ]
    },
    "chunkCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 512
    },
    "documentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "contentHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "chunkingHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "title": {
      "type": "string",
      "minLength": 0,
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "minLength": 0,
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128
    },
    "chunking": {
      "type": "object"
    },
    "rebuildSource": {
      "$ref": "#/components/schemas/Ref"
    },
    "ingestion": {
      "$ref": "#/components/schemas/IngestionFile"
    }
  },
  "required": [
    "id",
    "status",
    "chunkCount",
    "documentVersion",
    "contentHash",
    "chunkingHash"
  ],
  "additionalProperties": false
}

CitationVerification ​

字段类型本层必填默认值与约束
idstring是maxLength: 128
status枚举是enum: ["VERIFIED","UNVERIFIED"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 128
    },
    "status": {
      "enum": [
        "VERIFIED",
        "UNVERIFIED"
      ]
    }
  },
  "required": [
    "id",
    "status"
  ],
  "additionalProperties": false,
  "description": "仅核验当前检索来源编号,不证明回答事实正确;空编号为 UNVERIFIED。"
}

CitationPreview ​

字段类型本层必填默认值与约束
idstring是minLength: 1;maxLength: 128
knowledgeIdstring是minLength: 1;maxLength: 128
knowledgeVersionstring是minLength: 1;maxLength: 128
documentIdstring是minLength: 1;maxLength: 128
chunkIdstring是minLength: 1;maxLength: 160
titlestring是maxLength: 512
sourceRefKnowledgeSource是—
contentstring是minLength: 1;maxLength: 16384
scopestring是const: "RETRIEVED_EXCERPT"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "knowledgeId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "knowledgeVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "documentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "chunkId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "title": {
      "type": "string",
      "maxLength": 512
    },
    "sourceRef": {
      "$ref": "#/components/schemas/KnowledgeSource"
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "scope": {
      "const": "RETRIEVED_EXCERPT"
    }
  },
  "required": [
    "id",
    "knowledgeId",
    "knowledgeVersion",
    "documentId",
    "chunkId",
    "title",
    "sourceRef",
    "content",
    "scope"
  ],
  "additionalProperties": false,
  "description": "当前身份从精确发布版本重读并验证的历史检索片段;URI 不会被自动访问;远程业务源变更或拒绝不回退旧正文。"
}

DocumentUploadMetadata ​

字段类型本层必填默认值与约束
documentIdstring是maxLength: 128;pattern: "^[a-zA-Z0-9_.-]{1,128}$"
titlestring否maxLength: 512
sourcestring否maxLength: 2048
tenantIdstring否maxLength: 128;Default trusted credential tenant; application administrators cannot select another tenant
duplicatePolicystring否default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"]
expectedDocumentVersionstring否pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$"
    },
    "title": {
      "type": "string",
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128,
      "description": "Default trusted credential tenant; application administrators cannot select another tenant"
    },
    "duplicatePolicy": {
      "type": "string",
      "enum": [
        "UPSERT",
        "SKIP",
        "REJECT"
      ],
      "default": "UPSERT"
    },
    "expectedDocumentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "documentId"
  ],
  "additionalProperties": false
}

IngestionFile ​

字段类型本层必填默认值与约束
jobIdstring是maxLength: 128
originalHashstring是pattern: "^[a-f0-9]{64}$"
knowledgeVersionstring是maxLength: 64
filenamestring是maxLength: 255
formatstring是enum: ["txt","md","pdf","docx","xlsx","pptx","png","jpg","jpeg"]
pageCountinteger是minimum: 1;maximum: 100
完整机器定义
json
{
  "type": "object",
  "properties": {
    "jobId": {
      "type": "string",
      "maxLength": 128
    },
    "originalHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "knowledgeVersion": {
      "type": "string",
      "maxLength": 64
    },
    "filename": {
      "type": "string",
      "maxLength": 255
    },
    "format": {
      "type": "string",
      "enum": [
        "txt",
        "md",
        "pdf",
        "docx",
        "xlsx",
        "pptx",
        "png",
        "jpg",
        "jpeg"
      ]
    },
    "pageCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "jobId",
    "originalHash",
    "knowledgeVersion",
    "filename",
    "format",
    "pageCount"
  ],
  "additionalProperties": false
}

IngestionJob ​

字段类型本层必填默认值与约束
idstring是maxLength: 128
appIdstring是maxLength: 64
knowledgeIdstring是maxLength: 64
knowledgeVersionstring是maxLength: 64
documentIdstring是maxLength: 128
filenamestring是maxLength: 255
formatstring是maxLength: 8
sizeBytesinteger是minimum: 1;maximum: 4194304
originalHashstring是pattern: "^[a-f0-9]{64}$"
titlestring是maxLength: 512
sourcestring是maxLength: 2048
tenantIdstring是maxLength: 128
duplicatePolicystring是enum: ["UPSERT","SKIP","REJECT"]
statusstring是enum: ["QUEUED","PARSING","INDEXING","SUCCEEDED","FAILED","CANCELLED"]
revisioninteger是minimum: 1
attemptinteger是minimum: 1
createdAtinteger是—
updatedAtinteger是—
resultManagedDocumentResult否—
errorobject否不允许额外字段
error.codestring是maxLength: 128
error.messagestring是maxLength: 256
parsedDocumentVersionstring否pattern: "^[a-f0-9]{64}$";Canonical parsed candidate version; SKIPPED result may retain a different indexed version
parsedContentHashstring否pattern: "^[a-f0-9]{64}$"
pageCountinteger否minimum: 1;maximum: 100
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 128
    },
    "appId": {
      "type": "string",
      "maxLength": 64
    },
    "knowledgeId": {
      "type": "string",
      "maxLength": 64
    },
    "knowledgeVersion": {
      "type": "string",
      "maxLength": 64
    },
    "documentId": {
      "type": "string",
      "maxLength": 128
    },
    "filename": {
      "type": "string",
      "maxLength": 255
    },
    "format": {
      "type": "string",
      "maxLength": 8
    },
    "sizeBytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4194304
    },
    "originalHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "title": {
      "type": "string",
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "duplicatePolicy": {
      "type": "string",
      "enum": [
        "UPSERT",
        "SKIP",
        "REJECT"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "QUEUED",
        "PARSING",
        "INDEXING",
        "SUCCEEDED",
        "FAILED",
        "CANCELLED"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "attempt": {
      "type": "integer",
      "minimum": 1
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    },
    "result": {
      "$ref": "#/components/schemas/ManagedDocumentResult"
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "maxLength": 128
        },
        "message": {
          "type": "string",
          "maxLength": 256
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    },
    "parsedDocumentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Canonical parsed candidate version; SKIPPED result may retain a different indexed version"
    },
    "parsedContentHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "pageCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "id",
    "appId",
    "knowledgeId",
    "knowledgeVersion",
    "documentId",
    "filename",
    "format",
    "sizeBytes",
    "originalHash",
    "title",
    "source",
    "tenantId",
    "duplicatePolicy",
    "status",
    "revision",
    "attempt",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}

IngestionPage ​

字段类型本层必填默认值与约束
items数组:IngestionJob是maxItems: 100
totalinteger是minimum: 0
limitinteger是minimum: 1;maximum: 100
offsetinteger是minimum: 0;maximum: 1000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/IngestionJob"
      },
      "maxItems": 100
    },
    "total": {
      "type": "integer",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}

KnowledgeDebugRequest ​

字段类型本层必填默认值与约束
querystring是minLength: 1;maxLength: 512
topKinteger否default: 5;minimum: 1;maximum: 20
完整机器定义
json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 5
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

KnowledgeIndexSnapshot ​

字段类型本层必填默认值与约束
versionstring是maxLength: 64
statusstring是enum: ["DRAFT","PUBLISHED"]
definitionHashstring是pattern: "^[a-f0-9]{64}$"
indexVersionstring是pattern: "^[a-f0-9]{64}$"
visibleDocumentCountinteger是minimum: 0;maximum: 1000
visibleChunkCountinteger是minimum: 0;maximum: 2147483647
visibleIndexConsistentboolean是—
knowledgeAccessEpochinteger是minimum: 0
securityEpochinteger是minimum: 0;maximum: 2147483647
algorithmstring否enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"]
vectorReadyboolean否—
vectorIndexHashstring否pattern: "^[a-f0-9]{64}$"
indexedChunkCountinteger否minimum: 0;maximum: 2147483647
spaceHashstring否pattern: "^[a-f0-9]{64}$"
dimensionsinteger否minimum: 1;maximum: 2048
完整机器定义
json
{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "maxLength": 64
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "definitionHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "indexVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "visibleDocumentCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000
    },
    "visibleChunkCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "visibleIndexConsistent": {
      "type": "boolean"
    },
    "knowledgeAccessEpoch": {
      "type": "integer",
      "minimum": 0
    },
    "securityEpoch": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "COSINE_V1",
        "RRF_LEXICAL_COSINE_V1"
      ]
    },
    "vectorReady": {
      "type": "boolean"
    },
    "vectorIndexHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "indexedChunkCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "spaceHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "dimensions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2048
    }
  },
  "required": [
    "version",
    "status",
    "definitionHash",
    "indexVersion",
    "visibleDocumentCount",
    "visibleChunkCount",
    "visibleIndexConsistent",
    "knowledgeAccessEpoch",
    "securityEpoch"
  ],
  "additionalProperties": false
}

KnowledgeDebugHit ​

字段类型本层必填默认值与约束
idstring是maxLength: 160
documentIdstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
titlestring否maxLength: 512
sourcestring否maxLength: 2048
tenantIdstring否maxLength: 128
textstring是minLength: 1;maxLength: 8192
startOffsetinteger否minimum: 0;maximum: 65536
endOffsetinteger否minimum: 1;maximum: 65536
documentVersionstring否pattern: "^[a-f0-9]{64}$"
sourceRefKnowledgeSource否—
rankinteger是minimum: 1;maximum: 20
scorenumber是minimum: -1
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 160
    },
    "documentId": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "title": {
      "type": "string",
      "maxLength": 512
    },
    "source": {
      "type": "string",
      "maxLength": 2048
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "text": {
      "type": "string",
      "maxLength": 8192,
      "minLength": 1
    },
    "startOffset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 65536
    },
    "endOffset": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "documentVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "sourceRef": {
      "$ref": "#/components/schemas/KnowledgeSource"
    },
    "rank": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "score": {
      "type": "number",
      "minimum": -1
    }
  },
  "required": [
    "id",
    "documentId",
    "text",
    "rank",
    "score"
  ],
  "additionalProperties": false,
  "description": "Old stored chunks may omit source metadata and UTF-16 offsets; the platform supplies parent document identity but does not invent provenance."
}

KnowledgeDebugResult ​

字段类型本层必填默认值与约束
algorithmstring是enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"]
querystring是maxLength: 512
topKinteger是minimum: 1;maximum: 20
knowledgeIdstring是maxLength: 64
indexKnowledgeIndexSnapshot是—
items数组:KnowledgeDebugHit是minItems: 0;maxItems: 20
elapsedMsinteger是minimum: 0
完整机器定义
json
{
  "type": "object",
  "properties": {
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "COSINE_V1",
        "RRF_LEXICAL_COSINE_V1"
      ]
    },
    "query": {
      "type": "string",
      "maxLength": 512
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "knowledgeId": {
      "type": "string",
      "maxLength": 64
    },
    "index": {
      "$ref": "#/components/schemas/KnowledgeIndexSnapshot"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeDebugHit"
      },
      "minItems": 0,
      "maxItems": 20
    },
    "elapsedMs": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "algorithm",
    "query",
    "topK",
    "knowledgeId",
    "index",
    "items",
    "elapsedMs"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationInputCase ​

字段类型本层必填默认值与约束
querystring是minLength: 1;maxLength: 512
expectedDocumentIds数组:string是minItems: 1;maxItems: 20;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    },
    "expectedDocumentIds": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
        "not": {
          "enum": [
            ".",
            ".."
          ]
        }
      },
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true
    }
  },
  "required": [
    "query",
    "expectedDocumentIds"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationRequest ​

字段类型本层必填默认值与约束
namestring是minLength: 1;maxLength: 128
versions数组:string是minItems: 1;maxItems: 2;uniqueItems: true
topKinteger否default: 5;minimum: 1;maximum: 20
cases数组:KnowledgeEvaluationInputCase是minItems: 1;maxItems: 10
完整机器定义
json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1
    },
    "versions": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 64,
        "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
      },
      "minItems": 1,
      "maxItems": 2,
      "uniqueItems": true
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 5
    },
    "cases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationInputCase"
      },
      "minItems": 1,
      "maxItems": 10
    }
  },
  "required": [
    "name",
    "versions",
    "cases"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationHit ​

字段类型本层必填默认值与约束
documentIdstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
chunkIdstring是maxLength: 160
rankinteger是minimum: 1;maximum: 20
scorenumber是minimum: -1
完整机器定义
json
{
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
      "not": {
        "enum": [
          ".",
          ".."
        ]
      }
    },
    "chunkId": {
      "type": "string",
      "maxLength": 160
    },
    "rank": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "score": {
      "type": "number",
      "minimum": -1
    }
  },
  "required": [
    "documentId",
    "chunkId",
    "rank",
    "score"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationCaseResult ​

字段类型本层必填默认值与约束
caseIndexinteger是minimum: 0;maximum: 9
hits数组:KnowledgeEvaluationHit是minItems: 0;maxItems: 20
recallAtKnumber是minimum: 0;maximum: 1
reciprocalRanknumber是minimum: 0;maximum: 1
hitboolean是—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "caseIndex": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9
    },
    "hits": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationHit"
      },
      "minItems": 0,
      "maxItems": 20
    },
    "recallAtK": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "reciprocalRank": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "hit": {
      "type": "boolean"
    }
  },
  "required": [
    "caseIndex",
    "hits",
    "recallAtK",
    "reciprocalRank",
    "hit"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationVersionResult ​

字段类型本层必填默认值与约束
versionstring是maxLength: 64
indexVersionstring是pattern: "^[a-f0-9]{64}$"
cases数组:KnowledgeEvaluationCaseResult是minItems: 1;maxItems: 10
recallAtKnumber是minimum: 0;maximum: 1
mrrAtKnumber是minimum: 0;maximum: 1
hitRateAtKnumber是minimum: 0;maximum: 1
algorithmstring否enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"]
vectorIndexHashstring否pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "maxLength": 64
    },
    "indexVersion": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "cases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationCaseResult"
      },
      "minItems": 1,
      "maxItems": 10
    },
    "recallAtK": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "mrrAtK": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "hitRateAtK": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "COSINE_V1",
        "RRF_LEXICAL_COSINE_V1"
      ]
    },
    "vectorIndexHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "version",
    "indexVersion",
    "cases",
    "recallAtK",
    "mrrAtK",
    "hitRateAtK"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationSummary ​

字段类型本层必填默认值与约束
idstring是maxLength: 64;pattern: "^evaluation_[a-f0-9-]{36}$"
namestring是maxLength: 128
algorithmstring是enum: ["LEXICAL_TERMS_V1","VERSIONED_RETRIEVAL_V1"]
topKinteger是minimum: 1;maximum: 20
versions数组:string是minItems: 1;maxItems: 2
createdAtinteger是minimum: 0
revisioninteger是minimum: 1;maximum: 2147483647
elapsedMsinteger是minimum: 0
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^evaluation_[a-f0-9-]{36}$"
    },
    "name": {
      "type": "string",
      "maxLength": 128
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "VERSIONED_RETRIEVAL_V1"
      ]
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "versions": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 64
      },
      "minItems": 1,
      "maxItems": 2
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "elapsedMs": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "id",
    "name",
    "algorithm",
    "topK",
    "versions",
    "createdAt",
    "revision",
    "elapsedMs"
  ],
  "additionalProperties": false
}

KnowledgeEvaluation ​

字段类型本层必填默认值与约束
idstring是maxLength: 64;pattern: "^evaluation_[a-f0-9-]{36}$"
namestring是maxLength: 128
algorithmstring是enum: ["LEXICAL_TERMS_V1","VERSIONED_RETRIEVAL_V1"]
topKinteger是minimum: 1;maximum: 20
versions数组:string是minItems: 1;maxItems: 2
createdAtinteger是minimum: 0
revisioninteger是minimum: 1;maximum: 2147483647
elapsedMsinteger是minimum: 0
appIdstring是maxLength: 64
knowledgeIdstring是maxLength: 64
subjectIdstring是maxLength: 128
tenantIdstring是maxLength: 128
inputCases数组:KnowledgeEvaluationInputCase是minItems: 1;maxItems: 10
indexes数组:KnowledgeIndexSnapshot是minItems: 1;maxItems: 2
results数组:KnowledgeEvaluationVersionResult是minItems: 1;maxItems: 2
statusstring是enum: ["CURRENT","STALE"]
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^evaluation_[a-f0-9-]{36}$"
    },
    "name": {
      "type": "string",
      "maxLength": 128
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "VERSIONED_RETRIEVAL_V1"
      ]
    },
    "topK": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "versions": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 64
      },
      "minItems": 1,
      "maxItems": 2
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "elapsedMs": {
      "type": "integer",
      "minimum": 0
    },
    "appId": {
      "type": "string",
      "maxLength": 64
    },
    "knowledgeId": {
      "type": "string",
      "maxLength": 64
    },
    "subjectId": {
      "type": "string",
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "maxLength": 128
    },
    "inputCases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationInputCase"
      },
      "minItems": 1,
      "maxItems": 10
    },
    "indexes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeIndexSnapshot"
      },
      "minItems": 1,
      "maxItems": 2
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationVersionResult"
      },
      "minItems": 1,
      "maxItems": 2
    },
    "status": {
      "type": "string",
      "enum": [
        "CURRENT",
        "STALE"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "algorithm",
    "topK",
    "versions",
    "createdAt",
    "revision",
    "elapsedMs",
    "appId",
    "knowledgeId",
    "subjectId",
    "tenantId",
    "inputCases",
    "indexes",
    "results",
    "status"
  ],
  "additionalProperties": false
}

KnowledgeEvaluationPage ​

字段类型本层必填默认值与约束
items数组:KnowledgeEvaluationSummary是minItems: 0;maxItems: 20
totalinteger是minimum: 0;maximum: 100
limitinteger是minimum: 1;maximum: 20
offsetinteger是minimum: 0;maximum: 1000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/KnowledgeEvaluationSummary"
      },
      "minItems": 0,
      "maxItems": 20
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}

EmbeddingConfiguration ​

字段类型本层必填默认值与约束
endpointstring是format: "uri"
modelstring是minLength: 1;maxLength: 128
spaceVersionstring是pattern: "^[a-zA-Z0-9_.-]{1,128}$"
dimensionsinteger是minimum: 1;maximum: 2048
secretRefstring否maxLength: 128
sendDimensionsboolean否default: false
完整机器定义
json
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "model": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1
    },
    "spaceVersion": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_.-]{1,128}$"
    },
    "dimensions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2048
    },
    "secretRef": {
      "type": "string",
      "maxLength": 128
    },
    "sendDimensions": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "endpoint",
    "model",
    "spaceVersion",
    "dimensions"
  ],
  "additionalProperties": false
}

KnowledgeRetrieval ​

字段类型本层必填默认值与约束
strategy枚举是enum: ["LEXICAL","VECTOR","HYBRID"]
embeddingEmbeddingConfiguration否—
minScorenumber否default: 0;minimum: -1;maximum: 1
完整机器定义
json
{
  "type": "object",
  "properties": {
    "strategy": {
      "enum": [
        "LEXICAL",
        "VECTOR",
        "HYBRID"
      ]
    },
    "embedding": {
      "$ref": "#/components/schemas/EmbeddingConfiguration"
    },
    "minScore": {
      "type": "number",
      "minimum": -1,
      "maximum": 1,
      "default": 0
    }
  },
  "required": [
    "strategy"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "strategy": {
            "const": "LEXICAL"
          }
        },
        "required": [
          "strategy"
        ]
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "embedding"
              ]
            },
            {
              "required": [
                "minScore"
              ]
            }
          ]
        }
      },
      "else": {
        "required": [
          "embedding"
        ]
      }
    }
  ]
}

VectorIndexHealth ​

字段类型本层必填默认值与约束
algorithmstring是enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"]
vectorReadyboolean是—
vectorIndexHashstring是pattern: "^[a-f0-9]{64}$"
indexedChunkCountinteger是minimum: 0;maximum: 2147483647
spaceHashstring否pattern: "^[a-f0-9]{64}$"
dimensionsinteger否minimum: 1;maximum: 2048
visibleDocumentCountinteger否minimum: 0;maximum: 1000
visibleChunkCountinteger否minimum: 0;maximum: 2147483647
完整机器定义
json
{
  "type": "object",
  "properties": {
    "algorithm": {
      "type": "string",
      "enum": [
        "LEXICAL_TERMS_V1",
        "COSINE_V1",
        "RRF_LEXICAL_COSINE_V1"
      ]
    },
    "vectorReady": {
      "type": "boolean"
    },
    "vectorIndexHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "indexedChunkCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "spaceHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "dimensions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2048
    },
    "visibleDocumentCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000
    },
    "visibleChunkCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    }
  },
  "required": [
    "algorithm",
    "vectorReady",
    "vectorIndexHash",
    "indexedChunkCount"
  ],
  "additionalProperties": false
}

VectorBuildRequest ​

字段类型本层必填默认值与约束
documentIds数组:string否minItems: 1;maxItems: 512;uniqueItems: true
完整机器定义
json
{
  "type": "object",
  "properties": {
    "documentIds": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_.-]{1,128}$",
        "not": {
          "enum": [
            ".",
            ".."
          ]
        }
      },
      "minItems": 1,
      "maxItems": 512,
      "uniqueItems": true
    }
  },
  "required": [],
  "additionalProperties": false
}

VectorBuildJob ​

字段类型本层必填默认值与约束
idstring是maxLength: 64;pattern: "^vector_[a-f0-9-]{36}$"
appIdstring是maxLength: 64
knowledgeIdstring是maxLength: 64
knowledgeVersionstring是maxLength: 64
status枚举是enum: ["QUEUED","BUILDING","SUCCEEDED","FAILED","CANCELLED"]
revisioninteger是minimum: 1;maximum: 2147483647
createdAtinteger是minimum: 0
updatedAtinteger是minimum: 0
attemptinteger是minimum: 1;maximum: 2147483647
spaceHashstring是pattern: "^[a-f0-9]{64}$"
documentCountinteger是minimum: 1;maximum: 512
chunkCountinteger是minimum: 1;maximum: 512
completedChunksinteger是minimum: 0;maximum: 512
deadlineinteger否minimum: 0
resultVectorIndexHealth否—
errorobject否不允许额外字段
error.codestring是maxLength: 128
error.messagestring是maxLength: 512
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^vector_[a-f0-9-]{36}$"
    },
    "appId": {
      "type": "string",
      "maxLength": 64
    },
    "knowledgeId": {
      "type": "string",
      "maxLength": 64
    },
    "knowledgeVersion": {
      "type": "string",
      "maxLength": 64
    },
    "status": {
      "enum": [
        "QUEUED",
        "BUILDING",
        "SUCCEEDED",
        "FAILED",
        "CANCELLED"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0
    },
    "updatedAt": {
      "type": "integer",
      "minimum": 0
    },
    "attempt": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "spaceHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "documentCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 512
    },
    "chunkCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 512
    },
    "completedChunks": {
      "type": "integer",
      "minimum": 0,
      "maximum": 512
    },
    "deadline": {
      "type": "integer",
      "minimum": 0
    },
    "result": {
      "$ref": "#/components/schemas/VectorIndexHealth"
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "maxLength": 128
        },
        "message": {
          "type": "string",
          "maxLength": 512
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "appId",
    "knowledgeId",
    "knowledgeVersion",
    "status",
    "revision",
    "createdAt",
    "updatedAt",
    "attempt",
    "spaceHash",
    "documentCount",
    "chunkCount",
    "completedChunks"
  ],
  "additionalProperties": false
}

VectorBuildPage ​

字段类型本层必填默认值与约束
items数组:VectorBuildJob是minItems: 0;maxItems: 20
totalinteger是minimum: 0;maximum: 10000
limitinteger是minimum: 1;maximum: 20
offsetinteger是minimum: 0;maximum: 1000000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/VectorBuildJob"
      },
      "minItems": 0,
      "maxItems": 20
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "items",
    "total",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}

AuditQuery ​

字段类型本层必填默认值与约束
actionstring否minLength: 1;maxLength: 256
subjectIdstring否minLength: 1;maxLength: 256
tenantIdstring否maxLength: 256
runIdstring否minLength: 1;maxLength: 256
executionIdstring否minLength: 1;maxLength: 256
frominteger否minimum: 0;format: "int64"
tointeger否minimum: 0;format: "int64"
limitinteger否default: 50;minimum: 1;maximum: 1000
cursorstring否minLength: 1;maxLength: 2048;pattern: "^[A-Za-z0-9_-]+$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "tenantId": {
      "type": "string",
      "maxLength": 256
    },
    "runId": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "from": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "to": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 50
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^[A-Za-z0-9_-]+$"
    }
  },
  "required": [],
  "additionalProperties": false
}

AuditRecord ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
subjectIdstring是—
tenantIdstring否—
rolestring否—
actionstring是—
targetstring是—
outcomestring否—
runIdstring否—
traceIdstring否—
executionIdstring否—
policyBasisstring否—
createdAtinteger是minimum: 0;format: "int64"
formatVersionstring否enum: ["1.0"]
beforeHashstring否pattern: "^[a-f0-9]{64}$"
afterHashstring否pattern: "^[a-f0-9]{64}$"
inputHashstring否pattern: "^[a-f0-9]{64}$"
resultHashstring否pattern: "^[a-f0-9]{64}$"
reasonHashstring否pattern: "^[a-f0-9]{64}$"
evidenceHashstring否pattern: "^[a-f0-9]{64}$"
revisioninteger否minimum: 0;format: "int64"
previousRevisioninteger否minimum: 0;format: "int64"
recordCountinteger否minimum: 0;format: "int64"
cutoffinteger否minimum: 0;format: "int64"
snapshotPositioninteger否minimum: 0;format: "int64"
policyDecisionobject否不允许额外字段
policyDecision.decisionIdstring否—
policyDecision.providerDecisionIdstring否—
policyDecision.resourcestring否—
policyDecision.codestring否—
policyDecision.requiredPermissionsHashstring否—
policyDecision.argumentsHashstring否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "action": {
      "type": "string"
    },
    "target": {
      "type": "string"
    },
    "outcome": {
      "type": "string"
    },
    "runId": {
      "type": "string"
    },
    "traceId": {
      "type": "string"
    },
    "executionId": {
      "type": "string"
    },
    "policyBasis": {
      "type": "string"
    },
    "createdAt": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "formatVersion": {
      "type": "string",
      "enum": [
        "1.0"
      ]
    },
    "beforeHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "afterHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "resultHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "reasonHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "evidenceHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "revision": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "previousRevision": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "recordCount": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "cutoff": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "snapshotPosition": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "policyDecision": {
      "type": "object",
      "properties": {
        "decisionId": {
          "type": "string"
        },
        "providerDecisionId": {
          "type": "string"
        },
        "resource": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "requiredPermissionsHash": {
          "type": "string"
        },
        "argumentsHash": {
          "type": "string"
        }
      },
      "required": [],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "createdAt",
    "appId",
    "subjectId",
    "action",
    "target"
  ],
  "additionalProperties": true,
  "description": "Legacy fields remain absent when never recorded; no identity inference. Added details contain identifiers and digests, never source arguments or prompts."
}

AuditSnapshot ​

字段类型本层必填默认值与约束
positioninteger是minimum: 0;format: "int64"
epochinteger是minimum: 0;format: "int64"
filterHashstring是pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "position": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "epoch": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "filterHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "position",
    "epoch",
    "filterHash"
  ],
  "additionalProperties": false
}

AuditPage ​

字段类型本层必填默认值与约束
items数组:AuditRecord是maxItems: 1000
nextCursorstring / null是—
snapshotAuditSnapshot是—
totalinteger是minimum: 0;format: "int64"
limitinteger是minimum: 1;maximum: 1000
redactedboolean否—
redactionRevisioninteger否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 1000,
      "items": {
        "$ref": "#/components/schemas/AuditRecord"
      }
    },
    "nextCursor": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "snapshot": {
      "$ref": "#/components/schemas/AuditSnapshot"
    },
    "total": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "redacted": {
      "type": "boolean"
    },
    "redactionRevision": {
      "type": "integer"
    }
  },
  "required": [
    "items",
    "nextCursor",
    "snapshot",
    "total",
    "limit"
  ],
  "additionalProperties": false
}

AuditExport ​

字段类型本层必填默认值与约束
items数组:AuditRecord是maxItems: 1000
nextCursorstring / null是—
snapshotAuditSnapshot是—
totalinteger是minimum: 0;format: "int64"
limitinteger是minimum: 1;maximum: 1000
formatVersionstring是enum: ["1.0"]
sha256string是pattern: "^[a-f0-9]{64}$"
exportedAtinteger是minimum: 0;format: "int64"
redactedboolean否—
redactionRevisioninteger否—
完整机器定义
json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 1000,
      "items": {
        "$ref": "#/components/schemas/AuditRecord"
      }
    },
    "nextCursor": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "snapshot": {
      "$ref": "#/components/schemas/AuditSnapshot"
    },
    "total": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "formatVersion": {
      "type": "string",
      "enum": [
        "1.0"
      ]
    },
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "exportedAt": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "redacted": {
      "type": "boolean"
    },
    "redactionRevision": {
      "type": "integer"
    }
  },
  "required": [
    "items",
    "nextCursor",
    "snapshot",
    "total",
    "limit",
    "formatVersion",
    "sha256",
    "exportedAt"
  ],
  "additionalProperties": false,
  "description": "At most 1000 records and 2 MiB of record bodies per file. sha256 is canonical JSON record digest, not a tamper-proof signature. nextCursor traverses the fixed snapshot."
}

AuditRetentionPlan ​

字段类型本层必填默认值与约束
beforeinteger是minimum: 0;format: "int64"
limitinteger是default: 100;minimum: 1;maximum: 500
snapshotPositioninteger是minimum: 0;format: "int64"
epochinteger是minimum: 0;format: "int64"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "before": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "default": 100
    },
    "snapshotPosition": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "epoch": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    }
  },
  "required": [
    "before",
    "limit",
    "snapshotPosition",
    "epoch"
  ],
  "additionalProperties": false
}

AuditRetentionPreviewRequest ​

字段类型本层必填默认值与约束
beforeinteger是minimum: 0;format: "int64"
limitinteger否default: 100;minimum: 1;maximum: 500
完整机器定义
json
{
  "type": "object",
  "properties": {
    "before": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "default": 100
    }
  },
  "required": [
    "before"
  ],
  "additionalProperties": false,
  "description": "Platform administrator only; cutoff at least seven days before now. Retention is disabled by default and never automatic."
}

AuditRetentionPreview ​

字段类型本层必填默认值与约束
beforeinteger是minimum: 0;format: "int64"
limitinteger是default: 100;minimum: 1;maximum: 500
snapshotPositioninteger是minimum: 0;format: "int64"
epochinteger是minimum: 0;format: "int64"
selectedinteger是minimum: 0;maximum: 500
recordsHashstring是pattern: "^[a-f0-9]{64}$"
planHashstring是pattern: "^[a-f0-9]{64}$"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "before": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "default": 100
    },
    "snapshotPosition": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "epoch": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    },
    "selected": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500
    },
    "recordsHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "planHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "before",
    "limit",
    "snapshotPosition",
    "epoch",
    "selected",
    "recordsHash",
    "planHash"
  ],
  "additionalProperties": false
}

AuditRetentionApply ​

字段类型本层必填默认值与约束
planAuditRetentionPlan是—
planHashstring是pattern: "^[a-f0-9]{64}$"
confirmationstring是enum: ["DELETE_EXPIRED_AUDIT"]
reasonstring是minLength: 1;maxLength: 1024
完整机器定义
json
{
  "type": "object",
  "properties": {
    "plan": {
      "$ref": "#/components/schemas/AuditRetentionPlan"
    },
    "planHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "confirmation": {
      "type": "string",
      "enum": [
        "DELETE_EXPIRED_AUDIT"
      ]
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    }
  },
  "required": [
    "plan",
    "planHash",
    "confirmation",
    "reason"
  ],
  "additionalProperties": false
}

AuditRetentionReceipt ​

字段类型本层必填默认值与约束
deletedinteger是minimum: 0;maximum: 500
planHashstring是pattern: "^[a-f0-9]{64}$"
epochinteger是minimum: 0;format: "int64"
完整机器定义
json
{
  "type": "object",
  "properties": {
    "deleted": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500
    },
    "planHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "epoch": {
      "type": "integer",
      "format": "int64",
      "minimum": 0
    }
  },
  "required": [
    "deleted",
    "planHash",
    "epoch"
  ],
  "additionalProperties": false
}

ObservationSpan ​

字段类型本层必填默认值与约束
traceIdstring是pattern: "^[0-9a-f]{32}$"
spanIdstring是pattern: "^[0-9a-f]{16}$"
parentSpanIdstring是根 HTTP 上游可为空;对应节点可能只在外部 Collector 中。
operationstring是enum: ["run","resolve","context","authorization","agent","subagent","model","tool","knowledge","confirmation"]
outcomestring是enum: ["OK","ERROR"]
startedAtinteger是—
finishedAtinteger是—
durationMsnumber是minimum: 0
attributesobject是不允许额外字段
attributes.runIdstring是—
attributes.resourceKindstring否—
attributes.resourceIdstring否—
attributes.resourceVersionstring否—
完整机器定义
json
{
  "type": "object",
  "description": "抽样元数据,无用户、租户、业务正文、参数及凭据;非完整审计。",
  "properties": {
    "traceId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "spanId": {
      "type": "string",
      "pattern": "^[0-9a-f]{16}$"
    },
    "parentSpanId": {
      "type": "string",
      "description": "根 HTTP 上游可为空;对应节点可能只在外部 Collector 中。"
    },
    "operation": {
      "type": "string",
      "enum": [
        "run",
        "resolve",
        "context",
        "authorization",
        "agent",
        "subagent",
        "model",
        "tool",
        "knowledge",
        "confirmation"
      ]
    },
    "outcome": {
      "type": "string",
      "enum": [
        "OK",
        "ERROR"
      ]
    },
    "startedAt": {
      "type": "integer"
    },
    "finishedAt": {
      "type": "integer"
    },
    "durationMs": {
      "type": "number",
      "minimum": 0
    },
    "attributes": {
      "type": "object",
      "properties": {
        "runId": {
          "type": "string"
        },
        "resourceKind": {
          "type": "string"
        },
        "resourceId": {
          "type": "string"
        },
        "resourceVersion": {
          "type": "string"
        }
      },
      "required": [
        "runId"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "traceId",
    "spanId",
    "parentSpanId",
    "operation",
    "outcome",
    "startedAt",
    "finishedAt",
    "durationMs",
    "attributes"
  ],
  "additionalProperties": false
}

RunTrace ​

字段类型本层必填默认值与约束
runIdstring是—
traceIdstring是—
recordedboolean是—
sampledboolean是—
rootRecordedboolean是—
retentionHoursinteger是—
maxSpansinteger是const: 512
items数组:ObservationSpan是—
完整机器定义
json
{
  "type": "object",
  "description": "异步保存;rootRecorded 仅表示终态 Span 已采集,不保证没有丢弃子节点。旧 Run、未抽样、到期或容量丢弃可能为空。",
  "properties": {
    "runId": {
      "type": "string"
    },
    "traceId": {
      "type": "string"
    },
    "recorded": {
      "type": "boolean"
    },
    "sampled": {
      "type": "boolean"
    },
    "rootRecorded": {
      "type": "boolean"
    },
    "retentionHours": {
      "type": "integer"
    },
    "maxSpans": {
      "type": "integer",
      "const": 512
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ObservationSpan"
      }
    }
  },
  "required": [
    "runId",
    "traceId",
    "recorded",
    "sampled",
    "rootRecorded",
    "retentionHours",
    "maxSpans",
    "items"
  ],
  "additionalProperties": false
}

ObservationOperation ​

字段类型本层必填默认值与约束
operationstring是—
outcomestring是enum: ["OK","ERROR"]
countinteger是minimum: 1
averageMsnumber是minimum: 0
maximumMsnumber是minimum: 0
p95UpperBoundMsnumber / null是固定桶估算的 P95 上界;超过 600000ms 返回 null。
完整机器定义
json
{
  "type": "object",
  "description": "",
  "properties": {
    "operation": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "OK",
        "ERROR"
      ]
    },
    "count": {
      "type": "integer",
      "minimum": 1
    },
    "averageMs": {
      "type": "number",
      "minimum": 0
    },
    "maximumMs": {
      "type": "number",
      "minimum": 0
    },
    "p95UpperBoundMs": {
      "type": [
        "number",
        "null"
      ],
      "description": "固定桶估算的 P95 上界;超过 600000ms 返回 null。"
    }
  },
  "required": [
    "operation",
    "outcome",
    "count",
    "averageMs",
    "maximumMs",
    "p95UpperBoundMs"
  ],
  "additionalProperties": false
}

ObservationSummary ​

字段类型本层必填默认值与约束
windowHoursinteger是minimum: 1;maximum: 168
frominteger是—
samplePercentinteger是minimum: 0;maximum: 100
retentionHoursinteger是—
basisstring是const: "RETAINED_SAMPLED_SPANS"
operations数组:ObservationOperation是—
activeRunsobject是—
完整机器定义
json
{
  "type": "object",
  "description": "窗口基于保留的抽样 Span;不是完整业务请求总数。",
  "properties": {
    "windowHours": {
      "type": "integer",
      "minimum": 1,
      "maximum": 168
    },
    "from": {
      "type": "integer"
    },
    "samplePercent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "retentionHours": {
      "type": "integer"
    },
    "basis": {
      "type": "string",
      "const": "RETAINED_SAMPLED_SPANS"
    },
    "operations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ObservationOperation"
      }
    },
    "activeRuns": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "minimum": 0
      }
    }
  },
  "required": [
    "windowHours",
    "from",
    "samplePercent",
    "retentionHours",
    "basis",
    "operations",
    "activeRuns"
  ],
  "additionalProperties": false
}

ObservationStatus ​

字段类型本层必填默认值与约束
exportConfiguredboolean是—
queueSizeinteger是—
queueCapacityinteger是const: 256
storageQueueSizeinteger是—
storageQueueCapacityinteger是const: 1024
samplePercentinteger是—
retentionHoursinteger是—
spanCapacityinteger是—
processStartedAtinteger是—
countersobject是不允许额外字段
counters.span_droppedinteger是minimum: 0
counters.export_droppedinteger是minimum: 0
counters.export_failedinteger是minimum: 0
counters.export_rejectedinteger是minimum: 0
counters.exportedinteger是minimum: 0
counters.http_rejectedinteger是minimum: 0
counters.quota_rejectedinteger是minimum: 0
完整机器定义
json
{
  "type": "object",
  "description": "仅平台管理员。进程内计数重启归零;不返回 Collector 地址和凭据。",
  "properties": {
    "exportConfigured": {
      "type": "boolean"
    },
    "queueSize": {
      "type": "integer"
    },
    "queueCapacity": {
      "type": "integer",
      "const": 256
    },
    "storageQueueSize": {
      "type": "integer"
    },
    "storageQueueCapacity": {
      "type": "integer",
      "const": 1024
    },
    "samplePercent": {
      "type": "integer"
    },
    "retentionHours": {
      "type": "integer"
    },
    "spanCapacity": {
      "type": "integer"
    },
    "processStartedAt": {
      "type": "integer"
    },
    "counters": {
      "type": "object",
      "description": "",
      "properties": {
        "span_dropped": {
          "type": "integer",
          "minimum": 0
        },
        "export_dropped": {
          "type": "integer",
          "minimum": 0
        },
        "export_failed": {
          "type": "integer",
          "minimum": 0
        },
        "export_rejected": {
          "type": "integer",
          "minimum": 0
        },
        "exported": {
          "type": "integer",
          "minimum": 0
        },
        "http_rejected": {
          "type": "integer",
          "minimum": 0
        },
        "quota_rejected": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "span_dropped",
        "export_dropped",
        "export_failed",
        "export_rejected",
        "exported",
        "http_rejected",
        "quota_rejected"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "exportConfigured",
    "queueSize",
    "queueCapacity",
    "storageQueueSize",
    "storageQueueCapacity",
    "samplePercent",
    "retentionHours",
    "spanCapacity",
    "processStartedAt",
    "counters"
  ],
  "additionalProperties": false
}

AlertTransition ​

字段类型本层必填默认值与约束
statestring是enum: ["FIRING","ACKNOWLEDGED","RESOLVED"]
atinteger是—
valueinteger / null否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "state",
    "at"
  ],
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "FIRING",
        "ACKNOWLEDGED",
        "RESOLVED"
      ]
    },
    "at": {
      "type": "integer"
    },
    "value": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "additionalProperties": false
}

AlertRuleInput ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
sourcestring是enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"]
severitystring是enum: ["INFO","WARNING","CRITICAL"]
thresholdinteger是minimum: 1;maximum: 1000000
windowSecondsinteger是minimum: 60;maximum: 86400
staleSecondsinteger是minimum: 60;maximum: 86400
descriptionstring是minLength: 1;maxLength: 256;pattern: "\S"
enabledboolean是—
inhibitedBystring是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "source",
    "severity",
    "threshold",
    "windowSeconds",
    "staleSeconds",
    "description",
    "enabled",
    "inhibitedBy"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "source": {
      "type": "string",
      "enum": [
        "PROVIDER_CIRCUIT",
        "RUN_FAILURE",
        "CONFIRMATION_STUCK",
        "RUN_NO_TERMINAL",
        "UNKNOWN_WRITE",
        "QUOTA_UNKNOWN",
        "HTTP_REJECTION",
        "BUDGET_EXHAUSTED"
      ]
    },
    "severity": {
      "type": "string",
      "enum": [
        "INFO",
        "WARNING",
        "CRITICAL"
      ]
    },
    "threshold": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "windowSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    },
    "staleSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    },
    "description": {
      "type": "string",
      "pattern": "\\S",
      "minLength": 1,
      "maxLength": 256
    },
    "enabled": {
      "type": "boolean"
    },
    "inhibitedBy": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

AlertRule ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
appIdstring是—
sourcestring是enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"]
severitystring是enum: ["INFO","WARNING","CRITICAL"]
thresholdinteger是minimum: 1;maximum: 1000000
windowSecondsinteger是minimum: 60;maximum: 86400
staleSecondsinteger是minimum: 60;maximum: 86400
descriptionstring是maxLength: 256
enabledboolean是—
inhibitedBystring是—
revisioninteger是minimum: 1
createdAtinteger否—
updatedAtinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "appId",
    "source",
    "severity",
    "threshold",
    "windowSeconds",
    "staleSeconds",
    "description",
    "enabled",
    "inhibitedBy",
    "revision",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "appId": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "PROVIDER_CIRCUIT",
        "RUN_FAILURE",
        "CONFIRMATION_STUCK",
        "RUN_NO_TERMINAL",
        "UNKNOWN_WRITE",
        "QUOTA_UNKNOWN",
        "HTTP_REJECTION",
        "BUDGET_EXHAUSTED"
      ]
    },
    "severity": {
      "type": "string",
      "enum": [
        "INFO",
        "WARNING",
        "CRITICAL"
      ]
    },
    "threshold": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "windowSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    },
    "staleSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    },
    "description": {
      "type": "string",
      "maxLength": 256
    },
    "enabled": {
      "type": "boolean"
    },
    "inhibitedBy": {
      "type": "string"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

AlertRuleList ​

字段类型本层必填默认值与约束
appIdstring是—
items数组:AlertRule是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "appId",
    "items"
  ],
  "properties": {
    "appId": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AlertRule"
      }
    }
  },
  "additionalProperties": false
}

AlertRuleDeletion ​

字段类型本层必填默认值与约束
idstring是—
deletedboolean是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "deleted"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "deleted": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}

AlertInstance ​

字段类型本层必填默认值与约束
idstring是—
dedupKeystring是—
ruleIdstring是—
appIdstring是—
sourcestring是enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"]
severitystring是enum: ["INFO","WARNING","CRITICAL"]
statestring是enum: ["FIRING","ACKNOWLEDGED","RESOLVED"]
targetstring是—
valueinteger是—
thresholdinteger是—
firstFiredAtinteger是—
lastFiredAtinteger是—
fireCountinteger是minimum: 1
revisioninteger是minimum: 1
resolvedAtinteger / null否—
acknowledgedAtinteger / null否—
acknowledgedBystring / null否—
ackReasonstring否—
resolvedBystring否—
resolveReasonstring否—
manualResolvedboolean否—
inhibitedBystring / null否—
lastNotifiedAtinteger / null否—
updatedAtinteger是—
transitions数组:AlertTransition是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "dedupKey",
    "ruleId",
    "appId",
    "source",
    "severity",
    "state",
    "target",
    "value",
    "threshold",
    "firstFiredAt",
    "lastFiredAt",
    "fireCount",
    "revision",
    "updatedAt",
    "transitions"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "dedupKey": {
      "type": "string"
    },
    "ruleId": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "PROVIDER_CIRCUIT",
        "RUN_FAILURE",
        "CONFIRMATION_STUCK",
        "RUN_NO_TERMINAL",
        "UNKNOWN_WRITE",
        "QUOTA_UNKNOWN",
        "HTTP_REJECTION",
        "BUDGET_EXHAUSTED"
      ]
    },
    "severity": {
      "type": "string",
      "enum": [
        "INFO",
        "WARNING",
        "CRITICAL"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "FIRING",
        "ACKNOWLEDGED",
        "RESOLVED"
      ]
    },
    "target": {
      "type": "string"
    },
    "value": {
      "type": "integer"
    },
    "threshold": {
      "type": "integer"
    },
    "firstFiredAt": {
      "type": "integer"
    },
    "lastFiredAt": {
      "type": "integer"
    },
    "fireCount": {
      "type": "integer",
      "minimum": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "resolvedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "acknowledgedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "acknowledgedBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "ackReason": {
      "type": "string"
    },
    "resolvedBy": {
      "type": "string"
    },
    "resolveReason": {
      "type": "string"
    },
    "manualResolved": {
      "type": "boolean"
    },
    "inhibitedBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastNotifiedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "updatedAt": {
      "type": "integer"
    },
    "transitions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AlertTransition"
      }
    }
  },
  "additionalProperties": false
}

AlertPage ​

字段类型本层必填默认值与约束
appIdstring是—
items数组:AlertInstance是—
totalinteger是—
limitinteger是—
offsetinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "appId",
    "items",
    "total",
    "limit",
    "offset"
  ],
  "properties": {
    "appId": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AlertInstance"
      }
    },
    "total": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

PlatformAlertPage ​

字段类型本层必填默认值与约束
items数组:AlertInstance是—
totalinteger是—
byStateobject是—
limitinteger是—
offsetinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "items",
    "total",
    "byState",
    "limit",
    "offset"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AlertInstance"
      }
    },
    "total": {
      "type": "integer"
    },
    "byState": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

AlertEvaluation ​

字段类型本层必填默认值与约束
evaluatedAtinteger是—
rulesinteger是—
results数组:object是—
results[].ruleIdstring是—
results[].outcomestring是enum: ["FIRED","REFIRED","INHIBITED","DEDUPLICATED","RESOLVED","NO_CHANGE","DROPPED_CAPACITY","INHIBITION_CLEARED"]
results[].valueinteger是—
results[].alertIdstring否—
results[].statestring否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "evaluatedAt",
    "rules",
    "results"
  ],
  "properties": {
    "evaluatedAt": {
      "type": "integer"
    },
    "rules": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "ruleId",
          "outcome",
          "value"
        ],
        "properties": {
          "ruleId": {
            "type": "string"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "FIRED",
              "REFIRED",
              "INHIBITED",
              "DEDUPLICATED",
              "RESOLVED",
              "NO_CHANGE",
              "DROPPED_CAPACITY",
              "INHIBITION_CLEARED"
            ]
          },
          "value": {
            "type": "integer"
          },
          "alertId": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

AlertTransitionReason ​

字段类型本层必填默认值与约束
reasonstring是minLength: 1;maxLength: 512;pattern: "\S"
完整机器定义
json
{
  "type": "object",
  "required": [
    "reason"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "pattern": "\\S",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "additionalProperties": false
}

OpsCheck ​

字段类型本层必填默认值与约束
idstring是—
categorystring是enum: ["DEPENDENCY","EXTERNAL","RUNTIME"]
criticalboolean是—
readyboolean是—
detailstring是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "category",
    "critical",
    "ready",
    "detail"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "category": {
      "type": "string",
      "enum": [
        "DEPENDENCY",
        "EXTERNAL",
        "RUNTIME"
      ]
    },
    "critical": {
      "type": "boolean"
    },
    "ready": {
      "type": "boolean"
    },
    "detail": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

OpsStatus ​

字段类型本层必填默认值与约束
livenessstring是enum: ["UP"]
readinessstring是enum: ["READY","NOT_READY"]
degradedboolean是—
generatedAtinteger是—
checks数组:OpsCheck是—
alertsobject是不允许额外字段
alerts.firinginteger是—
alerts.acknowledgedinteger是—
alertEngineobject是不允许额外字段
alertEngine.webhookConfiguredboolean是—
alertEngine.pendingDeliveriesinteger是—
alertEngine.failedDeliveriesinteger是—
alertEngine.deliveredDeliveriesinteger是—
alertEngine.deliveryAttemptsMaxinteger是minimum: 1;maximum: 20
alertEngine.deliveryLeaseSecondsinteger否minimum: 5;maximum: 600
alertEngine.capacityinteger是—
alertEngine.autoEvaluateboolean是—
alertEngine.evaluationIntervalSecondsinteger是—
alertEngine.evaluationsinteger是—
alertEngine.lastEvaluationAtinteger是—
alertEngine.countersobject是—
alertSignalsAlertSignalStatus是—
basisstring是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "liveness",
    "readiness",
    "degraded",
    "generatedAt",
    "checks",
    "alerts",
    "alertEngine",
    "alertSignals",
    "basis"
  ],
  "properties": {
    "liveness": {
      "type": "string",
      "enum": [
        "UP"
      ]
    },
    "readiness": {
      "type": "string",
      "enum": [
        "READY",
        "NOT_READY"
      ]
    },
    "degraded": {
      "type": "boolean"
    },
    "generatedAt": {
      "type": "integer"
    },
    "checks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OpsCheck"
      }
    },
    "alerts": {
      "type": "object",
      "required": [
        "firing",
        "acknowledged"
      ],
      "properties": {
        "firing": {
          "type": "integer"
        },
        "acknowledged": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "alertEngine": {
      "type": "object",
      "required": [
        "webhookConfigured",
        "pendingDeliveries",
        "failedDeliveries",
        "deliveredDeliveries",
        "deliveryAttemptsMax",
        "capacity",
        "autoEvaluate",
        "evaluationIntervalSeconds",
        "evaluations",
        "lastEvaluationAt",
        "counters"
      ],
      "properties": {
        "webhookConfigured": {
          "type": "boolean"
        },
        "pendingDeliveries": {
          "type": "integer"
        },
        "failedDeliveries": {
          "type": "integer"
        },
        "deliveredDeliveries": {
          "type": "integer"
        },
        "deliveryAttemptsMax": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20
        },
        "deliveryLeaseSeconds": {
          "type": "integer",
          "minimum": 5,
          "maximum": 600
        },
        "capacity": {
          "type": "integer"
        },
        "autoEvaluate": {
          "type": "boolean"
        },
        "evaluationIntervalSeconds": {
          "type": "integer"
        },
        "evaluations": {
          "type": "integer"
        },
        "lastEvaluationAt": {
          "type": "integer"
        },
        "counters": {
          "type": "object",
          "additionalProperties": {
            "type": "integer"
          }
        }
      },
      "additionalProperties": false
    },
    "alertSignals": {
      "$ref": "#/components/schemas/AlertSignalStatus"
    },
    "basis": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

EvalAssertions ​

字段类型本层必填默认值与约束
expectedTools数组:string否—
forbiddenTools数组:string否—
mustContain数组:string否—
mustNotContain数组:string否—
expectRefusalboolean否—
minCitationsinteger否minimum: 0;maximum: 64
maxCostnumber否minimum: 0
maxLatencyMsinteger否minimum: 1;maximum: 3600000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "expectedTools": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "forbiddenTools": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mustContain": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mustNotContain": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expectRefusal": {
      "type": "boolean"
    },
    "minCitations": {
      "type": "integer",
      "minimum": 0,
      "maximum": 64
    },
    "maxCost": {
      "type": "number",
      "minimum": 0
    },
    "maxLatencyMs": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3600000
    }
  },
  "additionalProperties": false
}

EvalCase ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
messagestring是minLength: 1;maxLength: 16384
assertionsEvalAssertions是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "message",
    "assertions"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "message": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "assertions": {
      "$ref": "#/components/schemas/EvalAssertions"
    }
  },
  "additionalProperties": false
}

EvalDatasetInput ​

字段类型本层必填默认值与约束
idstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
agentIdstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
descriptionstring是minLength: 1;maxLength: 256
subjectIdstring是minLength: 1;maxLength: 128
tenantIdstring是minLength: 1;maxLength: 128
cases数组:EvalCase是minItems: 1;maxItems: 50
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "agentId",
    "description",
    "subjectId",
    "tenantId",
    "cases"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "agentId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "subjectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "tenantId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "cases": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "$ref": "#/components/schemas/EvalCase"
      }
    }
  },
  "additionalProperties": false
}

EvalDataset ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
agentIdstring是—
descriptionstring是—
subjectIdstring是—
tenantIdstring是—
cases数组:EvalCase是—
revisioninteger是minimum: 1
createdAtinteger否—
updatedAtinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "appId",
    "agentId",
    "description",
    "subjectId",
    "tenantId",
    "cases",
    "revision",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "agentId": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "cases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EvalCase"
      }
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

EvalDatasetList ​

字段类型本层必填默认值与约束
appIdstring是—
items数组:EvalDataset是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "appId",
    "items"
  ],
  "properties": {
    "appId": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EvalDataset"
      }
    }
  },
  "additionalProperties": false
}

EvalAssertionResult ​

字段类型本层必填默认值与约束
kindstring是—
okboolean是—
detailstring是—
expectedstring / integer / number / boolean / null否—
actualstring / integer / number / boolean / null否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "kind",
    "ok",
    "detail"
  ],
  "properties": {
    "kind": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "detail": {
      "type": "string"
    },
    "expected": {
      "type": [
        "string",
        "integer",
        "number",
        "boolean",
        "null"
      ]
    },
    "actual": {
      "type": [
        "string",
        "integer",
        "number",
        "boolean",
        "null"
      ]
    }
  },
  "additionalProperties": false
}

EvalCaseResult ​

字段类型本层必填默认值与约束
caseIdstring是—
runIdstring否—
outcomestring是enum: ["PASSED","FAILED","ERROR"]
statusstring否—
assertions数组:EvalAssertionResult是—
ruleScorenumber是—
costnumber / null否—
latencyMsinteger否—
messagestring否—
manualScoreinteger否minimum: 0;maximum: 100
manualNotestring否—
manualBystring否—
manualAtinteger否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "caseId",
    "outcome",
    "assertions",
    "ruleScore"
  ],
  "properties": {
    "caseId": {
      "type": "string"
    },
    "runId": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "PASSED",
        "FAILED",
        "ERROR"
      ]
    },
    "status": {
      "type": "string"
    },
    "assertions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EvalAssertionResult"
      }
    },
    "ruleScore": {
      "type": "number"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ]
    },
    "latencyMs": {
      "type": "integer"
    },
    "message": {
      "type": "string"
    },
    "manualScore": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "manualNote": {
      "type": "string"
    },
    "manualBy": {
      "type": "string"
    },
    "manualAt": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

EvalSummary ​

字段类型本层必填默认值与约束
totalinteger是—
passedinteger是—
failedinteger是—
errorsinteger是—
ruleScorenumber是—
manualScoredinteger是—
manualAveragenumber / null是—
messagestring否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "total",
    "passed",
    "failed",
    "errors",
    "ruleScore",
    "manualScored",
    "manualAverage"
  ],
  "properties": {
    "total": {
      "type": "integer"
    },
    "passed": {
      "type": "integer"
    },
    "failed": {
      "type": "integer"
    },
    "errors": {
      "type": "integer"
    },
    "ruleScore": {
      "type": "number"
    },
    "manualScored": {
      "type": "integer"
    },
    "manualAverage": {
      "type": [
        "number",
        "null"
      ]
    },
    "message": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

EvalRunStart ​

字段类型本层必填默认值与约束
datasetIdstring是pattern: "^[a-z][a-z0-9-]{0,63}$"
agentVersionstring是pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$"
完整机器定义
json
{
  "type": "object",
  "required": [
    "datasetId",
    "agentVersion"
  ],
  "properties": {
    "datasetId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,63}$"
    },
    "agentVersion": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
    }
  },
  "additionalProperties": false
}

EvalManualScore ​

字段类型本层必填默认值与约束
scoreinteger是minimum: 0;maximum: 100
notestring是minLength: 1;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "required": [
    "score",
    "note"
  ],
  "properties": {
    "score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "additionalProperties": false
}

EvalRun ​

字段类型本层必填默认值与约束
idstring是—
appIdstring是—
datasetIdstring是—
agentIdstring是—
agentVersionstring是—
subjectIdstring否—
tenantIdstring否—
statestring是enum: ["QUEUED","RUNNING","SUCCEEDED","FAILED"]
createdAtinteger是—
finishedAtinteger / null否—
cases数组:EvalCaseResult是—
summaryEvalSummary是—
revisioninteger否—
updatedAtinteger否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "appId",
    "datasetId",
    "agentId",
    "agentVersion",
    "state",
    "createdAt",
    "cases",
    "summary"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "datasetId": {
      "type": "string"
    },
    "agentId": {
      "type": "string"
    },
    "agentVersion": {
      "type": "string"
    },
    "subjectId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "QUEUED",
        "RUNNING",
        "SUCCEEDED",
        "FAILED"
      ]
    },
    "createdAt": {
      "type": "integer"
    },
    "finishedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "cases": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EvalCaseResult"
      }
    },
    "summary": {
      "$ref": "#/components/schemas/EvalSummary"
    },
    "revision": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

EvalRunPage ​

字段类型本层必填默认值与约束
appIdstring是—
items数组:EvalRun是—
totalinteger是—
limitinteger是—
offsetinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "appId",
    "items",
    "total",
    "limit",
    "offset"
  ],
  "properties": {
    "appId": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EvalRun"
      }
    },
    "total": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

EvaluationEngineStatus ​

字段类型本层必填默认值与约束
queueSizeinteger是—
queueCapacityinteger是—
caseTimeoutSecondsinteger是—
countersobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "queueSize",
    "queueCapacity",
    "caseTimeoutSeconds",
    "counters"
  ],
  "properties": {
    "queueSize": {
      "type": "integer"
    },
    "queueCapacity": {
      "type": "integer"
    },
    "caseTimeoutSeconds": {
      "type": "integer"
    },
    "counters": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    }
  },
  "additionalProperties": false
}

EvaluationGate ​

字段类型本层必填默认值与约束
enabledboolean是—
datasetIdstring是maxLength: 64
完整机器定义
json
{
  "type": "object",
  "required": [
    "enabled",
    "datasetId"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "datasetId": {
      "type": "string",
      "maxLength": 64
    }
  },
  "additionalProperties": false
}

AlertSignalStatus ​

字段类型本层必填默认值与约束
pendingKeysinteger是—
maxKeysinteger是—
flushSecondsinteger是—
retentionHoursinteger是—
flushedinteger是—
droppedinteger是—
lastFlushAtinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "pendingKeys",
    "maxKeys",
    "flushSeconds",
    "retentionHours",
    "flushed",
    "dropped",
    "lastFlushAt"
  ],
  "properties": {
    "pendingKeys": {
      "type": "integer"
    },
    "maxKeys": {
      "type": "integer"
    },
    "flushSeconds": {
      "type": "integer"
    },
    "retentionHours": {
      "type": "integer"
    },
    "flushed": {
      "type": "integer"
    },
    "dropped": {
      "type": "integer"
    },
    "lastFlushAt": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

RetentionPolicyCategory ​

字段类型本层必填默认值与约束
enabledboolean是—
daysinteger是minimum: 0;maximum: 3650
requireArchivedboolean是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "enabled",
    "days",
    "requireArchived"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "days": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3650
    },
    "requireArchived": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}

RetentionCategoryView ​

字段类型本层必填默认值与约束
labelstring是—
enabledboolean是—
daysinteger是—
requireArchivedboolean是—
eligibleinteger是—
notestring是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "label",
    "enabled",
    "days",
    "requireArchived",
    "eligible",
    "note"
  ],
  "properties": {
    "label": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "days": {
      "type": "integer"
    },
    "requireArchived": {
      "type": "boolean"
    },
    "eligible": {
      "type": "integer"
    },
    "note": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

RetentionAutoSweep ​

字段类型本层必填默认值与约束
enabledboolean是—
intervalMinutesinteger是minimum: 1;maximum: 1440
完整机器定义
json
{
  "type": "object",
  "required": [
    "enabled",
    "intervalMinutes"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "intervalMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    }
  },
  "additionalProperties": false
}

RetentionCategories ​

字段类型本层必填默认值与约束
RUN_EVENTSRetentionPolicyCategory是—
RUN_CONFIRMATIONSRetentionPolicyCategory是—
ALERT_DELIVERIESRetentionPolicyCategory是—
ALERTS_RESOLVEDRetentionPolicyCategory是—
AUDITRetentionPolicyCategory是—
ARCHIVESRetentionPolicyCategory是—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "RUN_EVENTS",
    "RUN_CONFIRMATIONS",
    "ALERT_DELIVERIES",
    "ALERTS_RESOLVED",
    "AUDIT",
    "ARCHIVES"
  ],
  "properties": {
    "RUN_EVENTS": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    },
    "RUN_CONFIRMATIONS": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    },
    "ALERT_DELIVERIES": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    },
    "ALERTS_RESOLVED": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    },
    "AUDIT": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    },
    "ARCHIVES": {
      "$ref": "#/components/schemas/RetentionPolicyCategory"
    }
  }
}

RetentionPreviewCategories ​

字段类型本层必填默认值与约束
RUN_EVENTSRetentionCategoryView是—
RUN_CONFIRMATIONSRetentionCategoryView是—
ALERT_DELIVERIESRetentionCategoryView是—
ALERTS_RESOLVEDRetentionCategoryView是—
AUDITRetentionCategoryView是—
ARCHIVESRetentionCategoryView是—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "RUN_EVENTS",
    "RUN_CONFIRMATIONS",
    "ALERT_DELIVERIES",
    "ALERTS_RESOLVED",
    "AUDIT",
    "ARCHIVES"
  ],
  "properties": {
    "RUN_EVENTS": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    },
    "RUN_CONFIRMATIONS": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    },
    "ALERT_DELIVERIES": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    },
    "ALERTS_RESOLVED": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    },
    "AUDIT": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    },
    "ARCHIVES": {
      "$ref": "#/components/schemas/RetentionCategoryView"
    }
  }
}

RetentionPolicyInput ​

字段类型本层必填默认值与约束
autoSweepRetentionAutoSweep是—
categoriesRetentionCategories是—
reasonstring是minLength: 1;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "required": [
    "autoSweep",
    "categories",
    "reason"
  ],
  "properties": {
    "autoSweep": {
      "$ref": "#/components/schemas/RetentionAutoSweep"
    },
    "categories": {
      "$ref": "#/components/schemas/RetentionCategories"
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "additionalProperties": false
}

RetentionPolicy ​

字段类型本层必填默认值与约束
idstring是—
revisioninteger是—
updatedAtinteger否—
updatedBystring否—
reasonstring否—
autoSweepRetentionAutoSweep是—
categoriesRetentionCategories是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "revision",
    "autoSweep",
    "categories"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "revision": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    },
    "updatedBy": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "autoSweep": {
      "$ref": "#/components/schemas/RetentionAutoSweep"
    },
    "categories": {
      "$ref": "#/components/schemas/RetentionCategories"
    }
  },
  "additionalProperties": false
}

RetentionSweepRequest ​

字段类型本层必填默认值与约束
dryRunboolean否—
limitinteger否minimum: 1;maximum: 10000
完整机器定义
json
{
  "type": "object",
  "properties": {
    "dryRun": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    }
  },
  "additionalProperties": false
}

RetentionSweepResult ​

字段类型本层必填默认值与约束
sweptAtinteger是—
triggerstring是enum: ["自动清理","管理员手动清理"]
limitinteger是—
deletedobject是—
dryRunboolean否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "sweptAt",
    "trigger",
    "limit",
    "deleted"
  ],
  "properties": {
    "sweptAt": {
      "type": "integer"
    },
    "trigger": {
      "type": "string",
      "enum": [
        "自动清理",
        "管理员手动清理"
      ]
    },
    "limit": {
      "type": "integer"
    },
    "deleted": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "dryRun": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}

RetentionPreview ​

字段类型本层必填默认值与约束
revisioninteger是—
autoSweepRetentionAutoSweep是—
categoriesRetentionPreviewCategories是—
lastSweepAtinteger是—
lastSweepobject是—
countersobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "revision",
    "autoSweep",
    "categories",
    "lastSweepAt",
    "lastSweep",
    "counters"
  ],
  "properties": {
    "revision": {
      "type": "integer"
    },
    "autoSweep": {
      "$ref": "#/components/schemas/RetentionAutoSweep"
    },
    "categories": {
      "$ref": "#/components/schemas/RetentionPreviewCategories"
    },
    "lastSweepAt": {
      "type": "integer"
    },
    "lastSweep": {
      "type": "object",
      "additionalProperties": true
    },
    "counters": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    }
  },
  "additionalProperties": false
}

RetentionStatus ​

字段类型本层必填默认值与约束
revisioninteger是—
autoSweepRetentionAutoSweep是—
lastSweepAtinteger是—
lastSweepobject是—
configuredCategories数组:string是—
countersobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "revision",
    "autoSweep",
    "lastSweepAt",
    "lastSweep",
    "configuredCategories",
    "counters"
  ],
  "properties": {
    "revision": {
      "type": "integer"
    },
    "autoSweep": {
      "$ref": "#/components/schemas/RetentionAutoSweep"
    },
    "lastSweepAt": {
      "type": "integer"
    },
    "lastSweep": {
      "type": "object",
      "additionalProperties": true
    },
    "configuredCategories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "counters": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    }
  },
  "additionalProperties": false
}

RedactionPattern ​

字段类型本层必填默认值与约束
idstring是pattern: "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
regexstring是minLength: 1;maxLength: 256
replacementstring是maxLength: 128
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "regex",
    "replacement"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
    },
    "regex": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "replacement": {
      "type": "string",
      "maxLength": 128
    }
  },
  "additionalProperties": false
}

RedactionPolicyInput ​

字段类型本层必填默认值与约束
enabledboolean是—
modestring是enum: ["TOKEN","HASH"]
tokenstring是maxLength: 32
appliesTo数组:string是minItems: 1
fields数组:string是maxItems: 64
patterns数组:RedactionPattern是maxItems: 32
reasonstring是minLength: 1;maxLength: 512
完整机器定义
json
{
  "type": "object",
  "required": [
    "enabled",
    "mode",
    "token",
    "appliesTo",
    "fields",
    "patterns",
    "reason"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "mode": {
      "type": "string",
      "enum": [
        "TOKEN",
        "HASH"
      ]
    },
    "token": {
      "type": "string",
      "maxLength": 32
    },
    "appliesTo": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "AUDIT",
          "ARCHIVES"
        ]
      }
    },
    "fields": {
      "type": "array",
      "maxItems": 64,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
      }
    },
    "patterns": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "$ref": "#/components/schemas/RedactionPattern"
      }
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "additionalProperties": false
}

RedactionPolicy ​

字段类型本层必填默认值与约束
idstring是—
revisioninteger是—
updatedAtinteger否—
updatedBystring否—
reasonstring否—
enabledboolean是—
modestring是enum: ["TOKEN","HASH"]
tokenstring是—
appliesTo数组:string是—
fields数组:string是—
patterns数组:RedactionPattern是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "id",
    "revision",
    "enabled",
    "mode",
    "token",
    "appliesTo",
    "fields",
    "patterns"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "revision": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    },
    "updatedBy": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "mode": {
      "type": "string",
      "enum": [
        "TOKEN",
        "HASH"
      ]
    },
    "token": {
      "type": "string"
    },
    "appliesTo": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "patterns": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/RedactionPattern"
      }
    }
  },
  "additionalProperties": false
}

RedactionStatus ​

字段类型本层必填默认值与约束
revisioninteger是—
enabledboolean是—
modestring是—
appliesTo数组:string是—
fieldCountinteger是—
patternCountinteger是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "revision",
    "enabled",
    "mode",
    "appliesTo",
    "fieldCount",
    "patternCount"
  ],
  "properties": {
    "revision": {
      "type": "integer"
    },
    "enabled": {
      "type": "boolean"
    },
    "mode": {
      "type": "string"
    },
    "appliesTo": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fieldCount": {
      "type": "integer"
    },
    "patternCount": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}

RedactionPreviewRequest ​

字段类型本层必填默认值与约束
sampleobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "sample"
  ],
  "properties": {
    "sample": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

RedactionPreview ​

字段类型本层必填默认值与约束
appliedboolean是—
modestring否—
revisioninteger否—
changedboolean否—
reasonstring否—
sampleobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "applied",
    "sample"
  ],
  "properties": {
    "applied": {
      "type": "boolean"
    },
    "mode": {
      "type": "string"
    },
    "revision": {
      "type": "integer"
    },
    "changed": {
      "type": "boolean"
    },
    "reason": {
      "type": "string"
    },
    "sample": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

RetentionSweepPreview ​

字段类型本层必填默认值与约束
dryRunboolean是const: true
previewobject是—
完整机器定义
json
{
  "type": "object",
  "required": [
    "dryRun",
    "preview"
  ],
  "properties": {
    "dryRun": {
      "const": true
    },
    "preview": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

EvaluationGateReport ​

字段类型本层必填默认值与约束
enabledboolean是—
datasetIdstring是—
appliesboolean是—
checked数组:string是—
passedboolean否—
完整机器定义
json
{
  "type": "object",
  "required": [
    "enabled",
    "datasetId",
    "applies",
    "checked"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "datasetId": {
      "type": "string"
    },
    "applies": {
      "type": "boolean"
    },
    "checked": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "passed": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}

ConversationSummary ​

字段类型本层必填默认值与约束
idstring是—
titlestring是maxLength: 128;空字符串表示未命名会话。
createdAtinteger是—
updatedAtinteger是—
messageCountinteger是minimum: 0
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string",
      "maxLength": 128,
      "description": "空字符串表示未命名会话。"
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    },
    "messageCount": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "id",
    "title",
    "createdAt",
    "updatedAt",
    "messageCount"
  ]
}

ConversationPage ​

字段类型本层必填默认值与约束
items数组:ConversationSummary是—
nextOffsetinteger / null是—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConversationSummary"
      }
    },
    "nextOffset": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "nextOffset"
  ]
}

ConversationRename ​

字段类型本层必填默认值与约束
titlestring是minLength: 1;maxLength: 128
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "title"
  ]
}

ConversationDeletion ​

字段类型本层必填默认值与约束
idstring是—
deletedboolean是—
完整机器定义
json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "deleted": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "deleted"
  ]
}
适用版本:0.1 发布线 · 最近核对:2026-10-03 · SparkTide 产品文档

汇聚智能,驱动涌现。