@axiom-lattice/pg-stores 3.3.3 → 3.3.4

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.3.3 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@3.3.4 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 434.94 KB
12
- CJS dist/index.js.map 793.26 KB
13
- CJS ⚡️ Build success in 1005ms
14
- ESM dist/index.mjs 426.45 KB
15
- ESM dist/index.mjs.map 792.92 KB
16
- ESM ⚡️ Build success in 1062ms
11
+ CJS dist/index.js 443.09 KB
12
+ CJS dist/index.js.map 807.74 KB
13
+ CJS ⚡️ Build success in 1017ms
14
+ ESM dist/index.mjs 434.40 KB
15
+ ESM dist/index.mjs.map 807.39 KB
16
+ ESM ⚡️ Build success in 1084ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 13655ms
19
- DTS dist/index.d.ts 91.36 KB
20
- DTS dist/index.d.mts 91.36 KB
18
+ DTS ⚡️ Build success in 14116ms
19
+ DTS dist/index.d.ts 93.36 KB
20
+ DTS dist/index.d.mts 93.36 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 3.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [aa2d760]
8
+ - Updated dependencies [ad5a730]
9
+ - @axiom-lattice/core@6.4.0
10
+ - @axiom-lattice/protocols@4.8.0
11
+
3
12
  ## 3.3.3
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Pool, PoolConfig, PoolClient } from 'pg';
2
2
  export { Pool, PoolConfig } from 'pg';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
4
  export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, CapabilityBundle, CapabilityBundleStore, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateCapabilityBundleInput, CreateChannelInstallationInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateCapabilityBundleInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
5
5
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
@@ -1916,6 +1916,25 @@ declare class PostgreSQLOutboxStore implements OutboxStore {
1916
1916
  private rowToEvent;
1917
1917
  }
1918
1918
 
1919
+ /** Persists tenant-scoped plugin deployments in PostgreSQL. */
1920
+ declare class PostgreSQLPluginDeploymentStore implements PluginDeploymentStore {
1921
+ /** Creates a store using an externally managed shared pool. */
1922
+ constructor(options: {
1923
+ pool: Pool;
1924
+ });
1925
+ private readonly pool;
1926
+ /** Lists every deployment for a tenant, ordered by plugin type. */
1927
+ listByTenant(tenantId: string): Promise<PluginDeployment[]>;
1928
+ /** Returns the deployment for a tenant + plugin type, or undefined. */
1929
+ get(tenantId: string, pluginType: string): Promise<PluginDeployment | undefined>;
1930
+ /** Upserts a deployment keyed by tenant + plugin type, preserving the original id and createdAt. */
1931
+ upsert(deployment: PluginDeployment): Promise<PluginDeployment>;
1932
+ /** Applies a partial update to mutable columns; returns undefined when no row exists. */
1933
+ updateStatus(tenantId: string, pluginType: string, patch: Partial<Omit<PluginDeployment, "id" | "tenantId" | "pluginType">>): Promise<PluginDeployment | undefined>;
1934
+ /** Deletes a deployment by tenant + plugin type; returns whether a row was removed. */
1935
+ delete(tenantId: string, pluginType: string): Promise<boolean>;
1936
+ }
1937
+
1919
1938
  declare function createPgStoreConfig(connectionString: string): Promise<{
1920
1939
  workspace: PostgreSQLWorkspaceStore;
1921
1940
  project: PostgreSQLProjectStore;
@@ -1952,6 +1971,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1952
1971
  userPushSubscription: PostgreSQLUserPushSubscriptionStore;
1953
1972
  lease: PostgreSQLLeaseStore;
1954
1973
  outbox: PostgreSQLOutboxStore;
1974
+ pluginDeployment: PostgreSQLPluginDeploymentStore;
1955
1975
  vectorStoreProvider: PGVectorStoreProvider;
1956
1976
  checkpoint: PostgresSaver;
1957
1977
  }>;
@@ -2444,4 +2464,19 @@ declare const createProjectRoomTables: Migration;
2444
2464
  /** Adds per-user, per-room read markers for unread counts. */
2445
2465
  declare const createProjectRoomReadStates: Migration;
2446
2466
 
