Skip to content

Components

通用 Schema

Workspace

idexternalRefnamerootPathexecutionPolicystatuskindreadOnlyhistoryMirrorEnabledcreatedAtupdatedAt

WorkspaceImportRequest

rootPathkindnameexternalRef

WorkspaceEntry

pathnametype(file / directory)、sizeBytesmimeTypeetagupdatedAtcreatedAtreadOnly

WorkspaceEntryPage

workspaceIdpathitems[]nextCursor — 目录直接子项分页

WorkspaceFileContent

workspaceIdpathencodingcontenttruncatedsizeBytesmimeTypeetagupdatedAtreadOnly

WorkspaceDeleteResult

workspaceIdpathtypedeleted

PutWorkspaceFileRequest

pathcontentencodingoverwriteifMatch(配合 etag 乐观并发)

MoveWorkspaceEntryRequest

sourcePathtargetPathoverwrite

WorkspaceHistoryMirrorStatus

workspaceIdsupportedenabledstatelastEventIdlastSyncedAtdbPatherrorMessage

Run

idworkspaceIdsessionIdparentRunIdinitiatorReftriggerTypetriggerRefagentNameeffectiveAgentNameswitchCountstatuscancelRequestedAtstartedAtheartbeatAtendedAtcreatedAterrorCodeerrorMessagemetadata

ActionCatalogItem

namedescriptionexposeToLlmcallableByUsercallableByApiretryPolicysafe = 可安全重试,manual = 人工重试)

ModelProvider

idpackageNamedescriptionrequiresUrluseCases

模型网关对象

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 类型

type 关键字段
text text
image imagemediaType
file datamediaTypefilename
reasoning text
tool-call toolCallIdtoolNameinputproviderExecuted
tool-result toolCallIdtoolNameoutput
tool-approval-request approvalIdtoolCallId
tool-approval-response approvalIdapprovedreason

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)

Usage

inputTokensoutputTokenstotalTokens

ModelGenerateRequest / ModelStreamRequest

modelpromptmessagestemperaturemaxTokenspromptmessages 至少一个)

ModelGenerateResponse

modeltextfinishReasonusage

通用参数

workspaceIdsessionIdrunIdactionNamepageSizecursorpathsortBysortOrderrecursiveencodingmaxBytes

错误模型

{"error": {"code": "ACTION_NOT_FOUND", "message": "Action code.review was not found", "details": {}}}

错误码:WORKSPACE_NOT_FOUNDSESSION_NOT_FOUNDRUN_NOT_FOUNDAGENT_NOT_FOUNDACTION_NOT_FOUNDSKILL_NOT_FOUNDMCP_NOT_FOUNDHOOK_NOT_FOUNDINVALID_CONFIGURATIONRUN_CONFLICTRUN_CANCELLEDTOOL_TIMEOUTPOLICY_DENIEDAGENT_SWITCH_DENIEDSUBAGENT_DENIEDMODEL_NOT_FOUNDMODEL_GATEWAY_DISABLEDMODEL_GATEWAY_LOCAL_ONLY