@axiom-lattice/pg-stores 3.4.0 → 4.0.1

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@3.4.0 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@4.0.1 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 516.90 KB
12
- ESM dist/index.mjs.map 957.25 KB
13
- ESM ⚡️ Build success in 704ms
14
- CJS dist/index.js 526.27 KB
15
- CJS dist/index.js.map 957.52 KB
16
- CJS ⚡️ Build success in 709ms
11
+ ESM dist/index.mjs 520.06 KB
12
+ ESM dist/index.mjs.map 963.41 KB
13
+ ESM ⚡️ Build success in 1183ms
14
+ CJS dist/index.js 529.56 KB
15
+ CJS dist/index.js.map 963.70 KB
16
+ CJS ⚡️ Build success in 1185ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 9826ms
19
- DTS dist/index.d.ts 110.40 KB
20
- DTS dist/index.d.mts 110.40 KB
18
+ DTS ⚡️ Build success in 14638ms
19
+ DTS dist/index.d.ts 110.68 KB
20
+ DTS dist/index.d.mts 110.68 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [11f6d6a]
8
+ - @axiom-lattice/core@10.0.1
9
+
10
+ ## 4.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - 80c8dca: Release the chat, task, store, and sandbox updates together.
15
+
16
+ - Chat: frosted-glass user-message navigator, breathing run status bar, streaming auto-follow that stops when the reader scrolls away, and stop notices routed through the status bar.
17
+ - Crons: workspace/project-scoped crons, tenant-validated scope, Console project selector/card/filter.
18
+ - Store: long-term Store rebuilt as a toolbar + master-detail drawer with namespace editor, JSON validation, and TTL presets.
19
+ - Workspace menu: optional `requiredTenantRoles` gating; Store, Audit Log, API Keys, Observability, and System Info are owner/admin-only.
20
+ - Execution: durable runs re-pin the shared agent to the authoritative scope, absent scheduled scope stays unscoped, subagent breaker state is isolated, first run of a locally-constructed thread is admitted, and `TaskListFilter.threadId` authorizes isolated task threads.
21
+ - Recursion: default budget 500 with `AGENT_RECURSION_LIMIT` override.
22
+ - Uploads: default request body and upload limit raised to 500 MB.
23
+ - Sandbox: default memory aligned to 1024 MiB and service body limit raised to 500 MB.
24
+ - PostgreSQL: run availability defaults to the database clock, so clock drift cannot make fresh runs briefly unclaimable.
25
+
26
+ Breaking: default recursion budget (1000 -> 500), request/upload limit (100 MB -> 500 MB), sandbox memory (512/2048 -> 1024 MiB), and durable-run scope authority change observable behavior without extra configuration.
27
+
28
+ ### Minor Changes
29
+
30
+ - ae1535e: Make eval safe on the existing worker pool: a global `eval:execution` lease
31
+ allows any replica to run one eval at a time, cancellation is a durable
32
+ `cancel_requested` flag polled by the executing worker, and aborted runs settle
33
+ as `aborted`. The compatibility progress stream now polls the shared EvalStore
34
+ instead of the owner's process-local EventEmitter.
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [c5a4a88]
39
+ - Updated dependencies [ae1535e]
40
+ - Updated dependencies [e71979f]
41
+ - Updated dependencies [80c8dca]
42
+ - Updated dependencies [c650a59]
43
+ - Updated dependencies [ae1535e]
44
+ - Updated dependencies [ae1535e]
45
+ - @axiom-lattice/core@10.0.0
46
+ - @axiom-lattice/protocols@6.0.0
47
+
3
48
  ## 3.4.0
4
49
 
5
50
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -879,6 +879,8 @@ declare class PostgreSQLEvalStore implements EvalStore {
879
879
  error?: string;
880
880
  completedAt?: Date;
881
881
  }): Promise<EvalRun | null>;
882
+ /** Request cooperative cancellation for a running evaluation. */
883
+ requestCancel(tenantId: string, id: string): Promise<boolean>;
882
884
  /** Delete a run and its results */
