bothy-sdk
    Preparing search index...

    Function buildHeartbeat

    • Builds a heartbeat of schema agent_heartbeat.v1.

      Every heartbeat is the whole reported state: an option left out is "not reported" (09 4.8 "Full state"), except projectReadiness, where absent means "unchanged". The adapter fills details.active_runs and sends the result as member agent of every gateway heartbeat, or through sendHeartbeat with the polling source (HeartbeatSender).

      Parameters

      • state: "online" | "degraded" = "online"

        online (default) or degraded.

      • options: BuildHeartbeatOptions = {}

        The other members.

      Returns {}

      The generated Heartbeat.

      RangeError for an unknown key, a missing required member, a value of the wrong type, outside its vocabulary or form, or a duplicate. The message names the field, never the value.

      buildHeartbeat("online", {
      runtimeVersion: "2.3.1",
      billingEvidence: { key_type: "api_key", provider: "anthropic" },
      details: { adapter: { name: "example-adapter" }, protocol_version: 1 },
      });
      buildHeartbeat("online", { runtimeVersion: "/opt/runtime" });
      // RangeError: runtime_version: does not match the version form