@axiom-lattice/pg-stores 1.0.85 → 1.0.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/pg-stores@1.0.85 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@1.0.87 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 248.30 KB
12
- CJS dist/index.js.map 465.09 KB
13
- CJS ⚡️ Build success in 632ms
14
- ESM dist/index.mjs 242.49 KB
15
- ESM dist/index.mjs.map 464.90 KB
16
- ESM ⚡️ Build success in 657ms
11
+ CJS dist/index.js 261.80 KB
12
+ CJS dist/index.js.map 490.26 KB
13
+ CJS ⚡️ Build success in 773ms
14
+ ESM dist/index.mjs 255.60 KB
15
+ ESM dist/index.mjs.map 490.01 KB
16
+ ESM ⚡️ Build success in 775ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 16627ms
19
- DTS dist/index.d.ts 57.13 KB
20
- DTS dist/index.d.mts 57.13 KB
18
+ DTS ⚡️ Build success in 17385ms
19
+ DTS dist/index.d.ts 60.34 KB
20
+ DTS dist/index.d.mts 60.34 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 1.0.87
4
+
5
+ ### Patch Changes
6
+
7
+ - aeb0bbd: add plugins
8
+ - Updated dependencies [aeb0bbd]
9
+ - @axiom-lattice/core@2.1.96
10
+ - @axiom-lattice/protocols@2.1.50
11
+
12
+ ## 1.0.86
13
+
14
+ ### Patch Changes
15
+
16
+ - f3bb4f1: huge update
17
+ - Updated dependencies [f3bb4f1]
18
+ - @axiom-lattice/core@2.1.95
19
+ - @axiom-lattice/protocols@2.1.49
20
+
3
21
  ## 1.0.85
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,10 +1,11 @@
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, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
- export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, CreateAssistantRequest, CreateBindingInput, 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, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } 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, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
+ export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAssistantRequest, CreateBindingInput, 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, 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, ThreadInfo } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
7
7
  import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
8
+ import { DocumentInterface } from '@langchain/core/documents';
8
9
 
9
10
  /**
10
11
  * PostgreSQL implementation of ThreadStore
@@ -267,6 +268,21 @@ declare class PostgreSQLDatabaseConfigStore implements DatabaseConfigStore {
267
268
  private encryptPasswordInConfig;
268
269
  }
269
270
 
271
+ /**
272
+ * PostgreSQL implementation of ConnectionStore
273
+ */
274
+
275
+ declare class PostgreSQLConnectionStore implements ConnectionStore {
276
+ private db;
277
+ constructor(db: Pool);
278
+ listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
279
+ getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
280
+ create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
281
+ update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
282
+ delete(tenantId: string, type: string, key: string): Promise<boolean>;
283
+ private mapRow;
284
+ }
285
+
270
286
  /**
271
287
  * PostgreSQL implementation of MetricsServerConfigStore
272
288
  */
@@ -1231,6 +1247,61 @@ declare class PostgresSharedResourceStore implements SharedResourceStore {
1231
1247
  private _mapRow;
1232
1248
  }
1233
1249
 
