You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Breaking Changes
11
11
12
+
-`@agent-relay/sdk`: `AgentRelay` events move to a multi-listener registry. Use `relay.addListener('x', handler)` / `removeListener` in place of `relay.onX = handler` — the 13 `on*` fields (`onMessageReceived`, `onMessageSent`, `onAgentSpawned`, `onAgentReleased`, `onAgentExited`, `onAgentReady`, `onWorkerOutput`, `onDeliveryUpdate`, `onAgentExitRequested`, `onAgentIdle`, `onAgentActivityChanged`, `onChannelSubscribed`, `onChannelUnsubscribed`) are removed.
13
+
-`@agent-relay/sdk`: `channelSubscribed` / `channelUnsubscribed` handlers receive a single `{ agent, channels }` object instead of positional `(agent, channels)` args.
14
+
-`@agent-relay/sdk`: new `beforeAgentSpawn` / `afterAgentSpawn` / `beforeAgentRelease` / `afterAgentRelease` call-site hooks. `beforeAgentSpawn` listeners may return a `SpawnPatch` (shallow-merged in registration order) to mutate the spawn input before the broker POST.
12
15
- Broker/SDK wire protocol is now version 2 for delivery terminal events and lifecycle event shape changes.
13
16
-`relay.spawn({ task })` now returns `success: false` and terminates the agent when task delivery fails after retries.
14
17
-`agent-relay send` now uses the orchestrator identity by default so `agent-relay replies <worker>` can correlate worker DMs.
@@ -19,6 +22,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
22
- Pass `--from` to `agent-relay send` when a script requires a specific sender identity.
20
23
- Handle `success: false` from `relay.spawn()` calls that pass `task`; spawns without a task are unchanged.
21
24
- Set `POSTHOG_PROJECT_KEY` in GitHub Actions repository variables before publishing telemetry-enabled artifacts.
25
+
- Update relay event handlers from field-assignment to `addListener`:
26
+
27
+
```ts
28
+
// Before
29
+
relay.onAgentSpawned= (agent) =>log(agent.name);
30
+
31
+
// After
32
+
const off =relay.addListener('agentSpawned', (agent) =>log(agent.name));
0 commit comments