Repository navigation
PostHog and Cal.com bots, and alert hooks for platform agents - #1154
Merged
Merged
Conversation
@PostHog and @cal answer commands from their services' APIs on the org's key, as their Slack apps do, with no model in the loop. A shared command connector (connectors/commands.ts) holds everything but each service's client, commands and alert wording, so another service is one module. A platform agent's owner can point its alerts at a space: Harbor mints a secret address (shown once, stored as a hash) for the service's webhook settings, and the agent posts what each alert says into that space. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: arkml <6592213+arkml@users.noreply.github.com> Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>
They run a service's commands, as Slack bots do, rather than work things out, so the Agents dialog lists them apart, adds them under Add bot, and labels them "PostHog bot" and "Cal.com bot" wherever an agent's kind shows. Harbor keeps them agent members. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: arkml <6592213+arkml@users.noreply.github.com> Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>
Main added Agent37, Conductor and Jev. The bots join them in AGENT_PAIRS, HARBOR_RUN_CONNECTIONS and the connector registry; the alert-hook migration moves to 036, after main's 032-035; the Agents dialog keeps main's instance picker and space ticks with the Add bot split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: arkml <6592213+arkml@users.noreply.github.com> Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>
Main moved the Harbor client into @x/spaces-client (#1175); the alert-hook calls move with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: arkml <6592213+arkml@users.noreply.github.com> Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>
ramnique
added a commit
that referenced
this pull request
Oct 9, 2026
The desktop's main process (spaces/ipc.ts) and rowboat-server (spaces-deps.ts) each carried the same 42 pass-through handlers, and main 14 more (with #1154's agent hooks), verbatim. They are now one table in @x/spaces-client (harborChannelHandlers), built from a host's getClient, getLive, its SpaceSubscriptions and where frames go. Each host keeps only the channels that need it: sign-in, the org registry, uploads by path, save dialogs, link previews, the local agent, scheduled sends, Agent37. SpaceSubscriptions moves from core into the package with its tests. It was already host-neutral, and the web app's in-tab host will need it. No behavior change: rowboat-server's router still serves only the channels main forwards, and main still serves the rest in-process. channels.test.ts runs the table against a real Harbor. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Arjun Maheswaran, https://rowboat.spaces.x.rowboatlabs.com/s/01M0HWBJR0KSG04PWM4411N29X/m/01M40DPZC97A93XQP79CKB9BBZ
What
@PostHogand@Calare new agent types. They work like those services' Slack apps: someone mentions a command, Harbor calls the service's API with the org's key, and the result is posted as the reply. No LLM is involved. Any platform agent can also send alerts into a space.Commands (
@X helplists them):count <event> [days],top [days],query <HogQL>,insights [search],flags [search].today,tomorrow,upcoming,links,slots <type> [date],book <type> <YYYY-MM-DDTHH:MM> <email> [name],cancel <id> [reason]. Times use the key owner's Cal.com time zone.Alerts:
{"text": "…"}body posted as written.Bots, not agents, in the app: they run commands rather than work things out, so the app calls them bots, as Slack does.
How
connectors/commands.tsis a shared command connector: it reads the command, calls the API, replies, and handles keys the service rejects.connectors/posthog/andconnectors/cal/each hold only their client, commands and alert wording, so another service is one module.posthog/calpairs inAGENT_PAIRS.PUT/DELETE /v1/agents/:id/hook(owner, or an admin to turn off).POST /v1/hooks/:agentId/:token. A wrong token and an unknown agent both return 404, so the address reveals nothing.agent_hooks), policy rules, and SPEC §8 "Integrations" and "Alerts", plus a CONTRACT bullet.Not in this PR
Testing
test/integrations.test.tsruns a real Harbor against fake PostHog and Cal.com APIs, built from their docs (checked 2026-10-03). It covers the commands, a rejected key, the region lookup, and the full hook lifecycle.npm run typecheckis clean.Deploy: additive change, so no server/app coupling. Needs
HARBOR_INTEGRATION_KEY, as Replicas agents already do.🤖 Generated with Claude Code