You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add comprehensive JSDoc annotations to the Actor runtime subsystem. This includes the base actor class users extend, the runtime that manages actor lifecycle, and all supporting classes for state, timers, and reminders.
Scope
Files (src/actors/runtime/)
File
Purpose
AbstractActor.ts
Base class all user-defined actors extend
ActorRuntime.ts
Singleton managing actor registration, activation, deactivation
ActorManager.ts
Per-type actor instance management
ActorStateManager.ts
Actor state read/write/remove with transactional batching
StateManager.ts
Lower-level state management
StateProvider.ts
State persistence provider interface
ActorReminderData.ts
Reminder data model
ActorTimerData.ts
Timer data model
ActorCallType.ts
Enum of actor call types (method, reminder, timer)
ActorMethodContext.ts
Context passed to actor method invocations
ActorStateChange.ts
Represents a pending state mutation
StateChangeKind.ts
Enum: add, update, remove
StateMetadata.ts
Metadata attached to state entries
BufferSerializer.ts
Serialization for actor state
Actor client (src/actors/client/)
ActorProxyBuilder.ts — Builds typed actor proxies for remote invocation
ActorClient.ts (if present)
Actor ID (src/actors/)
ActorId.ts — Actor identity value object
Requirements
AbstractActor: Document the lifecycle hooks (onActivate, onDeactivate), getStateManager(), and how users should extend this class
ActorRuntime: Document the singleton pattern, registerActor(), configuration options
ActorManager: Document actor instance lifecycle (creation, activation, reentrancy, deactivation, GC)
ActorStateManager: Document get, set, remove, contains, save and transactional semantics
ActorProxyBuilder: Document how to create typed proxies and the relationship between the proxy and the remote actor
All enums: Document each value's meaning
ActorId: Document creation (random vs. explicit), serialization, equality
Example
/** * Base class for all Dapr actor implementations. * * Extend this class and implement your actor's methods. The runtime will * manage the lifecycle (activation/deactivation) and provide access to * durable state, timers, and reminders. * * @example * ```ts * class MyActor extends AbstractActor { * async sayHello(name: string): Promise<string> { * const count = await this.getStateManager().getState<number>("count") ?? 0; * await this.getStateManager().setState("count", count + 1); * await this.getStateManager().saveState(); * return `Hello ${name}! (call #${count + 1})`; * } * } * ``` */
Acceptance Criteria
[ ]All actor runtime classes have class-level and method-level JSDoc
Lifecycle hooks clearly documented with when/why they're called
Summary
Add comprehensive JSDoc annotations to the Actor runtime subsystem. This includes the base actor class users extend, the runtime that manages actor lifecycle, and all supporting classes for state, timers, and reminders.
Scope
Files (
src/actors/runtime/)AbstractActor.tsActorRuntime.tsActorManager.tsActorStateManager.tsStateManager.tsStateProvider.tsActorReminderData.tsActorTimerData.tsActorCallType.tsActorMethodContext.tsActorStateChange.tsStateChangeKind.tsStateMetadata.tsBufferSerializer.tsActor client (
src/actors/client/)ActorProxyBuilder.ts— Builds typed actor proxies for remote invocationActorClient.ts(if present)Actor ID (
src/actors/)ActorId.ts— Actor identity value objectRequirements
AbstractActor: Document the lifecycle hooks (onActivate,onDeactivate),getStateManager(), and how users should extend this classActorRuntime: Document the singleton pattern,registerActor(), configuration optionsActorManager: Document actor instance lifecycle (creation, activation, reentrancy, deactivation, GC)ActorStateManager: Documentget,set,remove,contains,saveand transactional semanticsActorProxyBuilder: Document how to create typed proxies and the relationship between the proxy and the remote actorActorId: Document creation (random vs. explicit), serialization, equalityExample
Acceptance Criteria