PersistStateInstance

Implements IPersistStateInstance

Default file-based implementation of IPersistStateInstance.

Features:

  • Wraps PersistBase for atomic JSON writes
  • Uses bucketName as entity ID within a per-signal PersistBase
  • dispose is a no-op (memo cache is managed by PersistStateUtils)
constructor(signalId: string, bucketName: string);
signalId: string
bucketName: string
_storage: any

Underlying file-based storage scoped to this context

waitForInit(initial: boolean): Promise<void>;

Initializes the underlying PersistBase storage.

readStateData(): Promise<StateData | null>;

Reads the persisted state using bucketName as the entity key.

writeStateData(data: StateData, _when: Date): Promise<void>;

Writes the state using bucketName as the entity key.

dispose(): void;

No-op for the default file-based implementation. Resource cleanup (memo cache invalidation) is handled by PersistStateUtils.dispose().