跳转到内容

签名关联类型:McpBuiltinDiscoveryView – ModelScriptReport

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

返回接口索引

McpBuiltinDiscoveryView · McpDiscoveryStatus · McpToolAccess · McpToolRegistrationContext · McpToolView · MediaContentRef · MediaLocator · MediaMetadata · MediaStorageScope · MergeNodeHistoryReceipt · ModelContentVersion · ModelEditCompletePayload · ModelEditCompleteRequest · ModelEditorVersion · ModelFocusProjection · ModelFocusVersion · ModelKeyframe · ModelMotion · ModelPanelBinding · ModelPlacementDraft · ModelPoseFootSurface · ModelPoseGeometry · ModelRenderIssue · ModelScriptReport

McpBuiltinDiscoveryView

export type McpBuiltinDiscoveryView = {
ready: boolean;
status: McpDiscoveryStatus;
serverName?: string;
tools: McpToolView[];
reason?: string;
checkedAt: string;
};

关联类型:McpDiscoveryStatus · McpToolView

成员说明:

  • serverName:服务可达且注册了工具时才给出真实服务名。
  • tools:真实工具清单(缺失/不可用时为空)。
  • reason:不可用原因(ready=true 时缺省)。

McpDiscoveryStatus

export type McpDiscoveryStatus = (typeof MCP_DISCOVERY_STATUSES)[number];

McpToolAccess

export type McpToolAccess = (typeof MCP_TOOL_ACCESS)[number];

McpToolRegistrationContext

Context supplied by the host for one MCP request.

export type McpToolRegistrationContext = {
grant: ApplicationToolGrant | null;
world?: {
read(input: {
canvasId: string;
contextId: string;
}): Promise<{
ok: true;
view: AssistantWorldContextView;
} | AssistantWorldFailure> | {
ok: true;
view: AssistantWorldContextView;
} | AssistantWorldFailure;
write(input: AssistantWorldWriteInput): Promise<AssistantWorldWriteOutcome>;
};
task: {
catalog(): Promise<CanvasTaskCatalog>;
submit(input: Record<string, unknown>): Promise<Record<string, unknown>>;
status(workerTaskKey: string): Promise<Record<string, unknown> | null>;
cancel(workerTaskKey: string): Promise<void>;
};
media: {
readBytes(input: {
canvasId: string;
storageKey: string;
maxBytes: number;
}): Promise<Uint8Array>;
writeBytes(input: {
canvasId: string;
bytes: Uint8Array;
contentType: string;
}): Promise<{
storageKey: string;
contentType: string;
size: number;
checksum: string;
locator?: string;
}>;
importLocator(input: {
canvasId: string;
locator: string;
contentType?: string;
expected?: {
size?: number;
checksum?: string;
};
}): Promise<{
storageKey: string;
contentType: string;
size: number;
checksum: string;
locator?: string;
}>;
};
};

关联类型:ApplicationToolGrant · AssistantWorldContextView · AssistantWorldFailure · AssistantWorldWriteInput · AssistantWorldWriteOutcome · CanvasTaskCatalog

McpToolView

export type McpToolView = {
name: string;
access: McpToolAccess;
title?: string;
description?: string;
};

关联类型:McpToolAccess

MediaContentRef

export type MediaContentRef = {
providerId: string;
schemaVersion: number;
payload: Woohaa3CanvasJsonObject;
};

关联类型:Woohaa3CanvasJsonObject

MediaLocator

媒体定位符(locator):字节物理位置的不透明表达,形如 media:///。

只有产出它的存储后端知道怎么解析;task / provider / media / 界面一律原样传递, 不解析、不拼接、不比较内部结构。需要判断「是否同一对象」时问存储层。

export type MediaLocator = string;

MediaMetadata

稳定媒体 metadata(跨服务传输的安全形态)。

export type MediaMetadata = {
storageKey: string;
contentType: string;
size: number;
checksum: string;
mediaKind?: "image" | "video" | "audio" | "text" | "other";
};

成员说明:

  • mediaKind:媒体类别(由 contentType 推导,供调用方免于重复解析)。

MediaStorageScope

媒体读写的作用域:属于哪张画布。

媒体服务自己不认识画布路由,只把调用方声明的画布透传给 ctx.storage;local / cos 忽略它,服务端托管存储用它拼键并按画布判权。缺省表示「与画布无关」(扩展素材、独立页)。

export type MediaStorageScope = {
readonly canvasId: string;
};

MergeNodeHistoryReceipt

合并回执。

export type MergeNodeHistoryReceipt = {
targetNodeId: string;
sourceNodeId: string;
revision: number;
copied: number;
duplicates: number;
evicted: number;
alreadyMerged: boolean;
};

