@orbytautomation/engine 0.6.1 → 0.7.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.
Files changed (41) hide show
  1. package/dist/adapters/AdapterRegistry.d.ts.map +1 -1
  2. package/dist/adapters/AdapterRegistry.js +2 -1
  3. package/dist/adapters/AdapterRegistry.js.map +1 -1
  4. package/dist/adapters/builtins/CLIAdapter.d.ts.map +1 -1
  5. package/dist/adapters/builtins/CLIAdapter.js +6 -5
  6. package/dist/adapters/builtins/CLIAdapter.js.map +1 -1
  7. package/dist/core/OrbytEngine.d.ts +19 -0
  8. package/dist/core/OrbytEngine.d.ts.map +1 -1
  9. package/dist/core/OrbytEngine.js +35 -0
  10. package/dist/core/OrbytEngine.js.map +1 -1
  11. package/dist/execution/StepExecutor.d.ts.map +1 -1
  12. package/dist/execution/StepExecutor.js +11 -9
  13. package/dist/execution/StepExecutor.js.map +1 -1
  14. package/dist/execution/WorkflowExecutor.d.ts +6 -0
  15. package/dist/execution/WorkflowExecutor.d.ts.map +1 -1
  16. package/dist/execution/WorkflowExecutor.js +27 -5
  17. package/dist/execution/WorkflowExecutor.js.map +1 -1
  18. package/dist/scheduling/workers/workflow-worker.d.ts +14 -0
  19. package/dist/scheduling/workers/workflow-worker.d.ts.map +1 -0
  20. package/dist/scheduling/workers/workflow-worker.js +46 -0
  21. package/dist/scheduling/workers/workflow-worker.js.map +1 -0
  22. package/dist/storage/ExecutionStore.d.ts +102 -1
  23. package/dist/storage/ExecutionStore.d.ts.map +1 -1
  24. package/dist/storage/ExecutionStore.js +188 -1
  25. package/dist/storage/ExecutionStore.js.map +1 -1
  26. package/dist/storage/ScheduleStore.d.ts +154 -1
  27. package/dist/storage/ScheduleStore.d.ts.map +1 -1
  28. package/dist/storage/ScheduleStore.js +208 -1
  29. package/dist/storage/ScheduleStore.js.map +1 -1
  30. package/dist/storage/WorkflowStore.d.ts +82 -1
  31. package/dist/storage/WorkflowStore.d.ts.map +1 -1
  32. package/dist/storage/WorkflowStore.js +183 -1
  33. package/dist/storage/WorkflowStore.js.map +1 -1
  34. package/dist/storage/index.d.ts +3 -1
  35. package/dist/storage/index.d.ts.map +1 -1
  36. package/dist/storage/index.js +3 -4
  37. package/dist/storage/index.js.map +1 -1
  38. package/dist/types/core-types.d.ts +2 -0
  39. package/dist/types/core-types.d.ts.map +1 -1
  40. package/dist/types/core-types.js.map +1 -1
  41. package/package.json +1 -1
