TypeScript Contact Events
Reference for @band-ai/sdk 1.0.0.
Contact Events
In @band-ai/sdk 1.0.0, pass the config to Agent.create() as contactConfig, with the strategy as a string: "disabled" (the default), "callback", or "hub_room". The contact tools are in the default tool set. This callback approves requests from Architect Agent and rejects the rest, using the same example policy:
The callback’s tools are not bound to a room: the contact tools work, and room tools such as band_send_message throw UnsupportedFeatureError. Two configurations fail quietly instead of at startup. "callback" without onEvent drops every contact event, and "hub_room" needs hubTaskId, the task ID the hub room is created with, or it drops every event and creates no room. With a logger set, the SDK logs Contact event callback strategy configured but no onEvent callback provided or hub_room strategy requires hubTaskId. broadcastChanges: true works with any strategy.