Const
Normally you need to use OfflineContext.act to work with behaviors, and you can only interact with the behaviors in the actor function. This ActionContext allows you to create offline agents that remain functional for the lifespan of the node.
Write operations will throw an error with this context.
Operate in offline context. Interactions with private Matter.js APIs happen in an offline context.
act provides an ActionContext you can use to access agents for a Endpoint. State changes and change events occur once actor returns.
The Transaction is destroyed with act exits so you should not keep a reference to any agents beyond the lifespan of actor.
Offline context is very permissive. You should use carefully.
Optional
options: OfflineContext.Options
OfflineContext.act gives you access to the Agent API outside of user interaction.
You can also use OfflineContext.ReadOnly for read-only Agent access.