@@ -1,2 +1,155 @@
1
- export {};
1
+ /**
2
+ * Schedule Store
3
+ *
4
+ * Persists workflow schedule state under .orbyt/schedules/.
5
+ * One JSON file per schedule; enables restart recovery so the scheduler
6
+ * can reload all known schedules without re-registration by callers.
7
+ *
8
+ * Layout:
9
+ * .orbyt/schedules/<scheduleId>.json
10
+ *
11
+ * Primary purposes:
12
+ * - Persist cron/interval schedules so they survive process restarts
13
+ * - Track last-run / next-run timestamps for missed-run recovery
14
+ * - Record consecutive error counts for circuit-breaker logic
15
+ *
16
+ * All methods are non-fatal (errors are swallowed) — the store must never
17
+ * interrupt the scheduler or workflow execution.
18
+ *
19
+ * @module storage
20
+ */
21
+ import type { ScheduleStatus, ScheduleTriggerType } from '../types/core-types.js';
22
+ export interface PersistedSchedule {
23
+ /** Unique schedule identifier */
24
+ scheduleId: string;
25
+ /** Identifier of the workflow this schedule triggers */
26
+ workflowId: string;
27
+ /** Human-readable workflow name (for display only) */
28
+ workflowName: string;
29
+ /**
30
+ * Trigger type — covers all scheduling modalities:
31
+ * 'cron' — cron expression (cronExpression field required)
32
+ * 'interval' — fixed interval (intervalMs field required)
33
+ * 'once' — one-shot at a future time (nextRunAt used as fire time)
34
+ * 'event' — external event bus trigger (eventSource field required)
35
+ * 'webhook' — inbound HTTP call (webhookEndpoint + optional webhookSecret)
36
+ * 'manual' — user-triggered; stored for replay/audit history
37
+ */
38
+ triggerType: ScheduleTriggerType;
39
+ /** Cron expression (required when triggerType is 'cron') */
40
+ cronExpression?: string;
41
+ /** Interval in milliseconds (required when triggerType is 'interval') */
42
+ intervalMs?: number;
43
+ /** Timezone for cron evaluation (default: UTC) */
44
+ timezone?: string;
45
+ /**
46
+ * Event source identifier (required when triggerType is 'event').
47
+ * E.g. 'analytics.report.ready', 'billing.invoice.created'.
48
+ */
49
+ eventSource?: string;
50
+ /** Optional filter expression evaluated against the event payload */
51
+ eventFilter?: string;
52
+ /**
53
+ * Inbound webhook path / endpoint (required when triggerType is 'webhook').
54
+ * E.g. '/hooks/deploy' or 'https://hooks.example.com/deploy'.
55
+ */
56
+ webhookEndpoint?: string;
57
+ /**
58
+ * HMAC secret used for payload signature verification.
59
+ * Stored as-is; callers should pass an already-encrypted value.
60
+ */
61
+ webhookSecret?: string;
62
+ /** HTTP method expected on the webhook endpoint (default: POST) */
63
+ webhookMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH';
64
+ /**
65
+ * Current schedule status.
66
+ * 'active' — running normally
67
+ * 'paused' — temporarily disabled (can be re-enabled)
68
+ * 'disabled' — permanently disabled
69
+ * 'expired' — end date passed or maxExecutions reached
70
+ */
71
+ status: ScheduleStatus;
72
+ /** ISO 8601 timestamp of when this schedule was first created */
73
+ createdAt: string;
74
+ /** ISO 8601 timestamp of when this schedule was last updated */
75
+ updatedAt: string;
76
+ /** ISO 8601 timestamp of the last trigger fire */
77
+ lastRunAt?: string;
78
+ /** Result of the last execution */
79
+ lastStatus?: 'completed' | 'failed' | 'timeout';
80
+ /** ISO 8601 timestamp of the next scheduled trigger (cron/interval/once) */
81
+ nextRunAt?: string;
82
+ /** Hard stop date — schedule will not fire after this (ISO 8601) */
83
+ endDate?: string;
84
+ /** Maximum number of executions (undefined = unlimited) */
85
+ maxExecutions?: number;
86
+ /** Number of times the schedule has fired */
87
+ executionCount: number;
88
+ /** Consecutive error count — reset to 0 on success */
89
+ errorCount: number;
90
+ /** Error message from the most recent failure */
91
+ lastError?: string;
92
+ /** Static input data merged into each triggered execution */
93
+ input?: Record<string, any>;
94
+ }
95
+ /**
96
+ * File-based schedule state store.
97
+ *
98
+ * An in-memory cache avoids re-reading files on every access.
99
+ * The cache is always the source of truth for in-flight updates;
100
+ * the file acts as the durable record for restarts.
101
+ */
102
+ export declare class ScheduleStore {
103
+ private readonly dir;
104
+ /** In-memory cache: scheduleId → current state */
105
+ private readonly cache;
106
+ constructor(dir: string);
107
+ /**
108
+ * Persist a schedule record.
109
+ * Creates the storage directory on first call.
110
+ * If the schedule already exists it is fully replaced.
111
+ */
112
+ save(schedule: PersistedSchedule): void;
113
+ /**
114
+ * Record the outcome of a schedule trigger.
115
+ *
116
+ * - Updates `lastRunAt`, `lastStatus`, `nextRunAt`
117
+ * - Increments `executionCount`
118
+ * - On success: resets `errorCount` and clears `lastError`
119
+ * - On failure: increments `errorCount` and stores `lastError`
120
+ */
121
+ updateLastRun(scheduleId: string, status: 'completed' | 'failed' | 'timeout', runAt: Date, nextRunAt?: Date, error?: string): void;
122
+ /**
123
+ * Mark a schedule as active.
124
+ * No-op if the schedule does not exist.
125
+ */
126
+ enable(scheduleId: string): void;
127
+ /**
128
+ * Mark a schedule as paused — it will not fire until re-enabled.
129
+ * No-op if the schedule does not exist.
130
+ */
131
+ disable(scheduleId: string): void;
132
+ /**
133
+ * Remove a schedule from both the cache and disk.
134
+ * Safe to call if the schedule does not exist.
135
+ */
136
+ delete(scheduleId: string): void;
137
+ /**
138
+ * Read a single schedule by ID.
139
+ * Returns null if not found.
140
+ */
141
+ load(scheduleId: string): PersistedSchedule | null;
142
+ /**
143
+ * Return all persisted schedules, sorted by `createdAt` ascending.
144
+ */
145
+ list(): PersistedSchedule[];
146
+ /**
147
+ * Return only schedules that are currently active.
148
+ */
149
+ listEnabled(): PersistedSchedule[];
150
+ private _setStatus;
151
+ private _getOrLoad;
152
+ private _filePath;
153
+ private _write;
154
+ }
2
155
  //# sourceMappingURL=ScheduleStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduleStore.d.ts","sourceRoot":"","sources":["../../src/storage/ScheduleStore.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ScheduleStore.d.ts","sourceRoot":"","sources":["../../src/storage/ScheduleStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAIlF,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;OAQG;IACH,WAAW,EAAE,mBAAmB,CAAC;IAGjC,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAGjD;;;;;;OAMG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAGlB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChD,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACj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+ * Persists workflow schedule state under .orbyt/schedules/.
