Integrations

Brain Town feed

Brain Town is a public, animated town that shows work as it happens: each GAOS product is a hall, each task a person. When you turn the feed on, GAOS sends one HTTP POST to a receiver you name after each committed change. It sends task titles to a third party, so it is off by default and a product is sent as hidden and redacted unless you list it as public.

The four settings

SettingDefaultMeaning
BRAIN_TOWN_ENABLEDofftrue or 1 turns the feed on. Anything else: no listener, no goroutine, no request.
BRAIN_TOWN_URLunsetThe receiver's full ingest URL, from its back office (for example https://town.example.org/ingest/gaos/<integration-id>). https only; no userinfo, query or fragment; redirects are refused; it may not name the host of the database, ai-manager or the QA tools.
BRAIN_TOWN_TOKEN_FILEunsetA file holding the receiver's bearer token (16 to 256 printable characters, no spaces), mode 600. In production it is deploy/stacks/prod.bt-token; an empty file leaves the feed off. A token is never an environment variable, and a gaos_ token or any GAOS API token is refused.
BRAIN_TOWN_PUBLIC_PRODUCTSemptyComma-separated product ids (p-6) sent as public. Every other product is sent as hidden.

An unusable setting never stops GAOS: the feed stays off, the boot log says why (brain town: off (…)) and the back office's Integrations view shows the reason.

What is sent

Only committed changes: on the database store an event reaches the feed after its transaction commits. Each POST carries Authorization: Bearer, Idempotency-Key (the event id) and a JSON body {id, type, at, product, task, data}.

GAOS momenttypedata
A product is created, or is first seen, or its name or visibility changedproduct.upserted
A task is planned (or first seen after a restart)task.created
Any task status changetask.movedfrom, to (board columns), agent when the card enters working
A turn startstask.claimedagent (the task's role; GAOS has no agent id)
A review task becomes readygate.requested
A review is cleared, or a design is blockedgate.decideddecision: approved or rejected
A task reaches donetask.done
A task fails or is cancelledtask.failedreason: failed or canceled

task.qa is not sent: GAOS's QA result event names no task. A send-back moves a finished design out of done, so a task can send task.done twice; the receiver must accept a move after done. A failed review is not a verdict, so it sends task.moved and no gate.decided. The column is GAOS's board column id: backlog, ready, working, needs-you, review, blocked, failed, done or canceled.

What a hidden product leaks

Nothing that names it. For a product not in BRAIN_TOWN_PUBLIC_PRODUCTS, GAOS redacts before sending: visibility is hidden, product.name is Private product and each task.title is the task id. The product key is the product id. For a public product the real name and titles are sent, titles cut to 200 characters with control characters removed; a title that looks like a credential is replaced by the task id. No operator account, event text or block reason is ever read into a body.

Delivery

Turn it on

  1. Create the token file: install -m 600 /dev/null deploy/stacks/prod.bt-token, then put the receiver's token in it. It must exist before up, even empty.
  2. Redeploy with the settings on the line, and repeat them on every redeploy: BRAIN_TOWN_ENABLED=true BRAIN_TOWN_URL=https://town.example.org/ingest/gaos/<id> BRAIN_TOWN_PUBLIC_PRODUCTS=p-6 ./deploy/rebuild-restart.sh prod deploy --tag vX.Y.Z.
  3. Open the back office's Integrations view: the Brain Town block says enabled, the receiver's host, and the last delivery. Move a card and watch the count.