成员说明:

  • revision:批次提交后的画布修订;幂等重试返回首次修订。
  • copied:本次真正新增到目标的历史条目数。
  • duplicates:主键已存在而未新增的条目数;相同内容不再去重,只在同一操作重试遗留时出现。
  • evicted:合并后容量清理淘汰的条目数(当前版本受保护)。
  • alreadyMerged:命中同一操作身份的既有回执时为 true(不重复复制/切换)。

ModelContentVersion

本节点模型内容版本。

  • revision:本节点模型内容的正整数修改版本;新建副本从 1 开始。
  • sourceHash:modelScript 源码的内容标识(与既有模型历史 sourceHash 同源)。
  • contentHash:源码、语言、API 版本与 placement 的内容标识;版本匹配以它为准。
export type ModelContentVersion = {
revision: number;
sourceHash: string;
contentHash: string;
};

ModelEditCompletePayload

模型完成请求:只归档已权威提交的会话内容,不额外推进 revision。

export type ModelEditCompletePayload = {
baselineSourceHash: string;
finalSourceHash: string;
};

成员说明:

  • baselineSourceHash:会话开始时由服务端捕获的基线内容身份;服务端重新校验。
  • finalSourceHash:会话内最终脚本 descriptor(不重写脚本本身,服务端按脚本引用确认)。

ModelEditCompleteRequest

模型 complete 请求:仅登记既有已提交状态;不产生额外 revision。

export type ModelEditCompleteRequest = {
canvasId: string;
nodeId: string;
sessionId: string;
requestId: string;
kind: "model";
baselineContentIdentity: string;
model: ModelEditCompletePayload;
};

关联类型:ModelEditCompletePayload

ModelEditorVersion

export type ModelEditorVersion = typeof MODEL_EDITOR_VERSION;

ModelFocusProjection

模型聚焦瞬时投影:只承载浏览器本地相机状态与稳定目标身份。

export type ModelFocusProjection = {
version: ModelFocusVersion;
nodeId: string;
target: Vec3;
yaw: number;
pitch: number;
distance: number;
fov: number;
radius: number;
};

关联类型:ModelFocusVersion · Vec3

成员说明:

  • nodeId:稳定 canonical 节点 id。
  • target:聚焦目标中心(世界空间,含 root 锚点)。
  • yaw:环绕 yaw / pitch(弧度)。
  • distance:目标到相机距离。
  • fov:垂直 FOV(弧度)。
  • radius:观察指示用的模型半径(世界单位)。

ModelFocusVersion

export type ModelFocusVersion = typeof MODEL_FOCUS_VERSION;

ModelKeyframe

export type ModelKeyframe = {
time: number;
value: Vec3 | number;
easing: MotionEasing;
};

关联类型:Vec3 · MotionEasing

ModelMotion

模型轨道动作(闭合判别联合)。

export type ModelMotion = KeyframeMotion | {
kind: "rotate";
axis: Axis3;
speed: number;
} | {
kind: "move";
axis: Axis3;
speed: number;
range: [
number,
number
];
} | {
kind: "oscillate";
axis: Axis3;
mode: OscillateMode;
speed: number;
amplitude: number;
phase: number;
};

关联类型:KeyframeMotion · Axis3 · OscillateMode

ModelPanelBinding

export type ModelPanelBinding = {
actions?: Readonly<Record<string, (arg?: string) => void>>;
statusSummary?: readonly string[];
};

ModelPlacementDraft

3D 模型摆放草稿(renderer-neutral;offset/scale/yaw)。

export type ModelPlacementDraft = {
offset: {
x: number;
y: number;
z: number;
};
scale: number;
yaw: number;
};

ModelPoseFootSurface

export type ModelPoseFootSurface = {
left: number | null;
right: number | null;
classification: "skin-weights" | "unknown";
reason?: string;
};

成员说明:

  • left:左右脚真实蒙皮表面的最低高度(模型 Y 轴,米);无法分类时为 null。

ModelPoseGeometry

export type ModelPoseGeometry = {
aabb: Aabb | null;
footSurface: ModelPoseFootSurface;
joints: Array<{
id: string;
world: Vec3;
}>;
skinnedVertexCount: number;
verification: "sampled-data-only";
};

关联类型:Aabb · ModelPoseFootSurface · Vec3

成员说明:

  • aabb:真实变形顶点的局部 AABB(未含实例摆放)。
  • joints:少量关节端点(世界=模型局部空间),辅助定位;不冒充脚底。
  • verification:几何核验只证明数值/几何,不证明平衡、接触或自然度。

ModelRenderIssue

export type ModelRenderIssue = {
nodeId: string;
title: string;
message: string;
detail: string;
retainedPreview: boolean;
};

ModelScriptReport

export type ModelScriptReport = {
canvasId: string;
nodeId: string;
status: "ok" | "failed";
message?: string;
};