soulfire.SoulFireBotControlLease

class soulfire.SoulFireBotControlLease(bot: SoulFireBot, lease: soulfire.bot_live_pb2.BotControlLease)[source]

Exclusive action control with explicit renewal and scoped release.

Obtain a lease from SoulFireBot.acquire_control(). The scope releases it automatically. Call renew() before expiry for long workflows. This object does not renew the lease in the background.

property value: soulfire.bot_live_pb2.BotControlLease
renew(*, ttl_seconds: int = 30, timeout_ms: int | None = None) → effect_py.Effect[soulfire.bot_live_pb2.BotControlLease, soulfire.errors.SoulFireOperationError][source]

Extend the active lease and return the updated server lease.

ttl_seconds is the new lifetime in seconds, defaulting to 30. A released or expired lease fails through the Effect error channel. timeout_ms controls RPC timeout in milliseconds.

release(*, timeout_ms: int | None = None) → effect_py.Effect[None, soulfire.errors.SoulFireOperationError][source]

Release the lease and clear this handle’s action token.

Repeated calls after a successful release do nothing. The owning scope calls this method automatically. timeout_ms controls RPC timeout in milliseconds.