@axiom-lattice/pg-stores 2.0.4 → 2.0.6

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@2.0.4 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@2.0.6 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 266.52 KB
12
- ESM dist/index.mjs.map 509.43 KB
13
- ESM ⚡️ Build success in 619ms
14
- CJS dist/index.js 272.93 KB
15
- CJS dist/index.js.map 509.71 KB
16
- CJS ⚡️ Build success in 701ms
11
+ ESM dist/index.mjs 270.57 KB
12
+ ESM dist/index.mjs.map 516.16 KB
13
+ ESM ⚡️ Build success in 531ms
14
+ CJS dist/index.js 277.18 KB
15
+ CJS dist/index.js.map 516.45 KB
16
+ CJS ⚡️ Build success in 557ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 17193ms
19
- DTS dist/index.d.ts 61.42 KB
20
- DTS dist/index.d.mts 61.42 KB
18
+ DTS ⚡️ Build success in 12185ms
19
+ DTS dist/index.d.ts 61.92 KB
20
+ DTS dist/index.d.mts 61.92 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 2.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [404ce6c]
8
+ - @axiom-lattice/core@3.0.6
9
+
10
+ ## 2.0.5
11
+
12
+ ### Patch Changes
13
+
14
+ - c8cd0ae: fix issues
15
+ - Updated dependencies [c8cd0ae]
16
+ - @axiom-lattice/core@3.0.5
17
+
3
18
  ## 2.0.4
4
19
 
