跳至內容
全部功能

交付

Webhook 與事件

在後端回應生命週期變更與營運事件。

你的後端
Server SDK · BeeOSClient
BeeOS Cloud
代理執行環境
harness-sdk.ts
import {
  RuntimeRegistrationCoordinator,
  type RuntimeRegistrationConfig,
  type RuntimeRegistrationTransport,
} from "@beeos-ai/cloud-harness-sdk";

async function startRuntime(
  transport: RuntimeRegistrationTransport,
  config: RuntimeRegistrationConfig,
  onLeaseLost: (reason: "fenced" | "expired" | "heartbeat_failed", cause?: unknown) => void,
) {
  const runtime = new RuntimeRegistrationCoordinator(transport, config, onLeaseLost);
  await runtime.start();
  return runtime;
}
在後端完成授權簽發 App 範圍的伺服器憑證,並在任何請求前驗證你自己的使用者權限。
連接執行環境註冊執行環境,宣告其支援的方法,並把回覆送回你的產品。
接收事件訂閱生命週期與營運 Webhook,再更新你自己的狀態儲存。

終端使用者身分與 ACL 由你的後端負責。前端透過後端取得授權資料並渲染;不存在獨立的 App 用戶端 SDK。

文件
  1. 01

    註冊後端端點

  2. 02

    訂閱相關生命週期事件

  3. 03

    在產品中處理事件

實際場景

代理任務或個體狀態變化時接收事件,並更新產品。

  • 生命週期事件交付
  • 由後端驅動回應
  • 與事件關聯的營運流程

開始整合

開始整合

閱讀整合指南,再連接執行環境與後端。

文件