@axiom-lattice/pg-stores 2.0.2 → 2.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/pg-stores@2.0.2 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@2.0.3 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
- CJS dist/index.js 271.37 KB
12
- CJS dist/index.js.map 507.36 KB
13
- CJS ⚡️ Build success in 671ms
14
- ESM dist/index.mjs 265.05 KB
15
- ESM dist/index.mjs.map 507.10 KB
16
- ESM ⚡️ Build success in 673ms
11
+ ESM dist/index.mjs 266.52 KB
12
+ ESM dist/index.mjs.map 509.43 KB
13
+ ESM ⚡️ Build success in 788ms
14
+ CJS dist/index.js 272.93 KB
15
+ CJS dist/index.js.map 509.71 KB
16
+ CJS ⚡️ Build success in 796ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 15436ms
19
- DTS dist/index.d.ts 61.16 KB
20
- DTS dist/index.d.mts 61.16 KB
18
+ DTS ⚡️ Build success in 15628ms
19
+ DTS dist/index.d.ts 61.42 KB
20
+ DTS dist/index.d.mts 61.42 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 2.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 8f54c19: new ux
8
+ - Updated dependencies [8f54c19]
9
+ - @axiom-lattice/core@3.0.3
10
+ - @axiom-lattice/protocols@3.0.2
11
+
3
12
  ## 2.0.2
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1793,6 +1793,10 @@ declare const createEvalCasesTable: Migration;
1793
1793
  declare const createEvalRunsTable: Migration;
1794
1794
  /** Create the eval run results table */
1795
1795
  declare const createEvalRunResultsTable: Migration;
1796
+ /** Add holdout flag to eval runs (existing installs) */
1797
+ declare const addHoldoutToEvalRuns: Migration;
1798
+ /** Add env columns (run environment) to eval runs (existing installs) */
1799
+ declare const addEnvToEvalRuns: Migration;
1796
1800
  /** All eval migrations in version order */
1797
1801
  declare const evalMigrations: Migration[];
1798
1802
 
@@ -1806,4 +1810,4 @@ declare const addFileContentType: Migration;
1806
1810
 
1807
1811
  declare const createCollectionsTable: Migration;
1808
1812
 
1809
- 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, addFileContentType, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -1793,6 +1793,10 @@ declare const createEvalCasesTable: Migration;
1793
1793
  declare const createEvalRunsTable: Migration;
1794
1794
  /** Create the eval run results table */
1795
1795
  declare const createEvalRunResultsTable: Migration;
1796
+ /** Add holdout flag to eval runs (existing installs) */
1797
+ declare const addHoldoutToEvalRuns: Migration;
1798
+ /** Add env columns (run environment) to eval runs (existing installs) */
1799
+ declare const addEnvToEvalRuns: Migration;
1796
1800
  /** All eval migrations in version order */
1797
1801
  declare const evalMigrations: Migration[];
1798
1802
 
@@ -1806,4 +1810,4 @@ declare const addFileContentType: Migration;
1806
1810
 
1807
1811
  declare const createCollectionsTable: Migration;
1808
1812
 