5
20
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -868,6 +868,7 @@ declare class PostgreSQLEvalStore implements EvalStore {
868
868
  status?: EvalRun["status"];
869
869
  passedCases?: number;
870
870
  failedCases?: number;
871
+ interruptedCases?: number;
871
872
  avgScore?: number;
872
873
  error?: string;
873
874
  completedAt?: Date;
@@ -1797,6 +1798,12 @@ declare const createEvalRunResultsTable: Migration;
1797
1798
  declare const addHoldoutToEvalRuns: Migration;
1798
1799
  /** Add env columns (run environment) to eval runs (existing installs) */
1799
1800
  declare const addEnvToEvalRuns: Migration;
1801
+ /** Add HITL interrupt tracking: interrupted flag on run results + interrupted count on runs */
1802
+ declare const addInterruptColumnsToEval: Migration;
1803
+ /** Add HITL auto-resolve policy to eval cases */
1804
+ declare const addInterruptPolicyToEvalCases: Migration;
1805
+ /** Enforce unique eval project name per tenant (eval-{agent-id} convention) */
1806
+ declare const enforceUniqueEvalProjectName: Migration;
1800
1807
  /** All eval migrations in version order */
1801
1808
  declare const evalMigrations: Migration[];
1802
1809
 
@@ -1810,4 +1817,4 @@ declare const addFileContentType: Migration;
1810
1817
 
1811
1818
  declare const createCollectionsTable: Migration;
1812
1819
 
1813
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1820
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -868,6 +868,7 @@ declare class PostgreSQLEvalStore implements EvalStore {
868
868
  status?: EvalRun["status"];
869
869
  passedCases?: number;
870
870
  failedCases?: number;
871
+ interruptedCases?: number;
871
872
  avgScore?: number;
872
873
  error?: string;
873
874
  completedAt?: Date;
@@ -1797,6 +1798,12 @@ declare const createEvalRunResultsTable: Migration;
1797
1798
  declare const addHoldoutToEvalRuns: Migration;
1798
1799
  /** Add env columns (run environment) to eval runs (existing installs) */
1799
1800
  declare const addEnvToEvalRuns: Migration;
1801
+ /** Add HITL interrupt tracking: interrupted flag on run results + interrupted count on runs */
1802
+ declare const addInterruptColumnsToEval: Migration;
1803
+ /** Add HITL auto-resolve policy to eval cases */
1804
+ declare const addInterruptPolicyToEvalCases: Migration;
1805
+ /** Enforce unique eval project name per tenant (eval-{agent-id} convention) */
1806
+ declare const enforceUniqueEvalProjectName: Migration;
1800
1807
  /** All eval migrations in version order */
1801
1808
  declare const evalMigrations: Migration[];
1802
1809
 
@@ -1810,4 +1817,4 @@ declare const addFileContentType: Migration;
1810
1817
 
1811
1818
  declare const createCollectionsTable: Migration;
1812
1819
 
1813
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1820
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.js CHANGED
@@ -60,6 +60,8 @@ __export(index_exports, {
60
60
  addEnvToEvalRuns: () => addEnvToEvalRuns,
61
61
  addFileContentType: () => addFileContentType,
62
62
  addHoldoutToEvalRuns: () => addHoldoutToEvalRuns,
63
+ addInterruptColumnsToEval: () => addInterruptColumnsToEval,
64
+ addInterruptPolicyToEvalCases: () => addInterruptPolicyToEvalCases,
63
65
  addProjectConfigColumn: () => addProjectConfigColumn,
64
66
  addScheduleTenantId: () => addScheduleTenantId,
65
67
  addSkillTenantId: () => addSkillTenantId,
@@ -97,6 +99,7 @@ __export(index_exports, {
97
99
  createUsersTable: () => createUsersTable,
98
100
  createWorkflowTrackingTables: () => createWorkflowTrackingTables,
99
101
  createWorkspacesTable: () => createWorkspacesTable,
102
+ enforceUniqueEvalProjectName: () => enforceUniqueEvalProjectName,
100
103
  evalMigrations: () => evalMigrations,
101
104
  mapRowToRunStep: () => mapRowToRunStep,
102
105
  mapRowToWorkflowRun: () => mapRowToWorkflowRun,
@@ -4022,6 +4025,103 @@ var addEnvToEvalRuns = {
4022
4025
  `);
4023
4026
  }
4024
4027
  };
4028
+ var addInterruptColumnsToEval = {
4029
+ version: 111,
4030
+ name: "add_interrupt_columns_to_eval",
4031
+ up: async (client) => {
4032
+ await client.query(`
4033
+ ALTER TABLE lattice_eval_run_results
4034
+ ADD COLUMN IF NOT EXISTS interrupted BOOLEAN NOT NULL DEFAULT FALSE
4035
+ `);
4036
+ await client.query(`
4037
+ ALTER TABLE lattice_eval_runs
4038
+ ADD COLUMN IF NOT EXISTS interrupted_cases INTEGER NOT NULL DEFAULT 0
4039
+ `);
4040
+ },
4041
+ down: async (client) => {
4042
+ await client.query(`
4043
+ ALTER TABLE lattice_eval_run_results DROP COLUMN IF EXISTS interrupted
4044
+ `);
4045
+ await client.query(`
4046
+ ALTER TABLE lattice_eval_runs DROP COLUMN IF EXISTS interrupted_cases
4047
+ `);
4048
+ }
4049
+ };
4050
+ var addInterruptPolicyToEvalCases = {
4051
+ version: 112,
4052
+ name: "add_interrupt_policy_to_eval_cases",
4053
+ up: async (client) => {
4054
+ await client.query(`
4055
+ ALTER TABLE lattice_eval_cases
4056
+ ADD COLUMN IF NOT EXISTS interrupt_policy JSONB
4057
+ `);
4058
+ },
4059
+ down: async (client) => {
4060
+ await client.query(`
4061
+ ALTER TABLE lattice_eval_cases DROP COLUMN IF EXISTS interrupt_policy
4062
+ `);
4063
+ }
4064
+ };
4065
+ var enforceUniqueEvalProjectName = {
4066
+ version: 163,
4067
+ name: "enforce_unique_eval_project_name",
4068
+ up: async (client) => {
4069
+ await client.query(`
4070
+ UPDATE lattice_eval_suites s
4071
+ SET project_id = (
4072
+ SELECT p2.id FROM lattice_eval_projects p2
4073
+ WHERE p2.tenant_id = p.tenant_id AND p2.name = p.name
4074
+ ORDER BY p2.created_at DESC, p2.id DESC
4075
+ LIMIT 1
4076
+ )
4077
+ FROM lattice_eval_projects p
4078
+ WHERE s.project_id = p.id
4079
+ AND s.project_id <> (
4080
+ SELECT p2.id FROM lattice_eval_projects p2
4081
+ WHERE p2.tenant_id = p.tenant_id AND p2.name = p.name
4082
+ ORDER BY p2.created_at DESC, p2.id DESC
4083
+ LIMIT 1
4084
+ )
4085
+ `);
4086
+ await client.query(`
4087
+ UPDATE lattice_eval_runs r
4088
+ SET project_id = (
4089
+ SELECT p2.id FROM lattice_eval_projects p2
4090
+ WHERE p2.tenant_id = p.tenant_id AND p2.name = p.name
4091
+ ORDER BY p2.created_at DESC, p2.id DESC
4092
+ LIMIT 1
4093
+ )
4094
+ FROM lattice_eval_projects p
4095
+ WHERE r.project_id = p.id
4096
+ AND r.project_id <> (
4097
+ SELECT p2.id FROM lattice_eval_projects p2
4098
+ WHERE p2.tenant_id = p.tenant_id AND p2.name = p.name
4099
+ ORDER BY p2.created_at DESC, p2.id DESC
4100
+ LIMIT 1
4101
+ )
4102
+ `);
4103
+ await client.query(`
4104
+ DELETE FROM lattice_eval_projects p
4105
+ USING lattice_eval_projects p2
4106
+ WHERE p.tenant_id = p2.tenant_id
4107
+ AND p.name = p2.name
4108
+ AND (
4109
+ p.created_at < p2.created_at
4110
+ OR (p.created_at = p2.created_at AND p.id < p2.id)
4111
+ )
4112
+ `);
4113
+ await client.query(`
4114
+ ALTER TABLE lattice_eval_projects
4115
+ ADD CONSTRAINT lattice_eval_projects_tenant_name_unique UNIQUE (tenant_id, name)
4116
+ `);
4117
+ },
4118
+ down: async (client) => {
4119
+ await client.query(`
4120
+ ALTER TABLE lattice_eval_projects
4121
+ DROP CONSTRAINT IF EXISTS lattice_eval_projects_tenant_name_unique
4122
+ `);
4123
+ }
4124
+ };
4025
4125
  var evalMigrations = [
4026
4126
  createEvalProjectsTable,
4027
4127
  createEvalSuitesTable,
@@ -4029,7 +4129,10 @@ var evalMigrations = [
4029
4129
  createEvalRunsTable,
4030
4130
  createEvalRunResultsTable,
4031
4131
  addHoldoutToEvalRuns,
4032
- addEnvToEvalRuns
4132
+ addEnvToEvalRuns,
4133
+ addInterruptColumnsToEval,
4134
+ addInterruptPolicyToEvalCases,
4135
+ enforceUniqueEvalProjectName
4033
4136
  ];
4034
4137
 
4035
4138
  // src/stores/PostgreSQLEvalStore.ts
@@ -4136,6 +4239,7 @@ var PostgreSQLEvalStore = class {
4136
4239
  outputType: row.output_type || "message_content",
4137
4240
  contentAssertion: row.content_assertion || "",
4138
4241
  rubrics: this.parseOptionalJson(row.rubrics),
4242
+ interruptPolicy: this.parseOptionalJson(row.interrupt_policy),
4139
4243
  createdAt: new Date(row.created_at),
4140
4244
  updatedAt: new Date(row.updated_at)
4141
4245
  };
@@ -4150,6 +4254,7 @@ var PostgreSQLEvalStore = class {
4150
4254
  totalCases: row.total_cases ?? 0,
4151
4255
  passedCases: row.passed_cases ?? 0,
4152
4256
  failedCases: row.failed_cases ?? 0,
4257
+ interruptedCases: row.interrupted_cases ?? 0,
4153
4258
  avgScore: row.avg_score ?? 0,
4154
4259
  error: row.error,
4155
4260
  holdout: row.holdout,
@@ -4174,6 +4279,7 @@ var PostgreSQLEvalStore = class {
4174
4279
  messages: this.parseOptionalJson(row.messages),
4175
4280
  logs: this.parseOptionalJson(row.logs),
4176
4281
  error: row.error,
4282
+ interrupted: row.interrupted ?? false,
4177
4283
  createdAt: new Date(row.created_at)
4178
4284
  };
4179
4285
  }
@@ -4393,7 +4499,7 @@ var PostgreSQLEvalStore = class {
4393
4499
  const { rows } = await this.pool.query(
4394
4500
  `SELECT id, tenant_id, suite_id,
4395
4501
  input_message, input_files, steps,
4396
- output_type, content_assertion, rubrics,
4502
+ output_type, content_assertion, rubrics, interrupt_policy,
4397
4503
  created_at, updated_at
4398
4504
  FROM lattice_eval_cases
4399
4505
  WHERE tenant_id = $1 AND suite_id = $2
@@ -4408,7 +4514,7 @@ var PostgreSQLEvalStore = class {
4408
4514
  const { rows } = await this.pool.query(
4409
4515
  `SELECT id, tenant_id, suite_id,
4410
4516
  input_message, input_files, steps,
4411
- output_type, content_assertion, rubrics,
4517
+ output_type, content_assertion, rubrics, interrupt_policy,
4412
4518
  created_at, updated_at
4413
4519
  FROM lattice_eval_cases
4414
4520
  WHERE id = $1 AND tenant_id = $2`,
@@ -4422,11 +4528,11 @@ var PostgreSQLEvalStore = class {
4422
4528
  const actualId = id || (0, import_uuid2.v4)();
4423
4529
  const { rows } = await this.pool.query(
4424
4530
  `INSERT INTO lattice_eval_cases
4425
- (id, tenant_id, suite_id, input_message, input_files, steps, output_type, content_assertion, rubrics)
4426
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
4531
+ (id, tenant_id, suite_id, input_message, input_files, steps, output_type, content_assertion, rubrics, interrupt_policy)
4532
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
4427
4533
  RETURNING id, tenant_id, suite_id,
4428
4534
  input_message, input_files, steps,
4429
- output_type, content_assertion, rubrics,
4535
+ output_type, content_assertion, rubrics, interrupt_policy,
4430
4536
  created_at, updated_at`,
4431
4537
  [
4432
4538
  actualId,
@@ -4437,7 +4543,8 @@ var PostgreSQLEvalStore = class {
4437
4543
  JSON.stringify(data.steps),
4438
4544
  data.outputType,
4439
4545
  data.contentAssertion || null,
4440
- JSON.stringify(data.rubrics || [])
4546
+ JSON.stringify(data.rubrics || []),
4547
+ data.interruptPolicy ? JSON.stringify(data.interruptPolicy) : null
4441
4548
  ]
4442
4549
  );
4443
4550
  return this.mapRowToCase(rows[0]);
@@ -4472,6 +4579,10 @@ var PostgreSQLEvalStore = class {
4472
4579
  set.push(`rubrics = $${i++}`);
4473
4580
  vals.push(JSON.stringify(updates.rubrics));
4474
4581
  }
4582
+ if (updates.interruptPolicy !== void 0) {
4583
+ set.push(`interrupt_policy = $${i++}`);
4584
+ vals.push(updates.interruptPolicy ? JSON.stringify(updates.interruptPolicy) : null);
4585
+ }
4475
4586
  if (set.length === 0) return this.getCaseById(tenantId, id);
4476
4587
  set.push(`updated_at = NOW()`);
4477
4588
  vals.push(id, tenantId);
@@ -4480,7 +4591,7 @@ var PostgreSQLEvalStore = class {
4480
4591
  WHERE id = $${i} AND tenant_id = $${i + 1}
4481
4592
  RETURNING id, tenant_id, suite_id,
4482
4593
  input_message, input_files, steps,
4483
- output_type, content_assertion, rubrics,
4594
+ output_type, content_assertion, rubrics, interrupt_policy,
4484
4595
  created_at, updated_at`,
4485
4596
  vals
4486
4597
  );
@@ -4515,7 +4626,7 @@ var PostgreSQLEvalStore = class {
4515
4626
  const { rows } = await this.pool.query(
4516
4627
  `SELECT id, project_id, tenant_id,
4517
4628
  status, concurrency, total_cases,
4518
- passed_cases, failed_cases, avg_score,
4629
+ passed_cases, failed_cases, interrupted_cases, avg_score,
4519
4630
  error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4520
4631
  FROM lattice_eval_runs
4521
4632
  WHERE ${conditions.join(" AND ")}
@@ -4530,7 +4641,7 @@ var PostgreSQLEvalStore = class {
4530
4641
  const { rows } = await this.pool.query(
4531
4642
  `SELECT id, project_id, tenant_id,
4532
4643
  status, concurrency, total_cases,
4533
- passed_cases, failed_cases, avg_score,
4644
+ passed_cases, failed_cases, interrupted_cases, avg_score,
4534
4645
  error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4535
4646
  FROM lattice_eval_runs
4536
4647
  WHERE id = $1 AND tenant_id = $2`,
@@ -4548,7 +4659,7 @@ var PostgreSQLEvalStore = class {
4548
4659
  VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
4549
4660
  RETURNING id, project_id, tenant_id,
4550
4661
  status, concurrency, total_cases,
4551
- passed_cases, failed_cases, avg_score,
4662
+ passed_cases, failed_cases, interrupted_cases, avg_score,
4552
4663
  error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4553
4664
  [
4554
4665
  actualId,
@@ -4586,6 +4697,10 @@ var PostgreSQLEvalStore = class {
4586
4697
  set.push(`failed_cases = $${i++}`);
4587
4698
  vals.push(updates.failedCases);
4588
4699
  }
4700
+ if (updates.interruptedCases !== void 0) {
4701
+ set.push(`interrupted_cases = $${i++}`);
4702
+ vals.push(updates.interruptedCases);
4703
+ }
4589
4704
  if (updates.avgScore !== void 0) {
4590
4705
  set.push(`avg_score = $${i++}`);
4591
4706
  vals.push(updates.avgScore);
@@ -4605,7 +4720,7 @@ var PostgreSQLEvalStore = class {
4605
4720
  WHERE id = $${i} AND tenant_id = $${i + 1}
4606
4721
  RETURNING id, project_id, tenant_id,
4607
4722
  status, concurrency, total_cases,
4608
- passed_cases, failed_cases, avg_score,
4723
+ passed_cases, failed_cases, interrupted_cases, avg_score,
4609
4724
  error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4610
4725
  vals
4611
4726
  );
@@ -4630,7 +4745,7 @@ var PostgreSQLEvalStore = class {
4630
4745
  const { rows } = await this.pool.query(
4631
4746
  `SELECT rr.id, rr.run_id, rr.suite_name, rr.case_id,
4632
4747
  rr.pass, rr.score, rr.summary, rr.dimension_results,
4633
- rr.duration_ms, rr.messages, rr.logs, rr.error, rr.created_at
4748
+ rr.duration_ms, rr.messages, rr.logs, rr.error, rr.interrupted, rr.created_at
4634
4749
  FROM lattice_eval_run_results rr
4635
4750
  INNER JOIN lattice_eval_runs r ON r.id = rr.run_id
4636
4751
  WHERE r.tenant_id = $1 AND rr.run_id = $2
@@ -4645,11 +4760,11 @@ var PostgreSQLEvalStore = class {
4645
4760
  const actualId = id || (0, import_uuid2.v4)();
4646
4761
  const { rows } = await this.pool.query(
4647
4762
  `INSERT INTO lattice_eval_run_results
4648
- (id, run_id, suite_name, case_id, pass, score, summary, dimension_results, duration_ms, messages, logs, error)
4649
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
4763
+ (id, run_id, suite_name, case_id, pass, score, summary, dimension_results, duration_ms, messages, logs, error, interrupted)
4764
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
4650
4765
  RETURNING id, run_id, suite_name, case_id,
4651
4766
  pass, score, summary, dimension_results,
4652
- duration_ms, messages, logs, error, created_at`,
4767
+ duration_ms, messages, logs, error, interrupted, created_at`,
4653
4768
  [
4654
4769
  actualId,
4655
4770
  runId,
@@ -4662,7 +4777,8 @@ var PostgreSQLEvalStore = class {
4662
4777
  data.durationMs ?? null,
4663
4778
  JSON.stringify(data.messages || []),
4664
4779
  JSON.stringify(data.logs || []),
4665
- data.error || null
4780
+ data.error || null,
4781
+ data.interrupted ?? false
4666
4782
  ]
4667
4783
  );
4668
4784
  return this.mapRowToRunResult(rows[0]);
@@ -4716,6 +4832,10 @@ var PostgreSQLEvalStore = class {
4716
4832
  set.push(`error = $${i++}`);
4717
4833
  vals.push(updates.error);
4718
4834
  }
4835
+ if (updates.interrupted !== void 0) {
4836
+ set.push(`interrupted = $${i++}`);
4837
+ vals.push(updates.interrupted);
4838
+ }
4719
4839
  if (set.length === 0) return this.getRunResultById(tenantId, id);
4720
4840
  vals.push(id, tenantId);
4721
4841
  const { rows } = await this.pool.query(
@@ -4746,7 +4866,7 @@ var PostgreSQLEvalStore = class {
4746
4866
  const { rows } = await this.pool.query(
4747
4867
  `SELECT rr.id, rr.run_id, rr.suite_name, rr.case_id,
4748
4868
  rr.pass, rr.score, rr.summary, rr.dimension_results,
4749
- rr.duration_ms, rr.messages, rr.logs, rr.error, rr.created_at
4869
+ rr.duration_ms, rr.messages, rr.logs, rr.error, rr.interrupted, rr.created_at
4750
4870
  FROM lattice_eval_run_results rr
4751
4871
  INNER JOIN lattice_eval_runs r ON r.id = rr.run_id
4752
4872
  WHERE rr.id = $1 AND r.tenant_id = $2`,
@@ -8565,6 +8685,8 @@ function mapRowToChannelIdentityMapping(row) {
8565
8685
  addEnvToEvalRuns,
8566
8686
  addFileContentType,
8567
8687
  addHoldoutToEvalRuns,
8688
+ addInterruptColumnsToEval,
8689
+ addInterruptPolicyToEvalCases,
8568
8690
  addProjectConfigColumn,
8569
8691
  addScheduleTenantId,
8570
8692
  addSkillTenantId,
@@ -8602,6 +8724,7 @@ function mapRowToChannelIdentityMapping(row) {
8602
8724
  createUsersTable,
8603
8725
  createWorkflowTrackingTables,
8604
8726
  createWorkspacesTable,
8727
+ enforceUniqueEvalProjectName,
8605
8728
  evalMigrations,
8606
8729
  mapRowToRunStep,
8607
8730
  mapRowToWorkflowRun,