ProtectedconstructorThe collaborators currently set (a Pick for diagnostics; tests read it).
StaticInstanceThe process-wide engine.
A person accepts an offer. Authorised by the offer's target; anything else answers as a missing offer. On success the console should join the room; the engine watches for them and takes the AI out once they are there.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderThe AI says it has finished briefing and is ready to leave. Returns whether a handoff was waiting for that.
The room's call ended or the agent left for another reason: abandon its handoff and withdraw its offer. A flow that is already leaving is finished, not cancelled.
Sets (merges) the collaborators. Called once at startup by the host that owns each one.
A person declines an offer. Authorised the same way as AcceptOffer.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderEmits a handoff event to all registered observers and the primary observer.
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
Whether a handoff is in progress for the room.
The offers to show a person (pending ones and recently resolved ones).
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderHandles an offer update forwarded from another cluster instance via cross-instance pub/sub.
Registers an observer for handoff lifecycle events without replacing the primary collaborator.
Starts handing the conversation over. Returns at once; what happens next is reported to the model through RoomHandoffAgentContext.NotifyModel.
Drops every flow and every collaborator (tests, shutdown).
Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: string
Brings a person, a number or another agent into a room conversation and takes the AI out.