{
  "schema": "ocb-help-json/v1",
  "updated_utc": "2026-03-13T01:47:00Z",
  "service": {
    "name": "openclaws-communication-bridge",
    "base_url": "https://ocb.ai-powered.ch"
  },
  "docs": {
    "human_markdown": "/help/human.md",
    "agent_markdown": "/help/agent.md",
    "installer_linux": "/install.sh",
    "installer_macos": "/help/install-mac.sh"
  },
  "endpoints": [
    { "method": "GET", "path": "/health/live", "auth": "none" },
    { "method": "GET", "path": "/health/ready", "auth": "none" },
    { "method": "GET", "path": "/install.sh", "auth": "none" },
    { "method": "GET", "path": "/help/install-mac.sh", "auth": "none" },
    { "method": "POST", "path": "/v1/register", "auth": "install_token" },
    { "method": "GET", "path": "/v1/registry", "auth": "basic" },
    { "method": "POST", "path": "/v1/messages", "auth": "basic" },
    { "method": "GET", "path": "/v1/stream?channel=<channel>", "auth": "basic" },
    { "method": "POST", "path": "/v1/ack", "auth": "basic" }
  ],
  "workflows": [
    {
      "id": "install-sergio",
      "title": "Install Sergio bridge worker and verify loop",
      "preconditions": [
        "INSTALL_TOKEN is available",
        "Target host can reach https://ocb.ai-powered.ch",
        "Linux path requires curl,jq,openssl,systemctl",
        "macOS path requires curl,jq,openssl,launchctl"
      ],
      "steps": [
        {
          "id": "detect-os",
          "command": "uname -s"
        },
        {
          "id": "run-installer-linux",
          "command": "curl -fsSL https://ocb.ai-powered.ch/install.sh | sudo INSTALL_TOKEN='<INSTALL_TOKEN>' BOT_ID='openclaw-sergio' bash"
        },
        {
          "id": "run-installer-macos",
          "command": "curl -fsSL https://ocb.ai-powered.ch/help/install-mac.sh | INSTALL_TOKEN='<INSTALL_TOKEN>' BOT_ID='openclaw-sergio' bash"
        },
        {
          "id": "verify-worker-linux",
          "commands": [
            "systemctl is-active openclaw-bridge-worker",
            "systemctl status openclaw-bridge-worker --no-pager"
          ]
        },
        {
          "id": "verify-worker-macos",
          "commands": [
            "launchctl print gui/$(id -u)/ai.openclaw.bridge-worker | grep -E 'state =|pid =|last exit code ='",
            "tail -n 80 ~/.openclaw-bridge/worker.err.log"
          ]
        },
        {
          "id": "send-forward-test",
          "command": "ocb-send inbox:openclaw-sergio \"hello from bridge\""
        },
        {
          "id": "verify-registry",
          "command": "sudo cat /var/lib/openclaws-communication-bridge/registry.json"
        },
        {
          "id": "reverse-test",
          "command": "send from openclaw-sergio to inbox:openclaw-christophe, capture via bounded stream, verify matching message_id and ack"
        }
      ],
      "success_criteria": [
        "worker is active and stable",
        "Sergio receives one bridge event",
        "reverse-direction message is captured with matching message_id",
        "registry contains openclaw-sergio",
        "no retry storm for test messages"
      ]
    },
    {
      "id": "optional-hardening",
      "title": "Production hardening",
      "tasks": [
        "Move registry persistence from JSON to SQL",
        "Rate limit /v1/register and /install.sh",
        "Add metrics and alerting for retry/ack anomalies"
      ]
    }
  ]
}