883
885
  deleteRun(tenantId: string, id: string): Promise<boolean>;
884
886
  /** Get all results belonging to a run */
@@ -2766,6 +2768,8 @@ declare const addInterruptPolicyToEvalCases: Migration;
2766
2768
  declare const enforceUniqueEvalProjectName: Migration;
2767
2769
  /** Add task_id to eval runs (training round association, 1 task : N runs) */
2768
2770
  declare const addTaskIdToEvalRuns: Migration;
2771
+ /** Cooperative cancellation flag for running eval runs. */
2772
+ declare const addCancelRequestedToEvalRuns: Migration;
2769
2773
  /** All eval migrations in version order */
2770
2774
  declare const evalMigrations: Migration[];
2771
2775
 
@@ -2831,4 +2835,4 @@ declare const createChannelReplyJobsTable: Migration;
2831
2835
  */
2832
2836
  declare const createStoreItemsTable: Migration;
2833
2837
 
2834
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
2838
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -879,6 +879,8 @@ declare class PostgreSQLEvalStore implements EvalStore {
879
879
  error?: string;
880
880
  completedAt?: Date;
881
881
  }): Promise<EvalRun | null>;
882
+ /** Request cooperative cancellation for a running evaluation. */
883
+ requestCancel(tenantId: string, id: string): Promise<boolean>;
882
884
  /** Delete a run and its results */
883
885
  deleteRun(tenantId: string, id: string): Promise<boolean>;
884
886
  /** Get all results belonging to a run */
@@ -2766,6 +2768,8 @@ declare const addInterruptPolicyToEvalCases: Migration;
2766
2768
  declare const enforceUniqueEvalProjectName: Migration;
2767
2769
  /** Add task_id to eval runs (training round association, 1 task : N runs) */
2768
2770
  declare const addTaskIdToEvalRuns: Migration;
2771
+ /** Cooperative cancellation flag for running eval runs. */
2772
+ declare const addCancelRequestedToEvalRuns: Migration;
2769
2773
  /** All eval migrations in version order */
2770
2774
  declare const evalMigrations: Migration[];
2771
2775
 
@@ -2831,4 +2835,4 @@ declare const createChannelReplyJobsTable: Migration;
2831
2835
  */
2832
2836
  declare const createStoreItemsTable: Migration;
2833
2837
 
