跳转到内容

签名关联类型:AgentModelView – AgentRoleRequirements

本页由当前 SDK 声明自动生成。

返回接口索引

AgentModelView · AgentNativeCapability · AgentPromptMessage · AgentPromptMessageRole · AgentReasoningApplication · AgentReasoningCapability · AgentReasoningCapabilitySource · AgentReasoningCapabilityState · AgentReasoningEffort · AgentReasoningOption · AgentRoleChannelCapabilities · AgentRoleDefinition · AgentRoleDescriptor · AgentRoleErrorCode · AgentRoleFailure · AgentRoleImplementation · AgentRoleJsonSchema · AgentRoleNativeCapabilities · AgentRoleOutput · AgentRoleOutputKind · AgentRolePrepareInput · AgentRolePrompt · AgentRoleRef · AgentRoleRequirements

AgentModelView

账户模型目录项(使用账户实际返回的 slug/displayName)。

export type AgentModelView = {
id: string;
label: string;
reasoningEfforts?: readonly AgentReasoningEffort[];
reasoning?: AgentReasoningCapability;
};

关联类型:AgentReasoningEffort · AgentReasoningCapability

成员说明:

  • reasoningEfforts:旧版兼容字段;新投影同时携带 reasoning。

AgentNativeCapability

export type AgentNativeCapability = (typeof AGENT_NATIVE_CAPABILITIES)[number];

AgentPromptMessage

export type AgentPromptMessage = {
role: AgentPromptMessageRole;
content: string;
};

关联类型:AgentPromptMessageRole

AgentPromptMessageRole

export type AgentPromptMessageRole = (typeof AGENT_PROMPT_MESSAGE_ROLES)[number];

AgentReasoningApplication

一个回合请求与传输的 reasoning 事实;不保存隐藏推理文本。

export type AgentReasoningApplication = {
requested?: AgentReasoningEffort;
applied: true | false | "provider-default";
code?: string;
};

关联类型:AgentReasoningEffort

成员说明:

  • applied:true=已按显式值应用;false=传输拒绝;provider-default=省略字段交由上游默认。

AgentReasoningCapability

可追溯的模型 reasoning 能力。

supported 但没有 efforts 表示上游确认支持推理、却没有给出可安全展示的精确档位; 此时界面只保留默认语义。能力修订号用于回合冻结与目录刷新后的失效判断。

export type AgentReasoningCapability = {
state: AgentReasoningCapabilityState;
efforts?: readonly AgentReasoningOption[];
source: AgentReasoningCapabilitySource;
revision: string;
};

关联类型:AgentReasoningCapabilityState · AgentReasoningOption · AgentReasoningCapabilitySource

AgentReasoningCapabilitySource

export type AgentReasoningCapabilitySource = (typeof AGENT_REASONING_CAPABILITY_SOURCES)[number];

AgentReasoningCapabilityState

export type AgentReasoningCapabilityState = (typeof AGENT_REASONING_CAPABILITY_STATES)[number];

AgentReasoningEffort

export type AgentReasoningEffort = (typeof AGENT_REASONING_EFFORTS)[number];

AgentReasoningOption

export type AgentReasoningOption = {
id: AgentReasoningEffort;
label?: string;
};

关联类型:AgentReasoningEffort

AgentRoleChannelCapabilities

执行通道对本轮请求的真实能力声明(由通道/模型目录给出,不从角色推导)。

export type AgentRoleChannelCapabilities = {
readonly toolCalling: boolean;
readonly imageInput: boolean;
readonly structuredOutput: AgentRoleStructuredOutput;
readonly nativeCapabilities: readonly AgentNativeCapability[];
};

关联类型:AgentRoleStructuredOutput · AgentNativeCapability

AgentRoleDefinition

插件声明的角色定义。id 只是插件内名字,完整身份由宿主加扩展命名空间。

export type AgentRoleDefinition = {
readonly id: string;
readonly revision: string;
readonly title: string;
readonly specialty: string;
readonly instructions: string;
readonly inputSchema: AgentRoleJsonSchema;
readonly contextSchema: AgentRoleJsonSchema;
readonly tools: AgentRoleToolset;
readonly nativeCapabilities: AgentRoleNativeCapabilities;
readonly requirements: AgentRoleRequirements;
readonly output: AgentRoleOutput;
};

关联类型:AgentRoleJsonSchema · AgentRoleToolset · AgentRoleNativeCapabilities · AgentRoleRequirements · AgentRoleOutput

成员说明:

  • instructions:基础角色指令;宿主放在规范消息最前面。
  • contextSchema:领域预先授权并准备好的上下文形状。

AgentRoleDescriptor

只读目录项:不含运行回调、凭据或完整权威上下文。