2447
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, 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, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
2467
+ /** Creates the durable plugin-deployment table. */
2468
+ declare const createPluginDeployments: Migration;
2469
+ /**
2470
+ * Drops the now-unused `auth_token` column introduced by
2471
+ * {@link createPluginDeployments}.
2472
+ *
2473
+ * Resident plugin hosts no longer receive a per-deployment bearer token; the
2474
+ * sandbox service key plus loopback transport replace it. This is a separate
2475
+ * migration (rather than editing v189 in place) because migration identity is
2476
+ * the name: databases that already applied the released v189 keep its
2477
+ * `auth_token NOT NULL` column, so the token removal must be applied as a new
2478
+ * forward migration.
2479
+ */
2480
+ declare const dropPluginDeploymentAuthToken: Migration;
2481
+
2482
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, 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, 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, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Pool, PoolConfig, PoolClient } from 'pg';
2
2
  export { Pool, PoolConfig } from 'pg';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
4
  export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, CapabilityBundle, CapabilityBundleStore, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateCapabilityBundleInput, CreateChannelInstallationInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateCapabilityBundleInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
5
5
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
@@ -1916,6 +1916,25 @@ declare class PostgreSQLOutboxStore implements OutboxStore {
1916
1916
  private rowToEvent;
1917
1917
  }
1918
1918
 
1919
+ /** Persists tenant-scoped plugin deployments in PostgreSQL. */
1920
+ declare class PostgreSQLPluginDeploymentStore implements PluginDeploymentStore {
1921
+ /** Creates a store using an externally managed shared pool. */
1922
+ constructor(options: {
1923
+ pool: Pool;
1924
+ });
1925
+ private readonly pool;
1926
+ /** Lists every deployment for a tenant, ordered by plugin type. */
1927
+ listByTenant(tenantId: string): Promise<PluginDeployment[]>;
1928
+ /** Returns the deployment for a tenant + plugin type, or undefined. */
1929
+ get(tenantId: string, pluginType: string): Promise<PluginDeployment | undefined>;
1930
+ /** Upserts a deployment keyed by tenant + plugin type, preserving the original id and createdAt. */
1931
+ upsert(deployment: PluginDeployment): Promise<PluginDeployment>;
1932
+ /** Applies a partial update to mutable columns; returns undefined when no row exists. */
1933
+ updateStatus(tenantId: string, pluginType: string, patch: Partial<Omit<PluginDeployment, "id" | "tenantId" | "pluginType">>): Promise<PluginDeployment | undefined>;
1934
+ /** Deletes a deployment by tenant + plugin type; returns whether a row was removed. */
1935
+ delete(tenantId: string, pluginType: string): Promise<boolean>;
1936
+ }
1937
+
1919
1938
  declare function createPgStoreConfig(connectionString: string): Promise<{
1920
1939
  workspace: PostgreSQLWorkspaceStore;
1921
1940
  project: PostgreSQLProjectStore;
@@ -1952,6 +1971,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1952
1971
  userPushSubscription: PostgreSQLUserPushSubscriptionStore;
1953
1972
  lease: PostgreSQLLeaseStore;
1954
1973
  outbox: PostgreSQLOutboxStore;
1974
+ pluginDeployment: PostgreSQLPluginDeploymentStore;
1955
1975
  vectorStoreProvider: PGVectorStoreProvider;
1956
1976
  checkpoint: PostgresSaver;
1957
1977
  }>;
@@ -2444,4 +2464,19 @@ declare const createProjectRoomTables: Migration;
2444
2464
  /** Adds per-user, per-room read markers for unread counts. */
2445
2465
  declare const createProjectRoomReadStates: Migration;
2446
2466
 
