@gravito/flux 3.0.1 → 3.0.3
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 +329 -8
- package/bin/flux.js +25 -1
- package/dev/viewer/app.js +4 -4
- package/dist/bun.cjs +2 -2
- package/dist/bun.d.cts +65 -26
- package/dist/bun.d.ts +65 -26
- package/dist/bun.js +1 -1
- package/dist/chunk-6AZNHVEO.cjs +316 -0
- package/dist/chunk-6AZNHVEO.cjs.map +1 -0
- package/dist/chunk-DN7SIQ34.cjs +3586 -0
- package/dist/chunk-DN7SIQ34.cjs.map +1 -0
- package/dist/{chunk-ZAMVC732.js → chunk-EZGSU6AW.js} +73 -16
- package/dist/chunk-EZGSU6AW.js.map +1 -0
- package/dist/chunk-M2ZRQRF4.js +3586 -0
- package/dist/chunk-M2ZRQRF4.js.map +1 -0
- package/dist/chunk-WGDTB6OC.js +316 -0
- package/dist/chunk-WGDTB6OC.js.map +1 -0
- package/dist/{chunk-SJSPR4ZU.cjs → chunk-ZE2RDS47.cjs} +75 -18
- package/dist/chunk-ZE2RDS47.cjs.map +1 -0
- package/dist/cli/flux-visualize.cjs +108 -0
- package/dist/cli/flux-visualize.cjs.map +1 -0
- package/dist/cli/flux-visualize.d.cts +1 -0
- package/dist/cli/flux-visualize.d.ts +1 -0
- package/dist/cli/flux-visualize.js +108 -0
- package/dist/cli/flux-visualize.js.map +1 -0
- package/dist/index.cjs +97 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +369 -13
- package/dist/index.d.ts +369 -13
- package/dist/index.js +96 -8
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +11 -3
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +1141 -247
- package/dist/index.node.d.ts +1141 -247
- package/dist/index.node.js +10 -2
- package/dist/types-CGIEQPFv.d.cts +443 -0
- package/dist/types-CGIEQPFv.d.ts +443 -0
- package/package.json +19 -6
- package/dist/chunk-3JGQYHUN.js +0 -1006
- package/dist/chunk-3JGQYHUN.js.map +0 -1
- package/dist/chunk-5OXXH442.cjs +0 -1006
- package/dist/chunk-5OXXH442.cjs.map +0 -1
- package/dist/chunk-SJSPR4ZU.cjs.map +0 -1
- package/dist/chunk-ZAMVC732.js.map +0 -1
- package/dist/types-CZwYGpou.d.cts +0 -353
- package/dist/types-CZwYGpou.d.ts +0 -353
|
@@ -4,12 +4,21 @@ var BunSQLiteStorage = class {
|
|
|
4
4
|
db;
|
|
5
5
|
tableName;
|
|
6
6
|
initialized = false;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new instance of BunSQLiteStorage.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Configuration for the database connection and table naming.
|
|
11
|
+
*/
|
|
7
12
|
constructor(options = {}) {
|
|
8
13
|
this.db = new Database(options.path ?? ":memory:");
|
|
9
|
-
this.tableName = options.tableName ?? "flux_workflows";
|
|
14
|
+
this.tableName = validateSqlIdentifier(options.tableName ?? "flux_workflows", "tableName");
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
17
|
+
* Initializes the database schema and required indexes.
|
|
18
|
+
*
|
|
19
|
+
* This method is idempotent and will be called automatically by other operations if not invoked manually.
|
|
20
|
+
*
|
|
21
|
+
* @throws {Error} If the database schema cannot be created or indexes fail to initialize.
|
|
13
22
|
*/
|
|
14
23
|
async init() {
|
|
15
24
|
if (this.initialized) {
|
|
@@ -27,7 +36,9 @@ var BunSQLiteStorage = class {
|
|
|
27
36
|
error TEXT,
|
|
28
37
|
created_at TEXT NOT NULL,
|
|
29
38
|
updated_at TEXT NOT NULL,
|
|
30
|
-
completed_at TEXT
|
|
39
|
+
completed_at TEXT,
|
|
40
|
+
version INTEGER NOT NULL DEFAULT 1,
|
|
41
|
+
definition_version TEXT
|
|
31
42
|
)
|
|
32
43
|
`);
|
|
33
44
|
this.db.run(`
|
|
@@ -45,14 +56,19 @@ var BunSQLiteStorage = class {
|
|
|
45
56
|
this.initialized = true;
|
|
46
57
|
}
|
|
47
58
|
/**
|
|
48
|
-
*
|
|
59
|
+
* Persists or updates a workflow state in the database.
|
|
60
|
+
*
|
|
61
|
+
* Uses an "INSERT OR REPLACE" strategy to ensure the latest state is always stored for a given ID.
|
|
62
|
+
*
|
|
63
|
+
* @param state - The current state of the workflow to be saved.
|
|
64
|
+
* @throws {Error} If the database write operation fails or serialization errors occur.
|
|
49
65
|
*/
|
|
50
66
|
async save(state) {
|
|
51
67
|
await this.init();
|
|
52
68
|
const stmt = this.db.prepare(`
|
|
53
69
|
INSERT OR REPLACE INTO ${this.tableName}
|
|
54
|
-
(id, name, status, input, data, current_step, history, error, created_at, updated_at, completed_at)
|
|
55
|
-
VALUES ($id, $name, $status, $input, $data, $currentStep, $history, $error, $createdAt, $updatedAt, $completedAt)
|
|
70
|
+
(id, name, status, input, data, current_step, history, error, created_at, updated_at, completed_at, version, definition_version)
|
|
71
|
+
VALUES ($id, $name, $status, $input, $data, $currentStep, $history, $error, $createdAt, $updatedAt, $completedAt, $version, $definitionVersion)
|
|
56
72
|
`);
|
|
57
73
|
stmt.run({
|
|
58
74
|
$id: state.id,
|
|
@@ -65,11 +81,17 @@ var BunSQLiteStorage = class {
|
|
|
65
81
|
$error: state.error ?? null,
|
|
66
82
|
$createdAt: state.createdAt.toISOString(),
|
|
67
83
|
$updatedAt: state.updatedAt.toISOString(),
|
|
68
|
-
$completedAt: state.completedAt?.toISOString() ?? null
|
|
84
|
+
$completedAt: state.completedAt?.toISOString() ?? null,
|
|
85
|
+
$version: state.version,
|
|
86
|
+
$definitionVersion: state.definitionVersion ?? null
|
|
69
87
|
});
|
|
70
88
|
}
|
|
71
89
|
/**
|
|
72
|
-
*
|
|
90
|
+
* Retrieves a workflow state by its unique identifier.
|
|
91
|
+
*
|
|
92
|
+
* @param id - The unique ID of the workflow to load.
|
|
93
|
+
* @returns The reconstructed workflow state, or null if no record is found.
|
|
94
|
+
* @throws {Error} If the database query fails or deserialization of stored JSON fails.
|
|
73
95
|
*/
|
|
74
96
|
async load(id) {
|
|
75
97
|
await this.init();
|
|
@@ -83,7 +105,13 @@ var BunSQLiteStorage = class {
|
|
|
83
105
|
return this.rowToState(row);
|
|
84
106
|
}
|
|
85
107
|
/**
|
|
86
|
-
*
|
|
108
|
+
* Lists workflow states based on the provided filtering criteria.
|
|
109
|
+
*
|
|
110
|
+
* Results are returned in descending order of creation time.
|
|
111
|
+
*
|
|
112
|
+
* @param filter - Criteria for filtering and paginating the results.
|
|
113
|
+
* @returns An array of workflow states matching the filter.
|
|
114
|
+
* @throws {Error} If the database query fails.
|
|
87
115
|
*/
|
|
88
116
|
async list(filter) {
|
|
89
117
|
await this.init();
|
|
@@ -105,6 +133,10 @@ var BunSQLiteStorage = class {
|
|
|
105
133
|
params.$status = filter.status;
|
|
106
134
|
}
|
|
107
135
|
}
|
|
136
|
+
if (filter?.version) {
|
|
137
|
+
query += " AND definition_version = $version";
|
|
138
|
+
params.$version = filter.version;
|
|
139
|
+
}
|
|
108
140
|
query += " ORDER BY created_at DESC";
|
|
109
141
|
if (filter?.limit) {
|
|
110
142
|
query += " LIMIT $limit";
|
|
@@ -119,7 +151,10 @@ var BunSQLiteStorage = class {
|
|
|
119
151
|
return rows.map((row) => this.rowToState(row));
|
|
120
152
|
}
|
|
121
153
|
/**
|
|
122
|
-
*
|
|
154
|
+
* Deletes a workflow state from the database.
|
|
155
|
+
*
|
|
156
|
+
* @param id - The unique ID of the workflow to delete.
|
|
157
|
+
* @throws {Error} If the database deletion fails.
|
|
123
158
|
*/
|
|
124
159
|
async delete(id) {
|
|
125
160
|
await this.init();
|
|
@@ -129,14 +164,20 @@ var BunSQLiteStorage = class {
|
|
|
129
164
|
stmt.run({ $id: id });
|
|
130
165
|
}
|
|
131
166
|
/**
|
|
132
|
-
*
|
|
167
|
+
* Closes the database connection and resets the initialization state.
|
|
168
|
+
*
|
|
169
|
+
* @throws {Error} If the database connection cannot be closed cleanly.
|
|
133
170
|
*/
|
|
134
171
|
async close() {
|
|
135
172
|
this.db.close();
|
|
136
173
|
this.initialized = false;
|
|
137
174
|
}
|
|
138
175
|
/**
|
|
139
|
-
*
|
|
176
|
+
* Converts a raw database row into a structured WorkflowState object.
|
|
177
|
+
*
|
|
178
|
+
* @param row - The raw SQLite row data.
|
|
179
|
+
* @returns The parsed workflow state.
|
|
180
|
+
* @private
|
|
140
181
|
*/
|
|
141
182
|
rowToState(row) {
|
|
142
183
|
return {
|
|
@@ -150,24 +191,40 @@ var BunSQLiteStorage = class {
|
|
|
150
191
|
error: row.error ?? void 0,
|
|
151
192
|
createdAt: new Date(row.created_at),
|
|
152
193
|
updatedAt: new Date(row.updated_at),
|
|
153
|
-
completedAt: row.completed_at ? new Date(row.completed_at) : void 0
|
|
194
|
+
completedAt: row.completed_at ? new Date(row.completed_at) : void 0,
|
|
195
|
+
version: row.version,
|
|
196
|
+
definitionVersion: row.definition_version ?? void 0
|
|
154
197
|
};
|
|
155
198
|
}
|
|
156
199
|
/**
|
|
157
|
-
*
|
|
200
|
+
* Provides direct access to the underlying Bun SQLite Database instance.
|
|
201
|
+
*
|
|
202
|
+
* Useful for performing custom queries or maintenance tasks.
|
|
203
|
+
*
|
|
204
|
+
* @returns The raw Database instance.
|
|
158
205
|
*/
|
|
159
206
|
getDatabase() {
|
|
160
207
|
return this.db;
|
|
161
208
|
}
|
|
162
209
|
/**
|
|
163
|
-
*
|
|
210
|
+
* Performs a VACUUM operation to reclaim unused space and defragment the database.
|
|
211
|
+
*
|
|
212
|
+
* @throws {Error} If the VACUUM operation fails.
|
|
164
213
|
*/
|
|
165
214
|
vacuum() {
|
|
166
215
|
this.db.run("VACUUM");
|
|
167
216
|
}
|
|
168
217
|
};
|
|
218
|
+
function validateSqlIdentifier(value, field) {
|
|
219
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(value)) {
|
|
220
|
+
throw new Error(
|
|
221
|
+
`Invalid ${field}: "${value}". Only letters, numbers, and underscores are allowed.`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return value;
|
|
225
|
+
}
|
|
169
226
|
|
|
170
227
|
export {
|
|
171
228
|
BunSQLiteStorage
|
|
172
229
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-EZGSU6AW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/storage/BunSQLiteStorage.ts"],"sourcesContent":["import { Database } from 'bun:sqlite'\nimport type { WorkflowFilter, WorkflowState, WorkflowStorage } from '../types'\n\n/**\n * Configuration options for the Bun SQLite storage adapter.\n */\nexport interface BunSQLiteStorageOptions {\n /**\n * Path to the SQLite database file.\n * Use ':memory:' for an ephemeral in-memory database.\n */\n path?: string\n /**\n * Name of the table used to store workflow states.\n */\n tableName?: string\n}\n\n/**\n * BunSQLiteStorage provides a persistent storage backend for Flux workflows using Bun's native SQLite module.\n *\n * It handles automatic table creation, indexing for performance, and serialization of workflow state\n * into a relational format.\n *\n * @example\n * ```typescript\n * const storage = new BunSQLiteStorage({\n * path: './workflows.db',\n * tableName: 'my_workflows'\n * });\n * await storage.init();\n * ```\n */\nexport class BunSQLiteStorage implements WorkflowStorage {\n private db: Database\n private tableName: string\n private initialized = false\n\n /**\n * Creates a new instance of BunSQLiteStorage.\n *\n * @param options - Configuration for the database connection and table naming.\n */\n constructor(options: BunSQLiteStorageOptions = {}) {\n this.db = new Database(options.path ?? ':memory:')\n this.tableName = validateSqlIdentifier(options.tableName ?? 'flux_workflows', 'tableName')\n }\n\n /**\n * Initializes the database schema and required indexes.\n *\n * This method is idempotent and will be called automatically by other operations if not invoked manually.\n *\n * @throws {Error} If the database schema cannot be created or indexes fail to initialize.\n */\n async init(): Promise<void> {\n if (this.initialized) {\n return\n }\n\n this.db.run(`\n CREATE TABLE IF NOT EXISTS ${this.tableName} (\n id TEXT PRIMARY KEY,\n name TEXT NOT NULL,\n status TEXT NOT NULL,\n input TEXT NOT NULL,\n data TEXT NOT NULL,\n current_step INTEGER NOT NULL,\n history TEXT NOT NULL,\n error TEXT,\n created_at TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n completed_at TEXT,\n version INTEGER NOT NULL DEFAULT 1,\n definition_version TEXT\n )\n `)\n\n this.db.run(`\n CREATE INDEX IF NOT EXISTS idx_${this.tableName}_name \n ON ${this.tableName}(name)\n `)\n this.db.run(`\n CREATE INDEX IF NOT EXISTS idx_${this.tableName}_status \n ON ${this.tableName}(status)\n `)\n this.db.run(`\n CREATE INDEX IF NOT EXISTS idx_${this.tableName}_created \n ON ${this.tableName}(created_at DESC)\n `)\n\n this.initialized = true\n }\n\n /**\n * Persists or updates a workflow state in the database.\n *\n * Uses an \"INSERT OR REPLACE\" strategy to ensure the latest state is always stored for a given ID.\n *\n * @param state - The current state of the workflow to be saved.\n * @throws {Error} If the database write operation fails or serialization errors occur.\n */\n async save(state: WorkflowState): Promise<void> {\n await this.init()\n\n const stmt = this.db.prepare(`\n INSERT OR REPLACE INTO ${this.tableName} \n (id, name, status, input, data, current_step, history, error, created_at, updated_at, completed_at, version, definition_version)\n VALUES ($id, $name, $status, $input, $data, $currentStep, $history, $error, $createdAt, $updatedAt, $completedAt, $version, $definitionVersion)\n `)\n\n stmt.run({\n $id: state.id,\n $name: state.name,\n $status: state.status,\n $input: JSON.stringify(state.input),\n $data: JSON.stringify(state.data),\n $currentStep: state.currentStep,\n $history: JSON.stringify(state.history),\n $error: state.error ?? null,\n $createdAt: state.createdAt.toISOString(),\n $updatedAt: state.updatedAt.toISOString(),\n $completedAt: state.completedAt?.toISOString() ?? null,\n $version: state.version,\n $definitionVersion: state.definitionVersion ?? null,\n })\n }\n\n /**\n * Retrieves a workflow state by its unique identifier.\n *\n * @param id - The unique ID of the workflow to load.\n * @returns The reconstructed workflow state, or null if no record is found.\n * @throws {Error} If the database query fails or deserialization of stored JSON fails.\n */\n async load(id: string): Promise<WorkflowState | null> {\n await this.init()\n\n const stmt = this.db.prepare(`\n SELECT * FROM ${this.tableName} WHERE id = $id\n `)\n\n const row = stmt.get({ $id: id }) as SQLiteRow | null\n\n if (!row) {\n return null\n }\n\n return this.rowToState(row)\n }\n\n /**\n * Lists workflow states based on the provided filtering criteria.\n *\n * Results are returned in descending order of creation time.\n *\n * @param filter - Criteria for filtering and paginating the results.\n * @returns An array of workflow states matching the filter.\n * @throws {Error} If the database query fails.\n */\n async list(filter?: WorkflowFilter): Promise<WorkflowState[]> {\n await this.init()\n\n let query = `SELECT * FROM ${this.tableName} WHERE 1=1`\n const params: Record<string, unknown> = {}\n\n if (filter?.name) {\n query += ' AND name = $name'\n params.$name = filter.name\n }\n\n if (filter?.status) {\n if (Array.isArray(filter.status)) {\n const placeholders = filter.status.map((_, i) => `$status${i}`).join(', ')\n query += ` AND status IN (${placeholders})`\n filter.status.forEach((s, i) => {\n params[`$status${i}`] = s\n })\n } else {\n query += ' AND status = $status'\n params.$status = filter.status\n }\n }\n\n if (filter?.version) {\n query += ' AND definition_version = $version'\n params.$version = filter.version\n }\n\n query += ' ORDER BY created_at DESC'\n\n if (filter?.limit) {\n query += ' LIMIT $limit'\n params.$limit = filter.limit\n }\n\n if (filter?.offset) {\n query += ' OFFSET $offset'\n params.$offset = filter.offset\n }\n\n const stmt = this.db.prepare(query)\n const rows = stmt.all(params as Record<string, any>) as SQLiteRow[]\n\n return rows.map((row) => this.rowToState(row))\n }\n\n /**\n * Deletes a workflow state from the database.\n *\n * @param id - The unique ID of the workflow to delete.\n * @throws {Error} If the database deletion fails.\n */\n async delete(id: string): Promise<void> {\n await this.init()\n\n const stmt = this.db.prepare(`\n DELETE FROM ${this.tableName} WHERE id = $id\n `)\n\n stmt.run({ $id: id })\n }\n\n /**\n * Closes the database connection and resets the initialization state.\n *\n * @throws {Error} If the database connection cannot be closed cleanly.\n */\n async close(): Promise<void> {\n this.db.close()\n this.initialized = false\n }\n\n /**\n * Converts a raw database row into a structured WorkflowState object.\n *\n * @param row - The raw SQLite row data.\n * @returns The parsed workflow state.\n * @private\n */\n private rowToState(row: SQLiteRow): WorkflowState {\n return {\n id: row.id,\n name: row.name,\n status: row.status as WorkflowState['status'],\n input: JSON.parse(row.input),\n data: JSON.parse(row.data),\n currentStep: row.current_step,\n history: JSON.parse(row.history),\n error: row.error ?? undefined,\n createdAt: new Date(row.created_at),\n updatedAt: new Date(row.updated_at),\n completedAt: row.completed_at ? new Date(row.completed_at) : undefined,\n version: row.version,\n definitionVersion: row.definition_version ?? undefined,\n }\n }\n\n /**\n * Provides direct access to the underlying Bun SQLite Database instance.\n *\n * Useful for performing custom queries or maintenance tasks.\n *\n * @returns The raw Database instance.\n */\n getDatabase(): Database {\n return this.db\n }\n\n /**\n * Performs a VACUUM operation to reclaim unused space and defragment the database.\n *\n * @throws {Error} If the VACUUM operation fails.\n */\n vacuum(): void {\n this.db.run('VACUUM')\n }\n}\n\nfunction validateSqlIdentifier(value: string, field: string): string {\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(value)) {\n throw new Error(\n `Invalid ${field}: \"${value}\". Only letters, numbers, and underscores are allowed.`\n )\n }\n return value\n}\n\n/**\n * Internal representation of a workflow record in the SQLite database.\n */\ninterface SQLiteRow {\n id: string\n name: string\n status: string\n input: string\n data: string\n current_step: number\n history: string\n error: string | null\n created_at: string\n updated_at: string\n completed_at: string | null\n version: number\n definition_version: string | null\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AAiClB,IAAM,mBAAN,MAAkD;AAAA,EAC/C;AAAA,EACA;AAAA,EACA,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtB,YAAY,UAAmC,CAAC,GAAG;AACjD,SAAK,KAAK,IAAI,SAAS,QAAQ,QAAQ,UAAU;AACjD,SAAK,YAAY,sBAAsB,QAAQ,aAAa,kBAAkB,WAAW;AAAA,EAC3F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,OAAsB;AAC1B,QAAI,KAAK,aAAa;AACpB;AAAA,IACF;AAEA,SAAK,GAAG,IAAI;AAAA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