1809
- 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, addFileContentType, 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 };
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 };
package/dist/index.js CHANGED
@@ -57,7 +57,9 @@ __export(index_exports, {
57
57
  PostgresSharedResourceStore: () => PostgresSharedResourceStore,
58
58
  ThreadMessageQueueStore: () => ThreadMessageQueueStore,
59
59
  addAssistantTenantId: () => addAssistantTenantId,
60
+ addEnvToEvalRuns: () => addEnvToEvalRuns,
60
61
  addFileContentType: () => addFileContentType,
62
+ addHoldoutToEvalRuns: () => addHoldoutToEvalRuns,
61
63
  addProjectConfigColumn: () => addProjectConfigColumn,
62
64
  addScheduleTenantId: () => addScheduleTenantId,
63
65
  addSkillTenantId: () => addSkillTenantId,
@@ -3918,6 +3920,9 @@ var createEvalRunsTable = {
3918
3920
  failed_cases INTEGER NOT NULL DEFAULT 0,
3919
3921
  avg_score FLOAT NOT NULL DEFAULT 0,
3920
3922
  error TEXT,
3923
+ holdout BOOLEAN NOT NULL DEFAULT FALSE,
3924
+ env_project_id TEXT,
3925
+ env_workspace_id TEXT,
3921
3926
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
3922
3927
  started_at TIMESTAMPTZ,
3923
3928
  completed_at TIMESTAMPTZ
@@ -3984,12 +3989,47 @@ var createEvalRunResultsTable = {
3984
3989
  await client.query("DROP TABLE IF EXISTS lattice_eval_run_results");
3985
3990
  }
3986
3991
  };
3992
+ var addHoldoutToEvalRuns = {
3993
+ version: 109,
3994
+ name: "add_holdout_to_eval_runs",
3995
+ up: async (client) => {
3996
+ await client.query(`
3997
+ ALTER TABLE lattice_eval_runs
3998
+ ADD COLUMN IF NOT EXISTS holdout BOOLEAN NOT NULL DEFAULT FALSE
3999
+ `);
4000
+ },
4001
+ down: async (client) => {
4002
+ await client.query(`
4003
+ ALTER TABLE lattice_eval_runs DROP COLUMN IF EXISTS holdout
4004
+ `);
4005
+ }
4006
+ };
4007
+ var addEnvToEvalRuns = {
4008
+ version: 110,
4009
+ name: "add_env_to_eval_runs",
4010
+ up: async (client) => {
4011
+ await client.query(`
4012
+ ALTER TABLE lattice_eval_runs
4013
+ ADD COLUMN IF NOT EXISTS env_project_id TEXT,
4014
+ ADD COLUMN IF NOT EXISTS env_workspace_id TEXT
4015
+ `);
4016
+ },
4017
+ down: async (client) => {
4018
+ await client.query(`
4019
+ ALTER TABLE lattice_eval_runs
4020
+ DROP COLUMN IF EXISTS env_project_id,
4021
+ DROP COLUMN IF EXISTS env_workspace_id
4022
+ `);
4023
+ }
4024
+ };
3987
4025
  var evalMigrations = [
3988
4026
  createEvalProjectsTable,
3989
4027
  createEvalSuitesTable,
3990
4028
  createEvalCasesTable,
3991
4029
  createEvalRunsTable,
3992
- createEvalRunResultsTable
4030
+ createEvalRunResultsTable,
4031
+ addHoldoutToEvalRuns,
4032
+ addEnvToEvalRuns
3993
4033
  ];
3994
4034
 
3995
4035
  // src/stores/PostgreSQLEvalStore.ts
@@ -4112,6 +4152,9 @@ var PostgreSQLEvalStore = class {
4112
4152
  failedCases: row.failed_cases ?? 0,
4113
4153
  avgScore: row.avg_score ?? 0,
4114
4154
  error: row.error,
4155
+ holdout: row.holdout,
4156
+ envProjectId: row.env_project_id,
4157
+ envWorkspaceId: row.env_workspace_id,
4115
4158
  createdAt: new Date(row.created_at),
4116
4159
  startedAt: row.started_at ? new Date(row.started_at) : void 0,
4117
4160
  completedAt: row.completed_at ? new Date(row.completed_at) : void 0
@@ -4473,7 +4516,7 @@ var PostgreSQLEvalStore = class {
4473
4516
  `SELECT id, project_id, tenant_id,
4474
4517
  status, concurrency, total_cases,
4475
4518
  passed_cases, failed_cases, avg_score,
4476
- error, created_at, started_at, completed_at
4519
+ error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4477
4520
  FROM lattice_eval_runs
4478
4521
  WHERE ${conditions.join(" AND ")}
4479
4522
  ORDER BY created_at DESC`,
@@ -4488,7 +4531,7 @@ var PostgreSQLEvalStore = class {
4488
4531
  `SELECT id, project_id, tenant_id,
4489
4532
  status, concurrency, total_cases,
4490
4533
  passed_cases, failed_cases, avg_score,
4491
- error, created_at, started_at, completed_at
4534
+ error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4492
4535
  FROM lattice_eval_runs
4493
4536
  WHERE id = $1 AND tenant_id = $2`,
4494
4537
  [id, tenantId]
@@ -4501,12 +4544,12 @@ var PostgreSQLEvalStore = class {
4501
4544
  const actualId = id || (0, import_uuid2.v4)();
4502
4545
  const { rows } = await this.pool.query(
4503
4546
  `INSERT INTO lattice_eval_runs
4504
- (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, started_at)
4505
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
4547
+ (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, holdout, env_project_id, env_workspace_id, started_at)
4548
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
4506
4549
  RETURNING id, project_id, tenant_id,
4507
4550
  status, concurrency, total_cases,
4508
4551
  passed_cases, failed_cases, avg_score,
4509
- error, created_at, started_at, completed_at`,
4552
+ error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4510
4553
  [
4511
4554
  actualId,
4512
4555
  projectId,
@@ -4517,6 +4560,9 @@ var PostgreSQLEvalStore = class {
4517
4560
  0,
4518
4561
  0,
4519
4562
  0,
4563
+ data.holdout ?? false,
4564
+ data.envProjectId || null,
4565
+ data.envWorkspaceId || null,
4520
4566
  /* @__PURE__ */ new Date()
4521
4567
  ]
4522
4568
  );
@@ -4560,7 +4606,7 @@ var PostgreSQLEvalStore = class {
4560
4606
  RETURNING id, project_id, tenant_id,
4561
4607
  status, concurrency, total_cases,
4562
4608
  passed_cases, failed_cases, avg_score,
4563
- error, created_at, started_at, completed_at`,
4609
+ error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4564
4610
  vals
4565
4611
  );
4566
4612
  return rows.length ? this.mapRowToRun(rows[0]) : null;
@@ -8516,7 +8562,9 @@ function mapRowToChannelIdentityMapping(row) {
8516
8562
  PostgresSharedResourceStore,
8517
8563
  ThreadMessageQueueStore,
8518
8564
  addAssistantTenantId,
8565
+ addEnvToEvalRuns,
8519
8566
  addFileContentType,
8567
+ addHoldoutToEvalRuns,
8520
8568
  addProjectConfigColumn,
8521
8569
  addScheduleTenantId,
8522
8570
  addSkillTenantId,