@axiom-lattice/pg-stores 1.0.70 → 1.0.71

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.70 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@1.0.71 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
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 206.41 KB
12
- ESM dist/index.mjs.map 392.08 KB
13
- ESM ⚡️ Build success in 530ms
14
- CJS dist/index.js 211.69 KB
15
- CJS dist/index.js.map 392.24 KB
16
- CJS ⚡️ Build success in 532ms
11
+ ESM dist/index.mjs 206.81 KB
12
+ ESM dist/index.mjs.map 392.87 KB
13
+ ESM ⚡️ Build success in 696ms
14
+ CJS dist/index.js 212.09 KB
15
+ CJS dist/index.js.map 393.03 KB
16
+ CJS ⚡️ Build success in 701ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 17337ms
19
- DTS dist/index.d.ts 50.88 KB
20
- DTS dist/index.d.mts 50.88 KB
18
+ DTS ⚡️ Build success in 16225ms
19
+ DTS dist/index.d.ts 50.95 KB
20
+ DTS dist/index.d.mts 50.95 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 1.0.71
4
+
5
+ ### Patch Changes
6
+
7
+ - b4bdb6c: up new
8
+ - Updated dependencies [b4bdb6c]
9
+ - @axiom-lattice/protocols@2.1.42
10
+ - @axiom-lattice/core@2.1.80
11
+
3
12
  ## 1.0.70
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -698,6 +698,7 @@ declare class PostgreSQLWorkflowTrackingStore implements WorkflowTrackingStore {
698
698
  getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
699
699
  getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
700
700
  createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
+ upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
702
  updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
702
703
  getRunSteps(runId: string): Promise<RunStep[]>;
703
704
  getRunStepsByType(runId: string, stepType: StepType): Promise<RunStep[]>;
package/dist/index.d.ts CHANGED
@@ -698,6 +698,7 @@ declare class PostgreSQLWorkflowTrackingStore implements WorkflowTrackingStore {
698
698
  getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
699
699
  getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
700
700
  createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
+ upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
702
  updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
702
703
  getRunSteps(runId: string): Promise<RunStep[]>;
703
704
  getRunStepsByType(runId: string, stepType: StepType): Promise<RunStep[]>;
package/dist/index.js CHANGED
@@ -3275,6 +3275,17 @@ var PostgreSQLWorkflowTrackingStore = class {
3275
3275
  updatedAt: now
3276
3276
  };
3277
3277
  }
3278
+ async upsertRunStep(request) {
3279
+ await this.ensureInitialized();
3280
+ const result = await this.pool.query(
3281
+ `SELECT * FROM lattice_workflow_steps WHERE run_id = $1 AND step_type = $2 AND step_name = $3`,
3282
+ [request.runId, request.stepType, request.stepName]
3283
+ );
3284
+ if (result.rows.length > 0) {
3285
+ return this.mapRowToRunStep(result.rows[0]);
3286
+ }
3287
+ return this.createRunStep(request);
3288
+ }
3278
3289
  async updateRunStep(runId, stepId, updates) {
3279
3290
  await this.ensureInitialized();
3280
3291
  const now = /* @__PURE__ */ new Date();