2834
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
2838
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.js CHANGED
@@ -79,6 +79,7 @@ __export(index_exports, {
79
79
  ProjectRoomMessageIdConflictError: () => ProjectRoomMessageIdConflictError,
80
80
  ThreadMessageQueueStore: () => ThreadMessageQueueStore,
81
81
  addAssistantTenantId: () => addAssistantTenantId,
82
+ addCancelRequestedToEvalRuns: () => addCancelRequestedToEvalRuns,
82
83
  addEnvToEvalRuns: () => addEnvToEvalRuns,
83
84
  addFileContentType: () => addFileContentType,
84
85
  addHoldoutToEvalRuns: () => addHoldoutToEvalRuns,
@@ -4430,6 +4431,21 @@ var addTaskIdToEvalRuns = {
4430
4431
  `);
4431
4432
  }
4432
4433
  };
4434
+ var addCancelRequestedToEvalRuns = {
4435
+ version: 205,
4436
+ name: "add_cancel_requested_to_eval_runs",
4437
+ up: async (client) => {
4438
+ await client.query(`
4439
+ ALTER TABLE lattice_eval_runs
4440
+ ADD COLUMN IF NOT EXISTS cancel_requested BOOLEAN NOT NULL DEFAULT FALSE
4441
+ `);
4442
+ },
4443
+ down: async (client) => {
4444
+ await client.query(`
4445
+ ALTER TABLE lattice_eval_runs DROP COLUMN IF EXISTS cancel_requested
4446
+ `);
4447
+ }
4448
+ };
4433
4449
  var evalMigrations = [
4434
4450
  createEvalProjectsTable,
4435
4451
  createEvalSuitesTable,
@@ -4441,7 +4457,8 @@ var evalMigrations = [
4441
4457
  addInterruptColumnsToEval,
4442
4458
  addInterruptPolicyToEvalCases,
4443
4459
  enforceUniqueEvalProjectName,
4444
- addTaskIdToEvalRuns
4460
+ addTaskIdToEvalRuns,
4461
+ addCancelRequestedToEvalRuns
4445
4462
  ];
4446
4463
 
4447
4464
  // src/stores/PostgreSQLEvalStore.ts
@@ -4566,6 +4583,7 @@ var PostgreSQLEvalStore = class {
4566
4583
  interruptedCases: row.interrupted_cases ?? 0,
4567
4584
  avgScore: row.avg_score ?? 0,
4568
4585
  error: row.error,
4586
+ cancelRequested: row.cancel_requested ?? false,
4569
4587
  holdout: row.holdout,
4570
4588
  envProjectId: row.env_project_id,
4571
4589
  envWorkspaceId: row.env_workspace_id,
@@ -4937,7 +4955,7 @@ var PostgreSQLEvalStore = class {
4937
4955
  `SELECT id, project_id, tenant_id,
4938
4956
  status, concurrency, total_cases,
4939
4957
  passed_cases, failed_cases, interrupted_cases, avg_score,
4940
- error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at
4958
+ error, holdout, env_project_id, env_workspace_id, task_id, cancel_requested, created_at, started_at, completed_at
4941
4959
  FROM lattice_eval_runs
4942
4960
  WHERE ${conditions.join(" AND ")}
4943
4961
  ORDER BY created_at DESC`,
@@ -4952,7 +4970,7 @@ var PostgreSQLEvalStore = class {
4952
4970
  `SELECT id, project_id, tenant_id,
4953
4971
  status, concurrency, total_cases,
4954
4972
  passed_cases, failed_cases, interrupted_cases, avg_score,
4955
- error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at
4973
+ error, holdout, env_project_id, env_workspace_id, task_id, cancel_requested, created_at, started_at, completed_at
4956
4974
  FROM lattice_eval_runs
4957
4975
  WHERE id = $1 AND tenant_id = $2`,
4958
4976
  [id, tenantId]
@@ -4970,7 +4988,7 @@ var PostgreSQLEvalStore = class {
4970
4988
  RETURNING id, project_id, tenant_id,
4971
4989
  status, concurrency, total_cases,
4972
4990
  passed_cases, failed_cases, interrupted_cases, avg_score,
4973
- error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at`,
4991
+ error, holdout, env_project_id, env_workspace_id, task_id, cancel_requested, created_at, started_at, completed_at`,
4974
4992
  [
4975
4993
  actualId,
4976
4994
  projectId,
@@ -5032,11 +5050,22 @@ var PostgreSQLEvalStore = class {
5032
5050
  RETURNING id, project_id, tenant_id,
5033
5051
  status, concurrency, total_cases,
5034
5052
  passed_cases, failed_cases, interrupted_cases, avg_score,
5035
- error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at`,
5053
+ error, holdout, env_project_id, env_workspace_id, task_id, cancel_requested, created_at, started_at, completed_at`,
5036
5054
  vals
5037
5055
  );
5038
5056
  return rows.length ? this.mapRowToRun(rows[0]) : null;
5039
5057
  }
5058
+ /** Request cooperative cancellation for a running evaluation. */
5059
+ async requestCancel(tenantId, id) {
5060
+ await this.ensureInitialized();
5061
+ const { rowCount } = await this.pool.query(
5062
+ `UPDATE lattice_eval_runs
5063
+ SET cancel_requested = TRUE
5064
+ WHERE tenant_id = $1 AND id = $2 AND status = 'running'`,
5065
+ [tenantId, id]
5066
+ );
5067
+ return (rowCount ?? 0) > 0;
5068
+ }
5040
5069
  /** Delete a run and its results */
5041
5070
  async deleteRun(tenantId, id) {
5042
5071
  await this.ensureInitialized();
@@ -7782,12 +7811,27 @@ var addTaskDependenciesGinIndex = {
7782
7811
  await client.query("DROP INDEX IF EXISTS idx_lattice_tasks_dependencies_gin");
7783
7812
  }
7784
7813
  };
7814
+ var addTaskContextThreadIndex = {
7815
+ version: 206,
7816
+ name: "add_task_context_thread_index",
7817
+ up: async (client) => {
7818
+ await client.query(`
7819
+ CREATE INDEX IF NOT EXISTS idx_lattice_tasks_context_thread
7820
+ ON lattice_tasks (tenant_id, (context->>'thread_id'))
7821
+ WHERE context->>'thread_id' IS NOT NULL
7822
+ `);
7823
+ },
7824
+ down: async (client) => {
7825
+ await client.query("DROP INDEX IF EXISTS idx_lattice_tasks_context_thread");
7826
+ }
7827
+ };
7785
7828
  var taskMigrations = [
7786
7829
  createTasksTable,
7787
7830
  addTaskFieldsMigration,
7788
7831
  addTaskProjectFieldsMigration,
7789
7832
  addFilesToTasks,
7790
- addTaskDependenciesGinIndex
7833
+ addTaskDependenciesGinIndex,
7834
+ addTaskContextThreadIndex
7791
7835
  ];
7792
7836
 
7793
7837
  // src/stores/PostgreSQLTaskStore.ts
@@ -7998,6 +8042,10 @@ var PostgreSQLTaskStore = class {
7998
8042
  conditions.push(`priority = $${paramIndex++}`);
7999
8043
  params.push(filter.priority);
8000
8044
  }
8045
+ if (filter.threadId) {
8046
+ conditions.push(`context->>'thread_id' = $${paramIndex++}`);
8047
+ params.push(filter.threadId);
8048
+ }
8001
8049
  if (filter.workspaceId) {
8002
8050
  conditions.push(`workspace_id = $${paramIndex++}`);
8003
8051
  params.push(filter.workspaceId);
@@ -9644,6 +9692,7 @@ var import_pg25 = require("pg");
9644
9692
  var import_pgvector = require("@langchain/community/vectorstores/pgvector");
9645
9693
  var import_documents = require("@langchain/core/documents");
9646
9694
  var import_core7 = require("@axiom-lattice/core");
9695
+ var import_protocols6 = require("@axiom-lattice/protocols");
9647
9696
  function safeTableName(name) {
9648
9697
  if (!/^[a-z][a-z0-9_-]*$/.test(name)) {
9649
9698
  throw new Error(`Invalid table name: ${name}`);
@@ -9658,16 +9707,20 @@ var PGVectorStoreProvider = class {
9658
9707
  async create(params) {
9659
9708
  const { tableName, embeddingKey } = params;
9660
9709
  const tenantId = params.tenantId ?? "default";
9710
+ const requestedKey = embeddingKey || import_protocols6.EMBEDDING_DEFAULT_KEY;
9661
9711
  const embeddings = await import_core7.embeddingsLatticeManager.getEmbeddingsClientWithTenant(
9662
9712
  tenantId,
9663
- embeddingKey
9664
- ) ?? await import_core7.embeddingsLatticeManager.getEmbeddingsClientWithTenant(
9713
+ requestedKey
9714
+ ) ?? (requestedKey === import_protocols6.EMBEDDING_DEFAULT_KEY ? void 0 : await import_core7.embeddingsLatticeManager.getEmbeddingsClientWithTenant(
9715
+ tenantId,
9716
+ import_protocols6.EMBEDDING_DEFAULT_KEY
9717
+ )) ?? await import_core7.embeddingsLatticeManager.getEmbeddingsClientWithTenant(
9665
9718
  tenantId,
9666
9719
  "default"
9667
9720
  );
9668
9721
  if (!embeddings) {
9669
9722
  throw new Error(
9670
- `No embedding model "${embeddingKey}" registered for tenant "${tenantId}", and no deployment default. Configure one in the model provider panel.`
9723
+ `No embedding model "${embeddingKey}" registered for tenant "${tenantId}", and no tenant or deployment default. Configure one in the model service panel.`
9671
9724
  );
9672
9725
  }
9673
9726
  return import_pgvector.PGVectorStore.initialize(embeddings, {
@@ -10836,6 +10889,28 @@ var addModelProviderModelKind = {
10836
10889
  `);
10837
10890
  }
10838
10891
  };