export type AgentRoleDescriptor = {
readonly ref: AgentRoleRef;
readonly title: string;
readonly specialty: string;
readonly requirements: AgentRoleRequirements;
readonly tools?: AgentRoleToolset;
readonly nativeCapabilities?: AgentRoleNativeCapabilities;
readonly outputKind: AgentRoleOutputKind;
readonly available: boolean;
readonly reason?: string;
readonly missing?: readonly string[];
};

关联类型:AgentRoleRef · AgentRoleRequirements · AgentRoleToolset · AgentRoleNativeCapabilities · AgentRoleOutputKind

成员说明:

  • tools:宿主内部/受信扩展可见;公开 HTTP 目录会省略工具与内建能力清单。
  • reason:不可用原因(缺失工具/通道能力/插件停用);可用时省略。
  • missing:结构化缺失项(tool:<name> / native:<capability> / 通道能力名)。

AgentRoleErrorCode

export type AgentRoleErrorCode = (typeof AGENT_ROLE_ERROR_CODES)[number];

AgentRoleFailure

export type AgentRoleFailure = {
readonly ok: false;
readonly code: AgentRoleErrorCode;
readonly message: string;
readonly missing?: readonly string[];
};

关联类型:AgentRoleErrorCode

成员说明:

  • missing:缺失的必要能力/工具/内建能力(requirement-unsatisfied)。

AgentRoleImplementation

插件注册的角色实现;prepare 必须是确定性同步模板构造。

export type AgentRoleImplementation = {
readonly definition: AgentRoleDefinition;
prepare(input: AgentRolePrepareInput): AgentRolePrompt;
};

关联类型:AgentRoleDefinition · AgentRolePrepareInput · AgentRolePrompt

AgentRoleJsonSchema

可序列化 JSON schema 形状(复用项目既有 Record<string, unknown> 约定,不引入验证框架)。

export type AgentRoleJsonSchema = Readonly<Record<string, unknown>>;

AgentRoleNativeCapabilities

角色允许的内建能力;缺省关闭。

export type AgentRoleNativeCapabilities = {
readonly required: readonly AgentNativeCapability[];
readonly optional: readonly AgentNativeCapability[];
};

关联类型:AgentNativeCapability

AgentRoleOutput

交付形态;与用户的 generate/modify/discuss 动作正交。

export type AgentRoleOutput = {
readonly kind: "reply";
} | {
readonly kind: "candidate";
readonly schema: AgentRoleJsonSchema;
} | {
readonly kind: "tool-receipts";
};

关联类型:AgentRoleJsonSchema

AgentRoleOutputKind

export type AgentRoleOutputKind = AgentRoleOutput["kind"];

关联类型:AgentRoleOutput

AgentRolePrepareInput

prepare 只接收已校验的输入、宿主授权的领域上下文与宿主冻结的目标身份。

export type AgentRolePrepareInput = {
readonly input: unknown;
readonly context: unknown;
readonly target: AgentRoleTargetRef;
readonly requestId: string;
readonly expectedContentHash?: string;
readonly nativeCapabilities: readonly AgentNativeCapability[];
};

关联类型:AgentRoleTargetRef · AgentNativeCapability

成员说明:

  • target:受理时冻结的目标身份(只含稳定 id/范围,不含 owner/租约/grant)。
  • requestId:本回合稳定 requestId(只用于让角色把同一身份写进指令/工具参数)。
  • expectedContentHash:领域冻结的内容前置条件(若有);角色只能转述,不能自行计算。
  • nativeCapabilities:宿主/通道实际开启的内建能力(可选能力只在真实支持时出现)。

AgentRolePrompt

prepare 产出的规范消息与可选的工具收窄集合。

export type AgentRolePrompt = {
readonly messages: readonly AgentPromptMessage[];
readonly tools?: readonly string[];
};

关联类型:AgentPromptMessage

成员说明:

  • tools:只能进一步收窄 definition.tools;越界或未声明即视为非法准备。

AgentRoleRef

宿主确认的完整角色身份。

descriptorDigest 是定义内容摘要,artifactId 是实际装载的实现制品身份;两者分开保存, 不能用函数 toString 摘要冒充实现身份。

export type AgentRoleRef = {
readonly namespacedId: string;
readonly roleId: string;
readonly extensionId: string;
readonly revision: string;
readonly descriptorDigest: string;
readonly artifactId: string;
readonly configVersion?: number;
};

成员说明:

  • namespacedId:<extensionId>/<roleId>;业务入口必须显式选择完整身份。

AgentRoleRequirements

角色对执行通道的要求;缺失即在发送前明确不可用。

export type AgentRoleRequirements = {
imageInput: boolean;
toolCalling: boolean;
structuredOutput: AgentRoleStructuredOutput;
};

关联类型:AgentRoleStructuredOutput