small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
albedo robot-docs webhooks.md
6.7 kB · 28 lines
Markdown
at main

# webhooks Webhooks wake an existing session. An infra session can retain its history, memory, GitHub bot, Discord tools, and other extensions while receiving alerts; a delivery never creates a new agent. Webhooks are installed but **disabled by default**. ## Setup 1. Open `/extensions`, select **webhooks**, and enable it **globally** to mount the incoming HTTP service. Press `ctrl+w` on the enabled entry to open this session's Webhooks screen (or type `/webhooks`). The slash shortcut is always in the CLI menu, even before the session command catalog loads or when the extension is off; an off extension shows guidance to enable it in `/extensions`. 2. Press `ctrl+o` to add a named hook. Its **session** field picks the session deliveries wake; it defaults to the one you opened the screen from, and typing filters the list. The screen lists every session's hooks grouped under the session they wake, and the selected hook's **wakes** line names it. Leave the secret blank to generate one (it is shown once; `ctrl+l` copies it) or supply a secret of 16–4096 bytes. `ctrl+l` copies the selected hook's URL. The displayed URL is `http://127.0.0.1:<webhook_port>/extensions/webhooks/hooks/<hook-id>/deliveries` on the intake listener (the hook list's `delivery_url`; `webhooks.list()` gives it as `intakeUrl` beside the bare-path `url`); it targets the chosen session, even when no TUI is attached. The hook name must use 1–64 ASCII letters, digits, `_`, or `-`. 3. Configure the sender to POST a body of at most 65,536 bytes with `X-Albedo-Signature: sha256=<lowercase or uppercase HMAC-SHA256 hex>` computed over **the exact bytes sent** using the hook secret. Fixed-length and chunked uploads are supported. The header defaults to `x-albedo-signature`; the add/edit form sets its name and the signature prefix (for example, GitHub uses `x-hub-signature-256`). 4. For retries, send a stable `X-Albedo-Event-Id` (1–128 bytes, no newlines). A retry with the same hook, ID, and body returns the original delivery ID; reuse with different byte…