10892
+ var addModelProviderKindDefault = {
10893
+ version: 207,
10894
+ name: "add_model_provider_kind_default",
10895
+ up: async (client) => {
10896
+ await client.query(`
10897
+ DROP INDEX IF EXISTS uk_lattice_model_provider_models_tenant_default
10898
+ `);
10899
+ await client.query(`
10900
+ CREATE UNIQUE INDEX IF NOT EXISTS uk_lattice_model_provider_models_tenant_kind_default
10901
+ ON lattice_model_provider_models (tenant_id, kind) WHERE is_default
10902
+ `);
10903
+ },
10904
+ down: async (client) => {
10905
+ await client.query(`
10906
+ DROP INDEX IF EXISTS uk_lattice_model_provider_models_tenant_kind_default
10907
+ `);
10908
+ await client.query(`
10909
+ CREATE UNIQUE INDEX IF NOT EXISTS uk_lattice_model_provider_models_tenant_default
10910
+ ON lattice_model_provider_models (tenant_id) WHERE is_default
10911
+ `);
10912
+ }
10913
+ };
10839
10914
 
10840
10915
  // src/stores/PostgreSQLCapabilityBundleStore.ts
10841
10916
  var import_crypto4 = require("crypto");
@@ -11830,6 +11905,7 @@ var PostgreSQLModelProviderStore = class {
11830
11905
  this.migrationManager.register(addModelProviderModelExtra);
11831
11906
  this.migrationManager.register(addModelProviderModelDefault);
11832
11907
  this.migrationManager.register(addModelProviderModelKind);
11908
+ this.migrationManager.register(addModelProviderKindDefault);
11833
11909
  if (options.autoMigrate !== false) {
11834
11910
  this.initialize().catch((error) => {
11835
11911
  console.error("Failed to initialize PostgreSQLModelProviderStore:", error);
@@ -12168,15 +12244,22 @@ var PostgreSQLModelProviderStore = class {
12168
12244
  const effectiveKind = rows.map(
12169
12245
  (model) => model.kind ?? currentKind.get(model.id) ?? "chat"
12170
12246
  );
12171
- const namesDefault = rows.some((model) => model.isDefault === true);
12172
- if (namesDefault) {
12247
+ const namedDefaultKinds = /* @__PURE__ */ new Set();
12248
+ rows.forEach((model, index) => {
12249
+ if (model.isDefault === true) {
12250
+ namedDefaultKinds.add(effectiveKind[index]);
12251
+ }
12252
+ });
12253
+ for (const kind of namedDefaultKinds) {
12173
12254
  await client.query(
12174
- `UPDATE lattice_model_provider_models SET is_default = FALSE WHERE tenant_id = $1`,
12175
- [tenantId]
12255
+ `UPDATE lattice_model_provider_models
12256
+ SET is_default = FALSE
12257
+ WHERE tenant_id = $1 AND kind = $2 AND is_default`,
12258
+ [tenantId, kind]
12176
12259
  );
12177
12260
  }
12178
12261
  const effectiveIsDefault = rows.map(
12179
- (model) => model.isDefault ?? (namesDefault ? false : currentIsDefault.get(model.id)) ?? false
12262
+ (model, index) => model.isDefault ?? (namedDefaultKinds.has(effectiveKind[index]) ? false : currentIsDefault.get(model.id)) ?? false
12180
12263
  );
12181
12264
  await client.query(
12182
12265
  `
@@ -12864,7 +12947,7 @@ var PostgreSQLAgentRunLedger = class {
12864
12947
  throw new import_core10.AgentRunInputCommandConflictError();
12865
12948
  }
12866
12949
  const inputMessageIds = input.inputMessageIds ? (0, import_core10.normalizeAgentRunMessageIds)(input.inputMessageIds) : (0, import_core10.extractAgentRunInputMessageIds)(input.input);
12867
- const availableAt = input.availableAt ?? Date.now();
12950
+ const availableAt = input.availableAt ?? null;
12868
12951
  const limit = input.maxActiveRunsForTenant;
12869
12952
  const client = await this.pool.connect();
12870
12953
  try {
@@ -12914,7 +12997,10 @@ var PostgreSQLAgentRunLedger = class {
12914
12997
  available_at, created_at, updated_at, task_id)
12915
12998
  VALUES ($1, $2, $3, $4, $5, $6, 'pending', $7, NULL, NULL, $8, 0,
12916
12999
  $9::jsonb, $10::jsonb, $11::jsonb, $12::jsonb, $13,
12917
- to_timestamp($14::double precision / 1000.0),
13000
+ COALESCE(
13001
+ to_timestamp($14::double precision / 1000.0),
13002
+ date_trunc('milliseconds', now())
13003
+ ),
12918
13004
  date_trunc('milliseconds', now()),
12919
13005
  date_trunc('milliseconds', now()), $15)
12920
13006
  RETURNING *`,
@@ -13433,14 +13519,17 @@ var PostgreSQLAgentRunLedger = class {
13433
13519
  /** Atomically requeues or interrupts an expired run-queue row. */
13434
13520
  async settleExpiredRun(runId, outcome, options) {
13435
13521
  if (outcome === "pending") {
13436
- const availableAt = options?.availableAt ?? Date.now();
13522
+ const availableAt = options?.availableAt ?? null;
13437
13523
  const result2 = await this.pool.query(
13438
13524
  `UPDATE lattice_agent_runs
13439
13525
  SET status = 'pending',
13440
13526
  owner = NULL,
13441
13527
  lease_expires_at = NULL,
13442
13528
  started_at = NULL,
13443
- available_at = to_timestamp($2::double precision / 1000.0),
13529
+ available_at = COALESCE(
13530
+ to_timestamp($2::double precision / 1000.0),
13531
+ date_trunc('milliseconds', now())
13532
+ ),
13444
13533
  finished_at = NULL,
13445
13534
  updated_at = now()
13446
13535
  WHERE run_id = $1
@@ -13643,7 +13732,7 @@ function isActiveRunViolation(error) {
13643
13732
 
13644
13733
  // src/stores/PostgreSQLChannelReplyJobStore.ts
13645
13734
  var import_pg31 = require("pg");
13646
- var import_protocols6 = require("@axiom-lattice/protocols");
13735
+ var import_protocols7 = require("@axiom-lattice/protocols");
13647
13736
  var DB_CLOCK_MS2 = "FLOOR(EXTRACT(EPOCH FROM clock_timestamp()) * 1000)::bigint";
13648
13737
  var COLUMNS = `run_id, tenant_id, assistant_id, thread_id, adapter_channel,
13649
13738
  channel_installation_id, reply_target, input_message_id, stream_cursor, status,
@@ -13734,7 +13823,7 @@ var PostgreSQLChannelReplyJobStore = class {
13734
13823
  }
13735
13824
  /** Creates a pending job with database-clock created/updated timestamps. */
13736
13825
  async create(input) {
13737
- (0, import_protocols6.assertValidCreateChannelReplyJobInput)(input);
13826
+ (0, import_protocols7.assertValidCreateChannelReplyJobInput)(input);
13738
13827
  const result = await this.pool.query(
13739
13828
  `WITH clock AS (SELECT ${DB_CLOCK_MS2} AS now_ms)
13740
13829
  INSERT INTO lattice_channel_reply_jobs (
@@ -13785,7 +13874,7 @@ var PostgreSQLChannelReplyJobStore = class {
13785
13874
  AND (lease_owner IS NULL OR lease_expires_at IS NULL OR lease_expires_at <= $1)
13786
13875
  ORDER BY available_at ASC, created_at ASC, run_id ASC
13787
13876
  LIMIT $2`,
13788
- [now, (0, import_protocols6.normalizeChannelReplyJobListLimit)(limit)]
13877
+ [now, (0, import_protocols7.normalizeChannelReplyJobListLimit)(limit)]
13789
13878
  );
13790
13879
  return result.rows.map(mapRow9);
13791
13880
  }
@@ -13911,7 +14000,7 @@ var PostgreSQLChannelReplyJobStore = class {
13911
14000
  ORDER BY updated_at ASC, run_id ASC
13912
14001
  LIMIT $2
13913
14002
  )`,
13914
- [before, (0, import_protocols6.normalizeChannelReplyJobListLimit)(limit)]
14003
+ [before, (0, import_protocols7.normalizeChannelReplyJobListLimit)(limit)]
13915
14004
  );
13916
14005
  return result.rowCount ?? 0;
13917
14006
  }
@@ -14365,7 +14454,7 @@ var PostgreSQLCheckpointStorage = class {
14365
14454
  };
14366
14455
 
14367
14456
  // src/stores/PostgreSQLStore.ts
14368
- var import_protocols7 = require("@axiom-lattice/protocols");
14457
+ var import_protocols8 = require("@axiom-lattice/protocols");
14369
14458
  function mapRow10(row) {
14370
14459
  return {
14371
14460
  namespace: row.namespace,
@@ -14384,9 +14473,9 @@ var PostgreSQLStore = class {
14384
14473
  this.pool = pool;
14385
14474
  }
14386
14475
  async put(tenantId, input) {
14387
- (0, import_protocols7.assertStoreIdentity)(input.namespace, input.key);
14476
+ (0, import_protocols8.assertStoreIdentity)(input.namespace, input.key);
14388
14477
  const now = /* @__PURE__ */ new Date();
14389
- const expiresAt = (0, import_protocols7.storeExpiresAt)(input.ttlMinutes, now) ?? null;
14478
+ const expiresAt = (0, import_protocols8.storeExpiresAt)(input.ttlMinutes, now) ?? null;
14390
14479
  const result = await this.pool.query(
14391
14480
  `INSERT INTO lattice_store_items
14392
14481
  (tenant_id, namespace, key, value, created_at, updated_at, expires_at)
@@ -14401,7 +14490,7 @@ var PostgreSQLStore = class {
14401
14490
  return mapRow10(result.rows[0]);
14402
14491
  }
14403
14492
  async get(tenantId, namespace, key) {
14404
- (0, import_protocols7.assertStoreIdentity)(namespace, key);
14493
+ (0, import_protocols8.assertStoreIdentity)(namespace, key);
14405
14494
  const result = await this.pool.query(
14406
14495
  `SELECT tenant_id, namespace, key, value, created_at, updated_at, expires_at
14407
14496
  FROM lattice_store_items
@@ -14412,7 +14501,7 @@ var PostgreSQLStore = class {
14412
14501
  return result.rows[0] ? mapRow10(result.rows[0]) : null;
14413
14502
  }
14414
14503
  async delete(tenantId, namespace, key) {
14415
- (0, import_protocols7.assertStoreIdentity)(namespace, key);
14504
+ (0, import_protocols8.assertStoreIdentity)(namespace, key);
14416
14505
  const result = await this.pool.query(
14417
14506
  `DELETE FROM lattice_store_items
14418
14507
  WHERE tenant_id = $1 AND namespace = $2 AND key = $3`,
@@ -14427,7 +14516,7 @@ var PostgreSQLStore = class {
14427
14516
  ];
14428
14517
  const params = [tenantId, /* @__PURE__ */ new Date()];
14429
14518
  if (input.namespacePrefix) {
14430
- (0, import_protocols7.assertStoreNamespacePrefix)(input.namespacePrefix);
14519
+ (0, import_protocols8.assertStoreNamespacePrefix)(input.namespacePrefix);
14431
14520
  }
14432
14521
  if (input.namespacePrefix && input.namespacePrefix.length > 0) {
14433
14522
  params.push(input.namespacePrefix);
@@ -14441,9 +14530,9 @@ var PostgreSQLStore = class {
14441
14530
  params.push(input.query.replace(/[\\%_]/g, "\\$&"));
14442
14531
  conditions.push(`value::text ILIKE '%' || $${params.length} || '%' ESCAPE '\\'`);
14443
14532
  }
14444
- params.push((0, import_protocols7.storePaginationValue)(input.limit, 10));
14533
+ params.push((0, import_protocols8.storePaginationValue)(input.limit, 10));
14445
14534
  const limitParam = params.length;
14446
- params.push((0, import_protocols7.storePaginationValue)(input.offset, 0));
14535
+ params.push((0, import_protocols8.storePaginationValue)(input.offset, 0));
14447
14536
  const offsetParam = params.length;
14448
14537
  const result = await this.pool.query(
14449
14538
  `SELECT tenant_id, namespace, key, value, created_at, updated_at, expires_at
@@ -14456,7 +14545,7 @@ var PostgreSQLStore = class {
14456
14545
  return result.rows.map(mapRow10);
14457
14546
  }
14458
14547
  async listNamespaces(tenantId, prefix = [], limit = 100) {
14459
- (0, import_protocols7.assertStoreNamespacePrefix)(prefix);
14548
+ (0, import_protocols8.assertStoreNamespacePrefix)(prefix);
14460
14549
  const conditions = [
14461
14550
  "tenant_id = $1",
14462
14551
  "(expires_at IS NULL OR expires_at > $2)"
@@ -14466,7 +14555,7 @@ var PostgreSQLStore = class {
14466
14555
  params.push(prefix);
14467
14556
  conditions.push(`namespace[1:array_length($${params.length}::text[], 1)] = $${params.length}`);
14468
14557
  }
14469
- params.push((0, import_protocols7.storePaginationValue)(limit, 100));
14558
+ params.push((0, import_protocols8.storePaginationValue)(limit, 100));
14470
14559
  const result = await this.pool.query(
14471
14560
  `SELECT DISTINCT namespace
14472
14561
  FROM lattice_store_items
@@ -14478,7 +14567,7 @@ var PostgreSQLStore = class {
14478
14567
  return result.rows.map((row) => row.namespace);
14479
14568
  }
14480
14569
  async deleteExpired(now, limit) {
14481
- const bounded = (0, import_protocols7.storePaginationValue)(limit, 0);
14570
+ const bounded = (0, import_protocols8.storePaginationValue)(limit, 0);
14482
14571
  const result = await this.pool.query(
14483
14572
  `WITH expired AS (
14484
14573
  SELECT ctid FROM lattice_store_items
@@ -14622,6 +14711,7 @@ async function createPgStoreConfig(connectionString) {
14622
14711
  mm.register(createAgentRunRetentionMigration);
14623
14712
  mm.register(createAgentRunProjectTaskMigration);
14624
14713
  mm.register(agentRunProjectTaskRunningIndexMigration);
14714
+ mm.register(addModelProviderKindDefault);
14625
14715
  await mm.migrate();
14626
14716
  const checkpoint = import_langgraph_checkpoint_postgres.PostgresSaver.fromConnString(connectionString);
14627
14717
  checkpoint.setup().catch((err) => {
@@ -15273,6 +15363,7 @@ function mapRowToChannelIdentityMapping(row) {
15273
15363
  ProjectRoomMessageIdConflictError,
15274
15364
  ThreadMessageQueueStore,
15275
15365
  addAssistantTenantId,
15366
+ addCancelRequestedToEvalRuns,
15276
15367
  addEnvToEvalRuns,
15277
15368
  addFileContentType,
15278
15369
  addHoldoutToEvalRuns,