@prismshadow/penguin-library-session · library/session/src/session.ts:232

AgentState

interface

AgentState: the mechanism AgentStateStore implements — the Session runtime's in-memory state, data only.

API

@Interface()
export abstract class AgentState {
  abstract readonly entries: Map<string, RuntimeEntry>;
  abstract readonly childRoots: Map<string, string>;
  abstract readonly locks: Map<string, Promise<unknown>>;
  abstract readonly deletingAgents: Set<string>;
  abstract readonly deletingSessions: Set<string>;
  abstract readonly agentGenerations: Map<string, number>;
  abstract readonly liveTail: LiveTail;
  abstract current: RunStarter | null;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use
@Moduleexported by
@Provideprovided by

Members (8)

entries

readonly entries: Map<string, RuntimeEntry>

The live Session runtimes, keyed by Session id.

childRoots

readonly childRoots: Map<string, string>

locks

readonly locks: Map<string, Promise<unknown>>

deletingAgents

readonly deletingAgents: Set<string>

deletingSessions

readonly deletingSessions: Set<string>

agentGenerations

readonly agentGenerations: Map<string, number>

liveTail

readonly liveTail: LiveTail

The live fragment log.

current

current: RunStarter | null

The generation working on this state right now; every generation points it at itself when it takes the state over.