文档Harness SDK

BEEOS CLOUD / DEVELOPER REFERENCE

操作表与运行时方法

操作路由表,以及 Cloud 可能投递的运行时方法。

SDK 用到的每条 Cloud 路由都有稳定的操作 ID。用辅助函数构造路径,路径参数会被百分号编码。

操作表

下表列出 HARNESS_OPERATIONS / OPERATIONS 的全部操作。服务列说明请求发往哪个 Cloud 组件的 origin;路径中的 {name} 是路径参数。

操作 IDHTTPPath目标服务说明
runtimeRegisterPOST/api/v1/runtime/registrationsagent-gateway注册运行时并返回其租约。
runtimeHeartbeatPOST/api/v1/runtime/registrations/{registrationId}/heartbeatagent-gateway为某个注册续租。
runtimeRealtimeTokenCreatePOST/api/v1/runtime/realtime/tokenmessage-service创建实时连接令牌,并给出要订阅的频道。
runtimeConversationSyncPOST/api/v1/runtime/conversationsmessage-service创建或更新某个运行时操作的会话。
runtimeConversationMessagesListGET/api/v1/runtime/conversations/{conversationId}/messagesmessage-service分页列出会话的消息。
runtimeConversationMessageCreatePOST/api/v1/runtime/conversations/{conversationId}/messagesmessage-service向会话发送一条消息。
runtimeConversationMessageGetGET/api/v1/runtime/conversations/{conversationId}/messages/{messageId}message-service读取会话中的一条消息。
runtimeConversationMessagePatchPATCH/api/v1/runtime/conversations/{conversationId}/messages/{messageId}message-service修改正在流式写入的消息。
runtimeConversationRunStartPOST/api/v1/runtime/conversations/{conversationId}/runs/startmessage-service开始会话的一次运行。
runtimeConversationRunFinishPOST/api/v1/runtime/conversations/{conversationId}/runs/finishmessage-service结束会话的一次运行。
runtimeDeliveriesReadPOST/api/v1/runtime/deliveries/readmessage-service读取待处理的运行时方法投递。
runtimeDeliveriesRenewPOST/api/v1/runtime/deliveries/renewmessage-service为仍在处理的投递续期。
runtimeDeliveriesAckPOST/api/v1/runtime/deliveries/ackmessage-service确认投递。
runtimeOperationHistoryGetGET/api/v1/runtime/operations/{operationId}/historymessage-service读取某个操作已保存的历史。
runtimeOperationMessageAppendPOST/api/v1/runtime/operations/{operationId}/messagesmessage-service向某个操作追加一条消息。
conversationMessagesListGET/api/v2/conversations/{conversationId}/messagesmessage-service列出会话的消息。供 Python 运行时门面使用。
conversationMessageSendPOST/api/v2/conversations/{conversationId}/messagesmessage-service向会话发送一条消息。供 Python 运行时门面使用。
agentGetGET/api/v1/agents/{agentId}agent-gateway读取一个智能体。
agentUpdatePATCH/api/v1/agents/{agentId}agent-gateway修改一个智能体。
agentSyncPOST/api/v1/agents/syncagent-gateway把智能体定义同步到 Cloud。
agentFilesListGET/api/v1/agent/filesagent-gateway列出智能体的文件。
agentFilePresignPOST/api/v1/agent/files/presignagent-gateway为新文件申请上传 URL。
agentFileConfirmPOST/api/v1/agent/files/confirmagent-gateway确认文件已上传。
agentFileResolveGET/api/v1/agent/files/{fileId}/resolveagent-gateway把文件 ID 解析为详情,包含下载 URL。
canvasTokenCreatePOST/api/v1/canvas/tokenagent-gateway创建画布连接令牌。
a2aDiscoverGET/api/v1/a2a/discoveragent-gateway搜索可通过智能体间调用访问的智能体。
a2aJsonRpcPOST/api/v1/a2a/{agentId}/jsonrpcagent-gateway向对端智能体发送 JSON-RPC 请求。
a2aTaskGetGET/api/v1/a2a/tasks/{taskId}agent-gateway读取一个智能体间任务。
messagingTokenCreatePOST/api/v1/messaging/tokenagent-gateway创建消息令牌。
runtimeHistoryBoundaryPreparePOST/api/v1/runtime/conversations/{conversationId}/history-boundary/preparemessage-service会话的历史边界动作 prepare。
runtimeHistoryBoundaryResettingPOST/api/v1/runtime/conversations/{conversationId}/history-boundary/resettingmessage-service会话的历史边界动作 resetting。
runtimeHistoryBoundaryResetDonePOST/api/v1/runtime/conversations/{conversationId}/history-boundary/reset_donemessage-service会话的历史边界动作 reset_done。
runtimeHistoryBoundaryCommitPOST/api/v1/runtime/conversations/{conversationId}/history-boundary/commitmessage-service会话的历史边界动作 commit。
runtimeHistoryBoundaryAbortPOST/api/v1/runtime/conversations/{conversationId}/history-boundary/abortmessage-service会话的历史边界动作 abort。
runtimeHistoryBoundaryReconcilePOST/api/v1/runtime/conversations/{conversationId}/history-boundary/reconcilemessage-service会话的历史边界动作 reconcile。
runtimeConversationMetadataModelPOST/api/v1/runtime/conversations/{conversationId}/metadata/modelmessage-service发布会话的会话模型。
runtimeConversationCronDeliveryPOST/api/v1/runtime/conversations/{conversationId}/deliveries/cronmessage-service把定时任务的结果投递到会话。
runtimeClaimNextPOST/api/v1/runtime/claims/nextmessage-service认领下一个待处理的操作。
runtimeClaimExactPOST/api/v1/runtime/operations/{operationId}/claimsmessage-service认领指定的某个操作。
runtimeClaimRenewPOST/api/v1/runtime/operations/{operationId}/claims/renewmessage-service为某个操作的认领续期。
runtimeClaimReleasePOST/api/v1/runtime/operations/{operationId}/claims/releasemessage-service释放某个操作的认领。
runtimeResourceRedeemPOST由 SDK 构造agent-gateway兑换某个操作的资源(技能或 MCP 资源)。
runtimeOutputFilePresignPOST由 SDK 构造agent-gateway为某个操作的输出文件申请上传 URL。
runtimeOutputFileConfirmPOST由 SDK 构造agent-gateway确认某个操作的输出文件已上传。
runtimeInputFilesResolvePOST由 SDK 构造agent-gateway把某个操作的输入文件解析为可下载的位置。
agentTemplateOriginReportPOST/api/v1/agents/{agentId}/template-originagent-gateway上报智能体所基于的模板。
channelCreatePOST/api/v1/channelsagent-gateway用给定的参与者和元数据创建频道。
a2aTaskCompletePOST/api/v1/a2a/tasks/{taskId}/completeagent-gateway上报一个智能体间任务的结果。
agentEventPublishPOST/api/v1/agent/eventsagent-gateway发布一个智能体事件。
bridgeConfigGetGET/api/v1/bridge/configagent-gateway读取桥接配置。
agentConnectorMcpPOST/api/v1/agent/connectors/mcpagent-gateway把 JSON-RPC 请求透传到连接器的 MCP 端点。
automationListGET/api/v1/automationsagent-gateway列出自动化任务。
automationCreatePOST/api/v1/automationsagent-gateway创建自动化任务。
automationWebhookCreatePOST/api/v1/automations/webhooksagent-gateway为自动化任务创建 webhook。
automationGetGET/api/v1/automations/{automationId}agent-gateway读取一个自动化任务。
automationRunsListGET/api/v1/automations/{automationId}/runsagent-gateway列出某个自动化任务的运行记录。
automationRunCreatePOST/api/v1/automations/{automationId}/runsagent-gateway启动一次自动化任务的运行。
automationRunGetGET/api/v1/automations/{automationId}/runs/{runId}agent-gateway读取某个自动化任务的一次运行。

