@lostgradient/weft 0.21.0 → 0.22.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/README.md +2 -4
- package/dist/cli/console.js +5 -5
- package/dist/cli/generated/operation-catalog.snapshot.json +207 -80
- package/dist/cli/generated/operation-client.generated.d.ts +120 -43
- package/dist/cli/help-text.d.ts +1 -1
- package/dist/cli/help-text.js +1 -1
- package/dist/client/http-client-storage.js +1 -1
- package/dist/core/engine/index.d.ts +22 -0
- package/dist/http.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/indexeddb.js +1 -1
- package/dist/json-schema.js +3 -3
- package/dist/observability/index.js +2 -2
- package/dist/runtime/portable.js +3 -3
- package/dist/server/operations/get-task-diagnostics.d.ts +115 -25
- package/dist/server/operations/get-task-diagnostics.js +93 -7
- package/dist/storage/auto.js +1 -1
- package/dist/storage/bun-sql.js +2 -2
- package/dist/storage/compressed-storage.js +1 -1
- package/dist/storage/http.js +1 -1
- package/dist/storage/interface.js +1 -1
- package/dist/storage/lmdb.js +1 -1
- package/dist/storage/memory.js +1 -1
- package/dist/storage/neon.js +4 -4
- package/dist/storage/node-sqlite-loader.js +2 -0
- package/dist/storage/node-sqlite.js +5 -2
- package/dist/storage/postgres.js +4 -4
- package/dist/storage/resolve.js +1 -1
- package/dist/storage/scoped-storage.js +1 -1
- package/dist/storage/testing.js +1 -1
- package/dist/storage/turso.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web-extension.js +1 -1
- package/dist/worker/protocol.js +1 -1
- package/package.json +7 -8
|
@@ -19,14 +19,14 @@ export declare const CLIENT_REST_OPERATION_BINDINGS: {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
type
|
|
22
|
+
type SharedAttributesBulkConcurrenc_0f0d07d6 = {
|
|
23
23
|
readonly attributes?: ReadonlyArray<SharedGtGteKey_e658e64c>;
|
|
24
24
|
readonly bulkConcurrency?: number;
|
|
25
25
|
readonly confirmationToken?: string;
|
|
26
26
|
readonly createdAt?: SharedGtGteLt_d9a61361;
|
|
27
27
|
readonly dryRun?: boolean;
|
|
28
28
|
readonly executionDeadline?: SharedGtGteLt_d9a61361;
|
|
29
|
-
readonly failureCategory?:
|
|
29
|
+
readonly failureCategory?: 'application' | 'timeout' | 'cancellation' | 'resource' | 'system' | ReadonlyArray<'application' | 'timeout' | 'cancellation' | 'resource' | 'system'>;
|
|
30
30
|
readonly idPrefix?: string;
|
|
31
31
|
readonly limit?: number;
|
|
32
32
|
readonly offset?: number;
|
|
@@ -34,23 +34,23 @@ type SharedAttributesBulkConcurrenc_ff397168 = {
|
|
|
34
34
|
readonly parentWorkflowId?: string;
|
|
35
35
|
readonly requestId?: string;
|
|
36
36
|
readonly scheduleId?: string;
|
|
37
|
-
readonly status?:
|
|
37
|
+
readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended' | ReadonlyArray<'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended'>;
|
|
38
38
|
readonly tags?: ReadonlyArray<string>;
|
|
39
39
|
readonly type?: string;
|
|
40
40
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
41
41
|
};
|
|
42
|
-
type
|
|
42
|
+
type SharedAttributesCreatedAtExecu_47f8e20e = {
|
|
43
43
|
readonly attributes?: ReadonlyArray<SharedGtGteKey_e658e64c>;
|
|
44
44
|
readonly createdAt?: SharedGtGteLt_d9a61361;
|
|
45
45
|
readonly executionDeadline?: SharedGtGteLt_d9a61361;
|
|
46
|
-
readonly failureCategory?:
|
|
46
|
+
readonly failureCategory?: 'application' | 'timeout' | 'cancellation' | 'resource' | 'system' | ReadonlyArray<'application' | 'timeout' | 'cancellation' | 'resource' | 'system'>;
|
|
47
47
|
readonly idPrefix?: string;
|
|
48
48
|
readonly limit?: number;
|
|
49
49
|
readonly offset?: number;
|
|
50
50
|
readonly parentWorkflowExecutionToken?: string;
|
|
51
51
|
readonly parentWorkflowId?: string;
|
|
52
52
|
readonly scheduleId?: string;
|
|
53
|
-
readonly status?:
|
|
53
|
+
readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended' | ReadonlyArray<'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended'>;
|
|
54
54
|
readonly tags?: ReadonlyArray<string>;
|
|
55
55
|
readonly type?: string;
|
|
56
56
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
@@ -76,7 +76,7 @@ export type ClientOperationTypes = {
|
|
|
76
76
|
readonly token: string;
|
|
77
77
|
};
|
|
78
78
|
readonly output: {
|
|
79
|
-
readonly ok:
|
|
79
|
+
readonly ok: true;
|
|
80
80
|
};
|
|
81
81
|
readonly faults: 'InvalidParams' | 'NotFound';
|
|
82
82
|
};
|
|
@@ -89,7 +89,7 @@ export type ClientOperationTypes = {
|
|
|
89
89
|
readonly token: string;
|
|
90
90
|
};
|
|
91
91
|
readonly output: {
|
|
92
|
-
readonly ok:
|
|
92
|
+
readonly ok: true;
|
|
93
93
|
};
|
|
94
94
|
readonly faults: 'InvalidParams' | 'NotFound';
|
|
95
95
|
};
|
|
@@ -98,10 +98,10 @@ export type ClientOperationTypes = {
|
|
|
98
98
|
readonly output: {
|
|
99
99
|
readonly items: ReadonlyArray<{
|
|
100
100
|
readonly currentValue: number;
|
|
101
|
-
readonly firedAt:
|
|
101
|
+
readonly firedAt: number | null;
|
|
102
102
|
readonly metric: 'workflow.failure_rate' | 'activity.p99_duration' | 'storage.size';
|
|
103
103
|
readonly threshold: number;
|
|
104
|
-
readonly window:
|
|
104
|
+
readonly window: string | null;
|
|
105
105
|
}>;
|
|
106
106
|
};
|
|
107
107
|
readonly faults: never;
|
|
@@ -128,7 +128,7 @@ export type ClientOperationTypes = {
|
|
|
128
128
|
readonly workflowId?: unknown;
|
|
129
129
|
};
|
|
130
130
|
readonly output: {
|
|
131
|
-
readonly ok:
|
|
131
|
+
readonly ok: true;
|
|
132
132
|
};
|
|
133
133
|
readonly faults: 'NotFound';
|
|
134
134
|
};
|
|
@@ -147,7 +147,34 @@ export type ClientOperationTypes = {
|
|
|
147
147
|
readonly workflowId?: string;
|
|
148
148
|
};
|
|
149
149
|
readonly output: {
|
|
150
|
-
readonly items: ReadonlyArray<
|
|
150
|
+
readonly items: ReadonlyArray<{
|
|
151
|
+
readonly allowPartial: boolean;
|
|
152
|
+
readonly artifact: unknown;
|
|
153
|
+
readonly createdAt: number;
|
|
154
|
+
readonly reviewId: string;
|
|
155
|
+
readonly reviewType: string;
|
|
156
|
+
readonly reviewers: ReadonlyArray<string>;
|
|
157
|
+
readonly status: 'pending';
|
|
158
|
+
readonly timeout?: number;
|
|
159
|
+
readonly webhookUrl?: string;
|
|
160
|
+
readonly workflowId: string;
|
|
161
|
+
} | {
|
|
162
|
+
readonly allowPartial: boolean;
|
|
163
|
+
readonly artifact: unknown;
|
|
164
|
+
readonly createdAt: number;
|
|
165
|
+
readonly decision: 'approved' | 'rejected' | 'needs-changes';
|
|
166
|
+
readonly feedback?: string;
|
|
167
|
+
readonly reviewId: string;
|
|
168
|
+
readonly reviewType: string;
|
|
169
|
+
readonly reviewer: string;
|
|
170
|
+
readonly reviewers: ReadonlyArray<string>;
|
|
171
|
+
readonly sectionDecisions?: Record<string, unknown>;
|
|
172
|
+
readonly status: 'completed';
|
|
173
|
+
readonly timeout?: number;
|
|
174
|
+
readonly timestamp: number;
|
|
175
|
+
readonly webhookUrl?: string;
|
|
176
|
+
readonly workflowId: string;
|
|
177
|
+
}>;
|
|
151
178
|
};
|
|
152
179
|
readonly faults: never;
|
|
153
180
|
};
|
|
@@ -256,7 +283,7 @@ export type ClientOperationTypes = {
|
|
|
256
283
|
readonly output: {
|
|
257
284
|
readonly method: 'jwt' | 'api-key' | 'mtls' | 'stdio-local' | 'unauthenticated';
|
|
258
285
|
readonly scopes: ReadonlyArray<'workflows:read' | 'workflows:write' | 'workflows:admin' | 'schedules:read' | 'schedules:write' | 'signals:write' | 'updates:write' | 'queries:read' | 'reviews:read' | 'reviews:write' | 'attributes:read' | 'attributes:write' | 'tags:write' | 'streams:read' | 'events:read' | 'storage:read' | 'storage:write' | 'storage:admin' | 'workers:write' | 'system:read' | 'system:admin'>;
|
|
259
|
-
readonly subject:
|
|
286
|
+
readonly subject: string | null;
|
|
260
287
|
};
|
|
261
288
|
readonly faults: never;
|
|
262
289
|
};
|
|
@@ -264,7 +291,7 @@ export type ClientOperationTypes = {
|
|
|
264
291
|
readonly input: {};
|
|
265
292
|
readonly output: {
|
|
266
293
|
readonly activities: unknown;
|
|
267
|
-
readonly registryVersion:
|
|
294
|
+
readonly registryVersion: 1;
|
|
268
295
|
readonly workflows: unknown;
|
|
269
296
|
};
|
|
270
297
|
readonly faults: never;
|
|
@@ -276,8 +303,8 @@ export type ClientOperationTypes = {
|
|
|
276
303
|
readonly backlog: number;
|
|
277
304
|
readonly connectedWorkers: number;
|
|
278
305
|
readonly inFlight: number;
|
|
279
|
-
readonly oldestEnqueuedAt:
|
|
280
|
-
readonly oldestQueuedAgeMs:
|
|
306
|
+
readonly oldestEnqueuedAt: number | null;
|
|
307
|
+
readonly oldestQueuedAgeMs: number | null;
|
|
281
308
|
readonly queue: string;
|
|
282
309
|
readonly schedulingPolicy: 'priority' | 'fifo' | 'lifo';
|
|
283
310
|
readonly waitingPollers: number;
|
|
@@ -287,18 +314,20 @@ export type ClientOperationTypes = {
|
|
|
287
314
|
};
|
|
288
315
|
'weft.tasks.diagnostics': {
|
|
289
316
|
readonly input: {
|
|
317
|
+
readonly includeExpectedDelayed: boolean;
|
|
290
318
|
readonly limit: number;
|
|
291
319
|
readonly operationId?: string;
|
|
292
320
|
readonly queue?: string;
|
|
293
321
|
readonly retryStormMinimumAttempts: number;
|
|
294
322
|
readonly staleHeartbeatAfterMs: number;
|
|
295
323
|
readonly staleQueuedAfterMs: number;
|
|
324
|
+
readonly unadoptedAfterMs: number;
|
|
296
325
|
readonly workflowId?: string;
|
|
297
326
|
};
|
|
298
327
|
readonly output: {
|
|
299
328
|
readonly items: ReadonlyArray<{
|
|
300
329
|
readonly activityName?: string;
|
|
301
|
-
readonly deadLetterReason?:
|
|
330
|
+
readonly deadLetterReason?: 'result-resolution-storage-exhausted';
|
|
302
331
|
readonly deadLetteredAt?: number;
|
|
303
332
|
readonly evidence: ReadonlyArray<string>;
|
|
304
333
|
readonly executionLatencyMs?: number;
|
|
@@ -316,14 +345,35 @@ export type ClientOperationTypes = {
|
|
|
316
345
|
readonly storageError?: string;
|
|
317
346
|
readonly workerId?: string;
|
|
318
347
|
readonly workflowId?: string;
|
|
348
|
+
} | {
|
|
349
|
+
readonly availableAt: number;
|
|
350
|
+
readonly evidence: ReadonlyArray<string>;
|
|
351
|
+
readonly kind: 'delayed';
|
|
352
|
+
readonly operationId: string;
|
|
353
|
+
readonly queue: string;
|
|
354
|
+
readonly requeueCount: number;
|
|
355
|
+
readonly retryCount: number;
|
|
356
|
+
readonly state: 'queued';
|
|
357
|
+
readonly workflowId?: string;
|
|
358
|
+
} | {
|
|
359
|
+
readonly adopted: false;
|
|
360
|
+
readonly evidence: ReadonlyArray<string>;
|
|
361
|
+
readonly kind: 'unadopted-terminal';
|
|
362
|
+
readonly operationId: string;
|
|
363
|
+
readonly queue: string;
|
|
364
|
+
readonly state: 'resolved';
|
|
365
|
+
readonly terminalAt: number;
|
|
366
|
+
readonly workflowId?: string;
|
|
319
367
|
}>;
|
|
320
368
|
readonly limit: number;
|
|
321
369
|
readonly summary: {
|
|
322
370
|
readonly allWorkersAtCapacity: number;
|
|
323
371
|
readonly deadLettered: number;
|
|
372
|
+
readonly delayed: number;
|
|
324
373
|
readonly retryStorms: number;
|
|
325
374
|
readonly staleInflight: number;
|
|
326
375
|
readonly stuckQueued: number;
|
|
376
|
+
readonly unadoptedTerminal: number;
|
|
327
377
|
};
|
|
328
378
|
};
|
|
329
379
|
readonly faults: never;
|
|
@@ -333,7 +383,7 @@ export type ClientOperationTypes = {
|
|
|
333
383
|
readonly operationId: string;
|
|
334
384
|
};
|
|
335
385
|
readonly output: {
|
|
336
|
-
readonly ok:
|
|
386
|
+
readonly ok: true;
|
|
337
387
|
};
|
|
338
388
|
readonly faults: 'NotFound';
|
|
339
389
|
};
|
|
@@ -371,7 +421,29 @@ export type ClientOperationTypes = {
|
|
|
371
421
|
readonly workerId: string;
|
|
372
422
|
};
|
|
373
423
|
readonly output: {
|
|
374
|
-
readonly worker:
|
|
424
|
+
readonly worker: {
|
|
425
|
+
readonly deploymentVersion: {
|
|
426
|
+
readonly artifactDigest: string;
|
|
427
|
+
readonly buildId: string;
|
|
428
|
+
readonly deploymentName: string;
|
|
429
|
+
readonly manifestDigest: string;
|
|
430
|
+
readonly manifestVersion: number;
|
|
431
|
+
readonly protocolVersion: number;
|
|
432
|
+
readonly runtimeName: string;
|
|
433
|
+
readonly runtimeVersion: string;
|
|
434
|
+
readonly sdkVersion: string;
|
|
435
|
+
readonly workflows: Record<string, unknown>;
|
|
436
|
+
};
|
|
437
|
+
readonly instance: {
|
|
438
|
+
readonly connectedAt: number;
|
|
439
|
+
readonly health: 'active' | 'draining' | 'drained';
|
|
440
|
+
readonly heartbeatAgeMs: number;
|
|
441
|
+
readonly lastHeartbeatAt: number;
|
|
442
|
+
readonly queue: string;
|
|
443
|
+
readonly startedAt: number;
|
|
444
|
+
readonly workerId: string;
|
|
445
|
+
};
|
|
446
|
+
} | null;
|
|
375
447
|
};
|
|
376
448
|
readonly faults: never;
|
|
377
449
|
};
|
|
@@ -388,14 +460,14 @@ export type ClientOperationTypes = {
|
|
|
388
460
|
readonly output: {
|
|
389
461
|
readonly deployments: ReadonlyArray<{
|
|
390
462
|
readonly activeWorkers: number;
|
|
391
|
-
readonly buildId:
|
|
392
|
-
readonly deploymentName:
|
|
463
|
+
readonly buildId: string | null;
|
|
464
|
+
readonly deploymentName: string | null;
|
|
393
465
|
readonly drainedWorkers: number;
|
|
394
466
|
readonly drainingWorkers: number;
|
|
395
467
|
readonly health: 'active' | 'draining' | 'drained';
|
|
396
468
|
readonly inFlight: number;
|
|
397
|
-
readonly oldestStartedAt:
|
|
398
|
-
readonly runtimeVersion:
|
|
469
|
+
readonly oldestStartedAt: number | null;
|
|
470
|
+
readonly runtimeVersion: string | null;
|
|
399
471
|
readonly workers: number;
|
|
400
472
|
}>;
|
|
401
473
|
readonly items: ReadonlyArray<{
|
|
@@ -467,14 +539,16 @@ export type ClientOperationTypes = {
|
|
|
467
539
|
readonly attributes?: ReadonlyArray<SharedGtGteKey_e658e64c>;
|
|
468
540
|
readonly createdAt?: SharedGtGteLt_d9a61361;
|
|
469
541
|
readonly executionDeadline?: SharedGtGteLt_d9a61361;
|
|
470
|
-
readonly failureCategory?:
|
|
471
|
-
readonly groupBy:
|
|
542
|
+
readonly failureCategory?: 'application' | 'timeout' | 'cancellation' | 'resource' | 'system' | ReadonlyArray<'application' | 'timeout' | 'cancellation' | 'resource' | 'system'>;
|
|
543
|
+
readonly groupBy: 'status' | 'type' | 'failureCategory' | {
|
|
544
|
+
readonly attribute: string;
|
|
545
|
+
};
|
|
472
546
|
readonly idPrefix?: string;
|
|
473
547
|
readonly limit?: number;
|
|
474
548
|
readonly parentWorkflowExecutionToken?: string;
|
|
475
549
|
readonly parentWorkflowId?: string;
|
|
476
550
|
readonly scheduleId?: string;
|
|
477
|
-
readonly status?:
|
|
551
|
+
readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended' | ReadonlyArray<'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended'>;
|
|
478
552
|
readonly tags?: ReadonlyArray<string>;
|
|
479
553
|
readonly type?: string;
|
|
480
554
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
@@ -482,7 +556,7 @@ export type ClientOperationTypes = {
|
|
|
482
556
|
readonly output: {
|
|
483
557
|
readonly groups: ReadonlyArray<{
|
|
484
558
|
readonly count: number;
|
|
485
|
-
readonly key:
|
|
559
|
+
readonly key: string | null;
|
|
486
560
|
}>;
|
|
487
561
|
readonly total: number;
|
|
488
562
|
readonly truncated: boolean;
|
|
@@ -502,22 +576,22 @@ export type ClientOperationTypes = {
|
|
|
502
576
|
readonly workflowId: string;
|
|
503
577
|
};
|
|
504
578
|
readonly output: {
|
|
505
|
-
readonly ok:
|
|
579
|
+
readonly ok: true;
|
|
506
580
|
};
|
|
507
581
|
readonly faults: never;
|
|
508
582
|
};
|
|
509
583
|
'weft.workflows.bulk.cancel': {
|
|
510
|
-
readonly input:
|
|
584
|
+
readonly input: SharedAttributesBulkConcurrenc_0f0d07d6;
|
|
511
585
|
readonly output: unknown;
|
|
512
586
|
readonly faults: never;
|
|
513
587
|
};
|
|
514
588
|
'weft.workflows.bulk.delete': {
|
|
515
|
-
readonly input:
|
|
589
|
+
readonly input: SharedAttributesBulkConcurrenc_0f0d07d6;
|
|
516
590
|
readonly output: unknown;
|
|
517
591
|
readonly faults: 'Unprocessable';
|
|
518
592
|
};
|
|
519
593
|
'weft.workflows.bulk.retryfailed': {
|
|
520
|
-
readonly input:
|
|
594
|
+
readonly input: SharedAttributesBulkConcurrenc_0f0d07d6;
|
|
521
595
|
readonly output: unknown;
|
|
522
596
|
readonly faults: never;
|
|
523
597
|
};
|
|
@@ -529,7 +603,7 @@ export type ClientOperationTypes = {
|
|
|
529
603
|
readonly createdAt?: SharedGtGteLt_d9a61361;
|
|
530
604
|
readonly dryRun?: boolean;
|
|
531
605
|
readonly executionDeadline?: SharedGtGteLt_d9a61361;
|
|
532
|
-
readonly failureCategory?:
|
|
606
|
+
readonly failureCategory?: 'application' | 'timeout' | 'cancellation' | 'resource' | 'system' | ReadonlyArray<'application' | 'timeout' | 'cancellation' | 'resource' | 'system'>;
|
|
533
607
|
readonly idPrefix?: string;
|
|
534
608
|
readonly limit?: number;
|
|
535
609
|
readonly name: string;
|
|
@@ -539,7 +613,7 @@ export type ClientOperationTypes = {
|
|
|
539
613
|
readonly payload?: unknown;
|
|
540
614
|
readonly requestId?: string;
|
|
541
615
|
readonly scheduleId?: string;
|
|
542
|
-
readonly status?:
|
|
616
|
+
readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended' | ReadonlyArray<'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed-out' | 'suspended'>;
|
|
543
617
|
readonly tags?: ReadonlyArray<string>;
|
|
544
618
|
readonly type?: string;
|
|
545
619
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
@@ -552,7 +626,7 @@ export type ClientOperationTypes = {
|
|
|
552
626
|
readonly bulkConcurrency?: number;
|
|
553
627
|
readonly confirmationToken?: string;
|
|
554
628
|
readonly dryRun?: boolean;
|
|
555
|
-
readonly filter?:
|
|
629
|
+
readonly filter?: SharedAttributesCreatedAtExecu_47f8e20e;
|
|
556
630
|
readonly operation: 'add' | 'remove';
|
|
557
631
|
readonly requestId?: string;
|
|
558
632
|
readonly tags: ReadonlyArray<string>;
|
|
@@ -618,15 +692,15 @@ export type ClientOperationTypes = {
|
|
|
618
692
|
readonly attributes?: ReadonlyArray<SharedGtGteKey_e658e64c>;
|
|
619
693
|
readonly createdAt?: SharedGtGteLt_d9a61361;
|
|
620
694
|
readonly executionDeadline?: SharedGtGteLt_d9a61361;
|
|
621
|
-
readonly failureCategory?:
|
|
695
|
+
readonly failureCategory?: string | ReadonlyArray<string>;
|
|
622
696
|
readonly idPrefix?: string;
|
|
623
|
-
readonly include?:
|
|
697
|
+
readonly include?: string | ReadonlyArray<string>;
|
|
624
698
|
readonly limit?: number;
|
|
625
699
|
readonly offset?: number;
|
|
626
700
|
readonly parentWorkflowExecutionToken?: string;
|
|
627
701
|
readonly parentWorkflowId?: string;
|
|
628
702
|
readonly scheduleId?: string;
|
|
629
|
-
readonly status?:
|
|
703
|
+
readonly status?: string | ReadonlyArray<string>;
|
|
630
704
|
readonly tags?: ReadonlyArray<string>;
|
|
631
705
|
readonly type?: string;
|
|
632
706
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
@@ -635,7 +709,7 @@ export type ClientOperationTypes = {
|
|
|
635
709
|
readonly faults: 'Unprocessable';
|
|
636
710
|
};
|
|
637
711
|
'weft.workflows.purge': {
|
|
638
|
-
readonly input:
|
|
712
|
+
readonly input: SharedAttributesCreatedAtExecu_47f8e20e;
|
|
639
713
|
readonly output: unknown;
|
|
640
714
|
readonly faults: never;
|
|
641
715
|
};
|
|
@@ -650,7 +724,7 @@ export type ClientOperationTypes = {
|
|
|
650
724
|
};
|
|
651
725
|
'weft.workflows.replay': {
|
|
652
726
|
readonly input: {
|
|
653
|
-
readonly step:
|
|
727
|
+
readonly step: string | number;
|
|
654
728
|
readonly workflowId: string;
|
|
655
729
|
};
|
|
656
730
|
readonly output: unknown;
|
|
@@ -676,7 +750,10 @@ export type ClientOperationTypes = {
|
|
|
676
750
|
readonly input: {
|
|
677
751
|
readonly workflowId: string;
|
|
678
752
|
};
|
|
679
|
-
readonly output:
|
|
753
|
+
readonly output: {
|
|
754
|
+
readonly occurrence?: number;
|
|
755
|
+
readonly scheduleId: string;
|
|
756
|
+
} | null;
|
|
680
757
|
readonly faults: never;
|
|
681
758
|
};
|
|
682
759
|
'weft.workflows.signal': {
|
|
@@ -687,7 +764,7 @@ export type ClientOperationTypes = {
|
|
|
687
764
|
readonly workflowId: string;
|
|
688
765
|
};
|
|
689
766
|
readonly output: {
|
|
690
|
-
readonly ok:
|
|
767
|
+
readonly ok: true;
|
|
691
768
|
};
|
|
692
769
|
readonly faults: 'NotFound';
|
|
693
770
|
};
|
|
@@ -754,7 +831,7 @@ export type ClientOperationTypes = {
|
|
|
754
831
|
readonly workflowId: string;
|
|
755
832
|
};
|
|
756
833
|
readonly output: {
|
|
757
|
-
readonly ok:
|
|
834
|
+
readonly ok: true;
|
|
758
835
|
};
|
|
759
836
|
readonly faults: 'NotFound' | 'Unprocessable';
|
|
760
837
|
};
|
|
@@ -764,7 +841,7 @@ export type ClientOperationTypes = {
|
|
|
764
841
|
readonly workflowId: string;
|
|
765
842
|
};
|
|
766
843
|
readonly output: {
|
|
767
|
-
readonly ok:
|
|
844
|
+
readonly ok: true;
|
|
768
845
|
};
|
|
769
846
|
readonly faults: 'NotFound' | 'Unprocessable';
|
|
770
847
|
};
|
package/dist/cli/help-text.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const HELP_TEXT = "\nweft - Bun-native durable execution engine\n\nUsage: weft [command] [options]\n\nCommands:\n serve Start the Weft server (default)\n doctor Run diagnostics on the Weft database\n conformance Run RemoteWorker protocol conformance checks\n schedule Manage recurring schedules\n timeline Inspect workflow timeline and replay history\n version:check Check workflow version compatibility\n validate Lint workflow definitions for design-time anti-patterns\n codegen Generate TypeScript declarations from a registry snapshot\n api Inspect and invoke catalog operations on a running server\n server Inspect a running server's health and operation surface\n workflow List, inspect, start, signal, and cancel workflows on a server\n tail Stream a workflow's events as Server-Sent Events\n completions Generate or install shell completion scripts\n version Print the installed Weft version\n\nVersion (leading token only; a subcommand owns its own option line):\n weft version | weft --version | weft -v Print the installed Weft version\n\nServe Options:\n -p, --port <port> Server port (default: 7233)\n -d, --database <path> Database file path (default: ./weft.db)\n -s, --storage <backend> Storage backend: sqlite, lmdb, memory (default: sqlite)\n -w, --workflows <path> Path to workflow module to register on startup\n --console Mount @lostgradient/weft-
|
|
1
|
+
export declare const HELP_TEXT = "\nweft - Bun-native durable execution engine\n\nUsage: weft [command] [options]\n\nCommands:\n serve Start the Weft server (default)\n doctor Run diagnostics on the Weft database\n conformance Run RemoteWorker protocol conformance checks\n schedule Manage recurring schedules\n timeline Inspect workflow timeline and replay history\n version:check Check workflow version compatibility\n validate Lint workflow definitions for design-time anti-patterns\n codegen Generate TypeScript declarations from a registry snapshot\n api Inspect and invoke catalog operations on a running server\n server Inspect a running server's health and operation surface\n workflow List, inspect, start, signal, and cancel workflows on a server\n tail Stream a workflow's events as Server-Sent Events\n completions Generate or install shell completion scripts\n version Print the installed Weft version\n\nVersion (leading token only; a subcommand owns its own option line):\n weft version | weft --version | weft -v Print the installed Weft version\n\nServe Options:\n -p, --port <port> Server port (default: 7233)\n -d, --database <path> Database file path (default: ./weft.db)\n -s, --storage <backend> Storage backend: sqlite, lmdb, memory (default: sqlite)\n -w, --workflows <path> Path to workflow module to register on startup\n --console Mount @lostgradient/weft-ui\n -h, --help Show this help message\n";
|
|
2
2
|
export declare const API_HELP_TEXT = "\nweft api - Inspect and invoke catalog operations on a running server\n\nUsage:\n weft api --list [options]\n weft api --describe <operation-name> [options]\n weft api <operation-name> [--input <json> | --input-file <path|->] [options]\n\nOptions:\n --server <url> Server URL (default: WEFT_ADDR, profile, run lockfile, or localhost)\n --token <token> Bearer token (default: WEFT_TOKEN)\n --profile <name> Profile from ~/.weft/config (default: WEFT_PROFILE or default_profile)\n --input <json> JSON object input for the operation\n --input-file <path> Read JSON object input from a file, or '-' for stdin\n --list List catalog operations\n --describe <name> Print one operation's schema and metadata\n --yes Confirm destructive operations without prompting\n -j, --json Emit machine-readable JSON output\n -h, --help Show this help message\n\nExit codes:\n 0 Success\n 1 Operation failed or destructive operation was not confirmed\n 2 Connection error\n 3 Usage or input validation error\n";
|
|
3
3
|
export declare const CONFORMANCE_HELP_TEXT = "\nweft conformance - Run RemoteWorker protocol conformance checks\n\nUsage: weft conformance [options] -- <worker-command> [args...]\n\nThe worker command receives:\n WEFT_WORKER_URL\n WEFT_WORKER_QUEUE\n WEFT_WORKER_ACTIVITIES\n WEFT_WORKER_PROTOCOL_VERSION\n\nOptions:\n --timeout <ms> Per-check timeout in milliseconds (default: 15000)\n -j, --json Output results as JSON\n -h, --help Show this help message\n";
|
|
4
4
|
export declare const DOCTOR_HELP_TEXT = "\nweft doctor - Run diagnostics on the Weft database\n\nUsage: weft doctor [options]\n\nOptions:\n -d, --database <path> Database file path (default: ./weft.db)\n -j, --json Output results as JSON\n -h, --help Show this help message\n";
|
package/dist/cli/help-text.js
CHANGED
|
@@ -27,7 +27,7 @@ Serve Options:
|
|
|
27
27
|
-d, --database <path> Database file path (default: ./weft.db)
|
|
28
28
|
-s, --storage <backend> Storage backend: sqlite, lmdb, memory (default: sqlite)
|
|
29
29
|
-w, --workflows <path> Path to workflow module to register on startup
|
|
30
|
-
--console Mount @lostgradient/weft-
|
|
30
|
+
--console Mount @lostgradient/weft-ui
|
|
31
31
|
-h, --help Show this help message
|
|
32
32
|
`, API_HELP_TEXT = `
|
|
33
33
|
weft api - Inspect and invoke catalog operations on a running server
|
|
@@ -38,7 +38,7 @@ export function createHttpClientStorage(baseUrl, headers) {
|
|
|
38
38
|
await requestResponse(baseUrl, `/storage/${encodeURIComponent(key)}`, headers, {
|
|
39
39
|
method: "PUT",
|
|
40
40
|
headers: { "content-type": "application/octet-stream" },
|
|
41
|
-
body: new Blob([value])
|
|
41
|
+
body: new Blob([new Uint8Array(value)])
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
44
|
async delete(key) {
|
|
@@ -588,5 +588,27 @@ export declare class Engine<TWorkflows extends object = DefaultWorkflowRegistry,
|
|
|
588
588
|
* files in the same program. Removing the registry-typed members entirely,
|
|
589
589
|
* rather than widening their generic arguments, avoids the recursive
|
|
590
590
|
* comparison altogether.)
|
|
591
|
+
*
|
|
592
|
+
* @example Retain an engine with a concrete workflow registry behind a host-facing type
|
|
593
|
+
* ```ts
|
|
594
|
+
* import {
|
|
595
|
+
* Engine,
|
|
596
|
+
* MemoryStorage,
|
|
597
|
+
* workflow,
|
|
598
|
+
* type RegistryAgnosticEngine,
|
|
599
|
+
* } from '@lostgradient/weft';
|
|
600
|
+
*
|
|
601
|
+
* const greeting = workflow({ name: 'greeting' }).execute(async function* () {
|
|
602
|
+
* return 'hello';
|
|
603
|
+
* });
|
|
604
|
+
*
|
|
605
|
+
* const engine: RegistryAgnosticEngine = await Engine.create({
|
|
606
|
+
* storage: new MemoryStorage(),
|
|
607
|
+
* workflows: { greeting },
|
|
608
|
+
* });
|
|
609
|
+
*
|
|
610
|
+
* void engine.start;
|
|
611
|
+
* void engine.startOrSignal;
|
|
612
|
+
* ```
|
|
591
613
|
*/
|
|
592
614
|
export type RegistryAgnosticEngine = Omit<Engine, 'register' | 'registerWorkflows'>;
|
package/dist/http.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function*
|
|
2
|
-
`);$=R.pop()??"";for(let w of R)yield w}if($+=_.decode(),$.length>0)yield $}finally{if(!H)try{await Y.cancel()}catch{}Y.releaseLock()}}function q(F){let Q=[];for(let Y=0;Y<F.length;Y+=512)Q.push(String.fromCharCode(...F.subarray(Y,Y+512)));return btoa(Q.join(""))}function C(F){let Q=atob(F),Y=new Uint8Array(Q.length);for(let _=0;_<Q.length;_+=1)Y[_]=Q.charCodeAt(_);return Y}function D(F){return typeof F==="object"&&F!==null&&!Array.isArray(F)}async function L(F,Q){return await F.get(Q)!==null}async function*G(F,Q,Y){for await(let[_]of F.scan(Q,Y))yield _}async function U(F,Q){let Y=0;for await(let _ of G(F,Q))Y++;return Y}async function E(F,Q){let Y=[];for await(let _ of G(F,Q))Y.push({type:"delete",key:_});if(Y.length===0)return 0;return await F.batch(Y),Y.length}async function N(F,Q,Y){let _=[];for await(let $ of G(F,Q,Y))_.push({type:"delete",key:$});if(_.length===0)return 0;return await F.batch(_),_.length}function P(F,Q,Y){if(!F.capabilities()[Q])throw Error(`Feature "${Y}" requires storage capability "${Q}", but this storage backend does not provide it.`)}var K="default";function Z(F){return encodeURIComponent(F)}var O={workflowOwnerEpoch:(F)=>`wf-owner-epoch:${Z(F)}`,workflowOwnerHolder:(F)=>`wf-owner-holder:${Z(F)}`,ownershipModeMarker:()=>"ownership-mode-marker"};var W=1e4;class b extends Error{code="StorageBatchOperationLimitExceededError";cap=W;count;target;constructor(F,Q){super(`${F} count ${Q} exceeds MAX_BATCH_OPERATIONS (${W}).`);this.name="StorageBatchOperationLimitExceededError",this.target=F,this.count=Q}}function X(F,Q){if(Q>W)throw new b(F,Q)}function v(F){return F.length>0?F.slice(0,-1)+String.fromCharCode(F.charCodeAt(F.length-1)+1):"ÿ"}function LF(F,Q={}){if(Q.gt!==void 0&&F<=Q.gt)return!1;if(Q.gte!==void 0&&F<Q.gte)return!1;if(Q.lt!==void 0&&F>=Q.lt)return!1;if(Q.lte!==void 0&&F>Q.lte)return!1;return!0}function UF(F,Q){if(F===null||Q===null)return F===Q;if(F.byteLength!==Q.byteLength)return!1;for(let Y=0;Y<F.byteLength;Y++)if(F[Y]!==Q[Y])return!1;return!0}async function h(F,Q){if(F.has)return F.has(Q);return L(F,Q)}function m(F,Q,Y){if(F.keys)return F.keys(Q,Y);return G(F,Q,Y)}async function x(F,Q){if(F.count)return F.count(Q);return U(F,Q)}async function y(F,Q){if(F.deletePrefix)return F.deletePrefix(Q);return E(F,Q)}async function c(F,Q,Y){if(X("conditionalBatch conditions",Q.length),X("conditionalBatch operations",Y.length),P(F,"conditionalBatch","storageConditionalBatch"),!F.conditionalBatch)throw Error("This storage backend reports conditionalBatch capability but does not implement the conditionalBatch() method.");return F.conditionalBatch(Q,Y)}var J=(F)=>String(F).padStart(16,"0"),f="0",l="1",S=(F,Q,Y,_)=>`sig:${Z(F)}:${Z(Q)}:${_}:${Z(Y)}`,EF={workflow:(F)=>`wf:${Z(F)}`,checkpoint:(F)=>`wf:${Z(F)}:ckpt`,checkpointHistory:(F,Q)=>`wf:${Z(F)}:ckpt:${String(Q).padStart(10,"0")}`,timelinePrefix:(F)=>`wf:${Z(F)}:timeline:`,timeline:(F,Q)=>`wf:${Z(F)}:timeline:${String(Q).padStart(10,"0")}`,schedule:(F)=>`schedule:${Z(F)}`,scheduleTick:(F,Q)=>`schedule-due:${String(F).padStart(16,"0")}:${Z(Q)}`,scheduleRun:(F)=>`schedule-run:${Z(F)}`,scheduleRunLink:(F)=>`schedule-run-link:${Z(F)}`,scheduleRunBySchedulePrefix:(F)=>`schedule-run-by-schedule:${Z(F)}:`,scheduleRunBySchedule:(F,Q)=>`schedule-run-by-schedule:${Z(F)}:${Z(Q)}`,operation:(F,Q,Y)=>`op:${F}:${J(Q)}:${Y}`,operationInflight:(F)=>`op:inflight:${F}`,operationQueued:(F)=>`op:queued:${F}`,operationResolved:(F)=>`op:resolved:${F}`,bulkOperationAuditPrefix:()=>"audit:bulk:",bulkOperationAudit:(F,Q,Y)=>`audit:bulk:${J(F)}:${Z(Q)}:${Z(Y)}`,operationResolvedByTimePrefix:()=>"op:resolved-by-time:",operationResolvedByTime:(F,Q)=>`op:resolved-by-time:${J(F)}:${Z(Q)}`,asyncActivity:(F,Q)=>`async-act:v1:${Z(F)}:${Z(Q)}`,asyncActivityResolution:(F,Q)=>`async-act:v1:${Z(F)}:${Z(Q)}:resolution`,activityReconciliationPrefix:(F)=>`actrec:v1:${Z(F)}:`,activityReconciliation:(F,Q,Y)=>`actrec:v1:${Z(F)}:${Z(Q)}:${Y}`,eventPrefix:(F)=>`ev:${Z(F)}:`,event:(F,Q)=>`ev:${Z(F)}:${String(Q).padStart(10,"0")}`,eventHead:(F)=>`ev:${Z(F)}:head`,eventWatermark:(F)=>`ev:${Z(F)}:watermark`,fleetEventPrefix:()=>"fleet-event:",fleetEvent:(F)=>`fleet-event:${String(F).padStart(10,"0")}`,fleetEventTail:()=>"fleet-event-tail",fleetEventByWorkflowPrefix:(F)=>`fleet-event-by-workflow:${Z(F)}:`,fleetEventByWorkflow:(F,Q)=>`fleet-event-by-workflow:${Z(F)}:${String(Q).padStart(10,"0")}`,signal:(F,Q,Y)=>S(F,Q,Y,l),startSignal:(F,Q,Y)=>S(F,Q,Y,f),signalSequence:(F)=>`sigseq:v1:${Z(F)}`,signalAcceptedResponsePrefix:(F)=>`sigres:v1:${Z(F)}:`,signalAcceptedResponse:(F,Q,Y)=>`sigres:v1:${Z(F)}:${Z(Q)}:${Z(Y)}`,deadline:(F,Q)=>`wf-deadline:${J(F)}:${Z(Q)}`,terminalCleanup:(F,Q)=>`wf-cleanup:${J(F)}:${Z(Q)}`,teardownTimer:(F,Q)=>`wf-teardown:${J(F)}:${Z(Q)}`,delayedStart:(F,Q)=>`wf-delayed:${J(F)}:${Z(Q)}`,terminalWorkflowPrefix:()=>"wf-terminal:",terminalWorkflow:(F,Q)=>`wf-terminal:${J(F)}:${Z(Q)}`,attribute:(F)=>`attr:${Z(F)}`,attributeIndex:(F,Q,Y)=>`idx:${F}:${Q}:${Z(Y)}`,tagIndex:(F,Q)=>`tag:${Z(F)}:${Z(Q)}`,updatePrefix:(F)=>`upd:${Z(F)}:`,update:(F,Q)=>`upd:${Z(F)}:${Q}`,updateResponse:(F)=>`upr:${F}`,updateIdempotency:(F,Q)=>`upk:${Z(F)}:${Q}`,startIdempotency:(F)=>`start-idem:${Z(F)}`,startIdempotencySignalId:(F)=>`start-idem:${F}`,livenessPrefix:()=>"liveness:",liveness:(F)=>`liveness:${Z(F)}`,leasePrefix:()=>"lease:",leaseEpoch:()=>"lease:epoch",leaseHolder:()=>"lease:holder",...O,budget:(F,Q,Y)=>`budget:${F}:${Q}:${Y}`,review:(F,Q)=>`review:${Z(F)}:${Q}`,workflowHeaders:(F)=>`wf-headers:${Z(F)}`,childCancellationPrefix:(F)=>`child-cancel:${Z(F)}:`,childCancellation:(F,Q)=>`child-cancel:${Z(F)}:${Z(Q)}`,childWorkflowByParentPrefix:(F,Q)=>`child-by-parent:${Z(F)}:${Q===void 0?"":`${Z(Q)}:`}`,childWorkflowByParent:(F,Q,Y)=>`child-by-parent:${Z(F)}:${Q===void 0?"":`${Z(Q)}:`}${Z(Y)}`,terminalCleanupNeeded:(F)=>`wf-cleanup-needed:${Z(F)}`,workflowConcurrency:(F,Q)=>`wf-concurrency:${Z(F)}:${Z(Q)}`,workflowConcurrencyHolder:(F)=>`wf-concurrency-holder:${Z(F)}`,workflowHasServices:(F)=>`wf-has-services:${Z(F)}`,finalizerState:(F)=>`wf-finalizer-state:${Z(F)}`,teardownOwed:(F)=>`wf-teardown-needed:${Z(F)}`,teardownSucceeded:(F)=>`wf-teardown-succeeded:${Z(F)}`,teardownDeadLetter:(F)=>`wf-teardown-deadletter:${Z(F)}`,offload:(F,Q)=>`offload:${Z(F)}:${Q}`,archive:(F,Q)=>`archive:${Z(F)}:${Q}`,stateExecution:(F,Q)=>`state:execution:${Z(F)}:${Z(Q)}`,stateWorkflow:(F,Q)=>`state:workflow-scope:${K}:${Z(F)}:${Z(Q)}`,streamChunkPrefix:(F,Q)=>`blob:${Z(F)}:${Q}:chunk:`,streamChunk:(F,Q,Y)=>`blob:${Z(F)}:${Q}:chunk:${String(Y).padStart(10,"0")}`,streamTail:(F,Q)=>`blob:${Z(F)}:${Q}:tail`,streamMetadata:(F,Q)=>`blob:${Z(F)}:${Q}:meta`,budgetCharged:(F)=>`budget-charged:${F}`,toolEffect:(F,Q,Y)=>`tool-effect:${Z(F)}:${Q}:${Y}`,workflowVisibilityStatus:(F,Q)=>`wf-idx-status:${Z(F)}:${Z(Q)}`,workflowVisibilityType:(F,Q)=>`wf-idx-type:${Z(F)}:${Z(Q)}`,workflowVisibilityCreated:(F,Q)=>`wf-idx-created:${J(F)}:${Z(Q)}`,workflowVisibilityUpdated:(F,Q)=>`wf-idx-updated:${J(F)}:${Z(Q)}`,workflowVisibilityDeadline:(F,Q)=>`wf-idx-deadline:${J(F)}:${Z(Q)}`,workflowVisibilityManifest:(F)=>`wf-idx-manifest:${Z(F)}`,workflowVisibilityMetaVersion:()=>"wf-idx-meta:version",workflowVisibilityMetaBuiltAt:()=>"wf-idx-meta:built-at",workflowVisibilityMetaCursor:()=>"wf-idx-meta:cursor"};function d(F){if(F===void 0)return;if(typeof F!=="number"||!Number.isInteger(F)||F<0)throw Error("deleteRange limit must be a finite non-negative integer");return F===0?0:F}function j(F){let Q={},Y=!1;for(let $ of["gt","gte","lt","lte"]){let M=F[$];if(M===void 0)continue;if(typeof M!=="string")throw Error("deleteRange bounds must be strings");Q[$]=M,Y=!0}if(!Y)throw Error("deleteRange requires at least one of gt/gte/lt/lte; use deletePrefix to delete a whole prefix");let _=d(F.limit);if(_!==void 0)Q.limit=_;return Q}async function I(F,Q,Y){let _=j(Y);if(F.deleteRange)return F.deleteRange(Q,_);return N(F,Q,_)}function p(F,Q){let Y={key:F,open:!1};if(Q.gte!==void 0&&Q.gte>Y.key)Y.key=Q.gte,Y.open=!1;if(Q.gt!==void 0&&Q.gt>=Y.key)Y.key=Q.gt,Y.open=!0;return Y}function a(F,Q){let Y={key:v(F),open:!0};if(Q.lt!==void 0&&Q.lt<=Y.key)Y.key=Q.lt,Y.open=!0;if(Q.lte!==void 0&&Q.lte<Y.key)Y.key=Q.lte,Y.open=!1;return Y}function WF(F,Q){let Y=p(F,Q),_=a(F,Q);if(Y.key>_.key||Y.key===_.key&&(Y.open||_.open))return null;return{lower:Y,upper:_}}function z(F){return F.replaceAll(/:+$/g,"")}function s(F,Q){let Y=z(F),_=z(Q);if(Y.length===0)return _;if(_.length===0)return Y;return`${Y}:${_}`}class A{#F;#Y;constructor(F,Q){this.#F=F,this.#Y=z(Q)}#Q(F){if(this.#Y.length===0)return F;return F.length===0?`${this.#Y}:`:`${this.#Y}:${F}`}#_(F){return F.map((Q)=>{if(Q.type==="put")return{type:"put",key:this.#Q(Q.key),value:Q.value};return{type:"delete",key:this.#Q(Q.key)}})}#$(F){if(this.#Y.length===0)return F;return F.slice(this.#Y.length+1)}#J(F){let Q={};if(F.limit!==void 0)Q.limit=F.limit;if(F.gt!==void 0)Q.gt=this.#Q(F.gt);if(F.gte!==void 0)Q.gte=this.#Q(F.gte);if(F.lt!==void 0)Q.lt=this.#Q(F.lt);if(F.lte!==void 0)Q.lte=this.#Q(F.lte);return Q}#Z(F={}){let Q=this.#J(F);if(F.reverse!==void 0)Q.reverse=F.reverse;return Q}#M(F){return this.#J(F)}capabilities(){return this.#F.capabilities()}scoped(F){return new A(this.#F,s(this.#Y,F))}async get(F){return this.#F.get(this.#Q(F))}async put(F,Q){await this.#F.put(this.#Q(F),Q)}async delete(F){await this.#F.delete(this.#Q(F))}async*scan(F,Q){for await(let[Y,_]of this.#F.scan(this.#Q(F),this.#Z(Q)))yield[this.#$(Y),_]}async batch(F){X("batch operations",F.length),await this.#F.batch(this.#_(F))}async conditionalBatch(F,Q){return c(this.#F,F.map((Y)=>({key:this.#Q(Y.key),expectedValue:Y.expectedValue})),this.#_(Q))}async has(F){return h(this.#F,this.#Q(F))}async deletePrefix(F){return y(this.#F,this.#Q(F))}async deleteRange(F,Q){let Y=this.#M(j(Q));return I(this.#F,this.#Q(F),Y)}async*keys(F,Q){for await(let Y of m(this.#F,this.#Q(F),this.#Z(Q)))yield this.#$(Y)}async count(F){return x(this.#F,this.#Q(F))}[Symbol.dispose](){this.#F[Symbol.dispose]()}}function g(F,Q){return new A(F,Q)}var n=67108864;function u(F){if(F.type==="put")return{type:"put",key:F.key,value:q(F.value)};return{type:"delete",key:F.key}}function i(F){return{key:F.key,expectedValue:F.expectedValue===null?null:q(F.expectedValue)}}function t(F){if(!D(F)||typeof F.key!=="string"||typeof F.value!=="string")throw Error("HTTPStorage scan response contained an invalid NDJSON entry.");return{key:F.key,value:F.value}}function r(F){if(!D(F)||typeof F.applied!=="boolean")throw Error('HTTPStorage conditional batch response must include a boolean "applied" field.');return F.applied}function V(F,Q,Y){if(Y!==void 0)F.searchParams.set(Q,String(Y))}function o(F){if(F.trim().length===0)return null;let Q=t(JSON.parse(F));return[Q.key,C(Q.value)]}class e{#F;#Y;#Q;constructor(F){this.#F=F.baseUrl instanceof URL?F.baseUrl:new URL(F.baseUrl),this.#Y={...F.headers},this.#Q=F.remoteConditionalBatch??!1}capabilities(){return{persistence:"remote",readAfterWrite:"eventual",scanConsistency:"best-effort",atomicBatch:!0,conditionalBatch:this.#Q,boundedRangeDelete:!1}}#_(F){let Q=this.#F.href.endsWith("/")?this.#F.href:`${this.#F.href}/`;return new URL(F.replace(/^\/+/,""),Q)}#$(F){return this.#_(`/v1/storage/${encodeURIComponent(F)}`)}#J(F,Q){let Y=this.#_("/v1/storage");return Y.searchParams.set("prefix",F),V(Y,"limit",Q.limit),V(Y,"reverse",Q.reverse),V(Y,"gt",Q.gt),V(Y,"gte",Q.gte),V(Y,"lt",Q.lt),V(Y,"lte",Q.lte),Y}async#Z(F,Q={},Y=[]){let _=new Headers(this.#Y);for(let[M,H]of new Headers(Q.headers).entries())_.set(M,H);let $=await fetch(F,{...Q,headers:_});if(!$.ok&&!Y.includes($.status))throw Error(`HTTPStorage request failed: ${Q.method??"GET"} ${F.pathname} returned ${String($.status)}.`);return $}async get(F){let Q=await this.#Z(this.#$(F),{method:"GET"},[404]);if(Q.status===404)return null;return new Uint8Array(await Q.arrayBuffer())}async put(F,Q){await this.#Z(this.#$(F),{method:"PUT",headers:{"content-type":"application/octet-stream"},body:new Blob([Q])})}async delete(F){await this.#Z(this.#$(F),{method:"DELETE"})}async*scan(F,Q={}){let Y=await this.#Z(this.#J(F,Q),{method:"GET",headers:{accept:"application/x-ndjson"}});for await(let _ of T(Y,{maximumBytes:n,sizeLimitError:()=>Error("HTTPStorage scan response exceeded the maximum allowed size.")})){let $=o(_);if($!==null)yield $}}async batch(F){X("batch operations",F.length),await this.#Z(this.#_("/v1/storage/-/batch"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({operations:F.map(u)})})}async conditionalBatch(F,Q){X("conditionalBatch conditions",F.length),X("conditionalBatch operations",Q.length);let Y=await this.#Z(this.#_("/v1/storage/-/conditional-batch"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({conditions:F.map(i),operations:Q.map(u)})});return r(await Y.json())}has(F){return L(this,F)}async*keys(F,Q){yield*G(this,F,Q)}count(F){return U(this,F)}deletePrefix(F){return E(this,F)}deleteRange(F,Q){return N(this,F,j(Q))}scoped(F){return g(this,F)}[Symbol.dispose](){}}export{e as HTTPStorage};
|
|
1
|
+
async function*O(e,t){if(e.body===null)return;let n=e.body.getReader(),i=new TextDecoder,o="",s=0,u=!1;try{while(!0){let{done:K,value:R}=await n.read();if(K){u=!0;break}if(s+=R.byteLength,s>t.maximumBytes)throw t.sizeLimitError();o+=i.decode(R,{stream:!0});let B=o.split(`
|
|
2
|
+
`);o=B.pop()??"";for(let V of B)yield V}if(o+=i.decode(),o.length>0)yield o}finally{if(!u)try{await n.cancel()}catch{}n.releaseLock()}}function m(e){let t=[];for(let n=0;n<e.length;n+=512)t.push(String.fromCharCode(...e.subarray(n,n+512)));return btoa(t.join(""))}function C(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i+=1)n[i]=t.charCodeAt(i);return n}function b(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}async function p(e,t){return await e.get(t)!==null}async function*c(e,t,n){for await(let[i]of e.scan(t,n))yield i}async function f(e,t){let n=0;for await(let i of c(e,t))n++;return n}async function y(e,t){let n=[];for await(let i of c(e,t))n.push({type:"delete",key:i});if(n.length===0)return 0;return await e.batch(n),n.length}async function h(e,t,n){let i=[];for await(let o of c(e,t,n))i.push({type:"delete",key:o});if(i.length===0)return 0;return await e.batch(i),i.length}function P(e,t,n){if(!e.capabilities()[t])throw Error(`Feature "${n}" requires storage capability "${t}", but this storage backend does not provide it.`)}var k="default";function r(e){return encodeURIComponent(e)}var v={workflowOwnerEpoch:(e)=>`wf-owner-epoch:${r(e)}`,workflowOwnerHolder:(e)=>`wf-owner-holder:${r(e)}`,ownershipModeMarker:()=>"ownership-mode-marker"};var S=1e4;class E extends Error{code="StorageBatchOperationLimitExceededError";cap=S;count;target;constructor(e,t){super(`${e} count ${t} exceeds MAX_BATCH_OPERATIONS (${S}).`);this.name="StorageBatchOperationLimitExceededError",this.target=e,this.count=t}}function l(e,t){if(t>S)throw new E(e,t)}function A(e){return e.length>0?e.slice(0,-1)+String.fromCharCode(e.charCodeAt(e.length-1)+1):"ÿ"}function fe(e,t={}){if(t.gt!==void 0&&e<=t.gt)return!1;if(t.gte!==void 0&&e<t.gte)return!1;if(t.lt!==void 0&&e>=t.lt)return!1;if(t.lte!==void 0&&e>t.lte)return!1;return!0}function ye(e,t){if(e===null||t===null)return e===t;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}async function D(e,t){if(e.has)return e.has(t);return p(e,t)}function U(e,t,n){if(e.keys)return e.keys(t,n);return c(e,t,n)}async function I(e,t){if(e.count)return e.count(t);return f(e,t)}async function L(e,t){if(e.deletePrefix)return e.deletePrefix(t);return y(e,t)}async function _(e,t,n){if(l("conditionalBatch conditions",t.length),l("conditionalBatch operations",n.length),P(e,"conditionalBatch","storageConditionalBatch"),!e.conditionalBatch)throw Error("This storage backend reports conditionalBatch capability but does not implement the conditionalBatch() method.");return e.conditionalBatch(t,n)}var a=(e)=>String(e).padStart(16,"0"),q="0",M="1",T=(e,t,n,i)=>`sig:${r(e)}:${r(t)}:${i}:${r(n)}`,he={workflow:(e)=>`wf:${r(e)}`,checkpoint:(e)=>`wf:${r(e)}:ckpt`,checkpointHistory:(e,t)=>`wf:${r(e)}:ckpt:${String(t).padStart(10,"0")}`,timelinePrefix:(e)=>`wf:${r(e)}:timeline:`,timeline:(e,t)=>`wf:${r(e)}:timeline:${String(t).padStart(10,"0")}`,schedule:(e)=>`schedule:${r(e)}`,scheduleTick:(e,t)=>`schedule-due:${String(e).padStart(16,"0")}:${r(t)}`,scheduleRun:(e)=>`schedule-run:${r(e)}`,scheduleRunLink:(e)=>`schedule-run-link:${r(e)}`,scheduleRunBySchedulePrefix:(e)=>`schedule-run-by-schedule:${r(e)}:`,scheduleRunBySchedule:(e,t)=>`schedule-run-by-schedule:${r(e)}:${r(t)}`,operation:(e,t,n)=>`op:${e}:${a(t)}:${n}`,operationInflight:(e)=>`op:inflight:${e}`,operationQueued:(e)=>`op:queued:${e}`,operationResolved:(e)=>`op:resolved:${e}`,bulkOperationAuditPrefix:()=>"audit:bulk:",bulkOperationAudit:(e,t,n)=>`audit:bulk:${a(e)}:${r(t)}:${r(n)}`,operationResolvedByTimePrefix:()=>"op:resolved-by-time:",operationResolvedByTime:(e,t)=>`op:resolved-by-time:${a(e)}:${r(t)}`,asyncActivity:(e,t)=>`async-act:v1:${r(e)}:${r(t)}`,asyncActivityResolution:(e,t)=>`async-act:v1:${r(e)}:${r(t)}:resolution`,activityReconciliationPrefix:(e)=>`actrec:v1:${r(e)}:`,activityReconciliation:(e,t,n)=>`actrec:v1:${r(e)}:${r(t)}:${n}`,eventPrefix:(e)=>`ev:${r(e)}:`,event:(e,t)=>`ev:${r(e)}:${String(t).padStart(10,"0")}`,eventHead:(e)=>`ev:${r(e)}:head`,eventWatermark:(e)=>`ev:${r(e)}:watermark`,fleetEventPrefix:()=>"fleet-event:",fleetEvent:(e)=>`fleet-event:${String(e).padStart(10,"0")}`,fleetEventTail:()=>"fleet-event-tail",fleetEventByWorkflowPrefix:(e)=>`fleet-event-by-workflow:${r(e)}:`,fleetEventByWorkflow:(e,t)=>`fleet-event-by-workflow:${r(e)}:${String(t).padStart(10,"0")}`,signal:(e,t,n)=>T(e,t,n,M),startSignal:(e,t,n)=>T(e,t,n,q),signalSequence:(e)=>`sigseq:v1:${r(e)}`,signalAcceptedResponsePrefix:(e)=>`sigres:v1:${r(e)}:`,signalAcceptedResponse:(e,t,n)=>`sigres:v1:${r(e)}:${r(t)}:${r(n)}`,deadline:(e,t)=>`wf-deadline:${a(e)}:${r(t)}`,terminalCleanup:(e,t)=>`wf-cleanup:${a(e)}:${r(t)}`,teardownTimer:(e,t)=>`wf-teardown:${a(e)}:${r(t)}`,delayedStart:(e,t)=>`wf-delayed:${a(e)}:${r(t)}`,terminalWorkflowPrefix:()=>"wf-terminal:",terminalWorkflow:(e,t)=>`wf-terminal:${a(e)}:${r(t)}`,attribute:(e)=>`attr:${r(e)}`,attributeIndex:(e,t,n)=>`idx:${e}:${t}:${r(n)}`,tagIndex:(e,t)=>`tag:${r(e)}:${r(t)}`,updatePrefix:(e)=>`upd:${r(e)}:`,update:(e,t)=>`upd:${r(e)}:${t}`,updateResponse:(e)=>`upr:${e}`,updateIdempotency:(e,t)=>`upk:${r(e)}:${t}`,startIdempotency:(e)=>`start-idem:${r(e)}`,startIdempotencySignalId:(e)=>`start-idem:${e}`,livenessPrefix:()=>"liveness:",liveness:(e)=>`liveness:${r(e)}`,leasePrefix:()=>"lease:",leaseEpoch:()=>"lease:epoch",leaseHolder:()=>"lease:holder",...v,budget:(e,t,n)=>`budget:${e}:${t}:${n}`,review:(e,t)=>`review:${r(e)}:${t}`,workflowHeaders:(e)=>`wf-headers:${r(e)}`,childCancellationPrefix:(e)=>`child-cancel:${r(e)}:`,childCancellation:(e,t)=>`child-cancel:${r(e)}:${r(t)}`,childWorkflowByParentPrefix:(e,t)=>`child-by-parent:${r(e)}:${t===void 0?"":`${r(t)}:`}`,childWorkflowByParent:(e,t,n)=>`child-by-parent:${r(e)}:${t===void 0?"":`${r(t)}:`}${r(n)}`,terminalCleanupNeeded:(e)=>`wf-cleanup-needed:${r(e)}`,workflowConcurrency:(e,t)=>`wf-concurrency:${r(e)}:${r(t)}`,workflowConcurrencyHolder:(e)=>`wf-concurrency-holder:${r(e)}`,workflowHasServices:(e)=>`wf-has-services:${r(e)}`,finalizerState:(e)=>`wf-finalizer-state:${r(e)}`,teardownOwed:(e)=>`wf-teardown-needed:${r(e)}`,teardownSucceeded:(e)=>`wf-teardown-succeeded:${r(e)}`,teardownDeadLetter:(e)=>`wf-teardown-deadletter:${r(e)}`,offload:(e,t)=>`offload:${r(e)}:${t}`,archive:(e,t)=>`archive:${r(e)}:${t}`,stateExecution:(e,t)=>`state:execution:${r(e)}:${r(t)}`,stateWorkflow:(e,t)=>`state:workflow-scope:${k}:${r(e)}:${r(t)}`,streamChunkPrefix:(e,t)=>`blob:${r(e)}:${t}:chunk:`,streamChunk:(e,t,n)=>`blob:${r(e)}:${t}:chunk:${String(n).padStart(10,"0")}`,streamTail:(e,t)=>`blob:${r(e)}:${t}:tail`,streamMetadata:(e,t)=>`blob:${r(e)}:${t}:meta`,budgetCharged:(e)=>`budget-charged:${e}`,toolEffect:(e,t,n)=>`tool-effect:${r(e)}:${t}:${n}`,workflowVisibilityStatus:(e,t)=>`wf-idx-status:${r(e)}:${r(t)}`,workflowVisibilityType:(e,t)=>`wf-idx-type:${r(e)}:${r(t)}`,workflowVisibilityCreated:(e,t)=>`wf-idx-created:${a(e)}:${r(t)}`,workflowVisibilityUpdated:(e,t)=>`wf-idx-updated:${a(e)}:${r(t)}`,workflowVisibilityDeadline:(e,t)=>`wf-idx-deadline:${a(e)}:${r(t)}`,workflowVisibilityManifest:(e)=>`wf-idx-manifest:${r(e)}`,workflowVisibilityMetaVersion:()=>"wf-idx-meta:version",workflowVisibilityMetaBuiltAt:()=>"wf-idx-meta:built-at",workflowVisibilityMetaCursor:()=>"wf-idx-meta:cursor"};function W(e){if(e===void 0)return;if(typeof e!=="number"||!Number.isInteger(e)||e<0)throw Error("deleteRange limit must be a finite non-negative integer");return e===0?0:e}function d(e){let t={},n=!1;for(let o of["gt","gte","lt","lte"]){let s=e[o];if(s===void 0)continue;if(typeof s!=="string")throw Error("deleteRange bounds must be strings");t[o]=s,n=!0}if(!n)throw Error("deleteRange requires at least one of gt/gte/lt/lte; use deletePrefix to delete a whole prefix");let i=W(e.limit);if(i!==void 0)t.limit=i;return t}async function N(e,t,n){let i=d(n);if(e.deleteRange)return e.deleteRange(t,i);return h(e,t,i)}function j(e,t){let n={key:e,open:!1};if(t.gte!==void 0&&t.gte>n.key)n.key=t.gte,n.open=!1;if(t.gt!==void 0&&t.gt>=n.key)n.key=t.gt,n.open=!0;return n}function G(e,t){let n={key:A(e),open:!0};if(t.lt!==void 0&&t.lt<=n.key)n.key=t.lt,n.open=!0;if(t.lte!==void 0&&t.lte<n.key)n.key=t.lte,n.open=!1;return n}function we(e,t){let n=j(e,t),i=G(e,t);if(n.key>i.key||n.key===i.key&&(n.open||i.open))return null;return{lower:n,upper:i}}function w(e){return e.replaceAll(/:+$/g,"")}function F(e,t){let n=w(e),i=w(t);if(n.length===0)return i;if(i.length===0)return n;return`${n}:${i}`}class x{#e;#n;constructor(e,t){this.#e=e,this.#n=w(t)}#t(e){if(this.#n.length===0)return e;return e.length===0?`${this.#n}:`:`${this.#n}:${e}`}#i(e){return e.map((t)=>{if(t.type==="put")return{type:"put",key:this.#t(t.key),value:t.value};return{type:"delete",key:this.#t(t.key)}})}#o(e){if(this.#n.length===0)return e;return e.slice(this.#n.length+1)}#a(e){let t={};if(e.limit!==void 0)t.limit=e.limit;if(e.gt!==void 0)t.gt=this.#t(e.gt);if(e.gte!==void 0)t.gte=this.#t(e.gte);if(e.lt!==void 0)t.lt=this.#t(e.lt);if(e.lte!==void 0)t.lte=this.#t(e.lte);return t}#r(e={}){let t=this.#a(e);if(e.reverse!==void 0)t.reverse=e.reverse;return t}#s(e){return this.#a(e)}capabilities(){return this.#e.capabilities()}scoped(e){return new x(this.#e,F(this.#n,e))}async get(e){return this.#e.get(this.#t(e))}async put(e,t){await this.#e.put(this.#t(e),t)}async delete(e){await this.#e.delete(this.#t(e))}async*scan(e,t){for await(let[n,i]of this.#e.scan(this.#t(e),this.#r(t)))yield[this.#o(n),i]}async batch(e){l("batch operations",e.length),await this.#e.batch(this.#i(e))}async conditionalBatch(e,t){return _(this.#e,e.map((n)=>({key:this.#t(n.key),expectedValue:n.expectedValue})),this.#i(t))}async has(e){return D(this.#e,this.#t(e))}async deletePrefix(e){return L(this.#e,this.#t(e))}async deleteRange(e,t){let n=this.#s(d(t));return N(this.#e,this.#t(e),n)}async*keys(e,t){for await(let n of U(this.#e,this.#t(e),this.#r(t)))yield this.#o(n)}async count(e){return I(this.#e,this.#t(e))}[Symbol.dispose](){this.#e[Symbol.dispose]()}}function H(e,t){return new x(e,t)}var Y=67108864;function z(e){if(e.type==="put")return{type:"put",key:e.key,value:m(e.value)};return{type:"delete",key:e.key}}function X(e){return{key:e.key,expectedValue:e.expectedValue===null?null:m(e.expectedValue)}}function J(e){if(!b(e)||typeof e.key!=="string"||typeof e.value!=="string")throw Error("HTTPStorage scan response contained an invalid NDJSON entry.");return{key:e.key,value:e.value}}function Z(e){if(!b(e)||typeof e.applied!=="boolean")throw Error('HTTPStorage conditional batch response must include a boolean "applied" field.');return e.applied}function g(e,t,n){if(n!==void 0)e.searchParams.set(t,String(n))}function Q(e){if(e.trim().length===0)return null;let t=J(JSON.parse(e));return[t.key,C(t.value)]}class ee{#e;#n;#t;constructor(e){this.#e=e.baseUrl instanceof URL?e.baseUrl:new URL(e.baseUrl),this.#n={...e.headers},this.#t=e.remoteConditionalBatch??!1}capabilities(){return{persistence:"remote",readAfterWrite:"eventual",scanConsistency:"best-effort",atomicBatch:!0,conditionalBatch:this.#t,boundedRangeDelete:!1}}#i(e){let t=this.#e.href.endsWith("/")?this.#e.href:`${this.#e.href}/`;return new URL(e.replace(/^\/+/,""),t)}#o(e){return this.#i(`/v1/storage/${encodeURIComponent(e)}`)}#a(e,t){let n=this.#i("/v1/storage");return n.searchParams.set("prefix",e),g(n,"limit",t.limit),g(n,"reverse",t.reverse),g(n,"gt",t.gt),g(n,"gte",t.gte),g(n,"lt",t.lt),g(n,"lte",t.lte),n}async#r(e,t={},n=[]){let i=new Headers(this.#n);for(let[s,u]of new Headers(t.headers).entries())i.set(s,u);let o=await fetch(e,{...t,headers:i});if(!o.ok&&!n.includes(o.status))throw Error(`HTTPStorage request failed: ${t.method??"GET"} ${e.pathname} returned ${String(o.status)}.`);return o}async get(e){let t=await this.#r(this.#o(e),{method:"GET"},[404]);if(t.status===404)return null;return new Uint8Array(await t.arrayBuffer())}async put(e,t){await this.#r(this.#o(e),{method:"PUT",headers:{"content-type":"application/octet-stream"},body:new Blob([new Uint8Array(t)])})}async delete(e){await this.#r(this.#o(e),{method:"DELETE"})}async*scan(e,t={}){let n=await this.#r(this.#a(e,t),{method:"GET",headers:{accept:"application/x-ndjson"}});for await(let i of O(n,{maximumBytes:Y,sizeLimitError:()=>Error("HTTPStorage scan response exceeded the maximum allowed size.")})){let o=Q(i);if(o!==null)yield o}}async batch(e){l("batch operations",e.length),await this.#r(this.#i("/v1/storage/-/batch"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({operations:e.map(z)})})}async conditionalBatch(e,t){l("conditionalBatch conditions",e.length),l("conditionalBatch operations",t.length);let n=await this.#r(this.#i("/v1/storage/-/conditional-batch"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({conditions:e.map(X),operations:t.map(z)})});return Z(await n.json())}has(e){return p(this,e)}async*keys(e,t){yield*c(this,e,t)}count(e){return f(this,e)}deletePrefix(e){return y(this,e)}deleteRange(e,t){return h(this,e,d(t))}scoped(e){return H(this,e)}[Symbol.dispose](){}}export{ee as HTTPStorage};
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type { FaultCode } from './core/fault-code.ts';
|
|
|
23
23
|
export { DurableActivityScopeError, DurableActivityUnsupportedError, durableActivity, } from './core/context/durable-activity.ts';
|
|
24
24
|
export { ActivityReconciliationCapabilityError, ActivityReconciliationConflictError, ActivityReconciliationIndeterminateError, ActivityResolutionError, AsyncActivityTokenNotFoundError, BulkDeleteRequiresTerminalWorkflowsError, BulkOperationConfirmationError, ENGINE_LEASE_LOST_WARNING_NAME, ENGINE_LEASE_SYNCHRONOUS_DISPOSE_WARNING_NAME, Engine, EngineCreateNameMismatchError, EngineDisposalError, EngineDisposedError, EngineLeaseAcquisitionTimeoutError, EngineLeaseCorruptedError, EngineLeaseNotHeldError, IdempotencyKeyPurgedError, PersistedDataIncompatibleError, ScheduleHandle, StartOrSignalConflictError, WorkflowAlreadyExistsError, WorkflowConcurrencyLimitExceededError, WorkflowHandle, WorkflowNotFoundError, WorkflowNotRegisteredError, WorkflowSuspendNotSupportedError, WorkflowTeardownPendingError, WorkflowTypeNotRegisteredForRecoveryError, } from './core/engine';
|
|
25
25
|
export { OwnershipModeMismatchError, WORKFLOW_CLAIM_LOST_WARNING_NAME, WORKFLOW_WAKE_DISCARDED_WARNING_NAME, WeftWorkflowClaimLostWarning, WeftWorkflowWakeDiscardedWarning, WorkflowClaimUnavailableError, } from './core/engine';
|
|
26
|
-
export type { EngineCreateOptions, EngineLeaseHealth, EngineStateNamespace, LeaseLostReason, RecoverAllOptions, RecoveredWorkflowInfo, WorkflowWakeKind, } from './core/engine';
|
|
26
|
+
export type { EngineCreateOptions, EngineLeaseHealth, EngineStateNamespace, LeaseLostReason, RecoverAllOptions, RecoveredWorkflowInfo, RegistryAgnosticEngine, WorkflowWakeKind, } from './core/engine';
|
|
27
27
|
export { DEFAULT_CHECKPOINT_SIZE_WARNING_THRESHOLD, DEFAULT_MAX_NESTING_DEPTH, DEFAULT_POLL_INTERVAL_MS, DEFAULT_RETRY_POLICY, DEFAULT_VISIBILITY_TIMEOUT_MS, HISTORY_CIRCUIT_BREAKER_REASON, WorkflowBuilderError, query, schedule, signal, update, workflow, } from './core/types';
|
|
28
28
|
export type { ActivityArgsFor, ActivityCallOptions, ActivityCallable, ActivityContext, ActivityDefinition, ActivityEntryInput, ActivityFunction, ActivityMap, ActivityMapInput, ActivityObjectInput, ActivityResultFor, ActivityVerificationContext, ActivityVerificationPhase, ActivityVerificationResult, AnyActivityDefinition, AnyWorkflowDefinition, ArchiveAdapter, BuilderState, BuiltWorkflowDefinition, BulkCancelResult, BulkDeleteResult, BulkOperationAction, BulkOperationAuditEvent, BulkOperationCommitOptions, BulkOperationDryRunOptions, BulkOperationDryRunResult, BulkOperationError, BulkOperationFilterSummary, BulkOperationOptions, BulkOperationPrincipal, BulkOperationScopeSummary, BulkRetryFailedResult, BulkSignalAllCommitOptions, BulkSignalAllDryRunOptions, BulkSignalAllOptions, BulkSignalResult, BulkTagResult, Checkpoint, CheckpointState, CheckpointSummary, CompletedReviewEntry, CoordinatedUpdateResult, DefinitionSchema, Duration, EngineOptions, FailureCategory, ForkLineage, ForkOptions, HistoryPolicy, InferActivityEntries, InferActivityEntry, InferWorkflowEntries, InferWorkflowEntry, InitialBuilderState, LaunchMetadata, ListFilter, ListOptions, MarkBuilderState, NormalizeActivities, NormalizedActivityEntry, NormalizedRetentionPolicy, PaginatedResult, PayloadSizePolicy, PendingAsyncActivityInfo, PendingAsyncActivityListOptions, PendingAsyncActivityPage, PendingReviewEntry, PurgeResult, QueryDefinition, QueryMap, QueryShape, RegisteredWorkflowDefinition, RestartLineage, RetentionOverview, RetentionPolicy, RetryPolicy, ReviewDecision, ReviewListEntry, ReviewListFilter, ReviewStatus, ScheduleDefinition, ScheduleFilter, ScheduleOptions, ScheduleOverlapPolicy, ScheduleQueuedRun, ScheduleSpec, ScheduleState, ScheduleStatus, ScheduleSummary, ScheduleUpdateOptions, SearchAttributeDefinition, SearchAttributeHandle, SearchAttributeSchema, SearchAttributeValue, Serializer, SignalDefinition, SignalDeliveryOptions, SignalMap, SignalPayload, StartOptions, StartOrSignalOptions, StartOrSignalSignal, SubmitReviewOptions, TerminationReason, UpdateDefinition, UpdateMap, UpdatePayload, WorkerReplayOperationFailure, WorkerReplayOperationSignature, WorkflowAlreadyRegistered, WorkflowAtomicState, WorkflowAtomicStateOptions, WorkflowBuilder, WorkflowBuilderOptions, WorkflowConcurrencyOptions, WorkflowContext, WorkflowDefinition, WorkflowEvent, WorkflowFinalizerStatus, WorkflowFunction, WorkflowGenerator, WorkflowId, WorkflowKeyedRaceResult, WorkflowLogLevel, WorkflowLogRecord, WorkflowLogger, WorkflowRegistry, WorkflowReplay, WorkflowScheduleProvenance, WorkflowServicesResolution, WorkflowServicesResolverInfo, WorkflowServicesResolverLaunchOptions, WorkflowServicesResolverScheduleInfo, WorkflowSessionState, WorkflowSnapshot, WorkflowState, WorkflowStateNamespace, WorkflowStatus, WorkflowSummary, WorkflowTimelineEntry, WorkflowTimelineOperationDetail, WorkflowTimelineStatus, WorkflowTypeRetentionPolicy, } from './core/types';
|
|
29
29
|
export { AlertManager } from './alerting/index';
|