1250
+ /**
1251
+ * PostgreSQL implementation of CollectionStore with tenant isolation
1252
+ */
1253
+
1254
+ interface PostgreSQLCollectionStoreOptions {
1255
+ pool?: Pool;
1256
+ poolConfig?: string | PoolConfig;
1257
+ autoMigrate?: boolean;
1258
+ }
1259
+ declare class PostgreSQLCollectionStore implements CollectionStore {
1260
+ private pool;
1261
+ private initialized;
1262
+ private ownsPool;
1263
+ private initPromise;
1264
+ constructor(options: PostgreSQLCollectionStoreOptions);
1265
+ initialize(): Promise<void>;
1266
+ private ensureInit;
1267
+ getAllCollections(tenantId: string): Promise<Collection[]>;
1268
+ getCollectionByName(tenantId: string, name: string): Promise<Collection | null>;
1269
+ createCollection(tenantId: string, data: CreateCollectionRequest): Promise<Collection>;
1270
+ updateCollection(tenantId: string, name: string, updates: UpdateCollectionRequest): Promise<Collection | null>;
1271
+ deleteCollection(tenantId: string, name: string): Promise<boolean>;
1272
+ dispose(): Promise<void>;
1273
+ private rowToCollection;
1274
+ }
1275
+
1276
+ /**
1277
+ * PGVectorStoreProvider
1278
+ *
1279
+ * VectorStoreProvider implementation using PostgreSQL with pgvector extension.
1280
+ * Each created VectorStore maps to a separate table with the vector column.
1281
+ */
1282
+
1283
+ declare class PGVectorStoreProvider implements VectorStoreProvider {
1284
+ private pool;
1285
+ private connectionString;
1286
+ constructor(pool: Pool, connectionString: string);
1287
+ create(params: VectorStoreCreateParams): Promise<any>;
1288
+ getEntryCount(tableName: string): Promise<number>;
1289
+ listEntries(tableName: string): Promise<DocumentInterface[]>;
1290
+ dropTable(tableName: string): Promise<void>;
1291
+ dispose(_name: string): Promise<void>;
1292
+ }
1293
+ /**
1294
+ * Create a PGVectorStoreProvider from a connection string.
1295
+ * Creates its own Pool — call pool.end() to clean up.
1296
+ *
1297
+ * @param connectionString PostgreSQL connection string
1298
+ * @returns PGVectorStoreProvider instance
1299
+ */
1300
+ declare function createPGVectorStoreProvider(connectionString: string): {
1301
+ provider: PGVectorStoreProvider;
1302
+ pool: Pool;
1303
+ };
1304
+
1234
1305
  declare function createPgStoreConfig(connectionString: string): Promise<{
1235
1306
  workspace: PostgreSQLWorkspaceStore;
1236
1307
  project: PostgreSQLProjectStore;
@@ -1242,6 +1313,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1242
1313
  channelInstallation: PostgreSQLChannelInstallationStore;
1243
1314
  thread: PostgreSQLThreadStore;
1244
1315
  database: PostgreSQLDatabaseConfigStore;
1316
+ connection: PostgreSQLConnectionStore;
1245
1317
  metrics: PostgreSQLMetricsServerConfigStore;
1246
1318
  mcp: PostgreSQLMcpServerConfigStore;
1247
1319
  assistant: PostgreSQLAssistantStore;
@@ -1252,6 +1324,8 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1252
1324
  schedule: PostgreSQLScheduleStorage;
1253
1325
  menu: MenuStore;
1254
1326
  sharedResource: PostgresSharedResourceStore;
1327
+ collection: PostgreSQLCollectionStore;
1328
+ vectorStoreProvider: PGVectorStoreProvider;
1255
1329
  checkpoint: PostgresSaver;
1256
1330
  }>;
1257
1331
 
@@ -1712,4 +1786,10 @@ declare const createMenuItemsTable: Migration;
1712
1786
 
1713
1787
  declare const addFileContentType: Migration;
1714
1788
 
1715
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addFileContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1789
+ /**
1790
+ * Collection table migrations
1791
+ */
1792
+
1793
+ declare const createCollectionsTable: Migration;
1794
+
1795
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addFileContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
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, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
- export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, CreateAssistantRequest, CreateBindingInput, 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, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } 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, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
+ export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAssistantRequest, CreateBindingInput, 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, 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, ThreadInfo } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
7
7
  import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
8
+ import { DocumentInterface } from '@langchain/core/documents';
8
9
 
9
10
  /**
10
11
  * PostgreSQL implementation of ThreadStore
@@ -267,6 +268,21 @@ declare class PostgreSQLDatabaseConfigStore implements DatabaseConfigStore {
267
268
  private encryptPasswordInConfig;
268
269
  }
269
270
 
271
+ /**
272
+ * PostgreSQL implementation of ConnectionStore
273
+ */
274
+
275
+ declare class PostgreSQLConnectionStore implements ConnectionStore {
276
+ private db;
277
+ constructor(db: Pool);
278
+ listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
279
+ getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
280
+ create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
281
+ update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
282
+ delete(tenantId: string, type: string, key: string): Promise<boolean>;
283
+ private mapRow;
284
+ }
285
+
270
286
  /**
271
287
  * PostgreSQL implementation of MetricsServerConfigStore
272
288
  */
@@ -1231,6 +1247,61 @@ declare class PostgresSharedResourceStore implements SharedResourceStore {
1231
1247
  private _mapRow;
1232
1248
  }
