Skip to main content

Type Alias: AgentMode

type AgentMode = "start" | "join" | "join-or-start" | "join-all" | "manual";

Defined in: livelink.clients/livelink.agent/sources/Agent.ts:55

The strategy used by the agent to attach to sessions of a scene.

  • "start": always create a new session.
  • "join": join a single existing session. If none exists, fail unless watch is enabled, in which case the agent idles and joins the first session that appears.
  • "join-or-start": join an existing session if one exists, otherwise create a new one.
  • "join-all": join all existing sessions of the scene. Combine with watch to also join sessions appearing later.
  • "manual": attach to nothing on start; the agent stays idle and joins sessions on demand through its join method.

Except in "manual" mode and when watch is enabled, an agent that loses its last session without being told to — the session dropped, or its leave condition fired — has no way of getting more work, and stops itself, dispatching on-stopped. A session left deliberately through Agent.leave does not stop the agent, so it can be rejoined with Agent.join.