Repository navigation
Conversation
OpenBot can be the agent at AGENT_URL, but it refuses every turn that lacks one structured `openbot.sender` context entry naming the sender, the event, whether the app was mentioned, and the conversation. OpenTag only ever sent a human-readable label, so the pairing could not work. With OPENBOT_PAIRING=true the Channel resolves identity through a callback equivalent to the "platform" strategy, which also notes the turn's conversation (the managed handler's message does not carry it), and each run carries the `openbot.sender` entry beside the existing label. Off by default; unpaired runs are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
We ran this branch through a real Slack round trip, against a local OpenBot ( What the managed adapter reports for a Slack DM We added temporary logging in {
"trigger": "message",
"tenant": { "id": "unknown" },
"conversation": { "id": "<uuid>", "kind": "thread" },
"raw": { "kind": "text" }
}
As a result, the Two smaller things we hit
Workaround we used for local testing only We patched What would fix it The managed adapter needs to expose the Slack conversation type, or the Slack channel id, in Versions: |
Why
OpenBot already implements the server side of the OpenTag pairing. It exposes
POST /api/delivery/webhooks/opentag/agent, links identities withlink <code>, maps approvals ontoconfirm_write, and sends proactive messages to/openbot/deliver. OpenTag never implemented its own half. OpenBot refuses every turn that doesn't carry exactly one structuredopenbot.sendercontext entry. OpenTag only sends a human-readable label, so pointingAGENT_URLat OpenBot today gets "OpenTag did not say who sent this message" on every turn.This is the first of the four pieces OpenTag is missing, and the one that makes reactive DMs work.
What
OPENBOT_PAIRING=true(off by default) adds anopenbot.senderentry to every run, placed beside the existing label:{ "user": "slack:<team>:<user>", "event": "<event id>", "mentioned": true, "conversation": { "id": "D0…", "kind": "im" } }useris the Channel's ownprovider:tenant:actorid, which is what OpenBot's identity links are keyed on.messagedoesn't carry it, butidentifyUserreceives it. When paired, the Channel uses anidentifyUsercallback that returns the same user as the"platform"strategy (pinned by tests) and records the turn's conversation under its event id for the handler to take. Entries are bounded, so turns the handler drops can't accumulate."platform", and the existing context tests still pass as they are.setup.mdgains a "Pairing with OpenBot" section and an env-table row;.env.examplegains the variable.Not in this PR
POST /openbot/deliver(proactive sends) andPOST /openbot/membership(channel-membership check for Slack triggers). These are blocked on a design question. In@copilotkit/channels0.9.2 every post on the managed path is tied to a live delivery, and this repository holds no Slack token by design (pinned inenv.test.ts/server.test.ts). Both routes need either an out-of-turn send and membership API on Intelligence, or a token held here. Until then, OpenBot replies that it routes outside the live turn (for example, answers to a mention in a shared channel), and Slack triggers, won't arrive.observe) for OpenBot's Slack triggers. That goes in a follow-up PR.Verification
pnpm check-typespasses.pnpm test: 518 passed.(cd agent && uv run pytest): 853 passed.node node_modules/railway/dist/iac/bin.js: no diagnostics.main@f1961c35, local), posting OpenTag-shaped run input to the webhook:link <code>in a DM links the sender.🤖 Generated with Claude Code