1233
1249
 
1250
+ /**
1251
+ * PostgreSQL implementation of CollectionStore with tenant isolation
1252
+ */
1253
+
1254
+ interface PostgreSQLCollectionStoreOptions {
1255
+ pool?: Pool;
1256
+ poolConfig?: string | PoolConfig;
1257
+ autoMigrate?: boolean;
1258
+ }
1259
+ declare class PostgreSQLCollectionStore implements CollectionStore {
1260
+ private pool;
1261
+ private initialized;
1262
+ private ownsPool;
1263
+ private initPromise;
1264
+ constructor(options: PostgreSQLCollectionStoreOptions);
1265
+ initialize(): Promise<void>;
1266
+ private ensureInit;
1267
+ getAllCollections(tenantId: string): Promise<Collection[]>;
1268
+ getCollectionByName(tenantId: string, name: string): Promise<Collection | null>;
1269
+ createCollection(tenantId: string, data: CreateCollectionRequest): Promise<Collection>;
1270
+ updateCollection(tenantId: string, name: string, updates: UpdateCollectionRequest): Promise<Collection | null>;
1271
+ deleteCollection(tenantId: string, name: string): Promise<boolean>;
1272
+ dispose(): Promise<void>;
1273
+ private rowToCollection;
1274
+ }
1275
+
1276
+ /**
1277
+ * PGVectorStoreProvider
1278
+ *
1279
+ * VectorStoreProvider implementation using PostgreSQL with pgvector extension.
1280
+ * Each created VectorStore maps to a separate table with the vector column.
1281
+ */
1282
+
1283
+ declare class PGVectorStoreProvider implements VectorStoreProvider {
1284
+ private pool;
1285
+ private connectionString;
1286
+ constructor(pool: Pool, connectionString: string);
1287
+ create(params: VectorStoreCreateParams): Promise<any>;
1288
+ getEntryCount(tableName: string): Promise<number>;
1289
+ listEntries(tableName: string): Promise<DocumentInterface[]>;
1290
+ dropTable(tableName: string): Promise<void>;
1291
+ dispose(_name: string): Promise<void>;
1292
+ }
1293
+ /**
1294
+ * Create a PGVectorStoreProvider from a connection string.
1295
+ * Creates its own Pool — call pool.end() to clean up.
1296
+ *
1297
+ * @param connectionString PostgreSQL connection string
1298
+ * @returns PGVectorStoreProvider instance
1299
+ */
1300
+ declare function createPGVectorStoreProvider(connectionString: string): {
1301
+ provider: PGVectorStoreProvider;
1302
+ pool: Pool;
1303
+ };
1304
+
1234
1305
  declare function createPgStoreConfig(connectionString: string): Promise<{
1235
1306
  workspace: PostgreSQLWorkspaceStore;
1236
1307
  project: PostgreSQLProjectStore;
@@ -1242,6 +1313,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1242
1313
  channelInstallation: PostgreSQLChannelInstallationStore;
1243
1314
  thread: PostgreSQLThreadStore;
1244
1315
  database: PostgreSQLDatabaseConfigStore;
1316
+ connection: PostgreSQLConnectionStore;
1245
1317
  metrics: PostgreSQLMetricsServerConfigStore;
1246
1318
  mcp: PostgreSQLMcpServerConfigStore;
1247
1319
  assistant: PostgreSQLAssistantStore;
@@ -1252,6 +1324,8 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
1252
1324
  schedule: PostgreSQLScheduleStorage;
1253
1325
  menu: MenuStore;
1254
1326
  sharedResource: PostgresSharedResourceStore;
1327
+ collection: PostgreSQLCollectionStore;
1328
+ vectorStoreProvider: PGVectorStoreProvider;
1255
1329
  checkpoint: PostgresSaver;
1256
1330
  }>;
1257
1331
 
@@ -1712,4 +1786,10 @@ declare const createMenuItemsTable: Migration;
1712
1786
 
1713
1787
  declare const addFileContentType: Migration;
1714
1788
 
1715
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addFileContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1789
+ /**
1790
+ * Collection table migrations
1791
+ */
1792
+
1793
+ declare const createCollectionsTable: Migration;
1794
+
1795
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addFileContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };