ai-workflows 2.1.3 → 2.4.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +14 -1
- package/README.md +2 -0
- package/dist/barrier.d.ts +6 -0
- package/dist/barrier.d.ts.map +1 -1
- package/dist/barrier.js +45 -7
- package/dist/barrier.js.map +1 -1
- package/dist/cascade-context.d.ts.map +1 -1
- package/dist/cascade-context.js +25 -25
- package/dist/cascade-context.js.map +1 -1
- package/dist/cascade-executor.d.ts.map +1 -1
- package/dist/cascade-executor.js +1 -1
- package/dist/cascade-executor.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +23 -7
- package/dist/context.js.map +1 -1
- package/dist/cron-parser.d.ts +65 -0
- package/dist/cron-parser.d.ts.map +1 -0
- package/dist/cron-parser.js +294 -0
- package/dist/cron-parser.js.map +1 -0
- package/dist/cron-scheduler.d.ts +117 -0
- package/dist/cron-scheduler.d.ts.map +1 -0
- package/dist/cron-scheduler.js +176 -0
- package/dist/cron-scheduler.js.map +1 -0
- package/dist/database-context.d.ts +184 -0
- package/dist/database-context.d.ts.map +1 -0
- package/dist/database-context.js +428 -0
- package/dist/database-context.js.map +1 -0
- package/dist/digital-objects-adapter.d.ts +159 -0
- package/dist/digital-objects-adapter.d.ts.map +1 -0
- package/dist/digital-objects-adapter.js +229 -0
- package/dist/digital-objects-adapter.js.map +1 -0
- package/dist/durable-execution-cloudflare.d.ts +427 -0
- package/dist/durable-execution-cloudflare.d.ts.map +1 -0
- package/dist/durable-execution-cloudflare.js +510 -0
- package/dist/durable-execution-cloudflare.js.map +1 -0
- package/dist/durable-execution.d.ts +482 -0
- package/dist/durable-execution.d.ts.map +1 -0
- package/dist/durable-execution.js +594 -0
- package/dist/durable-execution.js.map +1 -0
- package/dist/durable-workflow.d.ts +176 -0
- package/dist/durable-workflow.d.ts.map +1 -0
- package/dist/durable-workflow.js +552 -0
- package/dist/durable-workflow.js.map +1 -0
- package/dist/graph/topological-sort.d.ts.map +1 -1
- package/dist/graph/topological-sort.js +5 -5
- package/dist/graph/topological-sort.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +101 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +115 -0
- package/dist/logger.js.map +1 -0
- package/dist/on.d.ts.map +1 -1
- package/dist/on.js +3 -3
- package/dist/on.js.map +1 -1
- package/dist/runtime.d.ts +169 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +275 -0
- package/dist/runtime.js.map +1 -0
- package/dist/send.d.ts.map +1 -1
- package/dist/send.js +4 -3
- package/dist/send.js.map +1 -1
- package/dist/telemetry.d.ts +150 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +388 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/timer-registry.d.ts +25 -0
- package/dist/timer-registry.d.ts.map +1 -1
- package/dist/timer-registry.js +42 -8
- package/dist/timer-registry.js.map +1 -1
- package/dist/types.d.ts +17 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/worker/durable-step.d.ts +481 -0
- package/dist/worker/durable-step.d.ts.map +1 -0
- package/dist/worker/durable-step.js +606 -0
- package/dist/worker/durable-step.js.map +1 -0
- package/dist/worker/index.d.ts +106 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/index.js +124 -0
- package/dist/worker/index.js.map +1 -0
- package/dist/worker/state-adapter.d.ts +230 -0
- package/dist/worker/state-adapter.d.ts.map +1 -0
- package/dist/worker/state-adapter.js +409 -0
- package/dist/worker/state-adapter.js.map +1 -0
- package/dist/worker/topological-executor.d.ts +282 -0
- package/dist/worker/topological-executor.d.ts.map +1 -0
- package/dist/worker/topological-executor.js +396 -0
- package/dist/worker/topological-executor.js.map +1 -0
- package/dist/worker/workflow-builder.d.ts +286 -0
- package/dist/worker/workflow-builder.d.ts.map +1 -0
- package/dist/worker/workflow-builder.js +565 -0
- package/dist/worker/workflow-builder.js.map +1 -0
- package/dist/worker.d.ts +800 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +2428 -0
- package/dist/worker.js.map +1 -0
- package/dist/workflow-builder.d.ts +287 -0
- package/dist/workflow-builder.d.ts.map +1 -0
- package/dist/workflow-builder.js +762 -0
- package/dist/workflow-builder.js.map +1 -0
- package/dist/workflow.d.ts +14 -30
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +132 -292
- package/dist/workflow.js.map +1 -1
- package/examples/01-ecommerce-order-pipeline.ts +358 -0
- package/examples/02-content-moderation-cascade.ts +454 -0
- package/examples/03-scheduled-reporting-dependencies.ts +479 -0
- package/examples/04-database-persistence.ts +518 -0
- package/examples/README.md +173 -0
- package/package.json +30 -13
- package/src/__tests__/digital-objects-adapter.test.ts +274 -0
- package/src/__tests__/durable-workflow.test.ts +297 -0
- package/src/barrier.ts +48 -7
- package/src/cascade-context.ts +36 -29
- package/src/cascade-executor.ts +3 -2
- package/src/context.ts +41 -12
- package/src/cron-parser.ts +347 -0
- package/src/cron-scheduler.ts +239 -0
- package/src/database-context.ts +658 -0
- package/src/digital-objects-adapter.ts +351 -0
- package/src/durable-execution-cloudflare.ts +855 -0
- package/src/durable-execution.ts +1042 -0
- package/src/durable-workflow.ts +717 -0
- package/src/graph/topological-sort.ts +6 -8
- package/src/index.ts +69 -0
- package/src/logger.ts +148 -0
- package/src/on.ts +8 -9
- package/src/runtime.ts +436 -0
- package/src/send.ts +4 -5
- package/src/telemetry.ts +577 -0
- package/src/timer-registry.ts +44 -10
- package/src/types.ts +32 -17
- package/src/worker/durable-step.ts +976 -0
- package/src/worker/index.ts +216 -0
- package/src/worker/state-adapter.ts +589 -0
- package/src/worker/topological-executor.ts +625 -0
- package/src/worker/workflow-builder.ts +871 -0
- package/src/worker.ts +2906 -0
- package/src/workflow-builder.ts +1068 -0
- package/src/workflow.ts +188 -351
- package/test/barrier-join.test.ts +32 -24
- package/test/cascade-executor.test.ts +9 -16
- package/test/cron-parser.test.ts +314 -0
- package/test/cron-scheduler.test.ts +291 -0
- package/test/database-context.test.ts +770 -0
- package/test/db-provider-adapter.test.ts +862 -0
- package/test/durable-execution-cloudflare.test.ts +606 -0
- package/test/durable-execution-in-process.test.ts +286 -0
- package/test/durable-execution.test.ts +247 -0
- package/test/e2e/workflow-scenarios.e2e.test.ts +1039 -0
- package/test/integration.test.ts +442 -0
- package/test/rpc-surface.test.ts +946 -0
- package/test/runtime.test.ts +262 -0
- package/test/schedule-timer-cleanup.test.ts +30 -21
- package/test/send-race-conditions.test.ts +30 -40
- package/test/worker/durable-cascade.test.ts +1117 -0
- package/test/worker/durable-step.test.ts +723 -0
- package/test/worker/topological-executor.test.ts +1240 -0
- package/test/worker/workflow-builder.test.ts +1067 -0
- package/test/worker.test.ts +608 -0
- package/test/workflow-builder.test.ts +1670 -0
- package/test/workflow-cron.test.ts +256 -0
- package/test/workflow-state-adapter.test.ts +923 -0
- package/test/workflow.test.ts +25 -22
- package/tsconfig.json +3 -1
- package/vitest.config.ts +38 -1
- package/vitest.workers.config.ts +44 -0
- package/wrangler.jsonc +22 -0
- package/.turbo/turbo-test.log +0 -169
- package/LICENSE +0 -21
- package/src/context.js +0 -83
- package/src/every.js +0 -267
- package/src/index.js +0 -71
- package/src/on.js +0 -79
- package/src/send.js +0 -111
- package/src/types.js +0 -4
- package/src/workflow.js +0 -455
- package/test/context.test.js +0 -116
- package/test/every.test.js +0 -282
- package/test/on.test.js +0 -80
- package/test/send.test.js +0 -89
- package/test/workflow.test.js +0 -224
- package/vitest.config.js +0 -7
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker module exports for ai-workflows
|
|
3
|
+
*
|
|
4
|
+
* This module provides Cloudflare Workers-specific functionality:
|
|
5
|
+
*
|
|
6
|
+
* - **DurableStep**: Wrapper for Cloudflare Workflows step semantics with
|
|
7
|
+
* durable execution, retries, sleep, and step metadata
|
|
8
|
+
*
|
|
9
|
+
* - **StepContext**: Context provided to step functions for additional
|
|
10
|
+
* operations like nested durable calls and sleep
|
|
11
|
+
*
|
|
12
|
+
* - **WorkflowBuilder**: Declarative DSL for building workflows with
|
|
13
|
+
* step definitions, dependencies, triggers, and schedules
|
|
14
|
+
*
|
|
15
|
+
* - **WorkflowService**: WorkerEntrypoint for RPC access to workflow
|
|
16
|
+
* functionality via service bindings
|
|
17
|
+
*
|
|
18
|
+
* - **WorkflowServiceCore**: Core RPC-enabled service for workflow
|
|
19
|
+
* creation, lifecycle, event emission, and state persistence
|
|
20
|
+
*
|
|
21
|
+
* - **WorkflowStateAdapter**: Persistent storage for workflow state using
|
|
22
|
+
* ai-database, with optimistic locking, checkpoints, and snapshots
|
|
23
|
+
*
|
|
24
|
+
* - **TopologicalExecutor**: Parallel step execution based on dependency graph.
|
|
25
|
+
* Executes steps in topological order, running independent steps concurrently.
|
|
26
|
+
*
|
|
27
|
+
* - **DurableGraph**: Higher-level API for building and executing workflow
|
|
28
|
+
* step graphs with durable semantics.
|
|
29
|
+
*
|
|
30
|
+
* - **Graph Utilities**: Re-exports from main package including topologicalSort,
|
|
31
|
+
* getExecutionLevels, DependencyGraph, and related types for convenience.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import {
|
|
36
|
+
* DurableStep,
|
|
37
|
+
* WorkflowBuilder,
|
|
38
|
+
* WorkflowService,
|
|
39
|
+
* WorkflowServiceCore,
|
|
40
|
+
* WorkflowStateAdapter
|
|
41
|
+
* } from 'ai-workflows/worker'
|
|
42
|
+
*
|
|
43
|
+
* // Create a durable step
|
|
44
|
+
* const fetchData = new DurableStep('fetch-data', async (input: { url: string }) => {
|
|
45
|
+
* const response = await fetch(input.url)
|
|
46
|
+
* return response.json()
|
|
47
|
+
* })
|
|
48
|
+
*
|
|
49
|
+
* // Build a workflow
|
|
50
|
+
* const workflow = WorkflowBuilder.create('order-process')
|
|
51
|
+
* .step('validate', validateOrder)
|
|
52
|
+
* .step('charge', chargePayment).dependsOn('validate')
|
|
53
|
+
* .on('Order.placed').do('validate')
|
|
54
|
+
* .build()
|
|
55
|
+
*
|
|
56
|
+
* // Export WorkflowService as your worker entrypoint
|
|
57
|
+
* export { WorkflowService }
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example State Persistence with WorkflowServiceCore
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { DB } from 'ai-database'
|
|
63
|
+
* import { WorkflowServiceCore } from 'ai-workflows/worker'
|
|
64
|
+
*
|
|
65
|
+
* // Create database and service with persistence
|
|
66
|
+
* const { db } = DB({ WorkflowState: { status: 'string' } })
|
|
67
|
+
* const service = new WorkflowServiceCore(db)
|
|
68
|
+
*
|
|
69
|
+
* // Create workflow and persist state
|
|
70
|
+
* const workflow = service.create('order-processor')
|
|
71
|
+
* await service.persistState(workflow.id, {
|
|
72
|
+
* workflowId: workflow.id,
|
|
73
|
+
* status: 'running',
|
|
74
|
+
* currentStep: 'validate-order',
|
|
75
|
+
* context: { orderId: 'order-123' }
|
|
76
|
+
* })
|
|
77
|
+
*
|
|
78
|
+
* // Save step checkpoint
|
|
79
|
+
* await service.saveCheckpoint(workflow.id, 'validate-order', {
|
|
80
|
+
* stepId: 'validate-order',
|
|
81
|
+
* status: 'completed',
|
|
82
|
+
* result: { valid: true },
|
|
83
|
+
* attempt: 1
|
|
84
|
+
* })
|
|
85
|
+
*
|
|
86
|
+
* // Query workflows by status
|
|
87
|
+
* const runningWorkflows = await service.queryByStatus('running')
|
|
88
|
+
*
|
|
89
|
+
* // Create snapshot before risky operation
|
|
90
|
+
* const snapshotId = await service.createSnapshot(workflow.id, 'before-payment')
|
|
91
|
+
*
|
|
92
|
+
* // Restore if something goes wrong
|
|
93
|
+
* await service.restoreSnapshot(workflow.id, snapshotId)
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @packageDocumentation
|
|
97
|
+
*/
|
|
98
|
+
export { DurableStep, StepContext, type StepConfig, type StepMetadata, type RetryConfig, type WorkflowStep, type StepFunction, } from './durable-step.js';
|
|
99
|
+
export { WorkflowBuilder, type WorkflowBuilderConfig, type StepDefinition, type StepChain, type TriggerConfig, type ScheduleConfig, type BuiltWorkflow, type ExecutionContext, type EventTriggerChain, type ScheduleTriggerChain, type NumericScheduleChain, type DependencyOptions, } from './workflow-builder.js';
|
|
100
|
+
export { WorkflowService, WorkflowServiceCore, WorkflowWorker, TestWorkflow, type Env, type WorkflowInstanceInfo, } from '../worker.js';
|
|
101
|
+
export { WorkflowStateAdapter, type PersistedWorkflowState, type StepCheckpoint, type WorkflowHistoryEntry as StateHistoryEntry, type SnapshotInfo, type DatabaseConnection, } from './state-adapter.js';
|
|
102
|
+
export { TopologicalExecutor, DurableGraph, createExecutor, createGraph, type StepExecutor, type StepDefinition as GraphStepDefinition, type ExecutionContext as GraphExecutionContext, type ProgressCallback, type ExecutionResult, type ExecutorConfig, } from './topological-executor.js';
|
|
103
|
+
export { topologicalSort, topologicalSortKahn, topologicalSortDFS, getExecutionLevels, CycleDetectedError, MissingNodeError, type SortableNode, type ExecutionLevel, type TopologicalSortOptions, type TopologicalSortResult, } from '../graph/topological-sort.js';
|
|
104
|
+
export { DependencyGraph, CircularDependencyError, MissingDependencyError, type GraphNode, type ParallelGroup, type GraphJSON, type DependencyConfig, type DependencyType, } from '../dependency-graph.js';
|
|
105
|
+
export type { WorkflowContext, WorkflowState, WorkflowHistoryEntry, EventHandler, ScheduleHandler, ScheduleInterval, ParsedEvent, } from '../types.js';
|
|
106
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/worker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Ae,EACf,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAA;AAM/B,YAAY,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker module exports for ai-workflows
|
|
3
|
+
*
|
|
4
|
+
* This module provides Cloudflare Workers-specific functionality:
|
|
5
|
+
*
|
|
6
|
+
* - **DurableStep**: Wrapper for Cloudflare Workflows step semantics with
|
|
7
|
+
* durable execution, retries, sleep, and step metadata
|
|
8
|
+
*
|
|
9
|
+
* - **StepContext**: Context provided to step functions for additional
|
|
10
|
+
* operations like nested durable calls and sleep
|
|
11
|
+
*
|
|
12
|
+
* - **WorkflowBuilder**: Declarative DSL for building workflows with
|
|
13
|
+
* step definitions, dependencies, triggers, and schedules
|
|
14
|
+
*
|
|
15
|
+
* - **WorkflowService**: WorkerEntrypoint for RPC access to workflow
|
|
16
|
+
* functionality via service bindings
|
|
17
|
+
*
|
|
18
|
+
* - **WorkflowServiceCore**: Core RPC-enabled service for workflow
|
|
19
|
+
* creation, lifecycle, event emission, and state persistence
|
|
20
|
+
*
|
|
21
|
+
* - **WorkflowStateAdapter**: Persistent storage for workflow state using
|
|
22
|
+
* ai-database, with optimistic locking, checkpoints, and snapshots
|
|
23
|
+
*
|
|
24
|
+
* - **TopologicalExecutor**: Parallel step execution based on dependency graph.
|
|
25
|
+
* Executes steps in topological order, running independent steps concurrently.
|
|
26
|
+
*
|
|
27
|
+
* - **DurableGraph**: Higher-level API for building and executing workflow
|
|
28
|
+
* step graphs with durable semantics.
|
|
29
|
+
*
|
|
30
|
+
* - **Graph Utilities**: Re-exports from main package including topologicalSort,
|
|
31
|
+
* getExecutionLevels, DependencyGraph, and related types for convenience.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import {
|
|
36
|
+
* DurableStep,
|
|
37
|
+
* WorkflowBuilder,
|
|
38
|
+
* WorkflowService,
|
|
39
|
+
* WorkflowServiceCore,
|
|
40
|
+
* WorkflowStateAdapter
|
|
41
|
+
* } from 'ai-workflows/worker'
|
|
42
|
+
*
|
|
43
|
+
* // Create a durable step
|
|
44
|
+
* const fetchData = new DurableStep('fetch-data', async (input: { url: string }) => {
|
|
45
|
+
* const response = await fetch(input.url)
|
|
46
|
+
* return response.json()
|
|
47
|
+
* })
|
|
48
|
+
*
|
|
49
|
+
* // Build a workflow
|
|
50
|
+
* const workflow = WorkflowBuilder.create('order-process')
|
|
51
|
+
* .step('validate', validateOrder)
|
|
52
|
+
* .step('charge', chargePayment).dependsOn('validate')
|
|
53
|
+
* .on('Order.placed').do('validate')
|
|
54
|
+
* .build()
|
|
55
|
+
*
|
|
56
|
+
* // Export WorkflowService as your worker entrypoint
|
|
57
|
+
* export { WorkflowService }
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example State Persistence with WorkflowServiceCore
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { DB } from 'ai-database'
|
|
63
|
+
* import { WorkflowServiceCore } from 'ai-workflows/worker'
|
|
64
|
+
*
|
|
65
|
+
* // Create database and service with persistence
|
|
66
|
+
* const { db } = DB({ WorkflowState: { status: 'string' } })
|
|
67
|
+
* const service = new WorkflowServiceCore(db)
|
|
68
|
+
*
|
|
69
|
+
* // Create workflow and persist state
|
|
70
|
+
* const workflow = service.create('order-processor')
|
|
71
|
+
* await service.persistState(workflow.id, {
|
|
72
|
+
* workflowId: workflow.id,
|
|
73
|
+
* status: 'running',
|
|
74
|
+
* currentStep: 'validate-order',
|
|
75
|
+
* context: { orderId: 'order-123' }
|
|
76
|
+
* })
|
|
77
|
+
*
|
|
78
|
+
* // Save step checkpoint
|
|
79
|
+
* await service.saveCheckpoint(workflow.id, 'validate-order', {
|
|
80
|
+
* stepId: 'validate-order',
|
|
81
|
+
* status: 'completed',
|
|
82
|
+
* result: { valid: true },
|
|
83
|
+
* attempt: 1
|
|
84
|
+
* })
|
|
85
|
+
*
|
|
86
|
+
* // Query workflows by status
|
|
87
|
+
* const runningWorkflows = await service.queryByStatus('running')
|
|
88
|
+
*
|
|
89
|
+
* // Create snapshot before risky operation
|
|
90
|
+
* const snapshotId = await service.createSnapshot(workflow.id, 'before-payment')
|
|
91
|
+
*
|
|
92
|
+
* // Restore if something goes wrong
|
|
93
|
+
* await service.restoreSnapshot(workflow.id, snapshotId)
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @packageDocumentation
|
|
97
|
+
*/
|
|
98
|
+
// =============================================================================
|
|
99
|
+
// DurableStep - Durable function execution wrapper
|
|
100
|
+
// =============================================================================
|
|
101
|
+
export { DurableStep, StepContext, } from './durable-step.js';
|
|
102
|
+
// =============================================================================
|
|
103
|
+
// WorkflowBuilder - Declarative workflow definition DSL
|
|
104
|
+
// =============================================================================
|
|
105
|
+
export { WorkflowBuilder, } from './workflow-builder.js';
|
|
106
|
+
// =============================================================================
|
|
107
|
+
// WorkflowService - RPC-enabled workflow service
|
|
108
|
+
// =============================================================================
|
|
109
|
+
// Re-export from parent worker.ts for complete worker functionality
|
|
110
|
+
export { WorkflowService, WorkflowServiceCore, WorkflowWorker, TestWorkflow, } from '../worker.js';
|
|
111
|
+
// =============================================================================
|
|
112
|
+
// WorkflowStateAdapter - Persistent workflow state storage
|
|
113
|
+
// =============================================================================
|
|
114
|
+
export { WorkflowStateAdapter, } from './state-adapter.js';
|
|
115
|
+
// =============================================================================
|
|
116
|
+
// TopologicalExecutor & DurableGraph - Parallel step execution
|
|
117
|
+
// =============================================================================
|
|
118
|
+
export { TopologicalExecutor, DurableGraph, createExecutor, createGraph, } from './topological-executor.js';
|
|
119
|
+
// =============================================================================
|
|
120
|
+
// Graph Utilities - Re-export from main package for convenience
|
|
121
|
+
// =============================================================================
|
|
122
|
+
export { topologicalSort, topologicalSortKahn, topologicalSortDFS, getExecutionLevels, CycleDetectedError, MissingNodeError, } from '../graph/topological-sort.js';
|
|
123
|
+
export { DependencyGraph, CircularDependencyError, MissingDependencyError, } from '../dependency-graph.js';
|
|
124
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/worker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAEH,gFAAgF;AAChF,mDAAmD;AACnD,gFAAgF;AAEhF,OAAO,EACL,WAAW,EACX,WAAW,GAMZ,MAAM,mBAAmB,CAAA;AAE1B,gFAAgF;AAChF,wDAAwD;AACxD,gFAAgF;AAEhF,OAAO,EACL,eAAe,GAYhB,MAAM,uBAAuB,CAAA;AAE9B,gFAAgF;AAChF,iDAAiD;AACjD,gFAAgF;AAEhF,oEAAoE;AACpE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,YAAY,GAGb,MAAM,cAAc,CAAA;AAErB,gFAAgF;AAChF,2DAA2D;AAC3D,gFAAgF;AAEhF,OAAO,EACL,oBAAoB,GAMrB,MAAM,oBAAoB,CAAA;AAE3B,gFAAgF;AAChF,+DAA+D;AAC/D,gFAAgF;AAEhF,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,WAAW,GAOZ,MAAM,2BAA2B,CAAA;AAElC,gFAAgF;AAChF,gEAAgE;AAChE,gFAAgF;AAEhF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GAKjB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,sBAAsB,GAMvB,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowStateAdapter - Persistent workflow state using ai-database
|
|
3
|
+
*
|
|
4
|
+
* Provides durable storage for workflow state with:
|
|
5
|
+
* - Optimistic locking via version control
|
|
6
|
+
* - Step checkpoints for recovery
|
|
7
|
+
* - Query by status and IDs
|
|
8
|
+
* - Snapshots for point-in-time recovery
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { DB } from 'ai-database'
|
|
13
|
+
* import { WorkflowStateAdapter } from 'ai-workflows/worker'
|
|
14
|
+
*
|
|
15
|
+
* const { db } = DB({ WorkflowState: { status: 'string' } })
|
|
16
|
+
* const adapter = new WorkflowStateAdapter(db)
|
|
17
|
+
*
|
|
18
|
+
* await adapter.save('wf-123', {
|
|
19
|
+
* workflowId: 'wf-123',
|
|
20
|
+
* status: 'running',
|
|
21
|
+
* currentStep: 'process-payment',
|
|
22
|
+
* context: { orderId: 'order-1' },
|
|
23
|
+
* })
|
|
24
|
+
*
|
|
25
|
+
* const state = await adapter.load('wf-123')
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @packageDocumentation
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Types for persisted workflow state
|
|
32
|
+
*/
|
|
33
|
+
export interface PersistedWorkflowState {
|
|
34
|
+
workflowId: string;
|
|
35
|
+
version: number;
|
|
36
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'paused';
|
|
37
|
+
currentStep: string;
|
|
38
|
+
context: Record<string, unknown>;
|
|
39
|
+
checkpoints: Map<string, StepCheckpoint>;
|
|
40
|
+
history: WorkflowHistoryEntry[];
|
|
41
|
+
input?: unknown;
|
|
42
|
+
output?: unknown;
|
|
43
|
+
error?: string;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
}
|
|
47
|
+
export interface StepCheckpoint {
|
|
48
|
+
stepId: string;
|
|
49
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
50
|
+
result?: unknown;
|
|
51
|
+
error?: string;
|
|
52
|
+
attempt: number;
|
|
53
|
+
startedAt?: Date;
|
|
54
|
+
completedAt?: Date;
|
|
55
|
+
}
|
|
56
|
+
export interface WorkflowHistoryEntry {
|
|
57
|
+
timestamp: number;
|
|
58
|
+
type: 'event' | 'schedule' | 'transition' | 'action' | 'checkpoint';
|
|
59
|
+
name: string;
|
|
60
|
+
data?: unknown;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Snapshot metadata
|
|
64
|
+
*/
|
|
65
|
+
export interface SnapshotInfo {
|
|
66
|
+
id: string;
|
|
67
|
+
label?: string;
|
|
68
|
+
createdAt: Date;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Database connection interface
|
|
72
|
+
* Compatible with ai-database DB() result or any similar provider
|
|
73
|
+
*/
|
|
74
|
+
export interface DatabaseConnection {
|
|
75
|
+
get: (type: string, id: string) => Promise<Record<string, unknown> | null>;
|
|
76
|
+
create: (type: string, data: Record<string, unknown>, id?: string) => Promise<Record<string, unknown>>;
|
|
77
|
+
update: (type: string, id: string, data: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
78
|
+
delete: (type: string, id: string) => Promise<boolean>;
|
|
79
|
+
list: (type: string, options?: {
|
|
80
|
+
limit?: number;
|
|
81
|
+
offset?: number;
|
|
82
|
+
where?: Record<string, unknown>;
|
|
83
|
+
}) => Promise<Record<string, unknown>[]>;
|
|
84
|
+
search?: (type: string, query: string, options?: Record<string, unknown>) => Promise<Record<string, unknown>[]>;
|
|
85
|
+
emit?: (event: string, data: unknown) => Promise<{
|
|
86
|
+
id: string;
|
|
87
|
+
}>;
|
|
88
|
+
clear?: () => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* WorkflowStateAdapter - Persists workflow state using ai-database
|
|
92
|
+
*
|
|
93
|
+
* Provides optimistic locking, checkpoints, and snapshot recovery.
|
|
94
|
+
*/
|
|
95
|
+
export declare class WorkflowStateAdapter {
|
|
96
|
+
private db;
|
|
97
|
+
private readonly STATE_TYPE;
|
|
98
|
+
private readonly CHECKPOINT_TYPE;
|
|
99
|
+
private readonly SNAPSHOT_TYPE;
|
|
100
|
+
/**
|
|
101
|
+
* Create a new WorkflowStateAdapter
|
|
102
|
+
*
|
|
103
|
+
* @param database - Database connection (from ai-database DB() or compatible provider)
|
|
104
|
+
* @throws Error if database connection is null/undefined
|
|
105
|
+
*/
|
|
106
|
+
constructor(database: DatabaseConnection);
|
|
107
|
+
/**
|
|
108
|
+
* Save workflow state to database
|
|
109
|
+
*
|
|
110
|
+
* Creates a new record if not exists, updates existing if found.
|
|
111
|
+
* Automatically increments version and updates timestamps.
|
|
112
|
+
*
|
|
113
|
+
* @param workflowId - Unique workflow identifier
|
|
114
|
+
* @param state - Partial state to save (merged with existing)
|
|
115
|
+
*/
|
|
116
|
+
save(workflowId: string, state: Partial<PersistedWorkflowState>): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Load workflow state from database
|
|
119
|
+
*
|
|
120
|
+
* @param workflowId - Workflow identifier to load
|
|
121
|
+
* @returns The persisted state or null if not found
|
|
122
|
+
*/
|
|
123
|
+
load(workflowId: string): Promise<PersistedWorkflowState | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Save a step checkpoint
|
|
126
|
+
*
|
|
127
|
+
* Checkpoints are stored as part of the workflow state.
|
|
128
|
+
*
|
|
129
|
+
* @param workflowId - Workflow identifier
|
|
130
|
+
* @param stepId - Step identifier
|
|
131
|
+
* @param checkpoint - Checkpoint data
|
|
132
|
+
*/
|
|
133
|
+
checkpoint(workflowId: string, stepId: string, checkpoint: StepCheckpoint): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Get a step checkpoint
|
|
136
|
+
*
|
|
137
|
+
* @param workflowId - Workflow identifier
|
|
138
|
+
* @param stepId - Step identifier
|
|
139
|
+
* @returns The checkpoint or null if not found
|
|
140
|
+
*/
|
|
141
|
+
getCheckpoint(workflowId: string, stepId: string): Promise<StepCheckpoint | null>;
|
|
142
|
+
/**
|
|
143
|
+
* Update state with optimistic locking
|
|
144
|
+
*
|
|
145
|
+
* Only updates if the current version matches expectedVersion.
|
|
146
|
+
* Returns false if version mismatch (concurrent modification detected).
|
|
147
|
+
*
|
|
148
|
+
* @param workflowId - Workflow identifier
|
|
149
|
+
* @param expectedVersion - Expected current version
|
|
150
|
+
* @param state - State updates to apply
|
|
151
|
+
* @returns true if updated, false if version mismatch
|
|
152
|
+
*/
|
|
153
|
+
updateWithVersion(workflowId: string, expectedVersion: number, state: Partial<PersistedWorkflowState>): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Query workflows by status
|
|
156
|
+
*
|
|
157
|
+
* @param status - Status to filter by
|
|
158
|
+
* @returns Array of workflows matching the status
|
|
159
|
+
*/
|
|
160
|
+
queryByStatus(status: PersistedWorkflowState['status']): Promise<PersistedWorkflowState[]>;
|
|
161
|
+
/**
|
|
162
|
+
* Query workflows by IDs (batch query)
|
|
163
|
+
*
|
|
164
|
+
* @param workflowIds - Array of workflow IDs to query
|
|
165
|
+
* @returns Array of found workflows (non-existent IDs are excluded)
|
|
166
|
+
*/
|
|
167
|
+
queryByIds(workflowIds: string[]): Promise<PersistedWorkflowState[]>;
|
|
168
|
+
/**
|
|
169
|
+
* Delete a workflow and its checkpoints
|
|
170
|
+
*
|
|
171
|
+
* @param workflowId - Workflow identifier to delete
|
|
172
|
+
* @returns true if deleted, false if not found
|
|
173
|
+
*/
|
|
174
|
+
delete(workflowId: string): Promise<boolean>;
|
|
175
|
+
/**
|
|
176
|
+
* List all workflows with pagination
|
|
177
|
+
*
|
|
178
|
+
* @param options - Pagination options (limit, offset)
|
|
179
|
+
* @returns Array of workflows
|
|
180
|
+
*/
|
|
181
|
+
listAll(options?: {
|
|
182
|
+
limit?: number;
|
|
183
|
+
offset?: number;
|
|
184
|
+
}): Promise<PersistedWorkflowState[]>;
|
|
185
|
+
/**
|
|
186
|
+
* Create a snapshot of current workflow state
|
|
187
|
+
*
|
|
188
|
+
* Snapshots allow point-in-time recovery of workflow state.
|
|
189
|
+
*
|
|
190
|
+
* @param workflowId - Workflow identifier
|
|
191
|
+
* @param label - Optional human-readable label
|
|
192
|
+
* @returns Snapshot ID
|
|
193
|
+
*/
|
|
194
|
+
createSnapshot(workflowId: string, label?: string): Promise<string>;
|
|
195
|
+
/**
|
|
196
|
+
* Restore workflow state from a snapshot
|
|
197
|
+
*
|
|
198
|
+
* @param workflowId - Workflow identifier
|
|
199
|
+
* @param snapshotId - Snapshot ID to restore from
|
|
200
|
+
*/
|
|
201
|
+
restoreSnapshot(workflowId: string, snapshotId: string): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Get all snapshots for a workflow
|
|
204
|
+
*
|
|
205
|
+
* @param workflowId - Workflow identifier
|
|
206
|
+
* @returns Array of snapshot metadata
|
|
207
|
+
*/
|
|
208
|
+
getSnapshots(workflowId: string): Promise<SnapshotInfo[]>;
|
|
209
|
+
/**
|
|
210
|
+
* Load raw state from database
|
|
211
|
+
*/
|
|
212
|
+
private loadRaw;
|
|
213
|
+
/**
|
|
214
|
+
* Merge partial state into existing state
|
|
215
|
+
*/
|
|
216
|
+
private mergeState;
|
|
217
|
+
/**
|
|
218
|
+
* Serialize state for database storage
|
|
219
|
+
*/
|
|
220
|
+
private serialize;
|
|
221
|
+
/**
|
|
222
|
+
* Deserialize state from database format
|
|
223
|
+
*/
|
|
224
|
+
private deserialize;
|
|
225
|
+
/**
|
|
226
|
+
* Emit an event to the database (if supported)
|
|
227
|
+
*/
|
|
228
|
+
private emitEvent;
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=state-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-adapter.d.ts","sourceRoot":"","sources":["../../src/worker/state-adapter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