5
+ * One JSON file per schedule; enables restart recovery so the scheduler
6
+ * can reload all known schedules without re-registration by callers.
7
+ *
8
+ * Layout:
9
+ * .orbyt/schedules/<scheduleId>.json
10
+ *
11
+ * Primary purposes:
12
+ * - Persist cron/interval schedules so they survive process restarts
13
+ * - Track last-run / next-run timestamps for missed-run recovery
14
+ * - Record consecutive error counts for circuit-breaker logic
15
+ *
16
+ * All methods are non-fatal (errors are swallowed) — the store must never
17
+ * interrupt the scheduler or workflow execution.
18
+ *
19
+ * @module storage
20
+ */
21
+ import { mkdirSync, writeFileSync, readFileSync, existsSync, readdirSync, rmSync, } from 'node:fs';
22
+ import { join, basename } from 'node:path';
23
+ // ─── ScheduleStore ────────────────────────────────────────────────────────────
24
+ /**
25
+ * File-based schedule state store.
26
+ *
27
+ * An in-memory cache avoids re-reading files on every access.
28
+ * The cache is always the source of truth for in-flight updates;
29
+ * the file acts as the durable record for restarts.
30
+ */
31
+ export class ScheduleStore {
32
+ dir;
33
+ /** In-memory cache: scheduleId → current state */
34
+ cache = new Map();
35
+ constructor(dir) {
36
+ this.dir = dir;
37
+ }
38
+ // ─── Write API ─────────────────────────────────────────────────────────────
39
+ /**
40
+ * Persist a schedule record.
41
+ * Creates the storage directory on first call.
42
+ * If the schedule already exists it is fully replaced.
43
+ */
44
+ save(schedule) {
45
+ try {
46
+ mkdirSync(this.dir, { recursive: true });
47
+ const updated = {
48
+ ...schedule,
49
+ updatedAt: new Date().toISOString(),
50
+ };
51
+ this.cache.set(schedule.scheduleId, updated);
52
+ this._write(schedule.scheduleId, updated);
53
+ }
54
+ catch {
55
+ // Non-fatal
56
+ }
57
+ }
58
+ /**
59
+ * Record the outcome of a schedule trigger.
60
+ *
61
+ * - Updates `lastRunAt`, `lastStatus`, `nextRunAt`
62
+ * - Increments `executionCount`
63
+ * - On success: resets `errorCount` and clears `lastError`
64
+ * - On failure: increments `errorCount` and stores `lastError`
65
+ */
66
+ updateLastRun(scheduleId, status, runAt, nextRunAt, error) {
67
+ try {
68
+ const record = this._getOrLoad(scheduleId);
69
+ if (!record)
70
+ return;
71
+ record.lastRunAt = runAt.toISOString();
72
+ record.lastStatus = status;
73
+ record.executionCount = (record.executionCount ?? 0) + 1;
74
+ if (nextRunAt)
75
+ record.nextRunAt = nextRunAt.toISOString();
76
+ if (status === 'completed') {
77
+ record.errorCount = 0;
78
+ delete record.lastError;
79
+ }
80
+ else {
81
+ record.errorCount = (record.errorCount ?? 0) + 1;
82
+ if (error)
83
+ record.lastError = error;
84
+ }
85
+ record.updatedAt = new Date().toISOString();
86
+ this.cache.set(scheduleId, record);
87
+ this._write(scheduleId, record);
88
+ }
89
+ catch {
90
+ // Non-fatal
91
+ }
92
+ }
93
+ /**
94
+ * Mark a schedule as active.
95
+ * No-op if the schedule does not exist.
96
+ */
97
+ enable(scheduleId) {
98
+ this._setStatus(scheduleId, 'active');
99
+ }
100
+ /**
101
+ * Mark a schedule as paused — it will not fire until re-enabled.
102
+ * No-op if the schedule does not exist.
103
+ */
104
+ disable(scheduleId) {
105
+ this._setStatus(scheduleId, 'paused');
106
+ }
107
+ /**
108
+ * Remove a schedule from both the cache and disk.
109
+ * Safe to call if the schedule does not exist.
110
+ */
111
+ delete(scheduleId) {
112
+ try {
113
+ this.cache.delete(scheduleId);
114
+ const filePath = this._filePath(scheduleId);
115
+ if (existsSync(filePath))
116
+ rmSync(filePath);
117
+ }
118
+ catch {
119
+ // Non-fatal
120
+ }
121
+ }
122
+ // ─── Read API ──────────────────────────────────────────────────────────────
123
+ /**
124
+ * Read a single schedule by ID.
125
+ * Returns null if not found.
126
+ */
127
+ load(scheduleId) {
128
+ try {
129
+ const cached = this.cache.get(scheduleId);
130
+ if (cached)
131
+ return { ...cached };
132
+ const filePath = this._filePath(scheduleId);
133
+ if (!existsSync(filePath))
134
+ return null;
135
+ return JSON.parse(readFileSync(filePath, 'utf-8'));
136
+ }
137
+ catch {
138
+ return null;
139
+ }
140
+ }
141
+ /**
142
+ * Return all persisted schedules, sorted by `createdAt` ascending.
143
+ */
144
+ list() {
145
+ try {
146
+ mkdirSync(this.dir, { recursive: true });
147
+ return readdirSync(this.dir)
148
+ .filter(f => f.endsWith('.json'))
149
+ .flatMap(f => {
150
+ try {
151
+ const id = basename(f, '.json');
152
+ const record = this._getOrLoad(id);
153
+ return record ? [record] : [];
154
+ }
155
+ catch {
156
+ return [];
157
+ }
158
+ })
159
+ .sort((a, b) => a.createdAt.localeCompare(b.createdAt));
160
+ }
161
+ catch {
162
+ return [];
163
+ }
164
+ }
165
+ /**
166
+ * Return only schedules that are currently active.
167
+ */
168
+ listEnabled() {
169
+ return this.list().filter(s => s.status === 'active');
170
+ }
171
+ // ─── Internal helpers ──────────────────────────────────────────────────────
172
+ _setStatus(scheduleId, status) {
173
+ try {
174
+ const record = this._getOrLoad(scheduleId);
175
+ if (!record)
176
+ return;
177
+ record.status = status;
178
+ record.updatedAt = new Date().toISOString();
179
+ this.cache.set(scheduleId, record);
180
+ this._write(scheduleId, record);
181
+ }
182
+ catch {
183
+ // Non-fatal
184
+ }
185
+ }
186
+ _getOrLoad(scheduleId) {
187
+ const cached = this.cache.get(scheduleId);
188
+ if (cached)
189
+ return cached;
190
+ const filePath = this._filePath(scheduleId);
191
+ if (!existsSync(filePath))
192
+ return null;
193
+ try {
194
+ const record = JSON.parse(readFileSync(filePath, 'utf-8'));
195
+ this.cache.set(scheduleId, record);
196
+ return record;
197
+ }
198
+ catch {
199
+ return null;
200
+ }
201
+ }
202
+ _filePath(scheduleId) {
203
+ return join(this.dir, `${scheduleId}.json`);
204
+ }
205
+ _write(scheduleId, record) {
206
+ writeFileSync(this._filePath(scheduleId), JSON.stringify(record, null, 2), 'utf-8');
207
+ }
208
+ }
2
209
  //# sourceMappingURL=ScheduleStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduleStore.js","sourceRoot":"","sources":["../../src/storage/ScheduleStore.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Schedu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AAO,CAAC,CAAsB,CAAC;YAChF,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YACnC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAEO,SAAS,CAAC,UAAkB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,UAAkB,EAAE,MAAyB;QAC1D,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"}
