切换主题
数据结构与字段
本页根据随站点发布的 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| version | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| name | string | 是 | — |
| revision | integer | 是 | — |
| status | 枚举 | 是 | enum: ["DRAFT","ACTIVE","SUSPENDED","ARCHIVED"] |
| defaultAgent | Ref / null | 是 | — |
| statusReason | string | 否 | maxLength: 512 |
| permissionProvider | BusinessProvider | 否 | — |
| contextProvider | ContextProvider | 否 | — |
| securityEpoch | integer | 否 | minimum: 0 |
| evaluationGate | EvaluationGate | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| name | string | 否 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}CreateToken
subjectId 非空;tenantId 默认为空字符串。原始 token 仅签发时返回。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 否 | maxLength: 128 |
| role | 枚举 | 否 | default: "USER";enum: ["USER","APP_ADMIN"] |
| ttlSeconds | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| agentId | string | 是 | — |
| version | string | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"agentId": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"agentId",
"version"
],
"additionalProperties": false
}Token
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| subjectId | string | 是 | — |
| tenantId | string | 是 | — |
| role | string | 是 | — |
| expiresAt | integer | 是 | format: "int64" |
| revoked | boolean | 是 | — |
| token | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| version | string | 是 | — |
| definition | Definition | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"version": {
"type": "string"
},
"definition": {
"$ref": "#/components/schemas/Definition"
}
},
"required": [
"id",
"version",
"definition"
],
"additionalProperties": false
}Registry
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| version | string | 是 | — |
| kind | string | 是 | — |
| appId | string | 是 | — |
| revision | integer | 是 | — |
| status | 枚举 | 是 | enum: ["DRAFT","PUBLISHED","REVOKED"] |
| definition | Definition | 是 | — |
完整机器定义
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 共用根任务预算。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| systemPrompt | string | 是 | minLength: 1;maxLength: 32768 |
| modelProfile | Ref | 是 | — |
| allowedTools | 数组:Ref | 否 | default: [] |
| allowedKnowledge | 数组:Ref | 否 | default: [] |
| allowedAgents | 数组:Ref | 否 | default: [] |
| allowedUi | 数组:Ref | 否 | default: [] |
| delegatedCapabilities | 数组:string | 否 | kind/id@version for all delegated capabilities, including descendant ceilings |
| limits | object | 否 | 不允许额外字段;根调用汇总全树;子调用按自己的定义预留父级剩余额度,结束归还未用容量。供应商 Token 与费用在网络发送前原子预留。 |
| limits.maxSteps | integer | 否 | default: 8;minimum: 1;maximum: 32 |
| limits.maxToolCalls | integer | 否 | default: 16;minimum: 0;maximum: 64 |
| limits.maxDepth | integer | 否 | default: 3;minimum: 0;maximum: 8 |
| limits.timeoutSeconds | integer | 否 | default: 120;minimum: 1;maximum: 600 |
| limits.maxTokens | integer | 否 | default: 32000;minimum: 256;maximum: 1000000;字符预算的旧字段;与 maxBudgetUnits 不能同时设置。 |
| limits.maxAgentCalls | integer | 否 | default: 8;minimum: 0;maximum: 64 |
| limits.maxBudgetUnits | integer | 否 | default: 32000;minimum: 256;maximum: 1000000 |
| limits.maxProviderTokens | integer | 否 | minimum: 0;maximum: 1000000000000 |
| limits.maxCost | object | 否 | 不允许额外字段 |
| limits.maxCost.currency | string | 是 | pattern: "^[A-Z]{3}$" |
| limits.maxCost.amount | string | 是 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| entryPolicy | object | 否 | 不允许额外字段;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.mode | string | 否 | 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 |
| knowledgeRouting | KnowledgeRoutingPolicy | 否 | — |
完整机器定义
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。后者要求用户确认。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| description | string | 否 | — |
| endpoint | string | 是 | format: "uri" |
| secretRef | string | 否 | — |
| effect | 枚举 | 是 | enum: ["READ","COMPUTE","WRITE","DANGEROUS"] |
| roles | 数组:枚举 | 是 | minItems: 1 |
| inputSchema | object | 是 | — |
| outputSchema | object | 是 | — |
| leaseRequired | boolean | 否 | 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 通过独立文档接口导入。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| description | string | 否 | — |
| mode | 枚举 | 是 | enum: ["INLINE","REMOTE","MANAGED"] |
| endpoint | string | 否 | format: "uri" |
| secretRef | string | 否 | — |
| topK | integer | 否 | default: 3;minimum: 1;maximum: 10 |
| documents | 数组:object | 否 | minItems: 1;maxItems: 100 |
| documents[].id | string | 是 | — |
| documents[].text | string | 是 | — |
| documents[].title | string | 否 | — |
| documents[].source | string | 否 | — |
| documents[].tenantId | string | 否 | — |
| leaseRequired | boolean | 否 | default: false |
| permissions | 数组:string | 否 | maxItems: 64;uniqueItems: true;业务权限名称;需认证权限 Provider,未配置则拒绝受保护能力。 |
| callbackProtocolVersion | string | 否 | const: "1.0";仅 REMOTE;缺省沿用旧 documents 合同。 |
| mandatoryFilters | 数组:枚举 | 否 | maxItems: 2;uniqueItems: true |
| tags | 数组:string | 否 | maxItems: 16;uniqueItems: true |
| chunking | DocumentChunkingPolicy | 否 | — |
| retrieval | KnowledgeRetrieval | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| description | string | 否 | — |
| propsSchema | object | 是 | — |
| fallback | string | 是 | 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"] |
| endpoint | string | 是 | format: "uri" |
| secretRef | string | 否 | — |
| stream | boolean | 否 | default: false;OPENAI_CHAT 为原生 SSE;REMOTE 为版本 1.0 的统一模型 SSE。stream 默认 false,模型必须显式声明 streaming=true。 |
| leaseRequired | boolean | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| provider | Ref | 是 | — |
| modelId | string | 是 | — |
| pricing | object | 否 | 不允许额外字段 |
| pricing.currency | string | 是 | pattern: "^[A-Z]{3}$" |
| pricing.inputPerMillion | number | 是 | minimum: 0;maximum: 1000000 |
| pricing.outputPerMillion | number | 是 | minimum: 0;maximum: 1000000 |
| capabilities | ModelCapabilities | 否 | — |
完整机器定义
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 绑定仅平台管理员授权。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| model | Ref | 是 | — |
| scope | string | 否 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"model": {
"$ref": "#/components/schemas/Ref"
},
"scope": {
"type": "string"
}
},
"required": [
"model"
],
"additionalProperties": false
}ProfileDefinition
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| binding | Ref | 是 | — |
| maxOutputTokens | integer | 否 | default: 1024;minimum: 1;maximum: 32768 |
| outputSchema | object | 否 | 平台闭合 Schema 方言;根为 object,嵌套对象全部属性 required,完整输出验证后才发送文字。 |
| fallbackBindings | 数组:Ref | 否 | maxItems: 7;uniqueItems: true;固定候选绑定版本;与主绑定不能重复,全部候选必须符合智能体兼容性。 |
| routing | ModelRoutingPolicy | 否 | — |
| parameters | ModelGenerationParameters | 否 | — |
完整机器定义
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 不是可信身份。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| appId | string | 否 | — |
| agentId | string / null | 否 | — |
| agentVersion | string | 否 | — |
| conversationId | string / null | 否 | — |
| message | object | 是 | 不允许额外字段 |
| message.role | string | 是 | const: "user" |
| message.content | string | 是 | minLength: 1;maxLength: 16384 |
| context | object | 否 | — |
| client | object | 否 | 不允许额外字段 |
| client.platform | string | 否 | — |
| 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| confirmationId | string | 是 | — |
| 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。
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| subjectId | string | 否 | — |
| tenantId | string | 否 | — |
| status | 枚举 | 是 | enum: ["QUEUED","RUNNING","WAITING_CONFIRMATION","SUCCEEDED","FAILED","CANCELLED","TIMED_OUT"] |
| lastSequence | integer | 是 | — |
| traceId | string | 是 | — |
| conversationId | string | 是 | — |
| messageId | string | 是 | — |
| createdAt | integer | 否 | — |
| deadline | integer | 否 | — |
| finishedAt | integer | 否 | — |
| errorCode | string / null | 否 | — |
| agent | Ref | 否 | — |
| ownerId | string | 否 | — |
| archived | boolean | 否 | — |
| usage | object | 否 | — |
| knowledgeAccessEpoch | integer | 否 | minimum: 0;Application knowledge permission generation; previous runs/conversations become unavailable after a policy change |
| securityEpoch | integer | 否 | minimum: 0 |
| modelLedger | boolean | 否 | — |
| modelAccounting | ModelAccountingSummary | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| error | object | 是 | 不允许额外字段 |
| error.code | string | 是 | — |
| error.message | string | 是 | — |
| error.traceId | string | 是 | — |
| error.retryable | boolean | 是 | — |
| error.details | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | 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 | string | 是 | — |
| traceId | string | 是 | — |
| conversationId | string | 是 | — |
| messageId | string | 是 | — |
| sequence | integer | 是 | minimum: 1 |
| data | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| runId | string | 是 | — |
| subjectId | string | 否 | — |
| tenantId | string | 否 | — |
| role | string | 否 | — |
| toolId | string | 否 | — |
| version | string | 否 | — |
| effect | string | 否 | — |
| inputHash | string | 是 | — |
| idempotencyKey | string | 否 | — |
| errorCode | string | 否 | — |
| resultHash | string | 否 | — |
| reason | string | 否 | — |
| evidence | string | 否 | — |
| reconciledBy | string | 否 | — |
| status | string | 是 | enum: ["RUNNING","SUCCEEDED","FAILED","UNKNOWN"] |
| revision | integer | 是 | — |
| createdAt | integer | 否 | — |
| finishedAt | integer | 否 | — |
| reconciledAt | integer | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| subjects | 数组:string | 是 | maxItems: 256;uniqueItems: true |
| tenants | 数组:string | 是 | maxItems: 256;uniqueItems: true |
| roles | 数组:string | 是 | maxItems: 256;uniqueItems: true |
| revision | integer | 是 | minimum: 0 |
| reason | string | 否 | minLength: 1;maxLength: 1024 |
| updatedAt | integer | 否 | — |
| updatedBy | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| endpoint | string | 否 | format: "uri" |
| secretRef | string | 否 | minLength: 1 |
| timeoutMs | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| endpoint | string | 否 | format: "uri" |
| secretRef | string | 否 | minLength: 1 |
| timeoutMs | integer | 否 | default: 2000;minimum: 100;maximum: 10000 |
| schema | BusinessContextSchema | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| appId | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 是 | maxLength: 128 |
| role | string | 是 | enum: ["USER","APP_ADMIN"] |
| runId | string | 是 | maxLength: 128 |
| traceId | string | 是 | maxLength: 128 |
| deadline | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| appId | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 是 | maxLength: 128 |
| role | string | 是 | enum: ["USER","APP_ADMIN","PLATFORM_ADMIN"];调用方角色;平台管理员经平台令牌访问应用资源时为 PLATFORM_ADMIN |
| runId | string | 是 | maxLength: 128 |
| traceId | string | 是 | maxLength: 128 |
| deadline | integer | 是 | minimum: 1 |
| resource | object | 是 | 不允许额外字段 |
| resource.id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| resource.version | string | 是 | pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$" |
| resource.kind | string | 是 | enum: ["agents","tools","knowledge","ui-capabilities"] |
| action | string | 是 | enum: ["DISCOVER","EXECUTE","READ_HISTORY"] |
| requiredPermissions | 数组:string | 是 | minItems: 1;maxItems: 64;uniqueItems: true |
| arguments | object | 是 | 调用参数;历史检查保留原执行参数,不可用来覆盖身份。 |
| untrustedContext | object | 是 | 客户端上下文,不能提供授权。 |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| allowed | boolean | 是 | — |
| decisionId | string | 是 | minLength: 1;maxLength: 128 |
| reason | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| context | object | 是 | 遵守应用配置 Schema,最大 16 KiB。 |
| source | string | 是 | minLength: 1;maxLength: 128 |
| revision | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| kind | string | 是 | enum: ["agents","tools","knowledge","ui-capabilities","model-providers","models","model-bindings","model-profiles"] |
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| version | string | 是 | pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$" |
| revision | integer | 是 | 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 不能重复;可以包含已发布依赖。 |
| defaultAgent | Ref | 否 | — |
| reason | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| valid | boolean | 是 | — |
| planHash | string / null | 是 | — |
| applicationRevision | integer | 是 | — |
| resources | 数组:ReleaseResource | 是 | — |
| defaultAgent | Ref / null | 是 | — |
| dependencyCount | integer | 是 | — |
| errors | 数组:object | 是 | — |
| errors[].resource | string | 是 | — |
| errors[].code | string | 是 | — |
| errors[].message | string | 是 | — |
| evaluationGate | EvaluationGateReport | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| subjectId | string | 是 | — |
| createdAt | integer | 是 | — |
| reason | string | 是 | — |
| planHash | string | 是 | — |
| resources | 数组:object | 是 | — |
| resources[].kind | string | 是 | enum: ["agents","tools","knowledge","ui-capabilities","model-providers","models","model-bindings","model-profiles"] |
| resources[].id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| resources[].version | string | 是 | pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$" |
| resources[].revision | integer | 是 | minimum: 1 |
| resources[].status | string | 是 | const: "PUBLISHED" |
| previousDefaultAgent | Ref / null | 是 | — |
| defaultAgent | Ref / null | 是 | — |
| applicationRevision | integer | 是 | — |
完整机器定义
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 | 是 | — |
| nextOffset | integer / null | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReleaseRecord"
}
},
"nextOffset": {
"type": [
"integer",
"null"
]
}
},
"required": [
"items",
"nextOffset"
],
"additionalProperties": false
}ModelCapabilities
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| toolCalling | boolean | 否 | — |
| structuredOutput | boolean | 否 | — |
| vision | boolean | 否 | — |
| audio | boolean | 否 | — |
| streaming | boolean | 否 | — |
| contextWindow | integer | 否 | minimum: 1;maximum: 10000000 |
| maxOutputTokens | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| valid | boolean | 是 | — |
| evidence | string | 是 | const: "DECLARED" |
| contextEstimator | string | 是 | const: "UTF8_BYTES_ESTIMATE" |
| checks | 数组:object | 是 | — |
| checks[].resource | string | 是 | — |
| checks[].model | object | 是 | — |
| checks[].model.scope | string | 是 | — |
| checks[].model.id | string | 是 | — |
| checks[].model.version | string | 是 | — |
| checks[].capabilityStates | object | 是 | — |
| checks[].evidence | string | 是 | const: "DECLARED" |
| checks[].outputTokens | integer | 是 | — |
| checks[].modelLimits | object | 是 | — |
| checks[].modelLimits.contextWindow | integer | 否 | — |
| checks[].modelLimits.maxOutputTokens | integer | 否 | — |
| checks[].regions | 数组:string | 是 | — |
| checks[].binding | Ref | 否 | — |
| errors | 数组:object | 是 | — |
| errors[].resource | string | 是 | — |
| errors[].code | string | 是 | — |
| errors[].message | string | 是 | — |
| warnings | 数组:object | 是 | — |
| warnings[].resource | string | 是 | — |
| warnings[].code | string | 是 | — |
| warnings[].message | string | 是 | — |
完整机器定义
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),空数组关闭故障切换。已开始文字或工具参数输出时始终禁止切换。 |
| maxAttempts | integer | 否 | minimum: 1;maximum: 8;默认候选数,不能超过实际候选数。 |
| attemptTimeoutSeconds | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| temperature | number | 否 | minimum: 0;maximum: 2 |
| topP | number | 否 | maximum: 1;exclusiveMinimum: 0 |
| seed | integer | 否 | 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_tokens | integer / null | 是 | minimum: 0;maximum: 1000000000 |
| completion_tokens | integer / null | 是 | minimum: 0;maximum: 1000000000 |
| total_tokens | integer / 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| currency | string | 是 | pattern: "^[A-Z]{3}$" |
| amount | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| providerUsage | object | 是 | 不允许额外字段;完整整数用量;total_tokens 不得低于输入加输出。 |
| providerUsage.prompt_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| providerUsage.completion_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| providerUsage.total_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| billedCost | ModelBilledCost | 否 | — |
| providerRequestId | string | 否 | minLength: 1;maxLength: 256 |
| reason | string | 是 | minLength: 1;maxLength: 1024 |
| evidence | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| providerUsage | object | 是 | 不允许额外字段;完整整数用量;total_tokens 不得低于输入加输出。 |
| providerUsage.prompt_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| providerUsage.completion_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| providerUsage.total_tokens | integer | 是 | minimum: 0;maximum: 1000000000 |
| billedCost | ModelBilledCost | 否 | — |
| providerRequestId | string | 否 | minLength: 1;maxLength: 256 |
| reason | string | 是 | minLength: 1;maxLength: 1024 |
| evidence | string | 是 | minLength: 1;maxLength: 2048 |
| recordedAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| recordedBy | string | 是 | — |
| usageSource | string | 是 | 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 不补造历史调用。 |
| invocations | integer | 是 | minimum: 0;maximum: 1000000 |
| sent | integer | 是 | minimum: 0;maximum: 1000000 |
| notSent | integer | 是 | minimum: 0;maximum: 1000000 |
| unknownCostInvocations | integer | 是 | minimum: 0;maximum: 1000000 |
| providerUsage | ModelProviderUsage | 是 | — |
| cost | object / null | 是 | 不允许额外字段 |
| cost.source | string | 是 | const: "configured-pricing" |
| cost.amounts | object | 是 | — |
| knownConfiguredAmounts | object | 是 | 按币种累计十进制金额,不自动换算。 |
| providerBilledAmounts | object | 是 | 按币种累计十进制金额,不自动换算。 |
| billedComplete | boolean | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| invocationId | string | 是 | — |
| runId | string | 是 | — |
| appId | string | 是 | — |
| subjectId | string | 是 | — |
| tenantId | string | 是 | — |
| stepId | string | 是 | — |
| agentCallId | string | 是 | — |
| parentAgentCallId | string / null | 是 | — |
| agentId | string | 是 | — |
| depth | integer | 是 | minimum: 0;maximum: 8 |
| attempt | integer | 是 | minimum: 1;maximum: 8 |
| binding | Ref | 是 | — |
| model | object | 是 | 不允许额外字段 |
| model.id | string | 是 | — |
| model.version | string | 是 | — |
| model.scope | string | 是 | — |
| provider | object | 是 | 不允许额外字段 |
| provider.id | string | 是 | — |
| provider.version | string | 是 | — |
| provider.scope | string | 是 | — |
| selectionReason | string | 是 | — |
| status | 枚举 | 是 | enum: ["RUNNING","RESPONDED","FAILED","SKIPPED","UNKNOWN"] |
| sendState | 枚举 | 是 | enum: ["NOT_SENT","SENT"];SENT 表示进入发送边界,可能被接收;不证明供应商收到。 |
| outputStarted | boolean | 是 | — |
| pricing | object | 是 | 当次固定模型价目,未配置时为空对象。 |
| pricingVersion | string | 是 | — |
| pricingHash | string | 是 | — |
| inputHash | string | 否 | — |
| usage | ModelProviderUsage | 是 | — |
| usageSource | 枚举 | 是 | enum: ["UNKNOWN","PROVIDER"] |
| cost | object / null | 是 | 不允许额外字段 |
| cost.source | string | 是 | const: "configured-pricing" |
| cost.amounts | object | 是 | — |
| createdAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| sentAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| receiptAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| finishedAt | integer / null | 否 | — |
| revision | integer | 是 | minimum: 1;maximum: 2147483647 |
| errorCode | string / null | 否 | — |
| effectiveUsage | ModelProviderUsage | 是 | — |
| effectiveCost | object / null | 是 | 不允许额外字段 |
| effectiveCost.source | string | 是 | const: "configured-pricing" |
| effectiveCost.amounts | object | 是 | — |
| costDifference | object / null | 是 | 仅可比币种有完整配置金额时返回账单减配置费用。 |
| costDifference.currency | string | 否 | — |
| costDifference.amount | string | 否 | — |
| reconciliation | ModelReconciliation | 否 | — |
| reconciliationHistory | 数组:ModelReconciliation | 否 | maxItems: 100;明细接口返回;列表不返回历史数组。 |
| effectiveUsageSource | 枚举 | 是 | enum: ["NOT_SENT","UNKNOWN","PROVIDER","PROVIDER_RECONCILIATION"] |
| agentVersion | string | 否 | 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 | 是 | — |
| summary | ModelAccountingSummary | 是 | — |
| total | integer | 是 | minimum: 0;maximum: 1000000 |
| limit | integer | 是 | minimum: 1;maximum: 100 |
| offset | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| failureThreshold | integer | 是 | minimum: 1;maximum: 20 |
| failureWindowSeconds | integer | 是 | minimum: 10;maximum: 3600 |
| openSeconds | integer | 是 | minimum: 1;maximum: 3600 |
| probeIntervalSeconds | integer | 是 | minimum: 10;maximum: 3600 |
| probeTimeoutSeconds | integer | 是 | minimum: 1;maximum: 10 |
| probesPerMinute | integer | 是 | minimum: 1;maximum: 60 |
| autoProbe | boolean | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| model | object | 是 | 不允许额外字段 |
| model.id | string | 是 | — |
| model.version | string | 是 | — |
| model.scope | string | 是 | — |
| provider | object | 是 | 不允许额外字段 |
| provider.id | string | 是 | — |
| provider.version | string | 是 | — |
| provider.scope | string | 是 | — |
| binding | Ref | 是 | — |
| state | 枚举 | 是 | enum: ["CLOSED","OPEN","HALF_OPEN","BLOCKED"] |
| generation | integer | 是 | minimum: 1;maximum: 2147483647 |
| revision | integer | 是 | minimum: 1;maximum: 2147483647 |
| readyAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| lastProbeAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| activeProbe | object / null | 是 | 不允许额外字段 |
| activeProbe.id | string | 是 | — |
| activeProbe.expiresAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| policy | ModelHealthPolicy | 是 | — |
| recentFailures | integer | 是 | minimum: 0;maximum: 20 |
| updatedAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| lastSuccessAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| lastFailureAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| lastErrorCode | string / null | 否 | — |
| lastResetReason | string | 否 | — |
| lastProbeId | string | 否 | — |
| lastProbeFinishedAt | integer | 否 | 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[].checkedAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| verifiedChecks[].evidence | string | 是 | 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"] |
| usage | ModelProviderUsage | 是 | — |
| cost | object / null | 是 | 不允许额外字段 |
| cost.source | string | 是 | const: "configured-pricing" |
| cost.amounts | object | 是 | — |
| sentAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| receiptAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| errorCode | string | 否 | — |
| latencyMs | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| responseCompleted | boolean | 否 | 供应商响应已按协议完整终结;仅完整回执允许自动释放费用预留 |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| healthId | string | 是 | — |
| appId | string | 是 | — |
| binding | Ref | 是 | — |
| model | object | 是 | 不允许额外字段 |
| model.id | string | 是 | — |
| model.version | string | 是 | — |
| model.scope | string | 是 | — |
| provider | object | 是 | 不允许额外字段 |
| provider.id | string | 是 | — |
| provider.version | string | 是 | — |
| provider.scope | string | 是 | — |
| createdAt | integer | 是 | minimum: 0;maximum: 9223372036854776000 |
| status | 枚举 | 是 | enum: ["RUNNING","COMPLETED","UNKNOWN","SUPERSEDED"] |
| generation | integer | 是 | minimum: 1;maximum: 2147483647 |
| checks | 数组:ModelProbeCheck | 是 | minItems: 1;maxItems: 4 |
| reason | string | 是 | minLength: 1;maxLength: 512 |
| requestedBy | string | 是 | — |
| maxOutputTokensPerCheck | integer | 是 | minimum: 1;maximum: 32 |
| pricing | object | 是 | — |
| pricingVersion | string | 是 | — |
| evidence | string | 是 | const: "SYNTHETIC_PROBE" |
| finishedAt | integer | 否 | minimum: 0;maximum: 9223372036854776000 |
| errorCode | string | 否 | — |
| priorHealthState | string | 否 | — |
完整机器定义
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;固定合成提示词,不执行业务工具。 |
| reason | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| reason | string | 是 | minLength: 1;maxLength: 512 |
完整机器定义
json
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"reason"
],
"additionalProperties": false
}ModelProbeResult
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| probe | ModelProbe | 是 | — |
| health | ModelHealthState | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"probe": {
"$ref": "#/components/schemas/ModelProbe"
},
"health": {
"$ref": "#/components/schemas/ModelHealthState"
}
},
"required": [
"probe",
"health"
],
"additionalProperties": false
}ModelProbePage
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| items | 数组:ModelProbe | 是 | — |
| total | integer | 是 | minimum: 0;maximum: 2147483647 |
| limit | integer | 是 | minimum: 1;maximum: 100 |
| offset | integer | 是 | 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_tokens | integer | 否 | minimum: 0;maximum: 1000000000 |
| completion_tokens | integer | 否 | minimum: 0;maximum: 1000000000 |
| total_tokens | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | minLength: 1;maxLength: 128;pattern: "\S" |
| type | string | 是 | const: "function" |
| function | object | 是 | 不允许额外字段 |
| function.name | string | 是 | minLength: 1;maxLength: 128;pattern: "\S" |
| function.arguments | string | 是 | 完整闭合 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"] |
| content | string / null | 否 | — |
| tool_calls | 数组:RemoteModelToolCall | 否 | maxItems: 16 |
| tool_call_id | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| invocationId | string | 是 | minLength: 1;maxLength: 256;pattern: "\S" |
| deadline | integer | 是 | minimum: 1;maximum: 9223372036854776000;绝对 UTC 毫秒;回调最多等待 60 秒 |
| purpose | 枚举 | 是 | enum: ["BUSINESS","SYNTHETIC_PROBE"] |
| appId | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| subjectId | string | 否 | minLength: 1;maxLength: 256;pattern: "\S" |
| tenantId | string | 否 | — |
| runId | string | 否 | minLength: 1;maxLength: 256;pattern: "\S" |
| traceId | string | 否 | minLength: 1;maxLength: 256;pattern: "\S" |
| model | string | 是 | minLength: 1;maxLength: 128;pattern: "\S" |
| messages | 数组:RemoteModelMessage | 是 | minItems: 1;maxItems: 256 |
| tools | 数组:object | 否 | maxItems: 128 |
| max_completion_tokens | integer | 是 | minimum: 1;maximum: 10000000 |
| stream | boolean | 是 | — |
| response_format | object | 否 | — |
| tool_choice | 对象 | 否 | 合成探测或受控模型请求中的工具选择 |
| temperature | number | 否 | minimum: 0;maximum: 2 |
| top_p | number | 否 | maximum: 1;exclusiveMinimum: 0 |
| seed | integer | 否 | 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 | 对象 | 是 | — |
| usage | RemoteModelUsage | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| type | string | 是 | const: "text.delta" |
| text | string | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"protocolVersion": {
"const": "1.0"
},
"type": {
"const": "text.delta"
},
"text": {
"type": "string"
}
},
"required": [
"protocolVersion",
"type",
"text"
],
"additionalProperties": false
}RemoteModelToolDelta
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| type | string | 是 | const: "tool.delta" |
| index | integer | 是 | minimum: 0;maximum: 15 |
| id | string | 否 | minLength: 1;maxLength: 128;pattern: "\S" |
| name | string | 否 | minLength: 1;maxLength: 128;pattern: "\S" |
| arguments | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| type | string | 是 | const: "usage" |
| usage | RemoteModelUsage | 是 | — |
完整机器定义
json
{
"type": "object",
"properties": {
"protocolVersion": {
"const": "1.0"
},
"type": {
"const": "usage"
},
"usage": {
"$ref": "#/components/schemas/RemoteModelUsage"
}
},
"required": [
"protocolVersion",
"type",
"usage"
],
"additionalProperties": false
}RemoteModelCompleted
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| type | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| type | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| error | object | 是 | 不允许额外字段 |
| 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| scope | string | 是 | enum: ["APP","TENANT","USER","MODEL"] |
| value | string | 否 | default: "*";minLength: 1;maxLength: 256;USER 通配按可信 tenantId/subjectId 分桶;MODEL 为 scope/models/id@version 或 * |
| period | string | 是 | enum: ["MINUTE","HOUR","DAY","MONTH"];UTC 固定窗口,多条规则同时生效 |
| enabled | boolean | 否 | default: true |
| maxAmount | string | 否 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| currency | string | 否 | pattern: "^[A-Z]{3}$" |
| unknownPriceMode | string | 否 | enum: ["REJECT","SEPARATE"];金额规则必须 REJECT;SEPARATE 必须另设未知价请求额度,不能带 maxAmount |
| maxConcurrentRuns | integer | 否 | minimum: 0;maximum: 1000000000000 |
| maxRunRequests | integer | 否 | minimum: 0;maximum: 1000000000000 |
| maxConcurrentModels | integer | 否 | minimum: 0;maximum: 1000000000000 |
| maxModelRequests | integer | 否 | minimum: 0;maximum: 1000000000000 |
| maxTokens | integer | 否 | minimum: 0;maximum: 1000000000000 |
| maxUnpricedRequests | integer | 否 | 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 |
| reason | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | — |
| revision | integer | 是 | minimum: 0 |
| policies | 数组:QuotaPolicy | 是 | — |
| reason | string | 否 | — |
| updatedAt | integer | 否 | minimum: 0;maximum: 9000000000000000 |
| updatedBy | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| periodStart | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| periodEnd | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| runRequests | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| modelRequests | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| unpricedRequests | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| heldTokens | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| chargedTokens | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| id | string | 是 | — |
| appId | string | 是 | — |
| policyId | string | 是 | — |
| scopeKey | string | 是 | — |
| scope | string | 是 | — |
| period | string | 是 | enum: ["MINUTE","HOUR","DAY","MONTH","RUN"] |
| subjectId | string / null | 是 | — |
| tenantId | string / null | 是 | — |
| model | string / null | 是 | — |
| currency | string / null | 是 | — |
| heldAmount | string | 是 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| chargedAmount | string | 是 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| runId | string | 否 | — |
| agentCallId | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| bucketId | string | 是 | — |
| scopeKey | string | 是 | — |
| policyId | string | 是 | — |
| tokenBudget | boolean | 是 | — |
| moneyBudget | boolean | 是 | — |
| currency | string / null | 是 | — |
| heldTokens | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| chargedTokens | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| heldAmount | string | 是 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| chargedAmount | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| runId | string | 是 | — |
| model | string | 是 | — |
| probeId | string | 是 | — |
| probeCheck | string | 是 | — |
| purpose | string | 是 | enum: ["BUSINESS","SYNTHETIC_PROBE"] |
| status | string | 是 | enum: ["HELD","UNKNOWN","SETTLED"] |
| subjectId | string / null | 是 | — |
| tenantId | string / null | 是 | — |
| createdAt | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| deadline | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| finishedAt | integer | 否 | minimum: 0;maximum: 9000000000000000 |
| configRevision | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| revision | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| pricing | object | 是 | 固定发布模型价目;未知价为空对象 |
| parts | 数组:QuotaReservationPart | 是 | — |
| providerUsage | ModelProviderUsage | 否 | — |
| billedCost | object / null | 否 | 不允许额外字段 |
| billedCost.currency | string | 否 | — |
| billedCost.amount | string | 否 | pattern: "^[0-9]{1,13}(\.[0-9]{1,12})?$" |
| usageSource | string | 否 | — |
| 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 | 是 | — |
| total | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| limit | integer | 是 | minimum: 1;maximum: 100 |
| offset | integer | 是 | minimum: 0;maximum: 1000000 |
| now | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| accounting | string | 是 | 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 | 是 | — |
| total | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| limit | integer | 是 | minimum: 1;maximum: 100 |
| offset | integer | 是 | minimum: 0;maximum: 1000000 |
| now | integer | 是 | minimum: 0;maximum: 9000000000000000 |
| accounting | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| steps | integer | 是 | minimum: 0;maximum: 32 |
| toolCalls | integer | 是 | minimum: 0;maximum: 64 |
| agentCalls | integer | 是 | minimum: 0;maximum: 64 |
| budgetUnits | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| agentCallId | string | 是 | minLength: 1 |
| parentAgentCallId | string / null | 是 | — |
| depth | integer | 是 | minimum: 0;maximum: 8 |
| agentId | string | 是 | minLength: 1 |
| agentVersion | string | 是 | pattern: "^(0|[1-9][0-9])\.(0|[1-9][0-9])\.(0|[1-9][0-9]*)$" |
| status | string | 是 | const: "SUCCEEDED" |
| text | string | 是 | — |
| output | object / object | 是 | — |
| usage | AgentBudgetUsage | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | minLength: 1;maxLength: 64;pattern: "^[a-z][a-z0-9-]{0,63}$" |
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 是 | 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"] |
| id | string | 是 | minLength: 1;maxLength: 128 |
| uri | string | 否 | minLength: 1;maxLength: 2048;pattern: "^https?😕/" |
| version | string | 否 | minLength: 0;maxLength: 128 |
| page | integer | 否 | minimum: 1;maximum: 1000000 |
| locator | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | minLength: 1;maxLength: 128;pattern: "^[a-zA-Z0-9_.:-]{1,128}$" |
| documentId | string | 否 | minLength: 1;maxLength: 128;pattern: "^[a-zA-Z0-9_.:-]{1,128}$" |
| content | string | 是 | minLength: 1;maxLength: 16384 |
| title | string | 否 | minLength: 0;maxLength: 512 |
| source | KnowledgeSource | 是 | — |
| score | number | 否 | minimum: 0;maximum: 1 |
| metadata | object | 否 | 最多 4096 UTF-8 字节、嵌套深度 8;有限 JSON 值。 |
| tenantId | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | const: "1.0" |
| appId | string | 是 | minLength: 1;maxLength: 64 |
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 是 | minLength: 0;maxLength: 128 |
| knowledgeId | string | 是 | minLength: 1;maxLength: 64 |
| version | string | 是 | minLength: 1;maxLength: 64 |
| query | string | 是 | minLength: 1;maxLength: 16384 |
| topK | integer | 是 | minimum: 1;maximum: 10 |
| filters | KnowledgeFilter | 是 | — |
| runId | string | 是 | minLength: 1;maxLength: 128 |
| traceId | string | 是 | minLength: 1;maxLength: 128 |
| executionId | string | 是 | minLength: 1;maxLength: 128 |
| deadline | integer | 是 | minimum: 1;maximum: 9223372036854776000 |
| trustedContext | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| protocolVersion | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| error | object | 是 | 不允许额外字段 |
| 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| knowledge | Ref | 是 | — |
| queryTerms | 数组:string | 否 | maxItems: 16;uniqueItems: true |
| tags | 数组:string | 否 | maxItems: 16;uniqueItems: true |
| contextEquals | object | 否 | — |
| priority | integer | 否 | minimum: 0;maximum: 100 |
| always | boolean | 否 | — |
完整机器定义
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"] |
| maxSources | integer | 否 | minimum: 1;maximum: 16 |
| topK | integer | 否 | minimum: 1;maximum: 50 |
| maxRetrievals | integer | 否 | minimum: 1;maximum: 64 |
| maxQueriesPerSource | integer | 否 | minimum: 1;maximum: 16 |
| sourceTimeoutSeconds | integer | 否 | minimum: 1;maximum: 60 |
| sourceMaxChars | integer | 否 | minimum: 1;maximum: 65536 |
| maxContextChars | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | minLength: 1;maxLength: 64 |
| version | string | 是 | 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"] |
| maxChars | integer | 否 | default: 2000;minimum: 128;maximum: 8192 |
| overlapChars | integer | 否 | default: 0;minimum: 0;maximum: 4096 |
| preserveParagraphs | boolean | 否 | — |
| preserveCodeBlocks | boolean | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| text | string | 是 | minLength: 1;maxLength: 65536 |
| title | string | 否 | minLength: 0;maxLength: 512 |
| source | string | 否 | minLength: 0;maxLength: 2048 |
| tenantId | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| text | string | 是 | minLength: 1;maxLength: 65536 |
| title | string | 否 | minLength: 0;maxLength: 512 |
| source | string | 否 | minLength: 0;maxLength: 2048 |
| tenantId | string | 否 | minLength: 0;maxLength: 128 |
| duplicatePolicy | 枚举 | 否 | default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"] |
| expectedDocumentVersion | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| status | 枚举 | 是 | enum: ["INDEXED","UNCHANGED","SKIPPED"] |
| chunkCount | integer | 是 | minimum: 1;maximum: 512 |
| documentVersion | string | 是 | pattern: "^[a-f0-9]{64}$" |
| contentHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| chunkingHash | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| atomic | boolean | 是 | — |
| status | 枚举 | 是 | enum: ["SUCCEEDED","PARTIAL","REJECTED"] |
| items | 数组:ManagedDocumentBatchItem | 是 | minItems: 1;maxItems: 25 |
| indexed | integer | 是 | minimum: 0;maximum: 25 |
| unchanged | integer | 是 | minimum: 0;maximum: 25 |
| skipped | integer | 是 | minimum: 0;maximum: 25 |
| failed | integer | 是 | 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 |
| atomic | boolean | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| sourceVersion | string | 是 | 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 |
| atomic | boolean | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| text | string | 是 | minLength: 1;maxLength: 8192 |
| startOffset | integer | 是 | minimum: 0;maximum: 65536 |
| endOffset | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| documentVersion | string | 是 | pattern: "^[a-f0-9]{64}$" |
| chunkingHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| chunking | DocumentChunkingPolicy | 是 | 空对象表示未声明分块配置的旧策略。显式配置的预览返回完整有效参数。 |
| chunkCount | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| status | 枚举 | 是 | enum: ["INDEXED","UNCHANGED","SKIPPED"] |
| chunkCount | integer | 是 | minimum: 1;maximum: 512 |
| documentVersion | string | 是 | pattern: "^[a-f0-9]{64}$" |
| contentHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| chunkingHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| title | string | 否 | minLength: 0;maxLength: 512 |
| source | string | 否 | minLength: 0;maxLength: 2048 |
| tenantId | string | 否 | minLength: 0;maxLength: 128 |
| chunking | object | 否 | — |
| rebuildSource | Ref | 否 | — |
| ingestion | IngestionFile | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | minLength: 1;maxLength: 128 |
| knowledgeId | string | 是 | minLength: 1;maxLength: 128 |
| knowledgeVersion | string | 是 | minLength: 1;maxLength: 128 |
| documentId | string | 是 | minLength: 1;maxLength: 128 |
| chunkId | string | 是 | minLength: 1;maxLength: 160 |
| title | string | 是 | maxLength: 512 |
| sourceRef | KnowledgeSource | 是 | — |
| content | string | 是 | minLength: 1;maxLength: 16384 |
| scope | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| documentId | string | 是 | maxLength: 128;pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| title | string | 否 | maxLength: 512 |
| source | string | 否 | maxLength: 2048 |
| tenantId | string | 否 | maxLength: 128;Default trusted credential tenant; application administrators cannot select another tenant |
| duplicatePolicy | string | 否 | default: "UPSERT";enum: ["UPSERT","SKIP","REJECT"] |
| expectedDocumentVersion | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| jobId | string | 是 | maxLength: 128 |
| originalHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| knowledgeVersion | string | 是 | maxLength: 64 |
| filename | string | 是 | maxLength: 255 |
| format | string | 是 | enum: ["txt","md","pdf","docx","xlsx","pptx","png","jpg","jpeg"] |
| pageCount | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | maxLength: 128 |
| appId | string | 是 | maxLength: 64 |
| knowledgeId | string | 是 | maxLength: 64 |
| knowledgeVersion | string | 是 | maxLength: 64 |
| documentId | string | 是 | maxLength: 128 |
| filename | string | 是 | maxLength: 255 |
| format | string | 是 | maxLength: 8 |
| sizeBytes | integer | 是 | minimum: 1;maximum: 4194304 |
| originalHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| title | string | 是 | maxLength: 512 |
| source | string | 是 | maxLength: 2048 |
| tenantId | string | 是 | maxLength: 128 |
| duplicatePolicy | string | 是 | enum: ["UPSERT","SKIP","REJECT"] |
| status | string | 是 | enum: ["QUEUED","PARSING","INDEXING","SUCCEEDED","FAILED","CANCELLED"] |
| revision | integer | 是 | minimum: 1 |
| attempt | integer | 是 | minimum: 1 |
| createdAt | integer | 是 | — |
| updatedAt | integer | 是 | — |
| result | ManagedDocumentResult | 否 | — |
| error | object | 否 | 不允许额外字段 |
| error.code | string | 是 | maxLength: 128 |
| error.message | string | 是 | maxLength: 256 |
| parsedDocumentVersion | string | 否 | pattern: "^[a-f0-9]{64}$";Canonical parsed candidate version; SKIPPED result may retain a different indexed version |
| parsedContentHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| pageCount | integer | 否 | 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 |
| total | integer | 是 | minimum: 0 |
| limit | integer | 是 | minimum: 1;maximum: 100 |
| offset | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| query | string | 是 | minLength: 1;maxLength: 512 |
| topK | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| version | string | 是 | maxLength: 64 |
| status | string | 是 | enum: ["DRAFT","PUBLISHED"] |
| definitionHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| indexVersion | string | 是 | pattern: "^[a-f0-9]{64}$" |
| visibleDocumentCount | integer | 是 | minimum: 0;maximum: 1000 |
| visibleChunkCount | integer | 是 | minimum: 0;maximum: 2147483647 |
| visibleIndexConsistent | boolean | 是 | — |
| knowledgeAccessEpoch | integer | 是 | minimum: 0 |
| securityEpoch | integer | 是 | minimum: 0;maximum: 2147483647 |
| algorithm | string | 否 | enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"] |
| vectorReady | boolean | 否 | — |
| vectorIndexHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| indexedChunkCount | integer | 否 | minimum: 0;maximum: 2147483647 |
| spaceHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| dimensions | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | maxLength: 160 |
| documentId | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| title | string | 否 | maxLength: 512 |
| source | string | 否 | maxLength: 2048 |
| tenantId | string | 否 | maxLength: 128 |
| text | string | 是 | minLength: 1;maxLength: 8192 |
| startOffset | integer | 否 | minimum: 0;maximum: 65536 |
| endOffset | integer | 否 | minimum: 1;maximum: 65536 |
| documentVersion | string | 否 | pattern: "^[a-f0-9]{64}$" |
| sourceRef | KnowledgeSource | 否 | — |
| rank | integer | 是 | minimum: 1;maximum: 20 |
| score | number | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| algorithm | string | 是 | enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"] |
| query | string | 是 | maxLength: 512 |
| topK | integer | 是 | minimum: 1;maximum: 20 |
| knowledgeId | string | 是 | maxLength: 64 |
| index | KnowledgeIndexSnapshot | 是 | — |
| items | 数组:KnowledgeDebugHit | 是 | minItems: 0;maxItems: 20 |
| elapsedMs | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| query | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| name | string | 是 | minLength: 1;maxLength: 128 |
| versions | 数组:string | 是 | minItems: 1;maxItems: 2;uniqueItems: true |
| topK | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| documentId | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| chunkId | string | 是 | maxLength: 160 |
| rank | integer | 是 | minimum: 1;maximum: 20 |
| score | number | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| caseIndex | integer | 是 | minimum: 0;maximum: 9 |
| hits | 数组:KnowledgeEvaluationHit | 是 | minItems: 0;maxItems: 20 |
| recallAtK | number | 是 | minimum: 0;maximum: 1 |
| reciprocalRank | number | 是 | minimum: 0;maximum: 1 |
| hit | boolean | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| version | string | 是 | maxLength: 64 |
| indexVersion | string | 是 | pattern: "^[a-f0-9]{64}$" |
| cases | 数组:KnowledgeEvaluationCaseResult | 是 | minItems: 1;maxItems: 10 |
| recallAtK | number | 是 | minimum: 0;maximum: 1 |
| mrrAtK | number | 是 | minimum: 0;maximum: 1 |
| hitRateAtK | number | 是 | minimum: 0;maximum: 1 |
| algorithm | string | 否 | enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"] |
| vectorIndexHash | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | maxLength: 64;pattern: "^evaluation_[a-f0-9-]{36}$" |
| name | string | 是 | maxLength: 128 |
| algorithm | string | 是 | enum: ["LEXICAL_TERMS_V1","VERSIONED_RETRIEVAL_V1"] |
| topK | integer | 是 | minimum: 1;maximum: 20 |
| versions | 数组:string | 是 | minItems: 1;maxItems: 2 |
| createdAt | integer | 是 | minimum: 0 |
| revision | integer | 是 | minimum: 1;maximum: 2147483647 |
| elapsedMs | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | maxLength: 64;pattern: "^evaluation_[a-f0-9-]{36}$" |
| name | string | 是 | maxLength: 128 |
| algorithm | string | 是 | enum: ["LEXICAL_TERMS_V1","VERSIONED_RETRIEVAL_V1"] |
| topK | integer | 是 | minimum: 1;maximum: 20 |
| versions | 数组:string | 是 | minItems: 1;maxItems: 2 |
| createdAt | integer | 是 | minimum: 0 |
| revision | integer | 是 | minimum: 1;maximum: 2147483647 |
| elapsedMs | integer | 是 | minimum: 0 |
| appId | string | 是 | maxLength: 64 |
| knowledgeId | string | 是 | maxLength: 64 |
| subjectId | string | 是 | maxLength: 128 |
| tenantId | string | 是 | maxLength: 128 |
| inputCases | 数组:KnowledgeEvaluationInputCase | 是 | minItems: 1;maxItems: 10 |
| indexes | 数组:KnowledgeIndexSnapshot | 是 | minItems: 1;maxItems: 2 |
| results | 数组:KnowledgeEvaluationVersionResult | 是 | minItems: 1;maxItems: 2 |
| status | string | 是 | 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 |
| total | integer | 是 | minimum: 0;maximum: 100 |
| limit | integer | 是 | minimum: 1;maximum: 20 |
| offset | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| endpoint | string | 是 | format: "uri" |
| model | string | 是 | minLength: 1;maxLength: 128 |
| spaceVersion | string | 是 | pattern: "^[a-zA-Z0-9_.-]{1,128}$" |
| dimensions | integer | 是 | minimum: 1;maximum: 2048 |
| secretRef | string | 否 | maxLength: 128 |
| sendDimensions | boolean | 否 | 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"] |
| embedding | EmbeddingConfiguration | 否 | — |
| minScore | number | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| algorithm | string | 是 | enum: ["LEXICAL_TERMS_V1","COSINE_V1","RRF_LEXICAL_COSINE_V1"] |
| vectorReady | boolean | 是 | — |
| vectorIndexHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| indexedChunkCount | integer | 是 | minimum: 0;maximum: 2147483647 |
| spaceHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| dimensions | integer | 否 | minimum: 1;maximum: 2048 |
| visibleDocumentCount | integer | 否 | minimum: 0;maximum: 1000 |
| visibleChunkCount | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | maxLength: 64;pattern: "^vector_[a-f0-9-]{36}$" |
| appId | string | 是 | maxLength: 64 |
| knowledgeId | string | 是 | maxLength: 64 |
| knowledgeVersion | string | 是 | maxLength: 64 |
| status | 枚举 | 是 | enum: ["QUEUED","BUILDING","SUCCEEDED","FAILED","CANCELLED"] |
| revision | integer | 是 | minimum: 1;maximum: 2147483647 |
| createdAt | integer | 是 | minimum: 0 |
| updatedAt | integer | 是 | minimum: 0 |
| attempt | integer | 是 | minimum: 1;maximum: 2147483647 |
| spaceHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| documentCount | integer | 是 | minimum: 1;maximum: 512 |
| chunkCount | integer | 是 | minimum: 1;maximum: 512 |
| completedChunks | integer | 是 | minimum: 0;maximum: 512 |
| deadline | integer | 否 | minimum: 0 |
| result | VectorIndexHealth | 否 | — |
| error | object | 否 | 不允许额外字段 |
| error.code | string | 是 | maxLength: 128 |
| error.message | string | 是 | 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 |
| total | integer | 是 | minimum: 0;maximum: 10000 |
| limit | integer | 是 | minimum: 1;maximum: 20 |
| offset | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| action | string | 否 | minLength: 1;maxLength: 256 |
| subjectId | string | 否 | minLength: 1;maxLength: 256 |
| tenantId | string | 否 | maxLength: 256 |
| runId | string | 否 | minLength: 1;maxLength: 256 |
| executionId | string | 否 | minLength: 1;maxLength: 256 |
| from | integer | 否 | minimum: 0;format: "int64" |
| to | integer | 否 | minimum: 0;format: "int64" |
| limit | integer | 否 | default: 50;minimum: 1;maximum: 1000 |
| cursor | string | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| subjectId | string | 是 | — |
| tenantId | string | 否 | — |
| role | string | 否 | — |
| action | string | 是 | — |
| target | string | 是 | — |
| outcome | string | 否 | — |
| runId | string | 否 | — |
| traceId | string | 否 | — |
| executionId | string | 否 | — |
| policyBasis | string | 否 | — |
| createdAt | integer | 是 | minimum: 0;format: "int64" |
| formatVersion | string | 否 | enum: ["1.0"] |
| beforeHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| afterHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| inputHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| resultHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| reasonHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| evidenceHash | string | 否 | pattern: "^[a-f0-9]{64}$" |
| revision | integer | 否 | minimum: 0;format: "int64" |
| previousRevision | integer | 否 | minimum: 0;format: "int64" |
| recordCount | integer | 否 | minimum: 0;format: "int64" |
| cutoff | integer | 否 | minimum: 0;format: "int64" |
| snapshotPosition | integer | 否 | minimum: 0;format: "int64" |
| policyDecision | object | 否 | 不允许额外字段 |
| policyDecision.decisionId | string | 否 | — |
| policyDecision.providerDecisionId | string | 否 | — |
| policyDecision.resource | string | 否 | — |
| policyDecision.code | string | 否 | — |
| policyDecision.requiredPermissionsHash | string | 否 | — |
| policyDecision.argumentsHash | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| position | integer | 是 | minimum: 0;format: "int64" |
| epoch | integer | 是 | minimum: 0;format: "int64" |
| filterHash | string | 是 | 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 |
| nextCursor | string / null | 是 | — |
| snapshot | AuditSnapshot | 是 | — |
| total | integer | 是 | minimum: 0;format: "int64" |
| limit | integer | 是 | minimum: 1;maximum: 1000 |
| redacted | boolean | 否 | — |
| redactionRevision | integer | 否 | — |
完整机器定义
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 |
| nextCursor | string / null | 是 | — |
| snapshot | AuditSnapshot | 是 | — |
| total | integer | 是 | minimum: 0;format: "int64" |
| limit | integer | 是 | minimum: 1;maximum: 1000 |
| formatVersion | string | 是 | enum: ["1.0"] |
| sha256 | string | 是 | pattern: "^[a-f0-9]{64}$" |
| exportedAt | integer | 是 | minimum: 0;format: "int64" |
| redacted | boolean | 否 | — |
| redactionRevision | integer | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| before | integer | 是 | minimum: 0;format: "int64" |
| limit | integer | 是 | default: 100;minimum: 1;maximum: 500 |
| snapshotPosition | integer | 是 | minimum: 0;format: "int64" |
| epoch | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| before | integer | 是 | minimum: 0;format: "int64" |
| limit | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| before | integer | 是 | minimum: 0;format: "int64" |
| limit | integer | 是 | default: 100;minimum: 1;maximum: 500 |
| snapshotPosition | integer | 是 | minimum: 0;format: "int64" |
| epoch | integer | 是 | minimum: 0;format: "int64" |
| selected | integer | 是 | minimum: 0;maximum: 500 |
| recordsHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| planHash | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| plan | AuditRetentionPlan | 是 | — |
| planHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| confirmation | string | 是 | enum: ["DELETE_EXPIRED_AUDIT"] |
| reason | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| deleted | integer | 是 | minimum: 0;maximum: 500 |
| planHash | string | 是 | pattern: "^[a-f0-9]{64}$" |
| epoch | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| traceId | string | 是 | pattern: "^[0-9a-f]{32}$" |
| spanId | string | 是 | pattern: "^[0-9a-f]{16}$" |
| parentSpanId | string | 是 | 根 HTTP 上游可为空;对应节点可能只在外部 Collector 中。 |
| operation | string | 是 | enum: ["run","resolve","context","authorization","agent","subagent","model","tool","knowledge","confirmation"] |
| outcome | string | 是 | enum: ["OK","ERROR"] |
| startedAt | integer | 是 | — |
| finishedAt | integer | 是 | — |
| durationMs | number | 是 | minimum: 0 |
| attributes | object | 是 | 不允许额外字段 |
| attributes.runId | string | 是 | — |
| attributes.resourceKind | string | 否 | — |
| attributes.resourceId | string | 否 | — |
| attributes.resourceVersion | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| runId | string | 是 | — |
| traceId | string | 是 | — |
| recorded | boolean | 是 | — |
| sampled | boolean | 是 | — |
| rootRecorded | boolean | 是 | — |
| retentionHours | integer | 是 | — |
| maxSpans | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| operation | string | 是 | — |
| outcome | string | 是 | enum: ["OK","ERROR"] |
| count | integer | 是 | minimum: 1 |
| averageMs | number | 是 | minimum: 0 |
| maximumMs | number | 是 | minimum: 0 |
| p95UpperBoundMs | number / 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| windowHours | integer | 是 | minimum: 1;maximum: 168 |
| from | integer | 是 | — |
| samplePercent | integer | 是 | minimum: 0;maximum: 100 |
| retentionHours | integer | 是 | — |
| basis | string | 是 | const: "RETAINED_SAMPLED_SPANS" |
| operations | 数组:ObservationOperation | 是 | — |
| activeRuns | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| exportConfigured | boolean | 是 | — |
| queueSize | integer | 是 | — |
| queueCapacity | integer | 是 | const: 256 |
| storageQueueSize | integer | 是 | — |
| storageQueueCapacity | integer | 是 | const: 1024 |
| samplePercent | integer | 是 | — |
| retentionHours | integer | 是 | — |
| spanCapacity | integer | 是 | — |
| processStartedAt | integer | 是 | — |
| counters | object | 是 | 不允许额外字段 |
| counters.span_dropped | integer | 是 | minimum: 0 |
| counters.export_dropped | integer | 是 | minimum: 0 |
| counters.export_failed | integer | 是 | minimum: 0 |
| counters.export_rejected | integer | 是 | minimum: 0 |
| counters.exported | integer | 是 | minimum: 0 |
| counters.http_rejected | integer | 是 | minimum: 0 |
| counters.quota_rejected | integer | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| state | string | 是 | enum: ["FIRING","ACKNOWLEDGED","RESOLVED"] |
| at | integer | 是 | — |
| value | integer / 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| source | string | 是 | enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"] |
| severity | string | 是 | enum: ["INFO","WARNING","CRITICAL"] |
| threshold | integer | 是 | minimum: 1;maximum: 1000000 |
| windowSeconds | integer | 是 | minimum: 60;maximum: 86400 |
| staleSeconds | integer | 是 | minimum: 60;maximum: 86400 |
| description | string | 是 | minLength: 1;maxLength: 256;pattern: "\S" |
| enabled | boolean | 是 | — |
| inhibitedBy | string | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| appId | string | 是 | — |
| source | string | 是 | enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"] |
| severity | string | 是 | enum: ["INFO","WARNING","CRITICAL"] |
| threshold | integer | 是 | minimum: 1;maximum: 1000000 |
| windowSeconds | integer | 是 | minimum: 60;maximum: 86400 |
| staleSeconds | integer | 是 | minimum: 60;maximum: 86400 |
| description | string | 是 | maxLength: 256 |
| enabled | boolean | 是 | — |
| inhibitedBy | string | 是 | — |
| revision | integer | 是 | minimum: 1 |
| createdAt | integer | 否 | — |
| updatedAt | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | — |
| items | 数组:AlertRule | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"appId",
"items"
],
"properties": {
"appId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AlertRule"
}
}
},
"additionalProperties": false
}AlertRuleDeletion
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| deleted | boolean | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"id",
"deleted"
],
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"additionalProperties": false
}AlertInstance
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| dedupKey | string | 是 | — |
| ruleId | string | 是 | — |
| appId | string | 是 | — |
| source | string | 是 | enum: ["PROVIDER_CIRCUIT","RUN_FAILURE","CONFIRMATION_STUCK","RUN_NO_TERMINAL","UNKNOWN_WRITE","QUOTA_UNKNOWN","HTTP_REJECTION","BUDGET_EXHAUSTED"] |
| severity | string | 是 | enum: ["INFO","WARNING","CRITICAL"] |
| state | string | 是 | enum: ["FIRING","ACKNOWLEDGED","RESOLVED"] |
| target | string | 是 | — |
| value | integer | 是 | — |
| threshold | integer | 是 | — |
| firstFiredAt | integer | 是 | — |
| lastFiredAt | integer | 是 | — |
| fireCount | integer | 是 | minimum: 1 |
| revision | integer | 是 | minimum: 1 |
| resolvedAt | integer / null | 否 | — |
| acknowledgedAt | integer / null | 否 | — |
| acknowledgedBy | string / null | 否 | — |
| ackReason | string | 否 | — |
| resolvedBy | string | 否 | — |
| resolveReason | string | 否 | — |
| manualResolved | boolean | 否 | — |
| inhibitedBy | string / null | 否 | — |
| lastNotifiedAt | integer / null | 否 | — |
| updatedAt | integer | 是 | — |
| 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | — |
| items | 数组:AlertInstance | 是 | — |
| total | integer | 是 | — |
| limit | integer | 是 | — |
| offset | integer | 是 | — |
完整机器定义
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 | 是 | — |
| total | integer | 是 | — |
| byState | object | 是 | — |
| limit | integer | 是 | — |
| offset | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| evaluatedAt | integer | 是 | — |
| rules | integer | 是 | — |
| results | 数组:object | 是 | — |
| results[].ruleId | string | 是 | — |
| results[].outcome | string | 是 | enum: ["FIRED","REFIRED","INHIBITED","DEDUPLICATED","RESOLVED","NO_CHANGE","DROPPED_CAPACITY","INHIBITION_CLEARED"] |
| results[].value | integer | 是 | — |
| results[].alertId | string | 否 | — |
| results[].state | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| reason | string | 是 | minLength: 1;maxLength: 512;pattern: "\S" |
完整机器定义
json
{
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string",
"pattern": "\\S",
"minLength": 1,
"maxLength": 512
}
},
"additionalProperties": false
}OpsCheck
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| category | string | 是 | enum: ["DEPENDENCY","EXTERNAL","RUNTIME"] |
| critical | boolean | 是 | — |
| ready | boolean | 是 | — |
| detail | string | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| liveness | string | 是 | enum: ["UP"] |
| readiness | string | 是 | enum: ["READY","NOT_READY"] |
| degraded | boolean | 是 | — |
| generatedAt | integer | 是 | — |
| checks | 数组:OpsCheck | 是 | — |
| alerts | object | 是 | 不允许额外字段 |
| alerts.firing | integer | 是 | — |
| alerts.acknowledged | integer | 是 | — |
| alertEngine | object | 是 | 不允许额外字段 |
| alertEngine.webhookConfigured | boolean | 是 | — |
| alertEngine.pendingDeliveries | integer | 是 | — |
| alertEngine.failedDeliveries | integer | 是 | — |
| alertEngine.deliveredDeliveries | integer | 是 | — |
| alertEngine.deliveryAttemptsMax | integer | 是 | minimum: 1;maximum: 20 |
| alertEngine.deliveryLeaseSeconds | integer | 否 | minimum: 5;maximum: 600 |
| alertEngine.capacity | integer | 是 | — |
| alertEngine.autoEvaluate | boolean | 是 | — |
| alertEngine.evaluationIntervalSeconds | integer | 是 | — |
| alertEngine.evaluations | integer | 是 | — |
| alertEngine.lastEvaluationAt | integer | 是 | — |
| alertEngine.counters | object | 是 | — |
| alertSignals | AlertSignalStatus | 是 | — |
| basis | string | 是 | — |
完整机器定义
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 | 否 | — |
| expectRefusal | boolean | 否 | — |
| minCitations | integer | 否 | minimum: 0;maximum: 64 |
| maxCost | number | 否 | minimum: 0 |
| maxLatencyMs | integer | 否 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| message | string | 是 | minLength: 1;maxLength: 16384 |
| assertions | EvalAssertions | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| agentId | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| description | string | 是 | minLength: 1;maxLength: 256 |
| subjectId | string | 是 | minLength: 1;maxLength: 128 |
| tenantId | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| agentId | string | 是 | — |
| description | string | 是 | — |
| subjectId | string | 是 | — |
| tenantId | string | 是 | — |
| cases | 数组:EvalCase | 是 | — |
| revision | integer | 是 | minimum: 1 |
| createdAt | integer | 否 | — |
| updatedAt | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | — |
| items | 数组:EvalDataset | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"appId",
"items"
],
"properties": {
"appId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EvalDataset"
}
}
},
"additionalProperties": false
}EvalAssertionResult
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| kind | string | 是 | — |
| ok | boolean | 是 | — |
| detail | string | 是 | — |
| expected | string / integer / number / boolean / null | 否 | — |
| actual | string / 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| caseId | string | 是 | — |
| runId | string | 否 | — |
| outcome | string | 是 | enum: ["PASSED","FAILED","ERROR"] |
| status | string | 否 | — |
| assertions | 数组:EvalAssertionResult | 是 | — |
| ruleScore | number | 是 | — |
| cost | number / null | 否 | — |
| latencyMs | integer | 否 | — |
| message | string | 否 | — |
| manualScore | integer | 否 | minimum: 0;maximum: 100 |
| manualNote | string | 否 | — |
| manualBy | string | 否 | — |
| manualAt | integer | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| total | integer | 是 | — |
| passed | integer | 是 | — |
| failed | integer | 是 | — |
| errors | integer | 是 | — |
| ruleScore | number | 是 | — |
| manualScored | integer | 是 | — |
| manualAverage | number / null | 是 | — |
| message | string | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| datasetId | string | 是 | pattern: "^[a-z][a-z0-9-]{0,63}$" |
| agentVersion | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| score | integer | 是 | minimum: 0;maximum: 100 |
| note | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| appId | string | 是 | — |
| datasetId | string | 是 | — |
| agentId | string | 是 | — |
| agentVersion | string | 是 | — |
| subjectId | string | 否 | — |
| tenantId | string | 否 | — |
| state | string | 是 | enum: ["QUEUED","RUNNING","SUCCEEDED","FAILED"] |
| createdAt | integer | 是 | — |
| finishedAt | integer / null | 否 | — |
| cases | 数组:EvalCaseResult | 是 | — |
| summary | EvalSummary | 是 | — |
| revision | integer | 否 | — |
| updatedAt | integer | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| appId | string | 是 | — |
| items | 数组:EvalRun | 是 | — |
| total | integer | 是 | — |
| limit | integer | 是 | — |
| offset | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| queueSize | integer | 是 | — |
| queueCapacity | integer | 是 | — |
| caseTimeoutSeconds | integer | 是 | — |
| counters | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| datasetId | string | 是 | maxLength: 64 |
完整机器定义
json
{
"type": "object",
"required": [
"enabled",
"datasetId"
],
"properties": {
"enabled": {
"type": "boolean"
},
"datasetId": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}AlertSignalStatus
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| pendingKeys | integer | 是 | — |
| maxKeys | integer | 是 | — |
| flushSeconds | integer | 是 | — |
| retentionHours | integer | 是 | — |
| flushed | integer | 是 | — |
| dropped | integer | 是 | — |
| lastFlushAt | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| days | integer | 是 | minimum: 0;maximum: 3650 |
| requireArchived | boolean | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"enabled",
"days",
"requireArchived"
],
"properties": {
"enabled": {
"type": "boolean"
},
"days": {
"type": "integer",
"minimum": 0,
"maximum": 3650
},
"requireArchived": {
"type": "boolean"
}
},
"additionalProperties": false
}RetentionCategoryView
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| label | string | 是 | — |
| enabled | boolean | 是 | — |
| days | integer | 是 | — |
| requireArchived | boolean | 是 | — |
| eligible | integer | 是 | — |
| note | string | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| intervalMinutes | integer | 是 | 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_EVENTS | RetentionPolicyCategory | 是 | — |
| RUN_CONFIRMATIONS | RetentionPolicyCategory | 是 | — |
| ALERT_DELIVERIES | RetentionPolicyCategory | 是 | — |
| ALERTS_RESOLVED | RetentionPolicyCategory | 是 | — |
| AUDIT | RetentionPolicyCategory | 是 | — |
| ARCHIVES | RetentionPolicyCategory | 是 | — |
完整机器定义
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_EVENTS | RetentionCategoryView | 是 | — |
| RUN_CONFIRMATIONS | RetentionCategoryView | 是 | — |
| ALERT_DELIVERIES | RetentionCategoryView | 是 | — |
| ALERTS_RESOLVED | RetentionCategoryView | 是 | — |
| AUDIT | RetentionCategoryView | 是 | — |
| ARCHIVES | RetentionCategoryView | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| autoSweep | RetentionAutoSweep | 是 | — |
| categories | RetentionCategories | 是 | — |
| reason | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| revision | integer | 是 | — |
| updatedAt | integer | 否 | — |
| updatedBy | string | 否 | — |
| reason | string | 否 | — |
| autoSweep | RetentionAutoSweep | 是 | — |
| categories | RetentionCategories | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| dryRun | boolean | 否 | — |
| limit | integer | 否 | minimum: 1;maximum: 10000 |
完整机器定义
json
{
"type": "object",
"properties": {
"dryRun": {
"type": "boolean"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"additionalProperties": false
}RetentionSweepResult
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| sweptAt | integer | 是 | — |
| trigger | string | 是 | enum: ["自动清理","管理员手动清理"] |
| limit | integer | 是 | — |
| deleted | object | 是 | — |
| dryRun | boolean | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| revision | integer | 是 | — |
| autoSweep | RetentionAutoSweep | 是 | — |
| categories | RetentionPreviewCategories | 是 | — |
| lastSweepAt | integer | 是 | — |
| lastSweep | object | 是 | — |
| counters | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| revision | integer | 是 | — |
| autoSweep | RetentionAutoSweep | 是 | — |
| lastSweepAt | integer | 是 | — |
| lastSweep | object | 是 | — |
| configuredCategories | 数组:string | 是 | — |
| counters | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | pattern: "^[A-Za-z][A-Za-z0-9_.-]{0,63}$" |
| regex | string | 是 | minLength: 1;maxLength: 256 |
| replacement | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| mode | string | 是 | enum: ["TOKEN","HASH"] |
| token | string | 是 | maxLength: 32 |
| appliesTo | 数组:string | 是 | minItems: 1 |
| fields | 数组:string | 是 | maxItems: 64 |
| patterns | 数组:RedactionPattern | 是 | maxItems: 32 |
| reason | string | 是 | 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| revision | integer | 是 | — |
| updatedAt | integer | 否 | — |
| updatedBy | string | 否 | — |
| reason | string | 否 | — |
| enabled | boolean | 是 | — |
| mode | string | 是 | enum: ["TOKEN","HASH"] |
| token | string | 是 | — |
| 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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| revision | integer | 是 | — |
| enabled | boolean | 是 | — |
| mode | string | 是 | — |
| appliesTo | 数组:string | 是 | — |
| fieldCount | integer | 是 | — |
| patternCount | integer | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| sample | object | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"sample"
],
"properties": {
"sample": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false
}RedactionPreview
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| applied | boolean | 是 | — |
| mode | string | 否 | — |
| revision | integer | 否 | — |
| changed | boolean | 否 | — |
| reason | string | 否 | — |
| sample | object | 是 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| dryRun | boolean | 是 | const: true |
| preview | object | 是 | — |
完整机器定义
json
{
"type": "object",
"required": [
"dryRun",
"preview"
],
"properties": {
"dryRun": {
"const": true
},
"preview": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false
}EvaluationGateReport
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| enabled | boolean | 是 | — |
| datasetId | string | 是 | — |
| applies | boolean | 是 | — |
| checked | 数组:string | 是 | — |
| passed | boolean | 否 | — |
完整机器定义
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
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| title | string | 是 | maxLength: 128;空字符串表示未命名会话。 |
| createdAt | integer | 是 | — |
| updatedAt | integer | 是 | — |
| messageCount | integer | 是 | 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 | 是 | — |
| nextOffset | integer / null | 是 | — |
完整机器定义
json
{
"type": "object",
"additionalProperties": false,
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConversationSummary"
}
},
"nextOffset": {
"type": [
"integer",
"null"
]
}
},
"required": [
"items",
"nextOffset"
]
}ConversationRename
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| title | string | 是 | minLength: 1;maxLength: 128 |
完整机器定义
json
{
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"title"
]
}ConversationDeletion
| 字段 | 类型 | 本层必填 | 默认值与约束 |
|---|---|---|---|
| id | string | 是 | — |
| deleted | boolean | 是 | — |
完整机器定义
json
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"deleted"
]
}