Class: InMemoryWorkflowStore
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:23
Interface implemented by persistence layers capable of storing workflow state.
Implements
Constructors
Constructor
new InMemoryWorkflowStore():
InMemoryWorkflowStore
Returns
InMemoryWorkflowStore
Methods
appendEvents()
appendEvents(
events):Promise<void>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:111
Appends workflow events for auditing/streaming purposes.
Parameters
events
Returns
Promise<void>
Implementation of
buildProgressUpdate()
buildProgressUpdate(
workflowId,sinceTimestamp?):Promise<WorkflowProgressUpdate|null>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:146
Produces a payload representing the current workflow snapshot and optionally recent events.
Parameters
workflowId
string
sinceTimestamp?
string
Returns
Promise<WorkflowProgressUpdate | null>
Implementation of
IWorkflowStore.buildProgressUpdate
createInstance()
createInstance(
data,initialTasks):Promise<WorkflowInstance>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:27
Persists a newly created workflow instance and its initial tasks snapshot.
Parameters
data
initialTasks
Record<string, WorkflowTaskInstance>
Returns
Promise<WorkflowInstance>
Implementation of
getInstance()
getInstance(
workflowId):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:51
Retrieves a workflow instance by identifier.
Parameters
workflowId
string
Returns
Promise<WorkflowInstance | null>
Implementation of
listInstances()
listInstances(
options?):Promise<WorkflowInstance[]>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:122
Lists workflow instances matching the supplied filters.
Parameters
options?
Returns
Promise<WorkflowInstance[]>
Implementation of
updateInstance()
updateInstance(
workflowId,patch):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:56
Applies a partial update to the workflow instance metadata/state.
Parameters
workflowId
string
patch
Partial<Pick<WorkflowInstance, "status" | "updatedAt" | "metadata" | "context" | "roleAssignments" | "agencyState">>
Returns
Promise<WorkflowInstance | null>
Implementation of
updateTasks()
updateTasks(
workflowId,updates):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/InMemoryWorkflowStore.ts:74
Applies updates to one or more tasks within a workflow instance atomically.
Parameters
workflowId
string
updates
Returns
Promise<WorkflowInstance | null>