@axiom-lattice/pg-stores 1.0.49 → 1.0.51

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/pg-stores@1.0.49 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@1.0.51 build /home/runner/work/agentic/agentic/packages/pg-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,11 +10,11 @@
10
10
  ESM Build start
11
11
  ESM dist/index.mjs 156.69 KB
12
12
  ESM dist/index.mjs.map 297.04 KB
13
- ESM ⚡️ Build success in 266ms
13
+ ESM ⚡️ Build success in 453ms
14
14
  CJS dist/index.js 161.08 KB
15
15
  CJS dist/index.js.map 297.13 KB
16
- CJS ⚡️ Build success in 319ms
16
+ CJS ⚡️ Build success in 466ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 11433ms
18
+ DTS ⚡️ Build success in 11985ms
19
19
  DTS dist/index.d.ts 40.25 KB
20
20
  DTS dist/index.d.mts 40.25 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 1.0.51
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3b8f197]
8
+ - @axiom-lattice/core@2.1.61
9
+
10
+ ## 1.0.50
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [b68151a]
15
+ - @axiom-lattice/core@2.1.60
16
+
3
17
  ## 1.0.49
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,45 @@
1
+ /**
2
+ * PostgreSQL Workflow Tracking Store Example
3
+ *
4
+ * Demonstrates how to swap the in-memory workflow tracking store
5
+ * to PostgreSQL in your application startup.
6
+ */
7
+
8
+ import { PostgreSQLWorkflowTrackingStore } from "@axiom-lattice/pg-stores";
9
+ import { storeLatticeManager } from "@axiom-lattice/core";
10
+
11
+ async function main() {
12
+ const poolConfig = process.env.DATABASE_URL || "postgresql://user:password@localhost:5432/axiom";
13
+
14
+ console.log("=== PostgreSQL Workflow Tracking Store Example ===\n");
15
+
16
+ try {
17
+ const pgStore = new PostgreSQLWorkflowTrackingStore({
18
+ poolConfig,
19
+ autoMigrate: true,
20
+ });
21
+
22
+ await pgStore.initialize();
23
+ console.log("✓ PostgreSQL workflow tracking store initialized\n");
24
+
25
+ if (storeLatticeManager.hasLattice("default", "workflowTracking")) {
26
+ storeLatticeManager.removeLattice("default", "workflowTracking");
27
+ }
28
+ storeLatticeManager.registerLattice("default", "workflowTracking", pgStore);
29
+ console.log("✓ Replaced in-memory workflow tracking store with PostgreSQL\n");
30
+
31
+ const registered = storeLatticeManager.getStoreLattice("default", "workflowTracking");
32
+ console.log(`✓ Verified: ${registered.store.constructor.name} is active\n`);
33
+
34
+ // Cleanup
35
+ await pgStore.dispose();
36
+ console.log("✓ Disposed store connection");
37
+
38
+ console.log("\n=== Example completed successfully! ===");
39
+ } catch (error) {
40
+ console.error("Error:", error);
41
+ process.exit(1);
42
+ }
43
+ }
44
+
45
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/pg-stores",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "PG stores implementation for Axiom Lattice framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "pg": "^8.16.3",
24
24
  "@axiom-lattice/protocols": "2.1.31",
25
- "@axiom-lattice/core": "2.1.59"
25
+ "@axiom-lattice/core": "2.1.61"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^20.11.24",