2447
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, 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, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
2467
+ /** Creates the durable plugin-deployment table. */
2468
+ declare const createPluginDeployments: Migration;
2469
+ /**
2470
+ * Drops the now-unused `auth_token` column introduced by
2471
+ * {@link createPluginDeployments}.
2472
+ *
2473
+ * Resident plugin hosts no longer receive a per-deployment bearer token; the
2474
+ * sandbox service key plus loopback transport replace it. This is a separate
2475
+ * migration (rather than editing v189 in place) because migration identity is
2476
+ * the name: databases that already applied the released v189 keep its
2477
+ * `auth_token NOT NULL` column, so the token removal must be applied as a new
2478
+ * forward migration.
2479
+ */
2480
+ declare const dropPluginDeploymentAuthToken: Migration;
2481
+
2482
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, 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, 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, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.js CHANGED
@@ -51,6 +51,7 @@ __export(index_exports, {
51
51
  PostgreSQLMetricsServerConfigStore: () => PostgreSQLMetricsServerConfigStore,
52
52
  PostgreSQLModelProviderStore: () => PostgreSQLModelProviderStore,
53
53
  PostgreSQLOpenAuditStore: () => PostgreSQLOpenAuditStore,
54
+ PostgreSQLPluginDeploymentStore: () => PostgreSQLPluginDeploymentStore,
54
55
  PostgreSQLProjectBotMembershipStore: () => PostgreSQLProjectBotMembershipStore,
55
56
  PostgreSQLProjectMembershipStore: () => PostgreSQLProjectMembershipStore,
56
57
  PostgreSQLProjectRoomMessageStore: () => PostgreSQLProjectRoomMessageStore,
@@ -108,6 +109,7 @@ __export(index_exports, {
108
109
  createMetricsConfigsTable: () => createMetricsConfigsTable,
109
110
  createPGVectorStoreProvider: () => createPGVectorStoreProvider,
110
111
  createPgStoreConfig: () => createPgStoreConfig,
112
+ createPluginDeployments: () => createPluginDeployments,
111
113
  createProjectRoomReadStates: () => createProjectRoomReadStates,
112
114
  createProjectRoomTables: () => createProjectRoomTables,
113
115
  createProjectsTable: () => createProjectsTable,
@@ -120,6 +122,7 @@ __export(index_exports, {
120
122
  createUsersTable: () => createUsersTable,
121
123
  createWorkflowTrackingTables: () => createWorkflowTrackingTables,
122
124
  createWorkspacesTable: () => createWorkspacesTable,
125
+ dropPluginDeploymentAuthToken: () => dropPluginDeploymentAuthToken,
123
126
  enforceUniqueEvalProjectName: () => enforceUniqueEvalProjectName,
124
127
  evalMigrations: () => evalMigrations,
125
128
  mapRowToRunStep: () => mapRowToRunStep,
@@ -7964,11 +7967,11 @@ var PostgreSQLTaskStore = class {
7964
7967
  params.push(filter.ownerId);
7965
7968
  }
7966
7969
  if (filter.status) {
7967
- const statuses = filter.status.split(",").map((s) => s.trim()).filter(Boolean);
7968
- const placeholders = statuses.map((_, i) => `$${paramIndex + i}`).join(", ");
7970
+ const statuses2 = filter.status.split(",").map((s) => s.trim()).filter(Boolean);
7971
+ const placeholders = statuses2.map((_, i) => `$${paramIndex + i}`).join(", ");
7969
7972
  conditions.push(`status IN (${placeholders})`);
7970
- params.push(...statuses);
7971
- paramIndex += statuses.length;
7973
+ params.push(...statuses2);
7974
+ paramIndex += statuses2.length;
7972
7975
  }
7973
7976
  if (filter.priority) {
7974
7977
  conditions.push(`priority = $${paramIndex++}`);
@@ -10271,6 +10274,60 @@ var createOutboxTable = {
10271
10274
  }
10272
10275
  };
10273
10276
 
10277
+ // src/migrations/plugin_deployment_migration.ts
10278
+ var createPluginDeployments = {
10279
+ version: 189,
10280
+ name: "create_plugin_deployments",
10281
+ up: async (client) => {
10282
+ await client.query(`
10283
+ CREATE TABLE IF NOT EXISTS lattice_plugin_deployments (
10284
+ id VARCHAR(255) PRIMARY KEY,
10285
+ tenant_id VARCHAR(255) NOT NULL,
10286
+ plugin_type VARCHAR(255) NOT NULL,
10287
+ plugin_version VARCHAR(255) NOT NULL,
10288
+ mode VARCHAR(16) NOT NULL,
10289
+ status VARCHAR(32) NOT NULL,
10290
+ provider VARCHAR(64) NOT NULL,
10291
+ sandbox_name VARCHAR(255) NOT NULL,
10292
+ port INTEGER NOT NULL,
10293
+ endpoint TEXT,
10294
+ image_ref TEXT,
10295
+ auth_token TEXT NOT NULL,
10296
+ idle_timeout_ms INTEGER NOT NULL,
10297
+ last_health_at TIMESTAMPTZ,
10298
+ last_error TEXT,
10299
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
10300
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
10301
+ UNIQUE (tenant_id, plugin_type)
10302
+ )
10303
+ `);
10304
+ await client.query(`
10305
+ CREATE INDEX IF NOT EXISTS idx_lattice_plugin_deployments_tenant
10306
+ ON lattice_plugin_deployments (tenant_id)
10307
+ `);
10308
+ },
10309
+ down: async (client) => {
10310
+ await client.query("DROP INDEX IF EXISTS idx_lattice_plugin_deployments_tenant");
10311
+ await client.query("DROP TABLE IF EXISTS lattice_plugin_deployments");
10312
+ }
10313
+ };
10314
+ var dropPluginDeploymentAuthToken = {
10315
+ version: 190,
10316
+ name: "drop_plugin_deployment_auth_token",
10317
+ up: async (client) => {
10318
+ await client.query(`
10319
+ ALTER TABLE lattice_plugin_deployments
10320
+ DROP COLUMN IF EXISTS auth_token
10321
+ `);
10322
+ },
10323
+ down: async (client) => {
10324
+ await client.query(`
10325
+ ALTER TABLE lattice_plugin_deployments
10326
+ ADD COLUMN IF NOT EXISTS auth_token TEXT NOT NULL DEFAULT ''
10327
+ `);
10328
+ }
10329
+ };
10330
+
10274
10331
  // src/migrations/model_provider_migrations.ts
10275
10332
  var createModelProvidersTable = {
10276
10333
  version: 181,
@@ -12054,6 +12111,145 @@ var PostgreSQLOutboxStore = class {
12054
12111
  }
12055
12112
  };
12056
12113
 
12114
+ // src/stores/PostgreSQLPluginDeploymentStore.ts
12115
+ var columns5 = "id, tenant_id, plugin_type, plugin_version, mode, status, provider, sandbox_name, port, endpoint, image_ref, idle_timeout_ms, last_health_at, last_error, created_at, updated_at";
12116
+ var statuses = [
12117
+ "requested",
12118
+ "provisioning",
12119
+ "running",
12120
+ "paused",
12121
+ "stopping",
12122
+ "stopped",
12123
+ "failed"
12124
+ ];
12125
+ function isStatus4(value) {
12126
+ return typeof value === "string" && statuses.includes(value);
12127
+ }
12128
+ function mapRow8(row) {
12129
+ if (typeof row.id !== "string" || typeof row.tenant_id !== "string" || typeof row.plugin_type !== "string" || typeof row.plugin_version !== "string" || row.mode !== "onDemand" && row.mode !== "alwaysOn" || !isStatus4(row.status) || typeof row.provider !== "string" || typeof row.sandbox_name !== "string" || typeof row.port !== "number" || typeof row.idle_timeout_ms !== "number" || !(row.created_at instanceof Date) || Number.isNaN(row.created_at.getTime()) || !(row.updated_at instanceof Date) || Number.isNaN(row.updated_at.getTime())) {
12130
+ throw new Error("Invalid plugin deployment row");
12131
+ }
12132
+ return {
12133
+ id: row.id,
12134
+ tenantId: row.tenant_id,
12135
+ pluginType: row.plugin_type,
12136
+ pluginVersion: row.plugin_version,
12137
+ mode: row.mode,
12138
+ status: row.status,
12139
+ provider: row.provider,
12140
+ sandboxName: row.sandbox_name,
12141
+ port: row.port,
12142
+ ...typeof row.endpoint === "string" ? { endpoint: row.endpoint } : {},
12143
+ ...typeof row.image_ref === "string" ? { imageRef: row.image_ref } : {},
12144
+ idleTimeoutMs: row.idle_timeout_ms,
12145
+ ...row.last_health_at instanceof Date && !Number.isNaN(row.last_health_at.getTime()) ? { lastHealthAt: row.last_health_at.toISOString() } : {},
12146
+ ...typeof row.last_error === "string" ? { lastError: row.last_error } : {},
12147
+ createdAt: row.created_at.toISOString(),
12148
+ updatedAt: row.updated_at.toISOString()
12149
+ };
12150
+ }
12151
+ var PostgreSQLPluginDeploymentStore = class {
12152
+ /** Creates a store using an externally managed shared pool. */
12153
+ constructor(options) {
12154
+ this.pool = options.pool;
12155
+ }
12156
+ /** Lists every deployment for a tenant, ordered by plugin type. */
12157
+ async listByTenant(tenantId) {
12158
+ const result = await this.pool.query(
12159
+ `SELECT ${columns5} FROM lattice_plugin_deployments WHERE tenant_id = $1 ORDER BY plugin_type`,
12160
+ [tenantId]
12161
+ );
12162
+ return result.rows.map(mapRow8);
12163
+ }
12164
+ /** Returns the deployment for a tenant + plugin type, or undefined. */
12165
+ async get(tenantId, pluginType) {
12166
+ const result = await this.pool.query(
12167
+ `SELECT ${columns5} FROM lattice_plugin_deployments WHERE tenant_id = $1 AND plugin_type = $2`,
12168
+ [tenantId, pluginType]
12169
+ );
12170
+ return result.rows[0] ? mapRow8(result.rows[0]) : void 0;
12171
+ }
12172
+ /** Upserts a deployment keyed by tenant + plugin type, preserving the original id and createdAt. */
12173
+ async upsert(deployment) {
12174
+ const result = await this.pool.query(
12175
+ `INSERT INTO lattice_plugin_deployments (${columns5})
12176
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
12177
+ ON CONFLICT (tenant_id, plugin_type) DO UPDATE SET
12178
+ plugin_version = EXCLUDED.plugin_version,
12179
+ mode = EXCLUDED.mode,
12180
+ status = EXCLUDED.status,
12181
+ provider = EXCLUDED.provider,
12182
+ sandbox_name = EXCLUDED.sandbox_name,
12183
+ port = EXCLUDED.port,
12184
+ endpoint = EXCLUDED.endpoint,
12185
+ image_ref = EXCLUDED.image_ref,
12186
+ idle_timeout_ms = EXCLUDED.idle_timeout_ms,
12187
+ last_health_at = EXCLUDED.last_health_at,
12188
+ last_error = EXCLUDED.last_error,
12189
+ updated_at = NOW()
12190
+ RETURNING ${columns5}`,
12191
+ [
12192
+ deployment.id,
12193
+ deployment.tenantId,
12194
+ deployment.pluginType,
12195
+ deployment.pluginVersion,
12196
+ deployment.mode,
12197
+ deployment.status,
12198
+ deployment.provider,
12199
+ deployment.sandboxName,
12200
+ deployment.port,
12201
+ deployment.endpoint ?? null,
12202
+ deployment.imageRef ?? null,
12203
+ deployment.idleTimeoutMs,
12204
+ deployment.lastHealthAt ? new Date(deployment.lastHealthAt) : null,
12205
+ deployment.lastError ?? null,
12206
+ new Date(deployment.createdAt),
12207
+ new Date(deployment.updatedAt)
12208
+ ]
12209
+ );
12210
+ return mapRow8(result.rows[0]);
12211
+ }
12212
+ /** Applies a partial update to mutable columns; returns undefined when no row exists. */
12213
+ async updateStatus(tenantId, pluginType, patch) {
12214
+ const assignments = [];
12215
+ const params = [];
12216
+ const assign = (column, value) => {
12217
+ params.push(value);
12218
+ assignments.push(`${column} = $${params.length}`);
12219
+ };
12220
+ if (patch.status !== void 0) assign("status", patch.status);
12221
+ if (patch.mode !== void 0) assign("mode", patch.mode);
12222
+ if (patch.endpoint !== void 0) assign("endpoint", patch.endpoint);
12223
+ if (patch.imageRef !== void 0) assign("image_ref", patch.imageRef);
12224
+ if (patch.idleTimeoutMs !== void 0) assign("idle_timeout_ms", patch.idleTimeoutMs);
12225
+ if (patch.lastHealthAt !== void 0) assign("last_health_at", new Date(patch.lastHealthAt));
12226
+ if (patch.lastError !== void 0) assign("last_error", patch.lastError);
12227
+ if (patch.pluginVersion !== void 0) assign("plugin_version", patch.pluginVersion);
12228
+ if (patch.provider !== void 0) assign("provider", patch.provider);
12229
+ if (patch.sandboxName !== void 0) assign("sandbox_name", patch.sandboxName);
12230
+ if (patch.port !== void 0) assign("port", patch.port);
12231
+ assignments.push("updated_at = NOW()");
12232
+ params.push(tenantId, pluginType);
12233
+ const tenantParam = params.length - 1;
12234
+ const pluginParam = params.length;
12235
+ const result = await this.pool.query(
12236
+ `UPDATE lattice_plugin_deployments SET ${assignments.join(", ")}
12237
+ WHERE tenant_id = $${tenantParam} AND plugin_type = $${pluginParam}
12238
+ RETURNING ${columns5}`,
12239
+ params
12240
+ );
12241
+ return result.rows[0] ? mapRow8(result.rows[0]) : void 0;
12242
+ }
12243
+ /** Deletes a deployment by tenant + plugin type; returns whether a row was removed. */
12244
+ async delete(tenantId, pluginType) {
12245
+ const result = await this.pool.query(
12246
+ `DELETE FROM lattice_plugin_deployments WHERE tenant_id = $1 AND plugin_type = $2`,
12247
+ [tenantId, pluginType]
12248
+ );
12249
+ return (result.rowCount ?? 0) > 0;
12250
+ }
12251
+ };
12252
+
12057
12253
  // src/createPgStoreConfig.ts
12058
12254
  async function createPgStoreConfig(connectionString) {
12059
12255
  const pool = new import_pg30.Pool({ connectionString });
@@ -12126,6 +12322,8 @@ async function createPgStoreConfig(connectionString) {
12126
12322
  mm.register(createDistributedLeases);
12127
12323
  mm.register(createOutboxTable);
12128
12324
  mm.register(addConnectionSecretFields);
12325
+ mm.register(createPluginDeployments);
12326
+ mm.register(dropPluginDeploymentAuthToken);
12129
12327
  await mm.migrate();
12130
12328
  const checkpoint = import_langgraph_checkpoint_postgres.PostgresSaver.fromConnString(connectionString);
12131
12329
  checkpoint.setup().catch((err) => {
@@ -12169,6 +12367,7 @@ async function createPgStoreConfig(connectionString) {
12169
12367
  userPushSubscription: new PostgreSQLUserPushSubscriptionStore(opts),
12170
12368
  lease: new PostgreSQLLeaseStore(opts),
12171
12369
  outbox: new PostgreSQLOutboxStore(opts),
12370
+ pluginDeployment: new PostgreSQLPluginDeploymentStore(opts),
12172
12371
  vectorStoreProvider: new PGVectorStoreProvider(pool, connectionString),
12173
12372
  checkpoint
12174
12373
  };
@@ -12744,6 +12943,7 @@ function mapRowToChannelIdentityMapping(row) {
12744
12943
  PostgreSQLMetricsServerConfigStore,
12745
12944
  PostgreSQLModelProviderStore,
12746
12945
  PostgreSQLOpenAuditStore,
12946
+ PostgreSQLPluginDeploymentStore,
12747
12947
  PostgreSQLProjectBotMembershipStore,
12748
12948
  PostgreSQLProjectMembershipStore,
12749
12949
  PostgreSQLProjectRoomMessageStore,
@@ -12801,6 +13001,7 @@ function mapRowToChannelIdentityMapping(row) {
12801
13001
  createMetricsConfigsTable,
12802
13002
  createPGVectorStoreProvider,
12803
13003
  createPgStoreConfig,
13004
+ createPluginDeployments,
12804
13005
  createProjectRoomReadStates,
12805
13006
  createProjectRoomTables,
12806
13007
  createProjectsTable,
@@ -12813,6 +13014,7 @@ function mapRowToChannelIdentityMapping(row) {
12813
13014
  createUsersTable,
12814
13015
  createWorkflowTrackingTables,
12815
13016
  createWorkspacesTable,
13017
+ dropPluginDeploymentAuthToken,
12816
13018
  enforceUniqueEvalProjectName,
12817
13019
  evalMigrations,
12818
13020
  mapRowToRunStep,