@@ -1,2 +1,83 @@
1
- export {};
1
+ /**
2
+ * Workflow Store
3
+ *
4
+ * Persists versioned workflow definitions under .orbyt/workflows/.
5
+ * Each workflow gets its own subdirectory; each save creates a new versioned file.
6
+ *
7
+ * Layout:
8
+ * .orbyt/workflows/<workflowName>/v1.json
9
+ * .orbyt/workflows/<workflowName>/v2.json
10
+ * ...
11
+ *
12
+ * Primary purpose: replay a failed run against the exact workflow definition
13
+ * that was used — not against a potentially-modified current version.
14
+ *
15
+ * All methods are non-fatal (errors are swallowed) — the store must never
16
+ * interrupt actual workflow execution.
17
+ *
18
+ * @module storage
19
+ */
20
+ import type { ParsedWorkflow } from '../types/core-types.js';
21
+ export interface PersistedWorkflow {
22
+ /** Workflow identifier (name or generated) */
23
+ workflowId: string;
24
+ /** Version number (1-based, auto-incremented) */
25
+ version: number;
26
+ /** ISO 8601 timestamp of when this version was saved */
27
+ savedAt: string;
28
+ /** The full parsed workflow definition */
29
+ definition: ParsedWorkflow;
30
+ }
31
+ /**
32
+ * File-based workflow definition store.
33
+ *
34
+ * Stores multiple versions of each workflow definition so a failed execution
35
+ * can always be replayed against the exact definition that produced it.
36
+ *
37
+ * An in-memory cache for the latest version of each workflow avoids
38
+ * re-reading the file on every `save()` call.
39
+ */
40
+ export declare class WorkflowStore {
41
+ private readonly dir;
42
+ /** Cache: workflowId → latest saved version number */
43
+ private readonly latestVersionCache;
44
+ constructor(dir: string);
45
+ /**
46
+ * Save a workflow definition.
47
+ * A new version file is created on each call; the version number is
48
+ * determined by inspecting existing files (or the cache).
49
+ */
50
+ save(workflow: ParsedWorkflow): void;
51
+ /**
52
+ * Load the most recently saved version of a workflow.
53
+ * Returns null if the workflow has never been saved.
54
+ */
55
+ loadLatest(workflowId: string): PersistedWorkflow | null;
56
+ /**
57
+ * Load a specific version of a workflow.
58
+ * When `version` is omitted the latest version is returned.
59
+ */
60
+ load(workflowId: string, version?: number): PersistedWorkflow | null;
61
+ /**
62
+ * Return all saved version numbers for a workflow, sorted newest-first.
63
+ */
64
+ listVersions(workflowId: string): number[];
65
+ /**
66
+ * Return all workflow IDs that have at least one saved version.
67
+ */
68
+ list(): string[];
69
+ /**
70
+ * Delete a specific version of a workflow, or all versions if `version`
71
+ * is omitted (removes the entire workflow subdirectory).
72
+ */
73
+ delete(workflowId: string, version?: number): void;
74
+ /** Derive a stable ID from the workflow — prefer `name`, fallback to `metadata.name`. */
75
+ private _resolveId;
76
+ /**
77
+ * Calculate the next version number.
78
+ * Reads the cache first; if not cached, scans the directory.
79
+ */
80
+ private _nextVersion;
81
+ private _readVersion;
82
+ }
2
83
  //# sourceMappingURL=WorkflowStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStore.d.ts","sourceRoot":"","sources":["../../src/storage/WorkflowStore.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"WorkflowStore.d.ts","sourceRoot":"","sources":["../../src/storage/WorkflowStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,cAAc,CAAC;CAC5B;AAID;;;;;;;;GAQG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,sDAAsD;IACtD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;gBAEpD,GAAG,EAAE,MAAM;IAMvB;;;;OAIG;IACH,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IA2BpC;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IAUxD;;;OAGG;IACH,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IASpE;;OAEG;IACH,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE;IAa1C;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAYhB;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAqBlD,yFAAyF;IACzF,OAAO,CAAC,UAAU;IAMlB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,YAAY;CAKrB"}