符号

harnessOperationPath

TypeScript @beeos-ai/cloud-harness-sdk · Python beeos_cloud_harness_sdk

返回某个操作的路径,其中每个占位符都被替换为经 URI 编码的取值。

function harnessOperationPath<K extends OperationId>(id: K, ...params: keyof OperationPathParams[K] extends never ? [] : [OperationPathParams[K]]): string

TypeScript · 参数

参数类型必填默认值说明
idK是操作的标识,即 HARNESS_OPERATIONS 的键。
paramskeyof OperationPathParams[K] extends never ? [] : [OperationPathParams[K]]是路径中 {name} 占位符的取值。路径没有占位符时省略。

返回值 string

Python · 参数

参数类型必填默认值说明
operation_idstr是操作的标识。
**paramsobject是路径中 {name} 占位符的取值。路径没有占位符时省略。

返回值 str

CHAT_PROMPT_METHOD

Python beeos_cloud_harness_sdk · 仅 Python

Cloud 投递每条用户聊天提示所用的运行时方法 session/prompt。回复行由 Cloud 以 streaming 状态创建,由智能体负责收尾。

CHAT_PROMPT_METHOD = 'session/prompt'

HARNESS_OPERATIONS

TypeScript @beeos-ai/cloud-harness-sdk · Python beeos_cloud_harness_sdk

