@yieldstar/core 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/durable-value.d.ts +71 -0
- package/dist/base/durable-value.d.ts.map +1 -0
- package/dist/base/durable-value.test.d.ts +2 -0
- package/dist/base/durable-value.test.d.ts.map +1 -0
- package/dist/base/effect.d.ts +136 -0
- package/dist/base/effect.d.ts.map +1 -0
- package/dist/base/errors.d.ts +23 -0
- package/dist/base/errors.d.ts.map +1 -0
- package/dist/base/errors.test.d.ts +2 -0
- package/dist/base/errors.test.d.ts.map +1 -0
- package/dist/base/event.d.ts +6 -1
- package/dist/base/event.d.ts.map +1 -1
- package/dist/base/execution.d.ts +255 -0
- package/dist/base/execution.d.ts.map +1 -0
- package/dist/base/heap.d.ts +15 -3
- package/dist/base/heap.d.ts.map +1 -1
- package/dist/base/invoker.d.ts +47 -2
- package/dist/base/invoker.d.ts.map +1 -1
- package/dist/base/runtime.d.ts +27 -4
- package/dist/base/runtime.d.ts.map +1 -1
- package/dist/base/step.d.ts +21 -5
- package/dist/base/step.d.ts.map +1 -1
- package/dist/base/store.d.ts +135 -21
- package/dist/base/store.d.ts.map +1 -1
- package/dist/base/workflow.d.ts +15 -0
- package/dist/base/workflow.d.ts.map +1 -1
- package/dist/index.d.ts +23 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1653 -172
- package/dist/lib/effect-state.d.ts +78 -0
- package/dist/lib/effect-state.d.ts.map +1 -0
- package/dist/lib/execution-dispatcher.d.ts +112 -0
- package/dist/lib/execution-dispatcher.d.ts.map +1 -0
- package/dist/lib/execution-state.d.ts +248 -0
- package/dist/lib/execution-state.d.ts.map +1 -0
- package/dist/lib/execution-state.test.d.ts +2 -0
- package/dist/lib/execution-state.test.d.ts.map +1 -0
- package/dist/lib/wait-for-outcome.d.ts +15 -0
- package/dist/lib/wait-for-outcome.d.ts.map +1 -0
- package/dist/lib/workflow-runner.d.ts +14 -9
- package/dist/lib/workflow-runner.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/base/durable-value.test.ts +285 -0
- package/src/base/durable-value.ts +442 -0
- package/src/base/effect.ts +165 -0
- package/src/base/errors.test.ts +210 -0
- package/src/base/errors.ts +72 -0
- package/src/base/event.ts +6 -1
- package/src/base/execution.ts +315 -0
- package/src/base/heap.ts +17 -3
- package/src/base/invoker.ts +60 -2
- package/src/base/runtime.ts +28 -7
- package/src/base/step.ts +29 -7
- package/src/base/store.ts +339 -49
- package/src/base/workflow.ts +15 -0
- package/src/index.ts +138 -3
- package/src/lib/effect-state.ts +254 -0
- package/src/lib/execution-dispatcher.ts +408 -0
- package/src/lib/execution-state.test.ts +249 -0
- package/src/lib/execution-state.ts +650 -0
- package/src/lib/wait-for-outcome.ts +40 -0
- package/src/lib/workflow-runner.ts +75 -43
- package/src/base/scheduler.ts +0 -8
- package/tsconfig.tsbuildinfo +0 -1
package/dist/base/runtime.d.ts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
|
|
1
|
+
import type { EffectClient } from "./effect";
|
|
2
|
+
import type { ExecutionClient } from "./execution";
|
|
3
|
+
import type { HeapClient } from "./heap";
|
|
4
|
+
import type { StoreClient } from "./store";
|
|
5
|
+
export interface RuntimeOptions {
|
|
6
|
+
/** Every client of the runtime reads time from this clock. Defaults to `Date.now`. */
|
|
7
|
+
clock?: () => number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A runtime is defined by the guarantees its clients keep, not by how many
|
|
11
|
+
* databases it uses:
|
|
12
|
+
*
|
|
13
|
+
* - Where one write must accompany another, such as the wakes for a store
|
|
14
|
+
* commit, the second is durable once the first commits and is applied
|
|
15
|
+
* eventually (in one transaction or through an outbox).
|
|
16
|
+
* - A store or effect waiter is deleted atomically with its step's result.
|
|
17
|
+
* - An effect's settlement and the wakes of its waiters are one atomic write.
|
|
18
|
+
* - Every client reads time from the runtime's clock.
|
|
19
|
+
*/
|
|
20
|
+
export declare abstract class Runtime {
|
|
21
|
+
/** The clock every client, and every step's wake time, reads. */
|
|
22
|
+
abstract readonly clock: () => number;
|
|
23
|
+
abstract readonly executions: ExecutionClient;
|
|
24
|
+
abstract readonly effects: EffectClient;
|
|
25
|
+
abstract readonly heap: HeapClient;
|
|
26
|
+
abstract readonly stores: StoreClient;
|
|
27
|
+
}
|
|
5
28
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/base/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/base/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,8BAAsB,OAAO;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CACvC"}
|
package/dist/base/step.d.ts
CHANGED
|
@@ -15,11 +15,14 @@ export declare class StepInvalid extends StepResponse {
|
|
|
15
15
|
static type: string;
|
|
16
16
|
readonly type = "step-invalid";
|
|
17
17
|
}
|
|
18
|
+
export type StepSchemaVerdict = "accepted" | "rejected";
|
|
18
19
|
export declare class StepResult extends StepResponse {
|
|
19
20
|
static type: string;
|
|
20
21
|
readonly type = "step-result";
|
|
21
22
|
result: any;
|
|
22
|
-
|
|
23
|
+
/** Whether the step's schema accepted its value on the first run. */
|
|
24
|
+
schema?: StepSchemaVerdict;
|
|
25
|
+
constructor(result: any, schema?: StepSchemaVerdict);
|
|
23
26
|
}
|
|
24
27
|
export declare class WorkflowResult<T extends any> extends StepResponse {
|
|
25
28
|
static type: string;
|
|
@@ -30,14 +33,26 @@ export declare class WorkflowResult<T extends any> extends StepResponse {
|
|
|
30
33
|
export declare class WorkflowDelay extends StepResponse {
|
|
31
34
|
static type: string;
|
|
32
35
|
readonly type = "workflow-delay";
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
/** The absolute time the step's pause ends, read from the runtime clock. */
|
|
37
|
+
wakeAt: number;
|
|
38
|
+
constructor(wakeAt: number);
|
|
35
39
|
}
|
|
36
40
|
export declare class StepStoreWait extends StepResponse {
|
|
37
41
|
static type: string;
|
|
38
42
|
readonly type = "store-wait";
|
|
39
43
|
constructor();
|
|
40
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* An effect step whose outcome is uncertain. The driver records it as an
|
|
47
|
+
* unfinished step after watching the effect, so the next delivery begins the
|
|
48
|
+
* effect again; `wakeAt` is when that delivery is due.
|
|
49
|
+
*/
|
|
50
|
+
export declare class StepEffectWait extends StepResponse {
|
|
51
|
+
static type: string;
|
|
52
|
+
readonly type = "effect-wait";
|
|
53
|
+
wakeAt: number;
|
|
54
|
+
constructor(wakeAt: number);
|
|
55
|
+
}
|
|
41
56
|
export declare class WorkflowRestart extends StepResponse {
|
|
42
57
|
static type: string;
|
|
43
58
|
readonly type = "workflow-restart";
|
|
@@ -59,7 +74,8 @@ export declare class StepError extends StepResponse {
|
|
|
59
74
|
export declare class StepDelay extends StepResponse {
|
|
60
75
|
static type: string;
|
|
61
76
|
readonly type = "step-delay";
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
/** The absolute time the step's pause ends, read from the runtime clock. */
|
|
78
|
+
wakeAt: number;
|
|
79
|
+
constructor(wakeAt: number);
|
|
64
80
|
}
|
|
65
81
|
//# sourceMappingURL=step.d.ts.map
|
package/dist/base/step.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/base/step.ts"],"names":[],"mappings":"AAAA,8BAAsB,YAAY;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,OAAQ,SAAQ,YAAY;IACvC,MAAM,CAAC,IAAI,SAAc;IACzB,QAAQ,CAAC,IAAI,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;gBACA,GAAG,EAAE,MAAM;CAIxB;AAED,qBAAa,cAAe,SAAQ,YAAY;IAC9C,MAAM,CAAC,IAAI,SAAiB;IAC5B,QAAQ,CAAC,IAAI,iBAAiB;CAC/B;AAED,qBAAa,WAAY,SAAQ,YAAY;IAC3C,MAAM,CAAC,IAAI,SAAkB;IAC7B,QAAQ,CAAC,IAAI,kBAAkB;CAChC;AAED,qBAAa,UAAW,SAAQ,YAAY;IAC1C,MAAM,CAAC,IAAI,SAAiB;IAC5B,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,MAAM,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/base/step.ts"],"names":[],"mappings":"AAAA,8BAAsB,YAAY;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,OAAQ,SAAQ,YAAY;IACvC,MAAM,CAAC,IAAI,SAAc;IACzB,QAAQ,CAAC,IAAI,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;gBACA,GA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C,IAAI,SAAsB;IACjC,QAAQ,CAAC,IAAI,sBAAsB;;CAIpC;AAED,qBAAa,SAAU,SAAQ,YAAY;IACzC,MAAM,CAAC,IAAI,SAAgB;IAC3B,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,GAAG,EAAE,GAAG,CAAC;IACT,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,QAAQ,GAAG,OAAO,CAAC;gBAElC,GAAG,EAAE,GAAG,EACR,IAAI,CAAC,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;KACtC;CAUJ;AAED,qBAAa,SAAU,SAAQ,YAAY;IACzC,MAAM,CAAC,IAAI,SAAgB;IAC3B,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;gBACH,MAAM,EAAE,MAAM;CAI3B"}
|
package/dist/base/store.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
import type
|
|
2
|
+
import { type Durable, type IfDurable } from "./durable-value";
|
|
3
3
|
export type Draft<T> = T extends object ? {
|
|
4
4
|
-readonly [K in keyof T]: Draft<T[K]>;
|
|
5
5
|
} : T;
|
|
@@ -8,6 +8,12 @@ export type StorePath = readonly (string | number)[];
|
|
|
8
8
|
export type StoreDefinition<Schema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
9
9
|
name: string;
|
|
10
10
|
schema: Schema;
|
|
11
|
+
/**
|
|
12
|
+
* The state a store starts with. Every operation on a missing store
|
|
13
|
+
* creates it from this state, so it is evaluated only when the store with
|
|
14
|
+
* this `id` does not exist.
|
|
15
|
+
*/
|
|
16
|
+
initial: (id: string) => StoreState<Schema>;
|
|
11
17
|
};
|
|
12
18
|
export type StoreState<Schema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<Schema>;
|
|
13
19
|
export type StoreKey = {
|
|
@@ -56,11 +62,6 @@ export type StoreDeleteFromResult = {
|
|
|
56
62
|
actualInstanceId: string;
|
|
57
63
|
expectedVersion: StoreVersion;
|
|
58
64
|
actualVersion: StoreVersion;
|
|
59
|
-
} | {
|
|
60
|
-
deleted: false;
|
|
61
|
-
reason: "not-found";
|
|
62
|
-
expectedInstanceId: string;
|
|
63
|
-
expectedVersion: StoreVersion;
|
|
64
65
|
};
|
|
65
66
|
export type StoreSelector<T, R> = (state: Readonly<T>) => R;
|
|
66
67
|
export type StoreTakeResult<R> = {
|
|
@@ -78,7 +79,6 @@ export type StoreWaiter = {
|
|
|
78
79
|
workflowId: string;
|
|
79
80
|
executionId: string;
|
|
80
81
|
stepKey: string;
|
|
81
|
-
event: WorkflowEvent;
|
|
82
82
|
storeName: string;
|
|
83
83
|
storeId: string;
|
|
84
84
|
instanceId: string;
|
|
@@ -93,30 +93,69 @@ export type StoreMutationCommitResult = {
|
|
|
93
93
|
} | {
|
|
94
94
|
status: "conflict";
|
|
95
95
|
snapshot: StoreSnapshot<unknown>;
|
|
96
|
+
} | {
|
|
97
|
+
status: "missing";
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* A snapshot read from a store, or, when `created` is true, the initial state
|
|
101
|
+
* of a store that did not exist when it was read. A created snapshot's
|
|
102
|
+
* `instanceId` is new and its `version` is 0.
|
|
103
|
+
*/
|
|
104
|
+
export type StoreReadSnapshot<T> = StoreSnapshot<T> & {
|
|
105
|
+
created: boolean;
|
|
96
106
|
};
|
|
97
107
|
export type StoreMutation = {
|
|
98
108
|
definition: StoreDefinition;
|
|
99
109
|
id: string;
|
|
100
|
-
|
|
110
|
+
/**
|
|
111
|
+
* The snapshot the mutation was computed from. When `created` is true the
|
|
112
|
+
* commit first inserts it as the store's initial state, and conflicts if
|
|
113
|
+
* the store exists by then.
|
|
114
|
+
*/
|
|
115
|
+
expected: StoreReadSnapshot<unknown>;
|
|
101
116
|
nextState: unknown;
|
|
102
117
|
changedPaths: StorePath[];
|
|
103
118
|
stepId?: StoreStepId;
|
|
104
119
|
result: unknown;
|
|
105
120
|
};
|
|
121
|
+
export type StoreDeletion = {
|
|
122
|
+
definition: StoreDefinition;
|
|
123
|
+
id: string;
|
|
124
|
+
expected: StoreSnapshot<unknown>;
|
|
125
|
+
stepId?: StoreStepId;
|
|
126
|
+
result: StoreDeleteFromResult;
|
|
127
|
+
};
|
|
106
128
|
export type RuntimeStore<T> = {
|
|
107
129
|
get(): Promise<StoreSnapshot<T>>;
|
|
108
130
|
update(updater: (draft: Draft<T>) => void | T): Promise<StoreUpdateResult<T>>;
|
|
109
131
|
updateFrom(snapshot: StoreSnapshot<T>, updater: (draft: Draft<T>) => void | T): Promise<StoreUpdateFromResult<T>>;
|
|
110
132
|
deleteFrom(snapshot: StoreSnapshot<T>): Promise<StoreDeleteFromResult>;
|
|
111
133
|
};
|
|
112
|
-
|
|
134
|
+
/** A store state failed its schema. Workflow code can catch it. */
|
|
135
|
+
export declare class StoreValidationError extends Error {
|
|
136
|
+
constructor(message: string);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A schema whose output, the store state, is a durable value. The state is
|
|
140
|
+
* still validated by the codec at runtime.
|
|
141
|
+
*/
|
|
142
|
+
export type DurableStoreSchema<Schema extends StandardSchemaV1> = IfDurable<StoreState<Schema>, StandardSchemaV1<StandardSchemaV1.InferInput<Schema>, Durable<StoreState<Schema>>>>;
|
|
143
|
+
/**
|
|
144
|
+
* `State` is inferred from the schema alone, so `initial` is checked against
|
|
145
|
+
* it and keeps literal types such as `status: "idle"`.
|
|
146
|
+
*/
|
|
147
|
+
export declare function defineStore<Schema extends StandardSchemaV1<any, State>, State = StoreState<Schema>>(name: string, schema: Schema & StandardSchemaV1<any, State> & DurableStoreSchema<Schema>, options: {
|
|
148
|
+
initial: (id: string) => NoInfer<Durable<State>>;
|
|
149
|
+
}): StoreDefinition<Schema>;
|
|
113
150
|
export declare abstract class StoreClient {
|
|
114
151
|
store<Schema extends StandardSchemaV1>(definition: StoreDefinition<Schema>, id: string): RuntimeStore<StoreState<Schema>>;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Every operation that takes a `definition` and `id`, except `deleteStore`,
|
|
154
|
+
* first creates a missing store from `definition.initial(id)`, in the same
|
|
155
|
+
* atomic write as the operation. `initial` is evaluated only when the store
|
|
156
|
+
* is missing, and concurrent operations on a missing store record exactly
|
|
157
|
+
* one initial state. A creation is version 0 of a new instance.
|
|
158
|
+
*/
|
|
120
159
|
abstract getStore<Schema extends StandardSchemaV1>(params: {
|
|
121
160
|
definition: StoreDefinition<Schema>;
|
|
122
161
|
id: string;
|
|
@@ -181,6 +220,14 @@ export declare abstract class StoreClient {
|
|
|
181
220
|
claim: (draft: Draft<StoreState<Schema>>, selected: NonNullable<R>) => void;
|
|
182
221
|
stepId?: StoreStepId;
|
|
183
222
|
}): Promise<StoreTakeResult<R>>;
|
|
223
|
+
/**
|
|
224
|
+
* Registers a versioned read observation. Registration must be linearizable
|
|
225
|
+
* with mutations: a stale observation is woken immediately, while a current
|
|
226
|
+
* observation is woken by a later intersecting mutation. A wake requests a
|
|
227
|
+
* delivery of `waiter.executionId`; it carries no copy of the event. Once a
|
|
228
|
+
* mutation is durable, the wakes it requires are durable too. The waiter
|
|
229
|
+
* stays registered until the heap records its step's result.
|
|
230
|
+
*/
|
|
184
231
|
abstract registerWaiter(waiter: StoreWaiter): Promise<void>;
|
|
185
232
|
/**
|
|
186
233
|
* Enumerates the ids of every store created under a given definition name.
|
|
@@ -190,14 +237,20 @@ export declare abstract class StoreClient {
|
|
|
190
237
|
*/
|
|
191
238
|
abstract listStores(definition: StoreDefinition): Promise<string[]>;
|
|
192
239
|
/**
|
|
193
|
-
* Removes a store instance and
|
|
194
|
-
*
|
|
240
|
+
* Removes a physical store instance and its waiters. Applied-step receipts
|
|
241
|
+
* remain authoritative for the logical store key across recreation. A no-op
|
|
242
|
+
* if the store does not exist; it never creates one.
|
|
195
243
|
*/
|
|
196
244
|
abstract deleteStore(params: {
|
|
197
245
|
definition: StoreDefinition;
|
|
198
246
|
id: string;
|
|
199
247
|
}): Promise<void>;
|
|
200
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Deletes a store only if its instance ID and version still match the
|
|
250
|
+
* snapshot. A missing store is created first, so the result is a conflict
|
|
251
|
+
* with the new instance. With a `stepId`, a committed deletion is recorded
|
|
252
|
+
* and a repeated call returns the recorded result.
|
|
253
|
+
*/
|
|
201
254
|
abstract deleteStoreFrom(params: {
|
|
202
255
|
definition: StoreDefinition;
|
|
203
256
|
id: string;
|
|
@@ -208,9 +261,25 @@ export declare abstract class StoreClient {
|
|
|
208
261
|
/**
|
|
209
262
|
* Implements store transformations as read/compute/compare-and-swap loops.
|
|
210
263
|
* Storage connectors only implement the atomic mutation protocol and never
|
|
211
|
-
* execute application callbacks while holding a storage
|
|
264
|
+
* execute application callbacks, including `initial`, while holding a storage
|
|
265
|
+
* transaction.
|
|
212
266
|
*/
|
|
213
267
|
export declare abstract class CasStoreClient extends StoreClient {
|
|
268
|
+
/** Reads a store's current snapshot, or `undefined` if it does not exist. */
|
|
269
|
+
protected abstract readStore(params: {
|
|
270
|
+
definition: StoreDefinition;
|
|
271
|
+
id: string;
|
|
272
|
+
}): Promise<StoreSnapshot<unknown> | undefined>;
|
|
273
|
+
/**
|
|
274
|
+
* Atomically inserts `snapshot` as a store's initial state unless the store
|
|
275
|
+
* exists, and returns the store's snapshot after the write: `snapshot` if it
|
|
276
|
+
* was inserted, otherwise the existing store's.
|
|
277
|
+
*/
|
|
278
|
+
protected abstract insertStore(params: {
|
|
279
|
+
definition: StoreDefinition;
|
|
280
|
+
id: string;
|
|
281
|
+
snapshot: StoreSnapshot<unknown>;
|
|
282
|
+
}): Promise<StoreSnapshot<unknown>>;
|
|
214
283
|
protected abstract getAppliedStoreStep(params: {
|
|
215
284
|
definition: StoreDefinition;
|
|
216
285
|
id: string;
|
|
@@ -219,10 +288,27 @@ export declare abstract class CasStoreClient extends StoreClient {
|
|
|
219
288
|
result: unknown;
|
|
220
289
|
} | undefined>;
|
|
221
290
|
/**
|
|
222
|
-
* Atomically compares `expected`, writes the next state
|
|
223
|
-
*
|
|
291
|
+
* Atomically compares `expected`, writes the next state at
|
|
292
|
+
* `expected.version + 1`, records the optional step result, and records the
|
|
293
|
+
* wake obligations created by `changedPaths`. When `expected.created` is
|
|
294
|
+
* true the store must still be missing, and the commit inserts it under
|
|
295
|
+
* `expected.instanceId`; otherwise a missing store returns `missing`. A
|
|
296
|
+
* recorded step result wins over both checks. A transactional outbox is
|
|
297
|
+
* recommended but is not part of the protocol.
|
|
224
298
|
*/
|
|
225
299
|
protected abstract commitStoreMutation(mutation: StoreMutation): Promise<StoreMutationCommitResult>;
|
|
300
|
+
/**
|
|
301
|
+
* Atomically compares `expected`, deletes the store and its waiters, and
|
|
302
|
+
* records the optional step result. A recorded step result wins over the
|
|
303
|
+
* comparison, and a missing store returns `missing`.
|
|
304
|
+
*/
|
|
305
|
+
protected abstract commitStoreDeletion(deletion: StoreDeletion): Promise<StoreMutationCommitResult>;
|
|
306
|
+
/** Names the instance a store is created as. Connectors may override it. */
|
|
307
|
+
protected createInstanceId(): string;
|
|
308
|
+
getStore<Schema extends StandardSchemaV1>(params: {
|
|
309
|
+
definition: StoreDefinition<Schema>;
|
|
310
|
+
id: string;
|
|
311
|
+
}): Promise<StoreSnapshot<StoreState<Schema>>>;
|
|
226
312
|
updateStore<Schema extends StandardSchemaV1>(params: {
|
|
227
313
|
definition: StoreDefinition<Schema>;
|
|
228
314
|
id: string;
|
|
@@ -236,6 +322,12 @@ export declare abstract class CasStoreClient extends StoreClient {
|
|
|
236
322
|
updater: (draft: Draft<StoreState<Schema>>) => void | StoreState<Schema>;
|
|
237
323
|
stepId?: StoreStepId;
|
|
238
324
|
}): Promise<StoreUpdateFromResult<StoreState<Schema>>>;
|
|
325
|
+
deleteStoreFrom(params: {
|
|
326
|
+
definition: StoreDefinition;
|
|
327
|
+
id: string;
|
|
328
|
+
snapshot: StoreSnapshot<unknown>;
|
|
329
|
+
stepId?: StoreStepId;
|
|
330
|
+
}): Promise<StoreDeleteFromResult>;
|
|
239
331
|
takeFromStore<Schema extends StandardSchemaV1, R>(params: {
|
|
240
332
|
definition: StoreDefinition<Schema>;
|
|
241
333
|
id: string;
|
|
@@ -243,12 +335,34 @@ export declare abstract class CasStoreClient extends StoreClient {
|
|
|
243
335
|
claim: (draft: Draft<StoreState<Schema>>, selected: NonNullable<R>) => void;
|
|
244
336
|
stepId?: StoreStepId;
|
|
245
337
|
}): Promise<StoreTakeResult<R>>;
|
|
338
|
+
/**
|
|
339
|
+
* Reads a store, or evaluates and validates `definition.initial` when it is
|
|
340
|
+
* missing. Nothing is written: a created snapshot is committed by the
|
|
341
|
+
* operation computed from it.
|
|
342
|
+
*/
|
|
343
|
+
private readOrInitialize;
|
|
344
|
+
private getOrInsertStore;
|
|
246
345
|
private getAppliedResult;
|
|
247
346
|
}
|
|
248
347
|
export declare function isStoreSelectorMatch<R>(result: R): result is Exclude<R, undefined | null | false>;
|
|
249
348
|
export declare function assertSynchronousClaim(claimResult: unknown): void;
|
|
250
349
|
export declare function assertSynchronousUpdater(updaterResult: unknown): void;
|
|
251
|
-
|
|
350
|
+
/**
|
|
351
|
+
* Validates a state against its store's schema, then checks that the schema's
|
|
352
|
+
* output is a durable value. Throws `StoreValidationError` when the schema
|
|
353
|
+
* rejects the state, and `WorkflowValueError` (`INVALID_STEP_VALUE`) when the
|
|
354
|
+
* output is not durable, so callers that validate before committing leave the
|
|
355
|
+
* store unchanged. `stepKey` names the step in that error.
|
|
356
|
+
*/
|
|
357
|
+
export declare function validateStoreState<Schema extends StandardSchemaV1>(definition: StoreDefinition<Schema>, state: unknown, stepKey?: string): Promise<StoreState<Schema>>;
|
|
358
|
+
/** Encodes a store state or step result for storage. Throws if it is not durable. */
|
|
359
|
+
export declare function encodeStoreValue(value: unknown): string;
|
|
360
|
+
export declare function decodeStoreValue(canonical: string): unknown;
|
|
361
|
+
/**
|
|
362
|
+
* Copies a state as the durable value codec would read it back. Values the
|
|
363
|
+
* codec rejects, which validation keeps out of committed state, are copied
|
|
364
|
+
* with `structuredClone`.
|
|
365
|
+
*/
|
|
252
366
|
export declare function cloneStoreState<T>(state: T): T;
|
|
253
367
|
/**
|
|
254
368
|
* Diffs two store states and returns the set of changed paths.
|
package/dist/base/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/base/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/base/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAqB,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGlF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACnC;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACzC,CAAC,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAErD,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,IAC5E;IACE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,CAAC,EAAE,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,MAAM,CAAC,CAAC,CAY7B;AAaD,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMvD;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAM3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAe9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,CAwB5E;AAID;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAQjD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EACrC,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAC5B;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,SAAS,EAAE,SAAS,EAAE,CAAA;CAAE,CA2CvC;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC;IACT,4EAA4E;IAC5E,UAAU,IAAI,SAAS,EAAE,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CA4DtE;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EAAE,EACtB,UAAU,EAAE,SAAS,EAAE,GACtB,OAAO,CAOT"}
|
package/dist/base/workflow.d.ts
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { Logger } from "pino";
|
|
2
2
|
import type { EventParams, WorkflowEvent, EventContext } from "./event";
|
|
3
|
+
import type { EffectClient } from "./effect";
|
|
4
|
+
import type { ExecutionClient, ExecutionLease } from "./execution";
|
|
3
5
|
import { HeapClient } from "./heap";
|
|
4
6
|
import { StoreClient } from "./store";
|
|
5
7
|
import { StepResponse, WorkflowResult } from "./step";
|
|
6
8
|
export type WorkflowGeneratorParams<Params extends EventParams, Context extends EventContext> = {
|
|
7
9
|
event: WorkflowEvent<Params, Context>;
|
|
10
|
+
/** Every heap step write is fenced by this lease. */
|
|
11
|
+
lease: ExecutionLease;
|
|
12
|
+
/**
|
|
13
|
+
* Aborted when the delivery must stop. The driver checks it before each
|
|
14
|
+
* step function and each fenced write.
|
|
15
|
+
*/
|
|
16
|
+
signal: AbortSignal;
|
|
8
17
|
heapClient: HeapClient;
|
|
9
18
|
storeClient: StoreClient;
|
|
19
|
+
/** `step.start` admits its target through this client. */
|
|
20
|
+
executionClient: ExecutionClient;
|
|
21
|
+
/** `step.effect` records and settles its effects through this client. */
|
|
22
|
+
effectClient: EffectClient;
|
|
23
|
+
/** The runtime clock. Delay and retry wake times are read from it. */
|
|
24
|
+
clock: () => number;
|
|
10
25
|
logger: Logger;
|
|
11
26
|
};
|
|
12
27
|
export type WorkflowGenerator<Params extends EventParams, Result, Context extends EventContext> = (genParams: WorkflowGeneratorParams<Params, Context>) => AsyncGenerator<StepResponse, WorkflowResult<Result>, StepResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/base/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAEtD,M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G,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE9E,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IACpE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAE5B,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAClE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
export type { HeapClient, HeapRecord } from "./base/heap";
|
|
2
|
-
export type { WorkflowInvoker } from "./base/invoker";
|
|
3
|
-
export
|
|
4
|
-
export type {
|
|
2
|
+
export type { DeliveryOptions, WorkflowInvoker } from "./base/invoker";
|
|
3
|
+
export { WorkerExitedError } from "./base/invoker";
|
|
4
|
+
export type { RuntimeOptions } from "./base/runtime";
|
|
5
|
+
export { Runtime } from "./base/runtime";
|
|
6
|
+
export type { ExecutionAcknowledgeResult, ExecutionAdmissionErrorCode, ExecutionAdmissionRequest, ExecutionAdmissionResult, ExecutionClaimFilter, ExecutionClient, ExecutionLease, ExecutionOutcome, ExecutionParent, ExecutionRecord, ExecutionReleaseResult, ExecutionRenewResult, ExecutionStartRequest, ExecutionStartResult, ExecutionStatus, ExecutionWakeResult, LeaseLost, WorkflowRunOutcome, WorkflowStartErrorCode, } from "./base/execution";
|
|
7
|
+
export { ExecutionAdmissionError, InfrastructureError, LeaseLostError, StepConflictError, WorkflowStartError, isLeaseLost, isTerminalExecutionStatus, } from "./base/execution";
|
|
8
|
+
export type { EffectBeginRequest, EffectBeginResult, EffectClient, EffectConflictReport, EffectDeliveryErrorCode, EffectRecord, EffectSettleRequest, EffectSettleResult, EffectWatchRequest, WorkflowEffectErrorCode, } from "./base/effect";
|
|
9
|
+
export { EffectClientInvariantError, EffectDeliveryError, WorkflowEffectError, } from "./base/effect";
|
|
10
|
+
export type { EffectConflictState, EffectState, PreparedEffectBegin, PreparedEffectSettle, } from "./lib/effect-state";
|
|
11
|
+
export { createEffectState, effectNotFound, matchEffectBegin, prepareEffectBegin, prepareEffectSettle, prepareEffectWatch, settleEffect, toEffectRecord, validateEffectRequest, } from "./lib/effect-state";
|
|
12
|
+
export type { Durable, DurableDecoding, DurableObject, DurableValue, DurableValueCodec, DurableValueEncoding, IfDurable, } from "./base/durable-value";
|
|
13
|
+
export { DurableValueError, decodeParsedValue, durableValueCodec, encodeThrownValue, } from "./base/durable-value";
|
|
14
|
+
export type { ErrorClass, WorkflowValueErrorCode } from "./base/errors";
|
|
15
|
+
export { WORKFLOW_RESULT_STEP_KEY, WorkflowValueError, registerErrorClass, } from "./base/errors";
|
|
16
|
+
export type { ExecutionState, PreparedExecutionStart, StartRequestState, } from "./lib/execution-state";
|
|
17
|
+
export { DEFAULT_LEASE_DURATION, REDELIVERY_DELAY_BASE, REDELIVERY_DELAY_MAX, ExecutionEventEncodingError, acknowledgeExecution, claimExecution, createExecutionState, createStartedExecution, decodeExecutionEvent, decodeExecutionOutcome, encodeExecutionEvent, encodeExecutionOutcome, executionIdConflict, executionNotFound, executionStatusAt, isExecutionClaimable, isLeaseCurrent, matchStartRequest, nextClaimAt, prepareExecutionAdmission, prepareExecutionStart, redeliveryDelay, releaseExecutionLease, renewExecutionLease, requestExecutionWake, toExecutionRecord, unacknowledgedDeliveryCountAt, } from "./lib/execution-state";
|
|
18
|
+
export type { DispatcherOptions } from "./lib/execution-dispatcher";
|
|
19
|
+
export { DEFAULT_ABORT_GRACE_PERIOD, DEFAULT_DISPATCHER_CONCURRENCY, ExecutionDispatcher, } from "./lib/execution-dispatcher";
|
|
20
|
+
export { waitForExecutionOutcome } from "./lib/wait-for-outcome";
|
|
5
21
|
export type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
|
-
export type { Draft, RuntimeStore, StoreDefinition, StoreDeleteFromResult, StoreKey, StorePath, StoreSelector, StoreSnapshot, StoreState, StoreStepId, StoreTakeResult, StoreUpdateFromResult, StoreUpdateResult, StoreVersion, StoreWaiter, StoreMutation, StoreMutationCommitResult, TrackedStoreUpdater, } from "./base/store";
|
|
7
|
-
export { StoreClient, CasStoreClient, assertSynchronousClaim, assertSynchronousUpdater, cloneStoreState, defineStore, diffStorePaths, isStoreSelectorMatch, storePathsIntersect, trackStoreSelector, trackStoreUpdater, unwrapTrackedValue, validateStoreState, } from "./base/store";
|
|
22
|
+
export type { Draft, RuntimeStore, StoreDefinition, StoreDeleteFromResult, StoreKey, StorePath, StoreSelector, StoreSnapshot, StoreState, DurableStoreSchema, StoreStepId, StoreTakeResult, StoreUpdateFromResult, StoreUpdateResult, StoreVersion, StoreWaiter, StoreMutation, StoreMutationCommitResult, StoreDeletion, StoreReadSnapshot, TrackedStoreUpdater, } from "./base/store";
|
|
23
|
+
export { StoreClient, CasStoreClient, StoreValidationError, assertSynchronousClaim, assertSynchronousUpdater, cloneStoreState, decodeStoreValue, defineStore, encodeStoreValue, diffStorePaths, isStoreSelectorMatch, storePathsIntersect, trackStoreSelector, trackStoreUpdater, unwrapTrackedValue, validateStoreState, } from "./base/store";
|
|
8
24
|
export type { EventParams, EventContext, ExecutionEvent, MiddlewareEvent, TriggerEvent, WorkflowEvent, } from "./base/event";
|
|
9
25
|
export type { MiddlewareNext, MiddlewareFunction } from "./base/middleware";
|
|
10
26
|
export type { WorkflowGenerator, WorkflowGeneratorReturnType, WorkflowRouter, EventOfWorkflow, EventParamsOf, } from "./base/workflow";
|
|
11
|
-
export { StepCacheCheck, StepDelay, StepError, StepInvalid, StepKey, StepResponse, StepResult, StepStoreWait, WorkflowDelay, WorkflowRestart, WorkflowResult, } from "./base/step";
|
|
27
|
+
export { StepCacheCheck, StepDelay, StepEffectWait, StepError, StepInvalid, StepKey, StepResponse, StepResult, StepStoreWait, WorkflowDelay, WorkflowRestart, WorkflowResult, } from "./base/step";
|
|
28
|
+
export type { StepSchemaVerdict } from "./base/step";
|
|
12
29
|
export { WorkflowRunner } from "./lib/workflow-runner";
|
|
13
30
|
export { ReadOnlyMap, FreezableMap } from "./utils/map";
|
|
14
31
|
export { errorWithOriginalStack } from "./utils/error";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,yBAAyB,GAC1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