@@ -1,2 +1,184 @@
1
- export {};
1
+ /**
2
+ * Workflow Store
3
+ *
4
+ * Persists versioned workflow definitions under .orbyt/workflows/.
5
+ * Each workflow gets its own subdirectory; each save creates a new versioned file.
6
+ *
7
+ * Layout:
8
+ * .orbyt/workflows/<workflowName>/v1.json
9
+ * .orbyt/workflows/<workflowName>/v2.json
10
+ * ...
11
+ *
12
+ * Primary purpose: replay a failed run against the exact workflow definition
13
+ * that was used — not against a potentially-modified current version.
14
+ *
15
+ * All methods are non-fatal (errors are swallowed) — the store must never
16
+ * interrupt actual workflow execution.
17
+ *
18
+ * @module storage
19
+ */
20
+ import { mkdirSync, writeFileSync, readFileSync, existsSync, readdirSync, rmSync, } from 'node:fs';
21
+ import { join } from 'node:path';
22
+ // ─── WorkflowStore ────────────────────────────────────────────────────────────
23
+ /**
24
+ * File-based workflow definition store.
25
+ *
26
+ * Stores multiple versions of each workflow definition so a failed execution
27
+ * can always be replayed against the exact definition that produced it.
28
+ *
29
+ * An in-memory cache for the latest version of each workflow avoids
30
+ * re-reading the file on every `save()` call.
31
+ */
32
+ export class WorkflowStore {
33
+ dir;
34
+ /** Cache: workflowId → latest saved version number */
35
+ latestVersionCache = new Map();
36
+ constructor(dir) {
37
+ this.dir = dir;
38
+ }
39
+ // ─── Write API ─────────────────────────────────────────────────────────────
40
+ /**
41
+ * Save a workflow definition.
42
+ * A new version file is created on each call; the version number is
43
+ * determined by inspecting existing files (or the cache).
44
+ */
45
+ save(workflow) {
46
+ try {
47
+ const workflowId = this._resolveId(workflow);
48
+ const workflowDir = join(this.dir, workflowId);
49
+ mkdirSync(workflowDir, { recursive: true });
50
+ const nextVersion = this._nextVersion(workflowId, workflowDir);
51
+ const record = {
52
+ workflowId,
53
+ version: nextVersion,
54
+ savedAt: new Date().toISOString(),
55
+ definition: workflow,
56
+ };
57
+ writeFileSync(join(workflowDir, `v${nextVersion}.json`), JSON.stringify(record, null, 2), 'utf-8');
58
+ this.latestVersionCache.set(workflowId, nextVersion);
59
+ }
60
+ catch {
61
+ // Non-fatal
62
+ }
63
+ }
64
+ // ─── Read API ──────────────────────────────────────────────────────────────
65
+ /**
66
+ * Load the most recently saved version of a workflow.
67
+ * Returns null if the workflow has never been saved.
68
+ */
69
+ loadLatest(workflowId) {
70
+ try {
71
+ const versions = this.listVersions(workflowId);
72
+ if (versions.length === 0)
73
+ return null;
74
+ return this._readVersion(workflowId, versions[0]);
75
+ }
76
+ catch {
77
+ return null;
78
+ }
79
+ }
80
+ /**
81
+ * Load a specific version of a workflow.
82
+ * When `version` is omitted the latest version is returned.
83
+ */
84
+ load(workflowId, version) {
85
+ try {
86
+ if (version === undefined)
87
+ return this.loadLatest(workflowId);
88
+ return this._readVersion(workflowId, version);
89
+ }
90
+ catch {
91
+ return null;
92
+ }
93
+ }
94
+ /**
95
+ * Return all saved version numbers for a workflow, sorted newest-first.
96
+ */
97
+ listVersions(workflowId) {
98
+ try {
99
+ const workflowDir = join(this.dir, workflowId);
100
+ if (!existsSync(workflowDir))
101
+ return [];
102
+ return readdirSync(workflowDir)
103
+ .filter(f => /^v\d+\.json$/.test(f))
104
+ .map(f => parseInt(f.slice(1, -5), 10))
105
+ .sort((a, b) => b - a); // newest first
106
+ }
107
+ catch {
108
+ return [];
109
+ }
110
+ }
111
+ /**
112
+ * Return all workflow IDs that have at least one saved version.
113
+ */
114
+ list() {
115
+ try {
116
+ mkdirSync(this.dir, { recursive: true });
117
+ return readdirSync(this.dir, { withFileTypes: true })
118
+ .filter(e => e.isDirectory())
119
+ .map(e => e.name)
120
+ .sort();
121
+ }
122
+ catch {
123
+ return [];
124
+ }
125
+ }
126
+ /**
127
+ * Delete a specific version of a workflow, or all versions if `version`
128
+ * is omitted (removes the entire workflow subdirectory).
129
+ */
130
+ delete(workflowId, version) {
131
+ try {
132
+ if (version !== undefined) {
133
+ const filePath = join(this.dir, workflowId, `v${version}.json`);
134
+ if (existsSync(filePath))
135
+ rmSync(filePath);
136
+ // Invalidate cache if we deleted the latest version
137
+ if (this.latestVersionCache.get(workflowId) === version) {
138
+ this.latestVersionCache.delete(workflowId);
139
+ }
140
+ }
141
+ else {
142
+ const workflowDir = join(this.dir, workflowId);
143
+ if (existsSync(workflowDir))
144
+ rmSync(workflowDir, { recursive: true });
145
+ this.latestVersionCache.delete(workflowId);
146
+ }
147
+ }
148
+ catch {
149
+ // Non-fatal
150
+ }
151
+ }
152
+ // ─── Internal helpers ──────────────────────────────────────────────────────
153
+ /** Derive a stable ID from the workflow — prefer `name`, fallback to `metadata.name`. */
154
+ _resolveId(workflow) {
155
+ const raw = workflow.name ?? workflow.metadata?.name ?? 'unnamed';
156
+ // Sanitise for use as a directory name (keep alphanumeric, hyphen, underscore, dot)
157
+ return raw.replace(/[^a-zA-Z0-9._-]/g, '_');
158
+ }
159
+ /**
160
+ * Calculate the next version number.
161
+ * Reads the cache first; if not cached, scans the directory.
162
+ */
163
+ _nextVersion(workflowId, workflowDir) {
164
+ const cached = this.latestVersionCache.get(workflowId);
165
+ if (cached !== undefined)
166
+ return cached + 1;
167
+ try {
168
+ const existing = readdirSync(workflowDir)
169
+ .filter(f => /^v\d+\.json$/.test(f))
170
+ .map(f => parseInt(f.slice(1, -5), 10));
171
+ return existing.length === 0 ? 1 : Math.max(...existing) + 1;
172
+ }
173
+ catch {
174
+ return 1;
175
+ }
176
+ }
177
+ _readVersion(workflowId, version) {
178
+ const filePath = join(this.dir, workflowId, `v${version}.json`);
179
+ if (!existsSync(filePath))
180
+ return null;
181
+ return JSON.parse(readFileSync(filePath, 'utf-8'));
182
+ }
183
+ }
2
184
  //# sourceMappingURL=WorkflowStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStore.js","sourceRoot":"","sources":["../../src/storage/WorkflowStore.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"WorkflowStore.js","sourceRoot":"","sources":["../../src/storage/WorkflowStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,MAAM,GACP,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAgBjC,iFAAiF;AAEjF;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAa;IACP,GAAG,CAAS;IAC7B,sDAAsD;IACrC,kBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEhE,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CA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