全部操作的表:每个操作 ID 对应的 HTTP 方法、路径模板和目标服务。

const HARNESS_OPERATIONS: { readonly runtimeRegister: { readonly method: "POST"; readonly path: "/api/v1/runtime/registrations"; readonly service: "agent-gateway"; }; readonly runtimeHeartbeat: { readonly method: "POST"; readonly path: "/api/v1/runtime/registrations/{registrationId}/heartbeat"; readonly service: "agent-gateway"; }; readonly runtimeRealtimeTokenCreate: { readonly method: "POST"; readonly path: "/api/v1/runtime/realtime/token"; readonly service: "message-service"; }; readonly runtimeConversationSync: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations"; readonly service: "message-service"; }; readonly runtimeConversationMessagesList: { readonly method: "GET"; readonly path: "/api/v1/runtime/conversations/{conversationId}/messages"; readonly service: "message-service"; }; readonly runtimeConversationMessageCreate: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/messages"; readonly service: "message-service"; }; readonly runtimeConversationMessageGet: { readonly method: "GET"; readonly path: "/api/v1/runtime/conversations/{conversationId}/messages/{messageId}"; readonly service: "message-service"; }; readonly runtimeConversationMessagePatch: { readonly method: "PATCH"; readonly path: "/api/v1/runtime/conversations/{conversationId}/messages/{messageId}"; readonly service: "message-service"; }; readonly runtimeConversationRunStart: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/runs/start"; readonly service: "message-service"; }; readonly runtimeConversationRunFinish: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/runs/finish"; readonly service: "message-service"; }; readonly runtimeDeliveriesRead: { readonly method: "POST"; readonly path: "/api/v1/runtime/deliveries/read"; readonly service: "message-service"; }; readonly runtimeDeliveriesRenew: { readonly method: "POST"; readonly path: "/api/v1/runtime/deliveries/renew"; readonly service: "message-service"; }; readonly runtimeDeliveriesAck: { readonly method: "POST"; readonly path: "/api/v1/runtime/deliveries/ack"; readonly service: "message-service"; }; readonly runtimeOperationHistoryGet: { readonly method: "GET"; readonly path: "/api/v1/runtime/operations/{operationId}/history"; readonly service: "message-service"; }; readonly runtimeOperationMessageAppend: { readonly method: "POST"; readonly path: "/api/v1/runtime/operations/{operationId}/messages"; readonly service: "message-service"; }; readonly conversationMessagesList: { readonly method: "GET"; readonly path: "/api/v2/conversations/{conversationId}/messages"; readonly service: "message-service"; }; readonly conversationMessageSend: { readonly method: "POST"; readonly path: "/api/v2/conversations/{conversationId}/messages"; readonly service: "message-service"; }; readonly agentGet: { readonly method: "GET"; readonly path: "/api/v1/agents/{agentId}"; readonly service: "agent-gateway"; }; readonly agentUpdate: { readonly method: "PATCH"; readonly path: "/api/v1/agents/{agentId}"; readonly service: "agent-gateway"; }; readonly agentSync: { readonly method: "POST"; readonly path: "/api/v1/agents/sync"; readonly service: "agent-gateway"; }; readonly agentFilesList: { readonly method: "GET"; readonly path: "/api/v1/agent/files"; readonly service: "agent-gateway"; }; readonly agentFilePresign: { readonly method: "POST"; readonly path: "/api/v1/agent/files/presign"; readonly service: "agent-gateway"; }; readonly agentFileConfirm: { readonly method: "POST"; readonly path: "/api/v1/agent/files/confirm"; readonly service: "agent-gateway"; }; readonly agentFileResolve: { readonly method: "GET"; readonly path: "/api/v1/agent/files/{fileId}/resolve"; readonly service: "agent-gateway"; }; readonly canvasTokenCreate: { readonly method: "POST"; readonly path: "/api/v1/canvas/token"; readonly service: "agent-gateway"; }; readonly a2aDiscover: { readonly method: "GET"; readonly path: "/api/v1/a2a/discover"; readonly service: "agent-gateway"; }; readonly a2aJsonRpc: { readonly method: "POST"; readonly path: "/api/v1/a2a/{agentId}/jsonrpc"; readonly service: "agent-gateway"; }; readonly a2aTaskGet: { readonly method: "GET"; readonly path: "/api/v1/a2a/tasks/{taskId}"; readonly service: "agent-gateway"; }; readonly messagingTokenCreate: { readonly method: "POST"; readonly path: "/api/v1/messaging/token"; readonly service: "agent-gateway"; }; readonly runtimeHistoryBoundaryPrepare: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/prepare"; readonly service: "message-service"; }; readonly runtimeHistoryBoundaryResetting: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/resetting"; readonly service: "message-service"; }; readonly runtimeHistoryBoundaryResetDone: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/reset_done"; readonly service: "message-service"; }; readonly runtimeHistoryBoundaryCommit: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/commit"; readonly service: "message-service"; }; readonly runtimeHistoryBoundaryAbort: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/abort"; readonly service: "message-service"; }; readonly runtimeHistoryBoundaryReconcile: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/history-boundary/reconcile"; readonly service: "message-service"; }; readonly runtimeConversationMetadataModel: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/metadata/model"; readonly service: "message-service"; }; readonly runtimeConversationCronDelivery: { readonly method: "POST"; readonly path: "/api/v1/runtime/conversations/{conversationId}/deliveries/cron"; readonly service: "message-service"; }; readonly runtimeClaimNext: { readonly method: "POST"; readonly path: "/api/v1/runtime/claims/next"; readonly service: "message-service"; }; readonly runtimeClaimExact: { readonly method: "POST"; readonly path: "/api/v1/runtime/operations/{operationId}/claims"; readonly service: "message-service"; }; readonly runtimeClaimRenew: { readonly method: "POST"; readonly path: "/api/v1/runtime/operations/{operationId}/claims/renew"; readonly service: "message-service"; }; readonly runtimeClaimRelease: { readonly method: "POST"; readonly path: "/api/v1/runtime/operations/{operationId}/claims/release"; readonly service: "message-service"; }; readonly runtimeResourceRedeem: { readonly method: "POST"; readonly path: "(built by the SDK)"; readonly service: "agent-gateway"; }; readonly runtimeOutputFilePresign: { readonly method: "POST"; readonly path: "(built by the SDK)"; readonly service: "agent-gateway"; }; readonly runtimeOutputFileConfirm: { readonly method: "POST"; readonly path: "(built by the SDK)"; readonly service: "agent-gateway"; }; readonly runtimeInputFilesResolve: { readonly method: "POST"; readonly path: "(built by the SDK)"; readonly service: "agent-gateway"; }; readonly agentTemplateOriginReport: { readonly method: "POST"; readonly path: "/api/v1/agents/{agentId}/template-origin"; readonly service: "agent-gateway"; }; readonly channelCreate: { readonly method: "POST"; readonly path: "/api/v1/channels"; readonly service: "agent-gateway"; }; readonly a2aTaskComplete: { readonly method: "POST"; readonly path: "/api/v1/a2a/tasks/{taskId}/complete"; readonly service: "agent-gateway"; }; readonly agentEventPublish: { readonly method: "POST"; readonly path: "/api/v1/agent/events"; readonly service: "agent-gateway"; }; readonly bridgeConfigGet: { readonly method: "GET"; readonly path: "/api/v1/bridge/config"; readonly service: "agent-gateway"; }; readonly agentConnectorMcp: { readonly method: "POST"; readonly path: "/api/v1/agent/connectors/mcp"; readonly service: "agent-gateway"; }; readonly automationList: { readonly method: "GET"; readonly path: "/api/v1/automations"; readonly service: "agent-gateway"; }; readonly automationCreate: { readonly method: "POST"; readonly path: "/api/v1/automations"; readonly service: "agent-gateway"; }; readonly automationWebhookCreate: { readonly method: "POST"; readonly path: "/api/v1/automations/webhooks"; readonly service: "agent-gateway"; }; readonly automationGet: { readonly method: "GET"; readonly path: "/api/v1/automations/{automationId}"; readonly service: "agent-gateway"; }; readonly automationRunsList: { readonly method: "GET"; readonly path: "/api/v1/automations/{automationId}/runs"; readonly service: "agent-gateway"; }; readonly automationRunCreate: { readonly method: "POST"; readonly path: "/api/v1/automations/{automationId}/runs"; readonly service: "agent-gateway"; }; readonly automationRunGet: { readonly method: "GET"; readonly path: "/api/v1/automations/{automationId}/runs/{runId}"; readonly service: "agent-gateway"; }; }

HarnessOperationId

TypeScript @beeos-ai/cloud-harness-sdk · 仅 TypeScript

HARNESS_OPERATIONS 中全部操作 ID 的字符串字面量联合类型(keyof typeof HARNESS_OPERATIONS),也是 harnessOperationPath 的 id 参数类型。生成源码里它叫 OperationId,包以当前名字导出。

type HarnessOperationId = OperationId

类型: OperationId

RuntimeMethod

TypeScript @beeos-ai/cloud-harness-sdk · Python beeos_cloud_harness_sdk

Cloud 可能投递给 harness 的运行时方法。每条用户聊天提示都以 session/prompt 到达。

取值: RuntimeMethod