This content is not available in your language yet.
Components
Section titled “Components”通用 Schema
Section titled “通用 Schema”Workspace
Section titled “Workspace”id、externalRef、name、rootPath、executionPolicy、status、kind、readOnly、createdAt、updatedAt
WorkspaceImportRequest
Section titled “WorkspaceImportRequest”rootPath、kind、name、externalRef
WorkspaceEntry
Section titled “WorkspaceEntry”path、name、type(file / directory)、sizeBytes、mimeType、etag、updatedAt、createdAt、readOnly
WorkspaceEntryPage
Section titled “WorkspaceEntryPage”workspaceId、path、items[]、nextCursor — 目录直接子项分页
WorkspaceFileContent
Section titled “WorkspaceFileContent”workspaceId、path、encoding、content、truncated、sizeBytes、mimeType、etag、updatedAt、readOnly
WorkspaceDeleteResult
Section titled “WorkspaceDeleteResult”workspaceId、path、type、deleted
PutWorkspaceFileRequest
Section titled “PutWorkspaceFileRequest”path、content、encoding、overwrite、ifMatch(配合 etag 乐观并发)
MoveWorkspaceEntryRequest
Section titled “MoveWorkspaceEntryRequest”sourcePath、targetPath、overwrite
id、workspaceId、sessionId、parentRunId、initiatorRef、triggerType、triggerRef、agentName、effectiveAgentName、switchCount、status、cancelRequestedAt、startedAt、heartbeatAt、endedAt、createdAt、errorCode、errorMessage、metadata
ActionCatalogItem
Section titled “ActionCatalogItem”name、description、exposeToLlm、callableByUser、callableByApi、retryPolicy(safe = 可安全重试,manual = 人工重试)
ModelProvider
Section titled “ModelProvider”id、packageName、description、requiresUrl、useCases
模型运行时对象
Section titled “模型运行时对象”ChatMessage
Section titled “ChatMessage”Role-aware 消息结构(对齐 AI SDK ModelMessage JSON-safe 表示):
| role | content |
|---|---|
system | 字符串 |
user | 字符串,或 text / image / file parts |
assistant | 字符串,或 text / file / reasoning / tool-call / tool-result / tool-approval-request parts |
tool | tool-result / tool-approval-response parts 数组 |
MessagePart 类型
Section titled “MessagePart 类型”| type | 关键字段 |
|---|---|
text | text |
image | image、mediaType |
file | data、mediaType、filename |
reasoning | text |
tool-call | toolCallId、toolName、input、providerExecuted |
tool-result | toolCallId、toolName、output |
tool-approval-request | approvalId、toolCallId |
tool-approval-response | approvalId、approved、reason |
ToolResultOutput
Section titled “ToolResultOutput”| type | 字段 |
|---|---|
text | value: string |
json | value: JSONValue |
execution-denied | reason?: string |
error-text | value: string |
error-json | value: JSONValue |
content | value: [...](AI SDK content-style) |
inputTokens、outputTokens、totalTokens
ModelGenerateRequest / ModelStreamRequest
Section titled “ModelGenerateRequest / ModelStreamRequest”model、prompt、messages、temperature、maxTokens(prompt 与 messages 至少一个)
ModelGenerateResponse
Section titled “ModelGenerateResponse”model、text、finishReason、usage
workspaceId、sessionId、runId、actionName、pageSize、cursor、path、sortBy、sortOrder、recursive、encoding、maxBytes
{"error": {"code": "ACTION_NOT_FOUND", "message": "Action code.review was not found", "details": {}}}错误码:WORKSPACE_NOT_FOUND、SESSION_NOT_FOUND、RUN_NOT_FOUND、AGENT_NOT_FOUND、ACTION_NOT_FOUND、SKILL_NOT_FOUND、MCP_NOT_FOUND、HOOK_NOT_FOUND、INVALID_CONFIGURATION、RUN_CONFLICT、RUN_CANCELLED、TOOL_TIMEOUT、POLICY_DENIED、AGENT_SWITCH_DENIED、SUBAGENT_DENIED、MODEL_NOT_FOUND、MODEL_GATEWAY_DISABLED、MODEL_GATEWAY_LOCAL_ONLY