Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/workflow / / CheckpointStore
Interface: CheckpointStore
Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Pluggable checkpoint storage interface. The default implementation lives in @graphorin/store-sqlite.
Stable
Methods
deleteThread()
deleteThread(threadId): Promise<void>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Full erasure primitive: delete every checkpoint and pending write of this thread across ALL namespaces. Namespace-blind by contract - retention sweeps must use CheckpointStoreExt.pruneThreads instead, which is namespace-scoped and protects suspended threads.
Parameters
| Parameter | Type |
|---|---|
threadId | string |
Returns
Promise<void>
getTuple()
getTuple(
threadId,
namespace,
checkpointId?): Promise<
| CheckpointTuple
| null>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpointId? | string |
Returns
Promise< | CheckpointTuple | null>
list()
list(
threadId,
namespace,
opts?): AsyncIterable<CheckpointTuple>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
opts? | ListOptions |
Returns
AsyncIterable<CheckpointTuple>
listSuspended()?
optional listSuspended(namespace, opts?): Promise<readonly {
threadId: string;
wakeAt: number;
}[]>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
W-032: enumerate threads whose LATEST checkpoint in namespace is suspended with a due wakeAt (<= opts.dueBefore, default: any stamped wakeAt). This is what a durable-timer driver polls - without it an operator would have to keep an external registry of sleeping threadIds. OPTIONAL so third-party stores compile unchanged; createTimerDriver throws a typed error when the store lacks it (deterministic policy, no silent no-op).
Parameters
| Parameter | Type |
|---|---|
namespace | string |
opts? | { dueBefore?: number; limit?: number; } |
opts.dueBefore? | number |
opts.limit? | number |
Returns
Promise<readonly { threadId: string; wakeAt: number; }[]>
put()
put(
threadId,
namespace,
checkpoint,
metadata,
opts?): Promise<string>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpoint | Checkpoint |
metadata | CheckpointMetadata |
opts? | CheckpointPutOptions |
Returns
Promise<string>
putWrites()
putWrites(
threadId,
namespace,
checkpointId,
writes,
taskId): Promise<void>;Defined in: packages/core/dist/contracts/checkpoint-store.d.ts
Parameters
| Parameter | Type |
|---|---|
threadId | string |
namespace | string |
checkpointId | string |
writes | readonly PendingWrite[] |
taskId | string |
Returns
Promise<void>